Files
external_libcamera/src/android/post_processor.h
Umang Jain 05862a7e35 android: post_processor: Drop return value for process()
PostProcessor::process() is invoked by CameraStream class
in case any post-processing is required for the camera stream.
The failure or success is checked via the value returned by
CameraStream::process().

Now that the post-processor notifies about the post-processing
completion operation, we can drop the return value of
PostProcessor::process(). The status of post-processing is passed
to CameraDevice::streamProcessingComplete() by the
PostProcessor::processComplete signal's slot.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
2021-10-26 16:11:17 +05:30

36 lines
843 B
C++

/* 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/base/signal.h>
#include <libcamera/framebuffer.h>
#include <libcamera/stream.h>
#include "camera_buffer.h"
#include "camera_request.h"
class PostProcessor
{
public:
enum class Status {
Error,
Success
};
virtual ~PostProcessor() = default;
virtual int configure(const libcamera::StreamConfiguration &inCfg,
const libcamera::StreamConfiguration &outCfg) = 0;
virtual void process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) = 0;
libcamera::Signal<Camera3RequestDescriptor::StreamBuffer *, Status> processComplete;
};
#endif /* __ANDROID_POST_PROCESSOR_H__ */