AVBlocks for .NET  3.0
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

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

Properties

abstract ErrorInfo Error [get]
 The error information for the last block operation.
 
abstract MediaSocketList Inputs [get]
 A modifiable collection of MediaSocket objects which describe the input data of the Block.
 
abstract 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()

abstract void Close ( )
pure virtual

Closes the Block.

When closed it can neither accept, nor deliver data.

Implemented in MediaInfo, and Transcoder.

◆ Dispose()

abstract void Dispose ( )
pure virtual

Disposes the Block and reclaims the resources used by the object.

Implemented in MediaInfo, and Transcoder.

◆ EndOfStream()

abstract bool EndOfStream ( int  inputIndex)
pure virtual

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.

Implemented in MediaInfo, and Transcoder.

◆ Flush()

abstract bool Flush ( )
pure virtual

Flushes the data buffered in the Block to the output.

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

Implemented in MediaInfo, and Transcoder.

◆ Open()

abstract bool Open ( )
pure virtual

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.

Implemented in MediaInfo, and Transcoder.

◆ Pull()

abstract bool Pull ( out int  outputIndex,
MediaSample  outputSample 
)
pure virtual

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.

Implemented in MediaInfo, and Transcoder.

◆ PullUnmanaged()

abstract bool PullUnmanaged ( out int  outputIndex,
MediaSample  outputSample 
)
pure virtual

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.

Implemented in MediaInfo, and Transcoder.

◆ Push()

abstract bool Push ( int  inputIndex,
MediaSample  inputSample 
)
pure virtual

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.

Implemented in MediaInfo, and Transcoder.

◆ PushUnmanaged()

abstract bool PushUnmanaged ( int  inputIndex,
MediaSample  inputSample 
)
pure virtual

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.

Implemented in MediaInfo, and Transcoder.