Home | History | Annotate | Download | only in domx
      1 /*
      2  * Copyright (c) 2010, Texas Instruments Incorporated
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions
      7  * are met:
      8  *
      9  * *  Redistributions of source code must retain the above copyright
     10  *    notice, this list of conditions and the following disclaimer.
     11  *
     12  * *  Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  *
     16  * *  Neither the name of Texas Instruments Incorporated nor the names of
     17  *    its contributors may be used to endorse or promote products derived
     18  *    from this software without specific prior written permission.
     19  *
     20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  */
     32 
     33 /**
     34  *  @file  omx_rpc.h
     35  *  @brief This file contains methods that provides the functionality for
     36  *         the OpenMAX1.1 DOMX Framework RPC.
     37  *
     38  *  @path \WTSD_DucatiMMSW\framework\domx\omx_rpc\
     39  *
     40  *  @rev 1.0
     41  */
     42 
     43 /*==============================================================
     44  *! Revision History
     45  *! ============================
     46  *! 29-Mar-2010 Abhishek Ranka : Revamped DOMX implementation
     47  *!
     48  *! 19-August-2009 B Ravi Kiran ravi.kiran (at) ti.com: Initial Version
     49  *================================================================*/
     50 
     51 #ifndef OMXRPC_H
     52 #define OMXRPC_H
     53 
     54 #ifdef __cplusplus
     55 extern "C"
     56 {
     57 #endif				/* __cplusplus */
     58 
     59 /******************************************************************
     60  *   INCLUDE FILES
     61  ******************************************************************/
     62 #include <stdio.h>
     63 #include <OMX_Types.h>
     64 #include <OMX_Core.h>
     65 
     66 
     67 /******************************************************************
     68  *   DATA TYPES
     69  ******************************************************************/
     70 
     71 
     72  /*******************************************************************************
     73 * Enumerated Types
     74 *******************************************************************************/
     75 	typedef enum RPC_OMX_ERRORTYPE
     76 	{
     77 		RPC_OMX_ErrorNone = 0,
     78 
     79 		/* OMX Error Mapped */
     80 		RPC_OMX_ErrorInsufficientResources = 0x81000,
     81 		RPC_OMX_ErrorUndefined = 0x81001,
     82 		RPC_OMX_ErrorBadParameter = 0x81005,
     83 		RPC_OMX_ErrorHardware = 0x81009,
     84 		RPC_OMX_ErrorUnsupportedIndex = 0x8101A,
     85 		RPC_OMX_ErrorTimeout = 0x81011,
     86 		/* END OF OMX Error */
     87 
     88 		/* RPC Specific Error - to depricate */
     89 		RPC_OMX_ErrorUnknown = 0x70000,
     90 		RPC_OMX_ErrorProccesorInit = 0x70001,
     91 		RPC_OMX_InvalidRPCCmd = 0x70002,
     92 		RPC_OMX_ErrorHLOS = 0x70003,
     93 		RPC_OMX_ErrorInvalidMsg = 0x70004,
     94 
     95 		/* RCM Specific */
     96 		RPC_OMX_RCM_ErrorExecFail = 0x70005,
     97 		RPC_OMX_RCM_ErrorExecDpcFail = 0x70006,
     98 		RPC_OMX_RCM_ErrorTimeout = 0x70007,
     99 		RPC_OMX_RCM_ServerFail = 0x70008,
    100 		RPC_OMX_RCM_ClientFail = 0x70009,
    101 
    102 	} RPC_OMX_ERRORTYPE;
    103 
    104 
    105 /****************************************************************
    106  * PUBLIC DECLARATIONS Defined here, used elsewhere
    107 
    108 ****************************************************************/
    109 /* ===========================================================================*/
    110 /**
    111  * @name RPC_InstanceInit()
    112  * @brief RPC instance init is used to bring up a instance of a client - this should be ideally invokable from any core
    113  *        For this the parameters it would require are
    114  *        Heap ID - this needs to be configured at startup (CFG) and indicates the heaps available for a RCM client to pick from
    115  *        Server - this contains the RCM server name that the client should connect to
    116  *        rcmHndl - Contains the Client once the call is completed
    117  *        rcmParams -
    118  *        These values can be picked up from the RPC handle. But an unique identifier is required -Server
    119  * @param cComponentName  : Pointer to the Components Name that is requires the RCM client to be initialized
    120  * @return RPC_OMX_ErrorNone = Successful
    121  * @sa TBD
    122  *
    123  */
    124 /* ===========================================================================*/
    125 	RPC_OMX_ERRORTYPE RPC_InstanceInit(OMX_STRING cComponentName,
    126 	    OMX_HANDLETYPE * phRPCCtx);
    127 
    128 
    129 
    130 /* ===========================================================================*/
    131 /**
    132  * @name RPC_InstanceDeInit()
    133  * @brief This function Removes or deinitializes RCM client instances. This also manages the number of active users
    134  *        of a given RCM client
    135  * @param cComponentName  : Pointer to the Components Name that is active user of the RCM client to be deinitialized
    136  * @return RPC_OMX_ErrorNone = Successful
    137  * @sa TBD
    138  *
    139  */
    140 /* ===========================================================================*/
    141 	RPC_OMX_ERRORTYPE RPC_InstanceDeInit(OMX_HANDLETYPE hRPCCtx);
    142 
    143 
    144 
    145 #ifdef __cplusplus
    146 }
    147 #endif				/* __cplusplus */
    148 
    149 #endif
    150