23 "CameraContainer created: {}x{} @{:.1f}fps ({} bytes/frame)",
46 "CameraContainer: wired IOService with reader_id={}", reader_id);
51 auto processor = std::make_shared<FrameAccessProcessor>();
52 processor->set_auto_advance(
false);
#define MF_INFO(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
void create_default_processor() override
Create FrameAccessProcessor with auto_advance disabled.
uint8_t * mutable_frame_ptr()
Mutable pointer into m_data[0] for the caller to write decoded pixels.
void process_default() override
Override to fire request_frame after each processor cycle.
Registry::Service::IOService * m_io_service
CameraContainer(uint32_t width, uint32_t height, Portal::Graphics::ImageFormat format, double frame_rate=30.0)
Construct a CameraContainer with specified resolution and format.
void setup_io(uint64_t reader_id)
Wire the CameraIOService callback for demand-driven frame pulls.
size_t get_frame_element_count() const
Elements in one frame: width * height * channels.
std::vector< DataVariant > m_data
void set_default_processor(const std::shared_ptr< DataProcessor > &processor) override
Set the default data processor for this container.
size_t get_frame_byte_size() const
Total byte size of one frame: width * height * bytes_per_pixel.
void process_default() override
Process the container's data using the default processor.
Concrete base implementation for streaming video containers.
Interface * get_service()
Query for a backend service.
static BackendRegistry & instance()
Get the global registry instance.
@ Init
Engine/subsystem initialization.
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.
DataVariant make_empty_storage(ImageFormat format, size_t element_count)
std::pair< uint8_t *, size_t > variant_bytes_mutable(DataVariant &v)
Get a mutable pointer to the raw bytes of a DataVariant and its size.
ImageFormat
User-friendly image format enum.
std::function< void(uint64_t reader_id)> request_frame
Request the identified camera reader to pull the next frame.
Backend IO streaming service interface.