C# Class HCS_Encoder.Inputs.Buffers.ImageBuffer

Inheritance: IEncoderBuffer
Datei anzeigen Open project: i-e-b/HLS---Smooth-Encoder Class Usage Examples

Public Methods

Method Description
ImageBuffer ( int Width, int Height ) : System

Prepare a set of buffers to accept the images. Incoming frames will be scaled to match the given width and height. For best results, capture and buffer sizes should match. Rescaling does not preserve aspect ratio.

LoadToFrame ( MediaFrame &Frame ) : void

Load the buffer into a MediaFrame for the encoder. IMPORTANT: You must call UnloadFrame after this method is called. For efficiency, unload as soon as possible.

RebufferCapturedFrames ( ) : void

Convert a captured YUV buffer into a scaled YUV buffer

UnloadFrame ( MediaFrame &Frame ) : void

Release memory previously locked by LoadToFrame()

WipeBuffer ( ) : void

Emergeny clear-out. Drop all queued frames

WipeBufferUntil ( double AbandonTime ) : void

Remove all frames captured before the given capture time. They will not be encoded.

Private Methods

Method Description
RescaleBuffers ( TimedImage Src, TimedImage Dst ) : void
ScalePlane ( byte Src, byte Dst, int src_w, int src_h, int dst_w, int dst_h, bool HQ ) : void

Method Details

ImageBuffer() public method

Prepare a set of buffers to accept the images. Incoming frames will be scaled to match the given width and height. For best results, capture and buffer sizes should match. Rescaling does not preserve aspect ratio.
public ImageBuffer ( int Width, int Height ) : System
Width int
Height int
return System

LoadToFrame() public method

Load the buffer into a MediaFrame for the encoder. IMPORTANT: You must call UnloadFrame after this method is called. For efficiency, unload as soon as possible.
public LoadToFrame ( MediaFrame &Frame ) : void
Frame MediaFrame
return void

RebufferCapturedFrames() public method

Convert a captured YUV buffer into a scaled YUV buffer
public RebufferCapturedFrames ( ) : void
return void

UnloadFrame() public method

Release memory previously locked by LoadToFrame()
public UnloadFrame ( MediaFrame &Frame ) : void
Frame MediaFrame
return void

WipeBuffer() public method

Emergeny clear-out. Drop all queued frames
public WipeBuffer ( ) : void
return void

WipeBufferUntil() public method

Remove all frames captured before the given capture time. They will not be encoded.
public WipeBufferUntil ( double AbandonTime ) : void
AbandonTime double
return void