summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-29 00:30:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-29 00:30:35 +0100
commit0e6aa0fef565fdb625673c60276e90c2ea091e8e (patch)
treef0b08a7f4b465aaa0d9144e9b837b18294db3df6 /libavformat/avformat.h
parentf929abd0c3643b28a9552512d698cf61ad4d08fa (diff)
parentbbeb29133b55b7256d18f5aaab8b5c8e919a173a (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: adpcm: Clip step_index values read from the bitstream at the beginning of each frame. oma: don't read beyond end of leaf_table. doxygen: Remove documentation for non-existing parameters; misc small fixes. Indeo3: fix crashes on corrupt bitstreams. msmpeg4: Replace forward declaration by proper #include. segment: implement wrap around avf: reorder AVStream and AVFormatContext aacdec: Remove erroneous reference to global gain from the out of bounds scalefactor error message. Conflicts: libavcodec/indeo3.c libavformat/avformat.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h93
1 files changed, 49 insertions, 44 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f92816f925..00a52e5da6 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -577,7 +577,6 @@ typedef struct AVStream {
* encoding: set by libavformat in av_write_header
*/
AVRational time_base;
- enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed.
/**
* Decoding: pts of the first frame of the stream in presentation order, in stream time base.
@@ -600,6 +599,8 @@ typedef struct AVStream {
int disposition; /**< AV_DISPOSITION_* bit field */
+ enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed.
+
/**
* sample aspect ratio (0 if unknown)
* - encoding: Set by user.
@@ -623,21 +624,6 @@ typedef struct AVStream {
*/
/**
- * Number of frames that have been demuxed during av_find_stream_info()
- */
- int codec_info_nb_frames;
-
- /**
- * Stream Identifier
- * This is the MPEG-TS stream identifier +1
- * 0 means unknown
- */
- int stream_identifier;
-
- int64_t interleaver_chunk_size;
- int64_t interleaver_chunk_duration;
-
- /**
* Stream information used internally by av_find_stream_info()
*/
#define MAX_STD_TIMEBASES (60*12+5)
@@ -649,9 +635,12 @@ typedef struct AVStream {
int64_t codec_info_duration;
int nb_decoded_frames;
} *info;
+
+ AVPacket cur_pkt;
const uint8_t *cur_ptr;
int cur_len;
- AVPacket cur_pkt;
+
+ int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */
// Timestamp generation support:
/**
@@ -664,8 +653,8 @@ typedef struct AVStream {
int64_t reference_dts;
int64_t first_dts;
int64_t cur_dts;
- int last_IP_duration;
int64_t last_IP_pts;
+ int last_IP_duration;
/**
* Number of packets to buffer for codec probing
@@ -674,23 +663,37 @@ typedef struct AVStream {
int probe_packets;
/**
+ * Number of frames that have been demuxed during av_find_stream_info()
+ */
+ int codec_info_nb_frames;
+
+ /**
+ * Stream Identifier
+ * This is the MPEG-TS stream identifier +1
+ * 0 means unknown
+ */
+ int stream_identifier;
+
+ int64_t interleaver_chunk_size;
+ int64_t interleaver_chunk_duration;
+
+ /* av_read_frame() support */
+ enum AVStreamParseType need_parsing;
+ struct AVCodecParserContext *parser;
+
+ /**
* last packet in packet_buffer for this stream when muxing.
*/
struct AVPacketList *last_in_packet_buffer;
AVProbeData probe_data;
#define MAX_REORDER_DELAY 16
int64_t pts_buffer[MAX_REORDER_DELAY+1];
- /* av_read_frame() support */
- enum AVStreamParseType need_parsing;
- struct AVCodecParserContext *parser;
AVIndexEntry *index_entries; /**< Only used if the format does not
support seeking natively. */
int nb_index_entries;
unsigned int index_entries_allocated_size;
- int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */
-
/**
* flag to indicate that probing is requested
* NOT PART OF PUBLIC API
@@ -772,6 +775,9 @@ typedef struct AVFormatContext {
*/
AVIOContext *pb;
+ /* stream info */
+ int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */
+
/**
* A list of all streams in the file. New streams are created with
* avformat_new_stream().
@@ -785,8 +791,6 @@ typedef struct AVFormatContext {
AVStream **streams;
char filename[1024]; /**< input or output filename */
- /* stream info */
- int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */
/**
* Decoding: position of the first frame of the component, in
@@ -883,12 +887,6 @@ typedef struct AVFormatContext {
unsigned int nb_chapters;
AVChapter **chapters;
- /**
- * Flags to enable debugging.
- */
- int debug;
-#define FF_FDEBUG_TS 0x0001
-
AVDictionary *metadata;
/**
@@ -925,6 +923,12 @@ typedef struct AVFormatContext {
AVIOInterruptCB interrupt_callback;
/**
+ * Flags to enable debugging.
+ */
+ int debug;
+#define FF_FDEBUG_TS 0x0001
+
+ /**
* Transport stream id.
* This will be moved into demuxer private options. Thus no API/ABI compatibility
*/
@@ -961,19 +965,6 @@ typedef struct AVFormatContext {
* New public fields should be added right above.
*****************************************************************
*/
- /**
- * 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
@@ -988,6 +979,20 @@ typedef struct AVFormatContext {
/* av_seek_frame() support */
int64_t data_offset; /**< offset of the first packet */
+
+ /**
+ * 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;
} AVFormatContext;
typedef struct AVPacketList {