avcpp 3.1.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
Loading...
Searching...
No Matches
av::CodecParameters Class Reference

Owning codec parameters. More...

#include <codecparameters.h>

Inheritance diagram for av::CodecParameters:

Public Member Functions

 CodecParameters ()
 Allocate empty parameters.
 ~CodecParameters ()
 Free the owned parameters.
Public Member Functions inherited from av::CodecParametersView
 CodecParametersView (AVCodecParameters *codecpar=nullptr)
 Wrap FFmpeg codec parameters.
bool isValid () const
 Whether the view refers to 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 copyFrom (const class CodecContext2 &src, OptionalErrorCode ec=throws())
 Copy parameters from a codec context.
void copyTo (class CodecContext2 &dst, OptionalErrorCode ec=throws()) const
 Copy these parameters into a codec context.
int getAudioFrameDuration (int frame_bytes) const
 Duration of one audio frame of the given size.
AVMediaType codecType () const
 Media type the codec handles.
void codecType (AVMediaType codec_type)
 Set the media type.
AVMediaType mediaType () const
 Media type of the parameters.
void mediaType (AVMediaType media_type)
 Set the media type.
AVCodecID codecId () const
 Identifier of the codec.
void codecId (AVCodecID codec_id)
 Set the codec identifier.
Codec encodingCodec () const
 Encoder for this codec identifier.
Codec decodingCodec () const
 Decoder for this codec identifier.
uint32_t codecTag () const
 Four-character code of the codec inside the container.
void codecTag (uint32_t codec_tag)
 Set the container codec tag.
Public Member Functions inherited from FFWrapperPtr< AVCodecParameters >
 FFWrapperPtr ()=default
 Create an empty wrapper; isNull() is true.
const AVCodecParameters * raw () const
 Read access to the wrapped object.
void reset (AVCodecParameters *raw=nullptr)
 Replace the stored pointer.
bool isNull () const
 Whether the wrapper is empty.
void _log (int level, const char *fmt) const
 Log through the FFmpeg log system, using this wrapper as the context.

Additional Inherited Members

Protected Member Functions inherited from av::noncopyable
 noncopyable (const noncopyable &)=delete
void operator= (const noncopyable &)=delete
Protected Attributes inherited from FFWrapperPtr< AVCodecParameters >
AVCodecParameters * m_raw
 The wrapped pointer; owned by the derived class, not by this template.

Detailed Description

Allocates the FFmpeg structure on construction and frees it on destruction. Use it when parameters have to outlive the stream or the context they came from.


The documentation for this class was generated from the following file: