Tunneling
[OpenMAX IL coreOpenMAX IL component]


Data Structures

struct  OMX_PARAM_BUFFERSUPPLIERTYPE
struct  OMX_TUNNELSETUPTYPE

Functions

OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel (OMX_IN OMX_HANDLETYPE hOutput, OMX_IN OMX_U32 nPortOutput, OMX_IN OMX_HANDLETYPE hInput, OMX_IN OMX_U32 nPortInput)
 the OMX_SetupTunnel standard function

Variables

OMX_ERRORTYPE(* OMX_COMPONENTTYPE::ComponentTunnelRequest )(OMX_IN OMX_HANDLETYPE hComp, OMX_IN OMX_U32 nPort, OMX_IN OMX_HANDLETYPE hTunneledComp, OMX_IN OMX_U32 nTunneledPort, OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup)

Detailed Description

Structures and functions to manage tunnels among component ports

Function Documentation

OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel ( OMX_IN OMX_HANDLETYPE  hOutput,
OMX_IN OMX_U32  nPortOutput,
OMX_IN OMX_HANDLETYPE  hInput,
OMX_IN OMX_U32  nPortInput 
)

the OMX_SetupTunnel standard function

The OMX_SetupTunnel method will handle the necessary calls to the components to setup the specified tunnel the two components. NOTE: This is an actual method (not a define macro). This method will make calls into the component ComponentTunnelRequest method to do the actual tunnel connection.

The ComponentTunnelRequest method on both components will be called. This method shall not be called unless the component is in the OMX_StateLoaded state except when the ports used for the tunnel are disabled. In this case, the component may be in the OMX_StateExecuting, OMX_StatePause, or OMX_StateIdle states.

The core should return from this call within 20 msec.

Parameters:
[in] hOutput Handle of the component to be accessed. Also this is the handle of the component whose port, specified in the nPortOutput parameter will be used the source for the tunnel. This is the component handle returned by the call to the OMX_GetHandle function. There is a requirement that hOutput be the source for the data when tunelling (i.e. nPortOutput is an output port). If 0x0, the component specified in hInput will have it's port specified in nPortInput setup for communication with the application / IL client.
[in] nPortOutput nPortOutput is used to select the source port on component to be used in the tunnel.
[in] hInput This is the component to setup the tunnel with. This is the handle of the component whose port, specified in the nPortInput parameter will be used the destination for the tunnel. This is the component handle returned by the call to the OMX_GetHandle function. There is a requirement that hInput be the destination for the data when tunelling (i.e. nPortInut is an input port). If 0x0, the component specified in hOutput will have it's port specified in nPortPOutput setup for communication with the application / IL client.
[in] nPortInput nPortInput is used to select the destination port on component to be used in the tunnel.
Returns:
OMX_ERRORTYPE If the command successfully executes, the return code will be OMX_NoError. Otherwise the appropriate OMX error will be returned. When OMX_ErrorNotImplemented is returned, one or both components is a non-interop component and does not support tunneling.
On failure, the ports of both components are setup for communication with the application / IL Client.

The implementation of this function is described in the OpenMAX spec

Definition at line 248 of file omxcore.c.

References OMX_COMPONENTTYPE::ComponentTunnelRequest, DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEBUG, err, OMX_TUNNELSETUPTYPE::eSupplier, OMX_TUNNELSETUPTYPE::nTunnelFlags, OMX_BufferSupplyUnspecified, OMX_ErrorBadParameter, OMX_ErrorNone, OMX_ErrorPortsNotCompatible, and OMX_ErrorUndefined.

Referenced by main().


Variable Documentation

OMX_ERRORTYPE(* OMX_COMPONENTTYPE::ComponentTunnelRequest)(OMX_IN OMX_HANDLETYPE hComp, OMX_IN OMX_U32 nPort, OMX_IN OMX_HANDLETYPE hTunneledComp, OMX_IN OMX_U32 nTunneledPort, OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup) [inherited]

The ComponentTunnelRequest method will interact with another OMX component to determine if tunneling is possible and to setup the tunneling. The return codes for this method can be used to determine if tunneling is not possible, or if tunneling is not supported.

Base profile components (i.e. non-interop) do not support this method and should return OMX_ErrorNotImplemented

The interop profile component MUST support tunneling to another interop profile component with a compatible port parameters. A component may also support proprietary communication.

If proprietary communication is supported the negotiation of proprietary communication is done outside of OMX in a vendor specific way. It is only required that the proper result be returned and the details of how the setup is done is left to the component implementation.

When this method is invoked when nPort in an output port, the component will: 1. Populate the pTunnelSetup structure with the output port's requirements and constraints for the tunnel.

When this method is invoked when nPort in an input port, the component will: 1. Query the necessary parameters from the output port to determine if the ports are compatible for tunneling 2. If the ports are compatible, the component should store the tunnel step provided by the output port 3. Determine which port (either input or output) is the buffer supplier, and call OMX_SetParameter on the output port to indicate this selection.

The component will return from this call within 5 msec.

Parameters:
[in] hComp Handle of the component to be accessed. This is the component handle returned by the call to the OMX_GetHandle method.
[in] nPort nPort is used to select the port on the component to be used for tunneling.
[in] hTunneledComp Handle of the component to tunnel with. This is the component handle returned by the call to the OMX_GetHandle method. When this parameter is 0x0 the component should setup the port for communication with the application / IL Client.
[in] nPortOutput nPortOutput is used indicate the port the component should tunnel with.
[in] pTunnelSetup Pointer to the tunnel setup structure. When nPort is an output port the component should populate the fields of this structure. When When nPort is an input port the component should review the setup provided by the component with the output port.
Returns:
OMX_ERRORTYPE If the command successfully executes, the return code will be OMX_NoError. Otherwise the appropriate OMX error will be returned.

Referenced by omx_base_component_Constructor(), and OMX_SetupTunnel().


Generated for OpenMAX Bellagio rel. 0.3.5-svn by  doxygen 1.5.1
SourceForge.net Logo