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

◆ CameraContainer()

MayaFlux::Kakshya::CameraContainer::CameraContainer ( uint32_t  width,
uint32_t  height,
uint32_t  channels = 4,
double  frame_rate = 30.0 
)

Construct a CameraContainer with specified resolution.

Parameters
widthFrame width in pixels.
heightFrame height in pixels.
channelsColour channels per pixel (default 4 for RGBA).
frame_rateDevice frame rate in fps.

Definition at line 10 of file CameraContainer.cpp.

12 : VideoStreamContainer(width, height, channels, frame_rate)
13{
14 m_num_frames = 1;
15
16 const size_t frame_bytes = get_frame_byte_size();
17
18 m_data.resize(1);
19 auto& pixels = m_data[0].emplace<std::vector<uint8_t>>();
20 pixels.resize(frame_bytes, 0);
21
23
25 "CameraContainer created: {}x{} @{:.1f}fps ({} bytes/frame)",
26 width, height, frame_rate, frame_bytes);
27}
#define MF_INFO(comp, ctx,...)
VideoStreamContainer(uint32_t width=0, uint32_t height=0, uint32_t channels=4, double frame_rate=0.0)
Construct a VideoStreamContainer with specified parameters.
size_t get_frame_byte_size() const
Get the total byte size of one frame (width * height * channels).
@ Init
Engine/subsystem initialization.
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.

References MayaFlux::Kakshya::VideoStreamContainer::get_frame_byte_size(), MayaFlux::Journal::Init, MayaFlux::Journal::Kakshya, MayaFlux::Kakshya::VideoStreamContainer::m_data, MayaFlux::Kakshya::VideoStreamContainer::m_num_frames, MF_INFO, and MayaFlux::Kakshya::VideoStreamContainer::setup_dimensions().

+ Here is the call graph for this function: