17#include <libavcodec/avcodec.h>
Error codes, error categories and the OptionalErrorCode convention.
Common helpers: comparisons, value lookup, non-copyable base, string utilities.
Base class for audio and video codec contexts.
Definition codeccontext.h:64
void copyFrom(const class CodecContext2 &src, OptionalErrorCode ec=throws())
Copy parameters from a codec context.
void mediaType(AVMediaType media_type)
Set the media type.
Codec encodingCodec() const
Encoder for this codec identifier.
void codecId(AVCodecID codec_id)
Set the codec identifier.
int getAudioFrameDuration(int frame_bytes) const
Duration of one audio frame of the given size.
Codec decodingCodec() const
Decoder for this codec identifier.
CodecParametersView(AVCodecParameters *codecpar=nullptr)
Wrap FFmpeg codec parameters.
void copyTo(class CodecContext2 &dst, OptionalErrorCode ec=throws()) const
Copy these parameters into a codec context.
uint32_t codecTag() const
Four-character code of the codec inside the container.
void codecType(AVMediaType codec_type)
Set the media type.
AVMediaType mediaType() const
Media type of the parameters.
void copyFrom(CodecParametersView src, OptionalErrorCode ec=throws())
Copy parameters into this view from another view.
void copyTo(CodecParametersView dst, OptionalErrorCode ec=throws()) const
Copy these parameters into another view.
void codecTag(uint32_t codec_tag)
Set the container codec tag.
bool isValid() const
Whether the view refers to parameters.
AVCodecID codecId() const
Identifier of the codec.
AVMediaType codecType() const
Media type the codec handles.
~CodecParameters()
Free the owned parameters.
CodecParameters()
Allocate empty parameters.
Codec descriptor.
Definition codec.h:32
Carries the caller's choice between exceptions and error codes.
Definition averror.h:96
Codec descriptors and lookup by name or id.
FFmpeg types re-exported for the public API and small value wrappers.
Root namespace of the library.
Definition audioresampler.h:19
Direction
Direction a codec or a stream is used in.
Definition codecparameters.h:29
@ Encoding
Compressing frames into packets.
Definition codecparameters.h:33
@ Invalid
Not a direction; the default state of a context that has none.
Definition codecparameters.h:31
@ Decoding
Decompressing packets into frames.
Definition codecparameters.h:35