4 MME API. STMicroelectronics Multicom 4
Реклама
Реклама
MME API UM1112
This chapter describes the MME API in terms of its functions, constants, enums and types.
identifies which functions are supported on Linux user space.
Table 6. Support on Linux user space
Functions supported on Linux user space
Functions NOT supported on Linux user space
MME_AbortCommand
MME_AllocDataBuffer
MME_FreeDataBuffer
MME_GetTransformerCabability
MME_GetTuneable
MME_Init
MME_InitTransformer
MME_IsTransformerRegistered
MME_ModifyTuneable
MME_SendCommand
MME_Term
MME_TermTransformer
MME_Version
MME_WaitCommand
MME_DebugFlags
MME_DeregisterMemory
MME_DeregisterTransformer
MME_DeregisterTransport
MME_ErrorStr
MME_NotifyHost
MME_PingTransformer
MME_RegisterMemory
MME_RegisterTransformer
MME_RegisterTransport
MME_Run
50/224 8182595 Rev 5
UM1112 MME API
This section provides detailed descriptions of the MME functions. The functions are listed in alphabetical order.
MME_AbortCommand
Definition:
Abort command submitted to transformer
#include <mme.h>
MME_ERROR MME_AbortCommand(
MME_TransformerHandle_t Handle,
Arguments:
Handle
CmdId
Handle of the targeted transformer.
Command identity of the command to abort.
Returns:
Description:
Comments:
MME_SUCCESS
MME_INVALID_ARGUMENT
An abort request has been submitted - this does not imply the command has been aborted.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_INVALID_HANDLE
The transformer handle is invalid.
The CmdId is invalid.
Attempt to abort a command that has been submitted to a transformer.
The behavior of this function is transformer and implementation specific. Commands can always be aborted when in the MME_COMMAND_PENDING state, that is before being processed. However, depending on their implementation some transformers may also accept to abort command during their processing
(MME_COMMAND_EXECUTING state). When a command has been aborted, the Error
field of the MME_CommandStatus_t is set to MME_COMMAND_ABORTED. The
callback function on the host is called when the command is successfully aborted.
Call type: non-blocking function call (the operation completes when the callback function has been called).
8182595 Rev 5 51/224
109
MME API UM1112
MME_AllocDataBuffer
Definition:
#include <mme.h>
MME_ERROR MME_AllocDataBuffer(
MME_TransformerHandle_t Handle,
MME_UINT Size,
MME_AllocationFlags_t Flags,
MME_DataBuffer_t **DataBuffer_p)
Arguments:
Handle
Size
Flags
DataBuffer_p
Allocate MME data buffer
Handle of the targeted transformer.
Number of bytes to allocate.
Specify special requirements of the memory allocated, see
MME_AllocationFlags_t on page 80
Pointer to a pointer to an allocated data buffer structure to be populated.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The operation completed correctly.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_NOMEM
The memory required to complete this command is not available.
MME_INVALID_HANDLE
MME_INVALID_ARGUMENT
The transformer handle is invalid.
Flags
or DataBuffer_p is invalid.
Allocate a new MME data buffer.
This command allocates memory that can be optimally communicated to the transformer indicated by Handle. Flags can be used to specify additional useful properties required of the allocated memory. For example, its cache ability or whether it is required to be contiguous.
Call type: blocking function call.
52/224 8182595 Rev 5
UM1112 MME API
MME_DebugFlags
Definition:
Set MME debug logging flags
#include <mme.h>
MME_ERROR MME_DebugFlags
(MME_DBG_FLAGS Flags)
Arguments:
Flags
Bitmask of debugging flags. See
.
Returns:
Description:
MME_SUCCESS
The debug flags were successfully set.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_ICS_ERROR
An ICS subsystem error occurred.
Sets the MME debugging flags to the supplied bitmask value.
8182595 Rev 5 53/224
109
MME API UM1112
MME_DeregisterMemory
Definition:
Deregister memory region
#include <mme.h>
MME_ERROR MME_DeregisterMemory
(MME_MemoryHandle_t Handle)
Arguments:
Handle
Handle of the memory region registered with
MME_RegisterMemory.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The memory region was successfully deregistered.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_INVALID_HANDLE
MME_ICS_ERROR
The handle does not refer to an existing memory region registration.
An ICS subsystem error occurred.
Deregister a memory region that was previously registered with
MME_RegisterMemory
. specific transformer.
Call type: blocking function call.
54/224 8182595 Rev 5
UM1112 MME API
MME_DeregisterTransformer
Definition:
Deregister transformer
#include <mme.h>
MME_ERROR MME_DeregisterTransformer(const char* name)
Arguments:
name
The name of a transformer that has been registered with
MME_RegisterTransformer()
.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The transformer has been successfully deregistered.
MME_INVALID_ARGUMENT
The transformer name is not registered.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
Deregister a transformer, that was previously registered on the CPU, from which the call is made.
Call type: blocking function call.
Section 2.3.3: Example on page 21
8182595 Rev 5 55/224
109
MME API UM1112
MME_ErrorStr
Definition:
Returns an MME error string
#include <mme.h>
const char * MME_ErrorStr (MME_ERROR err)
Arguments:
err
An MME_ERROR error code.
Returns:
Errors:
Context:
Description:
A pointer to the corresponding MME error string.
None
Callable from task and interrupt context. Can be called before MME_Init().
MME_ErrorStr()
returns a pointer to the corresponding MME error string based on the supplied err code. This function is a useful way to display/log a text string describing the MME error code when an error occurs.
err should be a valid MME error code as returned by an MME API function.
56/224 8182595 Rev 5
UM1112 MME API
MME_FreeDataBuffer
Definition:
#include <mme.h>
MME_ERROR MME_FreeDataBuffer(
MME_DataBuffer_t *DataBuffer_p)
Arguments:
DataBuffer_p
Release MME data buffer
Pointer to an allocated data buffer structure to be freed.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The operation completed correctly.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_INVALID_ARGUMENT DataBuffer_p
is invalid.
Release memory previously allocated with MME_AllocDataBuffer().
This command releases memory previously allocated with
MME_AllocDataBuffer()
. The behavior is undefined if the memory was not previously allocated by the MME API or if pointers within the structure have been modified.
Call type: blocking function call.
8182595 Rev 5 57/224
109
MME API UM1112
MME_GetTransformerCapability
Return details of transformer capability
Definition:
#include <mme.h>
MME_ERROR MME_GetTransformerCapability(
const char *TransformerName,
MME_TransformerCapability_t *TransformerCapability_p)
Arguments:
TransformerName
TransformerCapability_p
Name of the transformer whose capability is to be queried.
Pointer to an allocated
structure that will be filled with the capability of the corresponding transformer.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The operation completed correctly.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_UNKNOWN_TRANSFORMER
MME_INVALID_ARGUMENT
MME_NOMIPS
No transformer of the specified name exists.
TransformerCapability_p
is invalid.
CPU low in resources to run transformer.
Return capability and requirement for a given transformer type.
The error code MME_NOMIPS is returned if MME_GetTransformerCapability finds the CPU too low in resources to run the transformer. Additional status information is returned in the AdditionalStatus field of the
MME_TransformerCapability_t
structure, which can be MME_NOMIPS or
MME_NOMEM
.
The following fields of the MME_TransformerCapability_t structure must be initialized prior to calling this function: StructSize, TransformerInfoSize and
TransformerInfo_p
. All subsequent fields will be filled in by MME as a result of the call.
Call type: blocking function call.
58/224 8182595 Rev 5
UM1112 MME API
MME_INDEXED_PARAM
Definition:
Extract indexed parameter
#include <mme.h>
#define MME_INDEXED_PARAM(params, name, index)
Arguments:
params name index
Pointer to a parameter array of type
MME_GenericParams_t
.
Name of the parameter to be extracted from the array.
Index of the parameter to extract.
Returns:
Description:
An lvalue (an object that can be assigned to) whose type is selected by the named parameter.
Extract a indexed named parameter from a parameter array. This macro uses other special purpose macros or named constants to process the name.
For example, the following macros define an indexed parameter name called
ThisIsIndexed
.
See also:
enum {
...
MME_OFFSET_ThisIsIndexed = 2,
...
#define MME_TYPE_ThisIsIndexed U32
}
This parameter can be extracted as follows:
MME_INDEXED_PARAM(params, ThisIsIndexed, 0) = 0xAC3;
MME_INDEXED_PARAM(params, ThisIsIndexed, 1) = 0xDDD;
8182595 Rev 5 59/224
109
MME API
MME_Init
Definition:
Arguments:
Returns:
Description:
See also:
UM1112
Initialize the MME infrastructure
#include <mme.h>
MME_ERROR MME_Init(void)
None
MME_SUCCESS
MME_DRIVER_NOT_INITIALIZED
The operation completed correctly.
The MME driver could not be initialized because underlying resources were not initialized yet.
MME_DRIVER_ALREADY_INITIALIZED MME_Init()
has been called already.
MME_NOMEM
The memory required to complete this command is not available.
Initialize the MME infrastructure. This function must be called prior to calling any other
MME functions. It must be called at least once on each processor and by each Linux user mode process. Once initialized further calls return
MME_DRIVER_ALREADY_INITIALIZED.
60/224 8182595 Rev 5
UM1112 MME API
MME_InitTransformer
Definition:
Initialize an instance of a transformer
#include <mme.h>
MME_ERROR MME_InitTransformer(
const char *Name,
MME_TransformerInitParams_t *Params_p,
MME_TransformerHandle_t *Handle_p)
Arguments:
Name
Params_p
Handle_p
Name of the transformer registered with
MME_RegisterTransformer
.
Pointer to an allocated
that contains the parameters with which the transformer will be initialized.
Pointer to an MME_TransformerHandle_t
that will contain the handle of the initialized transformer.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The device has been successfully initialized.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_NOMEM
The memory required to complete this command is not available.
MME_UNKNOWN_TRANSFORMER
MME_INVALID_ARGUMENT
No transformer of the specified name exists.
Params_p
or Handle_p is invalid.
Creates and initializes an instance of a specific transformer on a CPU.
The name argument must not be longer than MME_MAX_TRANSFORMER_NAME bytes.
The error code MME_INVALID_ARGUMENT will be returned if the name is too long.
The name of the transformer implicitly describes the type of that transformer, for example “STAC3DecoderMacro”. This can be confirmed by using
MME_GetTransformerCapability()
to examine the capability of transformer if required.
If the host has to synchronize with transformer registration on a companion, this function should be called iteratively until MME_SUCCESS is returned.
must be called prior to the MME_InitTransformer function.
Call type: blocking function call.
8182595 Rev 5 61/224
109
MME API UM1112
MME_IsTransformerRegistered
Check whether a transformer is registered
Definition:
#include <mme.h>
MME_ERROR MME_IsTransformerRegistered(
const char *Name)
Arguments:
Name
Name of the transformer. This is checked to determined whether it is registered.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
MME_INVALID_ARGUMENT
A transformer with the specified name is registered.
MME_UNKNOWN_TRANSFORMER
No transformer of the specified name exists.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
Name pointer name is invalid.
Checks that a specified transformer is registered.
The name argument must not be longer than MME_MAX_TRANSFORMER_NAME bytes.
The error code MME_UNKNOWN_ARGUMENT will be returned if the name is too long.
Call type: blocking function call.
62/224 8182595 Rev 5
UM1112 MME API
MME_LENGTH
Definition:
#include <mme.h>
#define MME_LENGTH(name)
Arguments:
name
Return the length of a parameter array
Name of the parameter array.
Returns:
Description:
The length of the named parameter array.
Find the length of a named parameter array.
This macro uses other special purpose macros to process the name.
For example, the following macros define a parameter name called
ThisIsAGlobalName
.
#define MME_PARAMS_LENGTH_ThreeParameters 3
The macro should be used as follows:
MME_GenericParams_t params[MME_LENGTH(ThreeParameters)];
See also:
MME_PARAMS(params, ParamOne) = 1;
MME_PARAMS(params, ParamTwo) = 2;
MME_PARAMS(params, ParamThree) = 3;
8182595 Rev 5 63/224
109
MME API UM1112
MME_LENGTH_BYTES
Definition:
Return the length of a parameter array in bytes
#include <mme.h>
#define MME_LENGTH_BYTES(name)
Arguments:
name
Name of the parameter array.
Description:
Returns:
See also:
Find the length of a named parameter array in bytes.
The length of the named parameter array in bytes.
64/224 8182595 Rev 5
UM1112 MME API
MME_ModifyTuneable
Definition:
Modify system-wide configuration values
#include <mme.h>
MME_ERROR MME_ModifyTuneable(MME_tunable_t key,
MME_UNIT value)
Arguments:
key value
Specify the tuneable value to be modified.
The new value for the tuneable.
Returns:
Description:
MME_INVALID_ARGUMENT
MME_SUCCESS
The supplied key is invalid or not support on this operating system.
The tuneable has been successful updated.
Modify tuneable system-wide configuration values. MME uses sensible default values for parameters such as thread priority, however, some users need to tune such values to optimize thread interactions. Many values have been made tuneable to allow users to modify their systems without recompiling MME. This call alters a single tuneable
parameter selected by key, which can be one of the values in
Value
(1)
Table 7. Tuneable values for MME parameters
Description
MME_TUNEABLE_BUFFER_POOL_SIZE
MME_TUNEABLE_MANAGER_THREAD_
PRIORITY
MME_TUNEABLE_TRANSFORMER_TIMEOUT
MME_TUNEABLE_TRANSFORMER_THREAD_
PRIORITY
Modify the default size of the MME data buffer pool as used by
MME_AllocDataBuffer
.
Tune the priority of the MME manager thread. This thread is responsible for administrative operations such as responding to:
MME_GetTransformerCapability and
MME_InitTransformer
.
This should have a high priority to prevent background batch processes (such as audio encode) from interfering with transformer creation.
Timeout period in milliseconds before a transformer administration operation returns an error.
Tune the priority of the MME transformer thread. This thread is responsible for receiving MME_SEND_BUFFERS commands, together with requests to abort the current function or terminate the transformer.
This should have a priority greater than or equal to the highest execution loop priority.
8182595 Rev 5 65/224
109
MME API UM1112
Value
(1)
Table 7. Tuneable values for MME parameters (continued)
Description
MME_TUNEABLE_EXECUTION_LOOP_HIGHEST
_PRIORITY
MME_TUNEABLE_EXECUTION_LOOP_ABOVE_
NORNAL_PRIORITY
MME_TUNEABLE_EXECUTION_LOOP_NORNAL_
PRIORITY
MME_TUNEABLE_EXECUTION_LOOP_BELOW_
NORNAL_PRIORITY
MME_TUNEABLE_EXECUTION_LOOP_LOWEST_
PRIORITY
Tune the priority of each of the execution loop threads. The execution loops are responsible for performing transform requests and altering global parameters. No execution loop should have a higher priority than the manager or transformer threads.
The priorities of the execution loops should be such that
MME_TUNEABLE_EXECUTION_LOOP_
HIGHEST_PRIORITY
has the highest priority and
MME_TUNEABLE_EXECUTION_LOOP_
LOWEST_PRIORITY
has the lowest.
1. Value interpreted as an OS priority level)
Unlike most MME calls it is possible to modify tuneables before the MME API has been initialized.
Note: Most tuneables do not affect behavior once MME has been initialized and hence they should modified before calling MME_Init.
66/224 8182595 Rev 5
UM1112 MME API
MME_NotifyHost
Definition:
Notify host that transformer has generated an event
#include <mme.h>
MME_ERROR MME_NotifyHost(MME_Event_t event,
MME_Command_t *commandInfo,
MME_ERROR errorCode)
Arguments:
event commandInfo errorCode
The event that should be passed to the host callback. See MME_NotifyHost description.
The MME_Command_t* passed into the transformer function
MME_ProcessCommand_t
.
The error state of the command.
Returns:
Description:
Comments:
MME_SUCCESS
MME_INVALID_ARGUMENT
The host has been notified.
An argument is invalid.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
Informs the host that the transformer has generated an event.
This function must not be called from an interrupt handler.
The event argument can be one of the events listed in
This call will cause the application-supplied callback function on the host to be called with the its event parameter set to the value of event.
Call type: non-blocking function call.
8182595 Rev 5 67/224
109
MME API UM1112
MME_PARAM
Definition:
#include <mme.h>
#define MME_PARAM(params, name)
Arguments:
params name
Extract named parameter
Pointer to a parameter array of type
MME_GenericParams_t
.
Name of the parameter to be extracted from the array.
Returns:
Description:
An lvalue (an object that can be assigned to) whose type is selected by the named parameter.
Extract a named parameter from a parameter array.
This macros uses other special purpose macros or named constants to process the name.
For example, the following macros define a parameter name called
ThisIsAGlobalName
.
See also:
enum {
...
MME_OFFSET_ThisIsAGlobalName = 2,
...
#define MME_TYPE_ThisIsAGlobalName U32
}
This parameter can be extracted as follows:
MME_PARAM(params, ThisIsAGlobalName) = 0xAC3; printf(“%d\n”, MME_PARAM(params, ThisIsAGlobalName));
68/224 8182595 Rev 5
UM1112 MME API
MME_PARAM_SUBLIST
Definition:
Extract named parameter sub-array
#include <mme.h>
#define MME_PARAM_SUBLIST(params, name)
Arguments:
params name
Pointer to a parameter array of type
MME_GenericParams_t
.
Name of the parameter to be extracted from the array.
Returns:
Description:
A pointer to a sub-list of parameters (has type MME_GenericParams_t).
Extract a named parameter sub-array from a parameter array.
This macro uses other special purpose macros or named constants to process the name.
For example, the following macros define a parameter name called
ThisIsASublist
.
Returns:
See also:
enum {
...
MME_OFFSET_ThisIsASublist = 2,
...
}
This parameter can be extracted as follows: sublist = MME_PARAM_SUBLIST(params, ThisIsASublist);
MME_PARAM(sublist, SomeParameter) = 0xAC3;
A pointer to a sub-list of parameters (has type MME_GenericParams_t).
8182595 Rev 5 69/224
109
MME API UM1112
MME_PingTransformer
Definition:
Check that a transformer is still responding
#include <mme.h>
MME_ERROR MME_PingTransformer(
MME_TransformerHandle_t Handle,
MME_Time_t Timeout)
Arguments:
Handle
Timeout
Handle of the targeted transformer.
Timeout period in milliseconds.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The ping request was successfully responded to by the target transformer.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_NOMEM
MME_INVALID_HANDLE
MME_COMMAND_TIMEOUT
The memory required to complete this command is not available.
The handle does not refer to an existing transformer
The ping request was not responded to by the remote transformer within the specified timeout period.
Send a ‘ping’ command request to a specific transformer. This acts like a very high priority command to the target transformer and hence, should be processed as the very next command the transformer executes. If the command has not responded within the specified timeout then MME_COMMAND_TIMEOUT is returned. The Timeout value should be carefully chosen so it does not produce false failures due to the target transformer or CPU simply taking too long to respond.
Call type: blocking function call.
70/224 8182595 Rev 5
UM1112 MME API
MME_RegisterMemory
Register memory region with a specific transformer
Definition:
#include <mme.h>
MME_ERROR MME_RegisterMemory (MME_TransformerHandle_t Handle,
void *Base,
MME_SIZE Size,
MME_MemoryHandle_t *Handle_p)
Arguments:
Handle
Base
Size
Handle_p
Handle of the transformer to associate with this memory registration.
Virtual address of the base of the memory region being registered.
Size in bytes of the memory region being registered.
Pointer to an MME_MemoryHandle_t that will contain the handle of the registered memory region.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The memory region was successfully registered.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_INVALID_HANDLE
MME_INVALID_ARGUMENT
MME_ICS_ERROR
The handle does not refer to an existing transformer
One or more of the supplied arguments are invalid.
An ICS subsystem error occurred.
Register a memory region with a specific transformer. This must be done for all
(a) memory regions that are used as data buffers to MME_SendCommand.
If cached and uncached translation of the physical memory region are to be used, then the region must be registered with both its cached and uncached virtual addresses.
Base
and Size are automatically aligned and rounded to the associated system page size.
Call type: blocking function call.
a. This does not apply to data buffers allocated using MME_AllocDataBuffer.
8182595 Rev 5 71/224
109
MME API UM1112
MME_RegisterTransformer
Register a transformer for instantiation on a CPU
Definition:
#include <mme.h>
MME_ERROR MME_RegisterTransformer(
const char *name,
MME_AbortCommand_t abortFunc,
MME_GetTransformerCapability_t getTransformerCapabilityFunc,
MME_InitTransformer_t initTransformerFunc,
MME_ProcessCommand_t processCommandFunc,
MME_TermTransformer_t termTransformerFunc)
Arguments:
name abort
A unique name for the transformer.
The transformer function to call when an abort request is made.
getTransformerCapabilityFunc initTransformerFunc processCommandFunc termTransformerFunc
The transformer function to call when a capability request is made.
The transformer function to call when a transformer is initialized.
The function to call when a command is sent to the transformer.
The function to call when a transformer instance is terminated.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The device has been successfully initialized.
Registers a transformer for later instantiation on the CPU from which this call is made.
The name argument must not be longer than MME_MAX_TRANSFORMER_NAME bytes.
The error code MME_INVALID_ARGUMENT will be returned if the name is too long.
The name of the transformer implicitly describes the type of that transformer, for example ‘com.st.dvd.acc.Ac3DecoderMacro’. This can be confirmed by using
MME_GetTransformerCapability()
to examine the capability of transformer if required.
Call type: blocking function call.
72/224 8182595 Rev 5
UM1112 MME API
MME_SendCommand
Definition:
Send a command to a specific transformer
#include <mme.h>
MME_ERROR MME_SendCommand(
MME_TransformerHandle_t Handle,
MME_Command_t *CmdInfo_p)
Arguments:
Handle
CmdInfo_p
Handle of the targeted transformer.
Pointer to an allocated structure that contains the parameters of the command.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
The command has been successfully inserted in the command queue waiting to be processed by MME.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_NOMEM
The memory required to complete this command is not available.
MME_INVALID_HANDLE
MME_INVALID_ARGUMENT
The handle does not refer to an existing transformer
CmdInfo_p
is invalid.
Send a command and its associated parameters to a specific transformer. The command’s parameters are passed using the structure MME_Command_t. This in turn uses a number of sub-structures to describe specific parameters.
When inserted the MME_CommandState_t of the command is set to
MME_COMMAND_PENDING
.
Call type: non blocking function call.
8182595 Rev 5 73/224
109
MME API UM1112
MME_Term
Definition:
Arguments:
Returns:
#include <mme.h>
MME_ERROR MME_Term(void)
None
Description:
Comments:
See also:
Terminate a connection with MME
MME_SUCCESS
MME_DRIVER_NOT_INITIALIZED
The operation complete correctly.
The MME driver has not been initialized.
MME_HANDLES_STILL_OPEN
Could not terminate, not all transformers have been terminated.
MME_COMMAND_STILL_EXECUTING Could not terminate due to locally registered transformer instantiations still being active.
Terminate a connection with a MME.
Free all the associated memory space.
Call type: blocking function call.
74/224 8182595 Rev 5
UM1112 MME API
MME_TermTransformer
Definition:
Terminate a transformer instance
#include <mme.h>
MME_ERROR MME_TermTransformer(MME_TransformerHandle_t handle)
Arguments:
handle
Handle of the transformer to terminate.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
MME_DRIVER_NOT_INITIALIZED
MME_INVALID_HANDLE
MME_COMMAND_STILL_EXECUTING
The operation complete correctly.
MME has not been initialized.
Invalid transformer handle.
A command is still executing.
Terminate a transformer instance and free all the associated resources.
A transformer can not be terminated while a command is executing.
Call type: blocking function call.
8182595 Rev 5 75/224
109
MME API UM1112
MME_WaitCommand
Definition:
Block waiting for command completion
#include <mme.h>
MME_ERROR MME_WaitCommand (MME_TransformerHandle_t Handle,
MME_CommandId_t CmdId,
MME_Event_t *Event_p,
MME_Time_t Timeout)
Arguments:
Handle
CmdId
Event_p
Timeout
Handle of the associated transformer.
Command identity of the command to wait for.
Pointer to an MME_Event_t to return associated event type in.
Timeout period in milliseconds or
MME_TIMEOUT_INFINITE
.
Returns:
Description:
MME_SUCCESS
The command was successfully waited for.
MME_DRIVER_NOT_INITIALIZED
The MME driver has not been initialized.
MME_INVALID_HANDLE
MME_INVALID_ARGUMENT
The handle does not refer to an existing transformer, or the supplied CmdId is invalid.
One or more of the supplied arguments are invalid.
MME_COMMAND_TIMEOUT
MME_SYSTEM_INTERRUPT
MME_ICS_ERROR
The command did not complete before the
Timeout
period expired, this might be due to the CPU hosting the transformer crashing or failing to respond.
The wait operation was interrupted.
An ICS subsystem error occurred.
MME_DATA_UNDERFLOW
MME_DATA_OVERFLOW
A data underflow event occurred.
A data overflow event occurred.
MME_TRANSFORMER_TIMEOUT The command has been timed out due to
MME_WaitCommand
can be used to block waiting for a command to complete that has been issued with MME_SendCommand, and given the MME_CommandEndType_t
CmdEnd
value of MME_COMMAND_END_RETURN_WAKE (passed in using
MME_Command_t
).
On successful completion of MME_WaitCommand, MME_SUCCESS is returned and the associated event type is updated through Event_p. For a normal completion this is set to MME_COMMAND_COMPLETED_EVT. Once a MME_WaitCommand has completed successfully it is invalid to issue a subsequent MME_WaitCommand using the same
CmdId
.
It is also possible for MME_WaitCommand to return MME_DATA_UNDERFLOW or
MME_DATA_OVERFLOW
status values. In this case the event is set to
MME_DATA_UNDERFLOW_EVT
or MME_NOT_ENOUGH_MEMORY_EVT respectively.
76/224 8182595 Rev 5
UM1112
Comments:
See also:
MME API
When such an error occurs the driver should respond as appropriate to the error condition, it can then subsequently call MME_WaitCommand on the same CmdId.
If the command does not complete before the specified timeout then
MME_COMMAND_TIMEOUT is returned. This error code is also returned if the CPU hosting the transformer fails. The event completion code is set to
MME_TRANSFORMER_TIMEOUT
.
Setting the Timeout parameter to MME_TIMEOUT_INFINITE causes
MME_WaitCommand
to block indefinitely for command completion. However, it returns MME_COMMAND_TIMEOUT, if the command is executing on a CPU that is determined to have failed.
Call type: blocking function call.
8182595 Rev 5 77/224
109
MME API UM1112
MME_Version
Definition:
Query the MME system version string
#include <mme.h>
const char MME_Version (void)
Arguments:
Returns:
Errors:
Context:
Description:
None.
A pointer to the MME version string.
None.
Callable from task and interrupt context. Can be called before MME_Init.
Return a pointer to the MME version string.
This string takes the form:
{major number}.{minor number}.{patch number} : [text]
That is, a major, minor and release number, separated by decimal points, and optionally followed by a colon and a text string.
78/224 8182595 Rev 5
UM1112 MME API
4.2 MME constants, enums and types
MME_AbortCommand_t
Definition:
#include <mme.h>
MME_ERROR (*MME_AbortCommand_t) (
void *context,
MME_CommandId_t commandId)
Arguments:
context commandId
Abort a transform command
Transformer context data.
The command identifier.
Returns:
Description:
MME_SUCCESS
MME_INVALID_ARGUMENT
MME_INVALID_COMMAND
Success.
An invalid commandId parameter has been specified.
The transformer is active and cannot be aborted.
Abort a transform command.
This function will be called when an abort command request is made on the host and the command has been submitted to the transformer. The behavior is transformerspecific; transformers that do not support command aborting must return
MME_INVALID_COMMAND.
8182595 Rev 5 79/224
109
MME API UM1112
MME_AllocationFlags_t
Definition:
Describes properties of allocated memory
#include <mme.h>
typedef enum
{
MME_ALLOCATION_PHYSICAL,
MME_ALLOCATION_CACHED,
MME_ALLOCTION_UNCACHED
} MME_AllocationFlags_t;
Description:
Flags to describe the memory properties of allocated memory.
Flags may be ‘or-ed’ together to obtain sensible combinations of allocation properties.
In general the use of MME_ALLOCTION_UNCACHED should be used with caution since it is potentially harmful to performance. Its use should be limited to applications where the underlying MME data buffer is used outside of the MME interface by cache incoherent hardware. Even in this case it is preferable to use cached memory and manage the caches if the host performs any reads or writes to the data buffer.
Fields:
MME_ALLOCATION_PHYSICAL
MME_ALLOCATION_CACHED
MME_ALLOCATION_UNCACHED
Require the allocated memory to be contiguous within its physical address space.
Require the allocated memory to be accessed through the cache on the host processor.
Require the allocated memory to be accessed directly by the host processor.
See also:
80/224 8182595 Rev 5
UM1112 MME API
MME_Command_t
Definition:
Description:
Defines the parameters of the command sent to a transformer as a number of sub-structures
#include <mme.h>
typedef struct
{
MME_CommandEndType_t CmdEnd;
MME_Time_t DueTime;
MME_DataBuffer_t **DataBuffers_p;
MME_CommandStatus_t CmdStatus;
MME_GenericParams_t Param_p;
} MME_Command_t;
Defines the parameters of the command passed to the MME_SendCommand function.
While the command is in progress the master copy of all data structures passed by pointer is owned by the companion which may not be cache coherent with the host processor. As such writes to any data structure are illegal and reads from output buffers should be avoided.
Fields:
StructSize
CmdCode
CmdEnd
DueTime
NumberInputBuffers
NumberOutputBuffers
DataBuffers_p
Size of the structure (in bytes).
Command to be performed.
Command mode completion. Specify whether or not an event shall be generated when the command
completes. (refer to MME_CommandEndType_t
definition).
Time before the command has to be completed by the MME.
Number of read only buffers to be supplied to the transformer.
Number of read/write buffers to be supplied to the transformer. Note that overuse of output buffers, leads to poor cache utilization due to excess cache purging.
Pointer to an array of pointers to data buffers containing all the input buffers followed by all the output buffers. As such the length of the array is equal to or greater than NumberInputBuffers +
NumberOutputBuffers
.
8182595 Rev 5 81/224
109
MME API
See also:
UM1112
CmdStatus
ParamSize
Param_p
An MME_CommandStatus_t structure that will
evolve during the processing of the command. Fields of this structure will be filled by MME on either the host or the companion (refer to
definition).
Size in bytes of the associated parameter array, typically obtained using MME_LENGTH_BYTES().
Pointer to an allocated parameter array that contains information required to perform the requested operation.
82/224 8182595 Rev 5
UM1112 MME API
MME_CommandCode_t
Definition:
Constant used by MME_Command_t
- defines command code
#include <mme.h>
typedef enum
{
MME_SET_GLOBAL_TRANSFORM_PARAMS,
MME_TRANSFORM,
MME_SEND_BUFFERS
Description:
Defines the code of the command to be executed onto the MME.
The MME_SET_GLOBAL_TRANSFORM_PARAMS is defined in order to limit communication between host and companion by setting common parameters that will be shared by the next transformations. This command code is to be called only when those common parameters change and to send changes to the companion.
Parameters which are transformation specific should be part of the parameters of the
MME_TRANSFORM
command.
Fields:
MME_SET_GLOBAL_TRANSFORM_PARAMS
MME_TRANSFORM
MME_SEND_BUFFERS
Set “generic” parameters for a specific transformer for subsequent transform requests. Those parameters will be used by the transformer until parameters are changed by another call to set generic parameters.
Commence a transform operation, that is process data according to the current context and the parameters associated with the command.
Provide input and/or output buffers.
See also:
8182595 Rev 5 83/224
109
MME API UM1112
MME_CommandEndType_t
Definition:
Description:
Fields:
Constant used by MME_Command_t
- defines completion behavior of command
#include <mme.h>
typedef enum
{
MME_COMMAND_END_RETURN_NO_INFO,
MME_COMMAND_END_RETURN_NOTIFY,
MME_COMMAND_END_RETURN_WAKE
Defines the behavior on the completion of a MME_SendCommand command.
MME_COMMAND_END_RETURN_NO_INFO
No event will be generated when the command
completes. But the MME_CommandStatus_t
structure passed when calling MME_SendCommand is
filled giving the application the opportunity to retrieve the command status.
See also:
MME_COMMAND_END_RETURN_NOTIFY
An event will be generated when the command completes by calling the callback function passed when the transformer was instantiated.
MME_COMMAND_END_RETURN_WAKE
When the command completes, no callback is issued. Instead the command is signalled to complete any calls of MME_WaitCommand.
84/224 8182595 Rev 5
UM1112 MME API
MME_CommandId_t
Definition:
#include <mme.h>
typedef MME_UINT MME_CommandId_t
Description:
Command identifier
Used to identify a command. This identifier is allocated by MME when a call is made
8182595 Rev 5 85/224
109
MME API UM1112
MME_CommandState_t
Definition:
#include <mme.h>
typedef enum
{
MME_COMMAND_PENDING,
MME_COMMAND_EXECUTING,
MME_COMMAND_COMPLETED,
MME_COMMAND_FAILED
Description:
Defines valid states for a command
Defines the different states a command may have. See
Section 2.7: Issuing commands on page 27
Fields:
MME_COMMAND_PENDING
Command waiting to be processed by the MME.
MME_COMMAND_EXECUTING
The command is the currently executed by the MME.
MME_COMMAND_COMPLETED
The command has been completed by the transformer and results are available for the application.
MME_COMMAND_FAILED
Errors occurred during command processing by the transformer or by MME.
See also:
86/224 8182595 Rev 5
UM1112 MME API
MME_CommandStatus_t
Definition:
Sub-structure to MME_Command_t
- returns transformation results
#include <mme.h>
typedef struct
{
MME_ERROR Error;
MME_GenericParams_t AdditionalInfo_p;
Description:
Structure filled by MME with the results of the corresponding transformation actions performed.
With the exception of the additional parameters all members of the
are populated by the MME as part of MME_SendCommand.
Note: MME_CommandStatus_t is not supplied directly to any MME API call (it forms part of
the definition of MME_Command_t and is therefore not prefixed by a structure size).
Fields AdditionalInfoSize and AdditionalInfo_p are filled by the caller
before calling the MME_SendCommand
function. The data pointed to by
AdditionalInfo_p
is transported bidirectionally - that is, it is sent from the host to the companion when the command is submitted and back from the companion to the host when the command completes.
Field CmdId is filled by the MME_SendCommand function.
Fields ProcessedTime and Error are filled by MME itself. These fields are relevant only when the command has been processed that is when the field State has turned to the MME_COMMAND_COMPLETED or MME_COMMAND_FAILED value.
This structure is owned by the transformer once passed into the
MME_ProcessCommand_t
transformer entry point and the State field may be modified by the transformer to reflect that a transform has been deferred. See
Section 3.4.2: Deferred commands on page 40
.
Fields:
CmdId
State
ProcessedTime
Error
AdditionalInfoSize
AdditionalInfo_p
Unique identifier of the command the structure is related to. This field is filled by the
function.
State of the command.
Time spent processing the command.
Command status as a result of processing.
Size in bytes of the associated parameter array, typically obtained using MME_LENGTH_BYTES().
Pointer to an allocated parameter array where the
MME can store additional info related to the performed transformation (transformer specific).
8182595 Rev 5 87/224
109
MME API
See also:
UM1112
88/224 8182595 Rev 5
UM1112 MME API
MME_DataBuffer_t
Data buffer structure as returned by MME_AllocDataBuffer
Definition:
#include <mme.h>
typedef struct
{
void*UserData_p;
MME_UINT NumberOfScatterPages;
MME_ScatterPage_t*ScatterPages_p;
Description:
Definition of one (possibly scattered) buffer belonging to one stream.
A data buffer consists of a list of one or several scatter pages. Each page describes a contiguous, linear memory block giving the transformer a memory space to work with.
Fields:
StructSize
UserData_p
Flags
StreamNumber
NumberOfScatterPages
ScatterPages_p
TotalSize
StartOffset
Size of the structure (in bytes).
Application specific data to aid data structure lookup from callbacks.
Buffer specific flags.
Identifies the stream to which the buffer belongs.
Number of scatter pages the buffer is composed of
(that is the number of entries of the
Pointer to an array of scatter pages.
Amount of memory available for this buffer, that is, the sum of the memory size of the scatter pages this buffer comprises.
Points to first valid byte in (scattered) buffer.
See also:
8182595 Rev 5 89/224
109
MME API UM1112
MME_DataFormat_t
Definition:
Defines the data format of a transformer’s I/O
#include <mme.h>
typedef struct
{
unsigned char FourCC[4];
Description:
Used to define the format of the data a transformer supports for its input or output.
Refer to
http://www.webartz.com/fourcc/
for a complete description of the FOURCC definition.
Fields:
FourCC
Contains the format defined using its associated Four
Character Code (FOURCC).
90/224 8182595 Rev 5
UM1112 MME API
MME_DBG_FLAGS
Definition:
Describes properties of the debug logging flags
#include <mme.h>
typedef enum mme_debug_flags
{
MME_DBG_ERR = 0x0001,
MME_DBG_INIT = 0x0002,
MME_DBG_MANAGER = 0x0004,
MME_DBG_RECEIVER = 0x0010,
MME_DBG_TRANSFORMER = 0x0020,
MME_DBG_EXEC = 0x0040,
MME_DBG_COMMAND = 0x0100,
MME_DBG_BUFFER = 0x0200,
} MME_DBG_FLAGS;
Description:
MME debugging flags specified as a bitmask value. The valid set of debugging flags are detailed in
Table 8
.
Debug flag
MME_DBG_ERR
MME_DBG_INIT
MME_DBG_MANAGER
MME_DBG_RECEIVER
MME_DBG_TRANSFORMER
MME_DBG_EXEC
MME_DBG_COMMAND
MME_DBG_BUFFER
Table 8. MME debug logging flags
Description
Log all error messages.
Log all initialization actions.
Log all MME administration actions.
Log all transformer receiver actions.
Log all client side transformer actions.
Log all transformer execution loop actions.
Log all transformer command actions.
Log all MME data buffer actions.
See also:
8182595 Rev 5 91/224
109
MME API UM1112
MME_ERROR
Definition:
Status indicator used by all MME functions
#include <mme.h>
typedef enum
{
MME_SUCCESS,
MME_DRIVER_NOT_INITIALIZED,
MME_NOMEM,
MME_INVALID_HANDLE,
MME_INVALID_ARGUMENT,
MME_UNKNOWN_TRANSFORMER,
MME_TRANSFORMER_NOT_RESPONDING,
MME_HANDLES_STILL_OPEN,
MME_COMMAND_STILL_EXECUTING,
MME_COMMAND_ABORTED,
MME_DATA_UNDERFLOW,
MME_DATA_OVERFLOW,
MME_TRANSFORM_DEFERRED,
MME_SYSTEM_INTERRUPT,
MME_ICS_ERROR,
MME_INTERNAL_ERROR,
MME_NOT_IMPLEMENTED,
MME_COMMAND_TIMEOUT
Description:
Status indicator used by all MME functions.
Note: Although MME_SUCCESS is guaranteed to be zero the numeric value of all other error
codes is unspecified. Additionally it is not guaranteed that these values will be contiguous.
Fields:
MME_SUCCESS
Command complete successfully.
MME_DRIVER_NOT_INITIALIZED
MME or some of its underlying infrastructure has not yet been initialized.
MME_DRIVER_ALREADY_INITIALIZED
MME_NOMEM
MME_INVALID_HANDLE
MME has been initialized already.
The system has insufficient resources to complete this request.
The transformer handle is invalid or out of date.
MME_INVALID_ARGUMENT
One or more of the function arguments are invalid (for example: out of range, null pointer, incorrect structure size).
MME_UNKNOWN_TRANSFORMER
The requested transformer does not exist.
MME_INVALID_COMMAND
The command code is invalid.
92/224 8182595 Rev 5
UM1112 MME API
MME_TRANSFORMER_NOT_RESPONDING
The transformer is not responding to requests for status.
MME_HANDLES_STILL_OPEN
The operation cannot complete until all transformer handles have been closed.
MME_COMMAND_STILL_EXECUTING
MME_COMMAND_ABORTED
MME_DATA_UNDERFLOW
The operation cannot complete until the transformer is idle.
The command did not complete because it was explicitly aborted by the user.
Insufficient input data to generate a frame of output.
MME_DATA_OVERFLOW
Output buffers are too small to store the transformed data.
MME_TRANSFORM_DEFERRED
A transform has been placed in the deferred state by a transformer.
MME_ICS_ERROR
MME_INTERNAL_ERROR
ICS underlying MME has reported an error.
There is an internal inconsistency.
MME_NOT_IMPLEMENTED
The function is not implemented.
MME_COMMAND_TIMEOUT An issued command timed out.
8182595 Rev 5 93/224
109
MME API UM1112
MME_Event_t
Definition:
Valid event codes associated with a command
#include <mme.h>
typedef enum
{
MME_COMMAND_COMPLETED_EVT,
MME_DATA_UNDERFLOW_EVT,
MME_NOT_ENOUGH_MEMORY_EVT,
MME_TRANSFORMER_TIMEOUT
Description:
Event codes associated with a command.
Events are delivered to the application by the callback mechanism.
Fields:
MME_COMMAND_COMPLETED_EVT
A command has been completed by MME. The error code in MME_CommandStatus_t describes the state.
MME_DATA_UNDERFLOW_EVT
The transformer has run out of data before completing an output frame. The error code in
MME_CommandStatus_t
will be
MME_DATA_UNDERFLOW
.
See also:
MME_NOT_ENOUGH_MEMORY_EVT
The transformer has insufficient output buffers to output a frame. The error code in
MME_CommandStatus_t
will be
MME_DATA_OVERFLOW
.
MME_TRANSFORMER_TIMEOUT
The command has been timed out due to the CPU hosting the transformer crashing or failing to respond.
94/224 8182595 Rev 5
UM1112 MME API
MME_GenericCallback_t
Definition:
Call mechanism for communication between transformer and host
#include <mme.h>
typedef void (*MME_GenericCallback_t)
MME_Event_t Event,
MME_Command_t *CallbackData,
void *UserData);
Description:
Generic callback mechanism for communication between transformer and host.
Guaranteed not to be called in a re-entrant manner.
Fields:
Event
CallbackData
UserData
Event, associated with either data buffers or command transformations.
Pointer to the command structure related to this command.
Reference to user data, provided with the call to
See also:
8182595 Rev 5 95/224
109
MME API UM1112
MME_GenericParams_t
Definition:
Type for data exchange between CPUs
#include <mme.h>
typedef void* MME_GenericParams_t
Description:
Fields:
See also:
Generic type used to exchange data between host and companion CPUs.
None
96/224 8182595 Rev 5
UM1112 MME API
MME_GetTransformerCapability_t
Definition:
Provide transformer capabilities
#include <mme.h>
MME_ERROR (*MME_GetTransformerCapability_t) (
MME_TransformerCapability_t *capability)
Arguments:
capability
Transformer parameters.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
MME_INVALID_ARGUMENT
Success.
An invalid transformer parameter has been specified.
Provide the capabilities of a transformer.
Call type: blocking function call.
8182595 Rev 5 97/224
109
MME API UM1112
MME_InitTransformer_t
Definition:
Create a transformer instance
#include <mme.h>
MME_ERROR (*MME_InitTransformer_t) (
MME_UINT size,
MME_GenericParams_t params,
void **context)
Arguments:
size params context
Size of the transformer initialization parameters in bytes.
Transformer initialization parameters.
Pointer to a location in which to store a transformer instance-specific value.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
MME_INVALID_ARGUMENT
MME_NOMEM
Success.
An invalid transformer parameter has been specified.
Insufficient memory available.
Create an instance of a transformer. It is called as a result of a host call to
MME_InitTransformer()
The Callback and CallbackUserData fields of the
MME_TransformerInitParams_t
structure are not valid for the transformer.
Call type: blocking function call.
98/224 8182595 Rev 5
UM1112 MME API
MME_MAX_TRANSFORMER_NAME
Definition:
Description:
See also:
Defines maximum length of a transformer name
#include <mme.h>
#define MME_MAX_TRANSFORMER_NAME <const unsigned int>
The maximum length in bytes of a transformer name.
This constant defines the maximum length of the transformer name that may be passed to MME_InitTransformer() and MME_RegisterTransformer().
8182595 Rev 5 99/224
109
MME API UM1112
MME_MemoryHandle_t
Definition:
#include <mme.h>
typedef MME_UINT MME_MemoryHandle_t;
Memory registration handle
Description:
See also:
Handle returned by MME_RegisterMemory.
Used to identify the memory registration for later function calls. The value of zero is invalid.
100/224 8182595 Rev 5
UM1112 MME API
MME_Priority_t
Definition:
#include <mme.h>
typedef enum
{
MME_PRIORITY_HIGHEST,
MME_PRIORITY_ABOVE_NORMAL,
MME_PRIORITY_NORMAL,
MME_PRIORITY_BELOW_NORMAL,
MME_PRIORITY_LOWEST
} MME_Priority_t;
Valid priorities for command execution
Description:
See also:
The priority at which a command should be executed.
8182595 Rev 5 101/224
109
MME API UM1112
MME_ProcessCommand_t
Definition:
Process the transformer command
#include <mme.h>
MME_ERROR (*MME_ProcessCommand_t) (
void *context,
MME_Command_t *commandInfo)
Arguments:
context commandInfo
Transformer context.
Data associated with the command.
Returns:
Description:
Comments:
See also:
MME_SUCCESS
MME_INVALID_HANDLE
MME_INVALID_ARGUMENT
MME_INVALID_COMMAND
MME_NOMEM
MME_NOMEM
MME_DATA_UNDERFLOW
Success.
The handle does not refer to an existing transformer.
The commandInfo argument is invalid.
The command embedded in commandInfo is invalid.
The result of the processing of the input data does not fit in the provided memory space.
The result of the processing of the input data does not fit in the provided memory space.
Returned when MME reaches the end of the input buffer without being able to produce the requested output.
This function performs one of the following operations:
– commence a new transform
– set the transformer parameters
– handle the submission of data buffers
Call type: blocking function call.
Chapter 3: Writing an MME transformer on page 34
.
102/224 8182595 Rev 5
UM1112 MME API
MME_ScatterPage_t
Definition:
#include <mme.h>
typedef struct {
void*Page_p;
Description:
Describe a scatter page
Describe a scatter page, that is a linear memory range within a data buffer.
BytesUsed
is meaningless until the transformation completes. It is filled by the transformer with the number of bytes it wrote into this page while processing data.
The FlagsIn field and FlagsOut fields are used to pass additional information about the scatter page. The FlagsIn field is used to pass state from the host to the transformer. The FlagsOut field is used to pass state from the transformer to the host. Both fields are divided into two regions - the MME region and the application region. The MME region is the upper 8 bits; unused bits in the MME region are reserved and must be set to zero.
The remaining 24 bits are available to the application and transformer, see
MME_ScatterPage_t FlagsIn and FlagsOut on page 26
.
Fields:
Page_p
Size
BytesUsed
FlagsIn
FlagsOut
Address of the memory space.
Size of the page (in bytes).
Number of bytes used in this page.
Combination of generic and transformer specific flags.
Combination of generic and transformer specific flags.
See also:
8182595 Rev 5 103/224
109
MME API UM1112
MME_TermTransformer_t
Definition:
Terminate a transformer instance
#include <mme.h>
MME_ERROR (*MME_TermTransformer_t) (void *context)
Arguments:
context
Context of the transformer.
Returns:
Description:
Comments:
MME_SUCCESS
MME_INVALID_HANDLE
Success.
The handle does not refer to an existing transformer.
MME_COMMAND_STILL_EXECUTING
A command is still executing on the transformer instance.
Terminate an instance of a transformer and free any resources that the instance uses.
Call type: blocking function call.
104/224 8182595 Rev 5
UM1112 MME API
MME_Time_t
Definition:
Type used by MME_Command_t - describes time
#include <mme.h>
Description:
See also:
Describe the time in the MME environment.
8182595 Rev 5 105/224
109
MME API UM1112
MME_TransformerCapability_t
Definition:
Describe transformer capabilities
#include <mme.h>
typedef struct {
MME_GenericParams_tTransformerInfo_p;
MME_UNITAdditionalStatus;
} MME_TransformerCapability_t;
Description:
Note:
Describe the capabilities of a particular transformer.
On multi-processor systems the contents of TransformerInfo_p will only be copied in
one direction (companion to host). For this reason all transformers must treat the data pointed to as uninitialized.
Fields:
StructSize
Version
Size of the structure (in bytes).
Version of the transformer.
InputType
OutputType
TransformerInfoSize
TransformerInfo_p
AdditionalStatus
Supported input type.
Supported output types.
Size in bytes of the associated parameter array, typically obtained using MME_LENGTH_BYTES().
Pointer to an allocated parameter array where the transformer may store specific capabilities of the transformer (transformer specific).
Status about low resource. The transformer may set additional status as MME_NOMIPS or MME_NOMEM.
See also:
106/224 8182595 Rev 5
UM1112 MME API
MME_TransformerHandle_t
Definition:
#include <mme.h>
typedef MME_UINT MME_TransformerHandle_t
Description:
Handle returned by MME_InitTransformer.
Used to identify the transformer for later function calls.
The value of zero is invalid.
See also:
Transformer handle
8182595 Rev 5 107/224
109
MME API UM1112
MME_TransformerInitParams_t
Parameters used to initialize transformer
Definition:
#include <mme.h>
typedef struct {
MME_Priority_t Priority;
MME_GenericCallback_t Callback;
void*CallbackUserData;
MME_UINT TransformerInitParamsSize
MME_GenericParams_t TransformerInitParams_p;
} MME_TransformerInitParams_t;
Description:
Parameters to use to initialize a transformer.
The Callback and CallbackUserData fields of the
MME_TransformerInitParams_t structure are not valid for the transformer.
Fields:
StructSize
Priority
Callback
CallbackUserData
Size of the structure (in bytes).
The transform queue priority.
Function pointer to handle both command and data callbacks.
Anonymous data provided with the callback. Those data will be passed as parameters every time the transformer will call its associated
CallbackUserData
functions.
See also:
TransformerInitParamsSize
Size in bytes of the associated parameter array, typically obtained using MME_LENGTH_BYTES().
TransformerInitParams_p
Pointer to an allocated parameter array that the contains additional parameters if required
(transformer specific).
108/224 8182595 Rev 5
UM1112 MME API
MME_UINT
Definition:
Description:
Type used by MME_Command_t - defines numeric value
#include <mme.h>
typedef unsigned <qualifier> int MME_UINT
Unsigned integer type of at least 32 bits.
On MME implementations that share memory structures directly, the size of this type will be identical on all processors. An MME implementation that copies structures may define this type differently on each processor to maximize efficiency.
8182595 Rev 5 109/224
109
Скачать
Реклама