|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::IO::VideoStreamContext::open_device | ( | const FFmpegDemuxContext & | demux, |
| uint32_t | target_width = 0, |
||
| uint32_t | target_height = 0, |
||
| int | target_format = -1 |
||
| ) |
Open codec only, without initialising the SwsContext scaler.
Intended for live capture devices (dshow, v4l2, avfoundation) where pix_fmt is AV_PIX_FMT_NONE until the first decoded frame arrives and sws_getContext therefore cannot be called at open time.
After this call is_codec_valid() returns true; is_valid() returns false until rebuild_scaler_from_frame() has been called successfully.
| demux | Open demux context (must outlive this object). |
| target_width | Desired output width (0 = use frame width). |
| target_height | Desired output height (0 = use frame height). |
| target_format | Desired AVPixelFormat (negative = AV_PIX_FMT_RGBA). |
Definition at line 208 of file VideoStreamContext.cpp.
References close(), codec_context, MayaFlux::Journal::FileIO, MayaFlux::IO::FFmpegDemuxContext::find_best_stream(), frame_rate, MayaFlux::IO::FFmpegDemuxContext::get_stream(), height, MayaFlux::IO::FFmpegDemuxContext::init_ffmpeg(), MayaFlux::Journal::IO, MayaFlux::IO::FFmpegDemuxContext::is_open(), m_last_error, MF_INFO, out_height, out_width, src_pixel_format, stream_index, target_format, target_height, target_width, and width.
Here is the call graph for this function: