summaryrefslogtreecommitdiff
path: root/src/android/post_processor.h
blob: ac40d34148922edf642083f33312c5d3f3fa98b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2020, Google Inc.
 *
 * post_processor.h - CameraStream Post Processing Interface
 */
#ifndef __ANDROID_POST_PROCESSOR_H__
#define __ANDROID_POST_PROCESSOR_H__

#include <libcamera/buffer.h>
#include <libcamera/stream.h>

#include <libcamera/internal/buffer.h>

class CameraMetadata;

class PostProcessor
{
public:
	virtual ~PostProcessor() = default;

	virtual int configure(const libcamera::StreamConfiguration &inCfg,
			      const libcamera::StreamConfiguration &outCfg) = 0;
	virtual int process(const libcamera::FrameBuffer &source,
			    libcamera::MappedBuffer *destination,
			    const CameraMetadata &requestMetadata,
			    CameraMetadata *resultMetadata) = 0;
};

#endif /* __ANDROID_POST_PROCESSOR_H__ */
f (!media_) { cerr << "Unable to find \'vimc\' media device node" << endl; return TestSkip; } media_->acquire(); int ret = media_->open(); if (ret) { cerr << "Unable to open media device: " << media_->deviceNode() << ": " << strerror(ret) << endl; media_->release(); return TestSkip; } MediaEntity *videoEntity = media_->getEntityByName("Scaler"); if (!videoEntity) { cerr << "Unable to find media entity 'Scaler'" << endl; media_->release(); return TestFail; } scaler_ = new V4L2Subdevice(videoEntity); ret = scaler_->open(); if (ret) { cerr << "Unable to open video subdevice " << scaler_->entity()->deviceNode() << endl; media_->release(); return TestSkip; } return 0; } void V4L2SubdeviceTest::cleanup() { media_->release(); delete scaler_; }