Class FFmpegMedia
Represents a media, i.e. a context with a collection of streams and associated codecs from a unique source.
public sealed class FFmpegMedia : IDisposable
- Inheritance
-
FFmpegMedia
- Implements
- Extension Methods
Constructors
FFmpegMedia(GraphicsDevice)
Initializes a new instance of the FFmpegMedia class.
public FFmpegMedia(GraphicsDevice graphicsDevice = null)
Parameters
graphicsDevice
GraphicsDevice
Fields
Logger
public static Logger Logger
Field Value
Properties
Duration
The duration of the media.
public TimeSpan Duration { get; }
Property Value
Streams
A collection of streams retrieved from this media.
public IReadOnlyList<FFmpegStream> Streams { get; }
Property Value
Remarks
The collection is empty until the media is open.
Url
The url to the media.
public string Url { get; }
Property Value
Remarks
It can include a specific protocol such as http or subfile.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
ExtractFrames(FFmpegStream, int)
public int ExtractFrames(FFmpegStream stream, int count)
Parameters
stream
FFmpegStreamcount
int
Returns
GetStreamInfo(VideoStream)
public FFmpegMedia.StreamInfo GetStreamInfo(VideoStream stream)
Parameters
stream
VideoStream
Returns
IsStereoscopicVideo(FFmpegStream)
Returns true if the provided stream is a stereoscopic video.
public bool IsStereoscopicVideo(FFmpegStream stream)
Parameters
stream
FFmpegStream
Returns
Remarks
This function may read the first frame of the video if necessary
Open(string, long, long)
Opens this media.
public void Open(string url, long startPosition = 0, long length = -1)
Parameters
Remarks
Once the media is open, the collection of Streams is populated.
SeekToTime(FFmpegStream, long)
public bool SeekToTime(FFmpegStream stream, long timestamp)
Parameters
stream
FFmpegStreamtimestamp
long