CE interface SPI



VISA_Handle VISA_create (Engine_Handle engine, String name, IALG_Params *params, size_t msgSize, String type)
 Create a new instance of an algorithm.
Void VISA_delete (VISA_Handle visa)
 Delete an instance of an algorithm.
VISA_Handle VISA_create2 (Engine_Handle engine, String name, IALG_Params *params, Int paramsSize, size_t msgSize, String type)
 Create a new instance of an algorithm.
Void VISA_enter (VISA_Handle visa)
 Enter an algorithm's critical section. This must be called before any of the algorithm's IALG_Fxns are invoked.
Void VISA_exit (VISA_Handle visa)
 Leave an algorithm's critical section. This must be called after the API has completed calling an algorithm's IALG_Fxns.
Ptr VISA_getAlgHandle (VISA_Handle visa)
 Obtains an algorithm's handle. This is the handle required to be passed to the algorithm's IALG_Fxns.
Ptr VISA_getAlgorithmHandle (VISA_Handle visa)
 Obtains an algorithm's handle. If the algorithm is local, this is the handle that can be passed to Algorithm APIs, not to the IALG_Fxns.
IALG_FxnsVISA_getAlgFxns (VISA_Handle visa)
 Get implementation functions for this algorithm.

Detailed Description

Codec Engine System Programming Interface (SPI) for class interface implementors.


Function Documentation

VISA_Handle VISA_create ( Engine_Handle  engine,
String  name,
IALG_Params params,
size_t  msgSize,
String  type 
)

Create a new instance of an algorithm.

Parameters:
[in] engine Handle to an engine in which the algorithm has been configured.
[in] name Name of the algorithm to create. name is specified in the engine configuration.
[in] params Creation parameters.
[in] msgSize Size of the message which will be allocated in the event that this algorithm is configured to run remotely.
[in] type String name of the "type" of algorithm.
Return values:
NULL General failure.
non-NULL Handle to an algorithm instance.
Remarks:
type must match the package/module name of the interface which the algorithm implements. For example, the VISA interface shipped with CE to support xDM video decoders is named "ti.sdo.ce.video.IVIDDEC". That is, the module IVIDDEC is in the package "ti.sdo.ce.video". You will, by definition, find a file named IVIDDEC.xdc in the ti.sdo.ce.video package.
When calling VISA_create(), a string comparison is done between the type parameter and the actual name of the module (described in the previous paragraph). If these strings don't match exactly, VISA_create() will fail.
See also:
VISA_delete()
Void VISA_delete ( VISA_Handle  visa  ) 

Delete an instance of an algorithm.

Parameters:
[in] visa Handle to an algorithm instance to delete.
See also:
VISA_create()
VISA_Handle VISA_create2 ( Engine_Handle  engine,
String  name,
IALG_Params params,
Int  paramsSize,
size_t  msgSize,
String  type 
)

Create a new instance of an algorithm.

Parameters:
[in] engine Handle to an engine in which the algorithm has been configured.
[in] name Name of the algorithm to create. name is specified in the engine configuration.
[in] params Creation parameters.
[in] paramsSize Size of params.
[in] msgSize Size of the message which will be allocated in the event that this algorithm is configured to run remotely.
[in] type String name of the "type" of algorithm.
Return values:
NULL General failure.
non-NULL Handle to an algorithm instance.
Remarks:
type must match the package/module name of the interface which the algorithm implements. For example, the VISA interface shipped with CE to support xDM video decoders is named "ti.sdo.ce.video.IVIDDEC". That is, the module IVIDDEC is in the package "ti.sdo.ce.video". You will, by definition, find a file named IVIDDEC.xdc in the ti.sdo.ce.video package.
When calling VISA_create2(), a string comparison is done between the type parameter and the actual name of the module (described in the previous paragraph). If these strings don't match exactly, VISA_create2() will fail.
VISA_create() is the preferred method to create algorithms. VISA_create2() is provided to enable creation of algorithms which violate the xDAIS spec and do not have a size field of type "Int" as the first field of params.
See also:
VISA_create()
VISA_delete()
Void VISA_enter ( VISA_Handle  visa  ) 

Enter an algorithm's critical section. This must be called before any of the algorithm's IALG_Fxns are invoked.

Parameters:
[in] visa Handle to an algorithm instance.
Remarks:
This is typically called by an algorithm class' application API.
This call has the same semantics as IALG's activate fxn.
See also:
VISA_exit()
Void VISA_exit ( VISA_Handle  visa  ) 

Leave an algorithm's critical section. This must be called after the API has completed calling an algorithm's IALG_Fxns.

Parameters:
[in] visa Handle to an algorithm instance.
Remarks:
This call has the same semantics as IALG's de-activate fxn.
See also:
VISA_enter()
Ptr VISA_getAlgHandle ( VISA_Handle  visa  ) 

Obtains an algorithm's handle. This is the handle required to be passed to the algorithm's IALG_Fxns.

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
NULL General system error
non-NULL The remote algorithm's message.
Remarks:
This is typically called by an algorithm class' application API.
See also:
VISA_getAlgFxns()
Ptr VISA_getAlgorithmHandle ( VISA_Handle  visa  ) 

Obtains an algorithm's handle. If the algorithm is local, this is the handle that can be passed to Algorithm APIs, not to the IALG_Fxns.

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
NULL General system error
non-NULL The Algorithm handle.
Remarks:
This is used internally.
See also:
VISA_getAlgHandle()
IALG_Fxns* VISA_getAlgFxns ( VISA_Handle  visa  ) 

Get implementation functions for this algorithm.

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
NULL An error has occurred.
non-NULL The algorithm's IALG_Fxns.
Remarks:
This is typically called by an algorithm class' application API.
Both local and remote implementations return a non-NULL pointer. However, the IALG_Fxns functions may be NULL.
In the case of a local algorithm, the algorithm's IALG_Fxns returned. In the case of a remote algorithm, its stubs are returned. In either case, the handle passed as the first arg to the IALG_Fxns must be the value returned by VISA_getAlgHandle().
See also:
VISA_getAlgHandle()
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated