khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.h
changeset 16 43d09473c595
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 #ifndef XAMETADATAADAPTATION_H
       
    19 #define XAMETADATAADAPTATION_H
       
    20 
       
    21 #include "xaadaptationgst.h"
       
    22 
       
    23 
       
    24 /* FUNCTIONS */
       
    25 typedef struct XAMetadataImplTagList
       
    26 {
       
    27     XAuint32         itemcount; /* number of items in all three following arrays */
       
    28     XAMetadataInfo** mdeKeys;   /* array of tag keys */
       
    29     XAMetadataInfo** mdeValues; /* array of tag values */
       
    30 } XAMetadataImplTagList;
       
    31 
       
    32 
       
    33 typedef struct XAMetadataAdaptVars_
       
    34 {
       
    35 
       
    36     XAuint32        childcount;
       
    37     XAuint32        nodedepth;
       
    38     XAuint32        traversemode;
       
    39 
       
    40     GstTagList*     generaltags;
       
    41     GstStructure*   audiotags;
       
    42     GstStructure*   videotags;
       
    43     GstStructure**   currentchild; /*points to one of previous 3*/
       
    44 
       
    45 } XAMetadataAdaptVars;
       
    46 
       
    47 XAresult XAMetadataAdapt_PreInit(XAAdaptationGstCtx *bCtx);
       
    48 XAresult XAMetadataAdapt_PostInit(XAAdaptationGstCtx *bCtx);
       
    49 const XAchar* XAMetadataAdapt_ParseKhronosKey(const XAchar* KKey);
       
    50 void XAMetadataAdapt_FreeImplTagList(XAMetadataImplTagList *list, XAboolean freeItems);
       
    51 void XAMetadataAdapt_FreeVars(XAMetadataAdaptVars *vars);
       
    52 XAresult XAMetadataAdapt_TryWriteTags(XAAdaptationGstCtx* bCtx, GstBin* binToWriteTo);
       
    53 
       
    54 XAresult XAMetadataExtractionItfAdapt_FillTagList(XAAdaptationGstCtx *bCtx,
       
    55                                                   XAMetadataImplTagList* tagList);
       
    56 
       
    57 
       
    58 XAresult XAMetadataTraversalItfAdapt_SetMode(XAAdaptationGstCtx *bCtx, XAuint32 mode);
       
    59 XAresult XAMetadataTraversalItfAdapt_GetChildCount(XAAdaptationGstCtx *bCtx, XAuint32 *pCount);
       
    60 XAresult XAMetadataTraversalItfAdapt_GetChildMIMETypeSize(XAAdaptationGstCtx *bCtx,
       
    61                                                           XAuint32 index,
       
    62                                                           XAuint32 *pSize);
       
    63 XAresult XAMetadataTraversalItfAdapt_GetChildInfo(XAAdaptationGstCtx *bCtx,
       
    64                                                   XAuint32 index,
       
    65                                                   XAint32 *pNodeID,
       
    66                                                   XAuint32 *pType,
       
    67                                                   XAuint32 size,
       
    68                                                   XAchar *pMimeType);
       
    69 XAresult XAMetadataTraversalItfAdapt_SetActiveNode(XAAdaptationGstCtx *bCtx,
       
    70                                                    XAuint32 index);
       
    71 
       
    72 XAresult XAMetadataInsertionItfAdapt_CreateChildNode(XAAdaptationGstCtx *bCtx,
       
    73                                                     XAint32 parentNodeID,
       
    74                                                     XAuint32 type,
       
    75                                                     XAchar *mimeType,
       
    76                                                     XAint32 *pChildNodeID);
       
    77 XAresult XAMetadataInsertionItfAdapt_GetSupportedKeysCount(XAAdaptationGstCtx *bCtx,
       
    78                                                           XAint32 nodeID,
       
    79                                                           XAboolean *pFreeKeys,
       
    80                                                           XAuint32 *pKeyCount,
       
    81                                                           XAuint32 *pEncodingCount);
       
    82 XAresult XAMetadataInsertionItfAdapt_GetKeySize(XAAdaptationGstCtx *bCtx,
       
    83                                                XAint32 nodeID,
       
    84                                                XAuint32 keyIndex,
       
    85                                                XAuint32 *pKeySize);
       
    86 XAresult XAMetadataInsertionItfAdapt_GetKey(XAAdaptationGstCtx *bCtx,
       
    87                                            XAint32 nodeID,
       
    88                                            XAuint32 keyIndex,
       
    89                                            XAuint32 keySize,
       
    90                                            XAMetadataInfo *pKey);
       
    91 XAresult XAMetadataInsertionItfAdapt_GetFreeKeysEncoding(XAAdaptationGstCtx *bCtx,
       
    92                                                         XAint32 nodeID,
       
    93                                                         XAuint32 encodingIndex,
       
    94                                                         XAuint32 *pEncoding);
       
    95 XAresult XAMetadataInsertionItfAdapt_InsertMetadataItem(XAAdaptationGstCtx *bCtx,
       
    96                                                        XAint32 nodeID,
       
    97                                                        XAMetadataInfo *pKey,
       
    98                                                        XAMetadataInfo *pValue,
       
    99                                                        XAboolean overwrite);
       
   100 #endif /* XAMETADATAADAPTATION_H */