21 #ifndef AVCODEC_CODEC_H 22 #define AVCODEC_CODEC_H 44 #define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0) 50 #define AV_CODEC_CAP_DR1 (1 << 1) 51 #define AV_CODEC_CAP_TRUNCATED (1 << 3) 75 #define AV_CODEC_CAP_DELAY (1 << 5) 80 #define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6) 93 #define AV_CODEC_CAP_SUBFRAMES (1 << 8) 98 #define AV_CODEC_CAP_EXPERIMENTAL (1 << 9) 102 #define AV_CODEC_CAP_CHANNEL_CONF (1 << 10) 106 #define AV_CODEC_CAP_FRAME_THREADS (1 << 12) 110 #define AV_CODEC_CAP_SLICE_THREADS (1 << 13) 114 #define AV_CODEC_CAP_PARAM_CHANGE (1 << 14) 118 #define AV_CODEC_CAP_AUTO_THREADS (1 << 15) 122 #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16) 132 #define AV_CODEC_CAP_AVOID_PROBING (1 << 17) 134 #if FF_API_UNUSED_CODEC_CAPS 138 #define AV_CODEC_CAP_INTRA_ONLY 0x40000000 142 #define AV_CODEC_CAP_LOSSLESS 0x80000000 150 #define AV_CODEC_CAP_HARDWARE (1 << 18) 157 #define AV_CODEC_CAP_HYBRID (1 << 19) 164 #define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20) 171 #define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21) static enum AVPixelFormat pix_fmt
This structure describes decoded (raw) audio or video data.
int av_codec_is_encoder(const AVCodec *codec)
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
int av_codec_is_decoder(const AVCodec *codec)
Convenience header that includes libavutil's core.
static CopyRet receive_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame)
const AVCodec * av_codec_iterate(void **opaque)
Iterate over all registered codecs.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
The codec supports this format by some internal method.
AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
const uint32_t * codec_tags
List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
The codec supports this format by some ad-hoc method.
Libavcodec version macros.
const uint64_t * channel_layouts
array of support channel layouts, or NULL if unknown. array is terminated by 0
const AVCodecDefault * defaults
Private codec-specific defaults.
AVCodecID
Identify the syntax and semantics of the bitstream.
const struct AVCodecHWConfigInternal *const * hw_configs
Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported...
int methods
Bit set of AV_CODEC_HW_CONFIG_METHOD_* flags, describing the possible setup methods which can be used...
int capabilities
Codec capabilities.
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Find a registered encoder with a matching codec ID.
enum AVHWDeviceType device_type
const char * name
Name of the codec implementation.
enum AVPixelFormat * pix_fmts
array of supported pixel formats, or NULL if unknown, array is terminated by -1
AVCodec * avcodec_find_encoder_by_name(const char *name)
Find a registered encoder with the specified name.
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
static av_cold void init_static_data(void)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
const AVProfile * profiles
array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} ...
const char * bsfs
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding...
const char * long_name
Descriptive name for the codec, meant to be more human readable than name.
const char * wrapper_name
Group name of the codec implementation.
const AVRational * supported_framerates
array of supported framerates, or NULL if any, array is terminated by {0,0}
AVSampleFormat
Audio sample formats.
The codec supports this format via the hw_device_ctx interface.
The codec supports this format via the hw_frames_ctx interface.
const AVCodecHWConfig * avcodec_get_hw_config(const AVCodec *codec, int index)
Retrieve supported hardware configurations for a codec.
main external API structure.
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have update_thread_context() run it in the next thread.Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities.There will be very little speed gain at this point but it should work.If there are inter-frame dependencies
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
const char * name
short name for the profile
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
const AVClass * priv_class
AVClass for the private context.
uint8_t max_lowres
maximum value for lowres supported by the decoder
Utilties for rational number calculation.
int caps_internal
Internal codec capabilities.
const int * supported_samplerates
array of supported audio samplerates, or NULL if unknown, array is terminated by 0 ...
static float sub(float src0, float src1)
enum AVSampleFormat * sample_fmts
array of supported sample formats, or NULL if unknown, array is terminated by -1
AVPixelFormat
Pixel format.
This structure stores compressed data.