Go to the documentation of this file.
21 #ifndef AVFORMAT_INTERNAL_H
22 #define AVFORMAT_INTERNAL_H
31 #define MAX_URL_SIZE 4096
34 #define PROBE_BUF_MIN 2048
35 #define PROBE_BUF_MAX (1 << 20)
38 # define hex_dump_debug(class, buf, size) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size)
40 # define hex_dump_debug(class, buf, size) do { if (0) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size); } while(0)
47 #define FF_FMT_INIT_CLEANUP (1 << 0)
92 #define AVOID_NEGATIVE_TS_ENABLED(status) ((status) >= 0)
98 int flush,
int has_packet);
147 #if FF_API_COMPUTE_PKT_FIELDS2
148 int missing_ts_warning;
341 #define MAX_REORDER_DELAY 16
424 #define dynarray_add(tab, nb_ptr, elem)\
426 __typeof__(tab) _tab = (tab);\
427 __typeof__(elem) _elem = (elem);\
428 (void)sizeof(**_tab == _elem); \
429 av_dynarray_add(_tab, nb_ptr, _elem);\
432 #define dynarray_add(tab, nb_ptr, elem)\
434 av_dynarray_add((tab), nb_ptr, (elem));\
472 #define NTP_OFFSET 2208988800ULL
473 #define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL)
514 const char *dest_addr,
const char *dest_type,
540 #define SPACE_CHARS " \t\r\n"
553 int key_len,
char **dest,
int *dest_len);
584 unsigned int pts_num,
unsigned int pts_den);
652 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 inject_global_side_data
Internal data to inject global side data.
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
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.
int64_t last_dts_for_order_check
Internal data to analyze DTS and detect faulty mpeg streams.
The bitstream filter state.
int64_t shortest_end
Timestamp of the end of the shortest stream.
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.
@ AVOID_NEGATIVE_TS_DISABLED
PacketList packet_buffer
This buffer is only needed when packets were already buffered but not decoded, for example to get the...
@ AVOID_NEGATIVE_TS_KNOWN
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)
struct FFStream::@283 extract_extradata
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
Rational number (pair of numerator and denominator).
This structure contains the data a format has to probe a file.
int64_t interleaver_chunk_duration
int inject_global_side_data
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.
int64_t last_discard_sample
The sample after last sample that is intended to be discarded after first_discard_sample.
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.
@ AVOID_NEGATIVE_TS_UNKNOWN
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
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.
void(* flush)(AVBSFContext *ctx)
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)
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...
enum FFFormatContext::@282 avoid_negative_ts_status
Whether the timestamp shift offset has already been determined.
int nb_interleaved_streams
Number of streams relevant for interleaving.
int avoid_negative_ts_use_pts