A container file for reading encoded videos from disk. More...
#include <cvb/codec_bridge/input_container.hpp>
Public Member Functions | |
std::unique_ptr< Decoder > | VideoDecoder (const Cvb::String &name, CodecBridge::PixelFormat pixelFormat=CodecBridge::PixelFormat::None) |
Get or create a video decoder for this container file. | |
std::unique_ptr< Decoder > | VideoDecoder (CodecBridge::PixelFormat pixelFormat=CodecBridge::PixelFormat::None) |
Get or create a video decoder for this container file. | |
std::unique_ptr< Packet > | NextPacket () |
Get the next packet from the container. | |
Static Public Member Functions | |
static std::unique_ptr< InputContainer > | Create (const Cvb::String &fileName) |
Creates an input container based on a file name. | |
A container file for reading encoded videos from disk.
|
inlinestatic |
Creates an input container based on a file name.
[in] | fileName | The file name for the container file. |
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 be supported by FFmpeg. Use FFmpeg.exe -h formats to checkout valid formats.
|
inline |
Get the next packet from the container.
Any | exception derived from std::exception including CvbException. |
The returned packet may refer to any stream (e.g video, audio) in the container. If no data is left this method will return empty pointers.
|
inline |
Get or create a video decoder for this container file.
[in] | pixelFormat | Target pixel format for decoding the frames (None means default). |
Any | exception derived from std::exception including CvbException. |
This method will pick the first decoder that can handle the container and its content. If the decoder supports multiple formats a target pixel format may also be used. Both parameters are only requests and may be ignored.
|
inline |
Get or create a video decoder for this container file.
[in] | name | The name of the decoder, must match the container. |
[in] | pixelFormat | Target pixel format for decoding the frames (None means default). |
Any | exception derived from std::exception including CvbException. |
This method will pick the first decoder that can handle the container and its content. The name may can be used pick a specific decoder. If the decoder supports multiple formats a target pixel format may also be used. Both parameters are only requests and may be ignored.