A container file for writing encoded videos to disk. More...
#include <cvb/codec_bridge/output_container.hpp>
Public Member Functions | |
void | WritePacket (std::unique_ptr< Packet > &&packet) |
Write a packet to the container. More... | |
void | WriteHeader () |
Write a header to the container. More... | |
void | WriteTrailer () |
Write a trailer to the container. More... | |
Static Public Member Functions | |
static std::unique_ptr< OutputContainer > | Create (const Cvb::String &fileName, Encoder &encoder) |
Creates an output container based on a file name and an encoder. More... | |
A container file for writing encoded videos to disk.
|
inlinestatic |
Creates an output container based on a file name and an encoder.
[in] | fileName | The file name for the container file. |
[in] | encoder | The encoder that will provide the encoded packets for the container. |
Any | exception derived from std::exception including CvbException. |
The file is closed after the container is released.
The format of the container is determined by the file extension. The format must support the encoder. Use FFmpeg.exe -h formats to checkout valid formats.
|
inline |
Write a header to the container.
Any | exception derived from std::exception including CvbException. |
The header must be written before any packets are written.
|
inline |
Write a packet to the container.
[in] | packet | The packet to write. |
Any | exception derived from std::exception including CvbException. |
The packet will be consumed by the container. You must not use it again after writing.
|
inline |
Write a trailer to the container.
Any | exception derived from std::exception including CvbException. |
The trailer must be written after all packets are written.