C# Class Unosquare.FFmpegMediaElement.FFmpegMediaFrameCache

Represents a set of ordered media frames of a given type
Afficher le fichier Open project: bbougot/Popcorn Class Usage Examples

Méthodes publiques

Méthode Description
Add ( FFmpegMediaFrame frame ) : void

Adds the specified frame at the right location. This method ensures the collection stays ordered

Clear ( ) : void

Clears all the frames and releases them.

FFmpegMediaFrameCache ( FFmpegMediaFrameCache otherCache ) : System

Initializes a new instance of the FFmpegMediaFrameCache class. This copies all properties from an existing cache excluding frames of course.

FFmpegMediaFrameCache ( decimal frameRate, MediaFrameType type ) : System

Initializes a new instance of the FFmpegMediaFrameCache class.

GetFrame ( decimal renderTime, bool checkBounds ) : FFmpegMediaFrame

Gets a frame at the given render time.

GetFrameAt ( int index ) : FFmpegMediaFrame

Gets the frame at the given index.

GetFrames ( decimal renderTime, decimal duration ) : List

Gets a maximum duration of frames at the given starting renderTime

GetFrames ( decimal renderTime, int frameCount ) : List

Gets a maximum of frameCount frames at the given starting renderTime

IndexOf ( FFmpegMediaFrame frame ) : int

Gets the index of the frame. Returns -1 for not found.

IndexOf ( decimal renderTime, bool checkBounds ) : int

Gets the index of the frame. Returns -1 if not found.

RemoveFirst ( ) : void

Removes the first frame and releases it.

RemoveLast ( ) : void

Removes the last frame and releases it.

Replace ( FFmpegMediaFrameCache newFrames ) : void

Replaces the internally-held frames with the specified new frames.

Private Methods

Méthode Description
RecomputeProperties ( ) : void

Recomputes the properties.

SearchFrame ( decimal renderTime ) : FFmpegMediaFrame
ThrowInvalidFrameTypeException ( MediaFrameType frameType ) : void

Throws the invalid frame type exception.

Method Details

Add() public méthode

Adds the specified frame at the right location. This method ensures the collection stays ordered
Buffer is already at capacity.
public Add ( FFmpegMediaFrame frame ) : void
frame FFmpegMediaFrame The frame.
Résultat void

Clear() public méthode

Clears all the frames and releases them.
public Clear ( ) : void
Résultat void

FFmpegMediaFrameCache() public méthode

Initializes a new instance of the FFmpegMediaFrameCache class. This copies all properties from an existing cache excluding frames of course.
public FFmpegMediaFrameCache ( FFmpegMediaFrameCache otherCache ) : System
otherCache FFmpegMediaFrameCache The other cache.
Résultat System

FFmpegMediaFrameCache() public méthode

Initializes a new instance of the FFmpegMediaFrameCache class.
public FFmpegMediaFrameCache ( decimal frameRate, MediaFrameType type ) : System
frameRate decimal The frame rate.
type MediaFrameType The type.
Résultat System

GetFrame() public méthode

Gets a frame at the given render time.
public GetFrame ( decimal renderTime, bool checkBounds ) : FFmpegMediaFrame
renderTime decimal The render time.
checkBounds bool
Résultat FFmpegMediaFrame

GetFrameAt() public méthode

Gets the frame at the given index.
public GetFrameAt ( int index ) : FFmpegMediaFrame
index int The index.
Résultat FFmpegMediaFrame

GetFrames() public méthode

Gets a maximum duration of frames at the given starting renderTime
public GetFrames ( decimal renderTime, decimal duration ) : List
renderTime decimal The render time.
duration decimal The duration.
Résultat List

GetFrames() public méthode

Gets a maximum of frameCount frames at the given starting renderTime
public GetFrames ( decimal renderTime, int frameCount ) : List
renderTime decimal The render time.
frameCount int The frame count.
Résultat List

IndexOf() public méthode

Gets the index of the frame. Returns -1 for not found.
public IndexOf ( FFmpegMediaFrame frame ) : int
frame FFmpegMediaFrame The frame.
Résultat int

IndexOf() public méthode

Gets the index of the frame. Returns -1 if not found.
public IndexOf ( decimal renderTime, bool checkBounds ) : int
renderTime decimal The render time.
checkBounds bool
Résultat int

RemoveFirst() public méthode

Removes the first frame and releases it.
public RemoveFirst ( ) : void
Résultat void

RemoveLast() public méthode

Removes the last frame and releases it.
public RemoveLast ( ) : void
Résultat void

Replace() public méthode

Replaces the internally-held frames with the specified new frames.
Buffer does not support the capacity of new elements
public Replace ( FFmpegMediaFrameCache newFrames ) : void
newFrames FFmpegMediaFrameCache The new frames.
Résultat void