Go to the documentation of this file.
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)
113 #if FF_API_AVSTREAM_SIDE_DATA
114 int inject_global_side_data;
278 #define MAX_REORDER_DELAY 16
295 #if FF_API_AVSTREAM_SIDE_DATA
299 int inject_global_side_data;
353 #if FF_API_INTERNAL_TIMING
369 #define dynarray_add(tab, nb_ptr, elem)\
371 __typeof__(tab) _tab = (tab);\
372 __typeof__(elem) _elem = (elem);\
373 (void)sizeof(**_tab == _elem); \
374 av_dynarray_add(_tab, nb_ptr, _elem);\
377 #define dynarray_add(tab, nb_ptr, elem)\
379 av_dynarray_add((tab), nb_ptr, (elem));\
414 #define NTP_OFFSET 2208988800ULL
415 #define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL)
456 const char *dest_addr,
const char *dest_type,
482 #define SPACE_CHARS " \t\r\n"
495 int key_len,
char **dest,
int *dest_len);
523 unsigned int pts_num,
unsigned int pts_den);
580 int ff_rename(
const char *url_src,
const char *url_dst,
void *logctx);
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it be(in the first position) for now. Options ------- Then comes the options array. This is what will define the user accessible options. For example
int skip_samples
Number of samples to skip at the start of the frame decoded from the next packet.
struct AVBSFContext * bsfc
bitstream filter to run on stream
int64_t first_dts
Timestamp corresponding to the last dts sync point.
This struct describes the properties of an encoded stream.
struct AVBSFContext * bsf
int64_t first_discard_sample
If not 0, the first audio sample that should be discarded from the stream.
int64_t interleaver_chunk_size
struct FFStream::@391 extract_extradata
int64_t last_dts_for_order_check
Internal data to analyze DTS and detect faulty mpeg streams.
The bitstream filter state.
const struct AVCodecDescriptor * codec_desc
unsigned int index_entries_allocated_size
struct AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
This struct describes the properties of a single codec described by an AVCodecID.
PacketList packet_buffer
This buffer is only needed when packets were already buffered but not decoded, for example to get the...
int nb_decoded_frames
Number of internally decoded frames, used internally in libavformat, do not access its lifetime diffe...
int64_t data_offset
offset of the first packet
int codec_info_nb_frames
Number of frames that have been demuxed during avformat_find_stream_info()
uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1]
AVRational display_aspect_ratio
display aspect ratio (0 if unknown)
int64_t pts_reorder_error[MAX_REORDER_DELAY+1]
Internal data to generate dts from pts.
enum FFFormatContext::@390 avoid_negative_ts_status
Whether the timestamp shift offset has already been determined.
enum AVStreamParseType need_parsing
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option keep it simple and lowercase description are in without and describe what they for example set the foo of the bar offset is the offset of the field in your context
AVStream pub
The public context.
int bitstream_checked
Whether or not check_bitstream should still be run on each packet.
int avctx_inited
1 if avctx has been initialized with the values from the codec parameters
Rational number (pair of numerator and denominator).
This structure contains the data a format has to probe a file.
int64_t interleaver_chunk_duration
AVCodecID
Identify the syntax and semantics of the bitstream.
AVDictionary * id3v2_meta
ID3v2 tag useful for MP3 demuxing.
AVPacket * parse_pkt
The generic code uses this as a temporary packet to parse packets or for muxing, especially flushing.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
int64_t last_discard_sample
The sample after last sample that is intended to be discarded after first_discard_sample.
@ AVOID_NEGATIVE_TS_DISABLED
int pts_wrap_behavior
Options for behavior, when a wrap is detected.
int update_initial_durations_done
Internal data to prevent doing update_initial_durations() twice.
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 ...
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.
@ AVOID_NEGATIVE_TS_UNKNOWN
int64_t mux_ts_offset
Timestamp offset added to timestamps before muxing.
@ AVOID_NEGATIVE_TS_KNOWN
int reorder
Set to 1 if the codec allows reordering, so pts can be different from dts.
int64_t pts_buffer[MAX_REORDER_DELAY+1]
PacketListEntry * last_in_packet_buffer
last packet in packet_buffer for this stream when muxing.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option keep it simple and lowercase description are in lowercase
main external API structure.
struct FFStreamInfo * info
Stream information used internally by avformat_find_stream_info()
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
AVPacket * pkt
Used to hold temporary packets for the generic demuxing code.
int request_probe
stream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with re...
This structure stores compressed data.
int stream_identifier
Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown.
int need_context_update
Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)
#define flags(name, subs,...)
struct AVCodecParserContext * parser
The exact value of the fractional number is: 'val + num / den'.
AVFormatContext pub
The public context.
int64_t pts_wrap_reference
Internal data to check for wrapping of the time stamp.
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...
int avoid_negative_ts_use_pts