khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.c
changeset 16 43d09473c595
child 25 6f7ceef7b1d1
equal deleted inserted replaced
14:80975da52420 16:43d09473c595
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #include <assert.h>
       
    19 #include <string.h>
       
    20 #include "xaadaptationmmf.h"
       
    21 #include "xaadaptationmmf.h"
       
    22 #include "xaobjectitf.h"
       
    23 #include "xamediaplayeradaptctxmmf.h"
       
    24 
       
    25 /*
       
    26  * XAAdaptationBaseCtx* XAAdaptationBase_Create()
       
    27  * 1st phase initialization function for Adaptation Base context structure.
       
    28  * Reserves memory for base context and initializes GStreamer FW.
       
    29  */
       
    30 XAresult XAAdaptationBaseMMF_Init( XAAdaptationMMFCtx* pSelf, XAuint32 ctxId )
       
    31 {
       
    32     DEBUG_API("->XAAdaptationBase_Init");
       
    33 
       
    34     if ( pSelf )
       
    35     {
       
    36     if(XAAdaptationBase_Init(&(pSelf->baseObj), ctxId) != XA_RESULT_SUCCESS)
       
    37         {
       
    38         DEBUG_ERR("Failed to init base context!!!");
       
    39         free(pSelf);
       
    40         pSelf = NULL;
       
    41         }
       
    42     }
       
    43     else
       
    44     {
       
    45         DEBUG_ERR("Invalid Adaptation Base Context.")
       
    46         return XA_RESULT_PARAMETER_INVALID;
       
    47     }
       
    48 
       
    49     DEBUG_API("<-XAAdaptationBase_Init");
       
    50     return XA_RESULT_SUCCESS;
       
    51 }
       
    52 
       
    53 /*
       
    54  * XAresult XAAdaptationBase_PostInit()
       
    55  * 2nd phase initialization for Adaptation Base.
       
    56  */
       
    57 XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationMMFCtx* ctx )
       
    58 {
       
    59     XAresult ret = XA_RESULT_SUCCESS;
       
    60     DEBUG_API("->XAAdaptationBase_PostInit");
       
    61 
       
    62    XAAdaptationBase_PostInit(&ctx->baseObj);
       
    63 
       
    64     DEBUG_API("<-XAAdaptationBase_PostInit");
       
    65     return ret;
       
    66 }
       
    67 
       
    68 /*
       
    69  * void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
       
    70  * Frees all Base context variables .
       
    71  */
       
    72 void XAAdaptationBaseMMF_Free( XAAdaptationMMFCtx* ctx )
       
    73 {
       
    74     DEBUG_API("->XAAdaptationBaseMMF_Free");
       
    75     XAAdaptationBase_Free(&ctx->baseObj);
       
    76     DEBUG_API("<-XAAdaptationBaseMMF_Free");
       
    77 }
       
    78 
       
    79