Struct rsmpeg::ffi::AVStream[][src]

#[repr(C)]
pub struct AVStream {
Show fields pub index: i32, pub id: i32, pub codec: *mut AVCodecContext, pub priv_data: *mut c_void, pub time_base: AVRational, pub start_time: i64, pub duration: i64, pub nb_frames: i64, pub disposition: i32, pub discard: i32, pub sample_aspect_ratio: AVRational, pub metadata: *mut AVDictionary, pub avg_frame_rate: AVRational, pub attached_pic: AVPacket, pub side_data: *mut AVPacketSideData, pub nb_side_data: i32, pub event_flags: i32, pub r_frame_rate: AVRational, pub recommended_encoder_configuration: *mut i8, pub codecpar: *mut AVCodecParameters, pub unused: *mut c_void, pub pts_wrap_bits: i32, pub first_dts: i64, pub cur_dts: i64, pub last_IP_pts: i64, pub last_IP_duration: i32, pub probe_packets: i32, pub codec_info_nb_frames: i32, pub need_parsing: u32, pub parser: *mut AVCodecParserContext, pub unused7: *mut c_void, pub unused6: AVProbeData, pub unused5: [i64; 17], pub index_entries: *mut AVIndexEntry, pub nb_index_entries: i32, pub index_entries_allocated_size: u32, pub stream_identifier: i32, pub unused8: i32, pub unused9: i32, pub unused10: i32, pub internal: *mut AVStreamInternal,
}
Expand description

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: i32
Expand description

< stream index in AVFormatContext

id: i32
Expand description

Format-specific stream ID. decoding: set by libavformat encoding: set by the user, replaced by libavformat if left unset

codec: *mut AVCodecContext
Expand description

@deprecated use the codecpar struct instead

priv_data: *mut c_voidtime_base: AVRational
Expand description

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).

start_time: i64
Expand description

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). @note The ASF header does NOT contain a correct start_time the ASF demuxer must NOT set this.

duration: i64
Expand description

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.

nb_frames: i64
Expand description

< number of frames in this stream if known or 0

disposition: i32
Expand description

< AV_DISPOSITION_* bit field

discard: i32
Expand description

< Selects which packets can be discarded at will and do not need to be demuxed.

sample_aspect_ratio: AVRational
Expand description

sample aspect ratio (0 if unknown)

  • encoding: Set by user.
  • decoding: Set by libavformat.
metadata: *mut AVDictionaryavg_frame_rate: AVRational
Expand description

Average 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: AVPacket
Expand description

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

side_data: *mut AVPacketSideData
Expand description

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.

  • 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: i32
Expand description

The number of elements in the AVStream.side_data array.

event_flags: i32
Expand description

Flags indicating events happening on the stream, a combination of AVSTREAM_EVENT_FLAG_*.

  • demuxing: may be set by the demuxer in avformat_open_input(), avformat_find_stream_info() and av_read_frame(). Flags must be cleared by the user once the event has been handled.
  • muxing: may be set by the user after avformat_write_header(). to indicate a user-triggered event. The muxer will clear the flags for events it has handled in av_[interleaved]_write_frame().
r_frame_rate: AVRational
Expand description

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.

recommended_encoder_configuration: *mut i8
Expand description

String containing pairs of key and values describing recommended encoder configuration. Pairs are separated by ‘,’. Keys are separated from values by ‘=’.

@deprecated unused

codecpar: *mut AVCodecParameters
Expand description

Codec 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()
unused: *mut c_voidpts_wrap_bits: i32
Expand description

< number of bits in pts (used for wrapping control)

first_dts: i64
Expand description

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.

cur_dts: i64last_IP_pts: i64last_IP_duration: i32probe_packets: i32
Expand description

Number of packets to buffer for codec probing

codec_info_nb_frames: i32
Expand description

Number of frames that have been demuxed during avformat_find_stream_info()

need_parsing: u32parser: *mut AVCodecParserContextunused7: *mut c_voidunused6: AVProbeDataunused5: [i64; 17]index_entries: *mut AVIndexEntry
Expand description

< Only used if the format does not support seeking natively.

nb_index_entries: i32index_entries_allocated_size: u32stream_identifier: i32
Expand description

Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown

unused8: i32unused9: i32unused10: i32internal: *mut AVStreamInternal
Expand description

An opaque field for libavformat internal usage. Must not be accessed in any way by callers.

Trait Implementations

impl Clone for AVStream[src]

pub fn clone(&self) -> AVStream[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for AVStream[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Copy for AVStream[src]

Auto Trait Implementations

impl RefUnwindSafe for AVStream

impl !Send for AVStream

impl !Sync for AVStream

impl Unpin for AVStream

impl UnwindSafe for AVStream

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.