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)
85 #define AVOID_NEGATIVE_TS_ENABLED(status) ((status) >= 0)
91 int flush,
int has_packet);
140 #if FF_API_COMPUTE_PKT_FIELDS2
141 int missing_ts_warning;
144 #if FF_API_AVSTREAM_SIDE_DATA
145 int inject_global_side_data;
150 #if FF_API_LAVF_SHORTEST
339 #define MAX_REORDER_DELAY 16
356 #if FF_API_AVSTREAM_SIDE_DATA
360 int inject_global_side_data;
414 #if FF_API_INTERNAL_TIMING
450 #define dynarray_add(tab, nb_ptr, elem)\
452 __typeof__(tab) _tab = (tab);\
453 __typeof__(elem) _elem = (elem);\
454 (void)sizeof(**_tab == _elem); \
455 av_dynarray_add(_tab, nb_ptr, _elem);\
458 #define dynarray_add(tab, nb_ptr, elem)\
460 av_dynarray_add((tab), nb_ptr, (elem));\
498 #define NTP_OFFSET 2208988800ULL
499 #define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL)
540 const char *dest_addr,
const char *dest_type,
566 #define SPACE_CHARS " \t\r\n"
579 int key_len,
char **dest,
int *dest_len);
610 unsigned int pts_num,
unsigned int pts_den);
690 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.
int(* interleave_packet)(struct AVFormatContext *s, AVPacket *pkt, int flush, int has_packet)
The interleavement function in use.
int prefer_codec_framerate
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
@ AVOID_NEGATIVE_TS_DISABLED
int64_t first_discard_sample
If not 0, the first audio sample that should be discarded from the stream.
int64_t interleaver_chunk_size
int initialized
Whether or not avformat_init_output has already been called.
@ AVOID_NEGATIVE_TS_KNOWN
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.
int metafree
Contexts and child contexts do not contain a metadata option.
PacketList parse_queue
Packets split by the parser get queued here.
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 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
@ AVOID_NEGATIVE_TS_UNKNOWN
Rational number (pair of numerator and denominator).
This structure contains the data a format has to probe a file.
void(* flush)(AVBSFContext *ctx)
int64_t interleaver_chunk_duration
AVCodecID
Identify the syntax and semantics of the bitstream.
AVDictionary * id3v2_meta
ID3v2 tag useful for MP3 demuxing.
enum FFFormatContext::@384 avoid_negative_ts_status
Whether the timestamp shift offset has already been determined.
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.
struct FFStream::@385 extract_extradata
int pts_wrap_behavior
Options for behavior, when a wrap is detected.
int raw_packet_buffer_size
Sum of the size of packets in raw_packet_buffer, in bytes.
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.
PacketList raw_packet_buffer
Raw packets from the demuxer, prior to parsing and decoding.
int64_t mux_ts_offset
Timestamp offset added to timestamps before muxing.
#define i(width, name, range_min, range_max)
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
AVStreamGroup pub
The public context.
int chapter_ids_monotonic
Set if chapter ids are strictly monotonic.
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.
int streams_initialized
Whether or not avformat_init_output fully initialized streams.
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 nb_interleaved_streams
Number of streams relevant for interleaving.
int avoid_negative_ts_use_pts