Commit df968050 authored by Anton Khirnov's avatar Anton Khirnov

lavf: move private fields in AVFormatContext to the end at next bump.

parent a2faa951
...@@ -695,6 +695,7 @@ typedef struct AVFormatContext { ...@@ -695,6 +695,7 @@ typedef struct AVFormatContext {
#endif #endif
int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */ int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */
#if FF_API_REORDER_PRIVATE
/* private data for pts handling (do not modify directly). */ /* private data for pts handling (do not modify directly). */
/** /**
* This buffer is only needed when packets were already buffered but * This buffer is only needed when packets were already buffered but
...@@ -702,6 +703,7 @@ typedef struct AVFormatContext { ...@@ -702,6 +703,7 @@ typedef struct AVFormatContext {
* streams. * streams.
*/ */
struct AVPacketList *packet_buffer; struct AVPacketList *packet_buffer;
#endif
/** /**
* Decoding: position of the first frame of the component, in * Decoding: position of the first frame of the component, in
...@@ -732,11 +734,13 @@ typedef struct AVFormatContext { ...@@ -732,11 +734,13 @@ typedef struct AVFormatContext {
*/ */
int bit_rate; int bit_rate;
#if FF_API_REORDER_PRIVATE
/* av_read_frame() support */ /* av_read_frame() support */
AVStream *cur_st; AVStream *cur_st;
/* av_seek_frame() support */ /* av_seek_frame() support */
int64_t data_offset; /**< offset of the first packet */ int64_t data_offset; /**< offset of the first packet */
#endif
#if FF_API_MUXRATE #if FF_API_MUXRATE
/** /**
...@@ -843,6 +847,7 @@ typedef struct AVFormatContext { ...@@ -843,6 +847,7 @@ typedef struct AVFormatContext {
int debug; int debug;
#define FF_FDEBUG_TS 0x0001 #define FF_FDEBUG_TS 0x0001
#if FF_API_REORDER_PRIVATE
/** /**
* Raw packets from the demuxer, prior to parsing and decoding. * Raw packets from the demuxer, prior to parsing and decoding.
* This buffer is used for buffering packets until the codec can * This buffer is used for buffering packets until the codec can
...@@ -853,15 +858,18 @@ typedef struct AVFormatContext { ...@@ -853,15 +858,18 @@ typedef struct AVFormatContext {
struct AVPacketList *raw_packet_buffer_end; struct AVPacketList *raw_packet_buffer_end;
struct AVPacketList *packet_buffer_end; struct AVPacketList *packet_buffer_end;
#endif
AVDictionary *metadata; AVDictionary *metadata;
#if FF_API_REORDER_PRIVATE
/** /**
* Remaining size available for raw_packet_buffer, in bytes. * Remaining size available for raw_packet_buffer, in bytes.
* NOT PART OF PUBLIC API * NOT PART OF PUBLIC API
*/ */
#define RAW_PACKET_BUFFER_SIZE 2500000 #define RAW_PACKET_BUFFER_SIZE 2500000
int raw_packet_buffer_remaining_size; int raw_packet_buffer_remaining_size;
#endif
/** /**
* Start time of the stream in real world time, in microseconds * Start time of the stream in real world time, in microseconds
...@@ -884,6 +892,43 @@ typedef struct AVFormatContext { ...@@ -884,6 +892,43 @@ typedef struct AVFormatContext {
* - decoding: Set by user. * - decoding: Set by user.
*/ */
int error_recognition; int error_recognition;
/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavformat and can be changed and
* removed at will.
* New public fields should be added right above.
*****************************************************************
*/
#if !FF_API_REORDER_PRIVATE
/**
* Raw packets from the demuxer, prior to parsing and decoding.
* This buffer is used for buffering packets until the codec can
* be identified, as parsing cannot be done without knowing the
* codec.
*/
struct AVPacketList *raw_packet_buffer;
struct AVPacketList *raw_packet_buffer_end;
/**
* Remaining size available for raw_packet_buffer, in bytes.
*/
#define RAW_PACKET_BUFFER_SIZE 2500000
int raw_packet_buffer_remaining_size;
/**
* This buffer is only needed when packets were already buffered but
* not decoded, for example to get the codec parameters in MPEG
* streams.
*/
struct AVPacketList *packet_buffer;
struct AVPacketList *packet_buffer_end;
/* av_read_frame() support */
AVStream *cur_st;
/* av_seek_frame() support */
int64_t data_offset; /**< offset of the first packet */
#endif
} AVFormatContext; } AVFormatContext;
typedef struct AVPacketList { typedef struct AVPacketList {
......
...@@ -107,5 +107,8 @@ ...@@ -107,5 +107,8 @@
#ifndef FF_API_SEEK_PUBLIC #ifndef FF_API_SEEK_PUBLIC
#define FF_API_SEEK_PUBLIC (LIBAVFORMAT_VERSION_MAJOR < 54) #define FF_API_SEEK_PUBLIC (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif #endif
#ifndef FF_API_REORDER_PRIVATE
#define FF_API_REORDER_PRIVATE (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
#endif /* AVFORMAT_VERSION_H */ #endif /* AVFORMAT_VERSION_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment