|
StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
|
RAII encoder context with optional BSF pipeline. More...
#include <StormByte/multimedia/ffmpeg/AVEncoder.hxx>


Public Member Functions | |
| AVEncoder (const AVEncoder &)=delete | |
| Copy constructor (deleted). | |
| AVEncoder (AVEncoder &&other) noexcept=default | |
| Move constructor. | |
| ~AVEncoder () noexcept override | |
| Destructor. | |
| AVEncoder & | operator= (const AVEncoder &)=delete |
| Copy assignment (deleted). | |
| AVEncoder & | operator= (AVEncoder &&other) noexcept=default |
| Move assignment. | |
| FFmpeg::OperationResult | SendFrame (AVFrame &frame) noexcept |
| Sends a frame to the encoder. | |
| FFmpeg::OperationResult | EncodeSubtitle (AVSubtitle &sub, AVPacket &pkt) noexcept |
Encodes one text subtitle (avcodec_encode_subtitle). | |
| FFmpeg::OperationResult | ReceivePacket (AVPacket &pkt) noexcept |
| Receives an encoded packet (after BSF). | |
| int | StreamIndex () const noexcept |
| Stream index this encoder was opened for. | |
| AVRational | TimeBase () const noexcept |
| Encoder time base. | |
| bool | IsSubtitle () const noexcept |
| true if the opened codec is a subtitle encoder. | |
| void | Flush () noexcept |
| Flushes encoder and BSF. | |
| FFmpeg::OperationResult | SetEof () noexcept |
| Signals EOF to encoder and BSF. | |
| operator bool () const noexcept | |
| Whether a codec context is open. | |
| int | CodecId () const noexcept |
| Opened codec id. | |
| int | CodecType () const noexcept |
| Media type of the opened codec. | |
| int | SampleFmt () const noexcept |
| Audio sample format. | |
| int | FrameSize () const noexcept |
| Encoder frame size in samples. | |
| int | Channels () const noexcept |
| Audio channel count. | |
| int | SampleRate () const noexcept |
| Audio sample rate in Hz. | |
| AVChannelLayout | ChannelLayout () const noexcept |
| Channel layout owned by the context. | |
| bool | HasBFrames () const noexcept |
| Whether the codec uses B-frames. | |
| AVRational | FrameRate () const noexcept |
| Video framerate guessed by the encoder. | |
| const ::AVCodecContext * | Context () const noexcept |
| Opened codec context for mux stream bind. | |
Public Member Functions inherited from StormByte::Multimedia::FFmpeg::AVPointer<::AVCodecContext > | |
| constexpr | AVPointer () noexcept=delete |
| Default constructor (deleted). | |
| constexpr | AVPointer (const AVPointer &) noexcept=delete |
| Copy constructor (deleted). | |
| constexpr | AVPointer (AVPointer &&other) noexcept |
| Move constructor. | |
| virtual | ~AVPointer () noexcept=default |
| Destructor. | |
| constexpr AVPointer & | operator= (const AVPointer &) noexcept=delete |
| Copy assignment (deleted). | |
| constexpr AVPointer & | operator= (AVPointer &&other) noexcept |
| Move assignment. | |
Static Public Member Functions | |
| static ExpectedAVEncoder | Open (AVCodec *codec, const AVCodecParameters ¶ms, const AVFormatContext &fmt, int stream_index) noexcept |
Opens an encoder; may attach BSF from fmt. | |
| static ExpectedAVEncoder | Open (AVCodec *codec, const AVCodecParameters ¶ms, int stream_index, const std::map< std::string, std::string > &options, AVRational time_base) noexcept |
| Opens an encoder without a muxer (no BSF). | |
Additional Inherited Members | |
Protected Member Functions inherited from StormByte::Multimedia::FFmpeg::AVPointer<::AVCodecContext > | |
| constexpr | AVPointer (std::decay_t< ::AVCodecContext > *ptr) noexcept |
Adopts ptr. | |
| constexpr const std::decay_t< ::AVCodecContext > * | Get () const noexcept |
| Const view of the raw FFmpeg pointer. | |
| constexpr std::decay_t< ::AVCodecContext > * | Get () noexcept |
| Mutable view of the raw FFmpeg pointer. | |
| constexpr std::decay_t< ::AVCodecContext > * | Detach () noexcept |
| Yields the raw pointer and leaves this wrapper empty. | |
Protected Attributes inherited from StormByte::Multimedia::FFmpeg::AVPointer<::AVCodecContext > | |
| std::decay_t< ::AVCodecContext > * | m_ptr |
| Owned FFmpeg pointer. | |
RAII encoder context with optional BSF pipeline.
|
delete |
Copy constructor (deleted).
|
defaultnoexcept |
Move constructor.
| other | Source encoder. |
|
overridenoexcept |
Destructor.
|
noexcept |
Channel layout owned by the context.
|
noexcept |
Audio channel count.
|
noexcept |
Opened codec id.
AVCodecID as int, or AV_CODEC_ID_NONE.
|
noexcept |
Media type of the opened codec.
AVMediaType as int.
|
noexcept |
Opened codec context for mux stream bind.
|
noexcept |
Encodes one text subtitle (avcodec_encode_subtitle).
| sub | Filled subtitle. |
| pkt | Destination packet. |
|
noexcept |
Flushes encoder and BSF.
|
noexcept |
Video framerate guessed by the encoder.
{0, 1}.
|
noexcept |
Encoder frame size in samples.
0 means variable.
|
noexcept |
Whether the codec uses B-frames.
has_b_frames is set.
|
noexcept |
true if the opened codec is a subtitle encoder.
|
staticnoexcept |
Opens an encoder; may attach BSF from fmt.
| codec | Encoder codec. |
| params | Stream codec parameters. |
| fmt | Format context (for BSF decision). |
| stream_index | Stream index. |
|
staticnoexcept |
Opens an encoder without a muxer (no BSF).
| codec | Encoder codec. |
| params | Stream codec parameters. |
| stream_index | Output track index. |
| options | av_opt_set pairs applied before avcodec_open2. |
| time_base | Encoder time base. Ignored if num/den are not positive. |
|
explicitnoexcept |
Whether a codec context is open.
|
defaultnoexcept |
Move assignment.
| other | Source encoder. |
Copy assignment (deleted).
|
noexcept |
Receives an encoded packet (after BSF).
| pkt | Destination packet. |
For HEVC, prepends a prefix SEI NAL with the matching HDR10+ T.35.
|
noexcept |
Audio sample format.
AVSampleFormat as int, or AV_SAMPLE_FMT_NONE.
|
noexcept |
Audio sample rate in Hz.
|
noexcept |
Sends a frame to the encoder.
| frame | Source frame. |
Captures HDR10+ (AV_FRAME_DATA_DYNAMIC_HDR_PLUS) and keeps the ITU-T T.35 payload keyed by PTS so ReceivePacket can emit SEI.
|
noexcept |
Signals EOF to encoder and BSF.
|
noexcept |
|
noexcept |
Encoder time base.
time_base, or 0/1.