khronosfws/openmax_al/src/mmf_adaptation/xaengineadaptctxmmf.c
changeset 16 43d09473c595
parent 12 5a06f39ad45b
equal deleted inserted replaced
14:80975da52420 16:43d09473c595
    22 /*
    22 /*
    23  * XAAdaptationBaseCtx* XAEngineAdaptMMF_Create()
    23  * XAAdaptationBaseCtx* XAEngineAdaptMMF_Create()
    24  * Allocates memory for Engine Adaptation Context and makes 1st phase initialization
    24  * Allocates memory for Engine Adaptation Context and makes 1st phase initialization
    25  * @returns XAEngineAdaptationCtx* - Pointer to created context
    25  * @returns XAEngineAdaptationCtx* - Pointer to created context
    26  */
    26  */
    27 XAAdaptationBaseMMFCtx* XAEngineAdaptMMF_Create()
    27 XAAdaptationMMFCtx* XAEngineAdaptMMF_Create()
    28 {
    28 {
    29     XAEngineAdaptationMMFCtx *pSelf = NULL;
    29     XAEngineAdaptationMMFCtx *pSelf = NULL;
    30     DEBUG_API("->XAEngineAdaptMMF_Create");
    30     DEBUG_API("->XAEngineAdaptMMF_Create");
    31 
    31 
    32     pSelf = calloc(1, sizeof(XAEngineAdaptationMMFCtx));
    32     pSelf = (XAEngineAdaptationMMFCtx*)calloc(1, sizeof(XAEngineAdaptationMMFCtx));
    33     if ( pSelf)
    33     if ( pSelf)
    34     {
    34     {
    35         if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAEngineAdaptationMMF)
    35         if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAEngineAdaptation)
    36                     != XA_RESULT_SUCCESS )
    36                     != XA_RESULT_SUCCESS )
    37             {
    37             {
    38                 DEBUG_ERR("Failed to init base context!!!");
    38                 DEBUG_ERR("Failed to init base context!!!");
    39                 free(pSelf);
    39                 free(pSelf);
    40                 pSelf = NULL;
    40                 pSelf = NULL;
    44                 /* Init internal variables */
    44                 /* Init internal variables */
    45             }
    45             }
    46     }
    46     }
    47 
    47 
    48     DEBUG_API("<-XAEngineAdaptMMF_Create");
    48     DEBUG_API("<-XAEngineAdaptMMF_Create");
    49     return (XAAdaptationBaseMMFCtx*)pSelf;
    49     return (XAAdaptationMMFCtx*)pSelf;
    50 }
    50 }
    51 
    51 
    52 /*
    52 /*
    53  * XAresult XAEngineAdaptMMF_PostInit()
    53  * XAresult XAEngineAdaptMMF_PostInit()
    54  * 2nd phase initialization of engine Adaptation Context
    54  * 2nd phase initialization of engine Adaptation Context
    55  */
    55  */
    56 XAresult XAEngineAdaptMMF_PostInit(XAAdaptationBaseMMFCtx* bCtx)
    56 XAresult XAEngineAdaptMMF_PostInit(XAAdaptationMMFCtx* bCtx)
    57 {
    57 {
    58     XAresult ret = XA_RESULT_SUCCESS;
    58     XAresult ret = XA_RESULT_SUCCESS;
    59 
    59 
    60     DEBUG_API("<-XAEngineAdaptMMF_PostInit");
    60     DEBUG_API("<-XAEngineAdaptMMF_PostInit");
    61     return ret;
    61     return ret;
    64 /*
    64 /*
    65  * void XAEngineAdapt_Destroy(XAEngineAdaptationCtx* ctx)
    65  * void XAEngineAdapt_Destroy(XAEngineAdaptationCtx* ctx)
    66  * Destroys Engine Adaptation Context
    66  * Destroys Engine Adaptation Context
    67  * @param ctx - Engine Adaptation context to be destroyed
    67  * @param ctx - Engine Adaptation context to be destroyed
    68  */
    68  */
    69 void XAEngineAdaptMMF_Destroy(XAAdaptationBaseMMFCtx* bCtx)
    69 void XAEngineAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx)
    70 {
    70 {
    71 	XAEngineAdaptationMMFCtx* ctx = NULL;
    71 	XAEngineAdaptationMMFCtx* ctx = NULL;
    72 
    72 
    73 	DEBUG_API("->XAEngineAdaptMMF_Destroy");
    73 	DEBUG_API("->XAEngineAdaptMMF_Destroy");
    74 //	if( !bCtx || bCtx->ctxId != XAEngineAdaptation )
    74 //	if( !bCtx || bCtx->ctxId != XAEngineAdaptation )