BLT_Decoder Class


Data Structures

struct  BLT_DecoderStatus
 Represents the current status of a BLT_Decoder object. More...

Defines

#define BLT_DECODER_DEFAULT_OUTPUT_NAME   "!default"

Typedefs

typedef struct
BLT_Decoder 
BLT_Decoder
 BLT_Decoder object.

Enumerations

enum  BLT_PropertyScope {
  BLT_PROPERTY_SCOPE_CORE,
  BLT_PROPERTY_SCOPE_STREAM,
  BLT_PROPERTY_SCOPE_MODULE
}
 Property scopes represent the scope of a property. More...

Functions

BLT_Result BLT_Decoder_Create (BLT_Decoder **decoder)
 Create a BLT_Decoder object.
BLT_Result BLT_Decoder_Destroy (BLT_Decoder *decoder)
 Destroy a BLT_Decoder object.
BLT_Result BLT_Decoder_RegisterBuiltins (BLT_Decoder *decoder)
 Register all the builtin plugins modules with a BLT_Decoder object.
BLT_Result BLT_Decoder_RegisterModule (BLT_Decoder *decoder, BLT_Module *module)
 Register a specific plugin module with a BLT_Decoder object.
BLT_Result BLT_Decoder_SetInput (BLT_Decoder *decoder, BLT_CString name, BLT_CString type)
 Set a BLT_Decoder object's input.
BLT_Result BLT_Decoder_SetOutput (BLT_Decoder *decoder, BLT_CString name, BLT_CString type)
 Set a BLT_Decoder object's output.
BLT_Result BLT_Decoder_AddNodeByName (BLT_Decoder *decoder, BLT_MediaNode *where, BLT_CString name)
 Add a node to a BLT_Decoder object's stream node graph.
BLT_Result BLT_Decoder_GetProperties (BLT_Decoder *decoder, ATX_Properties **properties)
 Get the ATX_Properties object representing the properties of a BLT_Decoder object.
BLT_Result BLT_Decoder_GetStatus (BLT_Decoder *decoder, BLT_DecoderStatus *status)
 Get the current status of a BLT_Decoder object.
BLT_Result BLT_Decoder_GetStreamProperties (BLT_Decoder *decoder, ATX_Properties **properties)
 Get the ATX_Properties object representing the properties of a BLT_Decoder object's stream.
BLT_Result BLT_Decoder_PumpPacket (BLT_Decoder *decoder)
 Process on media packet through a BLT_Decoder object's stream.
BLT_Result BLT_Decoder_Stop (BLT_Decoder *decoder)
 Tell a BLT_Decoder object that decoding is stopped.
BLT_Result BLT_Decoder_Pause (BLT_Decoder *decoder)
 Tell a BLT_Decoder object that decoding is paused.
BLT_Result BLT_Decoder_SeekToTime (BLT_Decoder *decoder, BLT_UInt32 time)
 Seek to a specific time.
BLT_Result BLT_Decoder_SeekToPosition (BLT_Decoder *decoder, BLT_Size offset, BLT_Size range)
 Seek to a specific position.
BLT_Result BLT_Decoder_SetEventListener (BLT_Decoder *decoder, BLT_EventListener *listener)
 Set a BLT_Decoder object's event listener.

Typedef Documentation

typedef struct BLT_Decoder BLT_Decoder

BLT_Decoder object.

This is the synchronous client API. A decoder creates a core engine, and manages a chain of media nodes including the input and output nodes. It acts as a media data 'pump' getting data from the input, processing it through all the media nodes in the chain, until it reaches the output. The decoder also encapsulates the core functions, such as the registration of plugin modules, etc...


Enumeration Type Documentation

enum BLT_PropertyScope

Property scopes represent the scope of a property.

The scope indicates to what part of the system the property applies.


Function Documentation

BLT_Result BLT_Decoder_AddNodeByName ( BLT_Decoder decoder,
BLT_MediaNode *  where,
BLT_CString  name 
)

Add a node to a BLT_Decoder object's stream node graph.

Parameters:
where Pointer to the node before which the new node will be added. If this parameter is NULL, the node will be added before the output node.
name Name of the node to instantiate and add.

BLT_Result BLT_Decoder_GetStatus ( BLT_Decoder decoder,
BLT_DecoderStatus status 
)

Get the current status of a BLT_Decoder object.

Parameters:
status Pointer to a BLT_DecoderStatus structure where the status will be returned.

BLT_Result BLT_Decoder_GetStreamProperties ( BLT_Decoder decoder,
ATX_Properties **  properties 
)

Get the ATX_Properties object representing the properties of a BLT_Decoder object's stream.

Parameters:
properties Pointer to a pointer where a pointer to an APX_Properties object will be returned. The caller can then call methods of the ATX_Properties object to query stream properties.

BLT_Result BLT_Decoder_Pause ( BLT_Decoder decoder  ) 

Tell a BLT_Decoder object that decoding is paused.

This allows the media nodes in the decoder's graph to release some resources if they need to. There is no special function to call when decoding resumes, as a call to BLT_Decoder_PumpPacket will automatically signal all the media nodes to restart if necessary. The difference between pausing and stopping is that pausing can be resumed without any gaps, whereas stopping may release internal resources and flush decoding buffers, so continuing decoder after a stop may result in an audible gap.

BLT_Result BLT_Decoder_RegisterModule ( BLT_Decoder decoder,
BLT_Module *  module 
)

Register a specific plugin module with a BLT_Decoder object.

Parameters:
module Pointer to a module object to register.

BLT_Result BLT_Decoder_SeekToPosition ( BLT_Decoder decoder,
BLT_Size  offset,
BLT_Size  range 
)

Seek to a specific position.

Parameters:
offset Offset between 0 and range
range Maximum value of offset. The range is an arbitrary scale. For example, if offset=1 and range=2, this means that the decoder should seek to exacly the middle point of the input. Or if offset=25 and range=100, this means that the decoder should seek to the point that is at 25/100 of the total input.

BLT_Result BLT_Decoder_SeekToTime ( BLT_Decoder decoder,
BLT_UInt32  time 
)

Seek to a specific time.

Parameters:
Time to which to seek, in milliseconds.

BLT_Result BLT_Decoder_SetEventListener ( BLT_Decoder decoder,
BLT_EventListener *  listener 
)

Set a BLT_Decoder object's event listener.

The listener object's notification functions will be called when certain events occur.

Parameters:
listener Pointer to the BLT_EventListener object that will be notified of events.

BLT_Result BLT_Decoder_SetInput ( BLT_Decoder decoder,
BLT_CString  name,
BLT_CString  type 
)

Set a BLT_Decoder object's input.

Parameters:
name Name of the input.
type Mime-type of the input, if known, or NULL.

BLT_Result BLT_Decoder_SetOutput ( BLT_Decoder decoder,
BLT_CString  name,
BLT_CString  type 
)

Set a BLT_Decoder object's output.

Parameters:
name Name of the output.
type Mime-type of the output, if known, or NULL.

BLT_Result BLT_Decoder_Stop ( BLT_Decoder decoder  ) 

Tell a BLT_Decoder object that decoding is stopped.

This allows the media nodes in the decoder's graph to release some resources if they need to. There is no special function to call when decoding resumes, as a call to BLT_Decoder_PumpPacket will automatically signal all the media nodes to restart if necessary.