Class FFmpegStream
Represents a single stream from a FFmpeg media.
public abstract class FFmpegStream
- Inheritance
-
FFmpegStream
- Derived
Constructors
FFmpegStream(AVStream*, FFmpegMedia)
Initializes a new instance of the FFmpegStream class.
protected FFmpegStream(AVStream* pStream, FFmpegMedia media)
Parameters
pStream
AVStream*media
FFmpegMedia
- See Also
-
AVStream
Properties
Codec
The codec of the media.
public AVCodecID Codec { get; }
Property Value
- AVCodecID
- See Also
-
AVStream
Duration
The duration of the media this stream belongs to.
public TimeSpan Duration { get; }
Property Value
- See Also
-
AVStream
Index
The index of this stream in the associated format context.
public int Index { get; }
Property Value
- See Also
-
AVFormatContext
Metadata
public IReadOnlyDictionary<string, string> Metadata { get; }
Property Value
- See Also
-
AVStream
Type
The type of this stream.
public abstract FFMpegStreamType Type { get; }
Property Value
- See Also
-
AVStream
Methods
Create(AVStream*, FFmpegMedia)
Creates a new instance of FFmpegStream from the provided pStream
.
public static FFmpegStream Create(AVStream* pStream, FFmpegMedia media)
Parameters
pStream
AVStream*A pointer to the underlying stream.
media
FFmpegMediaThe media containing this stream.
Returns
Remarks
The actual type of the returned instance depends on the type of stream.
- See Also
TimeToTimestamp(TimeSpan)
Converts a real-time value to the corresponding timestamp.
public long TimeToTimestamp(TimeSpan time)
Parameters
time
TimeSpan
Returns
- See Also
-
AVStream
TimestampToTime(long)
Converts a timestamp to a real-time value.
public TimeSpan TimestampToTime(long timestamp)
Parameters
timestamp
long
Returns
- See Also
-
AVStream
See Also
AVStream