AVBlocks for .NET  3.4
Audio and Video Software Development Kit
Block Class Referenceabstract

Provides functionality for audio and video encoding, decoding and transforming. More...

Inheritance diagram for Block:
MediaInfo Transcoder

Public Member Functions

void Close ()
 Closes the Block.
void Dispose ()
 Disposes the Block and reclaims the resources used by the object.
bool EndOfStream (int inputIndex)
 Tells the Block that there's no more data for the specified input socket.
bool Flush ()
 Flushes the data buffered in the Block to the output.
bool Open ()
 Initializes the Block based on the specified input and desired output.
bool Pull (out int outputIndex, MediaSample outputSample)
 Pulls output data from the Block.
bool PullUnmanaged (out int outputIndex, MediaSample outputSample)
 Pulls output data from the Block.
bool Push (int inputIndex, MediaSample inputSample)
 Pushes input data to the Blocks.
bool PushUnmanaged (int inputIndex, MediaSample inputSample)
 Pushes input data to the Block.

Properties

ErrorInfo Error [get]
 The error information for the last block operation.
MediaSocketList Inputs [get]
 A modifiable collection of MediaSocket objects which describe the input data of the Block.
MediaSocketList Outputs [get]
 A modifiable collection of MediaSocket objects which describe the output data of the Blocks.

Detailed Description

Provides functionality for audio and video encoding, decoding and transforming.

See also
Transcoder

Member Function Documentation

◆ Close()

void Close ( )
abstract

Closes the Block.

When closed it can neither accept, nor deliver data.

◆ EndOfStream()

bool EndOfStream ( int inputIndex)
abstract

Tells the Block that there's no more data for the specified input socket.

Parameters
inputIndexSpecifies the index of the input socket for which there's no more data.
Returns
true if the operation is sucessfull; otherwise false.

◆ Flush()

bool Flush ( )
abstract

Flushes the data buffered in the Block to the output.

Returns
true if the buffered data is sucessfully flushed; otherwise false.

◆ Open()

bool Open ( )
abstract

Initializes the Block based on the specified input and desired output.

Returns
true if the Block is sucessfully initialized and is ready to process data; otherwise false.

◆ Pull()

bool Pull ( out int outputIndex,
MediaSample outputSample )
abstract

Pulls output data from the Block.

Parameters
outputIndexReturns the index of the output socket to which the data belongs.
outputSampleThe MediaSample object receives the output data in the MediaBuffer property.
Returns
true if the Block has successfully generated output, otherwise false.

◆ PullUnmanaged()

bool PullUnmanaged ( out int outputIndex,
MediaSample outputSample )
abstract

Pulls output data from the Block.

Parameters
outputIndexReturns the index of the output socket to which the data belongs.
outputSampleThe MediaSample object receives the output data in the UnmanagedMediaBuffer property.
Returns
true if the Block has successfully generated output, otherwise false.

◆ Push()

bool Push ( int inputIndex,
MediaSample inputSample )
abstract

Pushes input data to the Blocks.

Parameters
inputIndexSpecifies the index of the input socket whose data is pushed to the Block.
inputSampleA MediaSample object that contains the input data in the MediaBuffer property.
Returns
true when the Block has successfully processed the input data, otherwise false.

◆ PushUnmanaged()

bool PushUnmanaged ( int inputIndex,
MediaSample inputSample )
abstract

Pushes input data to the Block.

Parameters
inputIndexSpecifies the index of the input socket whose data is pushed to the Block.
inputSampleA MediaSample object that contains the input data in the UnmanagedMediaBuffer property.
Returns
true when the Block has successfully processed the input data, otherwise false.