khronosfws/openmax_al/src/engine/xaengineitf.c
changeset 25 6f7ceef7b1d1
parent 21 2ed61feeead6
child 33 5e8b14bae8c3
equal deleted inserted replaced
21:2ed61feeead6 25:6f7ceef7b1d1
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description: 
    14  * Description: Engine Interface Implementation
    15 *
    15  *
    16 */
    16  */
    17 
    17 
    18 #include <stdio.h>
    18 #include <stdio.h>
    19 #include <stdlib.h>
    19 #include <stdlib.h>
    20 #include <assert.h>
    20 #include <assert.h>
    21 #include "xaengineitf.h"
    21 #include "xaengineitf.h"
    28 /**
    28 /**
    29  * XAEngineItfImpl* GetImpl(XAEngineItf self)
    29  * XAEngineItfImpl* GetImpl(XAEngineItf self)
    30  * Description: Validate interface pointer and cast it to implementation pointer.
    30  * Description: Validate interface pointer and cast it to implementation pointer.
    31  **/
    31  **/
    32 static XAEngineItfImpl* GetImpl(XAEngineItf self)
    32 static XAEngineItfImpl* GetImpl(XAEngineItf self)
    33 {
    33     {
    34     if( self )
    34     if (self)
    35     {
    35         {
    36         XAEngineItfImpl* impl = (XAEngineItfImpl*)(*self);
    36         XAEngineItfImpl* impl = (XAEngineItfImpl*) (*self);
    37         if( impl && (impl == impl->self) )
    37         if (impl && (impl == impl->self))
    38         {
    38             {
    39             return impl;
    39             return impl;
    40         }
    40             }
    41     }
    41         }
    42     return NULL;
    42     return NULL;
    43 }
    43     }
    44 /**
    44 /**
    45  * Base interface XAEngineItf implementation
    45  * Base interface XAEngineItf implementation
    46  */
    46  */
    47 XAresult XAEngineItfImpl_CreateCameraDevice(XAEngineItf self,
    47 XAresult XAEngineItfImpl_CreateCameraDevice(XAEngineItf self,
    48                                             XAObjectItf *pDevice,
    48         XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
    49                                             XAuint32 deviceID,
    49         const XAInterfaceID *pInterfaceIds,
    50                                             XAuint32 numInterfaces,
    50         const XAboolean *pInterfaceRequired)
    51                                             const XAInterfaceID *pInterfaceIds,
    51     {
    52                                             const XAboolean *pInterfaceRequired)
       
    53 {
       
    54     XAEngineItfImpl* impl = GetImpl(self);
    52     XAEngineItfImpl* impl = GetImpl(self);
    55 #ifdef OMAX_CAMERABIN
    53 #ifdef OMAX_CAMERABIN
    56     return XACameraDeviceImpl_CreateCameraDevice( impl->mapper,impl->capabilities,
    54     return XACameraDeviceImpl_CreateCameraDevice( impl->mapper,impl->capabilities,
    57                                                     pDevice, deviceID,numInterfaces,
    55             pDevice, deviceID,numInterfaces,
    58                                                     pInterfaceIds, pInterfaceRequired );
    56             pInterfaceIds, pInterfaceRequired );
    59 #else
    57 #else
    60     return XA_RESULT_FEATURE_UNSUPPORTED;
    58     return XA_RESULT_FEATURE_UNSUPPORTED;
    61 #endif
    59 #endif
    62 }
    60     }
    63 
    61 
    64 XAresult XAEngineItfImpl_CreateRadioDevice(XAEngineItf self,
    62 XAresult XAEngineItfImpl_CreateRadioDevice(XAEngineItf self,
    65                                             XAObjectItf *pDevice,
    63         XAObjectItf *pDevice, XAuint32 numInterfaces,
    66                                             XAuint32 numInterfaces,
    64         const XAInterfaceID *pInterfaceIds,
    67                                             const XAInterfaceID *pInterfaceIds,
    65         const XAboolean *pInterfaceRequired)
    68                                             const XAboolean *pInterfaceRequired)
    66     {
    69 {
    67     return XARadioDeviceImpl_CreateRadioDevice( /*((XAEngineItfImpl*)self)->mapper,*/
    70     return XARadioDeviceImpl_CreateRadioDevice( ((XAEngineItfImpl*)self)->mapper,
    68     pDevice, numInterfaces, pInterfaceIds, pInterfaceRequired);
    71                                                 pDevice, numInterfaces,
    69     }
    72                                                 pInterfaceIds, pInterfaceRequired );
       
    73 }
       
    74 
    70 
    75 XAresult XAEngineItfImpl_CreateLEDDevice(XAEngineItf self,
    71 XAresult XAEngineItfImpl_CreateLEDDevice(XAEngineItf self,
    76                                          XAObjectItf *pDevice,
    72         XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
    77                                          XAuint32 deviceID,
    73         const XAInterfaceID *pInterfaceIds,
    78                                          XAuint32 numInterfaces,
    74         const XAboolean *pInterfaceRequired)
    79                                          const XAInterfaceID *pInterfaceIds,
    75     {
    80                                          const XAboolean *pInterfaceRequired)
    76     return XALEDArrayDeviceImpl_CreateLEDArrayDevice(
    81 {
    77             ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID,
    82     return XALEDArrayDeviceImpl_CreateLEDArrayDevice( ((XAEngineItfImpl*)self)->mapper,
    78             numInterfaces, pInterfaceIds, pInterfaceRequired);
    83                                                         pDevice, deviceID, numInterfaces,
    79     }
    84                                                         pInterfaceIds, pInterfaceRequired );
       
    85 }
       
    86 
    80 
    87 XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self,
    81 XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self,
    88                                            XAObjectItf *pDevice,
    82         XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
    89                                            XAuint32 deviceID,
    83         const XAInterfaceID *pInterfaceIds,
    90                                            XAuint32 numInterfaces,
    84         const XAboolean *pInterfaceRequired)
    91                                            const XAInterfaceID *pInterfaceIds,
    85     {
    92                                            const XAboolean *pInterfaceRequired)
    86     return XAVibraDeviceImpl_CreateVibraDevice(
    93 {
    87             ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID,
    94     return XAVibraDeviceImpl_CreateVibraDevice( ((XAEngineItfImpl*)self)->mapper,
    88             numInterfaces, pInterfaceIds, pInterfaceRequired);
    95                                                 pDevice, deviceID, numInterfaces,
    89     }
    96                                                 pInterfaceIds, pInterfaceRequired);
       
    97 }
       
    98 
    90 
    99 XAresult XAEngineItfImpl_CreateMediaPlayer(XAEngineItf self,
    91 XAresult XAEngineItfImpl_CreateMediaPlayer(XAEngineItf self,
   100                                            XAObjectItf *pPlayer,
    92         XAObjectItf *pPlayer, XADataSource *pDataSrc, XADataSource *pBankSrc,
   101                                            XADataSource *pDataSrc,
    93         XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
   102                                            XADataSource *pBankSrc,
    94         XADataSink *pVibra, XADataSink *pLEDArray, XAuint32 numInterfaces,
   103                                            XADataSink *pAudioSnk,
    95         const XAInterfaceID *pInterfaceIds,
   104                                            XADataSink *pImageVideoSnk,
    96         const XAboolean *pInterfaceRequired)
   105                                            XADataSink *pVibra,
    97     {
   106                                            XADataSink *pLEDArray,
       
   107                                            XAuint32 numInterfaces,
       
   108                                            const XAInterfaceID *pInterfaceIds,
       
   109                                            const XAboolean *pInterfaceRequired)
       
   110 {
       
   111     XAEngineItfImpl* impl = GetImpl(self);
    98     XAEngineItfImpl* impl = GetImpl(self);
   112     return XAMediaPlayerImpl_CreateMediaPlayer(impl->mapper,impl->capabilities, pPlayer, 
    99     return XAMediaPlayerImpl_CreateMediaPlayer(impl->mapper,
   113                                              pDataSrc, pBankSrc, pAudioSnk,
   100             impl->capabilities, pPlayer, pDataSrc, pBankSrc, pAudioSnk,
   114                                              pImageVideoSnk, pVibra, pLEDArray,
   101             pImageVideoSnk, pVibra, pLEDArray, numInterfaces, pInterfaceIds,
   115                                              numInterfaces, pInterfaceIds, pInterfaceRequired);
   102             pInterfaceRequired);
   116 }
   103     }
   117 
   104 
   118 XAresult XAEngineItfImpl_CreateMediaRecorder(XAEngineItf self,
   105 XAresult XAEngineItfImpl_CreateMediaRecorder(XAEngineItf self,
   119                                              XAObjectItf * pRecorder,
   106         XAObjectItf * pRecorder, XADataSource * pAudioSrc,
   120                                              XADataSource * pAudioSrc,
   107         XADataSource * pImageVideoSrc, XADataSink * pDataSnk,
   121                                              XADataSource * pImageVideoSrc,
   108         XAuint32 numInterfaces, const XAInterfaceID * pInterfaceIds,
   122                                              XADataSink * pDataSnk,
   109         const XAboolean * pInterfaceRequired)
   123                                              XAuint32 numInterfaces,
   110     {
   124                                              const XAInterfaceID * pInterfaceIds,
       
   125                                              const XAboolean * pInterfaceRequired)
       
   126 {    
       
   127     XAEngineItfImpl* impl = GetImpl(self);
   111     XAEngineItfImpl* impl = GetImpl(self);
   128     return XAMediaRecorderImpl_CreateMediaRecorder(impl->mapper,
   112     return XAMediaRecorderImpl_CreateMediaRecorder(impl->mapper,
   129                                                    impl->capabilities,
   113             impl->capabilities, pRecorder, pAudioSrc, pImageVideoSrc,
   130                                                    pRecorder,
   114             pDataSnk, numInterfaces, pInterfaceIds, pInterfaceRequired);
   131                                                    pAudioSrc,
   115     }
   132                                                    pImageVideoSrc,
   116 
   133                                                    pDataSnk,
   117 XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self, XAObjectItf *pMix,
   134                                                    numInterfaces,
   118         XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
   135                                                    pInterfaceIds,
   119         const XAboolean *pInterfaceRequired)
   136                                                    pInterfaceRequired);
   120     {
   137 }
       
   138 
       
   139 XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self,
       
   140                                          XAObjectItf *pMix,
       
   141                                          XAuint32 numInterfaces,
       
   142                                          const XAInterfaceID *pInterfaceIds,
       
   143                                          const XAboolean *pInterfaceRequired)
       
   144 {
       
   145     XAEngineItfImpl* impl = GetImpl(self);
   121     XAEngineItfImpl* impl = GetImpl(self);
   146     return XAOMixImpl_CreateOutputMix(impl->mapper,impl->capabilities,
   122     return XAOMixImpl_CreateOutputMix(impl->mapper, impl->capabilities, pMix,
   147                                         pMix, numInterfaces,
   123             numInterfaces, pInterfaceIds, pInterfaceRequired);
   148                                         pInterfaceIds, pInterfaceRequired);
   124     }
   149 }
       
   150 
   125 
   151 XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self,
   126 XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self,
   152                                                  XAObjectItf *pMetadataExtractor,
   127         XAObjectItf *pMetadataExtractor, XADataSource *pDataSource,
   153                                                  XADataSource *pDataSource,
   128         XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
   154                                                  XAuint32 numInterfaces,
   129         const XAboolean *pInterfaceRequired)
   155                                                  const XAInterfaceID *pInterfaceIds,
   130     {
   156                                                  const XAboolean *pInterfaceRequired)
       
   157 {
       
   158     XAEngineItfImpl* impl = GetImpl(self);
   131     XAEngineItfImpl* impl = GetImpl(self);
   159     return XAMetadataExtractorImpl_Create(impl->mapper, impl->capabilities,
   132     return XAMetadataExtractorImpl_Create(impl->mapper, impl->capabilities,
   160                                             pMetadataExtractor, pDataSource,
   133             pMetadataExtractor, pDataSource, numInterfaces, pInterfaceIds,
   161                                             numInterfaces, pInterfaceIds, pInterfaceRequired);
   134             pInterfaceRequired);
   162 }
   135     }
   163 
   136 
   164 XAresult XAEngineItfImpl_CreateExtensionObject(XAEngineItf self,
   137 XAresult XAEngineItfImpl_CreateExtensionObject(XAEngineItf self,
   165                                                XAObjectItf *pObject,
   138         XAObjectItf *pObject, void *pParameters, XAuint32 objectID,
   166                                                void *pParameters,
   139         XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
   167                                                XAuint32 objectID,
   140         const XAboolean *pInterfaceRequired)
   168                                                XAuint32 numInterfaces,
   141     {
   169                                                const XAInterfaceID *pInterfaceIds,
       
   170                                                const XAboolean *pInterfaceRequired)
       
   171 {
       
   172     DEBUG_API("->XAEngineItfImpl_CreateExtensionObject");
   142     DEBUG_API("->XAEngineItfImpl_CreateExtensionObject");
   173     /* no supported extensions */
   143     /* no supported extensions */
   174     DEBUG_API("<-XAEngineItfImpl_CreateExtensionObject - XA_RESULT_FEATURE_UNSUPPORTED");
   144     DEBUG_API("<-XAEngineItfImpl_CreateExtensionObject - XA_RESULT_FEATURE_UNSUPPORTED");
   175     return XA_RESULT_FEATURE_UNSUPPORTED;
   145     return XA_RESULT_FEATURE_UNSUPPORTED;
   176 }
   146     }
   177 
   147 
   178 XAresult XAEngineItfImpl_GetImplementationInfo(XAEngineItf self,
   148 XAresult XAEngineItfImpl_GetImplementationInfo(XAEngineItf self,
   179                                                XAuint32 *pMajor,
   149         XAuint32 *pMajor, XAuint32 *pMinor, XAuint32 *pStep,
   180                                                XAuint32 *pMinor,
   150         const XAchar *pImplementationText)
   181                                                XAuint32 *pStep,
   151     {
   182                                                const XAchar *pImplementationText)
       
   183 {
       
   184     DEBUG_API("->XAEngineItfImpl_GetImplementationInfo");
   152     DEBUG_API("->XAEngineItfImpl_GetImplementationInfo");
   185 
   153 
   186     if( !pMajor || !pMinor || !pStep )
   154     if (!pMajor || !pMinor || !pStep)
   187     {
   155         {
   188         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   156         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
   189         DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
       
   190         return XA_RESULT_PARAMETER_INVALID;
   157         return XA_RESULT_PARAMETER_INVALID;
   191     }
   158         }
   192     /* OpenMAX AL API ver 1.0.1 */
   159     /* OpenMAX AL API ver 1.0.1 */
   193     *pMajor = 1;
   160     *pMajor = 1;
   194     *pMinor = 0;
   161     *pMinor = 0;
   195     *pStep = 1;
   162     *pStep = 1;
   196     /*pImplementationText = (XAchar *) implementationText;*/
   163     /*pImplementationText = (XAchar *) implementationText;*/
   197 
   164 
   198     DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
   165     DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
   199     return XA_RESULT_SUCCESS;
   166     return XA_RESULT_SUCCESS;
   200 }
   167     }
   201 
   168 
   202 XAresult XAEngineItfImpl_QuerySupportedProfiles(XAEngineItf self,
   169 XAresult XAEngineItfImpl_QuerySupportedProfiles(XAEngineItf self,
   203                                                 XAint16 *pProfilesSupported)
   170         XAint16 *pProfilesSupported)
   204 {
   171     {
   205     DEBUG_API("->XAEngineItfImpl_QuerySupportedProfiles");
   172     DEBUG_API("->XAEngineItfImpl_QuerySupportedProfiles");
   206 
   173 
   207     if( !pProfilesSupported )
   174     if (!pProfilesSupported)
   208     {
   175         {
   209         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   176         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   210         DEBUG_API("<-XAEngineItfImpl_QuerySupportedProfiles");
   177         DEBUG_API("<-XAEngineItfImpl_QuerySupportedProfiles");
   211         return XA_RESULT_PARAMETER_INVALID;
   178         return XA_RESULT_PARAMETER_INVALID;
   212     }
   179         }
   213     /* NOTE: enable +MIDI when/if XMF issues solved
   180     /* NOTE: enable +MIDI when/if XMF issues solved
   214      *        XA_PROFILES_MEDIA_PLAYER |
   181      *        XA_PROFILES_MEDIA_PLAYER |
   215      *        XA_PROFILES_MEDIA_PLAYER_RECORDER |
   182      *        XA_PROFILES_MEDIA_PLAYER_RECORDER |
   216      *        XA_PROFILES_PLUS_MIDI;
   183      *        XA_PROFILES_PLUS_MIDI;
   217      */
   184      */
   218     *pProfilesSupported = XA_PROFILES_MEDIA_PLAYER | XA_PROFILES_MEDIA_PLAYER_RECORDER;
   185     *pProfilesSupported = XA_PROFILES_MEDIA_PLAYER
       
   186             | XA_PROFILES_MEDIA_PLAYER_RECORDER;
   219 
   187 
   220     DEBUG_API("<-XAEngineItfImpl_QuerySupportedProfiles");
   188     DEBUG_API("<-XAEngineItfImpl_QuerySupportedProfiles");
   221     return XA_RESULT_SUCCESS;
   189     return XA_RESULT_SUCCESS;
   222 }
   190     }
   223 
   191 
   224 XAresult XAEngineItfImpl_QueryNumSupportedInterfaces(XAEngineItf self,
   192 XAresult XAEngineItfImpl_QueryNumSupportedInterfaces(XAEngineItf self,
   225                                                      XAuint32 objectID,
   193         XAuint32 objectID, XAuint32 *pNumSupportedInterfaces)
   226                                                      XAuint32 *pNumSupportedInterfaces)
   194     {
   227 {
       
   228     XAresult res = XA_RESULT_SUCCESS;
   195     XAresult res = XA_RESULT_SUCCESS;
   229     DEBUG_API("->XAEngineItfImpl_QueryNumSupportedInterfaces");
   196     DEBUG_API("->XAEngineItfImpl_QueryNumSupportedInterfaces");
   230 
   197 
   231     if( !pNumSupportedInterfaces )
   198     if (!pNumSupportedInterfaces)
   232     {
   199         {
   233         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   200         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineItfImpl_QueryNumSupportedInterfaces");
   234         DEBUG_API("<-XAEngineItfImpl_QueryNumSupportedInterfaces");
       
   235         return XA_RESULT_PARAMETER_INVALID;
   201         return XA_RESULT_PARAMETER_INVALID;
   236     }
   202         }
   237     *pNumSupportedInterfaces=0;
   203     *pNumSupportedInterfaces = 0;
   238     switch(objectID)
   204     switch (objectID)
   239     {
   205         {
   240         case XA_OBJECTID_ENGINE:
   206         case XA_OBJECTID_ENGINE:
   241             res = XAEngineImpl_QueryNumSupportedInterfaces(
   207             res = XAEngineImpl_QueryNumSupportedInterfaces(
   242                                             pNumSupportedInterfaces);
   208                     pNumSupportedInterfaces);
   243             break;
   209             break;
   244         case XA_OBJECTID_MEDIAPLAYER:
   210         case XA_OBJECTID_MEDIAPLAYER:
   245             res = XAMediaPlayerImpl_QueryNumSupportedInterfaces(
   211             res = XAMediaPlayerImpl_QueryNumSupportedInterfaces(
   246                                             pNumSupportedInterfaces);
   212                     pNumSupportedInterfaces);
   247             break;
   213             break;
   248         case XA_OBJECTID_MEDIARECORDER:
   214         case XA_OBJECTID_MEDIARECORDER:
   249             res = XAMediaRecorderImpl_QueryNumSupportedInterfaces(
   215             res = XAMediaRecorderImpl_QueryNumSupportedInterfaces(
   250                                             pNumSupportedInterfaces);
   216                     pNumSupportedInterfaces);
   251             break;
   217             break;
   252         case XA_OBJECTID_OUTPUTMIX:
   218         case XA_OBJECTID_OUTPUTMIX:
   253             res = XAOMixImpl_QueryNumSupportedInterfaces(
   219             res = XAOMixImpl_QueryNumSupportedInterfaces(
   254                                             pNumSupportedInterfaces);
   220                     pNumSupportedInterfaces);
   255             break;
   221             break;
   256 #ifdef OMAX_CAMERABIN
   222 #ifdef OMAX_CAMERABIN
   257         case XA_OBJECTID_CAMERADEVICE:
   223             case XA_OBJECTID_CAMERADEVICE:
   258             res = XACameraDeviceImpl_QueryNumSupportedInterfaces(
   224             res = XACameraDeviceImpl_QueryNumSupportedInterfaces(
   259                                             pNumSupportedInterfaces);
   225                     pNumSupportedInterfaces);
   260             break;
   226             break;
   261 #endif
   227 #endif
   262         case XA_OBJECTID_RADIODEVICE:
   228         case XA_OBJECTID_RADIODEVICE:
   263             res = XARadioDeviceImpl_QueryNumSupportedInterfaces(
   229             res = XARadioDeviceImpl_QueryNumSupportedInterfaces(
   264                                             pNumSupportedInterfaces);
   230                     pNumSupportedInterfaces);
   265             break;
   231             break;
   266         case XA_OBJECTID_LEDDEVICE:
   232         case XA_OBJECTID_LEDDEVICE:
   267             res = XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(
   233             res = XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(
   268                                             pNumSupportedInterfaces);
   234                     pNumSupportedInterfaces);
   269             break;
   235             break;
   270         case XA_OBJECTID_VIBRADEVICE:
   236         case XA_OBJECTID_VIBRADEVICE:
   271             res = XAVibraDeviceImpl_QueryNumSupportedInterfaces(
   237             res = XAVibraDeviceImpl_QueryNumSupportedInterfaces(
   272                                             pNumSupportedInterfaces);
   238                     pNumSupportedInterfaces);
   273             break;
   239             break;
   274         case XA_OBJECTID_METADATAEXTRACTOR:
   240         case XA_OBJECTID_METADATAEXTRACTOR:
   275             res = XAMetadataExtractorImpl_QueryNumSupportedInterfaces(
   241             res = XAMetadataExtractorImpl_QueryNumSupportedInterfaces(
   276                                             pNumSupportedInterfaces);
   242                     pNumSupportedInterfaces);
   277             break;
   243             break;
   278         default:
   244         default:
   279             res = XA_RESULT_FEATURE_UNSUPPORTED;
   245             res = XA_RESULT_FEATURE_UNSUPPORTED;
   280             break;
   246             break;
   281     }
   247         }
   282 
   248 
   283     DEBUG_API_A1("<-XAEngineItfImpl_QueryNumSupportedInterfaces %lu",res);
   249     DEBUG_API_A1("<-XAEngineItfImpl_QueryNumSupportedInterfaces %lu",res);
   284     return res;
   250     return res;
   285 }
   251     }
   286 
   252 
   287 XAresult XAEngineItfImpl_QuerySupportedInterfaces(XAEngineItf self,
   253 XAresult XAEngineItfImpl_QuerySupportedInterfaces(XAEngineItf self,
   288                                                   XAuint32 objectID,
   254         XAuint32 objectID, XAuint32 index, XAInterfaceID *pInterfaceId)
   289                                                   XAuint32 index,
   255     {
   290                                                   XAInterfaceID *pInterfaceId)
       
   291 {
       
   292     XAresult res = XA_RESULT_SUCCESS;
   256     XAresult res = XA_RESULT_SUCCESS;
   293     DEBUG_API("->XAEngineItfImpl_QuerySupportedInterfaces");
   257     DEBUG_API("->XAEngineItfImpl_QuerySupportedInterfaces");
   294 
   258 
   295     if( !pInterfaceId )
   259     if (!pInterfaceId)
   296     {
   260         {
   297         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   261         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   298         DEBUG_API("<-XAEngineItfImpl_QuerySupportedInterfaces");
   262         DEBUG_API("<-XAEngineItfImpl_QuerySupportedInterfaces");
   299         return XA_RESULT_PARAMETER_INVALID;
   263         return XA_RESULT_PARAMETER_INVALID;
   300     }
   264         }
   301     *pInterfaceId = XA_IID_NULL;
   265     *pInterfaceId = XA_IID_NULL;
   302     switch (objectID)
   266     switch (objectID)
   303     {
   267         {
   304         case XA_OBJECTID_ENGINE:
   268         case XA_OBJECTID_ENGINE:
   305             res = XAEngineImpl_QuerySupportedInterfaces(
   269             res = XAEngineImpl_QuerySupportedInterfaces(index, pInterfaceId);
   306                                                 index, pInterfaceId);
       
   307             break;
   270             break;
   308         case XA_OBJECTID_MEDIAPLAYER:
   271         case XA_OBJECTID_MEDIAPLAYER:
   309             res = XAMediaPlayerImpl_QuerySupportedInterfaces(
   272             res = XAMediaPlayerImpl_QuerySupportedInterfaces(index,
   310                                                 index, pInterfaceId);
   273                     pInterfaceId);
   311             break;
   274             break;
   312         case XA_OBJECTID_MEDIARECORDER:
   275         case XA_OBJECTID_MEDIARECORDER:
   313             res = XAMediaRecorderImpl_QuerySupportedInterfaces(
   276             res = XAMediaRecorderImpl_QuerySupportedInterfaces(index,
   314                                                 index, pInterfaceId);
   277                     pInterfaceId);
   315             break;
   278             break;
   316         case XA_OBJECTID_OUTPUTMIX:
   279         case XA_OBJECTID_OUTPUTMIX:
   317             res = XAOMixImpl_QuerySupportedInterfaces(
   280             res = XAOMixImpl_QuerySupportedInterfaces(index, pInterfaceId);
   318                                                 index, pInterfaceId);
       
   319             break;
   281             break;
   320 #ifdef OMAX_CAMERABIN
   282 #ifdef OMAX_CAMERABIN
   321         case XA_OBJECTID_CAMERADEVICE:
   283             case XA_OBJECTID_CAMERADEVICE:
   322             res = XACameraDeviceImpl_QuerySupportedInterfaces(
   284             res = XACameraDeviceImpl_QuerySupportedInterfaces(
   323                                                 index, pInterfaceId );
   285                     index, pInterfaceId );
   324             break;
   286             break;
   325 #endif
   287 #endif
   326         case XA_OBJECTID_RADIODEVICE:
   288         case XA_OBJECTID_RADIODEVICE:
   327             res = XARadioDeviceImpl_QuerySupportedInterfaces(
   289             res = XARadioDeviceImpl_QuerySupportedInterfaces(index,
   328                                                 index, pInterfaceId );
   290                     pInterfaceId);
   329             break;
   291             break;
   330         case XA_OBJECTID_LEDDEVICE:
   292         case XA_OBJECTID_LEDDEVICE:
   331             res = XALEDArrayDeviceImpl_QuerySupportedInterfaces(
   293             res = XALEDArrayDeviceImpl_QuerySupportedInterfaces(index,
   332                                                 index, pInterfaceId );
   294                     pInterfaceId);
   333             break;
   295             break;
   334         case XA_OBJECTID_VIBRADEVICE:
   296         case XA_OBJECTID_VIBRADEVICE:
   335             res = XAVibraDeviceImpl_QuerySupportedInterfaces(
   297             res = XAVibraDeviceImpl_QuerySupportedInterfaces(index,
   336                                                 index, pInterfaceId );
   298                     pInterfaceId);
   337             break;
   299             break;
   338         case XA_OBJECTID_METADATAEXTRACTOR:
   300         case XA_OBJECTID_METADATAEXTRACTOR:
   339             res = XAMetadataExtractorImpl_QuerySupportedInterfaces(
   301             res = XAMetadataExtractorImpl_QuerySupportedInterfaces(index,
   340                                                 index, pInterfaceId);
   302                     pInterfaceId);
   341             break;
   303             break;
   342         default:
   304         default:
   343             res = XA_RESULT_FEATURE_UNSUPPORTED;
   305             res = XA_RESULT_FEATURE_UNSUPPORTED;
   344     }
   306         }
   345 
   307 
   346     DEBUG_API_A1("<-XAEngineItfImpl_QuerySupportedInterfaces %lu", res);
   308     DEBUG_API_A1("<-XAEngineItfImpl_QuerySupportedInterfaces %lu", res);
   347     return res;
   309     return res;
   348 }
   310     }
   349 
   311 
   350 XAresult XAEngineItfImpl_QueryLEDCapabilities(XAEngineItf self,
   312 XAresult XAEngineItfImpl_QueryLEDCapabilities(XAEngineItf self,
   351                                               XAuint32 *pIndex,
   313         XAuint32 *pIndex, XAuint32 *pLEDDeviceID,
   352                                               XAuint32 *pLEDDeviceID,
   314         XALEDDescriptor *pDescriptor)
   353                                               XALEDDescriptor *pDescriptor)
   315     {
   354 {
   316 
   355   
       
   356     XALEDDescriptor descriptor;
   317     XALEDDescriptor descriptor;
   357     
   318 
   358     DEBUG_API("->XAEngineItfImpl_QueryLEDCapabilities");
   319     DEBUG_API("->XAEngineItfImpl_QueryLEDCapabilities");
   359 
   320 
   360     if( !pDescriptor )
   321     if (!pDescriptor)
   361     {   /*query number of devices*/
   322         { /*query number of devices*/
   362         if( !pIndex )
   323         if (!pIndex)
   363         {
   324             {
   364             DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   325             DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   365             DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
   326             DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
   366             return XA_RESULT_PARAMETER_INVALID;
   327             return XA_RESULT_PARAMETER_INVALID;
   367         }
   328             }
   368         /* Number of devices */
   329         /* Number of devices */
   369         *pIndex = 1;
   330         *pIndex = 1;
   370     }
   331         }
   371     else
   332     else
   372     {   
   333         {
   373   
   334 
   374         /* query device capabilities */
   335         /* query device capabilities */
   375         if( pIndex )
   336         if (pIndex)
   376         {
   337             {
   377             if( *pIndex == 0 )
   338             if (*pIndex == 0)
   378             {
       
   379                 if( !pLEDDeviceID )
       
   380                 {
   339                 {
       
   340                 if (!pLEDDeviceID)
       
   341                     {
   381                     DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   342                     DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   382                     DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
   343                     DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
   383                     return XA_RESULT_PARAMETER_INVALID;
   344                     return XA_RESULT_PARAMETER_INVALID;
       
   345                     }
       
   346                 *pLEDDeviceID = XA_ADAPTID_LEDARRAY;
   384                 }
   347                 }
   385                 *pLEDDeviceID = XA_ADAPTID_LEDARRAY;
       
   386             }
       
   387             else
   348             else
   388             {
   349                 {
   389                 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   350                 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   390                 DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
   351                 DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
   391                 return XA_RESULT_PARAMETER_INVALID;
   352                 return XA_RESULT_PARAMETER_INVALID;
   392             }
   353                 }
   393         }
   354             }
   394 
   355 
   395         if( *pLEDDeviceID == XA_ADAPTID_LEDARRAY )
   356         if (*pLEDDeviceID == XA_ADAPTID_LEDARRAY)
   396         {
   357             {
   397             descriptor.colorMask = COLOR_MASK;
   358             descriptor.colorMask = COLOR_MASK;
   398             descriptor.ledCount = LED_COUNT;
   359             descriptor.ledCount = LED_COUNT;
   399             descriptor.primaryLED = PRIMARY_LED;
   360             descriptor.primaryLED = PRIMARY_LED;
   400             *pDescriptor = descriptor;
   361             *pDescriptor = descriptor;
   401         }
   362             }
   402         
   363 
   403     }
   364         }DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
   404     DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
       
   405     return XA_RESULT_SUCCESS;
   365     return XA_RESULT_SUCCESS;
   406 }
   366     }
   407 
   367 
   408 XAresult XAEngineItfImpl_QueryVibraCapabilities(XAEngineItf self,
   368 XAresult XAEngineItfImpl_QueryVibraCapabilities(XAEngineItf self,
   409                                                 XAuint32 *pIndex,
   369         XAuint32 *pIndex, XAuint32 *pVibraDeviceID,
   410                                                 XAuint32 *pVibraDeviceID,
   370         XAVibraDescriptor *pDescriptor)
   411                                                 XAVibraDescriptor *pDescriptor)
   371     {
   412 {
   372 
   413   
       
   414     XAVibraDescriptor descriptor;
   373     XAVibraDescriptor descriptor;
   415 
   374 
   416     DEBUG_API("->XAEngineItfImpl_QueryVibraCapabilities");
   375     DEBUG_API("->XAEngineItfImpl_QueryVibraCapabilities");
   417 
   376 
   418     if( !pDescriptor  )
   377     if (!pDescriptor)
   419     {   /*query number of devices*/
   378         { /*query number of devices*/
   420         if( !pIndex )
   379         if (!pIndex)
   421         {
   380             {
   422             DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   381             DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   423             DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   382             DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   424             return XA_RESULT_PARAMETER_INVALID;
   383             return XA_RESULT_PARAMETER_INVALID;
   425         }
   384             }
   426         /* Number of devices */
   385         /* Number of devices */
   427         *pIndex = 1;
   386         *pIndex = 1;
   428     }
   387         }
   429     else
   388     else
   430     {   
   389         {
   431   
   390 
   432         /* query device capabilities */
   391         /* query device capabilities */
   433         if( pIndex )
   392         if (pIndex)
   434         {
   393             {
   435             if( *pIndex == 0 )
   394             if (*pIndex == 0)
   436             {
       
   437                 if( !pVibraDeviceID )
       
   438                 {
   395                 {
       
   396                 if (!pVibraDeviceID)
       
   397                     {
   439                     DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   398                     DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   440                     DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   399                     DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   441                     return XA_RESULT_PARAMETER_INVALID;
   400                     return XA_RESULT_PARAMETER_INVALID;
       
   401                     }
       
   402 
       
   403                 *pVibraDeviceID = XA_ADAPTID_VIBRA;
   442                 }
   404                 }
   443 
       
   444                 *pVibraDeviceID = XA_ADAPTID_VIBRA;
       
   445             }
       
   446             else
   405             else
   447             {
   406                 {
   448                 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   407                 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   449                 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   408                 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   450                 return XA_RESULT_PARAMETER_INVALID;
   409                 return XA_RESULT_PARAMETER_INVALID;
   451             }
   410                 }
   452         }
   411             }
   453 
   412 
   454         if( *pVibraDeviceID == XA_ADAPTID_VIBRA )
   413         if (*pVibraDeviceID == XA_ADAPTID_VIBRA)
   455         {
   414             {
   456             descriptor.minFrequency = MIN_FREQUENCY;
   415             descriptor.minFrequency = MIN_FREQUENCY;
   457             descriptor.maxFrequency = MAX_FREQUENCY;
   416             descriptor.maxFrequency = MAX_FREQUENCY;
   458             descriptor.supportsFrequency = XA_BOOLEAN_TRUE;
   417             descriptor.supportsFrequency = XA_BOOLEAN_TRUE;
   459             descriptor.supportsIntensity = XA_BOOLEAN_TRUE;
   418             descriptor.supportsIntensity = XA_BOOLEAN_TRUE;
   460             *pDescriptor = descriptor;
   419             *pDescriptor = descriptor;
   461         }
   420             }
   462         
   421 
   463     }
   422         }
   464 
   423 
   465     DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   424     DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
   466     return XA_RESULT_SUCCESS;
   425     return XA_RESULT_SUCCESS;
   467 }
   426     }
   468 
   427 
   469 XAresult XAEngineItfImpl_QueryNumSupportedExtensions(XAEngineItf self,
   428 XAresult XAEngineItfImpl_QueryNumSupportedExtensions(XAEngineItf self,
   470                                                      XAuint32 *pNumExtensions)
   429         XAuint32 *pNumExtensions)
   471 {
   430     {
   472     DEBUG_API("->XAEngineItfImpl_QuerySupportedExtension");
   431     DEBUG_API("->XAEngineItfImpl_QuerySupportedExtension");
   473     if(pNumExtensions==NULL)
   432     if (pNumExtensions == NULL)
   474     {
   433         {
   475        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   434         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   476        DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
   435         DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
   477        return XA_RESULT_PARAMETER_INVALID;
   436         return XA_RESULT_PARAMETER_INVALID;
   478     }
   437         }
   479     /* no supported extensions */
   438     /* no supported extensions */
   480     *pNumExtensions=0;
   439     *pNumExtensions = 0;
   481     DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
   440     DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
   482     return XA_RESULT_SUCCESS;
   441     return XA_RESULT_SUCCESS;
   483 }
   442     }
   484 
   443 
   485 XAresult XAEngineItfImpl_QuerySupportedExtension(XAEngineItf self,
   444 XAresult XAEngineItfImpl_QuerySupportedExtension(XAEngineItf self,
   486                                                XAuint32 index,
   445         XAuint32 index, XAchar *pExtensionName, XAint16 *pNameLength)
   487                                                XAchar *pExtensionName,
   446     {
   488                                                XAint16 *pNameLength)
       
   489 {
       
   490     DEBUG_API("->XAEngineItfImpl_QuerySupportedExtension");
   447     DEBUG_API("->XAEngineItfImpl_QuerySupportedExtension");
   491     /* no supported extensions => index is always wrong */
   448     /* no supported extensions => index is always wrong */
   492     DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   449     DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   493     DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
   450     DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
   494     return XA_RESULT_PARAMETER_INVALID;
   451     return XA_RESULT_PARAMETER_INVALID;
   495 }
   452     }
   496 
   453 
   497 XAresult XAEngineItfImpl_IsExtensionSupported(XAEngineItf self,
   454 XAresult XAEngineItfImpl_IsExtensionSupported(XAEngineItf self,
   498                                             const XAchar *pExtensionName,
   455         const XAchar *pExtensionName, XAboolean *pSupported)
   499                                             XAboolean *pSupported)
   456     {
   500 {
       
   501     DEBUG_API("->XAEngineItfImpl_IsExtensionSupported");
   457     DEBUG_API("->XAEngineItfImpl_IsExtensionSupported");
   502     if(pSupported==NULL)
   458     if (pSupported == NULL)
   503     {
   459         {
   504         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   460         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
   505         DEBUG_API("<-XAEngineItfImpl_IsExtensionSupported");
   461         DEBUG_API("<-XAEngineItfImpl_IsExtensionSupported");
   506         return XA_RESULT_PARAMETER_INVALID;
   462         return XA_RESULT_PARAMETER_INVALID;
   507     }
   463         }
   508     /* no supported extensions */
   464     /* no supported extensions */
   509     *pSupported=XA_BOOLEAN_FALSE;
   465     *pSupported = XA_BOOLEAN_FALSE;
   510     DEBUG_API("<-XAEngineItfImpl_IsExtensionSupported");
   466     DEBUG_API("<-XAEngineItfImpl_IsExtensionSupported");
   511     return XA_RESULT_SUCCESS;
   467     return XA_RESULT_SUCCESS;
   512 }
   468     }
   513 
   469 
   514 /**
   470 /**
   515  * XAEngineItfImpl -specific methods
   471  * XAEngineItfImpl -specific methods
   516  **/
   472  **/
   517 XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper, XACapabilities* capabilities)
   473 XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper,
   518 {
   474         XACapabilities* capabilities)
   519     XAEngineItfImpl* self = (XAEngineItfImpl*)
   475     {
   520         calloc(1,sizeof(XAEngineItfImpl));
   476     XAEngineItfImpl* self = (XAEngineItfImpl*) calloc(1,
       
   477             sizeof(XAEngineItfImpl));
   521     DEBUG_API("->XAEngineItfImpl_Create");
   478     DEBUG_API("->XAEngineItfImpl_Create");
   522 
   479 
   523     if( self )
   480     if (self)
   524     {
   481         {
   525         /* init itf default implementation */
   482         /* init itf default implementation */
   526         self->itf.CreateCameraDevice = XAEngineItfImpl_CreateCameraDevice;
   483         self->itf.CreateCameraDevice = XAEngineItfImpl_CreateCameraDevice;
   527         self->itf.CreateRadioDevice = XAEngineItfImpl_CreateRadioDevice;
   484         self->itf.CreateRadioDevice = XAEngineItfImpl_CreateRadioDevice;
   528         self->itf.CreateLEDDevice = XAEngineItfImpl_CreateLEDDevice;
   485         self->itf.CreateLEDDevice = XAEngineItfImpl_CreateLEDDevice;
   529         self->itf.CreateVibraDevice = XAEngineItfImpl_CreateVibraDevice;
   486         self->itf.CreateVibraDevice = XAEngineItfImpl_CreateVibraDevice;
   530         self->itf.CreateMediaPlayer = XAEngineItfImpl_CreateMediaPlayer;
   487         self->itf.CreateMediaPlayer = XAEngineItfImpl_CreateMediaPlayer;
   531         self->itf.CreateMediaRecorder = XAEngineItfImpl_CreateMediaRecorder;
   488         self->itf.CreateMediaRecorder = XAEngineItfImpl_CreateMediaRecorder;
   532         self->itf.CreateOutputMix = XAEngineItfImpl_CreateOutputMix;
   489         self->itf.CreateOutputMix = XAEngineItfImpl_CreateOutputMix;
   533         self->itf.CreateMetadataExtractor = XAEngineItfImpl_CreateMetadataExtractor;
   490         self->itf.CreateMetadataExtractor
   534         self->itf.CreateExtensionObject = XAEngineItfImpl_CreateExtensionObject;
   491                 = XAEngineItfImpl_CreateMetadataExtractor;
   535         self->itf.GetImplementationInfo = XAEngineItfImpl_GetImplementationInfo;
   492         self->itf.CreateExtensionObject
   536         self->itf.QuerySupportedProfiles = XAEngineItfImpl_QuerySupportedProfiles;
   493                 = XAEngineItfImpl_CreateExtensionObject;
   537         self->itf.QueryNumSupportedInterfaces = XAEngineItfImpl_QueryNumSupportedInterfaces;
   494         self->itf.GetImplementationInfo
   538         self->itf.QuerySupportedInterfaces = XAEngineItfImpl_QuerySupportedInterfaces;
   495                 = XAEngineItfImpl_GetImplementationInfo;
       
   496         self->itf.QuerySupportedProfiles
       
   497                 = XAEngineItfImpl_QuerySupportedProfiles;
       
   498         self->itf.QueryNumSupportedInterfaces
       
   499                 = XAEngineItfImpl_QueryNumSupportedInterfaces;
       
   500         self->itf.QuerySupportedInterfaces
       
   501                 = XAEngineItfImpl_QuerySupportedInterfaces;
   539         self->itf.QueryLEDCapabilities = XAEngineItfImpl_QueryLEDCapabilities;
   502         self->itf.QueryLEDCapabilities = XAEngineItfImpl_QueryLEDCapabilities;
   540         self->itf.QueryVibraCapabilities = XAEngineItfImpl_QueryVibraCapabilities;
   503         self->itf.QueryVibraCapabilities
   541         self->itf.QueryNumSupportedExtensions = XAEngineItfImpl_QueryNumSupportedExtensions;
   504                 = XAEngineItfImpl_QueryVibraCapabilities;
   542         self->itf.QuerySupportedExtension = XAEngineItfImpl_QuerySupportedExtension;
   505         self->itf.QueryNumSupportedExtensions
       
   506                 = XAEngineItfImpl_QueryNumSupportedExtensions;
       
   507         self->itf.QuerySupportedExtension
       
   508                 = XAEngineItfImpl_QuerySupportedExtension;
   543         self->itf.IsExtensionSupported = XAEngineItfImpl_IsExtensionSupported;
   509         self->itf.IsExtensionSupported = XAEngineItfImpl_IsExtensionSupported;
   544         self->mapper = fwkmapper;
   510         self->mapper = fwkmapper;
   545         self->capabilities = capabilities;
   511         self->capabilities = capabilities;
   546         self->xyz = 50;
   512         self->xyz = 50;
   547         self->self = self;
   513         self->self = self;
   548     }
   514         }
   549     DEBUG_API("<-XAEngineItfImpl_Create");
   515     DEBUG_API("<-XAEngineItfImpl_Create");
   550     return self;
   516     return self;
   551 }
   517     }
   552 
   518 
   553 void XAEngineItfImpl_Free(XAEngineItfImpl* self)
   519 void XAEngineItfImpl_Free(XAEngineItfImpl* self)
   554 {
   520     {
   555     DEBUG_API("->XAEngineItfImpl_Free");
   521     DEBUG_API("->XAEngineItfImpl_Free");
   556     assert(self==self->self);
   522     assert(self==self->self);
   557     free(self);
   523     if(self)
       
   524         {
       
   525         free(self);
       
   526         }
   558     DEBUG_API("<-XAEngineItfImpl_Free");
   527     DEBUG_API("<-XAEngineItfImpl_Free");
   559 }
   528     }