|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| uint32_t MayaFlux::IO::IOManager::capture_window | ( | const std::shared_ptr< Core::Window > & | window, |
| const std::string & | filepath, | ||
| double | frame_rate, | ||
| AVCodecID | codec_id = AV_CODEC_ID_NONE |
||
| ) |
Begin continuous capture of a window's rendered frames to a file.
Delegates to VideoFileWriter::record(). The encoder is opened lazily on the first delivered frame so pixel format and dimensions come from the live swapchain. Returns an opaque capture id for use with stop_capture().
Returns 0 if the window is null or record() fails.
| window | Window whose swapchain frames will be captured. |
| filepath | Output file path. Extension determines container format. |
| frame_rate | Nominal frame rate written into the container header. |
| codec_id | Encoder override; AV_CODEC_ID_NONE = container default. |
Definition at line 480 of file IOManager.cpp.
References MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_next_video_capture_id, m_video_captures, m_video_captures_mutex, m_video_writers, MF_ERROR, and MayaFlux::IO::IOManager::VideoCaptureState::writer.