khronosfws/openmax_al/src/adaptation/xametadataadaptctx.c
changeset 16 43d09473c595
parent 14 80975da52420
child 22 128eb6a32b84
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 <string.h>
       
    19 #include "XAMetadataAdaptCtx.h"
       
    20 #include "XAAdaptation.h"
       
    21 
       
    22 /*
       
    23  * XAAdaptationBaseCtx* XAMetadataAdapt_Create()
       
    24  * Allocates memory for Metadata Adaptation Context and makes 1st phase initialization
       
    25  * @returns XAMetadataAdaptationCtx* - Pointer to created context
       
    26  */
       
    27 XAAdaptationBaseCtx* XAMetadataAdaptCtx_Create(XADataSource* pDataSrc)
       
    28 {
       
    29     /* use media player context with NULL sinks
       
    30      * (no specific MDE context needed, because in GStreamer,
       
    31      *  playback resources are needed for getting stream tags)
       
    32      **/
       
    33     return XAMediaPlayerAdapt_Create(pDataSrc,NULL,NULL,NULL,NULL,NULL);
       
    34 }
       
    35 
       
    36 /*
       
    37  * XAresult XAMetadataAdapt_PostInit()
       
    38  * 2nd phase initialization of Metadata Adaptation Context
       
    39  */
       
    40 XAresult XAMetadataAdaptCtx_PostInit(XAAdaptationBaseCtx* bCtx)
       
    41 {
       
    42     /* pipe to media player adaptation */
       
    43     return XAMediaPlayerAdapt_PostInit(bCtx);
       
    44 }
       
    45 
       
    46 /*
       
    47  * void XAMetadataAdapt_Destroy(XAMetadataAdaptationCtx* ctx)
       
    48  * Destroys Metadata Adaptation Context
       
    49  * @param ctx - Metadata Adaptation context to be destroyed
       
    50  */
       
    51 void XAMetadataAdaptCtx_Destroy(XAAdaptationBaseCtx* bCtx)
       
    52 {
       
    53     /* pipe to media player adaptation */
       
    54     XAMediaPlayerAdapt_Destroy(bCtx);
       
    55 }