khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.h
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 #ifndef XACAPABILITIESMGR_H
       
    19 #define XACAPABILITIESMGR_H
       
    20 
       
    21 #include "xaframeworkmgr.h"
       
    22 #include "openmaxalwrapper.h"
       
    23 #include "xaglobals.h"
       
    24 
       
    25 
       
    26 #define AUD_D (XACAP_DECODER|XACAP_AUDIO)
       
    27 #define AUD_E (XACAP_ENCODER|XACAP_AUDIO)
       
    28 #define VID_D (XACAP_DECODER|XACAP_VIDEO)
       
    29 #define VID_E ((XACapsType)(XACAP_ENCODER|XACAP_VIDEO))
       
    30 #define IMG_D (XACAP_DECODER|XACAP_IMAGE)
       
    31 #define IMG_E ((XACapsType)(XACAP_ENCODER|XACAP_IMAGE))
       
    32 #define AUD_O ((XACapsType)(XACAP_DEVSNK|XACAP_AUDIO))
       
    33 #define AUD_I (XACAP_DEVSRC|XACAP_AUDIO)
       
    34 #define VID_O (XACAP_DEVSNK|XACAP_VIDEO)
       
    35 #define VID_I (XACAP_DEVSRC|XACAP_VIDEO)
       
    36 #define ANY 0x7FFFFFFF
       
    37 
       
    38 /* Structure to hold commonly used capabilities of codec/device.
       
    39  */
       
    40 typedef struct XACapabilities_ XACapabilities;
       
    41 
       
    42 struct XACapabilities_
       
    43 {
       
    44     XAuint32    capsType;
       
    45     XAuint32    xaid;       /* OpenMAX id (e.g. XA_VIDEOCODEC macro) */
       
    46     XAchar*    adaptId;    /* TODO fill this */
       
    47     /* TODO Do we need a flag for default device id? */
       
    48     XAuint32    noOfEntries;
       
    49     void*       pEntry;
       
    50 
       
    51     /*add if/when needed*/
       
    52     XACapabilities* next;
       
    53 };
       
    54 
       
    55 
       
    56 XAresult XACapabilitiesMgr_CreateCapabilitieList(
       
    57             FrameworkMap* frameworkMap,
       
    58             XACapabilities** ppListHead);
       
    59 
       
    60 XAresult XACapabilitiesMgr_DeleteCapabilitieList(XACapabilities** ppListHead);
       
    61 
       
    62 XAresult XACapabilitiesMgr_GetCapsCount(
       
    63                 XACapabilities* pListHead,
       
    64                 XACapsType filter,
       
    65                 XAuint32* count);
       
    66 
       
    67 XAresult XACapabilitiesMgr_GetCapsById(
       
    68                 XACapabilities* pListHead,
       
    69                 XACapsType filter,
       
    70                 XAuint32 maxId,
       
    71                 XACapabilities* data);
       
    72 
       
    73 XAresult XACapabilitiesMgr_GetCapsByIdx(
       
    74                 XACapabilities* pListHead,
       
    75                 XACapsType filter,
       
    76                 XAuint32 idx,
       
    77                 XACapabilities* data);
       
    78 
       
    79 XAresult XACapabilitiesMgr_QueryColorFormats(
       
    80                 XACapabilities* pListHead,
       
    81                 XAuint32* pIndex,
       
    82                 XAuint32* pColorFormats);
       
    83 
       
    84 #endif /* XACAPABILITIESMGR_H */