khronosfws/openmax_al/src/common/xaglobals.h
changeset 12 5a06f39ad45b
child 16 43d09473c595
equal deleted inserted replaced
0:71ca22bcf22a 12:5a06f39ad45b
       
     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 /*All global definitions and declarations here */
       
    18 
       
    19 #ifndef XAGLOBALS_H
       
    20 #define XAGLOBALS_H
       
    21 
       
    22 #include "openmaxalwrapper.h"
       
    23 #include "xadebug.h"
       
    24 
       
    25 /**
       
    26 GLOBAL ENUMERATIONS
       
    27  */
       
    28 /**
       
    29  * enumeration for different adaptation event types.
       
    30  * add more types when needed, use single bit values.
       
    31  **/
       
    32 typedef enum {
       
    33     XA_GENERICEVENTS = 0x1,
       
    34     XA_PLAYITFEVENTS = 0x2,
       
    35     XA_RECORDITFEVENTS = 0x4,
       
    36     XA_SNAPSHOTITFEVENTS = 0x8,
       
    37     XA_OUTPUTMIXITFEVENTS = 0x10,
       
    38     XA_CAMERAITFEVENTS = 0x20,
       
    39     XA_PREFETCHITFEVENTS = 0x40,
       
    40     XA_RADIOITFEVENTS = 0x80,
       
    41     XA_RDSITFEVENTS = 0x100,
       
    42     XA_METADATAEVENTS = 0x200,
       
    43     XA_ADDMORETYPES  = 0x400
       
    44 }XAAdaptEventTypes;
       
    45 
       
    46 #define XA_ADAPT_PU_INTERVAL 50                     /* position update interval */
       
    47 #define XA_ADAPT_ASYNC_TIMEOUT 3000                 /* timeout to wait async events */
       
    48 #define XA_ADAPT_ASYNC_TIMEOUT_SHORT 1000           /* timeout to wait async events */
       
    49 #define XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC 1000000   /* timeout to wait async events */
       
    50 
       
    51 #define XA_ADAPT_POSITION_UPDATE_EVT 0xf0           /* position update event */
       
    52 #define XA_ADAPT_SNAPSHOT_TAKEN 0xf1                /* snapshot taken event */
       
    53 #define XA_ADAPT_SNAPSHOT_INITIATED 0xf2            /* snapshot intitiated event */
       
    54 #define XA_ADAPT_MDE_TAGS_AVAILABLE 0xf3            /* metadata taglist changed */
       
    55 #define XA_ADAPT_OMIX_DEVICESET_CHANGED 0xf4        /* Output mix device changed event */
       
    56 #define XA_ADAPT_RADIO_FREQUENCY_CHANGED 0xf6       /* Radio frequency changed event */
       
    57 #define XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED 0xf7 /* Radio frequency range changed event */
       
    58 #define XA_ADAPT_RADIO_SEEK_COMPLETE 0xf8           /* Radio seek complete changed event */
       
    59 #define XA_ADAPT_RDS_GET_ODA_GROUP_DONE 0xf9        /* RDS get oda group done event */
       
    60 #define XA_ADAPT_BUFFERING 0xfa
       
    61 #define XA_ADAPT_MDE_TAGS_WRITTEN 0xfb
       
    62 /* TYPEDEFS */
       
    63 
       
    64 #define RADIO_DEFAULT_FREQ_RANGE XA_FREQRANGE_FMEUROAMERICA
       
    65 #define RADIO_DEFAULT_FREQ 88000000
       
    66 
       
    67 
       
    68 typedef enum
       
    69 {
       
    70     XA_UNDEFINED = 0,
       
    71     XA_READBUFFER,
       
    72     XA_WRITEBUFFER,
       
    73     XA_READ,
       
    74     XA_WRITE
       
    75 } XAConfigExtensionCpKey;
       
    76 
       
    77 typedef enum
       
    78 {
       
    79     XA_MEDIATYPE_AUDIO = 0,
       
    80     XA_MEDIATYPE_VIDEO,
       
    81     XA_MEDIATYPE_IMAGE,
       
    82     XA_MEDIATYPE_UNKNOWN
       
    83 } XAMediaType;
       
    84 
       
    85 #define CPCONFIGKEY "TestAppPipeConfig"
       
    86 /**
       
    87  * GLOBAL METHODS
       
    88  */
       
    89 
       
    90 
       
    91 /*
       
    92  * Engine
       
    93  */
       
    94 XAresult XAEngineImpl_Create(XAObjectItf *pEngine,
       
    95                              XAuint32 numOptions,
       
    96                              const XAEngineOption *pEngineOptions,
       
    97                              XAuint32 numInterfaces,
       
    98                              const XAInterfaceID *pInterfaceIds,
       
    99                              const XAboolean *pInterfaceRequired);
       
   100 
       
   101 XAresult XAEngineImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   102 
       
   103 XAresult XAEngineImpl_QuerySupportedInterfaces(XAuint32 index,
       
   104                                                XAInterfaceID *pInterfaceId);
       
   105 
       
   106 /*
       
   107  * Media Player
       
   108  */
       
   109 XAresult XAMediaPlayerImpl_CreateMediaPlayer(XAObjectItf *pPlayer,
       
   110                                            XADataSource *pDataSrc,
       
   111                                            XADataSource *pBankSrc,
       
   112                                            XADataSink *pAudioSnk,
       
   113                                            XADataSink *pImageVideoSnk,
       
   114                                            XADataSink *pVibra,
       
   115                                            XADataSink *pLEDArray,
       
   116                                            XAuint32 numInterfaces,
       
   117                                            const XAInterfaceID *pInterfaceIds,
       
   118                                            const XAboolean *pInterfaceRequired);
       
   119 
       
   120 XAresult XAMediaPlayerImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   121 
       
   122 XAresult XAMediaPlayerImpl_QuerySupportedInterfaces(XAuint32 index,
       
   123                                                   XAInterfaceID *pInterfaceId);
       
   124 
       
   125 /*
       
   126  * Metadata Extractor
       
   127  */
       
   128 XAresult XAMetadataExtractorImpl_Create(XAObjectItf *pMetadataExtractor,
       
   129                                            XADataSource *pDataSource,
       
   130                                            XAuint32 numInterfaces,
       
   131                                            const XAInterfaceID *pInterfaceIds,
       
   132                                            const XAboolean *pInterfaceRequired);
       
   133 
       
   134 XAresult XAMetadataExtractorImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   135 
       
   136 XAresult XAMetadataExtractorImpl_QuerySupportedInterfaces(XAuint32 index,
       
   137                                             XAInterfaceID *pInterfaceId);
       
   138 
       
   139 /*
       
   140  * Output Mix
       
   141  */
       
   142 XAresult XAOMixImpl_CreateOutputMix(XAObjectItf *pMix,
       
   143                                     XAuint32 numInterfaces,
       
   144                                     const XAInterfaceID *pInterfaceIds,
       
   145                                     const XAboolean *pInterfaceRequired);
       
   146 
       
   147 XAresult XAOMixImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   148 
       
   149 XAresult XAOMixImpl_QuerySupportedInterfaces(XAuint32 index,
       
   150                                              XAInterfaceID *pInterfaceId);
       
   151 
       
   152 /*
       
   153  * Media Recorder
       
   154  */
       
   155 XAresult XAMediaRecorderImpl_CreateMediaRecorder(XAObjectItf* pRecorder,
       
   156                                                  XADataSource* pAudioSrc,
       
   157                                                  XADataSource* pImageVideoSrc,
       
   158                                                  XADataSink* pDataSnk,
       
   159                                                  XAuint32 numInterfaces,
       
   160                                                  const XAInterfaceID *pInterfaceIds,
       
   161                                                  const XAboolean *pInterfaceRequired);
       
   162 
       
   163 XAresult XAMediaRecorderImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   164 
       
   165 XAresult XAMediaRecorderImpl_QuerySupportedInterfaces(XAuint32 index,
       
   166                                                       XAInterfaceID *pInterfaceId);
       
   167 
       
   168 /*
       
   169  * Camera Device
       
   170  */
       
   171 XAresult XACameraDeviceImpl_CreateCameraDevice(XAObjectItf* pDevice,
       
   172                                                XAuint32 deviceID,
       
   173                                                XAuint32 numInterfaces,
       
   174                                                const XAInterfaceID * pInterfaceIds,
       
   175                                                const XAboolean * pInterfaceRequired);
       
   176 
       
   177 XAresult XACameraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   178 
       
   179 XAresult XACameraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
       
   180                                                      XAInterfaceID *pInterfaceId);
       
   181 
       
   182 /*
       
   183  * Radio Device
       
   184  */
       
   185 XAresult XARadioDeviceImpl_CreateRadioDevice(XAObjectItf* pDevice,
       
   186                                              XAuint32 numInterfaces,
       
   187                                              const XAInterfaceID * pInterfaceIds,
       
   188                                              const XAboolean * pInterfaceRequired);
       
   189 
       
   190 XAresult XARadioDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   191 
       
   192 XAresult XARadioDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
       
   193                                                     XAInterfaceID *pInterfaceId);
       
   194 
       
   195 /*
       
   196  * Vibra Device
       
   197  */
       
   198 XAresult XAVibraDeviceImpl_CreateVibraDevice(XAObjectItf* pDevice,
       
   199                                              XAuint32 deviceID,
       
   200                                              XAuint32 numInterfaces,
       
   201                                              const XAInterfaceID * pInterfaceIds,
       
   202                                              const XAboolean * pInterfaceRequired);
       
   203 
       
   204 XAresult XAVibraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   205 
       
   206 XAresult XAVibraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
       
   207                                                     XAInterfaceID *pInterfaceId);
       
   208 
       
   209 /*
       
   210  * LED Array
       
   211  */
       
   212 XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice(XAObjectItf* pDevice,
       
   213                                                    XAuint32 deviceID,
       
   214                                                    XAuint32 numInterfaces,
       
   215                                                    const XAInterfaceID * pInterfaceIds,
       
   216                                                    const XAboolean * pInterfaceRequired);
       
   217 
       
   218 XAresult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
       
   219 
       
   220 XAresult XALEDArrayDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
       
   221                                                     XAInterfaceID *pInterfaceId);
       
   222 
       
   223 
       
   224 /*
       
   225  * Check if interface IDs are equal
       
   226  */
       
   227 XAboolean XACommon_EqualIIds(XAInterfaceID idA, XAInterfaceID idB);
       
   228 
       
   229 /*
       
   230  * Check Data Source availability and type
       
   231  */
       
   232 XAresult XACommon_CheckDataSource(XADataSource* source, XAMediaType* type);
       
   233 
       
   234 XAresult XACommon_ValidateDataLocator( XAuint32 pCounter, void* pSnk, ... );
       
   235 #endif /*XAGLOBALS_H */