FFmpeg
4.4.2
|
Stream structure. More...
#include <libavformat/avformat.h>
Data Fields | |
int | index |
stream index in AVFormatContext More... | |
int | id |
Format-specific stream ID. More... | |
void * | priv_data |
AVRational | time_base |
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. More... | |
int64_t | start_time |
Decoding: pts of the first frame of the stream in presentation order, in stream time base. More... | |
int64_t | duration |
Decoding: duration of the stream, in stream time base. More... | |
int64_t | nb_frames |
number of frames in this stream if known or 0 More... | |
int | disposition |
AV_DISPOSITION_* bit field. More... | |
enum AVDiscard | discard |
Selects which packets can be discarded at will and do not need to be demuxed. More... | |
AVRational | sample_aspect_ratio |
sample aspect ratio (0 if unknown) More... | |
AVDictionary * | metadata |
AVRational | avg_frame_rate |
Average framerate. More... | |
AVPacket | attached_pic |
For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached picture. More... | |
AVPacketSideData * | side_data |
An array of side data that applies to the whole stream (i.e. More... | |
int | nb_side_data |
The number of elements in the AVStream.side_data array. More... | |
int | event_flags |
Flags indicating events happening on the stream, a combination of AVSTREAM_EVENT_FLAG_*. More... | |
AVRational | r_frame_rate |
Real base framerate of the stream. More... | |
AVCodecParameters * | codecpar |
Codec parameters associated with this stream. More... | |
void * | unused |
int | pts_wrap_bits |
number of bits in pts (used for wrapping control) More... | |
int64_t | first_dts |
Timestamp corresponding to the last dts sync point. More... | |
int64_t | cur_dts |
int64_t | last_IP_pts |
int | last_IP_duration |
int | probe_packets |
Number of packets to buffer for codec probing. More... | |
int | codec_info_nb_frames |
Number of frames that have been demuxed during avformat_find_stream_info() More... | |
enum AVStreamParseType | need_parsing |
struct AVCodecParserContext * | parser |
void * | unused7 |
AVProbeData | unused6 |
int64_t | unused5 [16+1] |
AVIndexEntry * | index_entries |
Only used if the format does not support seeking natively. More... | |
int | nb_index_entries |
unsigned int | index_entries_allocated_size |
int | stream_identifier |
Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown. More... | |
int | unused8 |
int | unused9 |
int | unused10 |
AVStreamInternal * | internal |
An opaque field for libavformat internal usage. More... | |
Stream structure.
New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(AVStream) must not be used outside libav*.
Definition at line 884 of file avformat.h.
int AVStream::index |
stream index in AVFormatContext
Definition at line 885 of file avformat.h.
Referenced by main(), and write_frame().
int AVStream::id |
Format-specific stream ID.
decoding: set by libavformat encoding: set by the user, replaced by libavformat if left unset
Definition at line 891 of file avformat.h.
Referenced by add_stream().
void* AVStream::priv_data |
Definition at line 899 of file avformat.h.
AVRational AVStream::time_base |
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
decoding: set by libavformat encoding: May be set by the caller before avformat_write_header() to provide a hint to the muxer about the desired timebase. In avformat_write_header(), the muxer will overwrite this field with the timebase that will actually be used for the timestamps written into the file (which may or may not be related to the user-provided one, depending on the format).
Definition at line 913 of file avformat.h.
Referenced by add_stream(), dec_enc(), encode_write(), encode_write_frame(), init_filters(), log_packet(), main(), open_output_file(), and write_frame().
int64_t AVStream::start_time |
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
Only set this if you are absolutely 100% sure that the value you set it to really is the pts of the first frame. This may be undefined (AV_NOPTS_VALUE).
Definition at line 923 of file avformat.h.
int64_t AVStream::duration |
Decoding: duration of the stream, in stream time base.
If a source file does not specify a duration, but does specify a bitrate, this value will be estimated from bitrate and file size.
Encoding: May be set by the caller before avformat_write_header() to provide a hint to the muxer about the estimated duration.
Definition at line 933 of file avformat.h.
int64_t AVStream::nb_frames |
number of frames in this stream if known or 0
Definition at line 935 of file avformat.h.
int AVStream::disposition |
AV_DISPOSITION_* bit field.
Definition at line 937 of file avformat.h.
enum AVDiscard AVStream::discard |
Selects which packets can be discarded at will and do not need to be demuxed.
Definition at line 939 of file avformat.h.
Referenced by main().
AVRational AVStream::sample_aspect_ratio |
sample aspect ratio (0 if unknown)
Definition at line 946 of file avformat.h.
AVDictionary* AVStream::metadata |
Definition at line 948 of file avformat.h.
AVRational AVStream::avg_frame_rate |
Average framerate.
Definition at line 957 of file avformat.h.
AVPacket AVStream::attached_pic |
For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached picture.
decoding: set by libavformat, must not be modified by the caller. encoding: unused
Definition at line 966 of file avformat.h.
AVPacketSideData* AVStream::side_data |
An array of side data that applies to the whole stream (i.e.
the container does not allow it to change between packets).
There may be no overlap between the side data in this array and side data in the packets. I.e. a given side data is either exported by the muxer (demuxing) / set by the caller (muxing) in this array, then it never appears in the packets, or the side data is exported / sent through the packets (always in the first packet where the value becomes known or changes), then it does not appear in this array.
Freed by libavformat in avformat_free_context().
Definition at line 986 of file avformat.h.
int AVStream::nb_side_data |
The number of elements in the AVStream.side_data array.
Definition at line 990 of file avformat.h.
int AVStream::event_flags |
Flags indicating events happening on the stream, a combination of AVSTREAM_EVENT_FLAG_*.
Definition at line 1003 of file avformat.h.
AVRational AVStream::r_frame_rate |
Real base framerate of the stream.
This is the lowest framerate with which all timestamps can be represented accurately (it is the least common multiple of all framerates in the stream). Note, this value is just a guess! For example, if the time base is 1/90000 and all frames have either approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
Definition at line 1026 of file avformat.h.
AVCodecParameters* AVStream::codecpar |
Codec parameters associated with this stream.
Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively.
Definition at line 1049 of file avformat.h.
Referenced by dec_enc(), init_filters(), main(), open_audio(), open_codec_context(), open_input_file(), open_output_file(), and open_video().
void* AVStream::unused |
Definition at line 1063 of file avformat.h.
int AVStream::pts_wrap_bits |
number of bits in pts (used for wrapping control)
Definition at line 1066 of file avformat.h.
int64_t AVStream::first_dts |
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.
Definition at line 1076 of file avformat.h.
int64_t AVStream::cur_dts |
Definition at line 1077 of file avformat.h.
int64_t AVStream::last_IP_pts |
Definition at line 1078 of file avformat.h.
int AVStream::last_IP_duration |
Definition at line 1079 of file avformat.h.
int AVStream::probe_packets |
Number of packets to buffer for codec probing.
Definition at line 1084 of file avformat.h.
int AVStream::codec_info_nb_frames |
Number of frames that have been demuxed during avformat_find_stream_info()
Definition at line 1089 of file avformat.h.
enum AVStreamParseType AVStream::need_parsing |
Definition at line 1092 of file avformat.h.
struct AVCodecParserContext* AVStream::parser |
Definition at line 1093 of file avformat.h.
void* AVStream::unused7 |
Definition at line 1097 of file avformat.h.
AVProbeData AVStream::unused6 |
Definition at line 1098 of file avformat.h.
int64_t AVStream::unused5[16+1] |
Definition at line 1099 of file avformat.h.
AVIndexEntry* AVStream::index_entries |
Only used if the format does not support seeking natively.
Definition at line 1101 of file avformat.h.
int AVStream::nb_index_entries |
Definition at line 1103 of file avformat.h.
unsigned int AVStream::index_entries_allocated_size |
Definition at line 1104 of file avformat.h.
int AVStream::stream_identifier |
Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown.
Definition at line 1111 of file avformat.h.
int AVStream::unused8 |
Definition at line 1115 of file avformat.h.
int AVStream::unused9 |
Definition at line 1116 of file avformat.h.
int AVStream::unused10 |
Definition at line 1117 of file avformat.h.
AVStreamInternal* AVStream::internal |
An opaque field for libavformat internal usage.
Must not be accessed in any way by callers.
Definition at line 1124 of file avformat.h.