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.
Assembly: FFmpeg.dll
public class AVStream : OptionQueryableBase, IOptionQueryable, ILoggingContext, IEquatable<AVStream?>, IAVPointer<_AVStream>
Constructors
View Source
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
Properties
View Source
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
View Source
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
View Source
Gets the codec identifier describing the encoded data in this stream.
Declaration
public CodecID CodecId { get; }
Property Value
View Source
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
View Source
Gets or sets which packets from this stream may be discarded during decoding.
Declaration
public DiscardFlags Discard { get; set; }
Property Value
View Source
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
View Source
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
View Source
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
View Source
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
View Source
Gets the zero-based index of this stream within its containing format context.
Declaration
public int Index { get; }
Property Value
View Source
Gets or sets the general type of the encoded data (e.g., video, audio).
Declaration
public MediaType MediaType { get; set; }
Property Value
View Source
Gets the metadata associated with this stream.
Declaration
public AVDictionary_ref Metadata { get; }
Property Value
View Source
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
View Source
The pointer to the unmanaged _AVStream object
Declaration
protected override void* Pointer { get; }
Property Value
Overrides
View Source
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
View Source
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
View Source
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
View Source
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
View Source
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
Methods
View Source
Declaration
public bool Equals(AVStream? other)
Parameters
Returns
View Source
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
Declaration
public static bool operator ==(AVStream? left, AVStream? right)
Parameters
Returns
View Source
Declaration
public static bool operator !=(AVStream? left, AVStream? right)
Parameters
Returns
Implements
Extension Methods