diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-29 02:08:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-29 02:08:54 +0200 |
commit | 6faf0a21e18f314c48a886864145abe715be6572 (patch) | |
tree | f67c3e543a8b2c3283875881536d0a69da515e5e /libavformat/avformat.h | |
parent | ed1aa8921749a1c70d4453326da7f7b5a6f6f6e7 (diff) | |
parent | 61856d06eb30955290911140e6745bad93a25323 (diff) | |
download | ffmpeg-6faf0a21e18f314c48a886864145abe715be6572.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (53 commits)
probe: Restore identification of files with very large id3 tags and no extension.
probe: Remove id3 tag presence as a criteria to do file extension checking.
mpegts: MP4 SL support
mpegts: MP4 OD support
mpegts: Add support for Sections in PMT
mpegts: Replace the MP4 descriptor parser with a recursive parser.
mpegts: Add support for multiple mp4 descriptors
mpegts: Parse mpeg2 SL descriptors.
isom: Add MPEG4SYSTEMS dummy object type indication.
aacdec: allow output reconfiguration on channel changes
nellymoserenc: take float input samples instead of int16
nellymoserdec: use dsp functions for overlap and windowing
nellymoserdec: do not fail if there is extra data in the packet
nellymoserdec: fail if output buffer is too small
nellymoserdec: remove pointless buffer size check.
lavf: add init_put_byte() to the list of visible symbols.
seek-test: free options dictionary after use
snow: do not draw_edge if emu_edge is set
tools/pktdumper: update to recent avformat api
seek-test: update to recent avformat api
...
Conflicts:
doc/APIchanges
libavcodec/mpegaudiodec.c
libavcodec/nellymoserdec.c
libavcodec/snow.c
libavcodec/version.h
libavcodec/wmadec.c
libavformat/avformat.h
libavformat/mpegts.c
libavformat/mxfdec.c
libavformat/utils.c
libavformat/wtv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 136 |
1 files changed, 111 insertions, 25 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 425198fcda..60ff6dcf03 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -523,8 +523,10 @@ typedef struct AVStream { AVRational r_frame_rate; void *priv_data; +#if FF_API_REORDER_PRIVATE /* internal data used in av_find_stream_info() */ int64_t first_dts; +#endif /** * encoding: pts generation when outputting stream @@ -539,7 +541,9 @@ typedef struct AVStream { * encoding: set by libavformat in av_write_header */ AVRational time_base; +#if FF_API_REORDER_PRIVATE int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ +#endif #if FF_API_STREAM_COPY /* ffmpeg.c private use */ attribute_deprecated int stream_copy; /**< If set, just copy stream. */ @@ -572,6 +576,7 @@ typedef struct AVStream { */ int64_t duration; +#if FF_API_REORDER_PRIVATE /* av_read_frame() support */ enum AVStreamParseType need_parsing; struct AVCodecParserContext *parser; @@ -584,14 +589,17 @@ typedef struct AVStream { support seeking natively. */ int nb_index_entries; unsigned int index_entries_allocated_size; +#endif int64_t nb_frames; ///< number of frames in this stream if known or 0 int disposition; /**< AV_DISPOSITION_* bit field */ +#if FF_API_REORDER_PRIVATE AVProbeData probe_data; #define MAX_REORDER_DELAY 16 int64_t pts_buffer[MAX_REORDER_DELAY+1]; +#endif /** * sample aspect ratio (0 if unknown) @@ -602,6 +610,7 @@ typedef struct AVStream { AVDictionary *metadata; +#if FF_API_REORDER_PRIVATE /* Intended mostly for av_read_frame() support. Not supposed to be used by */ /* external applications; try to use something else if at all possible. */ const uint8_t *cur_ptr; @@ -630,12 +639,21 @@ typedef struct AVStream { * used internally, NOT PART OF PUBLIC API, dont read or write from outside of libav* */ struct AVPacketList *last_in_packet_buffer; +#endif /** * Average framerate */ AVRational avg_frame_rate; + /***************************************************************** + * 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. + ***************************************************************** + */ + /** * Number of frames that have been demuxed during av_find_stream_info() */ @@ -665,6 +683,49 @@ typedef struct AVStream { * NOT PART OF PUBLIC API */ int request_probe; +#if !FF_API_REORDER_PRIVATE + const uint8_t *cur_ptr; + int cur_len; + AVPacket cur_pkt; + + // Timestamp generation support: + /** + * Timestamp corresponding to the last dts sync point. + * + * Initialized when AVCodecParserContext.dts_sync_point >= 0 and + * a DTS is received from the underlying container. Otherwise set to + * AV_NOPTS_VALUE by default. + */ + int64_t reference_dts; + int64_t first_dts; + int64_t cur_dts; + int last_IP_duration; + int64_t last_IP_pts; + + /** + * Number of packets to buffer for codec probing + */ +#define MAX_PROBE_PACKETS 2500 + int probe_packets; + + /** + * 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) */ +#endif } AVStream; #define AV_PROGRAM_RUNNING 1 @@ -724,6 +785,7 @@ typedef struct AVFormatContext { #endif int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */ +#if FF_API_REORDER_PRIVATE /* private data for pts handling (do not modify directly). */ /** * This buffer is only needed when packets were already buffered but @@ -731,6 +793,7 @@ typedef struct AVFormatContext { * streams. */ struct AVPacketList *packet_buffer; +#endif /** * Decoding: position of the first frame of the component, in @@ -761,11 +824,13 @@ typedef struct AVFormatContext { */ int bit_rate; +#if FF_API_REORDER_PRIVATE /* av_read_frame() support */ AVStream *cur_st; /* av_seek_frame() support */ int64_t data_offset; /**< offset of the first packet */ +#endif #if FF_API_MUXRATE /** @@ -876,6 +941,7 @@ typedef struct AVFormatContext { int debug; #define FF_FDEBUG_TS 0x0001 +#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 @@ -886,15 +952,18 @@ typedef struct AVFormatContext { struct AVPacketList *raw_packet_buffer_end; struct AVPacketList *packet_buffer_end; +#endif AVDictionary *metadata; +#if FF_API_REORDER_PRIVATE /** * Remaining size available for raw_packet_buffer, in bytes. * NOT PART OF PUBLIC API */ #define RAW_PACKET_BUFFER_SIZE 2500000 int raw_packet_buffer_remaining_size; +#endif /** * Start time of the stream in real world time, in microseconds @@ -923,6 +992,43 @@ typedef struct AVFormatContext { * This will be moved into demuxer private options. Thus no API/ABI compatibility */ int ts_id; + + /***************************************************************** + * 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; typedef struct AVPacketList { @@ -1479,40 +1585,20 @@ int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags); int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags); -/** - * Perform a binary search using av_index_search_timestamp() and - * AVInputFormat.read_timestamp(). - * This is not supposed to be called directly by a user application, - * but by demuxers. - * @param target_ts target timestamp in the time base of the given stream - * @param stream_index stream number - */ +#if FF_API_SEEK_PUBLIC +attribute_deprecated int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags); - -/** - * Update cur_dts of all streams based on the given timestamp and AVStream. - * - * Stream ref_st unchanged, others set cur_dts in their native time base. - * Only needed for timestamp wrapping or if (dts not set and pts!=dts). - * @param timestamp new dts expressed in time_base of param ref_st - * @param ref_st reference stream giving time_base of param timestamp - */ +attribute_deprecated void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp); - -/** - * Perform a binary search using read_timestamp(). - * This is not supposed to be called directly by a user application, - * but by demuxers. - * @param target_ts target timestamp in the time base of the given stream - * @param stream_index stream number - */ +attribute_deprecated int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, int64_t pos_min, int64_t pos_max, int64_t pos_limit, int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); +#endif /** * media file output |