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.
Afficher le fichier Open project: kenneththorman/appspotdemo-mono Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
summarizeFrameDimensions ( VideoRenderer frame ) : long

Method Details

returnFrame() public méthode

public returnFrame ( VideoRenderer frame ) : void
frame VideoRenderer
Résultat void

takeFrame() public méthode

public takeFrame ( VideoRenderer source ) : VideoRenderer.I420Frame
source VideoRenderer
Résultat VideoRenderer.I420Frame

validateDimensions() public static méthode

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