An encoder for video frames. More...
#include <cvb/codec_bridge/encoder.hpp>
Public Member Functions | |
CodecStatus | Encode (const Frame &frame) |
Encode a video frame. | |
void | Flush () |
Flush the encoder and finish encoding. | |
std::unique_ptr< Packet > | ReceivePacket () |
Receive an encoded packet. | |
Static Public Member Functions | |
static std::unique_ptr< Encoder > | Create (const CodecConfig &codecConfig) |
Creates an encoder with a given configuration. | |
An encoder for video frames.
An encoder can encode video frames into raw encoded packets.
|
inlinestatic |
Creates an encoder with a given configuration.
[in] | codecConfig | The configuration. |
Any | exception derived from std::exception including CvbException. |
As encoders may use exclusive system resources the number of encoders active simultaneously is often limited to one.
|
inline |
Encode a video frame.
[in] | frame | The video frame to encode. |
Any | exception derived from std::exception including CvbException. |
Encoders will usually deliver packets only after a few frames have been encoded. If no packets are received the encoder will refuse to take new frames and return ReadoutRequired.
|
inline |
Flush the encoder and finish encoding.
Any | exception derived from std::exception including CvbException. |
Notify the encoder that no more frames will be send, so the remaining packets can be delivered. The encoder will not accept any more frames after flushing.
|
inline |
Receive an encoded packet.
Any | exception derived from std::exception including CvbException. |
Encoders will usually deliver packets only after a few frames have been encoded. If no new packets can be received this method will return empty pointers.
We use cookies to improve your experience. By using this documentation, you agree to our use of cookies.