Create a CameraContainer sized to the negotiated device resolution.
- Returns
- Initialised container with slot-0 allocated, ready for pull_frame().
Definition at line 131 of file CameraReader.cpp.
132{
134 if (!
m_video->is_codec_valid()) {
135 m_last_error =
"Cannot create container: reader not open";
136 return nullptr;
137 }
138
140 if (!fmt) {
141 m_last_error =
"Requested pixel format has no ImageFormat equivalent";
142 return nullptr;
143 }
144
145 return std::make_shared<Kakshya::CameraContainer>(
148 *fmt,
150}
int m_requested_pixel_format
Pixel format requested at open() time, as an AVPixelFormat int.
std::shared_mutex m_ctx_mutex
std::shared_ptr< VideoStreamContext > m_video
std::optional< Portal::Graphics::ImageFormat > to_image_format(int av_pixel_format)
Map an AVPixelFormat to the Portal ImageFormat backing it.
References m_ctx_mutex, m_last_error, m_requested_pixel_format, m_video, and MayaFlux::IO::to_image_format().