[FFmpeg-cvslog] lavc: reorder AVCodec fields.
Anton Khirnov
git at videolan.org
Wed Feb 1 03:06:31 CET 2012
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Jan 27 12:29:37 2012 +0100| [f5f49a66a2b061f8d99e0b1e175d2f12e9d42cba] | committer: Anton Khirnov
lavc: reorder AVCodec fields.
Put all private fields at the end and mark them as such so they can be
easily changed/removed.
This breaks ABI.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f5f49a66a2b061f8d99e0b1e175d2f12e9d42cba
---
libavcodec/avcodec.h | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index d8e56ca..a6bb686 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2780,31 +2780,20 @@ typedef struct AVCodec {
* This is the primary way to find a codec from the user perspective.
*/
const char *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.
+ */
+ const char *long_name;
enum AVMediaType type;
enum CodecID id;
- int priv_data_size;
- int (*init)(AVCodecContext *);
- int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
- int (*close)(AVCodecContext *);
- int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
/**
* Codec capabilities.
* see CODEC_CAP_*
*/
int capabilities;
- struct AVCodec *next;
- /**
- * Flush buffers.
- * Will be called when seeking
- */
- void (*flush)(AVCodecContext *);
const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}
const enum PixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
- /**
- * 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.
- */
- const char *long_name;
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
@@ -2812,6 +2801,15 @@ typedef struct AVCodec {
const AVClass *priv_class; ///< AVClass for the private context
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
+ /*****************************************************************
+ * 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.
+ *****************************************************************
+ */
+ int priv_data_size;
+ struct AVCodec *next;
/**
* @name Frame-level threading support functions
* @{
@@ -2842,6 +2840,8 @@ typedef struct AVCodec {
*/
void (*init_static_data)(struct AVCodec *codec);
+ int (*init)(AVCodecContext *);
+ int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
/**
* Encode data to an AVPacket.
*
@@ -2854,6 +2854,13 @@ typedef struct AVCodec {
*/
int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
int *got_packet_ptr);
+ int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
+ int (*close)(AVCodecContext *);
+ /**
+ * Flush buffers.
+ * Will be called when seeking
+ */
+ void (*flush)(AVCodecContext *);
} AVCodec;
/**
More information about the ffmpeg-cvslog
mailing list