1、FFmpeg总结三AV系列结构体之AVCodecContextFFmpeg总结(三)AV系列结构体之AVCodecContext描述:主要扩展API的结构体New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. You can use AVOptions (av_opt* / av_set/get*() to access these fields from user
2、applications. The name string for AVOptions options matches the associated command line parameter name and can be found in libavcodec/options_table.h The AVOption/command line parameter names differ in some cases from the C structure field names for historic reasons or brevity. sizeof(AVCodecContext
3、) must not be used outside libav*.typedef struct AVCodecContext /* * information on struct for av_log * - set by avcodec_alloc_context3 */ const AVClass *av_class; int log_level_offset; enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */ const struct AVCodec *codec;#if FF_API_CODEC_NAME /* * dep
4、recated this field is not used for anything in libavcodec */ attribute_deprecated char codec_name32;#endif enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */ /* * fourcc (LSB first, so ABCD - (D24) + (C16) + (Btop field, 2-bottom field, 3-frame * param offset offset into the AVFrame.data from which
5、the slice should be read */ void (*draw_horiz_band)(struct AVCodecContext *s, const AVFrame *src, int offsetAV_NUM_DATA_POINTERS, int y, int type, int height); /* * callback to negotiate the pixelFormat * param fmt is the list of formats which are supported by the codec, * it is terminated by -1 as
6、0 is a valid format, the formats are ordered by quality. * The first is always the native one. * note The callback may be called again immediately if initialization for * the selected (hardware-accelerated) pixel format failed. * warning Behavior is undefined if the callback returns a value not * in the fmt list of formats. * return the chosen format * - encoding: unused * - decoding: Set by user, if not set the native format will be chosen. */ enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt); /* * maximum number of B-frames bet
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1