summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice
ModeNameSize
-rw-r--r--buffer_cache.cpp5571logplain
-rw-r--r--buffer_sharing.cpp4726logplain
-rw-r--r--capture_async.cpp1972logplain
-rw-r--r--controls.cpp4391logplain
-rw-r--r--dequeue_watchdog.cpp2242logplain
-rw-r--r--double_open.cpp685logplain
-rw-r--r--formats.cpp1751logplain
-rw-r--r--meson.build1163logplain
-rw-r--r--request_buffers.cpp531logplain
-rw-r--r--stream_on_off.cpp653logplain
-rw-r--r--v4l2_m2mdevice.cpp4841logplain
-rw-r--r--v4l2_videodevice_test.cpp2042logplain
-rw-r--r--v4l2_videodevice_test.h1067logplain
ss="hl com"> * * * Internal: * * Data for the Android stream is produced by processing a libcamera * stream created by the HAL for that purpose. The libcamera stream * needs to be supplied with intermediate buffers where the library * delivers frames to be processed and then provided to the framework. * The libcamera stream configuration is not a direct translation of the * Android stream characteristics, but it describes the format and size * required for the processing procedure to produce frames in the * Android required format. * * +-----+ +-----+ * | A | | L | * +-----+ +-----+ * | | * V V * +-----+ +------+ * | B | | FB | * +-----+ +------+ * ^ | * |-------Processing------| * * * Mapped: * * Data for the Android stream is produced by processing a libcamera * stream associated with another CameraStream. Mapped camera streams do * not need any memory to be reserved for them as they process data * produced by libcamera for a different stream whose format and size * are compatible with the processing procedure requirements to produce * frames in the Android required format. * * +-----+ +-----+ +-----+ * | A | | A' | | L | * +-----+ +-----+ +-----+ * | | | * V V V * +-----+ +-----+ +------+ * | B | | B' |<---------| FB | * +-----+ +-----+ +------+ * ^ | * |--Processing--| * * * -------------------------------------------------------------------- * A = Android stream * L = libcamera stream * B = memory buffer * FB = libcamera FrameBuffer * "Processing" = Frame processing procedure (Encoding, scaling etc) */ enum class Type { Direct, Internal, Mapped, }; CameraStream(CameraDevice *cameraDevice, Type type, camera3_stream_t *camera3Stream, unsigned int index); Type type() const { return type_; } const camera3_stream_t &camera3Stream() const { return *camera3Stream_; } const libcamera::StreamConfiguration &configuration() const; libcamera::Stream *stream() const; int configure(); int process(const libcamera::FrameBuffer &source, MappedCamera3Buffer *dest, CameraMetadata *metadata); libcamera::FrameBuffer *getBuffer(); void putBuffer(libcamera::FrameBuffer *buffer); private: CameraDevice *cameraDevice_; libcamera::CameraConfiguration *config_; Type type_; camera3_stream_t *camera3Stream_; unsigned int index_; std::unique_ptr<libcamera::FrameBufferAllocator> allocator_; std::vector<libcamera::FrameBuffer *> buffers_; /* * The class has to be MoveConstructible as instances are stored in * an std::vector in CameraDevice. */ std::unique_ptr<std::mutex> mutex_; std::unique_ptr<PostProcessor> postProcessor_; }; #endif /* __ANDROID_CAMERA_STREAM__ */