[−][src]Struct ffmpeg_dev::sys::AVStream
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*.
Fields
index: c_int< stream index in AVFormatContext
id: c_intFormat-specific stream ID. decoding: set by libavformat encoding: set by the user, replaced by libavformat if left unset
codec: *mut AVCodecContext@deprecated use the codecpar struct instead
priv_data: *mut c_voidtime_base: AVRationalThis 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).
start_time: i64Decoding: 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). @note The ASF header does NOT contain a correct start_time the ASF demuxer must NOT set this.
duration: i64Decoding: 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.
nb_frames: i64< number of frames in this stream if known or 0
disposition: c_int< AV_DISPOSITION_* bit field
discard: AVDiscard< Selects which packets can be discarded at will and do not need to be demuxed.
sample_aspect_ratio: AVRationalsample aspect ratio (0 if unknown)
- encoding: Set by user.
- decoding: Set by libavformat.
metadata: *mut AVDictionaryavg_frame_rate: AVRationalAverage framerate
- demuxing: May be set by libavformat when creating the stream or in avformat_find_stream_info().
- muxing: May be set by the caller before avformat_write_header().
attached_pic: AVPacketFor 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
side_data: *mut AVPacketSideDataAn 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.
- demuxing: Set by libavformat when the stream is created.
- muxing: May be set by the caller before avformat_write_header().
Freed by libavformat in avformat_free_context().
@see av_format_inject_global_side_data()
nb_side_data: c_intThe number of elements in the AVStream.side_data array.
event_flags: c_intFlags for the user to detect events happening on the stream. Flags must be cleared by the user once the event has been handled. A combination of AVSTREAM_EVENT_FLAG_*.
r_frame_rate: AVRationalReal 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.
recommended_encoder_configuration: *mut c_charString containing pairs of key and values describing recommended encoder configuration. Pairs are separated by ','. Keys are separated from values by '='.
@deprecated unused
codecpar: *mut AVCodecParametersCodec parameters associated with this stream. Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively.
- demuxing: filled by libavformat on stream creation or in avformat_find_stream_info()
- muxing: filled by the caller before avformat_write_header()
info: *mut AVStream__bindgen_ty_1pts_wrap_bits: c_int< number of bits in pts (used for wrapping control)
first_dts: i64Timestamp 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.
cur_dts: i64last_IP_pts: i64last_IP_duration: c_intprobe_packets: c_intNumber of packets to buffer for codec probing
codec_info_nb_frames: c_intNumber of frames that have been demuxed during avformat_find_stream_info()
need_parsing: AVStreamParseTypeparser: *mut AVCodecParserContextlast_in_packet_buffer: *mut AVPacketListlast packet in packet_buffer for this stream when muxing.
probe_data: AVProbeDatapts_buffer: [i64; 17]index_entries: *mut AVIndexEntry< Only used if the format does not support seeking natively.
nb_index_entries: c_intindex_entries_allocated_size: c_uintstream_identifier: c_intStream Identifier This is the MPEG-TS stream identifier +1 0 means unknown
program_num: c_intDetails of the MPEG-TS program which created this stream.
pmt_version: c_intpmt_stream_idx: c_intinterleaver_chunk_size: i64interleaver_chunk_duration: i64request_probe: c_intstream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with request_probe being the minimum score to accept. NOT PART OF PUBLIC API
skip_to_keyframe: c_intIndicates that everything up to the next keyframe should be discarded.
skip_samples: c_intNumber of samples to skip at the start of the frame decoded from the next packet.
start_skip_samples: i64If not 0, the number of samples that should be skipped from the start of the stream (the samples are removed from packets with pts==0, which also assumes negative timestamps do not happen). Intended for use with formats such as mp3 with ad-hoc gapless audio support.
first_discard_sample: i64If not 0, the first audio sample that should be discarded from the stream. This is broken by design (needs global sample count), but can't be avoided for broken by design formats such as mp3 with ad-hoc gapless audio support.
last_discard_sample: i64The sample after last sample that is intended to be discarded after first_discard_sample. Works on frame boundaries only. Used to prevent early EOF if the gapless info is broken (considered concatenated mp3s).
nb_decoded_frames: c_intNumber of internally decoded frames, used internally in libavformat, do not access its lifetime differs from info which is why it is not in that structure.
mux_ts_offset: i64Timestamp offset added to timestamps before muxing NOT PART OF PUBLIC API
pts_wrap_reference: i64Internal data to check for wrapping of the time stamp
pts_wrap_behavior: c_intOptions for behavior, when a wrap is detected.
Defined by AV_PTS_WRAP_ values.
If correction is enabled, there are two possibilities: If the first time stamp is near the wrap point, the wrap offset will be subtracted, which will create negative time stamps. Otherwise the offset will be added.
update_initial_durations_done: c_intInternal data to prevent doing update_initial_durations() twice
pts_reorder_error: [i64; 17]Internal data to generate dts from pts
pts_reorder_error_count: [u8; 17]last_dts_for_order_check: i64Internal data to analyze DTS and detect faulty mpeg streams
dts_ordered: u8dts_misordered: u8inject_global_side_data: c_intInternal data to inject global side data
display_aspect_ratio: AVRationaldisplay aspect ratio (0 if unknown)
- encoding: unused
- decoding: Set by libavformat to calculate sample_aspect_ratio internally
internal: *mut AVStreamInternalAn opaque field for libavformat internal usage. Must not be accessed in any way by callers.
Trait Implementations
Auto Trait Implementations
impl !Send for AVStream
impl !Sync for AVStream
impl Unpin for AVStream
impl UnwindSafe for AVStream
impl RefUnwindSafe for AVStream
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,