71 XAresult XAEngineItfImpl_CreateLEDDevice(XAEngineItf self, |
69 XAresult XAEngineItfImpl_CreateLEDDevice(XAEngineItf self, |
72 XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces, |
70 XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces, |
73 const XAInterfaceID *pInterfaceIds, |
71 const XAInterfaceID *pInterfaceIds, |
74 const XAboolean *pInterfaceRequired) |
72 const XAboolean *pInterfaceRequired) |
75 { |
73 { |
76 return XALEDArrayDeviceImpl_CreateLEDArrayDevice( |
74 return XA_RESULT_FEATURE_UNSUPPORTED; |
77 ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID, |
|
78 numInterfaces, pInterfaceIds, pInterfaceRequired); |
|
79 } |
75 } |
80 |
76 |
81 XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self, |
77 XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self, |
82 XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces, |
78 XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces, |
83 const XAInterfaceID *pInterfaceIds, |
79 const XAInterfaceID *pInterfaceIds, |
84 const XAboolean *pInterfaceRequired) |
80 const XAboolean *pInterfaceRequired) |
85 { |
81 { |
86 return XAVibraDeviceImpl_CreateVibraDevice( |
82 return XA_RESULT_FEATURE_UNSUPPORTED; |
87 ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID, |
|
88 numInterfaces, pInterfaceIds, pInterfaceRequired); |
|
89 } |
83 } |
90 |
84 |
91 XAresult XAEngineItfImpl_CreateMediaPlayer(XAEngineItf self, |
85 XAresult XAEngineItfImpl_CreateMediaPlayer(XAEngineItf self, |
92 XAObjectItf *pPlayer, XADataSource *pDataSrc, XADataSource *pBankSrc, |
86 XAObjectItf *pPlayer, XADataSource *pDataSrc, XADataSource *pBankSrc, |
93 XADataSink *pAudioSnk, XADataSink *pImageVideoSnk, |
87 XADataSink *pAudioSnk, XADataSink *pImageVideoSnk, |
116 |
110 |
117 XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self, XAObjectItf *pMix, |
111 XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self, XAObjectItf *pMix, |
118 XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds, |
112 XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds, |
119 const XAboolean *pInterfaceRequired) |
113 const XAboolean *pInterfaceRequired) |
120 { |
114 { |
121 XAEngineItfImpl* impl = GetImpl(self); |
115 return XA_RESULT_FEATURE_UNSUPPORTED; |
122 return XAOMixImpl_CreateOutputMix(impl->mapper, impl->capabilities, pMix, |
|
123 numInterfaces, pInterfaceIds, pInterfaceRequired); |
|
124 } |
116 } |
125 |
117 |
126 XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self, |
118 XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self, |
127 XAObjectItf *pMetadataExtractor, XADataSource *pDataSource, |
119 XAObjectItf *pMetadataExtractor, XADataSource *pDataSource, |
128 XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds, |
120 XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds, |
213 break; |
207 break; |
214 case XA_OBJECTID_MEDIARECORDER: |
208 case XA_OBJECTID_MEDIARECORDER: |
215 res = XAMediaRecorderImpl_QueryNumSupportedInterfaces( |
209 res = XAMediaRecorderImpl_QueryNumSupportedInterfaces( |
216 pNumSupportedInterfaces); |
210 pNumSupportedInterfaces); |
217 break; |
211 break; |
218 case XA_OBJECTID_OUTPUTMIX: |
|
219 res = XAOMixImpl_QueryNumSupportedInterfaces( |
|
220 pNumSupportedInterfaces); |
|
221 break; |
|
222 #ifdef OMAX_CAMERABIN |
|
223 case XA_OBJECTID_CAMERADEVICE: |
|
224 res = XACameraDeviceImpl_QueryNumSupportedInterfaces( |
|
225 pNumSupportedInterfaces); |
|
226 break; |
|
227 #endif |
|
228 case XA_OBJECTID_RADIODEVICE: |
212 case XA_OBJECTID_RADIODEVICE: |
229 res = XARadioDeviceImpl_QueryNumSupportedInterfaces( |
213 res = XARadioDeviceImpl_QueryNumSupportedInterfaces( |
230 pNumSupportedInterfaces); |
214 pNumSupportedInterfaces); |
231 break; |
215 break; |
232 case XA_OBJECTID_LEDDEVICE: |
|
233 res = XALEDArrayDeviceImpl_QueryNumSupportedInterfaces( |
|
234 pNumSupportedInterfaces); |
|
235 break; |
|
236 case XA_OBJECTID_VIBRADEVICE: |
|
237 res = XAVibraDeviceImpl_QueryNumSupportedInterfaces( |
|
238 pNumSupportedInterfaces); |
|
239 break; |
|
240 case XA_OBJECTID_METADATAEXTRACTOR: |
216 case XA_OBJECTID_METADATAEXTRACTOR: |
241 res = XAMetadataExtractorImpl_QueryNumSupportedInterfaces( |
217 res = XAMetadataExtractorImpl_QueryNumSupportedInterfaces( |
242 pNumSupportedInterfaces); |
218 pNumSupportedInterfaces); |
243 break; |
219 break; |
244 default: |
220 default: |
274 break; |
250 break; |
275 case XA_OBJECTID_MEDIARECORDER: |
251 case XA_OBJECTID_MEDIARECORDER: |
276 res = XAMediaRecorderImpl_QuerySupportedInterfaces(index, |
252 res = XAMediaRecorderImpl_QuerySupportedInterfaces(index, |
277 pInterfaceId); |
253 pInterfaceId); |
278 break; |
254 break; |
279 case XA_OBJECTID_OUTPUTMIX: |
|
280 res = XAOMixImpl_QuerySupportedInterfaces(index, pInterfaceId); |
|
281 break; |
|
282 #ifdef OMAX_CAMERABIN |
|
283 case XA_OBJECTID_CAMERADEVICE: |
|
284 res = XACameraDeviceImpl_QuerySupportedInterfaces( |
|
285 index, pInterfaceId ); |
|
286 break; |
|
287 #endif |
|
288 case XA_OBJECTID_RADIODEVICE: |
255 case XA_OBJECTID_RADIODEVICE: |
289 res = XARadioDeviceImpl_QuerySupportedInterfaces(index, |
256 res = XARadioDeviceImpl_QuerySupportedInterfaces(index, |
290 pInterfaceId); |
257 pInterfaceId); |
291 break; |
258 break; |
292 case XA_OBJECTID_LEDDEVICE: |
|
293 res = XALEDArrayDeviceImpl_QuerySupportedInterfaces(index, |
|
294 pInterfaceId); |
|
295 break; |
|
296 case XA_OBJECTID_VIBRADEVICE: |
|
297 res = XAVibraDeviceImpl_QuerySupportedInterfaces(index, |
|
298 pInterfaceId); |
|
299 break; |
|
300 case XA_OBJECTID_METADATAEXTRACTOR: |
259 case XA_OBJECTID_METADATAEXTRACTOR: |
301 res = XAMetadataExtractorImpl_QuerySupportedInterfaces(index, |
260 res = XAMetadataExtractorImpl_QuerySupportedInterfaces(index, |
302 pInterfaceId); |
261 pInterfaceId); |
303 break; |
262 break; |
304 default: |
263 default: |
311 |
270 |
312 XAresult XAEngineItfImpl_QueryLEDCapabilities(XAEngineItf self, |
271 XAresult XAEngineItfImpl_QueryLEDCapabilities(XAEngineItf self, |
313 XAuint32 *pIndex, XAuint32 *pLEDDeviceID, |
272 XAuint32 *pIndex, XAuint32 *pLEDDeviceID, |
314 XALEDDescriptor *pDescriptor) |
273 XALEDDescriptor *pDescriptor) |
315 { |
274 { |
316 |
275 XAresult res = XA_RESULT_SUCCESS; |
317 XALEDDescriptor descriptor; |
|
318 |
|
319 DEBUG_API("->XAEngineItfImpl_QueryLEDCapabilities"); |
276 DEBUG_API("->XAEngineItfImpl_QueryLEDCapabilities"); |
320 |
277 |
321 if (!pDescriptor) |
278 if (!pDescriptor) |
322 { /*query number of devices*/ |
279 { /*query number of devices*/ |
323 if (!pIndex) |
280 if (!pIndex) |
324 { |
281 { |
325 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
282 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
326 DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities"); |
283 DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities"); |
327 return XA_RESULT_PARAMETER_INVALID; |
284 return XA_RESULT_PARAMETER_INVALID; |
328 } |
285 } |
329 /* Number of devices */ |
286 else |
330 *pIndex = 1; |
287 { |
|
288 /* Number of devices */ |
|
289 *pIndex = 0; |
|
290 } |
331 } |
291 } |
332 else |
292 else |
333 { |
293 { |
334 |
294 // return NotSupported below |
335 /* query device capabilities */ |
295 res = XA_RESULT_FEATURE_UNSUPPORTED; |
336 if (pIndex) |
296 } |
337 { |
297 DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities"); |
338 if (*pIndex == 0) |
298 return res; |
339 { |
|
340 if (!pLEDDeviceID) |
|
341 { |
|
342 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
|
343 DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities"); |
|
344 return XA_RESULT_PARAMETER_INVALID; |
|
345 } |
|
346 *pLEDDeviceID = XA_ADAPTID_LEDARRAY; |
|
347 } |
|
348 else |
|
349 { |
|
350 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
|
351 DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities"); |
|
352 return XA_RESULT_PARAMETER_INVALID; |
|
353 } |
|
354 } |
|
355 |
|
356 if (*pLEDDeviceID == XA_ADAPTID_LEDARRAY) |
|
357 { |
|
358 descriptor.colorMask = COLOR_MASK; |
|
359 descriptor.ledCount = LED_COUNT; |
|
360 descriptor.primaryLED = PRIMARY_LED; |
|
361 *pDescriptor = descriptor; |
|
362 } |
|
363 |
|
364 }DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities"); |
|
365 return XA_RESULT_SUCCESS; |
|
366 } |
299 } |
367 |
300 |
368 XAresult XAEngineItfImpl_QueryVibraCapabilities(XAEngineItf self, |
301 XAresult XAEngineItfImpl_QueryVibraCapabilities(XAEngineItf self, |
369 XAuint32 *pIndex, XAuint32 *pVibraDeviceID, |
302 XAuint32 *pIndex, XAuint32 *pVibraDeviceID, |
370 XAVibraDescriptor *pDescriptor) |
303 XAVibraDescriptor *pDescriptor) |
371 { |
304 { |
372 |
305 XAresult res = XA_RESULT_SUCCESS; |
373 XAVibraDescriptor descriptor; |
|
374 |
|
375 DEBUG_API("->XAEngineItfImpl_QueryVibraCapabilities"); |
306 DEBUG_API("->XAEngineItfImpl_QueryVibraCapabilities"); |
376 |
307 |
377 if (!pDescriptor) |
308 if (!pDescriptor) |
378 { /*query number of devices*/ |
309 { /*query number of devices*/ |
379 if (!pIndex) |
310 if (!pIndex) |
380 { |
311 { |
381 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
312 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
382 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities"); |
313 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities"); |
383 return XA_RESULT_PARAMETER_INVALID; |
314 res = XA_RESULT_PARAMETER_INVALID; |
384 } |
315 } |
385 /* Number of devices */ |
316 else |
386 *pIndex = 1; |
317 { |
|
318 /* Number of devices */ |
|
319 *pIndex = 0; |
|
320 } |
387 } |
321 } |
388 else |
322 else |
389 { |
323 { |
390 |
324 // return NotSupported below |
391 /* query device capabilities */ |
325 res = XA_RESULT_FEATURE_UNSUPPORTED; |
392 if (pIndex) |
|
393 { |
|
394 if (*pIndex == 0) |
|
395 { |
|
396 if (!pVibraDeviceID) |
|
397 { |
|
398 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
|
399 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities"); |
|
400 return XA_RESULT_PARAMETER_INVALID; |
|
401 } |
|
402 |
|
403 *pVibraDeviceID = XA_ADAPTID_VIBRA; |
|
404 } |
|
405 else |
|
406 { |
|
407 DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); |
|
408 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities"); |
|
409 return XA_RESULT_PARAMETER_INVALID; |
|
410 } |
|
411 } |
|
412 |
|
413 if (*pVibraDeviceID == XA_ADAPTID_VIBRA) |
|
414 { |
|
415 descriptor.minFrequency = MIN_FREQUENCY; |
|
416 descriptor.maxFrequency = MAX_FREQUENCY; |
|
417 descriptor.supportsFrequency = XA_BOOLEAN_TRUE; |
|
418 descriptor.supportsIntensity = XA_BOOLEAN_TRUE; |
|
419 *pDescriptor = descriptor; |
|
420 } |
|
421 |
|
422 } |
326 } |
423 |
327 |
424 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities"); |
328 DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities"); |
425 return XA_RESULT_SUCCESS; |
329 return res; |
426 } |
330 } |
427 |
331 |
428 XAresult XAEngineItfImpl_QueryNumSupportedExtensions(XAEngineItf self, |
332 XAresult XAEngineItfImpl_QueryNumSupportedExtensions(XAEngineItf self, |
429 XAuint32 *pNumExtensions) |
333 XAuint32 *pNumExtensions) |
430 { |
334 { |