Show / Hide Table of Contents

Class AVStream

Represents a single media stream within a container. A stream typically contains encoded audio, video, subtitles, or other media data, together with its timing information, codec parameters, and metadata.

Inheritance
object
OptionQueryableBase
AVStream
Implements
IOptionQueryable
ILoggingContext
IEquatable<AVStream>
IAVPointer<_AVStream>
Inherited Members
OptionQueryableBase.ResetOptions()
OptionQueryableBase.GetOptions(bool)
OptionQueryableBase.FindOption(string, bool)
OptionQueryableBase.SetOption(string, string, bool)
OptionQueryableBase.SetOption(string, long, bool)
OptionQueryableBase.SetOption(string, bool, bool)
OptionQueryableBase.SetOption(string, double, bool)
OptionQueryableBase.SetOption(string, Rational, bool)
OptionQueryableBase.SetOption(string, ReadOnlySpan<byte>, bool)
OptionQueryableBase.SetOption(string, ReadOnlyMemory<byte>, bool)
OptionQueryableBase.SetOption(string, int, int, bool)
OptionQueryableBase.SetOption(string, (int Width, int Height), bool)
OptionQueryableBase.SetOption(string, PixelFormat, bool)
OptionQueryableBase.SetOption(string, SampleFormat, bool)
OptionQueryableBase.SetOption(string, IDictionary<string, string>, bool)
OptionQueryableBase.SetOption(string, ILookup<string, string>, bool)
OptionQueryableBase.SetOption(IDictionary<string, string>, bool)
OptionQueryableBase.SetOption(string, ref ILookup<string, string>, bool)
OptionQueryableBase.SetOption<T>(string, T, bool)
OptionQueryableBase.SetOption(string, object, bool)
OptionQueryableBase.SetOption(Option, string, bool)
OptionQueryableBase.SetOption(Option, bool, bool)
OptionQueryableBase.SetOption(Option, long, bool)
OptionQueryableBase.SetOption(Option, double, bool)
OptionQueryableBase.SetOption(Option, Rational, bool)
OptionQueryableBase.SetOption(Option, ReadOnlySpan<byte>, bool)
OptionQueryableBase.SetOption(Option, ReadOnlyMemory<byte>, bool)
OptionQueryableBase.SetOption(Option, int, int, bool)
OptionQueryableBase.SetOption(Option, (int Width, int Height), bool)
OptionQueryableBase.SetOption(Option, PixelFormat, bool)
OptionQueryableBase.SetOption(Option, SampleFormat, bool)
OptionQueryableBase.SetOption(Option, IDictionary<string, string>, bool)
OptionQueryableBase.SetOption(Option, ILookup<string, string>, bool)
OptionQueryableBase.SetOption<T>(Option, T, bool)
OptionQueryableBase.SetOption(Option, object, bool)
OptionQueryableBase.TryGetOption(string, out string, bool)
OptionQueryableBase.TryGetOption(string, out long, bool)
OptionQueryableBase.TryGetOption<T>(string, out T, bool)
OptionQueryableBase.TryGetOption(string, out ulong, bool)
OptionQueryableBase.TryGetOption(string, out int, bool)
OptionQueryableBase.TryGetOption(string, out bool, bool)
OptionQueryableBase.TryGetOption(string, out uint, bool)
OptionQueryableBase.TryGetOption(string, out double, bool)
OptionQueryableBase.TryGetOption(string, out Rational, bool)
OptionQueryableBase.TryGetOption(string, out PixelFormat, bool)
OptionQueryableBase.TryGetOption(string, out SampleFormat, bool)
OptionQueryableBase.TryGetOption(string, out IDictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(string, out Dictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(string, out AVDictionary, bool)
OptionQueryableBase.TryGetOption(string, out ILookup<string, string>, bool)
OptionQueryableBase.TryGetOption(string, out AVMultiDictionary, bool)
OptionQueryableBase.TryGetOption(string, out int, out int, bool)
OptionQueryableBase.TryGetOption(string, out (int Width, int Height), bool)
OptionQueryableBase.TryGetOption(string, Span<byte>, bool)
OptionQueryableBase.TryGetOption(string, out byte[], bool)
OptionQueryableBase.TryGetOption(string, out Memory<byte>, bool)
OptionQueryableBase.TryGetOption(string, out ReadOnlyMemory<byte>, bool)
OptionQueryableBase.TryGetOption(string, out object, bool)
OptionQueryableBase.TryGetOption(Option, out string, bool)
OptionQueryableBase.TryGetOption(Option, out long, bool)
OptionQueryableBase.TryGetOption<T>(Option, out T, bool)
OptionQueryableBase.TryGetOption(Option, out ulong, bool)
OptionQueryableBase.TryGetOption(Option, out int, bool)
OptionQueryableBase.TryGetOption(Option, out bool, bool)
OptionQueryableBase.TryGetOption(Option, out uint, bool)
OptionQueryableBase.TryGetOption(Option, out double, bool)
OptionQueryableBase.TryGetOption(Option, out Rational, bool)
OptionQueryableBase.TryGetOption(Option, out PixelFormat, bool)
OptionQueryableBase.TryGetOption(Option, out SampleFormat, bool)
OptionQueryableBase.TryGetOption(Option, out IDictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(Option, out Dictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(Option, out AVDictionary, bool)
OptionQueryableBase.TryGetOption(Option, out ILookup<string, string>, bool)
OptionQueryableBase.TryGetOption(Option, out AVMultiDictionary, bool)
OptionQueryableBase.TryGetOption(Option, out int, out int, bool)
OptionQueryableBase.TryGetOption(Option, out (int Width, int Height), bool)
OptionQueryableBase.TryGetOption(Option, out byte[], bool)
OptionQueryableBase.TryGetOption(Option, out Memory<byte>, bool)
OptionQueryableBase.TryGetOption(Option, out ReadOnlyMemory<byte>, bool)
OptionQueryableBase.TryGetOption(Option, Span<byte>, bool)
OptionQueryableBase.TryGetOption(Option, out object, bool)
OptionQueryableBase.SetOption(string, ChannelLayout, bool)
OptionQueryableBase.SetOption(Option, ChannelLayout, bool)
OptionQueryableBase.TryGetOption(string, out ChannelLayout, bool)
OptionQueryableBase.TryGetOption(Option, out ChannelLayout, bool)
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: FFmpeg.Formats
Assembly: FFmpeg.dll
Syntax
public class AVStream : OptionQueryableBase, IOptionQueryable, ILoggingContext, IEquatable<AVStream?>, IAVPointer<_AVStream>

Constructors

View Source

AVStream(_AVStream*)

Initializes a new instance of the AVStream class that wraps an existing unmanaged FFmpeg.AutoGen._AVStream structure.

Declaration
public AVStream(_AVStream* stream)
Parameters
Type Name Description
_AVStream* stream

A pointer to the unmanaged FFmpeg stream.

Exceptions
Type Condition
ArgumentNullException

Thrown if stream is null.

Properties

View Source

AttachedPicture

Gets a reference to the attached picture associated with this stream. This is primarily used by formats that store album artwork or thumbnails.

Declaration
public AVPacket_ref AttachedPicture { get; }
Property Value
Type Description
AVPacket_ref
View Source

AverageFrameRate

Gets or sets the average frame rate of the stream. For variable frame rate content this value represents the average rather than the instantaneous frame rate.

Declaration
public Rational AverageFrameRate { get; set; }
Property Value
Type Description
Rational
View Source

CodecId

Gets the codec identifier describing the encoded data in this stream.

Declaration
public CodecID CodecId { get; }
Property Value
Type Description
CodecID
View Source

CodecParameters

Gets a reference to the codec parameters describing the encoded data in this stream. These parameters include the codec, media type, dimensions, sample rate, channel layout, and other codec-specific information.

Declaration
public CodecParameters_ref CodecParameters { get; }
Property Value
Type Description
CodecParameters_ref
View Source

Discard

Gets or sets which packets from this stream may be discarded during decoding.

Declaration
public DiscardFlags Discard { get; set; }
Property Value
Type Description
DiscardFlags
View Source

Disposition

Gets or sets the stream disposition flags. These flags describe special characteristics of the stream, such as whether it is the default stream, forced, attached picture, or hearing impaired.

Declaration
public StreamDisposition Disposition { get; set; }
Property Value
Type Description
StreamDisposition
View Source

Duration

Gets or sets the duration of the stream, expressed in TimeBase units. A value of 0 or AV_NOPTS_VALUE may indicate that the duration is unknown.

Declaration
public long Duration { get; set; }
Property Value
Type Description
long
View Source

EventFlags

Gets or sets event flags reported by FFmpeg for this stream. These flags are used internally to notify the application of stream changes.

Declaration
public int EventFlags { get; set; }
Property Value
Type Description
int
View Source

Id

Gets or sets the container-specific stream identifier. The meaning of this value depends on the container format.

Declaration
public int Id { get; set; }
Property Value
Type Description
int
View Source

Index

Gets the zero-based index of this stream within its containing format context.

Declaration
public int Index { get; }
Property Value
Type Description
int
View Source

MediaType

Gets or sets the general type of the encoded data (e.g., video, audio).

Declaration
public MediaType MediaType { get; set; }
Property Value
Type Description
MediaType
View Source

Metadata

Gets the metadata associated with this stream.

Declaration
public AVDictionary_ref Metadata { get; }
Property Value
Type Description
AVDictionary_ref
View Source

NumberOfFrames

Gets or sets the number of frames contained in the stream, if known. Some demuxers may leave this value unset.

Declaration
public long NumberOfFrames { get; set; }
Property Value
Type Description
long
View Source

Pointer

The pointer to the unmanaged _AVStream object

Declaration
protected override void* Pointer { get; }
Property Value
Type Description
void*
Overrides
OptionQueryableBase.Pointer
View Source

PtsWrapBits

Gets the number of bits used for presentation timestamp wrapping. This is primarily relevant for container formats with limited timestamp ranges.

Declaration
public int PtsWrapBits { get; }
Property Value
Type Description
int
View Source

RealFrameRate

Gets the estimated real base frame rate of the stream. This value is primarily intended for timing calculations and may differ from AverageFrameRate.

Declaration
public Rational RealFrameRate { get; }
Property Value
Type Description
Rational
View Source

SampleAspectRatio

Gets or sets the sample aspect ratio of the stream. This describes the aspect ratio of individual pixels rather than the displayed image.

Declaration
public Rational SampleAspectRatio { get; set; }
Property Value
Type Description
Rational
View Source

StartTime

Gets or sets the presentation timestamp of the first frame in the stream, expressed in TimeBase units. A value of AV_NOPTS_VALUE indicates that the start time is unknown.

Declaration
public long StartTime { get; set; }
Property Value
Type Description
long
View Source

TimeBase

Gets or sets the stream time base. All timestamps stored in this stream, such as StartTime and Duration, are expressed in this time base.

Declaration
public Rational TimeBase { get; set; }
Property Value
Type Description
Rational

Methods

View Source

Equals(AVStream?)

Declaration
public bool Equals(AVStream? other)
Parameters
Type Name Description
AVStream other
Returns
Type Description
bool
View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Operators

View Source

operator ==(AVStream?, AVStream?)

Declaration
public static bool operator ==(AVStream? left, AVStream? right)
Parameters
Type Name Description
AVStream left
AVStream right
Returns
Type Description
bool
View Source

operator !=(AVStream?, AVStream?)

Declaration
public static bool operator !=(AVStream? left, AVStream? right)
Parameters
Type Name Description
AVStream left
AVStream right
Returns
Type Description
bool

Implements

IOptionQueryable
ILoggingContext
IEquatable<T>
IAVPointer<T>

Extension Methods

LoggingContextExtensions.Debug(ILoggingContext, string)
LoggingContextExtensions.Error(ILoggingContext, string)
LoggingContextExtensions.Fatal(ILoggingContext, string)
LoggingContextExtensions.Info(ILoggingContext, string)
LoggingContextExtensions.Log(ILoggingContext, LogLevel, string)
LoggingContextExtensions.Panic(ILoggingContext, string)
LoggingContextExtensions.Trace(ILoggingContext, string)
LoggingContextExtensions.Verbose(ILoggingContext, string)
LoggingContextExtensions.Warning(ILoggingContext, string)
  • View Source
In this article
Back to top Generated by DocFX