Struct AVFormatFlags

Source
#[repr(transparent)]
pub struct AVFormatFlags(pub i32);
Expand description

Format flags used in FFmpeg’s AVFormatContext configuration.

These flags are format-specific capabilities that describe the inherent characteristics and limitations of a format (container). They are read-only properties that indicate what features a format supports or doesn’t support.

For example, NoFile indicates the format doesn’t need a regular file (like network protocols), while GlobalHeader indicates the format uses global codec headers.

See the official FFmpeg documentation: https://ffmpeg.org/doxygen/trunk/avformat_8h.html

Tuple Fields§

§0: i32

Implementations§

Source§

impl AVFormatFlags

Source

pub const NoFile: Self

The format does not require a file to be opened explicitly.

  • Used for: Protocol-based formats like rtmp://, http://
  • Equivalent to: AVFMT_NOFILE
Source

pub const NeedNumber: Self

Requires a numbered sequence of files (e.g., %03d in filenames).

  • Used for: Image sequences, segment-based formats.
  • Equivalent to: AVFMT_NEEDNUMBER
Source

pub const Experimental: Self

The format is experimental and may be subject to changes.

  • Used for: Newer formats that are not yet stable.
  • Equivalent to: AVFMT_EXPERIMENTAL
Source

pub const ShowIds: Self

Displays stream identifiers when logging or printing metadata.

  • Equivalent to: AVFMT_SHOW_IDS
Source

pub const GlobalHeader: Self

Uses a global header instead of individual packet headers.

  • Used for: Codecs that require an extradata header (e.g., H.264, AAC in MP4).
  • Equivalent to: AVFMT_GLOBALHEADER
Source

pub const NoTimestamps: Self

The format does not store timestamps.

  • Used for: Raw formats (e.g., raw audio, raw video).
  • Equivalent to: AVFMT_NOTIMESTAMPS
Source

pub const GenericIndex: Self

The format has a generic index.

  • Used for: Formats that require seeking but don’t use timestamp-based indexing.
  • Equivalent to: AVFMT_GENERIC_INDEX
Source

pub const TsDiscontinuous: Self

The format supports discontinuous timestamps.

  • Used for: Live streams where timestamps may reset (e.g., HLS, RTSP).
  • Equivalent to: AVFMT_TS_DISCONT
Source

pub const VariableFps: Self

The format supports variable frame rates.

  • Used for: Video formats where frame duration varies (e.g., MKV, MP4).
  • Equivalent to: AVFMT_VARIABLE_FPS
Source

pub const NoDimensions: Self

The format does not store dimensions (width & height).

  • Used for: Audio-only formats, raw formats.
  • Equivalent to: AVFMT_NODIMENSIONS
Source

pub const NoStreams: Self

The format does not contain any stream information.

  • Used for: Metadata-only containers.
  • Equivalent to: AVFMT_NOSTREAMS
Source

pub const NoBinarySearch: Self

The format does not support binary search for seeking.

  • Used for: Formats where linear scanning is required (e.g., live streams).
  • Equivalent to: AVFMT_NOBINSEARCH
Source

pub const NoGenericSearch: Self

The format does not support generic stream search.

  • Used for: Specialized formats that require specific handling.
  • Equivalent to: AVFMT_NOGENSEARCH
Source

pub const NoByteSeek: Self

The format does not support byte-based seeking.

  • Used for: Formats that only support timestamp-based seeking.
  • Equivalent to: AVFMT_NO_BYTE_SEEK
Source

pub const AllowFlush: Self

Allows flushing of buffered data.

  • Used for: Streaming formats that support mid-stream flushing.
  • Equivalent to: AVFMT_ALLOW_FLUSH
Source

pub const TsNonStrict: Self

The format does not require strict timestamp ordering.

  • Used for: Formats where out-of-order timestamps are common.
  • Equivalent to: AVFMT_TS_NONSTRICT
Source

pub const TsNegative: Self

The format allows negative timestamps.

  • Used for: Certain formats that support negative PTS/DTS.
  • Equivalent to: AVFMT_TS_NEGATIVE
Source

pub const SeekToPts: Self

Seeks are performed relative to presentation timestamps (PTS).

  • Used for: Formats that use PTS instead of DTS for seeking.
  • Equivalent to: AVFMT_SEEK_TO_PTS

Trait Implementations§

Source§

impl BitAnd for AVFormatFlags

Source§

type Output = AVFormatFlags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for AVFormatFlags

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr for AVFormatFlags

Source§

type Output = AVFormatFlags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for AVFormatFlags

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor for AVFormatFlags

Source§

type Output = AVFormatFlags

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for AVFormatFlags

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for AVFormatFlags

Source§

fn clone(&self) -> AVFormatFlags

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AVFormatFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<AVFormatFlags> for i32

Source§

fn from(value: AVFormatFlags) -> Self

Converts to this type from the input type.
Source§

impl From<AVFormatFlags> for u32

Source§

fn from(value: AVFormatFlags) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for AVFormatFlags

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for AVFormatFlags

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl Hash for AVFormatFlags

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Not for AVFormatFlags

Source§

type Output = AVFormatFlags

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Ord for AVFormatFlags

Source§

fn cmp(&self, other: &AVFormatFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<i32> for AVFormatFlags

Source§

fn eq(&self, other: &i32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for AVFormatFlags

Source§

fn eq(&self, other: &AVFormatFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for AVFormatFlags

Source§

fn partial_cmp(&self, other: &AVFormatFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for AVFormatFlags

Source§

impl Eq for AVFormatFlags

Source§

impl StructuralPartialEq for AVFormatFlags

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more