C# Class Unosquare.FFmpegMediaElement.FFmpegMediaFrameCache

Represents a set of ordered media frames of a given type
ファイルを表示 Open project: bbougot/Popcorn Class Usage Examples

Public Methods

Method 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

Method Description
RecomputeProperties ( ) : void

Recomputes the properties.

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

Throws the invalid frame type exception.

Method Details

Add() public method

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.
return void

Clear() public method

Clears all the frames and releases them.
public Clear ( ) : void
return void

FFmpegMediaFrameCache() public method

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.
return System

FFmpegMediaFrameCache() public method

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

GetFrame() public method

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

GetFrameAt() public method

Gets the frame at the given index.
public GetFrameAt ( int index ) : FFmpegMediaFrame
index int The index.
return FFmpegMediaFrame

GetFrames() public method

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.
return List

GetFrames() public method

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.
return List

IndexOf() public method

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

IndexOf() public method

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
return int

RemoveFirst() public method

Removes the first frame and releases it.
public RemoveFirst ( ) : void
return void

RemoveLast() public method

Removes the last frame and releases it.
public RemoveLast ( ) : void
return void

Replace() public method

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.
return void