MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ VideoContainerBuffer()

MayaFlux::Buffers::VideoContainerBuffer::VideoContainerBuffer ( const std::shared_ptr< Kakshya::StreamContainer > &  container,
Portal::Graphics::ImageFormat  format = Portal::Graphics::ImageFormat::RGBA8 
)

Construct a VideoContainerBuffer from a video container.

Extracts width, height, and pixel format from the container's structure and initialises the TextureBuffer base with matching dimensions. Creates a pending VideoStreamReader that is wired on initialize().

Parameters
containerBacking video StreamContainer (must carry VIDEO_COLOR data).
formatPixel format (default RGBA8 matching container convention).

Definition at line 202 of file VideoContainerBuffer.cpp.

206 static_cast<uint32_t>(container->get_structure().get_width()),
207 static_cast<uint32_t>(container->get_structure().get_height()),
208 format)
209 , m_container(container)
210{
211 if (!m_container) {
212 error<std::invalid_argument>(Journal::Component::Buffers, Journal::Context::Init,
213 std::source_location::current(),
214 "VideoContainerBuffer: container must not be null");
215 }
216
217 m_video_reader = std::make_shared<VideoStreamReader>(m_container);
218
220 "VideoContainerBuffer created: {}x{} from container",
221 get_width(), get_height());
222}
#define MF_INFO(comp, ctx,...)
TextureBuffer(uint32_t width, uint32_t height, Portal::Graphics::ImageFormat format, const void *initial_pixel_data=nullptr)
Create texture buffer with dimensions.
std::shared_ptr< Kakshya::StreamContainer > m_container
std::shared_ptr< VideoStreamReader > m_video_reader
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::Buffers, MayaFlux::Buffers::TextureBuffer::get_height(), MayaFlux::Buffers::TextureBuffer::get_width(), MayaFlux::Journal::Init, m_container, m_video_reader, and MF_INFO.

+ Here is the call graph for this function: