C# Class Appspotdemo.Mono.Droid.FramePool

This class acts as an allocation pool meant to minimize GC churn caused by frame allocation & disposal. The public API comprises of just two methods: copyFrame(), which allocates as necessary and copies, and returnFrame(), which returns frame ownership to the pool for use by a later call to copyFrame(). This class is thread-safe; calls to copyFrame() and returnFrame() are allowed to happen on any thread.
ファイルを表示 Open project: kenneththorman/appspotdemo-mono Class Usage Examples

Public Methods

Method Description
returnFrame ( VideoRenderer frame ) : void
takeFrame ( VideoRenderer source ) : VideoRenderer.I420Frame
validateDimensions ( VideoRenderer frame ) : bool

Validate that |frame| can be managed by the pool.

Private Methods

Method Description
summarizeFrameDimensions ( VideoRenderer frame ) : long

Method Details

returnFrame() public method

public returnFrame ( VideoRenderer frame ) : void
frame VideoRenderer
return void

takeFrame() public method

public takeFrame ( VideoRenderer source ) : VideoRenderer.I420Frame
source VideoRenderer
return VideoRenderer.I420Frame

validateDimensions() public static method

Validate that |frame| can be managed by the pool.
public static validateDimensions ( VideoRenderer frame ) : bool
frame VideoRenderer
return bool