21#ifndef AVFORMAT_INTERNAL_H
22#define AVFORMAT_INTERNAL_H
30#define MAX_URL_SIZE 4096
33#define PROBE_BUF_MIN 2048
34#define PROBE_BUF_MAX (1 << 20)
37# define hex_dump_debug(class, buf, size) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size)
39# define hex_dump_debug(class, buf, size) do { if (0) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size); } while(0)
79#define AVOID_NEGATIVE_TS_ENABLED(status) ((status) >= 0)
281#define MAX_REORDER_DELAY 16
375#if defined (__GNUC__) || defined (__clang__)
376#define dynarray_add(tab, nb_ptr, elem)\
378 __typeof__(tab) _tab = (tab);\
379 __typeof__(elem) _elem = (elem);\
380 (void)sizeof(**_tab == _elem); \
381 av_dynarray_add(_tab, nb_ptr, _elem);\
384#define dynarray_add(tab, nb_ptr, elem)\
386 av_dynarray_add((tab), nb_ptr, (elem));\
421#define NTP_OFFSET 2208988800ULL
422#define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL)
463 const char *dest_addr,
const char *dest_type,
489#define SPACE_CHARS " \t\r\n"
502 int key_len,
char **dest,
int *dest_len);
530 unsigned int pts_num,
unsigned int pts_den);
587int ff_rename(
const char *url_src,
const char *url_dst,
void *logctx);
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define flags(name, subs,...)
static int extract_extradata(FFFormatContext *si, AVStream *st, const AVPacket *pkt)
AVCodecID
Identify the syntax and semantics of the bitstream.
The bitstream filter state.
main external API structure.
This struct describes the properties of a single codec described by an AVCodecID.
This struct describes the properties of an encoded stream.
This structure stores compressed data.
This structure contains the data a format has to probe a file.
Rational number (pair of numerator and denominator).
enum FFFormatContext::@117142222231113272376067204111240071266247245201 avoid_negative_ts_status
Whether the timestamp shift offset has already been determined.
PacketList packet_buffer
This buffer is only needed when packets were already buffered but not decoded, for example to get the...
AVDictionary * id3v2_meta
ID3v2 tag useful for MP3 demuxing.
AVFormatContext pub
The public context.
struct CurlLoop * curl_loop
Shared libcurl event loop, created on demand on the first use.
int64_t data_offset
offset of the first packet
int avoid_negative_ts_use_pts
@ AVOID_NEGATIVE_TS_UNKNOWN
@ AVOID_NEGATIVE_TS_DISABLED
@ AVOID_NEGATIVE_TS_KNOWN
AVPacket * parse_pkt
The generic code uses this as a temporary packet to parse packets or for muxing, especially flushing.
AVPacket * pkt
Used to hold temporary packets for the generic demuxing code.
The exact value of the fractional number is: 'val + num / den'.
int64_t lowest_ts_allowed
This is the lowest ts allowed in this track; it may be set by the muxer during init or write_header a...
int64_t pts_wrap_reference
Internal data to check for wrapping of the time stamp.
int64_t last_discard_sample
The sample after last sample that is intended to be discarded after first_discard_sample.
int probe_packets
Number of packets to buffer for codec probing.
int skip_to_keyframe
Indicates that everything up to the next keyframe should be discarded.
struct AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
int64_t start_skip_samples
If not 0, the number of samples that should be skipped from the start of the stream (the samples are ...
int64_t mux_ts_offset
Timestamp offset added to timestamps before muxing.
int avctx_inited
1 if avctx has been initialized with the values from the codec parameters
struct AVBSFContext * bsfc
bitstream filter to run on stream
int request_probe
stream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with re...
struct AVBSFContext * bsf
int64_t first_discard_sample
If not 0, the first audio sample that should be discarded from the stream.
int64_t pts_buffer[MAX_REORDER_DELAY+1]
PacketListEntry * last_in_packet_buffer
last packet in packet_buffer for this stream when muxing.
uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1]
int64_t last_dts_for_order_check
Internal data to analyze DTS and detect faulty mpeg streams.
int skip_samples
Number of samples to skip at the start of the frame decoded from the next packet.
const struct AVCodecDescriptor * codec_desc
struct AVCodecParserContext * parser
AVStream pub
The public context.
int64_t interleaver_chunk_size
int update_initial_durations_done
Internal data to prevent doing update_initial_durations() twice.
int nb_decoded_frames
Number of internally decoded frames, used internally in libavformat, do not access its lifetime diffe...
int64_t first_dts
Timestamp corresponding to the last dts sync point.
int pts_wrap_behavior
Options for behavior, when a wrap is detected.
int need_context_update
Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)
struct FFStreamInfo * info
Stream information used internally by avformat_find_stream_info()
int64_t interleaver_chunk_duration
int bitstream_checked
Whether or not check_bitstream should still be run on each packet.
int reorder
Set to 1 if the codec allows reordering, so pts can be different from dts.
AVRational display_aspect_ratio
display aspect ratio (0 if unknown)
int stream_identifier
Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown.
AVPacket * parse_pkt
The generic code uses this as a temporary packet to parse packets or for muxing, especially flushing.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
enum AVStreamParseType need_parsing
int codec_info_nb_frames
Number of frames that have been demuxed during avformat_find_stream_info()
unsigned int index_entries_allocated_size
int64_t pts_reorder_error[MAX_REORDER_DELAY+1]
Internal data to generate dts from pts.