Home | History | Annotate | Download | only in OMXAL
      1 /*
      2  * Copyright (c) 2007-2010 The Khronos Group Inc.
      3  *
      4  * Permission is hereby granted, free of charge, to any person obtaining
      5  * a copy of this software and/or associated documentation files (the
      6  * "Materials "), to deal in the Materials without restriction, including
      7  * without limitation the rights to use, copy, modify, merge, publish,
      8  * distribute, sublicense, and/or sell copies of the Materials, and to
      9  * permit persons to whom the Materials are furnished to do so, subject to
     10  * the following conditions:
     11  *
     12  * The above copyright notice and this permission notice shall be included
     13  * in all copies or substantial portions of the Materials.
     14  *
     15  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     16  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     21  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
     22  *
     23  * OpenMAXAL.h - OpenMAX AL version 1.0.1
     24  *
     25  */
     26 
     27 /****************************************************************************/
     28 /* NOTE: This file is a standard OpenMAX AL header file and should not be   */
     29 /* modified in any way.                                                     */
     30 /****************************************************************************/
     31 
     32 #ifndef _OPENMAXAL_H_
     33 #define _OPENMAXAL_H_
     34 
     35 #ifdef __cplusplus
     36 extern "C" {
     37 #endif
     38 
     39 #include "OpenMAXAL_Platform.h"
     40 
     41 
     42   /*****************************************************************/
     43   /* TYPES                                                         */
     44   /*****************************************************************/
     45 
     46 /* remap common types to XA types for clarity */
     47 typedef xa_int8_t   XAint8;   /* 8 bit signed integer    */
     48 typedef xa_uint8_t  XAuint8;  /* 8 bit unsigned integer  */
     49 typedef xa_int16_t  XAint16;  /* 16 bit signed integer   */
     50 typedef xa_uint16_t XAuint16; /* 16 bit unsigned integer */
     51 typedef xa_int32_t  XAint32;  /* 32 bit signed integer   */
     52 typedef xa_uint32_t XAuint32; /* 32 bit unsigned integer */
     53 typedef xa_uint64_t XAuint64; /* 64 bit unsigned integer */
     54 
     55 typedef XAuint32    XAboolean;
     56 typedef XAuint8     XAchar;
     57 typedef XAint16     XAmillibel;
     58 typedef XAuint32    XAmillisecond;
     59 typedef XAuint32    XAmilliHertz;
     60 typedef XAint32     XAmillimeter;
     61 typedef XAint32     XAmillidegree;
     62 typedef XAint16     XApermille;
     63 typedef XAuint32    XAmicrosecond;
     64 typedef XAuint64    XAtime;
     65 typedef XAuint32    XAresult;
     66 
     67 #define XA_BOOLEAN_FALSE                    ((XAuint32) 0x00000000)
     68 #define XA_BOOLEAN_TRUE                     ((XAuint32) 0x00000001)
     69 
     70 #define XA_MILLIBEL_MAX                     ((XAmillibel) 0x7FFF)
     71 #define XA_MILLIBEL_MIN                     ((XAmillibel) (-XA_MILLIBEL_MAX-1))
     72 
     73 #define XA_MILLIHERTZ_MAX                   ((XAmilliHertz) 0xFFFFFFFF)
     74 
     75 #define XA_MILLIMETER_MAX                   ((XAmillimeter) 0x7FFFFFFF)
     76 
     77 
     78 
     79   /*****************************************************************/
     80   /* RESULT CODES                                                  */
     81   /*****************************************************************/
     82 
     83 #define XA_RESULT_SUCCESS                   ((XAuint32) 0x00000000)
     84 #define XA_RESULT_PRECONDITIONS_VIOLATED    ((XAuint32) 0x00000001)
     85 #define XA_RESULT_PARAMETER_INVALID         ((XAuint32) 0x00000002)
     86 #define XA_RESULT_MEMORY_FAILURE            ((XAuint32) 0x00000003)
     87 #define XA_RESULT_RESOURCE_ERROR            ((XAuint32) 0x00000004)
     88 #define XA_RESULT_RESOURCE_LOST             ((XAuint32) 0x00000005)
     89 #define XA_RESULT_IO_ERROR                  ((XAuint32) 0x00000006)
     90 #define XA_RESULT_BUFFER_INSUFFICIENT       ((XAuint32) 0x00000007)
     91 #define XA_RESULT_CONTENT_CORRUPTED         ((XAuint32) 0x00000008)
     92 #define XA_RESULT_CONTENT_UNSUPPORTED       ((XAuint32) 0x00000009)
     93 #define XA_RESULT_CONTENT_NOT_FOUND         ((XAuint32) 0x0000000A)
     94 #define XA_RESULT_PERMISSION_DENIED         ((XAuint32) 0x0000000B)
     95 #define XA_RESULT_FEATURE_UNSUPPORTED       ((XAuint32) 0x0000000C)
     96 #define XA_RESULT_INTERNAL_ERROR            ((XAuint32) 0x0000000D)
     97 #define XA_RESULT_UNKNOWN_ERROR             ((XAuint32) 0x0000000E)
     98 #define XA_RESULT_OPERATION_ABORTED         ((XAuint32) 0x0000000F)
     99 #define XA_RESULT_CONTROL_LOST              ((XAuint32) 0x00000010)
    100 
    101 
    102 
    103   /*****************************************************************/
    104   /* INTERFACE ID DEFINITION                                       */
    105   /*****************************************************************/
    106 
    107 /* Interface ID defined as a UUID */
    108 typedef const struct XAInterfaceID_ {
    109     XAuint32 time_low;
    110     XAuint16 time_mid;
    111     XAuint16 time_hi_and_version;
    112     XAuint16 clock_seq;
    113     XAuint8  node[6];
    114 } * XAInterfaceID;
    115 
    116 /* NULL Interface */
    117 XA_API extern const XAInterfaceID XA_IID_NULL;
    118 
    119 
    120 
    121   /*****************************************************************/
    122   /* GENERAL INTERFACES, STRUCTS AND DEFINES                       */
    123   /*****************************************************************/
    124 
    125 /* OBJECT */
    126 
    127 #define XA_PRIORITY_LOWEST                      ((XAint32) (-0x7FFFFFFF-1))
    128 #define XA_PRIORITY_VERYLOW                     ((XAint32) -0x60000000)
    129 #define XA_PRIORITY_LOW                         ((XAint32) -0x40000000)
    130 #define XA_PRIORITY_BELOWNORMAL                 ((XAint32) -0x20000000)
    131 #define XA_PRIORITY_NORMAL                      ((XAint32) 0x00000000)
    132 #define XA_PRIORITY_ABOVENORMAL                 ((XAint32) 0x20000000)
    133 #define XA_PRIORITY_HIGH                        ((XAint32) 0x40000000)
    134 #define XA_PRIORITY_VERYHIGH                    ((XAint32) 0x60000000)
    135 #define XA_PRIORITY_HIGHEST                     ((XAint32) 0x7FFFFFFF)
    136 
    137 #define XA_OBJECT_EVENT_RUNTIME_ERROR           ((XAuint32) 0x00000001)
    138 #define XA_OBJECT_EVENT_ASYNC_TERMINATION       ((XAuint32) 0x00000002)
    139 #define XA_OBJECT_EVENT_RESOURCES_LOST          ((XAuint32) 0x00000003)
    140 #define XA_OBJECT_EVENT_RESOURCES_AVAILABLE     ((XAuint32) 0x00000004)
    141 #define XA_OBJECT_EVENT_ITF_CONTROL_TAKEN       ((XAuint32) 0x00000005)
    142 #define XA_OBJECT_EVENT_ITF_CONTROL_RETURNED    ((XAuint32) 0x00000006)
    143 #define XA_OBJECT_EVENT_ITF_PARAMETERS_CHANGED  ((XAuint32) 0x00000007)
    144 
    145 #define XA_OBJECT_STATE_UNREALIZED              ((XAuint32) 0x00000001)
    146 #define XA_OBJECT_STATE_REALIZED                ((XAuint32) 0x00000002)
    147 #define XA_OBJECT_STATE_SUSPENDED               ((XAuint32) 0x00000003)
    148 
    149 
    150 XA_API extern const XAInterfaceID XA_IID_OBJECT;
    151 
    152 struct XAObjectItf_;
    153 typedef const struct XAObjectItf_ * const * XAObjectItf;
    154 
    155 typedef void (XAAPIENTRY * xaObjectCallback) (
    156     XAObjectItf caller,
    157     const void * pContext,
    158     XAuint32 event,
    159     XAresult result,
    160     XAuint32 param,
    161     void * pInterface
    162 );
    163 
    164 struct XAObjectItf_ {
    165     XAresult (*Realize) (
    166         XAObjectItf self,
    167         XAboolean async
    168     );
    169     XAresult (*Resume) (
    170         XAObjectItf self,
    171         XAboolean async
    172     );
    173     XAresult (*GetState) (
    174         XAObjectItf self,
    175         XAuint32 * pState
    176     );
    177     XAresult (*GetInterface) (
    178         XAObjectItf self,
    179         const XAInterfaceID iid,
    180         void * pInterface
    181     );
    182     XAresult (*RegisterCallback) (
    183         XAObjectItf self,
    184         xaObjectCallback callback,
    185         void * pContext
    186     );
    187     void (*AbortAsyncOperation) (
    188         XAObjectItf self
    189     );
    190     void (*Destroy) (
    191         XAObjectItf self
    192     );
    193     XAresult (*SetPriority) (
    194         XAObjectItf self,
    195         XAint32 priority,
    196         XAboolean preemptable
    197     );
    198     XAresult (*GetPriority) (
    199         XAObjectItf self,
    200         XAint32 * pPriority,
    201         XAboolean * pPreemptable
    202     );
    203     XAresult (*SetLossOfControlInterfaces) (
    204         XAObjectItf self,
    205         XAint16 numInterfaces,
    206         XAInterfaceID * pInterfaceIDs,
    207         XAboolean enabled
    208     );
    209 };
    210 
    211 /* CONFIG EXTENSION */
    212 
    213 XA_API extern const XAInterfaceID XA_IID_CONFIGEXTENSION;
    214 
    215 struct XAConfigExtensionsItf_;
    216 typedef const struct XAConfigExtensionsItf_
    217     * const * XAConfigExtensionsItf;
    218 
    219 struct XAConfigExtensionsItf_ {
    220     XAresult (*SetConfiguration) (
    221         XAConfigExtensionsItf self,
    222         const XAchar * configKey,
    223         XAuint32 valueSize,
    224         const void * pConfigValue
    225     );
    226     XAresult (*GetConfiguration) (
    227         XAConfigExtensionsItf self,
    228         const XAchar * configKey,
    229         XAuint32 * pValueSize,
    230         void * pConfigValue
    231     );
    232 };
    233 
    234 /* DYNAMIC INTERFACE MANAGEMENT */
    235 
    236 #define XA_DYNAMIC_ITF_EVENT_RUNTIME_ERROR              ((XAuint32) 0x00000001)
    237 #define XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION          ((XAuint32) 0x00000002)
    238 #define XA_DYNAMIC_ITF_EVENT_RESOURCES_LOST             ((XAuint32) 0x00000003)
    239 #define XA_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((XAuint32) 0x00000004)
    240 #define XA_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE        ((XAuint32) 0x00000005)
    241 
    242 XA_API extern const XAInterfaceID XA_IID_DYNAMICINTERFACEMANAGEMENT;
    243 
    244 struct XADynamicInterfaceManagementItf_;
    245 typedef const struct XADynamicInterfaceManagementItf_
    246     * const * XADynamicInterfaceManagementItf;
    247 
    248 typedef void (XAAPIENTRY * xaDynamicInterfaceManagementCallback) (
    249     XADynamicInterfaceManagementItf caller,
    250     void * pContext,
    251     XAuint32 event,
    252     XAresult result,
    253     const XAInterfaceID iid
    254 );
    255 
    256 struct XADynamicInterfaceManagementItf_ {
    257     XAresult (*AddInterface) (
    258         XADynamicInterfaceManagementItf self,
    259         const XAInterfaceID iid,
    260         XAboolean aysnc
    261     );
    262     XAresult (*RemoveInterface) (
    263         XADynamicInterfaceManagementItf self,
    264         const XAInterfaceID iid
    265     );
    266     XAresult (*ResumeInterface) (
    267         XADynamicInterfaceManagementItf self,
    268         const XAInterfaceID iid,
    269         XAboolean aysnc
    270     );
    271     XAresult (*RegisterCallback) (
    272         XADynamicInterfaceManagementItf self,
    273         xaDynamicInterfaceManagementCallback callback,
    274         void * pContext
    275     );
    276 };
    277 
    278 /* DATA SOURCES/SINKS */
    279 
    280 #define XA_DATAFORMAT_MIME              ((XAuint32) 0x00000001)
    281 #define XA_DATAFORMAT_PCM               ((XAuint32) 0x00000002)
    282 #define XA_DATAFORMAT_RAWIMAGE          ((XAuint32) 0x00000003)
    283 
    284 #define XA_DATALOCATOR_URI              ((XAuint32) 0x00000001)
    285 #define XA_DATALOCATOR_ADDRESS          ((XAuint32) 0x00000002)
    286 #define XA_DATALOCATOR_IODEVICE         ((XAuint32) 0x00000003)
    287 #define XA_DATALOCATOR_OUTPUTMIX        ((XAuint32) 0x00000004)
    288 #define XA_DATALOCATOR_NATIVEDISPLAY    ((XAuint32) 0x00000005)
    289 #define XA_DATALOCATOR_RESERVED6        ((XAuint32) 0x00000006)
    290 #define XA_DATALOCATOR_RESERVED7        ((XAuint32) 0x00000007)
    291 
    292 typedef struct XADataSink_ {
    293     void * pLocator;
    294     void * pFormat;
    295 } XADataSink;
    296 
    297 typedef struct XADataSource_ {
    298     void * pLocator;
    299     void * pFormat;
    300 } XADataSource;
    301 
    302 #define XA_CONTAINERTYPE_UNSPECIFIED    ((XAuint32) 0x00000001)
    303 #define XA_CONTAINERTYPE_RAW            ((XAuint32) 0x00000002)
    304 #define XA_CONTAINERTYPE_ASF            ((XAuint32) 0x00000003)
    305 #define XA_CONTAINERTYPE_AVI            ((XAuint32) 0x00000004)
    306 #define XA_CONTAINERTYPE_BMP            ((XAuint32) 0x00000005)
    307 #define XA_CONTAINERTYPE_JPG            ((XAuint32) 0x00000006)
    308 #define XA_CONTAINERTYPE_JPG2000        ((XAuint32) 0x00000007)
    309 #define XA_CONTAINERTYPE_M4A            ((XAuint32) 0x00000008)
    310 #define XA_CONTAINERTYPE_MP3            ((XAuint32) 0x00000009)
    311 #define XA_CONTAINERTYPE_MP4            ((XAuint32) 0x0000000A)
    312 #define XA_CONTAINERTYPE_MPEG_ES        ((XAuint32) 0x0000000B)
    313 #define XA_CONTAINERTYPE_MPEG_PS        ((XAuint32) 0x0000000C)
    314 #define XA_CONTAINERTYPE_MPEG_TS        ((XAuint32) 0x0000000D)
    315 #define XA_CONTAINERTYPE_QT             ((XAuint32) 0x0000000E)
    316 #define XA_CONTAINERTYPE_WAV            ((XAuint32) 0x0000000F)
    317 #define XA_CONTAINERTYPE_XMF_0          ((XAuint32) 0x00000010)
    318 #define XA_CONTAINERTYPE_XMF_1          ((XAuint32) 0x00000011)
    319 #define XA_CONTAINERTYPE_XMF_2          ((XAuint32) 0x00000012)
    320 #define XA_CONTAINERTYPE_XMF_3          ((XAuint32) 0x00000013)
    321 #define XA_CONTAINERTYPE_XMF_GENERIC    ((XAuint32) 0x00000014)
    322 #define XA_CONTAINERTYPE_AMR            ((XAuint32) 0x00000015)
    323 #define XA_CONTAINERTYPE_AAC            ((XAuint32) 0x00000016)
    324 #define XA_CONTAINERTYPE_3GPP           ((XAuint32) 0x00000017)
    325 #define XA_CONTAINERTYPE_3GA            ((XAuint32) 0x00000018)
    326 #define XA_CONTAINERTYPE_RM             ((XAuint32) 0x00000019)
    327 #define XA_CONTAINERTYPE_DMF            ((XAuint32) 0x0000001A)
    328 #define XA_CONTAINERTYPE_SMF            ((XAuint32) 0x0000001B)
    329 #define XA_CONTAINERTYPE_MOBILE_DLS     ((XAuint32) 0x0000001C)
    330 #define XA_CONTAINERTYPE_OGG            ((XAuint32) 0x0000001D)
    331 
    332 typedef struct XADataFormat_MIME_ {
    333     XAuint32 formatType;
    334     XAchar * mimeType;
    335     XAuint32 containerType;
    336 } XADataFormat_MIME;
    337 
    338 #define XA_BYTEORDER_BIGENDIAN          ((XAuint32) 0x00000001)
    339 #define XA_BYTEORDER_LITTLEENDIAN       ((XAuint32) 0x00000002)
    340 
    341 #define XA_SAMPLINGRATE_8               ((XAuint32)   8000000)
    342 #define XA_SAMPLINGRATE_11_025          ((XAuint32)  11025000)
    343 #define XA_SAMPLINGRATE_12              ((XAuint32)  12000000)
    344 #define XA_SAMPLINGRATE_16              ((XAuint32)  16000000)
    345 #define XA_SAMPLINGRATE_22_05           ((XAuint32)  22050000)
    346 #define XA_SAMPLINGRATE_24              ((XAuint32)  24000000)
    347 #define XA_SAMPLINGRATE_32              ((XAuint32)  32000000)
    348 #define XA_SAMPLINGRATE_44_1            ((XAuint32)  44100000)
    349 #define XA_SAMPLINGRATE_48              ((XAuint32)  48000000)
    350 #define XA_SAMPLINGRATE_64              ((XAuint32)  64000000)
    351 #define XA_SAMPLINGRATE_88_2            ((XAuint32)  88200000)
    352 #define XA_SAMPLINGRATE_96              ((XAuint32)  96000000)
    353 #define XA_SAMPLINGRATE_192             ((XAuint32) 192000000)
    354 
    355 #define XA_SPEAKER_FRONT_LEFT               ((XAuint32) 0x00000001)
    356 #define XA_SPEAKER_FRONT_RIGHT              ((XAuint32) 0x00000002)
    357 #define XA_SPEAKER_FRONT_CENTER             ((XAuint32) 0x00000004)
    358 #define XA_SPEAKER_LOW_FREQUENCY            ((XAuint32) 0x00000008)
    359 #define XA_SPEAKER_BACK_LEFT                ((XAuint32) 0x00000010)
    360 #define XA_SPEAKER_BACK_RIGHT               ((XAuint32) 0x00000020)
    361 #define XA_SPEAKER_FRONT_LEFT_OF_CENTER     ((XAuint32) 0x00000040)
    362 #define XA_SPEAKER_FRONT_RIGHT_OF_CENTER    ((XAuint32) 0x00000080)
    363 #define XA_SPEAKER_BACK_CENTER              ((XAuint32) 0x00000100)
    364 #define XA_SPEAKER_SIDE_LEFT                ((XAuint32) 0x00000200)
    365 #define XA_SPEAKER_SIDE_RIGHT               ((XAuint32) 0x00000400)
    366 #define XA_SPEAKER_TOP_CENTER               ((XAuint32) 0x00000800)
    367 #define XA_SPEAKER_TOP_FRONT_LEFT           ((XAuint32) 0x00001000)
    368 #define XA_SPEAKER_TOP_FRONT_CENTER         ((XAuint32) 0x00002000)
    369 #define XA_SPEAKER_TOP_FRONT_RIGHT          ((XAuint32) 0x00004000)
    370 #define XA_SPEAKER_TOP_BACK_LEFT            ((XAuint32) 0x00008000)
    371 #define XA_SPEAKER_TOP_BACK_CENTER          ((XAuint32) 0x00010000)
    372 #define XA_SPEAKER_TOP_BACK_RIGHT           ((XAuint32) 0x00020000)
    373 
    374 #define XA_PCMSAMPLEFORMAT_FIXED_8          ((XAuint16) 0x0008)
    375 #define XA_PCMSAMPLEFORMAT_FIXED_16         ((XAuint16) 0x0010)
    376 #define XA_PCMSAMPLEFORMAT_FIXED_20         ((XAuint16) 0x0014)
    377 #define XA_PCMSAMPLEFORMAT_FIXED_24         ((XAuint16) 0x0018)
    378 #define XA_PCMSAMPLEFORMAT_FIXED_28         ((XAuint16) 0x001C)
    379 #define XA_PCMSAMPLEFORMAT_FIXED_32         ((XAuint16) 0x0020)
    380 
    381 typedef struct XADataFormat_PCM_ {
    382     XAuint32 formatType;
    383     XAuint32 numChannels;
    384     XAuint32 samplesPerSec;
    385     XAuint32 bitsPerSample;
    386     XAuint32 containerSize;
    387     XAuint32 channelMask;
    388     XAuint32 endianness;
    389 } XADataFormat_PCM;
    390 
    391 #define XA_COLORFORMAT_UNUSED                   ((XAuint32) 0x00000000)
    392 #define XA_COLORFORMAT_MONOCHROME               ((XAuint32) 0x00000001)
    393 #define XA_COLORFORMAT_8BITRGB332               ((XAuint32) 0x00000002)
    394 #define XA_COLORFORMAT_12BITRGB444              ((XAuint32) 0x00000003)
    395 #define XA_COLORFORMAT_16BITARGB4444            ((XAuint32) 0x00000004)
    396 #define XA_COLORFORMAT_16BITARGB1555            ((XAuint32) 0x00000005)
    397 #define XA_COLORFORMAT_16BITRGB565              ((XAuint32) 0x00000006)
    398 #define XA_COLORFORMAT_16BITBGR565              ((XAuint32) 0x00000007)
    399 #define XA_COLORFORMAT_18BITRGB666              ((XAuint32) 0x00000008)
    400 #define XA_COLORFORMAT_18BITARGB1665            ((XAuint32) 0x00000009)
    401 #define XA_COLORFORMAT_19BITARGB1666            ((XAuint32) 0x0000000A)
    402 #define XA_COLORFORMAT_24BITRGB888              ((XAuint32) 0x0000000B)
    403 #define XA_COLORFORMAT_24BITBGR888              ((XAuint32) 0x0000000C)
    404 #define XA_COLORFORMAT_24BITARGB1887            ((XAuint32) 0x0000000D)
    405 #define XA_COLORFORMAT_25BITARGB1888            ((XAuint32) 0x0000000E)
    406 #define XA_COLORFORMAT_32BITBGRA8888            ((XAuint32) 0x0000000F)
    407 #define XA_COLORFORMAT_32BITARGB8888            ((XAuint32) 0x00000010)
    408 #define XA_COLORFORMAT_YUV411PLANAR             ((XAuint32) 0x00000011)
    409 #define XA_COLORFORMAT_YUV420PLANAR             ((XAuint32) 0x00000013)
    410 #define XA_COLORFORMAT_YUV420SEMIPLANAR         ((XAuint32) 0x00000015)
    411 #define XA_COLORFORMAT_YUV422PLANAR             ((XAuint32) 0x00000016)
    412 #define XA_COLORFORMAT_YUV422SEMIPLANAR         ((XAuint32) 0x00000018)
    413 #define XA_COLORFORMAT_YCBYCR                   ((XAuint32) 0x00000019)
    414 #define XA_COLORFORMAT_YCRYCB                   ((XAuint32) 0x0000001A)
    415 #define XA_COLORFORMAT_CBYCRY                   ((XAuint32) 0x0000001B)
    416 #define XA_COLORFORMAT_CRYCBY                   ((XAuint32) 0x0000001C)
    417 #define XA_COLORFORMAT_YUV444INTERLEAVED        ((XAuint32) 0x0000001D)
    418 #define XA_COLORFORMAT_RAWBAYER8BIT             ((XAuint32) 0x0000001E)
    419 #define XA_COLORFORMAT_RAWBAYER10BIT            ((XAuint32) 0x0000001F)
    420 #define XA_COLORFORMAT_RAWBAYER8BITCOMPRESSED   ((XAuint32) 0x00000020)
    421 #define XA_COLORFORMAT_L2                       ((XAuint32) 0x00000021)
    422 #define XA_COLORFORMAT_L4                       ((XAuint32) 0x00000022)
    423 #define XA_COLORFORMAT_L8                       ((XAuint32) 0x00000023)
    424 #define XA_COLORFORMAT_L16                      ((XAuint32) 0x00000024)
    425 #define XA_COLORFORMAT_L24                      ((XAuint32) 0x00000025)
    426 #define XA_COLORFORMAT_L32                      ((XAuint32) 0x00000026)
    427 #define XA_COLORFORMAT_18BITBGR666              ((XAuint32) 0x00000029)
    428 #define XA_COLORFORMAT_24BITARGB6666            ((XAuint32) 0x0000002A)
    429 #define XA_COLORFORMAT_24BITABGR6666            ((XAuint32) 0x0000002B)
    430 
    431 typedef struct XADataFormat_RawImage_ {
    432     XAuint32 formatType;
    433     XAuint32 colorFormat;
    434     XAuint32 height;
    435     XAuint32 width;
    436     XAuint32 stride;
    437 } XADataFormat_RawImage;
    438 
    439 typedef struct XADataLocator_Address_ {
    440     XAuint32 locatorType;
    441     void * pAddress;
    442     XAuint32 length;
    443 } XADataLocator_Address;
    444 
    445 #define XA_IODEVICE_AUDIOINPUT          ((XAuint32) 0x00000001)
    446 #define XA_IODEVICE_LEDARRAY            ((XAuint32) 0x00000002)
    447 #define XA_IODEVICE_VIBRA               ((XAuint32) 0x00000003)
    448 #define XA_IODEVICE_CAMERA              ((XAuint32) 0x00000004)
    449 #define XA_IODEVICE_RADIO               ((XAuint32) 0x00000005)
    450 
    451 typedef struct XADataLocator_IODevice_ {
    452     XAuint32 locatorType;
    453     XAuint32 deviceType;
    454     XAuint32 deviceID;
    455     XAObjectItf device;
    456 } XADataLocator_IODevice;
    457 
    458 typedef void * XANativeHandle;
    459 
    460 typedef struct XADataLocator_NativeDisplay_{
    461     XAuint32 locatorType;
    462     XANativeHandle hWindow;
    463     XANativeHandle hDisplay;
    464 } XADataLocator_NativeDisplay;
    465 
    466 typedef struct XADataLocator_OutputMix {
    467     XAuint32 locatorType;
    468     XAObjectItf outputMix;
    469 } XADataLocator_OutputMix;
    470 
    471 typedef struct XADataLocator_URI_ {
    472     XAuint32 locatorType;
    473     XAchar * URI;
    474 } XADataLocator_URI;
    475 
    476 
    477 /* ENGINE */
    478 
    479 #define XA_DEFAULTDEVICEID_AUDIOINPUT   ((XAuint32) 0xFFFFFFFF)
    480 #define XA_DEFAULTDEVICEID_AUDIOOUTPUT  ((XAuint32) 0xFFFFFFFE)
    481 #define XA_DEFAULTDEVICEID_LED          ((XAuint32) 0xFFFFFFFD)
    482 #define XA_DEFAULTDEVICEID_VIBRA        ((XAuint32) 0xFFFFFFFC)
    483 #define XA_DEFAULTDEVICEID_CAMERA       ((XAuint32) 0xFFFFFFFB)
    484 
    485 #define XA_ENGINEOPTION_THREADSAFE      ((XAuint32) 0x00000001)
    486 #define XA_ENGINEOPTION_LOSSOFCONTROL   ((XAuint32) 0x00000002)
    487 
    488 #define XA_OBJECTID_ENGINE              ((XAuint32) 0x00000001)
    489 #define XA_OBJECTID_LEDDEVICE           ((XAuint32) 0x00000002)
    490 #define XA_OBJECTID_VIBRADEVICE         ((XAuint32) 0x00000003)
    491 #define XA_OBJECTID_MEDIAPLAYER         ((XAuint32) 0x00000004)
    492 #define XA_OBJECTID_MEDIARECORDER       ((XAuint32) 0x00000005)
    493 #define XA_OBJECTID_RADIODEVICE         ((XAuint32) 0x00000006)
    494 #define XA_OBJECTID_OUTPUTMIX           ((XAuint32) 0x00000007)
    495 #define XA_OBJECTID_METADATAEXTRACTOR   ((XAuint32) 0x00000008)
    496 #define XA_OBJECTID_CAMERADEVICE        ((XAuint32) 0x00000009)
    497 
    498 #define XA_PROFILES_MEDIA_PLAYER            ((XAint16) 0x0001)
    499 #define XA_PROFILES_MEDIA_PLAYER_RECORDER   ((XAint16) 0x0002)
    500 #define XA_PROFILES_PLUS_MIDI               ((XAint16) 0x0004)
    501 
    502 typedef struct XAEngineOption_ {
    503     XAuint32 feature;
    504     XAuint32 data;
    505 } XAEngineOption;
    506 
    507 XA_API XAresult XAAPIENTRY xaCreateEngine(
    508     XAObjectItf * pEngine,
    509     XAuint32 numOptions,
    510     const XAEngineOption * pEngineOptions,
    511     XAuint32 numInterfaces,
    512     const XAInterfaceID * pInterfaceIds,
    513     const XAboolean * pInterfaceRequired
    514 );
    515 
    516 XA_API XAresult XAAPIENTRY xaQueryNumSupportedEngineInterfaces(
    517     XAuint32 * pNumSupportedInterfaces
    518 );
    519 
    520 XA_API XAresult XAAPIENTRY xaQuerySupportedEngineInterfaces(
    521     XAuint32 index,
    522     XAInterfaceID * pInterfaceId
    523 );
    524 
    525 typedef struct XALEDDescriptor_ {
    526     XAuint8 ledCount;
    527     XAuint8 primaryLED;
    528     XAuint32 colorMask;
    529 } XALEDDescriptor;
    530 
    531 typedef struct XAVibraDescriptor_ {
    532     XAboolean supportsFrequency;
    533     XAboolean supportsIntensity;
    534     XAmilliHertz minFrequency;
    535     XAmilliHertz maxFrequency;
    536 } XAVibraDescriptor;
    537 
    538 
    539 XA_API extern const XAInterfaceID XA_IID_ENGINE;
    540 
    541 struct XAEngineItf_;
    542 typedef const struct XAEngineItf_ * const * XAEngineItf;
    543 
    544 struct XAEngineItf_ {
    545     XAresult (*CreateCameraDevice) (
    546         XAEngineItf self,
    547         XAObjectItf * pDevice,
    548         XAuint32 deviceID,
    549         XAuint32 numInterfaces,
    550         const XAInterfaceID * pInterfaceIds,
    551         const XAboolean * pInterfaceRequired
    552     );
    553     XAresult (*CreateRadioDevice) (
    554         XAEngineItf self,
    555         XAObjectItf * pDevice,
    556         XAuint32 numInterfaces,
    557         const XAInterfaceID * pInterfaceIds,
    558         const XAboolean * pInterfaceRequired
    559     );
    560     XAresult (*CreateLEDDevice) (
    561         XAEngineItf self,
    562         XAObjectItf * pDevice,
    563         XAuint32 deviceID,
    564         XAuint32 numInterfaces,
    565         const XAInterfaceID * pInterfaceIds,
    566         const XAboolean * pInterfaceRequired
    567     );
    568        XAresult (*CreateVibraDevice) (
    569         XAEngineItf self,
    570         XAObjectItf * pDevice,
    571         XAuint32 deviceID,
    572         XAuint32 numInterfaces,
    573         const XAInterfaceID * pInterfaceIds,
    574         const XAboolean * pInterfaceRequired
    575     );
    576     XAresult (*CreateMediaPlayer) (
    577         XAEngineItf self,
    578         XAObjectItf * pPlayer,
    579         XADataSource * pDataSrc,
    580         XADataSource * pBankSrc,
    581         XADataSink * pAudioSnk,
    582         XADataSink * pImageVideoSnk,
    583         XADataSink * pVibra,
    584         XADataSink * pLEDArray,
    585         XAuint32 numInterfaces,
    586         const XAInterfaceID * pInterfaceIds,
    587         const XAboolean * pInterfaceRequired
    588     );
    589     XAresult (*CreateMediaRecorder) (
    590         XAEngineItf self,
    591         XAObjectItf * pRecorder,
    592         XADataSource * pAudioSrc,
    593         XADataSource * pImageVideoSrc,
    594         XADataSink * pDataSnk,
    595         XAuint32 numInterfaces,
    596         const XAInterfaceID * pInterfaceIds,
    597         const XAboolean * pInterfaceRequired
    598     );
    599     XAresult (*CreateOutputMix) (
    600         XAEngineItf self,
    601         XAObjectItf * pMix,
    602         XAuint32 numInterfaces,
    603         const XAInterfaceID * pInterfaceIds,
    604         const XAboolean * pInterfaceRequired
    605     );
    606     XAresult (*CreateMetadataExtractor) (
    607         XAEngineItf self,
    608         XAObjectItf * pMetadataExtractor,
    609         XADataSource * pDataSource,
    610         XAuint32 numInterfaces,
    611         const XAInterfaceID * pInterfaceIds,
    612         const XAboolean * pInterfaceRequired
    613     );
    614     XAresult (*CreateExtensionObject) (
    615         XAEngineItf self,
    616         XAObjectItf * pObject,
    617         void * pParameters,
    618         XAuint32 objectID,
    619         XAuint32 numInterfaces,
    620         const XAInterfaceID * pInterfaceIds,
    621         const XAboolean * pInterfaceRequired
    622     );
    623     XAresult (*GetImplementationInfo) (
    624         XAEngineItf self,
    625         XAuint32 * pMajor,
    626         XAuint32 * pMinor,
    627         XAuint32 * pStep,
    628         const XAchar * pImplementationText
    629     );
    630     XAresult (*QuerySupportedProfiles) (
    631         XAEngineItf self,
    632         XAint16 * pProfilesSupported
    633     );
    634     XAresult (*QueryNumSupportedInterfaces) (
    635         XAEngineItf self,
    636         XAuint32 objectID,
    637         XAuint32 * pNumSupportedInterfaces
    638     );
    639     XAresult (*QuerySupportedInterfaces) (
    640         XAEngineItf self,
    641         XAuint32 objectID,
    642         XAuint32 index,
    643         XAInterfaceID * pInterfaceId
    644     );
    645     XAresult (*QueryNumSupportedExtensions) (
    646         XAEngineItf self,
    647         XAuint32 * pNumExtensions
    648     );
    649     XAresult (*QuerySupportedExtension) (
    650         XAEngineItf self,
    651         XAuint32 index,
    652         XAchar * pExtensionName,
    653         XAint16 * pNameLength
    654     );
    655     XAresult (*IsExtensionSupported) (
    656         XAEngineItf self,
    657         const XAchar * pExtensionName,
    658         XAboolean * pSupported
    659     );
    660     XAresult (*QueryLEDCapabilities) (
    661         XAEngineItf self,
    662         XAuint32 *pIndex,
    663         XAuint32 * pLEDDeviceID,
    664         XALEDDescriptor * pDescriptor
    665     );
    666     XAresult (*QueryVibraCapabilities) (
    667         XAEngineItf self,
    668         XAuint32 *pIndex,
    669         XAuint32 * pVibraDeviceID,
    670         XAVibraDescriptor * pDescriptor
    671     );
    672 };
    673 
    674 /* THREAD SYNC */
    675 
    676 XA_API extern const XAInterfaceID XA_IID_THREADSYNC;
    677 
    678 struct XAThreadSyncItf_;
    679 typedef const struct XAThreadSyncItf_ * const * XAThreadSyncItf;
    680 
    681 struct XAThreadSyncItf_ {
    682     XAresult (*EnterCriticalSection) (
    683         XAThreadSyncItf self
    684     );
    685     XAresult (*ExitCriticalSection) (
    686         XAThreadSyncItf self
    687     );
    688 };
    689 
    690 
    691 
    692   /*****************************************************************/
    693   /* PLAYBACK RELATED INTERFACES, STRUCTS AND DEFINES              */
    694   /*****************************************************************/
    695 
    696 /* PLAY */
    697 
    698 #define XA_TIME_UNKNOWN                     ((XAuint32) 0xFFFFFFFF)
    699 
    700 #define XA_PLAYEVENT_HEADATEND              ((XAuint32) 0x00000001)
    701 #define XA_PLAYEVENT_HEADATMARKER           ((XAuint32) 0x00000002)
    702 #define XA_PLAYEVENT_HEADATNEWPOS           ((XAuint32) 0x00000004)
    703 #define XA_PLAYEVENT_HEADMOVING             ((XAuint32) 0x00000008)
    704 #define XA_PLAYEVENT_HEADSTALLED            ((XAuint32) 0x00000010)
    705 
    706 #define XA_PLAYSTATE_STOPPED                ((XAuint32) 0x00000001)
    707 #define XA_PLAYSTATE_PAUSED                 ((XAuint32) 0x00000002)
    708 #define XA_PLAYSTATE_PLAYING                ((XAuint32) 0x00000003)
    709 
    710 #define XA_PREFETCHEVENT_STATUSCHANGE       ((XAuint32) 0x00000001)
    711 #define XA_PREFETCHEVENT_FILLLEVELCHANGE    ((XAuint32) 0x00000002)
    712 
    713 #define XA_PREFETCHSTATUS_UNDERFLOW         ((XAuint32) 0x00000001)
    714 #define XA_PREFETCHSTATUS_SUFFICIENTDATA    ((XAuint32) 0x00000002)
    715 #define XA_PREFETCHSTATUS_OVERFLOW          ((XAuint32) 0x00000003)
    716 
    717 #define XA_SEEKMODE_FAST                    ((XAuint32) 0x0001)
    718 #define XA_SEEKMODE_ACCURATE                ((XAuint32) 0x0002)
    719 
    720 XA_API extern const XAInterfaceID XA_IID_PLAY;
    721 
    722 struct XAPlayItf_;
    723 typedef const struct XAPlayItf_ * const * XAPlayItf;
    724 
    725 typedef void (XAAPIENTRY * xaPlayCallback) (
    726     XAPlayItf caller,
    727     void * pContext,
    728     XAuint32 event
    729 );
    730 
    731 struct XAPlayItf_ {
    732     XAresult (*SetPlayState) (
    733         XAPlayItf self,
    734         XAuint32 state
    735     );
    736     XAresult (*GetPlayState) (
    737         XAPlayItf self,
    738         XAuint32 * pState
    739     );
    740     XAresult (*GetDuration) (
    741         XAPlayItf self,
    742         XAmillisecond * pMsec
    743     );
    744     XAresult (*GetPosition) (
    745         XAPlayItf self,
    746         XAmillisecond * pMsec
    747     );
    748     XAresult (*RegisterCallback) (
    749         XAPlayItf self,
    750         xaPlayCallback callback,
    751         void * pContext
    752     );
    753     XAresult (*SetCallbackEventsMask) (
    754         XAPlayItf self,
    755         XAuint32 eventFlags
    756     );
    757     XAresult (*GetCallbackEventsMask) (
    758         XAPlayItf self,
    759         XAuint32 * pEventFlags
    760     );
    761     XAresult (*SetMarkerPosition) (
    762         XAPlayItf self,
    763         XAmillisecond mSec
    764     );
    765     XAresult (*ClearMarkerPosition) (
    766         XAPlayItf self
    767     );
    768     XAresult (*GetMarkerPosition) (
    769         XAPlayItf self,
    770         XAmillisecond * pMsec
    771     );
    772     XAresult (*SetPositionUpdatePeriod) (
    773         XAPlayItf self,
    774         XAmillisecond mSec
    775     );
    776     XAresult (*GetPositionUpdatePeriod) (
    777         XAPlayItf self,
    778         XAmillisecond * pMsec
    779     );
    780 };
    781 
    782 /* PLAYBACK RATE */
    783 
    784 #define XA_RATEPROP_STAGGEREDVIDEO      ((XAuint32) 0x00000001)
    785 #define XA_RATEPROP_SMOOTHVIDEO         ((XAuint32) 0x00000002)
    786 #define XA_RATEPROP_SILENTAUDIO         ((XAuint32) 0x00000100)
    787 #define XA_RATEPROP_STAGGEREDAUDIO      ((XAuint32) 0x00000200)
    788 #define XA_RATEPROP_NOPITCHCORAUDIO     ((XAuint32) 0x00000400)
    789 #define XA_RATEPROP_PITCHCORAUDIO       ((XAuint32) 0x00000800)
    790 
    791 XA_API extern const XAInterfaceID XA_IID_PLAYBACKRATE;
    792 
    793 struct XAPlaybackRateItf_;
    794 typedef const struct XAPlaybackRateItf_ * const * XAPlaybackRateItf;
    795 
    796 struct XAPlaybackRateItf_ {
    797     XAresult (*SetRate) (
    798         XAPlaybackRateItf self,
    799         XApermille rate
    800     );
    801     XAresult (*GetRate) (
    802         XAPlaybackRateItf self,
    803         XApermille * pRate
    804     );
    805     XAresult (*SetPropertyConstraints) (
    806         XAPlaybackRateItf self,
    807         XAuint32 constraints
    808     );
    809     XAresult (*GetProperties) (
    810         XAPlaybackRateItf self,
    811         XAuint32 * pProperties
    812     );
    813     XAresult (*GetCapabilitiesOfRate) (
    814         XAPlaybackRateItf self,
    815         XApermille rate,
    816         XAuint32 * pCapabilities
    817     );
    818     XAresult (*GetRateRange) (
    819         XAPlaybackRateItf self,
    820         XAuint8 index,
    821         XApermille * pMinRate,
    822         XApermille * pMaxRate,
    823         XApermille * pStepSize,
    824         XAuint32 * pCapabilities
    825     );
    826 };
    827 
    828 /* PREFETCH STATUS */
    829 
    830 XA_API extern const XAInterfaceID XA_IID_PREFETCHSTATUS;
    831 
    832 struct XAPrefetchStatusItf_;
    833 typedef const struct XAPrefetchStatusItf_
    834     * const * XAPrefetchStatusItf;
    835 
    836 typedef void (XAAPIENTRY * xaPrefetchCallback) (
    837     XAPrefetchStatusItf caller,
    838     void * pContext,
    839     XAuint32 event
    840 );
    841 
    842 struct XAPrefetchStatusItf_ {
    843     XAresult (*GetPrefetchStatus) (
    844         XAPrefetchStatusItf self,
    845         XAuint32 * pStatus
    846     );
    847     XAresult (*GetFillLevel) (
    848         XAPrefetchStatusItf self,
    849         XApermille * pLevel
    850     );
    851     XAresult (*RegisterCallback) (
    852         XAPrefetchStatusItf self,
    853         xaPrefetchCallback callback,
    854         void * pContext
    855     );
    856     XAresult (*SetCallbackEventsMask) (
    857         XAPrefetchStatusItf self,
    858         XAuint32 eventFlags
    859     );
    860     XAresult (*GetCallbackEventsMask) (
    861         XAPrefetchStatusItf self,
    862         XAuint32 * pEventFlags
    863     );
    864     XAresult (*SetFillUpdatePeriod) (
    865         XAPrefetchStatusItf self,
    866         XApermille period
    867     );
    868     XAresult (*GetFillUpdatePeriod) (
    869         XAPrefetchStatusItf self,
    870         XApermille * pPeriod
    871     );
    872 };
    873 
    874 /* SEEK */
    875 
    876 XA_API extern const XAInterfaceID XA_IID_SEEK;
    877 
    878 struct XASeekItf_;
    879 typedef const struct XASeekItf_ * const * XASeekItf;
    880 
    881 struct XASeekItf_ {
    882     XAresult (*SetPosition) (
    883         XASeekItf self,
    884         XAmillisecond pos,
    885         XAuint32 seekMode
    886     );
    887     XAresult (*SetLoop) (
    888         XASeekItf self,
    889         XAboolean loopEnable,
    890         XAmillisecond startPos,
    891         XAmillisecond endPos
    892     );
    893     XAresult (*GetLoop) (
    894         XASeekItf self,
    895         XAboolean * pLoopEnabled,
    896         XAmillisecond * pStartPos,
    897         XAmillisecond * pEndPos
    898     );
    899 };
    900 
    901 /* VOLUME */
    902 
    903 XA_API extern const XAInterfaceID XA_IID_VOLUME;
    904 
    905 struct XAVolumeItf_;
    906 typedef const struct XAVolumeItf_ * const * XAVolumeItf;
    907 
    908 struct XAVolumeItf_ {
    909     XAresult (*SetVolumeLevel) (
    910         XAVolumeItf self,
    911         XAmillibel level
    912     );
    913     XAresult (*GetVolumeLevel) (
    914         XAVolumeItf self,
    915         XAmillibel * pLevel
    916     );
    917     XAresult (*GetMaxVolumeLevel) (
    918         XAVolumeItf self,
    919         XAmillibel * pMaxLevel
    920     );
    921     XAresult (*SetMute) (
    922         XAVolumeItf self,
    923         XAboolean mute
    924     );
    925     XAresult (*GetMute) (
    926         XAVolumeItf self,
    927         XAboolean * pMute
    928     );
    929     XAresult (*EnableStereoPosition) (
    930         XAVolumeItf self,
    931         XAboolean enable
    932     );
    933     XAresult (*IsEnabledStereoPosition) (
    934         XAVolumeItf self,
    935         XAboolean * pEnable
    936     );
    937     XAresult (*SetStereoPosition) (
    938         XAVolumeItf self,
    939         XApermille stereoPosition
    940     );
    941     XAresult (*GetStereoPosition) (
    942         XAVolumeItf self,
    943         XApermille * pStereoPosition
    944     );
    945 };
    946 
    947 /* IMAGE CONTROL */
    948 
    949 XA_API extern const XAInterfaceID XA_IID_IMAGECONTROLS;
    950 
    951 struct XAImageControlsItf_;
    952 typedef const struct XAImageControlsItf_ * const * XAImageControlsItf;
    953 
    954 struct XAImageControlsItf_ {
    955     XAresult (*SetBrightness) (
    956         XAImageControlsItf self,
    957         XAuint32 brightness
    958     );
    959     XAresult (*GetBrightness) (
    960         XAImageControlsItf self,
    961         XAuint32 * pBrightness
    962     );
    963     XAresult (*SetContrast) (
    964         XAImageControlsItf self,
    965         XAint32 contrast
    966     );
    967     XAresult (*GetContrast) (
    968         XAImageControlsItf self,
    969         XAint32 * pContrast
    970     );
    971     XAresult (*SetGamma) (
    972         XAImageControlsItf self,
    973         XApermille gamma
    974     );
    975     XAresult (*GetGamma) (
    976         XAImageControlsItf self,
    977         XApermille * pGamma
    978     );
    979     XAresult (*GetSupportedGammaSettings) (
    980         XAImageControlsItf self,
    981         XApermille * pMinValue,
    982         XApermille * pMaxValue,
    983         XAuint32 * pNumSettings,
    984         XApermille ** ppSettings
    985     );
    986 };
    987 
    988 /* IMAGE EFFECT */
    989 
    990 #define XA_IMAGEEFFECT_MONOCHROME       ((XAuint32) 0x00000001)
    991 #define XA_IMAGEEFFECT_NEGATIVE         ((XAuint32) 0x00000002)
    992 #define XA_IMAGEEFFECT_SEPIA            ((XAuint32) 0x00000003)
    993 #define XA_IMAGEEFFECT_EMBOSS           ((XAuint32) 0x00000004)
    994 #define XA_IMAGEEFFECT_PAINTBRUSH       ((XAuint32) 0x00000005)
    995 #define XA_IMAGEEFFECT_SOLARIZE         ((XAuint32) 0x00000006)
    996 #define XA_IMAGEEFFECT_CARTOON          ((XAuint32) 0x00000007)
    997 
    998 XA_API extern const XAInterfaceID XA_IID_IMAGEEFFECTS;
    999 
   1000 struct XAImageEffectsItf_;
   1001 typedef const struct XAImageEffectsItf_ * const * XAImageEffectsItf;
   1002 
   1003 struct XAImageEffectsItf_ {
   1004     XAresult (*QuerySupportedImageEffects) (
   1005         XAImageEffectsItf self,
   1006         XAuint32 index,
   1007         XAuint32 * pImageEffectId
   1008     );
   1009     XAresult (*EnableImageEffect) (
   1010         XAImageEffectsItf self,
   1011         XAuint32 imageEffectID
   1012     );
   1013     XAresult (*DisableImageEffect) (
   1014         XAImageEffectsItf self,
   1015         XAuint32 imageEffectID
   1016     );
   1017     XAresult (*IsImageEffectEnabled) (
   1018         XAImageEffectsItf self,
   1019         XAuint32 imageEffectID,
   1020         XAboolean * pEnabled
   1021     );
   1022 };
   1023 
   1024 /* VIDEO POST PROCESSING */
   1025 
   1026 #define XA_VIDEOMIRROR_NONE             ((XAuint32) 0x00000001)
   1027 #define XA_VIDEOMIRROR_VERTICAL         ((XAuint32) 0x00000002)
   1028 #define XA_VIDEOMIRROR_HORIZONTAL       ((XAuint32) 0x00000003)
   1029 #define XA_VIDEOMIRROR_BOTH             ((XAuint32) 0x00000004)
   1030 
   1031 #define XA_VIDEOSCALE_STRETCH           ((XAuint32) 0x00000001)
   1032 #define XA_VIDEOSCALE_FIT               ((XAuint32) 0x00000002)
   1033 #define XA_VIDEOSCALE_CROP              ((XAuint32) 0x00000003)
   1034 
   1035 #define XA_RENDERINGHINT_NONE           ((XAuint32) 0x00000000)
   1036 #define XA_RENDERINGHINT_ANTIALIASING   ((XAuint32) 0x00000001)
   1037 
   1038 typedef struct XARectangle_ {
   1039     XAuint32 left;
   1040     XAuint32 top;
   1041     XAuint32 width;
   1042     XAuint32 height;
   1043 } XARectangle;
   1044 
   1045 XA_API extern const XAInterfaceID XA_IID_VIDEOPOSTPROCESSING;
   1046 
   1047 struct XAVideoPostProcessingItf_;
   1048 typedef const struct XAVideoPostProcessingItf_ * const * XAVideoPostProcessingItf;
   1049 
   1050 struct XAVideoPostProcessingItf_ {
   1051     XAresult (*SetRotation) (
   1052         XAVideoPostProcessingItf self,
   1053         XAmillidegree rotation
   1054     );
   1055     XAresult (*IsArbitraryRotationSupported) (
   1056         XAVideoPostProcessingItf self,
   1057         XAboolean *pSupported
   1058     );
   1059     XAresult (*SetScaleOptions) (
   1060         XAVideoPostProcessingItf self,
   1061         XAuint32 scaleOptions,
   1062         XAuint32 backgroundColor,
   1063         XAuint32 renderingHints
   1064     );
   1065     XAresult (*SetSourceRectangle) (
   1066         XAVideoPostProcessingItf self,
   1067         const XARectangle *pSrcRect
   1068     );
   1069     XAresult (*SetDestinationRectangle) (
   1070         XAVideoPostProcessingItf self,
   1071         const XARectangle *pDestRect
   1072     );
   1073     XAresult (*SetMirror) (
   1074         XAVideoPostProcessingItf self,
   1075         XAuint32 mirror
   1076     );
   1077     XAresult (*Commit) (
   1078         XAVideoPostProcessingItf self
   1079     );
   1080 };
   1081 
   1082 
   1083 
   1084   /*****************************************************************/
   1085   /* CAPTURING INTERFACES, STRUCTS AND DEFINES                     */
   1086   /*****************************************************************/
   1087 
   1088 /* RECORD */
   1089 
   1090 #define XA_RECORDEVENT_HEADATLIMIT          ((XAuint32) 0x00000001)
   1091 #define XA_RECORDEVENT_HEADATMARKER         ((XAuint32) 0x00000002)
   1092 #define XA_RECORDEVENT_HEADATNEWPOS         ((XAuint32) 0x00000004)
   1093 #define XA_RECORDEVENT_HEADMOVING           ((XAuint32) 0x00000008)
   1094 #define XA_RECORDEVENT_HEADSTALLED          ((XAuint32) 0x00000010)
   1095 #define XA_RECORDEVENT_BUFFER_FULL          ((XAuint32) 0x00000020)
   1096 
   1097 #define XA_RECORDSTATE_STOPPED          ((XAuint32) 0x00000001)
   1098 #define XA_RECORDSTATE_PAUSED           ((XAuint32) 0x00000002)
   1099 #define XA_RECORDSTATE_RECORDING        ((XAuint32) 0x00000003)
   1100 
   1101 XA_API extern const XAInterfaceID XA_IID_RECORD;
   1102 
   1103 struct XARecordItf_;
   1104 typedef const struct XARecordItf_ * const * XARecordItf;
   1105 
   1106 typedef void (XAAPIENTRY * xaRecordCallback) (
   1107     XARecordItf caller,
   1108     void * pContext,
   1109     XAuint32 event
   1110 );
   1111 
   1112 struct XARecordItf_ {
   1113     XAresult (*SetRecordState) (
   1114         XARecordItf self,
   1115         XAuint32 state
   1116     );
   1117     XAresult (*GetRecordState) (
   1118         XARecordItf self,
   1119         XAuint32 * pState
   1120     );
   1121     XAresult (*SetDurationLimit) (
   1122         XARecordItf self,
   1123         XAmillisecond msec
   1124     );
   1125     XAresult (*GetPosition) (
   1126         XARecordItf self,
   1127         XAmillisecond * pMsec
   1128     );
   1129     XAresult (*RegisterCallback) (
   1130         XARecordItf self,
   1131         xaRecordCallback callback,
   1132         void * pContext
   1133     );
   1134     XAresult (*SetCallbackEventsMask) (
   1135         XARecordItf self,
   1136         XAuint32 eventFlags
   1137     );
   1138     XAresult (*GetCallbackEventsMask) (
   1139         XARecordItf self,
   1140         XAuint32 * pEventFlags
   1141     );
   1142     XAresult (*SetMarkerPosition) (
   1143         XARecordItf self,
   1144         XAmillisecond mSec
   1145     );
   1146     XAresult (*ClearMarkerPosition) (
   1147         XARecordItf self
   1148     );
   1149     XAresult (*GetMarkerPosition) (
   1150         XARecordItf self,
   1151         XAmillisecond * pMsec
   1152     );
   1153     XAresult (*SetPositionUpdatePeriod) (
   1154         XARecordItf self,
   1155         XAmillisecond mSec
   1156     );
   1157     XAresult (*GetPositionUpdatePeriod) (
   1158         XARecordItf self,
   1159         XAmillisecond * pMsec
   1160     );
   1161 };
   1162 
   1163 /* SNAPSHOT */
   1164 
   1165 XA_API extern const XAInterfaceID XA_IID_SNAPSHOT;
   1166 
   1167 struct XASnapshotItf_;
   1168 typedef const struct XASnapshotItf_ * const * XASnapshotItf;
   1169 
   1170 typedef void (XAAPIENTRY * xaSnapshotInitiatedCallback) (
   1171     XASnapshotItf caller,
   1172     void * context
   1173 );
   1174 
   1175 typedef void (XAAPIENTRY * xaSnapshotTakenCallback) (
   1176     XASnapshotItf caller,
   1177     void * context,
   1178     XAuint32 numberOfPicsTaken,
   1179     const XADataSink * image
   1180 );
   1181 
   1182 struct XASnapshotItf_ {
   1183     XAresult (*InitiateSnapshot) (
   1184         XASnapshotItf self,
   1185         XAuint32 numberOfPictures,
   1186         XAuint32 fps,
   1187         XAboolean freezeViewFinder,
   1188         XADataSink sink,
   1189         xaSnapshotInitiatedCallback initiatedCallback,
   1190         xaSnapshotTakenCallback takenCallback,
   1191         void * pContext
   1192     );
   1193     XAresult (*TakeSnapshot) (
   1194         XASnapshotItf self
   1195     );
   1196     XAresult (*CancelSnapshot) (
   1197         XASnapshotItf self
   1198     );
   1199     XAresult (*ReleaseBuffers) (
   1200         XASnapshotItf self,
   1201         XADataSink * image
   1202     );
   1203     XAresult (*GetMaxPicsPerBurst) (
   1204         XASnapshotItf self,
   1205         XAuint32 * maxNumberOfPictures
   1206     );
   1207     XAresult (*GetBurstFPSRange) (
   1208         XASnapshotItf self,
   1209         XAuint32 * minFPS,
   1210         XAuint32 * maxFPS
   1211     );
   1212     XAresult (*SetShutterFeedback) (
   1213         XASnapshotItf self,
   1214         XAboolean enabled
   1215     );
   1216     XAresult (*GetShutterFeedback) (
   1217         XASnapshotItf self,
   1218         XAboolean * enabled
   1219     );
   1220 };
   1221 
   1222 
   1223 
   1224   /*****************************************************************/
   1225   /* METADATA RELATED INTERFACES, STRUCTS AND DEFINES              */
   1226   /*****************************************************************/
   1227 
   1228 /* METADATA (EXTRACTION, INSERTION, TRAVERSAL) */
   1229 
   1230 #define XA_NODE_PARENT                  ((XAuint32) 0xFFFFFFFF)
   1231 
   1232 #define XA_ROOT_NODE_ID                 ((XAint32) 0x7FFFFFFF)
   1233 
   1234 #define XA_NODETYPE_UNSPECIFIED         ((XAuint32) 0x00000001)
   1235 #define XA_NODETYPE_AUDIO               ((XAuint32) 0x00000002)
   1236 #define XA_NODETYPE_VIDEO               ((XAuint32) 0x00000003)
   1237 #define XA_NODETYPE_IMAGE               ((XAuint32) 0x00000004)
   1238 
   1239 #define XA_CHARACTERENCODING_UNKNOWN            ((XAuint32) 0x00000000)
   1240 #define XA_CHARACTERENCODING_BINARY             ((XAuint32) 0x00000001)
   1241 #define XA_CHARACTERENCODING_ASCII              ((XAuint32) 0x00000002)
   1242 #define XA_CHARACTERENCODING_BIG5               ((XAuint32) 0x00000003)
   1243 #define XA_CHARACTERENCODING_CODEPAGE1252       ((XAuint32) 0x00000004)
   1244 #define XA_CHARACTERENCODING_GB2312             ((XAuint32) 0x00000005)
   1245 #define XA_CHARACTERENCODING_HZGB2312           ((XAuint32) 0x00000006)
   1246 #define XA_CHARACTERENCODING_GB12345            ((XAuint32) 0x00000007)
   1247 #define XA_CHARACTERENCODING_GB18030            ((XAuint32) 0x00000008)
   1248 #define XA_CHARACTERENCODING_GBK                ((XAuint32) 0x00000009)
   1249 #define XA_CHARACTERENCODING_IMAPUTF7           ((XAuint32) 0x0000000A)
   1250 #define XA_CHARACTERENCODING_ISO2022JP          ((XAuint32) 0x0000000B)
   1251 #define XA_CHARACTERENCODING_ISO2022JP1         ((XAuint32) 0x0000000B)
   1252 #define XA_CHARACTERENCODING_ISO88591           ((XAuint32) 0x0000000C)
   1253 #define XA_CHARACTERENCODING_ISO885910          ((XAuint32) 0x0000000D)
   1254 #define XA_CHARACTERENCODING_ISO885913          ((XAuint32) 0x0000000E)
   1255 #define XA_CHARACTERENCODING_ISO885914          ((XAuint32) 0x0000000F)
   1256 #define XA_CHARACTERENCODING_ISO885915          ((XAuint32) 0x00000010)
   1257 #define XA_CHARACTERENCODING_ISO88592           ((XAuint32) 0x00000011)
   1258 #define XA_CHARACTERENCODING_ISO88593           ((XAuint32) 0x00000012)
   1259 #define XA_CHARACTERENCODING_ISO88594           ((XAuint32) 0x00000013)
   1260 #define XA_CHARACTERENCODING_ISO88595           ((XAuint32) 0x00000014)
   1261 #define XA_CHARACTERENCODING_ISO88596           ((XAuint32) 0x00000015)
   1262 #define XA_CHARACTERENCODING_ISO88597           ((XAuint32) 0x00000016)
   1263 #define XA_CHARACTERENCODING_ISO88598           ((XAuint32) 0x00000017)
   1264 #define XA_CHARACTERENCODING_ISO88599           ((XAuint32) 0x00000018)
   1265 #define XA_CHARACTERENCODING_ISOEUCJP           ((XAuint32) 0x00000019)
   1266 #define XA_CHARACTERENCODING_SHIFTJIS           ((XAuint32) 0x0000001A)
   1267 #define XA_CHARACTERENCODING_SMS7BIT            ((XAuint32) 0x0000001B)
   1268 #define XA_CHARACTERENCODING_UTF7               ((XAuint32) 0x0000001C)
   1269 #define XA_CHARACTERENCODING_UTF8               ((XAuint32) 0x0000001D)
   1270 #define XA_CHARACTERENCODING_JAVACONFORMANTUTF8 ((XAuint32) 0x0000001E)
   1271 #define XA_CHARACTERENCODING_UTF16BE            ((XAuint32) 0x0000001F)
   1272 #define XA_CHARACTERENCODING_UTF16LE            ((XAuint32) 0x00000020)
   1273 
   1274 #define XA_METADATA_FILTER_KEY          ((XAuint8) 0x01)
   1275 #define XA_METADATA_FILTER_LANG         ((XAuint8) 0x02)
   1276 #define XA_METADATA_FILTER_ENCODING     ((XAuint8) 0x04)
   1277 
   1278 #define XA_METADATATRAVERSALMODE_ALL    ((XAuint32) 0x00000001)
   1279 #define XA_METADATATRAVERSALMODE_NODE   ((XAuint32) 0x00000002)
   1280 
   1281 #ifndef _KHRONOS_KEYS_
   1282 #define _KHRONOS_KEYS_
   1283 #define KHRONOS_TITLE                   "KhronosTitle"
   1284 #define KHRONOS_ALBUM                   "KhronosAlbum"
   1285 #define KHRONOS_TRACK_NUMBER            "KhronosTrackNumber"
   1286 #define KHRONOS_ARTIST                  "KhronosArtist"
   1287 #define KHRONOS_GENRE                   "KhronosGenre"
   1288 #define KHRONOS_YEAR                    "KhronosYear"
   1289 #define KHRONOS_COMMENT                 "KhronosComment"
   1290 #define KHRONOS_ARTIST_URL              "KhronosArtistURL"
   1291 #define KHRONOS_CONTENT_URL             "KhronosContentURL"
   1292 #define KHRONOS_RATING                  "KhronosRating"
   1293 #define KHRONOS_ALBUM_ART               "KhronosAlbumArt"
   1294 #define KHRONOS_COPYRIGHT               "KhronosCopyright"
   1295 #endif /* _KHRONOS_KEYS_ */
   1296 
   1297 
   1298 typedef struct XAMetadataInfo_ {
   1299     XAuint32 size;
   1300     XAuint32 encoding;
   1301     const XAchar langCountry[16];
   1302     XAuint8 data[1];
   1303 } XAMetadataInfo;
   1304 
   1305 XA_API extern const XAInterfaceID XA_IID_METADATAEXTRACTION;
   1306 
   1307 struct XAMetadataExtractionItf_;
   1308 typedef const struct XAMetadataExtractionItf_
   1309     * const * XAMetadataExtractionItf;
   1310 
   1311 struct XAMetadataExtractionItf_ {
   1312     XAresult (*GetItemCount) (
   1313         XAMetadataExtractionItf self,
   1314         XAuint32 * pItemCount
   1315     );
   1316     XAresult (*GetKeySize) (
   1317         XAMetadataExtractionItf self,
   1318         XAuint32 index,
   1319         XAuint32 * pKeySize
   1320     );
   1321     XAresult (*GetKey) (
   1322         XAMetadataExtractionItf self,
   1323         XAuint32 index,
   1324         XAuint32 keySize,
   1325         XAMetadataInfo * pKey
   1326     );
   1327     XAresult (*GetValueSize) (
   1328         XAMetadataExtractionItf self,
   1329         XAuint32 index,
   1330         XAuint32 * pValueSize
   1331     );
   1332     XAresult (*GetValue) (
   1333         XAMetadataExtractionItf self,
   1334         XAuint32 index,
   1335         XAuint32 valueSize,
   1336         XAMetadataInfo * pValue
   1337     );
   1338     XAresult (*AddKeyFilter) (
   1339         XAMetadataExtractionItf self,
   1340         XAuint32 keySize,
   1341         const void * pKey,
   1342         XAuint32 keyEncoding,
   1343         const XAchar * pValueLangCountry,
   1344         XAuint32 valueEncoding,
   1345         XAuint8 filterMask
   1346     );
   1347     XAresult (*ClearKeyFilter) (
   1348         XAMetadataExtractionItf self
   1349     );
   1350 };
   1351 
   1352 
   1353 XA_API extern const XAInterfaceID XA_IID_METADATAINSERTION;
   1354 
   1355 struct XAMetadataInsertionItf_;
   1356 typedef const struct XAMetadataInsertionItf_
   1357     * const * XAMetadataInsertionItf;
   1358 
   1359 typedef void (XAAPIENTRY * xaMetadataInsertionCallback) (
   1360     XAMetadataInsertionItf caller,
   1361     void * pContext,
   1362     XAMetadataInfo * pKey,
   1363     XAMetadataInfo * pValue,
   1364     XAint32 nodeID,
   1365     XAboolean result
   1366 );
   1367 
   1368 struct XAMetadataInsertionItf_ {
   1369     XAresult (*CreateChildNode) (
   1370         XAMetadataInsertionItf self,
   1371         XAint32 parentNodeID,
   1372         XAuint32 type,
   1373         XAchar * mimeType,
   1374         XAint32 * pChildNodeID
   1375     );
   1376     XAresult (*GetSupportedKeysCount) (
   1377         XAMetadataInsertionItf self,
   1378         XAint32 nodeID,
   1379         XAboolean * pFreeKeys,
   1380         XAuint32 * pKeyCount,
   1381         XAuint32 * pEncodingCount
   1382     );
   1383     XAresult (*GetKeySize) (
   1384         XAMetadataInsertionItf self,
   1385         XAint32 nodeID,
   1386         XAuint32 keyIndex,
   1387         XAuint32 * pKeySize
   1388     );
   1389     XAresult (*GetKey) (
   1390         XAMetadataInsertionItf self,
   1391         XAint32 nodeID,
   1392         XAuint32 keyIndex,
   1393         XAuint32 keySize,
   1394         XAMetadataInfo * pKey
   1395     );
   1396     XAresult (*GetFreeKeysEncoding) (
   1397         XAMetadataInsertionItf self,
   1398         XAint32 nodeID,
   1399         XAuint32 encodingIndex,
   1400         XAuint32 * pEncoding
   1401     );
   1402     XAresult (*InsertMetadataItem) (
   1403         XAMetadataInsertionItf self,
   1404         XAint32 nodeID,
   1405         XAMetadataInfo * pKey,
   1406         XAMetadataInfo * pValue,
   1407         XAboolean overwrite
   1408     );
   1409     XAresult (*RegisterCallback) (
   1410         XAMetadataInsertionItf self,
   1411         xaMetadataInsertionCallback callback,
   1412         void * pContext
   1413     );
   1414 };
   1415 
   1416 
   1417 XA_API extern const XAInterfaceID XA_IID_METADATATRAVERSAL;
   1418 
   1419 struct XAMetadataTraversalItf_;
   1420 typedef const struct XAMetadataTraversalItf_
   1421     *  const *  XAMetadataTraversalItf;
   1422 
   1423 struct XAMetadataTraversalItf_ {
   1424     XAresult (*SetMode) (
   1425         XAMetadataTraversalItf self,
   1426         XAuint32 mode
   1427     );
   1428     XAresult (*GetChildCount) (
   1429         XAMetadataTraversalItf self,
   1430         XAuint32 * pCount
   1431     );
   1432     XAresult (*GetChildMIMETypeSize) (
   1433         XAMetadataTraversalItf self,
   1434         XAuint32 index,
   1435         XAuint32 * pSize
   1436     );
   1437     XAresult (*GetChildInfo) (
   1438         XAMetadataTraversalItf self,
   1439         XAuint32 index,
   1440         XAint32 * pNodeID,
   1441         XAuint32 * pType,
   1442         XAuint32 size,
   1443         XAchar * pMimeType
   1444     );
   1445     XAresult (*SetActiveNode) (
   1446         XAMetadataTraversalItf self,
   1447         XAuint32 index
   1448     );
   1449 };
   1450 
   1451 /* DYNAMIC SOURCE */
   1452 
   1453 XA_API extern const XAInterfaceID XA_IID_DYNAMICSOURCE;
   1454 
   1455 struct XADynamicSourceItf_;
   1456 typedef const struct XADynamicSourceItf_ * const * XADynamicSourceItf;
   1457 
   1458 struct XADynamicSourceItf_ {
   1459     XAresult (*SetSource) (
   1460         XADynamicSourceItf self,
   1461         XADataSource * pDataSource
   1462     );
   1463 };
   1464 
   1465 
   1466 
   1467   /*****************************************************************/
   1468   /*  I/O DEVICES RELATED INTERFACES, STRUCTS AND DEFINES          */
   1469   /*****************************************************************/
   1470 
   1471 /* CAMERA AND CAMERA CAPABILITIES */
   1472 
   1473 #define XA_CAMERA_APERTUREMODE_MANUAL               ((XAuint32) 0x00000001)
   1474 #define XA_CAMERA_APERTUREMODE_AUTO                 ((XAuint32) 0x00000002)
   1475 
   1476 #define XA_CAMERA_AUTOEXPOSURESTATUS_SUCCESS        ((XAuint32) 0x00000001)
   1477 #define XA_CAMERA_AUTOEXPOSURESTATUS_UNDEREXPOSURE  ((XAuint32) 0x00000002)
   1478 #define XA_CAMERA_AUTOEXPOSURESTATUS_OVEREXPOSURE   ((XAuint32) 0x00000003)
   1479 
   1480 #define XA_CAMERACBEVENT_ROTATION                   ((XAuint32) 0x00000001)
   1481 #define XA_CAMERACBEVENT_FLASHREADY                 ((XAuint32) 0x00000002)
   1482 #define XA_CAMERACBEVENT_FOCUSSTATUS                ((XAuint32) 0x00000003)
   1483 #define XA_CAMERACBEVENT_EXPOSURESTATUS             ((XAuint32) 0x00000004)
   1484 #define XA_CAMERACBEVENT_WHITEBALANCELOCKED         ((XAuint32) 0x00000005)
   1485 #define XA_CAMERACBEVENT_ZOOMSTATUS                 ((XAuint32) 0x00000006)
   1486 
   1487 #define XA_CAMERACAP_FLASH                          ((XAuint32) 0x00000001)
   1488 #define XA_CAMERACAP_AUTOFOCUS                      ((XAuint32) 0x00000002)
   1489 #define XA_CAMERACAP_CONTINUOUSAUTOFOCUS            ((XAuint32) 0x00000004)
   1490 #define XA_CAMERACAP_MANUALFOCUS                    ((XAuint32) 0x00000008)
   1491 #define XA_CAMERACAP_AUTOEXPOSURE                   ((XAuint32) 0x00000010)
   1492 #define XA_CAMERACAP_MANUALEXPOSURE                 ((XAuint32) 0x00000020)
   1493 #define XA_CAMERACAP_AUTOISOSENSITIVITY             ((XAuint32) 0x00000040)
   1494 #define XA_CAMERACAP_MANUALISOSENSITIVITY           ((XAuint32) 0x00000080)
   1495 #define XA_CAMERACAP_AUTOAPERTURE                   ((XAuint32) 0x00000100)
   1496 #define XA_CAMERACAP_MANUALAPERTURE                 ((XAuint32) 0x00000200)
   1497 #define XA_CAMERACAP_AUTOSHUTTERSPEED               ((XAuint32) 0x00000400)
   1498 #define XA_CAMERACAP_MANUALSHUTTERSPEED             ((XAuint32) 0x00000800)
   1499 #define XA_CAMERACAP_AUTOWHITEBALANCE               ((XAuint32) 0x00001000)
   1500 #define XA_CAMERACAP_MANUALWHITEBALANCE             ((XAuint32) 0x00002000)
   1501 #define XA_CAMERACAP_OPTICALZOOM                    ((XAuint32) 0x00004000)
   1502 #define XA_CAMERACAP_DIGITALZOOM                    ((XAuint32) 0x00008000)
   1503 #define XA_CAMERACAP_METERING                       ((XAuint32) 0x00010000)
   1504 #define XA_CAMERACAP_BRIGHTNESS                     ((XAuint32) 0x00020000)
   1505 #define XA_CAMERACAP_CONTRAST                       ((XAuint32) 0x00040000)
   1506 #define XA_CAMERACAP_GAMMA                          ((XAuint32) 0x00080000)
   1507 
   1508 
   1509 #define XA_CAMERA_EXPOSUREMODE_MANUAL               ((XAuint32) 0x00000001)
   1510 #define XA_CAMERA_EXPOSUREMODE_AUTO                 ((XAuint32) 0x00000002)
   1511 #define XA_CAMERA_EXPOSUREMODE_NIGHT                ((XAuint32) 0x00000004)
   1512 #define XA_CAMERA_EXPOSUREMODE_BACKLIGHT            ((XAuint32) 0x00000008)
   1513 #define XA_CAMERA_EXPOSUREMODE_SPOTLIGHT            ((XAuint32) 0x00000010)
   1514 #define XA_CAMERA_EXPOSUREMODE_SPORTS               ((XAuint32) 0x00000020)
   1515 #define XA_CAMERA_EXPOSUREMODE_SNOW                 ((XAuint32) 0x00000040)
   1516 #define XA_CAMERA_EXPOSUREMODE_BEACH                ((XAuint32) 0x00000080)
   1517 #define XA_CAMERA_EXPOSUREMODE_LARGEAPERTURE        ((XAuint32) 0x00000100)
   1518 #define XA_CAMERA_EXPOSUREMODE_SMALLAPERTURE        ((XAuint32) 0x00000200)
   1519 #define XA_CAMERA_EXPOSUREMODE_PORTRAIT             ((XAuint32) 0x0000400)
   1520 #define XA_CAMERA_EXPOSUREMODE_NIGHTPORTRAIT        ((XAuint32) 0x00000800)
   1521 
   1522 #define XA_CAMERA_FLASHMODE_OFF                     ((XAuint32) 0x00000001)
   1523 #define XA_CAMERA_FLASHMODE_ON                      ((XAuint32) 0x00000002)
   1524 #define XA_CAMERA_FLASHMODE_AUTO                    ((XAuint32) 0x00000004)
   1525 #define XA_CAMERA_FLASHMODE_REDEYEREDUCTION         ((XAuint32) 0x00000008)
   1526 #define XA_CAMERA_FLASHMODE_REDEYEREDUCTION_AUTO    ((XAuint32) 0x00000010)
   1527 #define XA_CAMERA_FLASHMODE_FILLIN                  ((XAuint32) 0x00000020)
   1528 #define XA_CAMERA_FLASHMODE_TORCH                   ((XAuint32) 0x00000040)
   1529 
   1530 #define XA_CAMERA_FOCUSMODE_MANUAL                  ((XAuint32) 0x00000001)
   1531 #define XA_CAMERA_FOCUSMODE_AUTO                    ((XAuint32) 0x00000002)
   1532 #define XA_CAMERA_FOCUSMODE_CENTROID                ((XAuint32) 0x00000004)
   1533 #define XA_CAMERA_FOCUSMODE_CONTINUOUS_AUTO         ((XAuint32) 0x00000008)
   1534 #define XA_CAMERA_FOCUSMODE_CONTINUOUS_CENTROID     ((XAuint32) 0x00000010)
   1535 
   1536 #define XA_CAMERA_FOCUSMODESTATUS_OFF               ((XAuint32) 0x00000001)
   1537 #define XA_CAMERA_FOCUSMODESTATUS_REQUEST           ((XAuint32) 0x00000002)
   1538 #define XA_CAMERA_FOCUSMODESTATUS_REACHED           ((XAuint32) 0x00000003)
   1539 #define XA_CAMERA_FOCUSMODESTATUS_UNABLETOREACH     ((XAuint32) 0x00000004)
   1540 #define XA_CAMERA_FOCUSMODESTATUS_LOST              ((XAuint32) 0x00000005)
   1541 
   1542 #define XA_CAMERA_ISOSENSITIVITYMODE_MANUAL         ((XAuint32) 0x00000001)
   1543 #define XA_CAMERA_ISOSENSITIVITYMODE_AUTO           ((XAuint32) 0x00000002)
   1544 
   1545 #define XA_CAMERA_LOCK_AUTOFOCUS                    ((XAuint32) 0x00000001)
   1546 #define XA_CAMERA_LOCK_AUTOEXPOSURE                 ((XAuint32) 0x00000002)
   1547 #define XA_CAMERA_LOCK_AUTOWHITEBALANCE             ((XAuint32) 0x00000004)
   1548 
   1549 #define XA_CAMERA_METERINGMODE_AVERAGE              ((XAuint32) 0x00000001)
   1550 #define XA_CAMERA_METERINGMODE_SPOT                 ((XAuint32) 0x00000002)
   1551 #define XA_CAMERA_METERINGMODE_MATRIX               ((XAuint32) 0x00000004)
   1552 
   1553 #define XA_CAMERA_SHUTTERSPEEDMODE_MANUAL           ((XAuint32) 0x00000001)
   1554 #define XA_CAMERA_SHUTTERSPEEDMODE_AUTO             ((XAuint32) 0x00000002)
   1555 
   1556 #define XA_CAMERA_WHITEBALANCEMODE_MANUAL           ((XAuint32) 0x00000001)
   1557 #define XA_CAMERA_WHITEBALANCEMODE_AUTO             ((XAuint32) 0x00000002)
   1558 #define XA_CAMERA_WHITEBALANCEMODE_SUNLIGHT         ((XAuint32) 0x00000004)
   1559 #define XA_CAMERA_WHITEBALANCEMODE_CLOUDY           ((XAuint32) 0x00000008)
   1560 #define XA_CAMERA_WHITEBALANCEMODE_SHADE            ((XAuint32) 0x00000010)
   1561 #define XA_CAMERA_WHITEBALANCEMODE_TUNGSTEN         ((XAuint32) 0x00000020)
   1562 #define XA_CAMERA_WHITEBALANCEMODE_FLUORESCENT      ((XAuint32) 0x00000040)
   1563 #define XA_CAMERA_WHITEBALANCEMODE_INCANDESCENT     ((XAuint32) 0x00000080)
   1564 #define XA_CAMERA_WHITEBALANCEMODE_FLASH            ((XAuint32) 0x00000100)
   1565 #define XA_CAMERA_WHITEBALANCEMODE_SUNSET           ((XAuint32) 0x00000200)
   1566 
   1567 #define XA_CAMERA_ZOOM_SLOW                         ((XAuint32) 50)
   1568 #define XA_CAMERA_ZOOM_NORMAL                       ((XAuint32) 100)
   1569 #define XA_CAMERA_ZOOM_FAST                         ((XAuint32) 200)
   1570 #define XA_CAMERA_ZOOM_FASTEST                      ((XAuint32) 0xFFFFFFFF)
   1571 
   1572 #define XA_FOCUSPOINTS_ONE                          ((XAuint32) 0x00000001)
   1573 #define XA_FOCUSPOINTS_THREE_3X1                    ((XAuint32) 0x00000002)
   1574 #define XA_FOCUSPOINTS_FIVE_CROSS                   ((XAuint32) 0x00000003)
   1575 #define XA_FOCUSPOINTS_SEVEN_CROSS                  ((XAuint32) 0x00000004)
   1576 #define XA_FOCUSPOINTS_NINE_SQUARE                  ((XAuint32) 0x00000005)
   1577 #define XA_FOCUSPOINTS_ELEVEN_CROSS                 ((XAuint32) 0x00000006)
   1578 #define XA_FOCUSPOINTS_TWELVE_3X4                   ((XAuint32) 0x00000007)
   1579 #define XA_FOCUSPOINTS_TWELVE_4X3                   ((XAuint32) 0x00000008)
   1580 #define XA_FOCUSPOINTS_SIXTEEN_SQUARE               ((XAuint32) 0x00000009)
   1581 #define XA_FOCUSPOINTS_CUSTOM                       ((XAuint32) 0x0000000A)
   1582 
   1583 typedef struct XAFocusPointPosition_ {
   1584     XAuint32 left;
   1585     XAuint32 top;
   1586     XAuint32 width;
   1587     XAuint32 height;
   1588 } XAFocusPointPosition;
   1589 
   1590 #define XA_ORIENTATION_UNKNOWN                      ((XAuint32) 0x00000001)
   1591 #define XA_ORIENTATION_OUTWARDS                     ((XAuint32) 0x00000002)
   1592 #define XA_ORIENTATION_INWARDS                      ((XAuint32) 0x00000003)
   1593 
   1594 typedef struct XACameraDescriptor_ {
   1595     XAchar * name;
   1596     XAuint32 maxWidth;
   1597     XAuint32 maxHeight;
   1598     XAuint32 orientation;
   1599     XAuint32 featuresSupported;
   1600     XAuint32 exposureModesSupported;
   1601     XAuint32 flashModesSupported;
   1602     XAuint32 focusModesSupported;
   1603     XAuint32 meteringModesSupported;
   1604     XAuint32 whiteBalanceModesSupported;
   1605 } XACameraDescriptor;
   1606 
   1607 XA_API extern const XAInterfaceID XA_IID_CAMERACAPABILITIES;
   1608 
   1609 struct XACameraCapabilitiesItf_;
   1610 typedef const struct XACameraCapabilitiesItf_
   1611     * const * XACameraCapabilitiesItf;
   1612 
   1613 struct XACameraCapabilitiesItf_ {
   1614     XAresult (*GetCameraCapabilities) (
   1615         XACameraCapabilitiesItf self,
   1616         XAuint32 *pIndex,
   1617         XAuint32 * pCameraDeviceID,
   1618         XACameraDescriptor * pDescriptor
   1619     );
   1620     XAresult (*QueryFocusRegionPatterns) (
   1621         XACameraCapabilitiesItf self,
   1622         XAuint32 cameraDeviceID,
   1623         XAuint32 * pPatternID,
   1624         XAuint32 * pFocusPattern,
   1625         XAuint32 * pCustomPoints1,
   1626         XAuint32 * pCustomPoints2
   1627     );
   1628     XAresult (*GetSupportedAutoLocks) (
   1629         XACameraCapabilitiesItf self,
   1630         XAuint32 cameraDeviceID,
   1631         XAuint32 * pNumCombinations,
   1632         XAuint32 ** ppLocks
   1633     );
   1634     XAresult (*GetSupportedFocusManualSettings) (
   1635         XACameraCapabilitiesItf self,
   1636         XAuint32 cameraDeviceID,
   1637         XAboolean macroEnabled,
   1638         XAmillimeter * pMinValue,
   1639         XAmillimeter * pMaxValue,
   1640         XAuint32 * pNumSettings,
   1641         XAmillimeter ** ppSettings
   1642     );
   1643     XAresult (*GetSupportedISOSensitivitySettings) (
   1644         XACameraCapabilitiesItf self,
   1645         XAuint32 cameraDeviceID,
   1646         XAuint32 * pMinValue,
   1647         XAuint32 * pMaxValue,
   1648         XAuint32 * pNumSettings,
   1649         XAuint32 ** ppSettings
   1650     );
   1651     XAresult (*GetSupportedApertureManualSettings) (
   1652         XACameraCapabilitiesItf self,
   1653         XAuint32 cameraDeviceID,
   1654         XAuint32 * pMinValue,
   1655         XAuint32 * pMaxValue,
   1656         XAuint32 * pNumSettings,
   1657         XAuint32 ** ppSettings
   1658     );
   1659     XAresult (*GetSupportedShutterSpeedManualSettings) (
   1660         XACameraCapabilitiesItf self,
   1661         XAuint32 cameraDeviceID,
   1662         XAmicrosecond * pMinValue,
   1663         XAmicrosecond * pMaxValue,
   1664         XAuint32 * pNumSettings,
   1665         XAmicrosecond ** ppSettings
   1666     );
   1667     XAresult (*GetSupportedWhiteBalanceManualSettings) (
   1668         XACameraCapabilitiesItf self,
   1669         XAuint32 cameraDeviceID,
   1670         XAuint32 * pMinValue,
   1671         XAuint32 * pMaxValue,
   1672         XAuint32 * pNumSettings,
   1673         XAuint32 ** ppSettings
   1674     );
   1675     XAresult (*GetSupportedZoomSettings) (
   1676         XACameraCapabilitiesItf self,
   1677         XAuint32 cameraDeviceID,
   1678         XAboolean digitalEnabled,
   1679         XAboolean macroEnabled,
   1680         XApermille * pMaxValue,
   1681         XAuint32 * pNumSettings,
   1682         XApermille ** ppSettings,
   1683         XAboolean * pSpeedSupported
   1684 
   1685     );
   1686 };
   1687 
   1688 XA_API extern const XAInterfaceID XA_IID_CAMERA;
   1689 
   1690 struct XACameraItf_;
   1691 typedef const struct XACameraItf_ * const * XACameraItf;
   1692 
   1693 typedef void (XAAPIENTRY * xaCameraCallback) (
   1694     XACameraItf caller,
   1695     void * pContext,
   1696     XAuint32 eventId,
   1697     XAuint32 eventData
   1698 );
   1699 
   1700 struct XACameraItf_ {
   1701     XAresult (*RegisterCallback) (
   1702         XACameraItf self,
   1703         xaCameraCallback callback,
   1704         void * pContext
   1705     );
   1706     XAresult (*SetFlashMode) (
   1707         XACameraItf self,
   1708         XAuint32 flashMode
   1709     );
   1710     XAresult (*GetFlashMode) (
   1711         XACameraItf self,
   1712         XAuint32 * pFlashMode
   1713     );
   1714     XAresult (*IsFlashReady) (
   1715         XACameraItf self,
   1716         XAboolean * pReady
   1717     );
   1718     XAresult (*SetFocusMode) (
   1719         XACameraItf self,
   1720         XAuint32 focusMode,
   1721         XAmillimeter manualSetting,
   1722         XAboolean macroEnabled
   1723     );
   1724     XAresult (*GetFocusMode) (
   1725         XACameraItf self,
   1726         XAuint32 * pFocusMode,
   1727         XAmillimeter * pManualSetting,
   1728         XAboolean * pMacroEnabled
   1729     );
   1730     XAresult (*SetFocusRegionPattern) (
   1731         XACameraItf self,
   1732         XAuint32 focusPattern,
   1733         XAuint32 activePoints1,
   1734         XAuint32 activePoints2
   1735     );
   1736     XAresult (*GetFocusRegionPattern) (
   1737         XACameraItf self,
   1738         XAuint32 * pFocusPattern,
   1739         XAuint32 * pActivePoints1,
   1740         XAuint32 * pActivePoints2
   1741     );
   1742     XAresult (*GetFocusRegionPositions) (
   1743         XACameraItf self,
   1744         XAuint32 * pNumPositionEntries,
   1745         XAFocusPointPosition * pFocusPosition
   1746     );
   1747     XAresult (*GetFocusModeStatus) (
   1748         XACameraItf self,
   1749         XAuint32 * pFocusStatus,
   1750         XAuint32 * pRegionStatus1,
   1751         XAuint32 * pRegionStatus2
   1752     );
   1753     XAresult (*SetMeteringMode) (
   1754         XACameraItf self,
   1755         XAuint32 meteringMode
   1756     );
   1757     XAresult (*GetMeteringMode) (
   1758         XACameraItf self,
   1759         XAuint32 * pMeteringMode
   1760     );
   1761     XAresult (*SetExposureMode) (
   1762         XACameraItf self,
   1763         XAuint32 exposure,
   1764         XAuint32 compensation
   1765     );
   1766     XAresult (*GetExposureMode) (
   1767         XACameraItf self,
   1768         XAuint32 * pExposure,
   1769         XAuint32 * pCompensation
   1770     );
   1771     XAresult (*SetISOSensitivity) (
   1772         XACameraItf self,
   1773         XAuint32 isoSensitivity,
   1774         XAuint32 manualSetting
   1775     );
   1776     XAresult (*GetISOSensitivity) (
   1777         XACameraItf self,
   1778         XAuint32 * pIsoSensitivity,
   1779         XAuint32 * pManualSetting
   1780     );
   1781     XAresult (*SetAperture) (
   1782         XACameraItf self,
   1783         XAuint32 aperture,
   1784         XAuint32 manualSetting
   1785     );
   1786     XAresult (*GetAperture) (
   1787         XACameraItf self,
   1788         XAuint32 * pAperture,
   1789         XAuint32 * pManualSetting
   1790     );
   1791     XAresult (*SetShutterSpeed) (
   1792         XACameraItf self,
   1793         XAuint32 shutterSpeed,
   1794         XAmicrosecond manualSetting
   1795     );
   1796     XAresult (*GetShutterSpeed) (
   1797         XACameraItf self,
   1798         XAuint32 * pShutterSpeed,
   1799         XAmicrosecond * pManualSetting
   1800     );
   1801     XAresult (*SetWhiteBalance) (
   1802         XACameraItf self,
   1803         XAuint32 whiteBalance,
   1804         XAuint32 manualSetting
   1805     );
   1806     XAresult (*GetWhiteBalance) (
   1807         XACameraItf self,
   1808         XAuint32 * pWhiteBalance,
   1809         XAuint32 * pManualSetting
   1810     );
   1811     XAresult (*SetAutoLocks) (
   1812         XACameraItf self,
   1813         XAuint32 locks
   1814     );
   1815     XAresult (*GetAutoLocks) (
   1816         XACameraItf self,
   1817         XAuint32 * locks
   1818     );
   1819     XAresult (*SetZoom) (
   1820         XACameraItf self,
   1821         XApermille zoom,
   1822         XAboolean digitalEnabled,
   1823         XAuint32 speed,
   1824         XAboolean async
   1825     );
   1826     XAresult (*GetZoom) (
   1827         XACameraItf self,
   1828         XApermille * pZoom,
   1829         XAboolean * pDigital
   1830     );
   1831 };
   1832 
   1833 /* AUDIO I/O DEVICE CAPABILITIES */
   1834 
   1835 #define XA_DEVCONNECTION_INTEGRATED                 ((XAint16) 0x0001)
   1836 #define XA_DEVCONNECTION_ATTACHED_WIRED             ((XAint16) 0x0100)
   1837 #define XA_DEVCONNECTION_ATTACHED_WIRELESS          ((XAint16) 0x0200)
   1838 #define XA_DEVCONNECTION_NETWORK                    ((XAint16) 0x0400)
   1839 
   1840 #define XA_DEVLOCATION_HANDSET                      ((XAint16) 0x0001)
   1841 #define XA_DEVLOCATION_HEADSET                      ((XAint16) 0x0002)
   1842 #define XA_DEVLOCATION_CARKIT                       ((XAint16) 0x0003)
   1843 #define XA_DEVLOCATION_DOCK                         ((XAint16) 0x0004)
   1844 #define XA_DEVLOCATION_REMOTE                       ((XAint16) 0x0005)
   1845 
   1846 #define XA_DEVSCOPE_UNKNOWN                         ((XAint16) 0x0001)
   1847 #define XA_DEVSCOPE_ENVIRONMENT                     ((XAint16) 0x0002)
   1848 #define XA_DEVSCOPE_USER                            ((XAint16) 0x0003)
   1849 
   1850 typedef struct XAAudioInputDescriptor_ {
   1851     XAchar * deviceName;
   1852     XAint16 deviceConnection;
   1853     XAint16 deviceScope;
   1854     XAint16 deviceLocation;
   1855     XAboolean isForTelephony;
   1856     XAmilliHertz minSampleRate;
   1857     XAmilliHertz maxSampleRate;
   1858     XAboolean isFreqRangeContinuous;
   1859     XAmilliHertz * samplingRatesSupported;
   1860     XAint16 numOfSamplingRatesSupported;
   1861     XAint16 maxChannels;
   1862 } XAAudioInputDescriptor;
   1863 
   1864 typedef struct XAAudioOutputDescriptor_ {
   1865     XAchar *pDeviceName;
   1866     XAint16 deviceConnection;
   1867     XAint16 deviceScope;
   1868     XAint16 deviceLocation;
   1869     XAboolean isForTelephony;
   1870     XAmilliHertz minSampleRate;
   1871     XAmilliHertz maxSampleRate;
   1872     XAboolean isFreqRangeContinuous;
   1873     XAmilliHertz *samplingRatesSupported;
   1874     XAint16 numOfSamplingRatesSupported;
   1875     XAint16 maxChannels;
   1876 } XAAudioOutputDescriptor;
   1877 
   1878 XA_API extern const XAInterfaceID XA_IID_AUDIOIODEVICECAPABILITIES;
   1879 
   1880 struct XAAudioIODeviceCapabilitiesItf_;
   1881 typedef const struct XAAudioIODeviceCapabilitiesItf_
   1882     * const * XAAudioIODeviceCapabilitiesItf;
   1883 
   1884 typedef void (XAAPIENTRY * xaAvailableAudioInputsChangedCallback) (
   1885     XAAudioIODeviceCapabilitiesItf caller,
   1886     void * pContext,
   1887     XAuint32 deviceID,
   1888     XAint32 numInputs,
   1889     XAboolean isNew
   1890 );
   1891 
   1892 typedef void (XAAPIENTRY * xaAvailableAudioOutputsChangedCallback) (
   1893     XAAudioIODeviceCapabilitiesItf caller,
   1894     void * pContext,
   1895     XAuint32 deviceID,
   1896     XAint32 numOutputs,
   1897     XAboolean isNew
   1898 );
   1899 
   1900 typedef void (XAAPIENTRY * xaDefaultDeviceIDMapChangedCallback) (
   1901     XAAudioIODeviceCapabilitiesItf caller,
   1902     void * pContext,
   1903 	XAboolean isOutput,
   1904     XAint32 numDevices
   1905 );
   1906 
   1907 struct XAAudioIODeviceCapabilitiesItf_ {
   1908     XAresult (*GetAvailableAudioInputs) (
   1909         XAAudioIODeviceCapabilitiesItf self,
   1910         XAint32 * pNumInputs,
   1911         XAuint32 * pInputDeviceIDs
   1912     );
   1913     XAresult (*QueryAudioInputCapabilities) (
   1914         XAAudioIODeviceCapabilitiesItf self,
   1915         XAuint32 deviceID,
   1916         XAAudioInputDescriptor * pDescriptor
   1917     );
   1918     XAresult (*RegisterAvailableAudioInputsChangedCallback) (
   1919         XAAudioIODeviceCapabilitiesItf self,
   1920         xaAvailableAudioInputsChangedCallback callback,
   1921         void * pContext
   1922     );
   1923     XAresult (*GetAvailableAudioOutputs) (
   1924         XAAudioIODeviceCapabilitiesItf self,
   1925         XAint32 * pNumOutputs,
   1926         XAuint32 * pOutputDeviceIDs
   1927     );
   1928     XAresult (*QueryAudioOutputCapabilities) (
   1929         XAAudioIODeviceCapabilitiesItf self,
   1930         XAuint32 deviceID,
   1931         XAAudioOutputDescriptor * pDescriptor
   1932     );
   1933     XAresult (*RegisterAvailableAudioOutputsChangedCallback) (
   1934         XAAudioIODeviceCapabilitiesItf self,
   1935         xaAvailableAudioOutputsChangedCallback callback,
   1936         void * pContext
   1937     );
   1938     XAresult (*RegisterDefaultDeviceIDMapChangedCallback) (
   1939         XAAudioIODeviceCapabilitiesItf self,
   1940         xaDefaultDeviceIDMapChangedCallback callback,
   1941         void * pContext
   1942     );
   1943     XAresult (*GetAssociatedAudioInputs) (
   1944         XAAudioIODeviceCapabilitiesItf self,
   1945         XAuint32 deviceID,
   1946         XAint32 * pNumAudioInputs,
   1947         XAuint32 * pAudioInputDeviceIDs
   1948     );
   1949     XAresult (*GetAssociatedAudioOutputs) (
   1950         XAAudioIODeviceCapabilitiesItf self,
   1951         XAuint32 deviceID,
   1952         XAint32 * pNumAudioOutputs,
   1953         XAuint32 * pAudioOutputDeviceIDs
   1954     );
   1955     XAresult (*GetDefaultAudioDevices) (
   1956         XAAudioIODeviceCapabilitiesItf self,
   1957         XAuint32 defaultDeviceID,
   1958         XAint32 *pNumAudioDevices,
   1959         XAuint32 *pAudioDeviceIDs
   1960     );
   1961     XAresult (*QuerySampleFormatsSupported) (
   1962         XAAudioIODeviceCapabilitiesItf self,
   1963         XAuint32 deviceID,
   1964         XAmilliHertz samplingRate,
   1965         XAint32 *pSampleFormats,
   1966         XAint32 *pNumOfSampleFormats
   1967     );
   1968 };
   1969 
   1970 /* DEVICE VOLUME */
   1971 
   1972 XA_API extern const XAInterfaceID XA_IID_DEVICEVOLUME;
   1973 
   1974 struct XADeviceVolumeItf_;
   1975 typedef const struct XADeviceVolumeItf_ * const * XADeviceVolumeItf;
   1976 
   1977 struct XADeviceVolumeItf_ {
   1978     XAresult (*GetVolumeScale) (
   1979         XADeviceVolumeItf self,
   1980         XAuint32 deviceID,
   1981         XAint32 * pMinValue,
   1982         XAint32 * pMaxValue,
   1983         XAboolean * pIsMillibelScale
   1984     );
   1985     XAresult (*SetVolume) (
   1986         XADeviceVolumeItf self,
   1987         XAuint32 deviceID,
   1988         XAint32 volume
   1989     );
   1990     XAresult (*GetVolume) (
   1991         XADeviceVolumeItf self,
   1992         XAuint32 deviceID,
   1993         XAint32 * pVolume
   1994     );
   1995 };
   1996 
   1997 /* EQUALIZER */
   1998 
   1999 #define XA_EQUALIZER_UNDEFINED    ((XAuint16) 0xFFFF)
   2000 
   2001 XA_API extern const XAInterfaceID XA_IID_EQUALIZER;
   2002 
   2003 struct XAEqualizerItf_;
   2004 typedef const struct XAEqualizerItf_ * const * XAEqualizerItf;
   2005 
   2006 struct XAEqualizerItf_ {
   2007     XAresult (*SetEnabled) (
   2008         XAEqualizerItf self,
   2009         XAboolean enabled
   2010     );
   2011     XAresult (*IsEnabled) (
   2012         XAEqualizerItf self,
   2013         XAboolean * pEnabled
   2014     );
   2015     XAresult (*GetNumberOfBands) (
   2016         XAEqualizerItf self,
   2017         XAuint16 * pNumBands
   2018     );
   2019     XAresult (*GetBandLevelRange) (
   2020         XAEqualizerItf self,
   2021         XAmillibel * pMin,
   2022         XAmillibel * pMax
   2023     );
   2024     XAresult (*SetBandLevel) (
   2025         XAEqualizerItf self,
   2026         XAuint16 band,
   2027         XAmillibel level
   2028     );
   2029     XAresult (*GetBandLevel) (
   2030         XAEqualizerItf self,
   2031         XAuint16 band,
   2032         XAmillibel * pLevel
   2033     );
   2034     XAresult (*GetCenterFreq) (
   2035         XAEqualizerItf self,
   2036         XAuint16 band,
   2037         XAmilliHertz * pCenter
   2038     );
   2039     XAresult (*GetBandFreqRange) (
   2040         XAEqualizerItf self,
   2041         XAuint16 band,
   2042         XAmilliHertz * pMin,
   2043         XAmilliHertz * pMax
   2044     );
   2045     XAresult (*GetBand) (
   2046         XAEqualizerItf self,
   2047         XAmilliHertz frequency,
   2048         XAuint16 * pBand
   2049     );
   2050     XAresult (*GetCurrentPreset) (
   2051         XAEqualizerItf self,
   2052         XAuint16 * pPreset
   2053     );
   2054     XAresult (*UsePreset) (
   2055         XAEqualizerItf self,
   2056         XAuint16 index
   2057     );
   2058     XAresult (*GetNumberOfPresets) (
   2059         XAEqualizerItf self,
   2060         XAuint16 * pNumPresets
   2061     );
   2062     XAresult (*GetPresetName) (
   2063         XAEqualizerItf self,
   2064         XAuint16 index,
   2065         const XAchar ** ppName
   2066     );
   2067 };
   2068 
   2069 /* OUTPUT MIX */
   2070 
   2071 XA_API extern const XAInterfaceID XA_IID_OUTPUTMIX;
   2072 
   2073 struct XAOutputMixItf_;
   2074 typedef const struct XAOutputMixItf_ * const * XAOutputMixItf;
   2075 
   2076 typedef void (XAAPIENTRY * xaMixDeviceChangeCallback) (
   2077     XAOutputMixItf caller,
   2078     void * pContext
   2079 );
   2080 
   2081 struct XAOutputMixItf_ {
   2082     XAresult (*GetDestinationOutputDeviceIDs) (
   2083         XAOutputMixItf self,
   2084         XAint32 * pNumDevices,
   2085         XAuint32 * pDeviceIDs
   2086     );
   2087     XAresult (*RegisterDeviceChangeCallback) (
   2088         XAOutputMixItf self,
   2089         xaMixDeviceChangeCallback callback,
   2090         void * pContext
   2091     );
   2092     XAresult (*ReRoute) (
   2093         XAOutputMixItf self,
   2094         XAint32 numOutputDevices,
   2095         XAuint32 * pOutputDeviceIDs
   2096     );
   2097 };
   2098 
   2099 /* RADIO */
   2100 
   2101 #define XA_FREQRANGE_FMEUROAMERICA                  ((XAuint8) 0x01)
   2102 #define XA_FREQRANGE_FMJAPAN                        ((XAuint8) 0x02)
   2103 #define XA_FREQRANGE_AMLW                           ((XAuint8) 0x03)
   2104 #define XA_FREQRANGE_AMMW                           ((XAuint8) 0x04)
   2105 #define XA_FREQRANGE_AMSW                           ((XAuint8) 0x05)
   2106 
   2107 #define XA_RADIO_EVENT_ANTENNA_STATUS_CHANGED       ((XAuint32) 0x00000001)
   2108 #define XA_RADIO_EVENT_FREQUENCY_CHANGED            ((XAuint32) 0x00000002)
   2109 #define XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED      ((XAuint32) 0x00000003)
   2110 #define XA_RADIO_EVENT_PRESET_CHANGED               ((XAuint32) 0x00000004)
   2111 #define XA_RADIO_EVENT_SEEK_COMPLETED               ((XAuint32) 0x00000005)
   2112 
   2113 #define XA_STEREOMODE_MONO                          ((XAuint32) 0x00000000)
   2114 #define XA_STEREOMODE_STEREO                        ((XAuint32) 0x00000001)
   2115 #define XA_STEREOMODE_AUTO                          ((XAuint32) 0x00000002)
   2116 
   2117 XA_API extern const XAInterfaceID XA_IID_RADIO;
   2118 
   2119 struct XARadioItf_;
   2120 typedef const struct XARadioItf_ * const * XARadioItf;
   2121 
   2122 typedef void (XAAPIENTRY * xaRadioCallback) (
   2123     XARadioItf caller,
   2124     void * pContext,
   2125     XAuint32 event,
   2126     XAuint32 eventIntData,
   2127     XAboolean eventBooleanData
   2128 );
   2129 
   2130 struct XARadioItf_ {
   2131     XAresult (*SetFreqRange) (
   2132         XARadioItf self,
   2133         XAuint8 range
   2134     );
   2135     XAresult (*GetFreqRange) (
   2136         XARadioItf self,
   2137         XAuint8 * pRange
   2138     );
   2139     XAresult (*IsFreqRangeSupported) (
   2140         XARadioItf self,
   2141         XAuint8 range,
   2142         XAboolean * pSupported
   2143     );
   2144     XAresult (*GetFreqRangeProperties) (
   2145         XARadioItf self,
   2146         XAuint8 range,
   2147         XAuint32 * pMinFreq,
   2148         XAuint32 * pMaxFreq,
   2149         XAuint32 * pFreqInterval
   2150     );
   2151     XAresult (*SetFrequency) (
   2152         XARadioItf self,
   2153         XAuint32 freq
   2154     );
   2155     XAresult (*CancelSetFrequency) (
   2156         XARadioItf self
   2157     );
   2158     XAresult (*GetFrequency) (
   2159         XARadioItf self,
   2160         XAuint32 * pFreq
   2161     );
   2162     XAresult (*SetSquelch) (
   2163         XARadioItf self,
   2164         XAboolean squelch
   2165     );
   2166     XAresult (*GetSquelch) (
   2167         XARadioItf self,
   2168         XAboolean * pSquelch
   2169     );
   2170     XAresult (*SetStereoMode) (
   2171         XARadioItf self,
   2172         XAuint32 mode
   2173     );
   2174     XAresult (*GetStereoMode) (
   2175         XARadioItf self,
   2176         XAuint32 * pMode
   2177     );
   2178     XAresult (*GetSignalStrength) (
   2179         XARadioItf self,
   2180         XAuint32 * pStrength
   2181     );
   2182     XAresult (*Seek) (
   2183         XARadioItf self,
   2184         XAboolean upwards
   2185     );
   2186     XAresult (*StopSeeking) (
   2187         XARadioItf self
   2188     );
   2189     XAresult (*GetNumberOfPresets) (
   2190         XARadioItf self,
   2191         XAuint32 * pNumPresets
   2192     );
   2193     XAresult (*SetPreset) (
   2194         XARadioItf self,
   2195         XAuint32 preset,
   2196         XAuint32 freq,
   2197         XAuint8 range,
   2198         XAuint32 mode,
   2199         const XAchar * pName
   2200     );
   2201     XAresult (*GetPreset) (
   2202         XARadioItf self,
   2203         XAuint32 preset,
   2204         XAuint32 * pFreq,
   2205         XAuint8 * pRange,
   2206         XAuint32 * pMode,
   2207         XAchar * pName,
   2208         XAuint16 * pNameLength
   2209     );
   2210     XAresult (*RegisterRadioCallback) (
   2211         XARadioItf self,
   2212         xaRadioCallback callback,
   2213         void * pContext
   2214     );
   2215 };
   2216 
   2217 /* RDS */
   2218 
   2219 #define XA_RDS_EVENT_NEW_PI                         ((XAuint16) 0x0001)
   2220 #define XA_RDS_EVENT_NEW_PTY                        ((XAuint16) 0x0002)
   2221 #define XA_RDS_EVENT_NEW_PS                         ((XAuint16) 0x0004)
   2222 #define XA_RDS_EVENT_NEW_RT                         ((XAuint16) 0x0008)
   2223 #define XA_RDS_EVENT_NEW_RT_PLUS                    ((XAuint16) 0x0010)
   2224 #define XA_RDS_EVENT_NEW_CT                         ((XAuint16) 0x0020)
   2225 #define XA_RDS_EVENT_NEW_TA                         ((XAuint16) 0x0040)
   2226 #define XA_RDS_EVENT_NEW_TP                         ((XAuint16) 0x0080)
   2227 #define XA_RDS_EVENT_NEW_ALARM                      ((XAuint16) 0x0100)
   2228 
   2229 #define XA_RDSPROGRAMMETYPE_RDSPTY_NONE \
   2230     ((XAuint32) 0x00000000)
   2231 #define XA_RDSPROGRAMMETYPE_RDSPTY_NEWS \
   2232     ((XAuint32) 0x00000001)
   2233 #define XA_RDSPROGRAMMETYPE_RDSPTY_CURRENTAFFAIRS \
   2234     ((XAuint32) 0x00000002)
   2235 #define XA_RDSPROGRAMMETYPE_RDSPTY_INFORMATION \
   2236     ((XAuint32) 0x00000003)
   2237 #define XA_RDSPROGRAMMETYPE_RDSPTY_SPORT \
   2238     ((XAuint32) 0x00000004)
   2239 #define XA_RDSPROGRAMMETYPE_RDSPTY_EDUCATION \
   2240     ((XAuint32) 0x00000005)
   2241 #define XA_RDSPROGRAMMETYPE_RDSPTY_DRAMA \
   2242     ((XAuint32) 0x00000006)
   2243 #define XA_RDSPROGRAMMETYPE_RDSPTY_CULTURE \
   2244     ((XAuint32) 0x00000007)
   2245 #define XA_RDSPROGRAMMETYPE_RDSPTY_SCIENCE \
   2246     ((XAuint32) 0x00000008)
   2247 #define XA_RDSPROGRAMMETYPE_RDSPTY_VARIEDSPEECH \
   2248     ((XAuint32) 0x00000009)
   2249 #define XA_RDSPROGRAMMETYPE_RDSPTY_POPMUSIC \
   2250     ((XAuint32) 0x0000000A)
   2251 #define XA_RDSPROGRAMMETYPE_RDSPTY_ROCKMUSIC \
   2252     ((XAuint32) 0x0000000B)
   2253 #define XA_RDSPROGRAMMETYPE_RDSPTY_EASYLISTENING \
   2254     ((XAuint32) 0x0000000C)
   2255 #define XA_RDSPROGRAMMETYPE_RDSPTY_LIGHTCLASSICAL \
   2256     ((XAuint32) 0x0000000D)
   2257 #define XA_RDSPROGRAMMETYPE_RDSPTY_SERIOUSCLASSICAL \
   2258     ((XAuint32) 0x0000000E)
   2259 #define XA_RDSPROGRAMMETYPE_RDSPTY_OTHERMUSIC \
   2260     ((XAuint32) 0x0000000F)
   2261 #define XA_RDSPROGRAMMETYPE_RDSPTY_WEATHER \
   2262     ((XAuint32) 0x00000010)
   2263 #define XA_RDSPROGRAMMETYPE_RDSPTY_FINANCE \
   2264     ((XAuint32) 0x00000011)
   2265 #define XA_RDSPROGRAMMETYPE_RDSPTY_CHILDRENSPROGRAMMES \
   2266     ((XAuint32) 0x00000012)
   2267 #define XA_RDSPROGRAMMETYPE_RDSPTY_SOCIALAFFAIRS \
   2268     ((XAuint32) 0x00000013)
   2269 #define XA_RDSPROGRAMMETYPE_RDSPTY_RELIGION \
   2270     ((XAuint32) 0x00000014)
   2271 #define XA_RDSPROGRAMMETYPE_RDSPTY_PHONEIN \
   2272     ((XAuint32) 0x00000015)
   2273 #define XA_RDSPROGRAMMETYPE_RDSPTY_TRAVEL \
   2274     ((XAuint32) 0x00000016)
   2275 #define XA_RDSPROGRAMMETYPE_RDSPTY_LEISURE \
   2276     ((XAuint32) 0x00000017)
   2277 #define XA_RDSPROGRAMMETYPE_RDSPTY_JAZZMUSIC \
   2278     ((XAuint32) 0x00000018)
   2279 #define XA_RDSPROGRAMMETYPE_RDSPTY_COUNTRYMUSIC \
   2280     ((XAuint32) 0x00000019)
   2281 #define XA_RDSPROGRAMMETYPE_RDSPTY_NATIONALMUSIC \
   2282     ((XAuint32) 0x0000001A)
   2283 #define XA_RDSPROGRAMMETYPE_RDSPTY_OLDIESMUSIC \
   2284     ((XAuint32) 0x0000001B)
   2285 #define XA_RDSPROGRAMMETYPE_RDSPTY_FOLKMUSIC \
   2286     ((XAuint32) 0x0000001C)
   2287 #define XA_RDSPROGRAMMETYPE_RDSPTY_DOCUMENTARY \
   2288     ((XAuint32) 0x0000001D)
   2289 #define XA_RDSPROGRAMMETYPE_RDSPTY_ALARMTEST \
   2290     ((XAuint32) 0x0000001E)
   2291 #define XA_RDSPROGRAMMETYPE_RDSPTY_ALARM \
   2292     ((XAuint32) 0x0000001F)
   2293 
   2294 #define XA_RDSPROGRAMMETYPE_RBDSPTY_NONE \
   2295     ((XAuint32) 0x00000000)
   2296 #define XA_RDSPROGRAMMETYPE_RBDSPTY_NEWS \
   2297     ((XAuint32) 0x00000001)
   2298 #define XA_RDSPROGRAMMETYPE_RBDSPTY_INFORMATION \
   2299     ((XAuint32) 0x00000002)
   2300 #define XA_RDSPROGRAMMETYPE_RBDSPTY_SPORTS \
   2301     ((XAuint32) 0x00000003)
   2302 #define XA_RDSPROGRAMMETYPE_RBDSPTY_TALK \
   2303     ((XAuint32) 0x00000004)
   2304 #define XA_RDSPROGRAMMETYPE_RBDSPTY_ROCK \
   2305     ((XAuint32) 0x00000005)
   2306 #define XA_RDSPROGRAMMETYPE_RBDSPTY_CLASSICROCK \
   2307     ((XAuint32) 0x00000006)
   2308 #define XA_RDSPROGRAMMETYPE_RBDSPTY_ADULTHITS \
   2309     ((XAuint32) 0x00000007)
   2310 #define XA_RDSPROGRAMMETYPE_RBDSPTY_SOFTROCK \
   2311     ((XAuint32) 0x00000008)
   2312 #define XA_RDSPROGRAMMETYPE_RBDSPTY_TOP40 \
   2313     ((XAuint32) 0x00000009)
   2314 #define XA_RDSPROGRAMMETYPE_RBDSPTY_COUNTRY \
   2315     ((XAuint32) 0x0000000A)
   2316 #define XA_RDSPROGRAMMETYPE_RBDSPTY_OLDIES \
   2317     ((XAuint32) 0x0000000B)
   2318 #define XA_RDSPROGRAMMETYPE_RBDSPTY_SOFT \
   2319     ((XAuint32) 0x0000000C)
   2320 #define XA_RDSPROGRAMMETYPE_RBDSPTY_NOSTALGIA \
   2321     ((XAuint32) 0x0000000D)
   2322 #define XA_RDSPROGRAMMETYPE_RBDSPTY_JAZZ \
   2323     ((XAuint32) 0x0000000E)
   2324 #define XA_RDSPROGRAMMETYPE_RBDSPTY_CLASSICAL \
   2325     ((XAuint32) 0x0000000F)
   2326 #define XA_RDSPROGRAMMETYPE_RBDSPTY_RHYTHMANDBLUES \
   2327     ((XAuint32) 0x00000010)
   2328 #define XA_RDSPROGRAMMETYPE_RBDSPTY_SOFTRHYTHMANDBLUES \
   2329     ((XAuint32) 0x00000011)
   2330 #define XA_RDSPROGRAMMETYPE_RBDSPTY_LANGUAGE \
   2331     ((XAuint32) 0x00000012)
   2332 #define XA_RDSPROGRAMMETYPE_RBDSPTY_RELIGIOUSMUSIC \
   2333     ((XAuint32) 0x00000013)
   2334 #define XA_RDSPROGRAMMETYPE_RBDSPTY_RELIGIOUSTALK \
   2335     ((XAuint32) 0x00000014)
   2336 #define XA_RDSPROGRAMMETYPE_RBDSPTY_PERSONALITY \
   2337     ((XAuint32) 0x00000015)
   2338 #define XA_RDSPROGRAMMETYPE_RBDSPTY_PUBLIC \
   2339     ((XAuint32) 0x00000016)
   2340 #define XA_RDSPROGRAMMETYPE_RBDSPTY_COLLEGE \
   2341     ((XAuint32) 0x00000017)
   2342 #define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED1 \
   2343     ((XAuint32) 0x00000018)
   2344 #define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED2 \
   2345     ((XAuint32) 0x00000019)
   2346 #define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED3 \
   2347     ((XAuint32) 0x0000001A)
   2348 #define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED4 \
   2349     ((XAuint32) 0x0000001B)
   2350 #define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED5 \
   2351     ((XAuint32) 0x0000001C)
   2352 #define XA_RDSPROGRAMMETYPE_RBDSPTY_WEATHER \
   2353     ((XAuint32) 0x0000001D)
   2354 #define XA_RDSPROGRAMMETYPE_RBDSPTY_EMERGENCYTEST \
   2355     ((XAuint32) 0x0000001E)
   2356 #define XA_RDSPROGRAMMETYPE_RBDSPTY_EMERGENCY \
   2357     ((XAuint32) 0x0000001F)
   2358 
   2359 #define XA_RDSRTPLUS_ITEMTITLE              ((XAuint8) 0x01)
   2360 #define XA_RDSRTPLUS_ITEMALBUM              ((XAuint8) 0x02)
   2361 #define XA_RDSRTPLUS_ITEMTRACKNUMBER        ((XAuint8) 0x03)
   2362 #define XA_RDSRTPLUS_ITEMARTIST             ((XAuint8) 0x04)
   2363 #define XA_RDSRTPLUS_ITEMCOMPOSITION        ((XAuint8) 0x05)
   2364 #define XA_RDSRTPLUS_ITEMMOVEMENT           ((XAuint8) 0x06)
   2365 #define XA_RDSRTPLUS_ITEMCONDUCTOR          ((XAuint8) 0x07)
   2366 #define XA_RDSRTPLUS_ITEMCOMPOSER           ((XAuint8) 0x08)
   2367 #define XA_RDSRTPLUS_ITEMBAND               ((XAuint8) 0x09)
   2368 #define XA_RDSRTPLUS_ITEMCOMMENT            ((XAuint8) 0x0A)
   2369 #define XA_RDSRTPLUS_ITEMGENRE              ((XAuint8) 0x0B)
   2370 #define XA_RDSRTPLUS_INFONEWS               ((XAuint8) 0x0C)
   2371 #define XA_RDSRTPLUS_INFONEWSLOCAL          ((XAuint8) 0x0D)
   2372 #define XA_RDSRTPLUS_INFOSTOCKMARKET        ((XAuint8) 0x0E)
   2373 #define XA_RDSRTPLUS_INFOSPORT              ((XAuint8) 0x0F)
   2374 #define XA_RDSRTPLUS_INFOLOTTERY            ((XAuint8) 0x10)
   2375 #define XA_RDSRTPLUS_INFOHOROSCOPE          ((XAuint8) 0x11)
   2376 #define XA_RDSRTPLUS_INFODAILYDIVERSION     ((XAuint8) 0x12)
   2377 #define XA_RDSRTPLUS_INFOHEALTH             ((XAuint8) 0x13)
   2378 #define XA_RDSRTPLUS_INFOEVENT              ((XAuint8) 0x14)
   2379 #define XA_RDSRTPLUS_INFOSZENE              ((XAuint8) 0x15)
   2380 #define XA_RDSRTPLUS_INFOCINEMA             ((XAuint8) 0x16)
   2381 #define XA_RDSRTPLUS_INFOTV                 ((XAuint8) 0x17)
   2382 #define XA_RDSRTPLUS_INFODATETIME           ((XAuint8) 0x18)
   2383 #define XA_RDSRTPLUS_INFOWEATHER            ((XAuint8) 0x19)
   2384 #define XA_RDSRTPLUS_INFOTRAFFIC            ((XAuint8) 0x1A)
   2385 #define XA_RDSRTPLUS_INFOALARM              ((XAuint8) 0x1B)
   2386 #define XA_RDSRTPLUS_INFOADVISERTISEMENT    ((XAuint8) 0x1C)
   2387 #define XA_RDSRTPLUS_INFOURL                ((XAuint8) 0x1D)
   2388 #define XA_RDSRTPLUS_INFOOTHER              ((XAuint8) 0x1E)
   2389 #define XA_RDSRTPLUS_STATIONNAMESHORT       ((XAuint8) 0x1F)
   2390 #define XA_RDSRTPLUS_STATIONNAMELONG        ((XAuint8) 0x20)
   2391 #define XA_RDSRTPLUS_PROGRAMNOW             ((XAuint8) 0x21)
   2392 #define XA_RDSRTPLUS_PROGRAMNEXT            ((XAuint8) 0x22)
   2393 #define XA_RDSRTPLUS_PROGRAMPART            ((XAuint8) 0x23)
   2394 #define XA_RDSRTPLUS_PROGRAMHOST            ((XAuint8) 0x24)
   2395 #define XA_RDSRTPLUS_PROFRAMEDITORIALSTAFF  ((XAuint8) 0x25)
   2396 #define XA_RDSRTPLUS_PROGRAMFREQUENCY       ((XAuint8) 0x26)
   2397 #define XA_RDSRTPLUS_PROGRAMHOMEPAGE        ((XAuint8) 0x27)
   2398 #define XA_RDSRTPLUS_PROGRAMSUBCHANNEL      ((XAuint8) 0x28)
   2399 #define XA_RDSRTPLUS_PHONEHOTLINE           ((XAuint8) 0x29)
   2400 #define XA_RDSRTPLUS_PHONESTUDIO            ((XAuint8) 0x2A)
   2401 #define XA_RDSRTPLUS_PHONEOTHER             ((XAuint8) 0x2B)
   2402 #define XA_RDSRTPLUS_SMSSTUDIO              ((XAuint8) 0x2C)
   2403 #define XA_RDSRTPLUS_SMSOTHER               ((XAuint8) 0x2D)
   2404 #define XA_RDSRTPLUS_EMAILHOTLINE           ((XAuint8) 0x2E)
   2405 #define XA_RDSRTPLUS_EMAILSTUDIO            ((XAuint8) 0x2F)
   2406 #define XA_RDSRTPLUS_EMAILOTHER             ((XAuint8) 0x30)
   2407 #define XA_RDSRTPLUS_MMSOTHER               ((XAuint8) 0x31)
   2408 #define XA_RDSRTPLUS_CHAT                   ((XAuint8) 0x32)
   2409 #define XA_RDSRTPLUS_CHATCENTER             ((XAuint8) 0x33)
   2410 #define XA_RDSRTPLUS_VOTEQUESTION           ((XAuint8) 0x34)
   2411 #define XA_RDSRTPLUS_VOTECENTER             ((XAuint8) 0x35)
   2412 #define XA_RDSRTPLUS_OPENCLASS45            ((XAuint8) 0x36)
   2413 #define XA_RDSRTPLUS_OPENCLASS55            ((XAuint8) 0x37)
   2414 #define XA_RDSRTPLUS_OPENCLASS56            ((XAuint8) 0x38)
   2415 #define XA_RDSRTPLUS_OPENCLASS57            ((XAuint8) 0x39)
   2416 #define XA_RDSRTPLUS_OPENCLASS58            ((XAuint8) 0x3A)
   2417 #define XA_RDSRTPLUS_PLACE                  ((XAuint8) 0x3B)
   2418 #define XA_RDSRTPLUS_APPOINTMENT            ((XAuint8) 0x3C)
   2419 #define XA_RDSRTPLUS_IDENTIFIER             ((XAuint8) 0x3D)
   2420 #define XA_RDSRTPLUS_PURCHASE               ((XAuint8) 0x3E)
   2421 #define XA_RDSRTPLUS_GETDATA                ((XAuint8) 0x3F)
   2422 
   2423 XA_API extern const XAInterfaceID XA_IID_RDS;
   2424 
   2425 struct XARDSItf_;
   2426 typedef const struct XARDSItf_ * const * XARDSItf;
   2427 
   2428 typedef void (XAAPIENTRY * xaGetODAGroupCallback) (
   2429     XARadioItf caller,
   2430     void * pContext,
   2431     XAboolean success,
   2432     XAint16 group,
   2433     XAuint16 message
   2434 );
   2435 
   2436 typedef void (XAAPIENTRY * xaNewODADataCallback) (
   2437     XARDSItf caller,
   2438     void * pContext,
   2439     XAint16 group,
   2440     XAuint64 data
   2441 );
   2442 
   2443 typedef void (XAAPIENTRY * xaRDSCallback) (
   2444     XARDSItf caller,
   2445     void * pContext,
   2446     XAuint16 event,
   2447     XAuint8 eventData
   2448 );
   2449 
   2450 struct XARDSItf_ {
   2451     XAresult (*QueryRDSSignal) (
   2452         XARDSItf self,
   2453         XAboolean * isSignal
   2454     );
   2455     XAresult (*GetProgrammeServiceName) (
   2456         XARDSItf self,
   2457         XAchar * ps
   2458     );
   2459     XAresult (*GetRadioText) (
   2460         XARDSItf self,
   2461         XAchar * rt
   2462     );
   2463     XAresult (*GetRadioTextPlus) (
   2464         XARDSItf self,
   2465         XAuint8 contentType,
   2466         XAchar * informationElement,
   2467         XAchar * descriptor,
   2468         XAuint8 * descriptorContentType
   2469     );
   2470     XAresult (*GetProgrammeType) (
   2471         XARDSItf self,
   2472         XAuint32 * pty
   2473     );
   2474     XAresult (*GetProgrammeTypeString) (
   2475         XARDSItf self,
   2476         XAboolean isLengthMax16,
   2477         XAchar * pty
   2478     );
   2479     XAresult (*GetProgrammeIdentificationCode) (
   2480         XARDSItf self,
   2481         XAint16 * pi
   2482     );
   2483     XAresult (*GetClockTime) (
   2484         XARDSItf self,
   2485         XAtime * dateAndTime
   2486     );
   2487     XAresult (*GetTrafficAnnouncement) (
   2488         XARDSItf self,
   2489         XAboolean * ta
   2490     );
   2491     XAresult (*GetTrafficProgramme) (
   2492         XARDSItf self,
   2493         XAboolean * tp
   2494     );
   2495     XAresult (*SeekByProgrammeType) (
   2496         XARDSItf self,
   2497         XAuint32 pty,
   2498         XAboolean upwards
   2499     );
   2500     XAresult (*SeekTrafficAnnouncement) (
   2501         XARDSItf self,
   2502         XAboolean upwards
   2503     );
   2504     XAresult (*SeekTrafficProgramme) (
   2505         XARDSItf self,
   2506         XAboolean upwards
   2507     );
   2508     XAresult (*SetAutomaticSwitching) (
   2509         XARDSItf self,
   2510         XAboolean automatic
   2511     );
   2512     XAresult (*GetAutomaticSwitching) (
   2513         XARDSItf self,
   2514         XAboolean * automatic
   2515     );
   2516     XAresult (*SetAutomaticTrafficAnnouncement) (
   2517         XARDSItf self,
   2518         XAboolean automatic
   2519     );
   2520     XAresult (*GetAutomaticTrafficAnnouncement) (
   2521         XARDSItf self,
   2522         XAboolean * automatic
   2523     );
   2524     XAresult (*GetODAGroup) (
   2525         XARDSItf self,
   2526         XAuint16 AID,
   2527         xaGetODAGroupCallback callback,
   2528         void * pContext
   2529     );
   2530     XAresult (*SubscribeODAGroup) (
   2531         XARDSItf self,
   2532         XAint16 group,
   2533         XAboolean useErrorCorrection
   2534     );
   2535     XAresult (*UnsubscribeODAGroup) (
   2536         XARDSItf self,
   2537         XAint16 group
   2538     );
   2539     XAresult (*ListODAGroupSubscriptions) (
   2540         XARDSItf self,
   2541         XAint16* pGroups,
   2542         XAuint32* pLength
   2543     );
   2544     XAresult (*RegisterRDSCallback) (
   2545         XARDSItf self,
   2546         xaRDSCallback callback,
   2547         void * pContext
   2548     );
   2549     XAresult (*RegisterODADataCallback) (
   2550         XARDSItf self,
   2551         xaNewODADataCallback callback,
   2552         void * pContext
   2553     );
   2554 };
   2555 
   2556 /* VIBRA */
   2557 
   2558 XA_API extern const XAInterfaceID XA_IID_VIBRA;
   2559 
   2560 struct XAVibraItf_;
   2561 typedef const struct XAVibraItf_ * const * XAVibraItf;
   2562 
   2563 struct XAVibraItf_ {
   2564     XAresult (*Vibrate) (
   2565         XAVibraItf self,
   2566         XAboolean vibrate
   2567     );
   2568     XAresult (*IsVibrating) (
   2569         XAVibraItf self,
   2570         XAboolean * pVibrating
   2571     );
   2572     XAresult (*SetFrequency) (
   2573         XAVibraItf self,
   2574         XAmilliHertz frequency
   2575     );
   2576     XAresult (*GetFrequency) (
   2577         XAVibraItf self,
   2578         XAmilliHertz * pFrequency
   2579     );
   2580     XAresult (*SetIntensity) (
   2581         XAVibraItf self,
   2582         XApermille intensity
   2583     );
   2584     XAresult (*GetIntensity) (
   2585         XAVibraItf self,
   2586         XApermille * pIntensity
   2587     );
   2588 };
   2589 
   2590 /* LED ARRAY */
   2591 
   2592 typedef struct XAHSL_ {
   2593     XAmillidegree hue;
   2594     XApermille saturation;
   2595     XApermille lightness;
   2596 } XAHSL;
   2597 
   2598 XA_API extern const XAInterfaceID XA_IID_LED;
   2599 
   2600 struct XALEDArrayItf_;
   2601 typedef const struct XALEDArrayItf_ * const * XALEDArrayItf;
   2602 
   2603 struct XALEDArrayItf_ {
   2604     XAresult (*ActivateLEDArray) (
   2605         XALEDArrayItf self,
   2606         XAuint32 lightMask
   2607     );
   2608     XAresult (*IsLEDArrayActivated) (
   2609         XALEDArrayItf self,
   2610         XAuint32 * pLightMask
   2611     );
   2612     XAresult (*SetColor) (
   2613         XALEDArrayItf self,
   2614         XAuint8 index,
   2615         const XAHSL * pColor
   2616     );
   2617     XAresult (*GetColor) (
   2618         XALEDArrayItf self,
   2619         XAuint8 index,
   2620         XAHSL * pColor
   2621     );
   2622 };
   2623 
   2624 
   2625 
   2626   /*****************************************************************/
   2627   /* CODEC RELATED INTERFACES, STRUCTS AND DEFINES                 */
   2628   /*****************************************************************/
   2629 
   2630 /* AUDIO ENCODER AND AUDIO ENCODER/DECODER CAPABILITIES */
   2631 
   2632 #define XA_RATECONTROLMODE_CONSTANTBITRATE  ((XAuint32) 0x00000001)
   2633 #define XA_RATECONTROLMODE_VARIABLEBITRATE  ((XAuint32) 0x00000002)
   2634 
   2635 #define XA_AUDIOCODEC_PCM                   ((XAuint32) 0x00000001)
   2636 #define XA_AUDIOCODEC_MP3                   ((XAuint32) 0x00000002)
   2637 #define XA_AUDIOCODEC_AMR                   ((XAuint32) 0x00000003)
   2638 #define XA_AUDIOCODEC_AMRWB                 ((XAuint32) 0x00000004)
   2639 #define XA_AUDIOCODEC_AMRWBPLUS             ((XAuint32) 0x00000005)
   2640 #define XA_AUDIOCODEC_AAC                   ((XAuint32) 0x00000006)
   2641 #define XA_AUDIOCODEC_WMA                   ((XAuint32) 0x00000007)
   2642 #define XA_AUDIOCODEC_REAL                  ((XAuint32) 0x00000008)
   2643 #define XA_AUDIOCODEC_VORBIS                ((XAuint32) 0x00000009)
   2644 
   2645 #define XA_AUDIOPROFILE_PCM                 ((XAuint32) 0x00000001)
   2646 
   2647 #define XA_AUDIOPROFILE_MPEG1_L3            ((XAuint32) 0x00000001)
   2648 #define XA_AUDIOPROFILE_MPEG2_L3            ((XAuint32) 0x00000002)
   2649 #define XA_AUDIOPROFILE_MPEG25_L3           ((XAuint32) 0x00000003)
   2650 
   2651 #define XA_AUDIOCHANMODE_MP3_MONO           ((XAuint32) 0x00000001)
   2652 #define XA_AUDIOCHANMODE_MP3_STEREO         ((XAuint32) 0x00000002)
   2653 #define XA_AUDIOCHANMODE_MP3_JOINTSTEREO    ((XAuint32) 0x00000003)
   2654 #define XA_AUDIOCHANMODE_MP3_DUAL           ((XAuint32) 0x00000004)
   2655 
   2656 #define XA_AUDIOPROFILE_AMR                 ((XAuint32) 0x00000001)
   2657 
   2658 #define XA_AUDIOSTREAMFORMAT_CONFORMANCE    ((XAuint32) 0x00000001)
   2659 #define XA_AUDIOSTREAMFORMAT_IF1            ((XAuint32) 0x00000002)
   2660 #define XA_AUDIOSTREAMFORMAT_IF2            ((XAuint32) 0x00000003)
   2661 #define XA_AUDIOSTREAMFORMAT_FSF            ((XAuint32) 0x00000004)
   2662 #define XA_AUDIOSTREAMFORMAT_RTPPAYLOAD     ((XAuint32) 0x00000005)
   2663 #define XA_AUDIOSTREAMFORMAT_ITU            ((XAuint32) 0x00000006)
   2664 
   2665 #define XA_AUDIOPROFILE_AMRWB               ((XAuint32) 0x00000001)
   2666 
   2667 #define XA_AUDIOPROFILE_AMRWBPLUS           ((XAuint32) 0x00000001)
   2668 
   2669 #define XA_AUDIOPROFILE_AAC_AAC             ((XAuint32) 0x00000001)
   2670 
   2671 #define XA_AUDIOMODE_AAC_MAIN               ((XAuint32) 0x00000001)
   2672 #define XA_AUDIOMODE_AAC_LC                 ((XAuint32) 0x00000002)
   2673 #define XA_AUDIOMODE_AAC_SSR                ((XAuint32) 0x00000003)
   2674 #define XA_AUDIOMODE_AAC_LTP                ((XAuint32) 0x00000004)
   2675 #define XA_AUDIOMODE_AAC_HE                 ((XAuint32) 0x00000005)
   2676 #define XA_AUDIOMODE_AAC_SCALABLE           ((XAuint32) 0x00000006)
   2677 #define XA_AUDIOMODE_AAC_ERLC               ((XAuint32) 0x00000007)
   2678 #define XA_AUDIOMODE_AAC_LD                 ((XAuint32) 0x00000008)
   2679 #define XA_AUDIOMODE_AAC_HE_PS              ((XAuint32) 0x00000009)
   2680 #define XA_AUDIOMODE_AAC_HE_MPS             ((XAuint32) 0x0000000A)
   2681 
   2682 #define XA_AUDIOSTREAMFORMAT_MP2ADTS        ((XAuint32) 0x00000001)
   2683 #define XA_AUDIOSTREAMFORMAT_MP4ADTS        ((XAuint32) 0x00000002)
   2684 #define XA_AUDIOSTREAMFORMAT_MP4LOAS        ((XAuint32) 0x00000003)
   2685 #define XA_AUDIOSTREAMFORMAT_MP4LATM        ((XAuint32) 0x00000004)
   2686 #define XA_AUDIOSTREAMFORMAT_ADIF           ((XAuint32) 0x00000005)
   2687 #define XA_AUDIOSTREAMFORMAT_MP4FF          ((XAuint32) 0x00000006)
   2688 #define XA_AUDIOSTREAMFORMAT_RAW            ((XAuint32) 0x00000007)
   2689 
   2690 #define XA_AUDIOPROFILE_WMA7                ((XAuint32) 0x00000001)
   2691 #define XA_AUDIOPROFILE_WMA8                ((XAuint32) 0x00000002)
   2692 #define XA_AUDIOPROFILE_WMA9                ((XAuint32) 0x00000003)
   2693 #define XA_AUDIOPROFILE_WMA10               ((XAuint32) 0x00000004)
   2694 
   2695 #define XA_AUDIOMODE_WMA_LEVEL1             ((XAuint32) 0x00000001)
   2696 #define XA_AUDIOMODE_WMA_LEVEL2             ((XAuint32) 0x00000002)
   2697 #define XA_AUDIOMODE_WMA_LEVEL3             ((XAuint32) 0x00000003)
   2698 #define XA_AUDIOMODE_WMA_LEVEL4             ((XAuint32) 0x00000004)
   2699 #define XA_AUDIOMODE_WMAPRO_LEVELM0         ((XAuint32) 0x00000005)
   2700 #define XA_AUDIOMODE_WMAPRO_LEVELM1         ((XAuint32) 0x00000006)
   2701 #define XA_AUDIOMODE_WMAPRO_LEVELM2         ((XAuint32) 0x00000007)
   2702 #define XA_AUDIOMODE_WMAPRO_LEVELM3         ((XAuint32) 0x00000008)
   2703 
   2704 #define XA_AUDIOPROFILE_REALAUDIO           ((XAuint32) 0x00000001)
   2705 
   2706 #define XA_AUDIOMODE_REALAUDIO_G2           ((XAuint32) 0x00000001)
   2707 #define XA_AUDIOMODE_REALAUDIO_8            ((XAuint32) 0x00000002)
   2708 #define XA_AUDIOMODE_REALAUDIO_10           ((XAuint32) 0x00000003)
   2709 #define XA_AUDIOMODE_REALAUDIO_SURROUND     ((XAuint32) 0x00000004)
   2710 
   2711 #define XA_AUDIOPROFILE_VORBIS              ((XAuint32) 0x00000001)
   2712 
   2713 #define XA_AUDIOMODE_VORBIS                 ((XAuint32) 0x00000001)
   2714 
   2715 
   2716 typedef struct XAAudioCodecDescriptor_ {
   2717     XAuint32 maxChannels;
   2718     XAuint32 minBitsPerSample;
   2719     XAuint32 maxBitsPerSample;
   2720     XAmilliHertz minSampleRate;
   2721     XAmilliHertz maxSampleRate;
   2722     XAboolean isFreqRangeContinuous;
   2723     XAmilliHertz * pSampleRatesSupported;
   2724     XAuint32 numSampleRatesSupported;
   2725     XAuint32 minBitRate;
   2726     XAuint32 maxBitRate;
   2727     XAboolean isBitrateRangeContinuous;
   2728     XAuint32 * pBitratesSupported;
   2729     XAuint32 numBitratesSupported;
   2730     XAuint32 profileSetting;
   2731     XAuint32 modeSetting;
   2732 } XAAudioCodecDescriptor;
   2733 
   2734 typedef struct XAAudioEncoderSettings_ {
   2735     XAuint32 encoderId;
   2736     XAuint32 channelsIn;
   2737     XAuint32 channelsOut;
   2738     XAmilliHertz sampleRate;
   2739     XAuint32 bitRate;
   2740     XAuint32 bitsPerSample;
   2741     XAuint32 rateControl;
   2742     XAuint32 profileSetting;
   2743     XAuint32 levelSetting;
   2744     XAuint32 channelMode;
   2745     XAuint32 streamFormat;
   2746     XAuint32 encodeOptions;
   2747     XAuint32 blockAlignment;
   2748 } XAAudioEncoderSettings;
   2749 
   2750 XA_API extern const XAInterfaceID XA_IID_AUDIODECODERCAPABILITIES;
   2751 
   2752 struct XAAudioDecoderCapabilitiesItf_;
   2753 typedef const struct XAAudioDecoderCapabilitiesItf_
   2754     * const * XAAudioDecoderCapabilitiesItf;
   2755 
   2756 struct XAAudioDecoderCapabilitiesItf_ {
   2757     XAresult (*GetAudioDecoders) (
   2758         XAAudioDecoderCapabilitiesItf self,
   2759         XAuint32 * pNumDecoders,
   2760         XAuint32 * pDecoderIds
   2761     );
   2762     XAresult (*GetAudioDecoderCapabilities) (
   2763         XAAudioDecoderCapabilitiesItf self,
   2764         XAuint32 decoderId,
   2765         XAuint32 * pIndex,
   2766         XAAudioCodecDescriptor * pDescriptor
   2767     );
   2768 };
   2769 
   2770 XA_API extern const XAInterfaceID XA_IID_AUDIOENCODER;
   2771 
   2772 struct XAAudioEncoderItf_;
   2773 typedef const struct XAAudioEncoderItf_ * const * XAAudioEncoderItf;
   2774 
   2775 struct XAAudioEncoderItf_ {
   2776     XAresult (*SetEncoderSettings) (
   2777         XAAudioEncoderItf self,
   2778         XAAudioEncoderSettings * pSettings
   2779     );
   2780     XAresult (*GetEncoderSettings) (
   2781         XAAudioEncoderItf self,
   2782         XAAudioEncoderSettings * pSettings
   2783     );
   2784 };
   2785 
   2786 XA_API extern const XAInterfaceID XA_IID_AUDIOENCODERCAPABILITIES;
   2787 
   2788 struct XAAudioEncoderCapabilitiesItf_;
   2789 typedef const struct XAAudioEncoderCapabilitiesItf_
   2790     * const * XAAudioEncoderCapabilitiesItf;
   2791 
   2792 struct XAAudioEncoderCapabilitiesItf_ {
   2793     XAresult (*GetAudioEncoders) (
   2794         XAAudioEncoderCapabilitiesItf self,
   2795         XAuint32 * pNumEncoders,
   2796         XAuint32 * pEncoderIds
   2797     );
   2798     XAresult (*GetAudioEncoderCapabilities) (
   2799         XAAudioEncoderCapabilitiesItf self,
   2800         XAuint32 encoderId,
   2801         XAuint32 * pIndex,
   2802         XAAudioCodecDescriptor * pDescriptor
   2803     );
   2804 };
   2805 
   2806 /* IMAGE ENCODER AND IMAGE ENCODER/DECODER CAPABILITIES */
   2807 
   2808 #define XA_IMAGECODEC_JPEG              ((XAuint32) 0x00000001)
   2809 #define XA_IMAGECODEC_GIF               ((XAuint32) 0x00000002)
   2810 #define XA_IMAGECODEC_BMP               ((XAuint32) 0x00000003)
   2811 #define XA_IMAGECODEC_PNG               ((XAuint32) 0x00000004)
   2812 #define XA_IMAGECODEC_TIFF              ((XAuint32) 0x00000005)
   2813 #define XA_IMAGECODEC_RAW               ((XAuint32) 0x00000006)
   2814 
   2815 typedef struct XAImageCodecDescriptor_ {
   2816     XAuint32 codecId;
   2817     XAuint32 maxWidth;
   2818     XAuint32 maxHeight;
   2819 } XAImageCodecDescriptor;
   2820 
   2821 typedef struct XAImageSettings_ {
   2822     XAuint32 encoderId;
   2823     XAuint32 width;
   2824     XAuint32 height;
   2825     XApermille compressionLevel;
   2826     XAuint32 colorFormat;
   2827 } XAImageSettings;
   2828 
   2829 XA_API extern const XAInterfaceID XA_IID_IMAGEENCODERCAPABILITIES;
   2830 
   2831 struct XAImageEncoderCapabilitiesItf_;
   2832 typedef const struct XAImageEncoderCapabilitiesItf_
   2833     * const * XAImageEncoderCapabilitiesItf;
   2834 
   2835 struct XAImageEncoderCapabilitiesItf_ {
   2836     XAresult (*GetImageEncoderCapabilities) (
   2837         XAImageEncoderCapabilitiesItf self,
   2838         XAuint32 * pEncoderId,
   2839         XAImageCodecDescriptor * pDescriptor
   2840     );
   2841     XAresult (*QueryColorFormats) (
   2842         const XAImageEncoderCapabilitiesItf self,
   2843         XAuint32 * pIndex,
   2844         XAuint32 * pColorFormat
   2845     );
   2846 };
   2847 
   2848 XA_API extern const XAInterfaceID XA_IID_IMAGEDECODERCAPABILITIES;
   2849 
   2850 struct XAImageDecoderCapabilitiesItf_;
   2851 typedef const struct XAImageDecoderCapabilitiesItf_
   2852     * const * XAImageDecoderCapabilitiesItf;
   2853 
   2854 struct XAImageDecoderCapabilitiesItf_ {
   2855     XAresult (*GetImageDecoderCapabilities) (
   2856         XAImageDecoderCapabilitiesItf self,
   2857         XAuint32 * pDecoderId,
   2858         XAImageCodecDescriptor * pDescriptor
   2859     );
   2860     XAresult (*QueryColorFormats) (
   2861         const XAImageDecoderCapabilitiesItf self,
   2862         XAuint32 * pIndex,
   2863         XAuint32 * pColorFormat
   2864     );
   2865 };
   2866 
   2867 XA_API extern const XAInterfaceID XA_IID_IMAGEENCODER;
   2868 
   2869 struct XAImageEncoderItf_;
   2870 typedef const struct XAImageEncoderItf_ * const * XAImageEncoderItf;
   2871 
   2872 struct XAImageEncoderItf_ {
   2873     XAresult (*SetImageSettings) (
   2874         XAImageEncoderItf self,
   2875         const XAImageSettings * pSettings
   2876     );
   2877     XAresult (*GetImageSettings) (
   2878         XAImageEncoderItf self,
   2879         XAImageSettings * pSettings
   2880     );
   2881     XAresult (*GetSizeEstimate) (
   2882         XAImageEncoderItf self,
   2883         XAuint32 * pSize
   2884     );
   2885 };
   2886 
   2887 /* VIDEO ENCODER AND VIDEO ENCODER/DECODER CAPABILITIES */
   2888 
   2889 #define XA_VIDEOCODEC_MPEG2                     ((XAuint32) 0x00000001)
   2890 #define XA_VIDEOCODEC_H263                      ((XAuint32) 0x00000002)
   2891 #define XA_VIDEOCODEC_MPEG4                     ((XAuint32) 0x00000003)
   2892 #define XA_VIDEOCODEC_AVC                       ((XAuint32) 0x00000004)
   2893 #define XA_VIDEOCODEC_VC1                       ((XAuint32) 0x00000005)
   2894 
   2895 #define XA_VIDEOPROFILE_MPEG2_SIMPLE            ((XAuint32) 0x00000001)
   2896 #define XA_VIDEOPROFILE_MPEG2_MAIN              ((XAuint32) 0x00000002)
   2897 #define XA_VIDEOPROFILE_MPEG2_422               ((XAuint32) 0x00000003)
   2898 #define XA_VIDEOPROFILE_MPEG2_SNR               ((XAuint32) 0x00000004)
   2899 #define XA_VIDEOPROFILE_MPEG2_SPATIAL           ((XAuint32) 0x00000005)
   2900 #define XA_VIDEOPROFILE_MPEG2_HIGH              ((XAuint32) 0x00000006)
   2901 
   2902 #define XA_VIDEOLEVEL_MPEG2_LL                  ((XAuint32) 0x00000001)
   2903 #define XA_VIDEOLEVEL_MPEG2_ML                  ((XAuint32) 0x00000002)
   2904 #define XA_VIDEOLEVEL_MPEG2_H14                 ((XAuint32) 0x00000003)
   2905 #define XA_VIDEOLEVEL_MPEG2_HL                  ((XAuint32) 0x00000004)
   2906 
   2907 #define XA_VIDEOPROFILE_H263_BASELINE           ((XAuint32) 0x00000001)
   2908 #define XA_VIDEOPROFILE_H263_H320CODING         ((XAuint32) 0x00000002)
   2909 #define XA_VIDEOPROFILE_H263_BACKWARDCOMPATIBLE ((XAuint32) 0x00000003)
   2910 #define XA_VIDEOPROFILE_H263_ISWV2              ((XAuint32) 0x00000004)
   2911 #define XA_VIDEOPROFILE_H263_ISWV3              ((XAuint32) 0x00000005)
   2912 #define XA_VIDEOPROFILE_H263_HIGHCOMPRESSION    ((XAuint32) 0x00000006)
   2913 #define XA_VIDEOPROFILE_H263_INTERNET           ((XAuint32) 0x00000007)
   2914 #define XA_VIDEOPROFILE_H263_INTERLACE          ((XAuint32) 0x00000008)
   2915 #define XA_VIDEOPROFILE_H263_HIGHLATENCY        ((XAuint32) 0x00000009)
   2916 
   2917 #define XA_VIDEOLEVEL_H263_10                   ((XAuint32) 0x00000001)
   2918 #define XA_VIDEOLEVEL_H263_20                   ((XAuint32) 0x00000002)
   2919 #define XA_VIDEOLEVEL_H263_30                   ((XAuint32) 0x00000003)
   2920 #define XA_VIDEOLEVEL_H263_40                   ((XAuint32) 0x00000004)
   2921 #define XA_VIDEOLEVEL_H263_45                   ((XAuint32) 0x00000005)
   2922 #define XA_VIDEOLEVEL_H263_50                   ((XAuint32) 0x00000006)
   2923 #define XA_VIDEOLEVEL_H263_60                   ((XAuint32) 0x00000007)
   2924 #define XA_VIDEOLEVEL_H263_70                   ((XAuint32) 0x00000008)
   2925 
   2926 #define XA_VIDEOPROFILE_MPEG4_SIMPLE            ((XAuint32) 0x00000001)
   2927 #define XA_VIDEOPROFILE_MPEG4_SIMPLESCALABLE    ((XAuint32) 0x00000002)
   2928 #define XA_VIDEOPROFILE_MPEG4_CORE              ((XAuint32) 0x00000003)
   2929 #define XA_VIDEOPROFILE_MPEG4_MAIN              ((XAuint32) 0x00000004)
   2930 #define XA_VIDEOPROFILE_MPEG4_NBIT              ((XAuint32) 0x00000005)
   2931 #define XA_VIDEOPROFILE_MPEG4_SCALABLETEXTURE   ((XAuint32) 0x00000006)
   2932 #define XA_VIDEOPROFILE_MPEG4_SIMPLEFACE        ((XAuint32) 0x00000007)
   2933 #define XA_VIDEOPROFILE_MPEG4_SIMPLEFBA         ((XAuint32) 0x00000008)
   2934 #define XA_VIDEOPROFILE_MPEG4_BASICANIMATED     ((XAuint32) 0x00000009)
   2935 #define XA_VIDEOPROFILE_MPEG4_HYBRID            ((XAuint32) 0x0000000A)
   2936 #define XA_VIDEOPROFILE_MPEG4_ADVANCEDREALTIME  ((XAuint32) 0x0000000B)
   2937 #define XA_VIDEOPROFILE_MPEG4_CORESCALABLE      ((XAuint32) 0x0000000C)
   2938 #define XA_VIDEOPROFILE_MPEG4_ADVANCEDCODING    ((XAuint32) 0x0000000D)
   2939 #define XA_VIDEOPROFILE_MPEG4_ADVANCEDCORE      ((XAuint32) 0x0000000E)
   2940 #define XA_VIDEOPROFILE_MPEG4_ADVANCEDSCALABLE  ((XAuint32) 0x0000000F)
   2941 
   2942 #define XA_VIDEOLEVEL_MPEG4_0                   ((XAuint32) 0x00000001)
   2943 #define XA_VIDEOLEVEL_MPEG4_0b                  ((XAuint32) 0x00000002)
   2944 #define XA_VIDEOLEVEL_MPEG4_1                   ((XAuint32) 0x00000003)
   2945 #define XA_VIDEOLEVEL_MPEG4_2                   ((XAuint32) 0x00000004)
   2946 #define XA_VIDEOLEVEL_MPEG4_3                   ((XAuint32) 0x00000005)
   2947 #define XA_VIDEOLEVEL_MPEG4_4                   ((XAuint32) 0x00000006)
   2948 #define XA_VIDEOLEVEL_MPEG4_4a                  ((XAuint32) 0x00000007)
   2949 #define XA_VIDEOLEVEL_MPEG4_5                   ((XAuint32) 0x00000008)
   2950 
   2951 #define XA_VIDEOPROFILE_AVC_BASELINE            ((XAuint32) 0x00000001)
   2952 #define XA_VIDEOPROFILE_AVC_MAIN                ((XAuint32) 0x00000002)
   2953 #define XA_VIDEOPROFILE_AVC_EXTENDED            ((XAuint32) 0x00000003)
   2954 #define XA_VIDEOPROFILE_AVC_HIGH                ((XAuint32) 0x00000004)
   2955 #define XA_VIDEOPROFILE_AVC_HIGH10              ((XAuint32) 0x00000005)
   2956 #define XA_VIDEOPROFILE_AVC_HIGH422             ((XAuint32) 0x00000006)
   2957 #define XA_VIDEOPROFILE_AVC_HIGH444             ((XAuint32) 0x00000007)
   2958 
   2959 #define XA_VIDEOLEVEL_AVC_1                     ((XAuint32) 0x00000001)
   2960 #define XA_VIDEOLEVEL_AVC_1B                    ((XAuint32) 0x00000002)
   2961 #define XA_VIDEOLEVEL_AVC_11                    ((XAuint32) 0x00000003)
   2962 #define XA_VIDEOLEVEL_AVC_12                    ((XAuint32) 0x00000004)
   2963 #define XA_VIDEOLEVEL_AVC_13                    ((XAuint32) 0x00000005)
   2964 #define XA_VIDEOLEVEL_AVC_2                     ((XAuint32) 0x00000006)
   2965 #define XA_VIDEOLEVEL_AVC_21                    ((XAuint32) 0x00000007)
   2966 #define XA_VIDEOLEVEL_AVC_22                    ((XAuint32) 0x00000008)
   2967 #define XA_VIDEOLEVEL_AVC_3                     ((XAuint32) 0x00000009)
   2968 #define XA_VIDEOLEVEL_AVC_31                    ((XAuint32) 0x0000000A)
   2969 #define XA_VIDEOLEVEL_AVC_32                    ((XAuint32) 0x0000000B)
   2970 #define XA_VIDEOLEVEL_AVC_4                     ((XAuint32) 0x0000000C)
   2971 #define XA_VIDEOLEVEL_AVC_41                    ((XAuint32) 0x0000000D)
   2972 #define XA_VIDEOLEVEL_AVC_42                    ((XAuint32) 0x0000000E)
   2973 #define XA_VIDEOLEVEL_AVC_5                     ((XAuint32) 0x0000000F)
   2974 #define XA_VIDEOLEVEL_AVC_51                    ((XAuint32) 0x00000010)
   2975 
   2976 #define XA_VIDEOLEVEL_VC1_SIMPLE                ((XAuint32) 0x00000001)
   2977 #define XA_VIDEOLEVEL_VC1_MAIN                  ((XAuint32) 0x00000002)
   2978 #define XA_VIDEOLEVEL_VC1_ADVANCED              ((XAuint32) 0x00000003)
   2979 
   2980 #define XA_VIDEOLEVEL_VC1_LOW                   ((XAuint32) 0x00000001)
   2981 #define XA_VIDEOLEVEL_VC1_MEDIUM                ((XAuint32) 0x00000002)
   2982 #define XA_VIDEOLEVEL_VC1_HIGH                  ((XAuint32) 0x00000003)
   2983 #define XA_VIDEOLEVEL_VC1_L0                    ((XAuint32) 0x00000004)
   2984 #define XA_VIDEOLEVEL_VC1_L1                    ((XAuint32) 0x00000005)
   2985 #define XA_VIDEOLEVEL_VC1_L2                    ((XAuint32) 0x00000006)
   2986 #define XA_VIDEOLEVEL_VC1_L3                    ((XAuint32) 0x00000007)
   2987 #define XA_VIDEOLEVEL_VC1_L4                    ((XAuint32) 0x00000008)
   2988 
   2989 typedef struct XAVideoCodecDescriptor_ {
   2990     XAuint32 codecId;
   2991     XAuint32 maxWidth;
   2992     XAuint32 maxHeight;
   2993     XAuint32 maxFrameRate;
   2994     XAuint32 maxBitRate;
   2995     XAuint32 rateControlSupported;
   2996     XAuint32 profileSetting;
   2997     XAuint32 levelSetting;
   2998 } XAVideoCodecDescriptor;
   2999 
   3000 typedef struct XAVideoSettings_ {
   3001     XAuint32 encoderId;
   3002     XAuint32 width;
   3003     XAuint32 height;
   3004     XAuint32 frameRate;
   3005     XAuint32 bitRate;
   3006     XAuint32 rateControl;
   3007     XAuint32 profileSetting;
   3008     XAuint32 levelSetting;
   3009     XAuint32 keyFrameInterval;
   3010 } XAVideoSettings;
   3011 
   3012 XA_API extern const XAInterfaceID XA_IID_VIDEODECODERCAPABILITIES;
   3013 
   3014 struct XAVideoDecoderCapabilitiesItf_;
   3015 typedef const struct XAVideoDecoderCapabilitiesItf_
   3016     * const * XAVideoDecoderCapabilitiesItf;
   3017 
   3018 struct XAVideoDecoderCapabilitiesItf_ {
   3019     XAresult (*GetVideoDecoders) (
   3020         XAVideoDecoderCapabilitiesItf self,
   3021         XAuint32 * pNumDecoders,
   3022         XAuint32 * pDecoderIds
   3023     );
   3024     XAresult (*GetVideoDecoderCapabilities) (
   3025         XAVideoDecoderCapabilitiesItf self,
   3026         XAuint32 decoderId,
   3027         XAuint32 * pIndex,
   3028         XAVideoCodecDescriptor * pDescriptor
   3029     );
   3030 };
   3031 
   3032 XA_API extern const XAInterfaceID XA_IID_VIDEOENCODER;
   3033 
   3034 XA_API extern const XAInterfaceID XA_IID_VIDEOENCODERCAPABILITIES;
   3035 
   3036 struct XAVideoEncoderCapabilitiesItf_;
   3037 typedef const struct XAVideoEncoderCapabilitiesItf_
   3038     * const * XAVideoEncoderCapabilitiesItf;
   3039 
   3040 struct XAVideoEncoderCapabilitiesItf_ {
   3041     XAresult (*GetVideoEncoders) (
   3042         XAVideoEncoderCapabilitiesItf self,
   3043         XAuint32 * pNumEncoders,
   3044         XAuint32 * pEncoderIds
   3045     );
   3046     XAresult (*GetVideoEncoderCapabilities) (
   3047         XAVideoEncoderCapabilitiesItf self,
   3048         XAuint32 encoderId,
   3049         XAuint32 * pIndex,
   3050         XAVideoCodecDescriptor * pDescriptor
   3051     );
   3052 };
   3053 
   3054 struct XAVideoEncoderItf_;
   3055 typedef const struct XAVideoEncoderItf_ * const * XAVideoEncoderItf;
   3056 
   3057 struct XAVideoEncoderItf_ {
   3058     XAresult (*SetVideoSettings) (
   3059         XAVideoEncoderItf self,
   3060         XAVideoSettings * pSettings
   3061     );
   3062     XAresult (*GetVideoSettings) (
   3063         XAVideoEncoderItf self,
   3064         XAVideoSettings * pSettings
   3065     );
   3066 };
   3067 
   3068 /* STREAM INFORMATION */
   3069 
   3070 #define XA_DOMAINTYPE_AUDIO     0x00000001
   3071 #define XA_DOMAINTYPE_VIDEO     0x00000002
   3072 #define XA_DOMAINTYPE_IMAGE     0x00000003
   3073 #define XA_DOMAINTYPE_TIMEDTEXT 0x00000004
   3074 #define XA_DOMAINTYPE_MIDI      0x00000005
   3075 #define XA_DOMAINTYPE_VENDOR    0xFFFFFFFE
   3076 #define XA_DOMAINTYPE_UNKNOWN   0xFFFFFFFF
   3077 
   3078 #define XA_MIDIBANK_DEVICE      0x00000001
   3079 #define XA_MIDIBANK_CUSTOM      0x00000002
   3080 
   3081 #define XA_MIDI_UNKNOWN         0xFFFFFFFF
   3082 
   3083 #define XA_STREAMCBEVENT_PROPERTYCHANGE     ((XAuint32) 0x00000001)
   3084 
   3085 typedef struct XAMediaContainerInformation_ {
   3086     XAuint32 containerType;
   3087     XAmillisecond mediaDuration;
   3088     XAuint32 numStreams;
   3089 } XAMediaContainerInformation;
   3090 
   3091 typedef struct XAVideoStreamInformation_ {
   3092     XAuint32 codecId;
   3093     XAuint32 width;
   3094     XAuint32 height;
   3095     XAuint32 frameRate;
   3096     XAuint32 bitRate;
   3097     XAmillisecond duration;
   3098 } XAVideoStreamInformation;
   3099 
   3100 typedef struct XAAudioStreamInformation_ {
   3101     XAuint32 codecId;
   3102     XAuint32 channels;
   3103     XAmilliHertz sampleRate;
   3104     XAuint32 bitRate;
   3105     XAchar langCountry[16];
   3106     XAmillisecond duration;
   3107 } XAAudioStreamInformation;
   3108 
   3109 typedef struct XAImageStreamInformation_ {
   3110     XAuint32 codecId;
   3111     XAuint32 width;
   3112     XAuint32 height;
   3113     XAmillisecond presentationDuration;
   3114 } XAImageStreamInformation;
   3115 
   3116 typedef struct XATimedTextStreamInformation_ {
   3117     XAuint16 layer;
   3118     XAuint32 width;
   3119     XAuint32 height;
   3120     XAuint16 tx;
   3121     XAuint16 ty;
   3122     XAuint32 bitrate;
   3123     XAchar langCountry[16];
   3124     XAmillisecond duration;
   3125 } XATimedTextStreamInformation;
   3126 
   3127 typedef struct XAMIDIStreamInformation_ {
   3128     XAuint32 channels;
   3129     XAuint32 tracks;
   3130     XAuint32 bankType;
   3131     XAchar langCountry[16];
   3132     XAmillisecond duration;
   3133 } XAMIDIStreamInformation;
   3134 
   3135 typedef struct XAVendorStreamInformation_ {
   3136     void *VendorStreamInfo;
   3137 } XAVendorStreamInformation;
   3138 
   3139 XA_API extern const XAInterfaceID XA_IID_STREAMINFORMATION;
   3140 
   3141 struct XAStreamInformationItf_;
   3142 typedef const struct XAStreamInformationItf_ * const * XAStreamInformationItf;
   3143 
   3144 typedef void (XAAPIENTRY * xaStreamEventChangeCallback) (
   3145     XAStreamInformationItf caller,
   3146     XAuint32 eventId,
   3147     XAuint32 streamIndex,
   3148     void * pEventData,
   3149     void * pContext
   3150 );
   3151 
   3152 struct XAStreamInformationItf_ {
   3153     XAresult (*QueryMediaContainerInformation) (
   3154         XAStreamInformationItf self,
   3155         XAMediaContainerInformation * info
   3156     );
   3157     XAresult (*QueryStreamType) (
   3158         XAStreamInformationItf self,
   3159         XAuint32 streamIndex,
   3160         XAuint32 *domain
   3161     );
   3162     XAresult (*QueryStreamInformation) (
   3163         XAStreamInformationItf self,
   3164         XAuint32 streamIndex,
   3165         void * info
   3166     );
   3167     XAresult (*QueryStreamName) (
   3168         XAStreamInformationItf self,
   3169         XAuint32 streamIndex,
   3170         XAuint16 * pNameSize,
   3171         XAchar * pName
   3172     );
   3173     XAresult (*RegisterStreamChangeCallback) (
   3174         XAStreamInformationItf self,
   3175         xaStreamEventChangeCallback callback,
   3176         void * pContext
   3177     );
   3178     XAresult (*QueryActiveStreams) (
   3179         XAStreamInformationItf self,
   3180         XAuint32 *numStreams,
   3181         XAboolean *activeStreams
   3182     );
   3183     XAresult (*SetActiveStream) (
   3184         XAStreamInformationItf self,
   3185         XAuint32   streamNum,
   3186         XAboolean  active,
   3187         XAboolean  commitNow
   3188     );
   3189 };
   3190 
   3191 #ifdef __cplusplus
   3192 } /* extern "C" */
   3193 #endif
   3194 
   3195 #endif /* _OPENMAXAL_H_ */
   3196