AVCodec

AVCodec.

Members

Structs

AVCodecHWConfigInternal
struct AVCodecHWConfigInternal

Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported. The array is terminated by a NULL pointer.

Variables

bsfs
const(char)* bsfs;

Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding.

capabilities
int capabilities;

Codec capabilities. see AV_CODEC_CAP_*

caps_internal
int caps_internal;

Internal codec capabilities. See FF_CODEC_CAP_* in internal.h

channel_layouts
const(ulong)* channel_layouts;

< array of support channel layouts, or NULL if unknown. array is terminated by 0

close
int function(AVCodecContext*) close;
Undocumented in source.
decode
int function(AVCodecContext*, void* outdata, int* outdata_size, AVPacket* avpkt) decode;
Undocumented in source.
defaults
const(AVCodecDefault)* defaults;

Private codec-specific defaults.

encode2
int function(AVCodecContext* avctx, AVPacket* avpkt, const(AVFrame)* frame, int* got_packet_ptr) encode2;

Encode data to an AVPacket.

encode_sub
int function(AVCodecContext*, ubyte* buf, int buf_size, const(AVSubtitle)* sub) encode_sub;
Undocumented in source.
flush
void function(AVCodecContext*) flush;

Flush buffers. Will be called when seeking

hw_configs
const(AVCodecHWConfigInternal*)* hw_configs;
Undocumented in source.
id
AVCodecID id;
Undocumented in source.
init
int function(AVCodecContext*) init;
Undocumented in source.
init_static_data
void function(AVCodec* codec) init_static_data;

Initialize codec static data, called from avcodec_register().

init_thread_copy
int function(AVCodecContext*) init_thread_copy;

If defined, called on thread contexts when they are created. If the codec allocates writable tables in init(), re-allocate them here. priv_data will be set to a copy of the original.

long_name
const(char)* long_name;

Descriptive name for the codec, meant to be more human readable than name. You should use the NULL_IF_CONFIG_SMALL() macro to define it.

max_lowres
ubyte max_lowres;

< maximum value for lowres supported by the decoder

name
const(char)* name;

Name of the codec implementation. The name is globally unique among encoders and among decoders (but an encoder and a decoder can share the same name). This is the primary way to find a codec from the user perspective.

next
AVCodec* next;
Undocumented in source.
pix_fmts
const(AVPixelFormat)* pix_fmts;

< array of supported pixel formats, or NULL if unknown, array is terminated by -1

priv_class
const(AVClass)* priv_class;

< AVClass for the private context

priv_data_size
int priv_data_size;

No fields below this line are part of the public API. They may not be used outside of libavcodec and can be changed and removed at will. New public fields should be added right above. ****************************************************************

profiles
const(AVProfile)* profiles;

< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}

receive_frame
int function(AVCodecContext* avctx, AVFrame* frame) receive_frame;

Decode API with decoupled packet/frame dataflow. This function is called to get one output frame. It should call ff_decode_get_packet() to obtain input data.

receive_packet
int function(AVCodecContext* avctx, AVPacket* avpkt) receive_packet;
Undocumented in source.
sample_fmts
const(AVSampleFormat)* sample_fmts;

< array of supported sample formats, or NULL if unknown, array is terminated by -1

send_frame
int function(AVCodecContext* avctx, const(AVFrame)* frame) send_frame;

Encode API with decoupled packet/frame dataflow. The API is the same as the avcodec_ prefixed APIs (avcodec_send_frame() etc.), except that: - never called if the codec is closed or the wrong type, - if AV_CODEC_CAP_DELAY is not set, drain frames are never sent, - only one drain frame is ever passed down,

supported_framerates
const(AVRational)* supported_framerates;

< array of supported framerates, or NULL if any, array is terminated by {0,0}

supported_samplerates
const(int)* supported_samplerates;

< array of supported audio samplerates, or NULL if unknown, array is terminated by 0

type
AVMediaType type;
Undocumented in source.
update_thread_context
int function(AVCodecContext* dst, const(AVCodecContext)* src) update_thread_context;

Copy necessary context variables from a previous thread context to the current one. If not defined, the next thread will start automatically; otherwise, the codec must call ff_thread_finish_setup().

wrapper_name
const(char)* wrapper_name;

Group name of the codec implementation. This is a short symbolic name of the wrapper backing this codec. A wrapper uses some kind of external implementation for the codec, such as an external library, or a codec implementation provided by the OS or the hardware. If this field is NULL, this is a builtin, libavcodec native codec. If non-NULL, this will be the suffix in AVCodec.name in most cases (usually AVCodec.name will be of the form "<codec_name>_<wrapper_name>").

Meta