Home

OpenMAX Application Layer 1.1 Specification

image

Contents

1. Value Description XA_CAMERA_EXPOSUREMODE_MANUAL Manual exposure XA_CAMERA_EXPOSUREMODE_AUTO Auto exposure mode XA_CAMERA_EXPOSUREMODE_NIGHT Night exposure mode XA_CAMERA_EXPOSUREMODE_BACKLIGHT Backlight exposure mode XA_CAMERA_EXPOSUREMODE_SPOTLIGHT Spotlight exposure mode XA_CAMERA_EXPOSUREMODE_SPORTS Spots exposure mode XA_CAMERA_EXPOSUREMODE_SNOW Snow exposure mode XA_CAMERA_EXPOSUREMODE_BEACH Beach exposure mode XA_CAMERA_EXPOSUREMODE_LARGEAPERTURE Large aperture exposure mode XA_CAMERA_EXPOSUREMODE_SMALLAPERTURE Small aperture exposure mode XA_CAMERA_EXPOSUREMODE_PORTRAIT Portrait exposure mode XA_CAMERA_EXPOSUREMODE_NIGHTPORTRAIT Night time portrait exposure mode ypenMAX AL 1 9 2 12 define define define define define define define These values are used to set camera flash mode XA_CAMERA_FLASHMODE XA_CAMERA_FLASHMODE_OFF XA CAMERA FLASHMODE_ON XA CAMERA FLASHMODE AUTO XA CAMERA FLASHMODE REDEYEREDUCTION XA CAMERA FLASHMODE REDEYEREDUCTION AUTO XA CAMERA FLASHMODE FILLIN XA CAMERA FLASHMODE TORCH XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 0x00000001 0x00000002 0x00000004 0x00000008 0x00000010 0x00000020 0x00000040
2. ypenMAX AL i xaSinkChangeCallback not have the reguisite permissions to handle the protected media content output by the media object The pExistingDataSink and pNewDataSink pointers are exactly the same pointers passed in the ChangeSink method in the XADynamicSourceSinkChangeItf As such no implementation memory space is being exposed by this callback It is worth noting that e Two successive calls to ChangeSink asking for the same change would result in only one callback That is the second call to ChangeSink is ignored e Two successive calls to ChangeSink asking for different changes will result in two callbacks in the correct order RegisterSinkChangeCallback Methods ChangeSource XAresult ChangeSource XADynamicSourceSinkChangelItf self const XADataSource pExistingDataSource const XADataSource pNewDataSource XAboolean async Changes the specified data source of the media object Parameters in Interface self reference ExistingDataSource in Pointer to the structure specifying the existing media data source Must be non NULL pNewDataSource in Pointer to the structure specifying the new media data source Must be non NULL In the case of a Metadata Extractor object only local data sources are mandated to be supported async in If xA_BOOLEAN_FALSE the
3. Value Description XA CAMERA WHITEBALANCEMODE_ MANUAL White balance off XA_CAMERA_WHITEBALANCEMODE_AUTO Auto white balance mode XA_CAMERA_WHITEBALANCEMODE_SUNLIGHT Sunlight white balance mode XA_CAMERA_WHITEBALANCEMODE_CLOUDY Cloudy white balance mode XA_CAMERA_WHITEBALANCEMODE_SHADE Shade white balance mode XA_CAMERA_WHITEBALANCEMODE_TUNGSTEN Tungsten white balance mode XA_CAMERA_WHITEBALANCEMODE_FLUORESCENT Fluorescent white balance mode XA_CAMERA_WHITEBALANCEMODE_INCANDESCENT Incandescent white balance mode XA_CAMERA_WHITEBALANCEMODE_FLASH Flash white balance mode XA_CAMERA_WHITEBALANCEMODE_SUNSET Sunset white balance mode ypenMAX AL 9 2 20 define define define define XA_CAMERA_ZOOM XA_CAMERA_ZOOM_SLOW XAuint32 50 XA_CAMERA_ZOOM_NORMAL XAuint32 100 XA_CAMERA ZOOM_FAST XAuint32 200 XA_CAMERA ZOOM FASTEST XAuint32 OxFFFFFFFF These values are used to hint camera zooming speed with method XACameraltf SetZoom Value Description XA_CAMERA_ZOOM_SLOW Slow zooming speed XA_CAMERA_ZOOM_NORMAL Normal zooming speed XA_CAMERA_ZOOM_FAST Fast zooming speed XA_CAMERA_ZOOM_FASTEST Fastest zooming speed to be used if the application prefers immediate action 9 2 21 define define define define define define define defin
4. Rear center speaker channel Side left speaker channel Side right speaker channel Top center speaker channel Top front left speaker channel 9 2 75 XA STREAMCBEVENT define XA_STREAMCBEVENT_PROPERTYCHANGE XAuint32 0x00000001 Top front center speaker channel These values are used to identify the callback event type Value Description T XA_STREAMCBEVENT_PROPERTYCHANGE This event indicates that stream property change has occurred The st reamIndex parameter identifies the stream with the property change The pEvent Data parameter for this event is not used and shall be ignored define XA_TIME_UNKNOWN XAuint32 OxFFFFFFFF These values are reserved for special designations of playback time that cannot be represented using the normal numeric range COpenMAX AL XA TIME UNKNOWN The duration of playback is unknown such as the content is a broadcast stream 9 2 77 XA VIDEOCODEC define XA VIDEOCODEC MPEG2 XAuint32 0x00000001 define XA VIDEOCODEC H263 XAuint32 0x00000002 define XA_VIDEOCODEC_MPEG4 XAuint32 0x00000003 define XA_VIDEOCODEC_AVC XAuint32 0x00000004 define XA VIDEOCODEC VC1 XAuint32 0x00000005 define XA_VIDEOCODEC_VP8 XAu
5. Comments If the engine fails to create the object due to lack of memory or resources it will return the XA_RESULT EMORY_FAILURE or the XA_RESULT_RESOURCE_ERROR error respectively A value of XA_RESULT_READONLY will be returned when pDataSnk is unable to be written to due to read only file status Media Recorder Object see section 7 5 COpenMAX AL 5 CreateOutputMix XAresult CreateOutputMix XAEngineItf self XAObjectItf pMix XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired Creates an output mix out Newly created output mix object numInterfaces in Number of interfaces that the object is requested to support not including implicit interfaces piInterfacelds in Array of numInterfaces interface IDs which the This parameter is ignored if numInterfaces is zero object should support piInterfaceRequired in Array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code XA RESULT FEATURE UNSUPPORTED will be then returned This parameter is ignored if numInterfaces is zero Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID
6. res xaCreateEngine amp engine 3 EngineOption 0 NULL NULL CheckErr res Realizing the AL Engine in synchronous mode res engine gt Realize engine XA_BOOLEAN_FALSE CheckErr res TestAudioVideoPlayback engine CO penMAX AL r Shutdown OpenMAX AL engine engine gt Destroy engine exit 0 D 3 Radio with RDS Support OpenMAX AL Radio with RDS Support This simple example turns on the radio playback and lets the user to tune the frequency It displays the Programme Service name on the screen Assumes that the device supports Radio with RadioItf and RDSI EE os BE op GF Gy Gr Gp ob ag include lt stdio h gt include lt stdlib h gt include lt OMXAL OpenMAXAL h gt define MAX NUMBER _INTERFACES 3 f Global variasles Sinoulel be local in reell ajyolicaiciem XAObjectItf engine OpenMAX AL Engine XAObjectItf player XAObjectIt outputMix XAObjectItf radio XAPlayltt Play Lery XARadioItf radioltf XARDSItf rdsitf XAuint32 currentFreq XAuint32 minFreq XAuint32 maxFreq XAuint32 freqInterval Dummy semaphore and event related types prototypes and defines typedef XAuint16 Sem_t System semaphore type would replace Sem_t Semais Emni CEG sem_t semFreqRange void sem_post Sem_t pSemaphore Implementation specific
7. Return value The return value can be one of the following XA_RESUL UCCESS XA_RESUL ESOURCE_ERROR XA_RESUL RECONDITIONS_VIOLAT Comments Resuming the object acquires the resources required for its functionality The operation may fail if insufficient resources are available In such a case the application may wait until resources become available and a XA_OBJECT_EVENT_RESOURCES_AVAILABLE event is received and then retry the resumption Another option is to try and increase the object s priority thus increasing the likelihood that the object will steal another object s resources ypenMAX AL i GetState XAresult GetState XAObjectItf self XAuint32 pState Retrieves the current object state Parameters felt self fin n in Interface self reference ical Pointer to the current state of the object One of the object state macros Return value Ba XA_ XA XA_OBJECT_STATE will be written as result This must be non NULL return can be one of the following RESULT_SUCCESS RESULT_PARAMETER_INVALID Comments None GetInterface XAresult GetInterface XAObjectItf self const XAInterfaceID iid void pInterface Preconditions Parameters Return value Comments See also Obtains an interface exposed by the object The object is not in the Unrealized sta
8. Value Description XA_CAMERA_FLASHMODE_OFF Flash disabled XA_CAMERA_FLASHMODE_ON Flash enabled XA CAMERA FLASHMODE AUTO Auto flash mode XA CAMERA FLASHMODE REDEYEREDUCTION Red eye reduction flash XA_CAMERA_FLASHMODE_REDEYEREDUCTION_AUTO Red eye reduction flash automatic XA_CAMERA_FLASHMODE_FILLIN Use flash to fill in dimly lit areas XA_CAMERA_FLASHMODE_TORCH Flash is always on ypenMAX AL 402 9 2 13 XA CAMERA FOCUSMODE define XA CAMERA FOCUSMODE MANUAL XAuint32 0x00000001 define XA CAMERA FOCUSMODE AUTO XAuint32 0x00000002 define XA CAMERA FOCUSMODE CENTROID XAuint32 0x00000004 define XA CAMERA FOCUSMODE CONTINUOUS AUTO XAuint32 0x00000008 define XA CAMERA FOCUSMODE CONTINUOUS CENTROID XAuint32 0x00000010 These values are used to set camera focus mode Value Description XA_CAMERA_FOCUSMODE_MANUAL Manual focus mode XA_CAMERA_FOCUSMODE_AUTO One shot auto focus mode This mode sometimes called also as single auto focus automatically adjusts the focus once when it has been activated Use XACameraltf SetAutoLocks with parameter XA_CAMERA_LOCK_AUTOFOCUS to activate and lock the auto focusing The lock is freed by clearing the XA_CAMERA_LOCK_AUTOFOCUS bit XA_CAMERA_FOCUSMODE_CENTROID One shot centroid auto focus mode T XA_CAMERA_FOCUSMODE_CONTINUOUS_AUTO Continuous auto focus mode This mode
9. SetMarkerPosition XAresult SetMarkerPosition XARecordItf self XAmillisecond mSec Sets the position of the recording marker Parameters Interface self reference mSec in Position of the marker expressed in milliseconds and relative to the beginning of the content Must be between 0 and the specified duration limit Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The player will notify the application when the recording head passes through the marker via a callback with a XARECORDEVENT_HEADATMARKER event ypenMAX AL i ClearMarkerPosition XAresult ClearMarkerPosition XARecordItf self Return value The return value can be one of the following XA_RESUL SUCCESS XA_RESUL GetMarkerPosition _PARAMETER_INVALID succeeds even if the marker is already clear Position XAresult GetMarkerPosition XARecordItf self XAmillisecond pMSec Queries the position of the recording marker Pre conditions A marker has been set using SetMarkerPosition with no intervening ClearMarkerPosition Parameters in Interface self reference pMSec out Pointer to a location to receive the position of the marker expressed in milliseconds and relative to the beginning of the cont
10. OpenMAX AL The initial values in a brand new device are implementation dependent ypenMAX AL 7 GetPreset XAresult GetPreset XARadioItf self XAuint32 preset XAuint32 freq XAuint8 range XAuint32 mode XAchar pName XAuint16 pNameLength Gets the settings stored into a preset hu Parameters Interface self reference preset in Index number of the preset Should be between 1 and the amount of presets returned by Get NumberOfPresets range out Frequency range stored to the preset See XA_FREQRANGE macros section for ranges out Frequency in Hertz stored to the preset out Stereo mode stored to the preset pName out Name of the preset If this parameter is NULL the required length of the buffer is returned in the pNameLength parameter pNameLength in out As an output specifies the length of the name including the terminating NULL As an input specifies the length of the given pName char array ignored if pName is NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_BUFFER_INSUFFICIENT Comments The presets are persistent and therefore all the preset slots contain always values Please note that in some devices it is possible to change the preset values also by using other mechanism than OpenMAX AL The initial values in a brand new device are implementation dependent If
11. ypenMAX AL MPEG 4 Profiles and Levels define XA_VIDEOPROFILE_MPEG4 SIMPLE XAuint32 0x00000001 define XA _VIDEOPROFILE MPEG4 SIMPLESCALABLE XAuint32 0x00000002 define XA _VIDEOPROFILE MPEG4 CORE XAuint32 0x00000003 define XA _VIDEOPROFILE MPEG4 MAIN XAuint32 0x00000004 define XA_VIDEOPROFILE_MPEG4_NBIT XAuint32 0x00000005 define XA _VIDEOPROFILE MPEG4 SCALABLETEXTURE XAuint32 0x00000006 define XA_VIDEOPROFILE MPEG4 SIMPLEFACE XAuint32 0x00000007 define XA_VIDEOPROFILE_MPEG4 SIMPLEFBA XAuint32 0x00000008 define XA_VIDEOPROFILE_MPEG4 BASICANIMATED XAuint32 0x00000009 define XA _VIDEOPROFILE MPEG4 HYBRID XAuint32 0x0000000A define XA_VIDEOPROFILE MPEG4 ADVANCEDREALTIME XAuint32 0x0000000B define XA_VIDEOPROFILE MPEG4 CORESCALABLE XAuint32 0x0000000C define XA_VIDEOPROFILE MPEG4 ADVANCEDCODING XAuint32 0x0000000D define XA_VIDEOPROFILE MPEG4 ADVANCEDCORE XAuint32 0x0000000E define XA_VIDEOPROFILE MPEG4 ADVANCEDSCALABLE XAuint32 Ox0000000F define XA_VIDEOLEVEL_MPEG4 0 XAuint32 0x00000001 define XA_VIDEOLEVEL_MPEG4 0b XAuint32 0x00000002 define XA_VIDEOLEVEL_MPEG4 1 XAuint32 0x00000003 define XA_VIDEOLEVEL_MPEG4 2 XAuint32 0x00000004 define XA_VIDEOLEVEL_MPEG4 3 XAuint32 0x00000005 define XA_VIDEOLEVEL_MPEG4 4 XAuint32 0x00000006 define XA_VIDEOLEVEL_MPEG4 4a XAuint32 0x00000007 define XA_VIDEOLEVEL_MPEG4 5 XAu
12. MypenMAX AL K GetCenterFreq XAresult GetCenterFreq XAEqualizerItf self XAuint16 band XAmilliHertz pCenter Gets the center freguency of the given band Return value The return value can be one of the following XA RESU XA RESU i PARA T SUCC Interface self reference Freguency band whose center freguency is reguested The numbering of the bands starts from 0 and ends at number of bands 1 The center frequency in milliHertz This must be non NULL ETER_INVALID ypenMAX AL 173 GetBandFreqRange XAresult GetBandFreqRange XAEqualizerItf self XAuint16 band XAmilliHertz pMin XAmilliHertz pMax Gets the frequency range of the given frequency band Frequency band whose frequency range is requested The numbering of the band that can be used with this method starts from 0 and ends at number of bands 1 The minimum frequency in milliHertz Parameters Interface self reference i out The maximum frequency in milliHertz SUCCESS Return value The return value can be one of the following XA_RESUL XA_RESULT_PARAMETER_INVALID The exposed band ranges do not overlap physically they many times do but the virtual numbers information for graphical representation of the EQ If shelving filters are used in the lowest and the highest band of the equalizer the lowes
13. COpenMAX AL 1 4 Eull press XASnapshotItf TakeSnapshot gt xaSnapshotTakenCallback Prototype XA_API extern const XAInterfaceID XA_IID SNAPSHOT struct XASnapshotItf_ typedef const struct XASnapshotItf_ const XASnapshotItf struct XASnapshotItf_ XAresult InitiateSnapshot XASnapshotItf self XAuint32 numberOfPictures XAuint32 fps XAboolean freezeViewFinder XADataSink pSink xaSnapshotInitiatedCallback initiatedCallback xaSnapshotTakenCallback takenCallback void pContext XAresult TakeSnapshot XASnapshotItf self XAresult CancelSnapshot XASnapshotItf self XAresult ReleaseBuffers XASnapshotItf self const XADataSink pImage XAresult GetMaxPicsPerBurst XASnapshotItf self XAuint32 pMaxNumberOfPictures XAresult GetBurstFPSRange XASnapshotItf self XAuint32 pMinFPS XAuint32 pMaxFPS XAresult SetShutterFeedback XASnapshotItf self XAboolean enabled XAresult GetShutterFeedback XASnapshotItf self XAboolean pEnabled ypenMAX AL 315 Interface ID e9d1c860 d71c 11df 8953 0002a5d5c51b Defaults No callback registered Callbacks xaSnapshotInitiatedCallback typedef void XAAPIENTRY xaSnapshotInitiatedCallback XASnapshotItf caller void context This method is called when the snapshot shooting has been initiated Interface on which this callback
14. ERSION1 VP8 Level Version 1 ERSION2 VP8 Level Version 2 ERSION3 VP8 Level Version 3 define XA_VIDEOSCALE STRETCH XAuint32 0x00000001 define XA_VIDEOSCALE FIT XAuint32 0x00000002 define XA_VIDEOSCALE_CROP XAuint32 0x00000003 These macros are used to select the video scaling option They are intended to be used with XAVideoPostProcessingItf a The source and destination rectangle s width and height parameters are used to calculate the scaling factors independently Aspect ratio is ignored The minimum scale factor between the destination rectangle s width over the source rectangle s width and the destination rectangle s height over the source rectangle s height is used Aspect ratio is maintained Frame is centered EOSCALE The maximum scale factor between the destination rectangle s width over the source rectangle s width and the destination rectangle s height over the source rectangle s height is used Aspect ratio is maintained Frame is centered ypenMAX AL i Part 3 Appendices Appendix A References CP DLS2 ISO639 ISO1000 ISO3166 JSR135 mDLS MIDI MPEG1 MPEG2 mXMF RFC3066 SP MIDI UUID OSLES OpenMAX Content Pipe Application Programming Interface Specification The Khronos Group Downloadable Sounds Level 2 1 Specification RP 025 Amd1 MIDI Manufacturers Association Los Ang
15. Not all implementations will be able to support arbitrary rotation angles If IsArbitraryRotationSupported tells false and the application tries an angle other than an integer multiple of 90 degrees XA_RESULT_FEATURE_UNSUPPORTED will be returned All implementations are mandated to support angles that are integer multiples of 90 degrees Those angles include but are not limited to 0 90000 180000 and 270000 millidegrees TsArbitraryRotationSupported ypenMAX AL IsArbitraryRotationSupported XAresult IsArbitraryRotationSupported XAVideoPostProcessingItf self XAboolean pSupported Determines if arbitrary rotation angles are supported by the implementation in Interface self reference pSupported out Is set to XA_BOOLEAN_TRUE if arbitrary rotation angles are supported set to XA_BOOLEAN_FALSE otherwise Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ie SE SetSourceRectangle XAresult SetSourceRectangle XAVideoPostProcessingItf self const XARectangle pSrcRect i Defines the rectangle in the original frame that is to be used for further processing Parameters Interface self reference pSrcRect in Define the source rectangle to use Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_
16. ypenMAX AL i GetDefaultAudioDevices XAresult GetDefaultAudioDevices XAAudioIODeviceCapabilitiesIt self XAuint32 defaultDevicelID XAint32 pNumAudioDevices XAuint32 pAudioDeviceIDs Gets the number of audio devices currently mapped to the given default device ID defaultDeviceID pNumAudioDevices in out pAudioDevicelIDs _SUCC ESS _ BUFF IO Return value The return value can be one of the following XA RESUL XA RESUL XA RESUL i XA_RESULT_PARAMETER_INVALI ER_INSUFFICI RROR ID of the default device currently defined as XA_DEFAU D EVICEID_AUDIOOUTPUT and XA_DEFAU D EVICEID_AUDIOINPUT see section 9 2 26 As an input specifies the length of the pAudioDevicelDs array ignored if pAudioDevicelIDs is NULL As an output specifies the number of audio device IDs mapped to the given defaultDevicelD Array of audio device IDs that are currently mapped to the given defaultDevicelD This parameter is populated by the call with the array of device IDs provided that pNumAudioDevices is equal to or greater than the number of actual device IDs If pNumAudioDevices is less than the number of actual mapped device IDs the error code XA_RESULT_BUFFER_INSUFFICIENT is returned DefaultDevicel DMapChangedCallback Comments The mapping of defaultDevicelID to the ph
17. ypenMAX AL a GetSupportedKeysCount XAresult GetSupportedKeysCount XAMetadataInsertionItf self XAint32 nodelID XAboolean pFreeKeys XAuint32 pKeyCount XAuint32 pEncodingCount Description A guery method to tell if the metadata keys for writing metadata can be freely chosen by the application or if they are fixed for the given node If the implementation supports only fixed set of keys for metadata writing for the format and node in question this query method gives the number of the supported fixed keys and GetKeySize and GetKey can then be used to query those keys On the other hand if the implementation supports free keys for metadata writing for the format and node in question this query method gives the number of supported character encodings and Get FreeKeysEncoding can then be used to query those encodings Parameters self Interface self reference nodeID in ID of the node whose supported keys are queried XA ROOT NODE ID is used to refer to the root node of the container True if keys can be freely chosen by the application false if the keys are fixed If pFreeKeys is false this is the number of keys available for writing if pF reeKeys is true this is the number of commonly used keys for this node Please use GetKeySize and GetKey methods to query the keys one at a time pEncodingCount If pFreeKeys is false this value should be ignored if pF reeKeys is true th
18. 373 9 1 9 XADataFormat PCM EX typedef struct XADataEormat PCM EX XAuint32 formatType XAuint32 numChannels XAuint32 sampleRate XAuint32 bitsPerSample XAuint32 containerSize XAuint32 channelMask XAuint32 endianness XAuint32 representataion XADataFormat PCM EX Fields include formatType The format type which must always be XA DATAFORMAT PCM for this structure numChannels Numbers of audio channels present in the data Multi channel audio is always interleaved in the data buffer The audio sample rate of the data in milliHertz bitsPerSample Number of actual data bits in a sample If bit sPerSamp1 e is equal to 8 then the data s representation is XA_PCM_REPRESENTATION_UNSIGNED_INT Otherwise the data s representation is XA_PCM_REPRESENTATION_SIGNED_INT containerSize The container size for PCM data in bits for example 24 bit data in a 32 bit container Data is left justified within the container For best performance it is recommended that the container size be the size of the native data types channelMask Channel mask indicating mapping of audio channels to speaker location The channelMask member specifies which channels are present in the multichannel stream The least significant bit corresponds to the front left speaker XA_SPEAKER_FRONT_LEF T the next least significant bit corresponds to the front right speaker XA_SPEAKER_FRONT_RIGHT and so on The fu
19. ypenMAX AL i 8 3 XAAudioEncoderltf Description This interface is used for setting the parameters to be used by an audio encoder It is realized on a media object with audio encoding capabilities such as a media recorder Once the supported codecs have been enumerated using XAAudioEncoderCapabilitiesItf on the engine the encoding settings can be set using this interface This interface is a mandated interface of Media Recorder objects see section 7 5 Prototype XA API extern const XAInterfaceID XA_IID_AUDIOENCODER struct XAAudioEncoderItf_ typedef const struct XAAudioEncoderItf_ const XAAudioEncoderItf struct XAAudioEncoderItf_ XAresult SetEncoderSettings XAAudioEncoderItf self XAAudioEncoderSettings pSettings XAresult GetEncoderSettings XAAudioEncoderItf self XAAudioEncoderSettings pSettings Interface ID ebbab900 3997 1 1 dc 89 1f 0002a5d5c5 1b Defaults No default settings are mandated COpenMAX AL i Methods SetEncoderSettings XAresult SetEncoderSettings XAAudioEncoderItf self XAAudioEncoderSettings pSettings RecordItf state shall be in stopped state in Specifies the audio encoder settings to be applied Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_PRECONDITIONS_VIOLATED GetEncoderSettings GetEncoderS
20. Value Description XA_DOMAINTYPE_AUDIO Audio domain based functionality XA_DOMAINTYPE_VIDEO Video domain based functionality XA_DOMAINTYPE_IMAGE Imaging domain based functionality XA_DOMAINTYPE_TIMEDTEXT Timed Text domain based functionality XA_DOMAINTYPE_MIDI MIDI domain based functionality XA_DOMAINTYPE_VENDOR Custom domain based functionality Functionality associated with this domain is implementation specific XA_DOMAINTYPE_UNKNOWN Unknown stream domain This domain type represents an unrecognizeable stream type 9 2 31 XA_DYNAMIC_ITF_EVENT define XA_DYNAMIC_ITF_EVENT_RUNTIME_ERROR XAuint32 0x00000001 define XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION XAuint32 0x00000002 define XA_DYNAMIC_ITF_EVENT_RESOURCES_LOST XAuint32 0x00000003 define XA_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY XAuint32 0x00000004 define XA_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE XAuint32 0x00000005 These values are used for identifying events used for dynamic interface managerment XA DYNAMIC I XA_DYNAMIC_IT T_ASYNC_TERMINATION RUNTIME_1 Runtime error An asynchronous operation has terminated COpenMAX AL i ESOURC XA_DYNAMIC_ITF_E ES LOST XA_DYNAMIC_ITF_E ESOURC ES_LOST_P XA_DYNAMIC_ITF_E ESOURC ES_AVAILABL
21. Parameters Interface self reference ExtensionName The name of an extension as defined in the Khronos registry http www khronos org registry or in vendor specific documentation Must be null terminated pSupported EAN_TRUE if the given extension is supported EAN_FALSE if it is not supported Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments This is an alternative method to be used instead of QUeryNumSupportedExtensions and QuerySupportedExtension _ to query the availability of just one known extension ypenMAX AL i OueryLEDCapabilities XAresult QueryLEDCapabilities XAEngineItf self XAuint32 pIndex XAuint32 pLEDDevicelID XALEDDescriptor pDescriptor Oueries the LED device for its capabilities pIndex in out As an input specifies which LED array device to obtain the capabilities of the supported range is 0 n where n is the number of LED array devices available ignored if pDescriptor is NULL As an output specifies the number of LED array devices available in the system Returns 0 if no LED array devices are available pLEDDeviceld in out If pIndex is non NULL then returns the LED array device ID corresponding to LED array device pIndex If pIndex is NULL then as an input specifies which LED array device to obtain the capabilities of XA_DEFAULTDEVICEID_LED can be
22. 9 1 26 XAlmageStreamInformation typedef struct XAImageStreamInformation_ XAuint32 codecId XAuint32 width XAuint32 height XAmillisecond presentationDuration XAImageStreamInformation ypenMAX AL This structure is used for guerying the information about an image stream presentationDuration Identifies the total duration of the image stream If the duration is unknown this value shall be XA TIME UNKNOWN For images this means the total duration that the image should be presented For image streams that contain multiple images an event notification will be issued when the next image stream is processed by the object and the presentation duration has changed This will allow the allocation to guery for the updated image presentation duration that is associated with the new image COpenMAX AL i 9 1 27 XAlnterfacelD typedef const struct XAInterfaceID_ XAuint32 time_low XAuint16 time_mid XAuint16 time hi and version XAuint16 clock_seq XAuint8 node 6 XAInterfaceID The interface ID type High field of the timestamp multiplexed with the version number Spatially unique node identifier 9 1 28 XALEDDescriptor typedef struct XALEDDescriptor_ XAuint8 ledCount XAuint8 primaryLED XAuint32 colorMask XALEDDescriptor XALEDDescriptor represents the capabilities of the LED array I O Device Number of LEDs in the array Range is 1 32 primaryLED Index of the primary
23. Return value The return value can be XA RESULT SUCCE XA RESULT PARA onc of the following SS ETER_INVALID RAW is one of the image codecs supports QueryColorFormats Comments If XA_IMAGECODEC_ should be used to determine the color formats supported ypenMAX AL 185 OueryColorFormats XAresult QueryColorFormats const XAImageDecoderCapabilitiesIt self XAuint32 pIndex XAuint32 pColorFormat i This method is used to query the color formats supported by the image decoder pIndex If pColorFormats is NULL pIndex returns the number of color formats supported Returns 0 if there are no color formats are supported If pColorFormats is non NULL pindex is an incrementing value used for enumerating the color formats supported Supported index range is 0 to N 1 where N is the number of color format supports pColorFormat out Pointer to the color format May be NULL See XA_COLORFORMAT macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID This method returns color formats associated with the XA_IMAGECODEC_RAW codec ypenMAX AL i 8 17 XAlmageEffectsitf Description The image effects interface is used to determine which effects are supported to enable effects and to disable effects It is realized on a object that supports image or video conten
24. XAuint32 0x00000001 The macros are used for defining the AMR WB audio profiles Adaptive Multi Rate Wideband Value XA_AUDIOPROFILE AMRWB AMR WB Profiles and Modes define XA_AUDIOPROFILE_AMRWBPLUS XAuint32 0x00000001 The macros are used for defining the AMR WB audio profiles XA_AUDIOPROFILE_AMRWBPLUS Extended Adaptive Multi Rate Wideband 393 ypenMAX AL AAC Profiles and Modes define XA AUDIOPROFILE AAC AAC XAuint32 0x00000001 define XA AUDIOMODE AAC MAIN XAuint32 0x00000001 define XA AUDIOMODE AAC LC XAuint32 0x00000002 define XA AUDIOMODE AAC SSR XAuint32 0x00000003 define XA AUDIOMODE AAC LTP XAuint32 0x00000004 define XA AUDIOMODE AAC HE XAuint32 0x00000005 define XA AUDIOMODE AAC SCALABLE XAuint32 0x00000006 define XA AUDIOMODE AAC ERLC XAuint32 0x00000007 define XA AUDIOMODE AAC LD XAuint32 0x00000008 define XA AUDIOMODE AAC HE PS XAuint32 0x00000009 define XA AUDIOMODE AAC HE MPS XAuint32 0x0000000A define XA AUDIOSTREAMFORMAT MP2ADTS XAuint32 0x00000001 define XA AUDIOSTREAMFORMAT MP4ADTS XAuint32 0x00000002 define XA AUDIOSTREAMFORMAT MP4LOAS XAuint32 0x00000003 define XA AUDIOSTREAMFORMAT MP4LATM XAuint32 0x00000004 define XA AUDIOSTREAMFORMAT ADIF XAuint32 0x00000005 define XA AUDIOSTREAMFORMAT MP4FF XAuint32 0x00000006 define XA AUDIOSTREAMFORMAT RAW XAuint32 0x00000007 The mac
25. sscessssssssnscesveccosnsecnscensnsesnacsosnsssnscensnsssaccpsnsecasesnsesesnacspsssscnscspnnsesacspensesns 4 1 6 CONVENTIONS USED cxivisssiadasns cers EANAIGH en bie ch ieee a eee ae ee ei eee 6 16 1 Parameter Range NOON vii c ssseccsosinnisencssnsesnsiansessessedesnsigninssnndeoescgesonpedtonsigndegueaguseassdgnsessespedeootioes 6 1 62 Format and Typographic Convention cccsccesceeeseesseeecesecesscesecusecusecacecaecaecsuecauecaeeeseeeseeseasenseneeeeenaes 7 1 7 ACKNOWLEDGEMENTS sac 95hccdsecesdeesazasotissvesetenssesvacsonceldendsnsniedieesetn EE ER Ero E A EE ir EE ET E E in SERRES Ei 8 2 OPENMAX AL FEATURES AND PROFILES ccsssssssssssssscssescesessescesessescesssseseesesseseesscseseesesseseeesseseenees 9 21 MOTIVATION cinean E E ee ee ate eee ee eds 9 2 2 OPENMAX AL PROFILE DEFINITION ccsscccesscesscecesecesscecesecesseecseceeeneecesscesaeecsaseseaeecsaeeeeaeececeseaeeceseeeeneeess 9 23 PROFILES ronnie Sante ee E E Ga phen anata Sena ea ads eine ieee bees 9 2 4 OPTIONALITY RULES OF FEATURES AND PROFILES cssececesecessceceseceeneeceaeceeeecsaeceeneeceaeceneecaeceeneesaeeeaeees 12 2 9 MIDI NOPENMAX AT Seebes ited Leelee Easa ied a Aisle hee Sie eR ache ae ietinte 13 210 PROFILE NOTES si essa seasann n a ena paisean roshig ais e ES Cais bai EEEE sa Easy E E a hair aile EEE EE EE E EEE AES RRE es 13 2 7 BEHAVIOR FOR UNSUPPORTED FEATURES cccssscescecsseceseeeceaecesneecsaceeeneeceaeess
26. res equalizerItf gt SetBandLevel equalizerItf band bandLevel CheckErr res drawEQDisplay else increase false decrease the level by 1 dB 100mB if the min supported level 5 iS WOE Grossecl ss bandLevel bandLevel 100 if bandLevel gt minLevel res equalizerItf gt SetBandLevel equalizerItf band bandLevel CheckErr res drawEQDisplay D 2 Audio Video Playback OpenMAX AL Audio Video Playback Example Se include lt stdio h gt include lt stdlib h gt include lt OMXAL OpenMAXAL h gt define MAX NUMBER_INTERFACES 5 define MAX NUMBER OUTPUT DEVICES 3 CO penMAX AL 2 define POSITION UPDATE PERIOD 1000 1 sec Checks for error If any errors exit the application void CheckErr XAresult res if res XA_RESULT_SUCCESS Debug printing to be placed here Gake AL 9 void PlayEventCallback XAPlayItf caller void pContext XAuint32 playevent Callback code goes here Test audio video playback from a 3GPP file NOTE For the purposes of this example the implementation is assumed to support the requisite audio and video codecs Therefore video and audio decoder capabilities are NOT checked in this example void TestAudioVideoPlayback XAObjectItf engine XAObjJectItf pl
27. HTCLASSICAL IOUSCLASSICAL RDSP Y_SOCIALAFFAIRS ENSPROGRAMM Y_JAZZMUSIC Y_COUNTRYMUSIC Y_NATIONALMUSIC Y NI _INFORMATION TY_ SPORTS rY TALK TY _ROCK TY _CLASSICROCK TY _ADULTHITS TY_SOFTROCK TY_TOP40 Y COUNTRY TY_OLDI 441 ik ypenMAX AL 9 2 65 define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define CpenMAX XA_RDSRTPLUS XA_RDSRTPLUS_ITEMTITLE XA_RDSRTPLUS_ITEMALBUM XA
28. XAuint32 0x0000001B define XA_RDSPROGRAMMETYPE_RDSPTY_FOLKMUSIC XAuint32 0x0000001C define XA_RDSPROGRAMMETYPE_RDSPTY_DOCUMENTARY XAuint32 0x0000001D define XA_RDSPROGRAMMETYPE_RDSPTY_ALARMTEST XAuint32 0x0000001E define XA_RDSPROGRAMMETYPE RDSPTY_ALARM XAuint32 0x0000001F define XA_RDSPROGRAMMETYPE RBDSPTY_NONE XAuint32 0x00000000 define XA_RDSPROGRAMMETYPE_RBDSPTY_NEWS XAuint32 0x00000001 define XA RDSPROGRAMMETYPE RBDSPTY INFORMATION XAuint32 0x00000002 define XA RDSPROGRAMMETYPE RBDSPTY SPORTS XAuint32 0x00000003 define XA RDSPROGRAMMETYPE RBDSPTY TALK XAuint32 0x00000004 define XA RDSPROGRAMMETYPE RBDSPTY ROCK XAuint32 0x00000005 define XA RDSPROGRAMMETYPE RBDSPTY CLASSICROCK XAuint32 0x00000006 define XA RDSPROGRAMMETYPE RBDSPTY ADULTHITS XAuint32 0x00000007 define XA RDSPROGRAMMETYPE RBDSPTY SOFTROCK XAuint32 0x00000008 define XA RDSPROGRAMMETYPE RBDSPTY TOP40 XAuint32 0x00000009 define XA RDSPROGRAMMETYPE RBDSPTY COUNTRY XAuint32 0x0000000A define XA_RDSPROGRAMMETYPE RBDSPTY_OLDIES XAuint32 0x0000000B define XA_RDSPROGRAMMETYPE RBDSPTY_SOFT XAuint32 0x0000000C define XA_RDSPROGRAMMETYPE _RBDSPTY_NOSTALGIA XAuint32 0x0000000D define XA_RDSPROGRAMMETYPE RBDSPTY_JAZZ XAuint32 0x0000000E define XA_RDSPROGRAMMETYPE _RBDSPTY_CLASSICAL XAuint32 0x0000000F define XA_R
29. XAuint32 XA_ENGINEOPTION_MAJORVERSION XAuint32 1 XAuint32 XA_ENGINEOPTION_MINORVERSION XAuint32 1 l fj Tina ae ale arrays recwireci amci iichharcrieyii for i 0 i NA _NUMBER_INTERFACES i required i XA_BOOLEAN_FALS iidArray i CA CUID INU p es Create the OpenMAX AL engine res xaCreateEngine amp engine 3 EngineOption 0 NULL NULL CheckErr res Realizing the Engine in synchronous mode res engine gt Realize engine XA_BOOLEAN_FALSE CheckErr res Get the XA Engine Interface which is implicit res engine gt GetInterface engine XA_IID_ENGINE void amp enginelItf CheckErr res CREATE CAMERA Create Camera object CameraItf is implicit CO penMAX AL res enginelItf gt CreateCameraDevice engineltf amp camera XA_DEFAULTDEVICEID_CAMERA 0 NULL NULL CheckErr res Realizing the Camera object synchronously res camera gt Realize camera XA BOOLEAN FALSE CheckErr res Get play and camera interfaces res camera gt GetInterface camera XA_IID_ CAMERA void amp cameralItf CheckErr res js Register callbacks res cameraItf gt RegisterCallback cameraItf CameraCallback NULL CheckErr res Setup the camera data source structure cameraLocator locatorType XA_DATALOCATOR_IODEVICE cameraLocato
30. ypenMAX AL GetFillUpdatePeriod XAresult GetFillUpdatePeriod XAPrefetchStatusItf self XApermille pPeriod Oueries the notification period for fill level updates Interface self reference Return value The return value can be one of the following Pointer to a location to receive the period between fill level notifications in permille This must be non NULL XA_RESU iT_SUCC XA RESULT _PARAI ESS KT ER _INVALID ypenMAX AL 267 8 30 XARadioltf Description XARadiolt f is for controlling the basic functionality of the analog audio radio The interface contains methods for selecting the frequency range and modulation used by the tuner Set FreqRange for tuning to a certain frequency manually SetFrequency or by automatically seeking Seek for using the tuner presets of the device and for accessing squelching functionality stereo mode and the signal strength Please note that Hertz Hz is used as the unit of the frequency For example 100 000 000 Hz equals 100 0 MHz This interface an implicit interface of Radio I O device objects see section 7 8 See section D 3 for an example using this interface Prototype XA_API extern const XAInterfaceID XA_IID RADIO struct XARadioItf typedef const struct XARadioItf_ const XARadioItf struct XARadioItf_ XAresult SetFreqRange XARadioItf self XAuint8 range XAresult
31. An object maintains a state machine with the following states e Unrealized initial state The object is alive but has not allocated resources It is not yet usable its interfaces methods cannot yet be called e Realized The object s resources are allocated and the object is usable e Suspended optional state The object has fewer resources than it requires in order to be usable but it maintains the state it was in at the moment of suspension This state is optional to the extent that in the face of resource loss the implementation has the option of putting an object either in the Suspended state or the Unrealized state The following state diagram illustrates the states and transitions COpenMAX AL Realize Unrealized lt lt Resource Loss gt gt Realized lt lt Resource Loss gt gt ini ae gt gt System induced transitions 5 _ Client induced transitions Suspended Figure 4 Object state diagram When the application destroys an object that object implicitly transitions through the Unrealized state Thus it frees its resources and makes them available to other objects See section 3 1 7 for more details on resource allocation 3 1 2 Getters and Setters Getters and setters provide access to object properties An application uses a setter to change the value of an object s property and a getter to retrieve a value of an object s property Unless explicitly sp
32. COpenMAX AL i 9 2 10 XA CAMERACAP define XA CAMERACAP FLASH XAuint32 0x00000001 define XA CAMERACAP AUTOFOCUS XAuint32 0x00000002 define XA _CAMERACAP CONTINUOUSAUTOFOCUS XAuint32 0x00000004 define XA_CAMERACAP MANUALFOCUS XAuint32 0x00000008 define XA_CAMERACAP AUTOEXPOSURE XAuint32 0x00000010 define XA_CAMERACAP MANUALEXPOSURE XAuint32 0x00000020 define XA _CAMERACAP AUTOISOSENSITIVITY XAuint32 0x00000040 define XA_CAMERACAP MANUALISOSENSITIVITY XAuint32 0x00000080 define XA_CAMERACAP AUTOAPERTURE XAuint32 0x00000100 define XA_CAMERACAP MANUALAPERTURE XAuint32 0x00000200 define XA_CAMERACAP AUTOSHUTTERSPEED XAuint32 0x00000400 define XA_CAMERACAP_MANUALSHUTTERSPEED XAuint32 0x00000800 define XA_CAMERACAP AUTOWHITEBALANCE XAuint32 0x00001000 define XA_CAMERACAP_MANUALWHITEBALANCE XAuint32 0x00002000 define XA _CAMERACAP OPTICALZOOM XAuint32 0x00004000 define XA _CAMERACAP DIGITALZOOM XAuint32 0x00008000 define XA_CAMERACAP METERING XAuint32 0x00010000 define XA _CAMERACAP BRIGHTNESS XAuint32 0x00020000 define XA_CAMERACAP CONTRAST XAuint32 0x00040000 define XA _CAMERACAP GAMMA XAuint32 0x00080000 The XA_CAMERACAP macros are used for camera capabilities See XACameralIt f see section 8 6 and XAImageControllItf see section 8 15 for more information on individual features XA_CAMERACAP_AUTOFOCUS XA_CAMERACAP _CONTTNUOUSAUTOFOCUS XA
33. XA_R ESUL XA_RI ESUL _CONT _ CONT FR INVALID _CORRUPTED _UNSUPPORT ypenMAX AL 326 OueryStreamType XAresult QueryStreamType XAStreamInformationItf self XAuint32 streamIndex XAuint32 pDomain i Queries the individual streams to determine which domain they are based with streamIndex Incrementing index used to query the available streams Supported index range is 1 to N where N is the number of streams available The value 0 is a reserved value that shall always represent the Media Container out Identifies the stream domain Return value The return value can be one of the following XA RESULT SUCCESS XA RESULT PARAMETER INVALID XA RESULT CONTI __CORRUPTED XA RESULT CONTI _UNSUPPORTI QueryMediaContainerInformation ypenMAX AL QueryStreamInformation XAresult QueryStreamInformation XAStreamInformationItf self XAuint32 streamIndex void pInfo di Queries information about the stream Noe streamIndex in Index identifying the stream within the container that is being queried The stream index value is same stream index indentifer that is obtained via QueryStreamT ype pinfo out Structure containing the stream information The structure type definition is associated as per the domain parameter setting refer to Table 14 Return value The return va
34. res xaCreateEngine amp engine 3 EngineOption 0 NULL NULL CheckErr res Realizing the XA Engine in synchronous mode res engine gt Realize engine CO penMAX AL XA_BOOLEAN_FALSE CheckErr res Get the XA Engine Interface which is implicit res engine gt GetInterface engine XA_IID_ENGINE void amp EnginelItf CheckErr res fm tmiecializs arrays wacmiicacl amel aimeleeray se for i 0 i lt MAX_NUMBER_INTERFACES i sal required i XA BOOLEAN FALSE iidArray i XA_IID_NULL Set arrays required and iidArray for VOLUME and EQUALIZER interfaces required 0 XA_BOOLEAN_TRUE iidArray 0 XA_IID_VOLUME required 1 XA_BOOLEAN_TRUE iidArray 1 XA_IID_EQUALIZER Create Output Mix object to be used by player res Engineltf gt CreateOutputMix Engineltf amp outputMix 2 iidArray required CheckErr res Realizing the Output Mix object in synchronous mode res outputMix gt Realize outputMix XA_BOOLEAN FALSE CheckErr res Get play and equalizer interfaces res outputMix gt GetInterface outputMix XA_IID_VOLUME void amp volumelItf CheckErr res res outputMix gt GetInterface outputMix XA_IID_EQUALIZER void amp equalizerItf CheckErr res Setua the carca Source structure uri loca
35. Address to store the value Must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALI XA_RESULT_BUFFER_INSUFFICII Comments Get Value fills out the XAMet adataInfo structure including data for the value beyond the size of the structure If the given size is smaller than the needed size XA_RESULT_BUFFER_INSUFFICIENT is returned and only data of the given size will be written however no invalid strings are written That is the null terminator always exists and multibyte characters are not cut in the middle GetValueSize ypenMAX AL AddKeyFilter XAresult AddKeyFilter XAMetadataExtractionItf self XAuint32 keySize const void pKey XAuint32 keyEncoding const XAchar pValueLangCountry XAuint32 valueEncoding XAuint8 filterMask Adds a filter for a specific key Pre conditions At least one criteria parameter key keyEncoding pValueLangCountry valueEncoding must be provided u keySize in Size in bytes of the pKey parameter Ignored if filtering by key is disabled pKey in The key to filter by The entire key must match Ignored if filtering by key is disabled keyEncoding in Character encoding of the pKey parameter Ignored if filtering by key is disabled pValueLangCountry in Language country code of the value to filter by Ignored if filtering by language
36. ES _AVAILABLI _ITF_CONTROL_TAK This event cannot be followed by another XA_OBJECT_EVENT_ITF_CONTROL_TAKEN event for the interface in question Control was returned to an interface ENT_ITF_CONTROL_R This event cannot be followed by another XA_OBJECT_EVENT_ITF_CONTROL_R event for the interface in question ENT ITE PARAME ERS_CHANGI Some of the parameters of the interface in question were changed by other entity If the application wants to know the new values it should use getters This event can only occur for the interface in question between XA_OBJEC XA_OBJEC events _EVEN _EVEN F_CON F_CON ROL_TAKEN and ROL_RETURNED 9 2 49 XA OBJECT STATE define XA_OBJECT_STATE_UNREALIZED define XA_OBJECT_STATE_REALIZED define XA_OBJECT_STATE_SUSPENDED XAuint32 0x00000001 XAuint32 0x00000002 XAuint32 0x00000003 These macros are used to identify the object states Unrealized state Realized state ED ECT_STATE_UNR 428 F F 9 2 50 ECT_STATE XA_ OBJ ECTID Suspended state define XA OBJECTID_ENGINE XAuint32 0x00000001 define XA_OBJECTID_LEDDEVICE XAuint32 0x00000002 define XA_OBJECTID_VIBRADEVICE XAuint32 0x00
37. Parameters in Interface self reference pMsec out Pointer to a location to receive the period between position notifications in milliseconds This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL 8 28 XAPlaybackRateltf Description XAPlaybackRatelIt f is an interface for controlling setting and retrieving the rate at which an object presents data Rates are expressed as a permille type namely parts per thousand Negative values indicate reverse presentation A value of 0 indicates paused presentation Positive values less than 1000 indicate slow forward rates A value of 1000 indicates normal 1X forward playback Positive values greater than 1000 indicate fast forward rates Defaults The rate value defaults to 1000 that is normal 1X forward playback Prototype XA API extern const XAInterfaceID XA IID PLAYBACKRATE struct XAPlaybackRateItf_ typedef const struct XAPlaybackRateItf_ const XAPlaybackRatelItf struct XAPlaybackRateItf_ XAresult SetRate XAPlaybackRateItf self XApermille rate XAresult GetRate XAPlaybackRateItf self XApermille pRate XAresult SetPropertyConstraints XAPlaybackRateItf self XAuint32 constraints XAresult GetProperties XAPlaybackRateItf self XAuint32 pProperties XAresult GetCapabilitiesOfRate
38. The context from which the callbacks are invoked is undefined and typically implementation and OS dependant Thus the application cannot rely on any system call or OpenMAX AL API call to work from within this call However to avoid a dead end each implementation should document the list of functions that can be safely called from the callback context It is highly recommended that the implementation provide at least the means of posting ypenMAX AL n messages to other application threads where the event shall be handled In addition the XAThreadSyncItf interface see section 8 35 must be usable from within the callback context The application should be aware of the fact that callbacks may be invoked concurrently with other callbacks concurrently with application invocation of an API method or even from within API calls and thus should be prepared to handle the required synchronization typically using the XAThreadSynclIt f interface see section 8 35 For more specific details refer to the engine object documentation in section 7 2 3 4 Error Reporting Almost every API method indicates its success or failure by a result code except for methods that are not allowed to fail under any circumstances An API method s documentation states the valid result codes for that method and an implementation shall return one of these result codes For synchronous methods the result code is the return value of the method For asynchronous fun
39. Value to be written The application should not deallocate or change the content of this struct before receiving the corresponding xaMetadataInsertionCallback or destroying the object overwrite Return value The return value can be one of the following XA_RESULT_SUCCESS ypenMAX AL RegisterCallback XAresult RegisterCallback struct XAMetadataInsertionItf _ self xaMetadataInsertionCallback callback void pContext i Registers a callback on the object that executes after each of the actual writings of metadata key value pairs takes place Parameters Interface self reference in Address of the result callback If NULL then the callback is disabled in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCE xaMetadataInsertionCallback ypenMAX AL m 8 23 XAMetadataMessageltf Description The metadata message interface is used to set metadata callbacks The user will be notified via callback of any metadata that is encountered during playback This interface on its own has no function or utility It is designed for use in conjunction with XAMet adataExtractionItf and is only able to be realized or dynamically added to an object when XAMetadataExtractionIt f is already present The configuration state of the corresponding XAMet adataExtractionItf directly effects the performanc
40. XAresult XAPre ventsMask GetCallbackEventsMask fetchStatusItf self XAuint32 pEventFlags Parameters Return value Queries the notification state of the prefetch events None self in Interface self reference i pEventFlags out Pointer to a location to receive the bitmask of prefetch event flags indicating which callback events are enabled This must be non NULL See XA_PREFETCHEVENT macros see section 9 2 55 The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID None SetFillUpdatePeriod XAresult XAPre SetFillUpdatePeriod fetchStatusItf self XApermille period Pre conditions Parameters Return value Sets the notification period for fill level updates This period implies the set discrete fill level values that will generate notifications from the player None Interface self reference period in Non zero period between fill level notifications in permille Notifications will occur at 0 permille i e empty and at whole number increments of the period from 0 For instance if the period is 200 permille i e 20 then the player will generate a notification when 0 20 40 60 80 or 100 full The default period is 100 permille The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID None
41. XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C Ox1D Ox1E Ox1F 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 Ox2A 0x2B 0x2C 0x2D 0x2E 0x2F 0x30 0x31 0x32 0x33 0x34 0x35 0x36 443 define define define define define define define define define XA_RDSRTPLUS_OPENCLASS55 XA_RDSRTPLUS_OPENCLASS56 XA_RDSRTPLUS_OPENCLASS57 XA_RDSRTPLUS_OPENCLASS58 XA_RDSRTPLUS_PLACE XA_RDSRTPLUS_APPOINTMENT XA_RDSRTPLUS_IDENTIFIER XA_RDSRTPLUS_PURCHASE XA_RDSRTPLUS_GETDATA XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 0x37 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F The macros are sued to specify Class
42. cccccccccescccescceessecessceensecesneeeaseceseeeescecseneeeaaeceaeecsaeceeaeecsaecseaeecnaeeeeaeesnaeeeees 25 4 FUNCTIONAL OVERVIEW sscssssssssssssssssssnsessssenssssnsessscsnsssscsnsssscensessscsnsnsescensnssscenssessesesssssesessessesessens 27 Al OBJECT OVERVIEW ic7sucsctixestes tess cestevsvudcsvessetecpsesndsdncassee bueondussedcutuestevotseons Ute stanseouecvasntesnieschcsvasestesieesenissueshs 27 COpenMAX AL i Al Engine Object mireinio nn ps conveepocians R E E E AE EE ER E ERORE E E 27 ADD Medid Objects ueris n nan teoveduonsiveiveeveccduetyax ig supoeede Sitch EEEE ERE RE ERE E N 28 41 21 Data Source and Sink Structures sec cicsssossssesdidevcesstsunestesedeivivessobessateoieisovesdseupbvenvsosbuas N aga EEEE ENER E EET 28 la Metadata EXtractor OD CE sireno e R EE E EREE E EE REE ERS 29 414 Audio Output Mix Obj Ctesrerenaninerondinnan nean a NSS a E sali Sh agas NA Saige dees 29 AAD Camera OD CCE errora E A E E umes E ER EE 29 4160 LED Array Control Object ircre a A Vass E gas E 29 bo Rado Objet irs E E A E EA R EE E R 29 4 1 8 Vibration Control Object svsissstisetiiss tea ustetistsstertst a E A E E is 30 42 AUDIO PLAYBACK AND RECORDING i sccsccsccowssscescesesscesvsstevsces descents sidvesotesacsetessectentosesseesddeedondonessaveedecdiesapevasves 30 4 3 VIDEO PEAYBAGK AND RECORDING orrera aaen E EEN NE EEEIEE Ep ESEE EEE NE ESEA NEEE EE EES 30 44 IMAGE RENDERERING AND CAPTURE cccscscsesscsesesessee
43. in Address of the callback in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESU iT_SUCC XA_RESUL PARA ET ER_INVALID ypenMAX AL 300 8 32 XARecorditf Description XARecordItf is an interface for controlling the recording state of an object The record state machine is as follows lt lt End of Stream or Error gt gt Stopped a Recording lt lt Error gt gt Figure 19 Record state machine In case the disc gets full while recording to a file XA_OBJECT_EVENT_RUNTIME_ERROR will be posted via xaObjectCallback with XA_RESULT_IO_ERROR as this callback s result parameter The recorder will in that case autotransition into XA_RECORDSTATE_STOPPED state Table 13 Data Status and Recording State Recording State Destination closed Head moving sending data to destination Stopped X Paused Recording X Destination denotes the sink of the recording process for example a file being written to Head denotes the position of the recording process relative in time to the duration of the entire recording for example if the five seconds of video have been sent to the destination the head is at five seconds 3 I a recorder transitions from Paused to Recording without an interve
44. struct XAMetadataExtractionItf typedef const struct XAMetadataExtractionItf_ const XAMetadataExtractionItf struct XAMetadataExtractionItf_ XAresult GetItemCount XAMetadataExtractionItf XAuint32 pItemCount XAresult GetKeySize XAMetadataExtractionIitf XAuint32 index XAuint32 pKeySize XAresult GetKey XAMetadataExtractionIitf XAuint32 index XAuint32 keySize XAMetadataInfo pKey XAresult GetValueSize XAMetadataExtractionItf XAuint32 index XAuint32 pValueSize XAresult GetValue XAMetadataExtractionIiItf XAuint32 index XAuint32 valueSize XAMetadataInfo pValue XAresult AddKeyFilter XAMetadataExtractionItf XAuint32 keySize const void pKey XAuint32 keyEncoding self self self self self self const XAchar pValueLangCountry XAuint32 valueEncoding XAuint8 filterMask XAresult ClearKeyFilter XAMetadataExtractionIt Interface ID 5df4fda0 f776 11db abc5 0002a5d5c51b ypenMAX AL self 204 Defaults The metadata key filter is empty upon realization of the interface The default metadata scope is the root of the file Methods GetItemCount XAresult GetItemCount XAMetadataExtractionItf self XAuint32 pItemCount Returns the number of metadata items within the current scope of the object pItemCount out Number of metadata items Must be non NULL Return v
45. 0 Get the XA Engine Interface which is implicit res engine gt GetInterface engine XA_IID_ENGINE void amp EnginelItf CheckErr res Get the Audio IO DEVICE CAPABILITIES interface which is also aimolieit res engine gt GetInterface engine XA_IID_AUDIOIODEVICECAPABILITIES void amp AudiolODeviceCapabilitiesItf CheckErr res COpenMAX AL i numInputs MAX_NUMBER_INPUT_DEVICES res AudiolODeviceCapabilitiesItf gt GetAvailableAudiolInputs AudiolODeviceCapabilitiesItf amp numInputs InputDevicelIDs CheckErr res Search for either earpiece microphone or headset microphone alicia joIeeireiecinge icoie icine miat teria coe i g a2 lt NVES g Lar res AudiolODeviceCapabilitiesItf gt QueryAudiolnputCapabilities AudiolODeviceCapabilitiesItf InputDeviceIDs i amp AudioInputDescriptor Clhechkibirie res a if AudioInputDescriptor deviceConnection XA_DEVCONNECTION_ATTACHED_WIRED amp amp AudioInputDescriptor deviceScope XA_DEVSCOPE_USER amp amp AudioInputDescriptor deviceLocation XA_DEVLOCATION_HEADSET mic_deviceID InputDevicelIDs i mic available XA_BOOLEAN TRUE break else if AudiolInputDescriptor deviceConnection XA_DEVCONNECTION_INTEGRATED amp amp AudioInputDescriptor deviceScope XA_DEVSCOPE_USER amp amp AudioInputDescriptor deviceLoc
46. 56 76 METADATA EXTRACTOR OBIECT eoria ea ena aE aa ESE SEEE SE EES EE a ENSE sv ais ach S E i E 59 VA SQUTPUTIMIX OBJECT oo siecsenseisaseesces esxasvanssvesceeoecasbacapensleecseebnaedsonsoseseensvapnbeaacdeesensosesscesseecoeasbacsapeseebeneabbacsseeses 61 78 RADIOS O DEVICE wa iicicciicn coin ces a a ae Ee ee ae eR eee 63 BI VIBRA VO DEVICE viz pestres oere sects Ee eE EE EA EEPE E TA EEEE EEE E EEEE ESE Ee ES Eee ES EE ES E E EE 64 INTERFACE DEFINITIONS tisistescctsieiessctssesasssassecsssstcvssceassasastadcusssecasssssvacsessuececssasuascosssedgesseroasonsctsccsussessecd 65 81 XA MD NULL a heel Gide tees be pe ede eee va R a ETS A 66 82 XAAUDIODECODERCAPABILITIESITF cesccessseceseceesseceseeesseeceneecnaeceeceecsaeceeeessaeceeeecsaeceeeeecsaeceeneeenaeeeanees 67 8 3 gt XAAUDIOEFNCODERITR cnica ARS SEAS Sone A AEE E aaceca bees inens EA amen AS 70 8 4 XAAUDIOENCODERCAPABILITIESITE cescceesseceseceesceceseeeeseecesneeeneeceeceecaaeceneecsaeceeeecaeceeeeecsaeceeeeeeaecenees 72 8 5 XAAUDIOIODEVICECAPABILITIESITE cccscecsssccesseessnceeceecssncveneesssnevcceecsssesenceesssevccsecsuseseneessssesensesenaens 75 80 A CAMERA TE ere aeee e ts testuck OEE EE ss EE raepeasacecascesuucaty ectactctesaes E E OE cia 89 8 7 XACAMERACAPABILITESI TP cen a e E a ia EE a E E EE Krae E chosen E eE 113 8 8 XACONFIGEXTENSIONSITE sirsiran istera oire ees gai e E EE E S NE e E EREE E REE eR Eri EE iE 126 8 9 XADEVICEVOL MEITE sariis
47. Danny Jochelson Texas Instruments COpenMAX AL 2 OpenMAX AL Features and Profiles OpenMAX AL is designed with media application developers in mind It provides support for a number of audio video and image features that facilitate the development of a wide range of applications on the target devices Supported features include e Media playback Includes playback of PCM audio encoded audio MIDI ringtones UI sounds encoded video and image content as well as extraction of metadata embedded in the media content Video playback refers to support for synchronized audio video playback Image playback refers to the decoding and display of compressed image data e Media recording Includes support for recording of audio and video and image capture Video recording refers to support for synchronized audio video recording Image capture refers to camera functionality e Effects and controls For audio includes support for general controls such as volume and balance and music player effects such as equalizer For image and video includes support for controlling the brightness contrast and gamma adjustments Optional functionality includes MIDI Includes support for SP MIDI mobile DLS and mobile XMF Analog Radio Includes support for analog radio tuning as well as support for RDS RBDS content LED array Includes support controlling multiple colored LED arrays Vibration device vibra Includes support for controlling vibration
48. Gets the current properties None I pProperties Return value The return value can be one of the following out XA RESU XA RESU GetCapabilitiesOfRate i T SUCC T PARA ESS Interface self reference Pointer to a location to receive the bitmask expressing the current rate properties This must be non NULL See XA_RATEPROP macros KT FR INVALILD XAresult GetCapabilitiesOfRate XAPlaybackRateItf self XApermille rate XAuint32 pCapabilities Gets the capabilities of the specified rate None pCapabilities Interface self reference in out Rate for which the capabilities are being queried Pointer to a location to receive the bitmask expressing capabilities of the given rate in terms of rate properties See XA_RATEPROP macros Return value The return value can be one of the following XA_RESUL XA_RESUL SUCE PARA ESS ET ER_INVALID An application may also leverage this method to verify that a particular rate is supported COrpenMAX AL 259 GetRateRange XAresult GetRateRange XAPlaybackRateItf self XAuint8 index XApermille pMinRate XApermille pMaxRate XApermille pStepSize XAuint32 pCapabilities Retrieves the ranges of rates supported Parameters in Interface self reference index in Index of the range being queried If an implementatio
49. Return value return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID See Section 9 2 58 XA_RADIO_EVENT macros CancelSetFrequency XAresult CancelSetFrequency XARadioItf self I Description Cancels an outstanding Set Frequency request The method blocks while canceling the outstanding request Has not effect if no set frequency operation is ongoing Return value The return value can be the iia XA_RESULT_SUCCE ypenMAX AL GetFrequency XAresult GetFrequency XARadioItf self XAuint32 pnFreq Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID SetSquelch XAresult SetSquelch XARadioItf self XAboolean squelch Toggles the squelch muting in frequencies without broadcast Parameters Interface self reference in True to switch on squelch and false to switch it off Return value The return value can be one of the following XA_RESULT_SUCCESS Comments Squelch changes made by other applications can trigger a XA_RADIO_EVENT_SQUELCH_CHANGED event See Section 9 2 58 XA RADIO macros ypenMAX AL GetSquelch XAresult GetSquelch XARadioItf self XAboolean pSquelch Return value The return value can be one of th
50. White balance control Optical and digital zoom PLAYBACK RECORDING AND PROCESSING CONTROLS VCR type playback modes play pause stop rewind fast forward Play multiple sounds at a given time Playback of raw PCM audio Playback of sampled audio encoded in a form other than raw PCM MypenMAX AL i API Profile Feature Hoe aca Playback of mono and stereo sampled audio Volume control Audio balance control Audio pan control End to end looping of audio video content Audio video segment looping Seeking to a seek point such as chapter Route media to multiple simultaneous outputs Set a sound s priority Audio equalization auto recording tomamicopioeorondcmemempe I id Autio recording tom snotter sonare omore O oo e I amus ONGg6 cue nil sic ofthe oupatinage veset on curente sois o C CC Use key value pairs to query and set both the codec and non codec configurations of the Y Y underlying media engine PER OBJECT SETTINGS Set video encoder properties frame rate bitrate constant variable size resolution Y duration limit and codec format Set audio encoder properties bitrate constant variable channel count duration limit Y sampling frequency codec format size and resolution Set image encoder properties codec format size and resolution ty Set and query image video encoder special effects if supported Effects include but are not limited to monochrome
51. XAEqualizerItf self XAboolean pEnabled XAresult GetNumberOfBands XAEqualizerItf self XAuint16 pNumBands XAresult GetBandLevelRange XAEqualizerItf self XAmillibel pMin ypenMAX AL a XAmillibel pMax XAresult SetBandLevel XAEqualizerItf self XAuint16 band XAmillibel level XAresult GetBandLevel XAEqualizerItf self XAuint16 band XAmillibel pLevel XAresult GetCenterFreq XAEqualizerItf self XAuint16 band XAmilliHertz pCenter XAresult GetBandFreqRange XAEqualizerItf self XAuint16 band XAmilliHertz pMin XAmilliHertz pMax XAresult GetBand XAEqualizerItf self XAmilliHertz frequency XAuint16 pBand XAresult GetCurrentPreset XAEqualizerItf self XAuint16 pPreset XAresult UsePreset XAEqualizerItf self XAuint16 index XAresult GetNumberOfPresets XAEqualizerItf self XAuint16 pNumPresets XAresult GetPresetName XAEqualizerItf self XAuint16 index XAuint16 pSize XAchar pName Interface ID 68847840 d6de 1 1 df a826 0002a5d5c5 1b Defaults ypenMAX AL i Enabled false disabled All band levels 0 mB flat response curve Preset XA_EQUALIZER_UND Methods SetEnabled XAresult SetEnabled XAEqualizerItf self XAboolean enabled Enables the effect Parameters Interface self reference in True to turn on the effect
52. XAmicrosecond pManualSetting XAresult SetWhiteBalance XACameraItf self XAuint32 whiteBalance XAuint32 manualSetting XAresult GetWhiteBalance XACameraItf self XAuint32 pWhiteBalance XAuint32 pManualSetting XAresult SetAutoLocks XACameraItf self XAuint32 locks XAresult GetAutoLocks XACameraItf self XAuint32 pLocks XAresult SetZoom XACameraItf self XApermille zoom XAboolean digitalEnabled XAuint32 speed XAboolean async XAresult GetZoom XACameraItf self XApermille pZoom XAboolean pDigital Interface ID 0a614b80 d6d9 1 1df b536 0002a5d5c5 1b Defaults ypenMAX AL 91 No default settings are mandated Callbacks xaCameraCallback typedef void XAAPIENTRY xaCameraCallback XACameraItf caller void pContext XAuint32 eventId XAuint32 eventData Description This method is used for camera event notifications Parameters caller in Interface on which this callback was registered in User context data that is supplied when the callback method is registered eventId in Indicates the type of notification callback event being reported Refer to XA_CAM ERACB EV ENT for a list of available events eventData in Specifies additional information specific to a notification callback event The contents of this parameter are dependent on the event being reported RegisterC
53. XAuint32 pLocks This method gets the supported combinations of automatic camera setting locks COpenMAX AL GetSupportedAutoLocks pNumCombinations in out If pLocks is NULL pNumCombinations returns the number of supported lock combinations If pLocks is non NULL pNumCombinations is length of the pLocks array out Returns an array of supported lock state combinations bitwise ORs of XA CAMERA LOCK macros pLocks may be NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If no lock state combinations are supported the method returns XA_RESULT_FEATURE_UNSUPPORTED Not all the cameras support locking all these parameters pre exposure Furthermore some combinations of otherwise supported locks might not be supported for example a camera might support only locking focus and exposure together at once but not separately and no other locks In that example case this method would return just three XA_CAMERA_LOCK_AUTOFOCUS XA_CAMERA_LOCK_AUTOEXPOSURE and zero The memory for the pLocks array shall be allocated by the OpenMAX AL application ypenMAX AL i GetSupportedFocusManualSettings XAresult GetSupportedFocusManualSettings XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAboolean macroEnabled XAmillimeter pMinValue XAmillimeter pMaxValue XAuint32
54. const XAEngineltf struct XAEnginelItf_ XAresult CreateCameraDevice XAEngineltf self XAObjectItf pDevice XAuint32 deviceID XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired XAresult CreateRadioDevice XAEngineItf self XAObjectItf pDevice XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired XAresult CreateLEDDevice XAEngineItf self XAObjectItf pDevice XAuint32 deviceID XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired XAresult CreateVibraDevice XAEngineItf self XxAObjectItf pDevice XAuint32 deviceID XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired ypenMAX AL XAresult CreateMediaPlayer XAEngineItf self XAObjectItf pPlayer const XADataSource pDataSrc const XADataSource pBankSrc const XADataSink pAudioSnk const XADataSink pImageVideoSnk const XADataSink pVibra const XADataSink pLEDArray XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired XAresult CreateMediaRecorder XAEngineItf self XAObjectItf pRecorder const XADataSource pAudioSrc const XADataSource pImageVideoSrc const XADataSink pDataSnk XAuint32 numInterfaces const XAInterfaceID pInterfacelIds const XAboolean pInterface
55. country is disabled See XAMetadataInfo structure in section 9 1 28 Encoding in Encoding of the value to filter by Ignored if filtering by encoding is disabled ilterMask in Bitmask indicating which criteria to filter by Should be one of the XA_METADATA_FILTER macros see section 9 2 39 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL AddKeyFilter Comments AddKeyFilter adds a key to the metadata key filter The filter defines which metadata items are available when asking how many exist Get ItemCount and how they are indexed for calls to Get KeySize GetKey Get ValueSize and GetValue For example if a file contains two metadata items with keys foo and bar both ASCID calling AddKeyFilter for foo will cause Get It em to return only the metadata item foo A subsequent call to AddKeyFilter for bar will cause Get Item to return both metadata items The key filter uses one or more of the following criteria key data value encoding and language country specification Key data filter will consider a metadata item to match when the data in the filter key charset encoding and filter key value fields are identical to the key charset encoding and key value respectively found in a metadata item in the media If the filter key charset encoding
56. define XA_MIDIBANK_CUSTOM 0x00000002 These values specify the MIDI instrument bank s used It is worth nothing that multiple soundbanks might be used to play content in a single MIDI file Value Description XA_MIDIBANK_DEVICE Used to indicate that only the default MIDI instrument bank s that are part of the implementation on the device are used XA_MIDIBANK_CUSTO Used to indicate that custom MIDI instrument bank s in addition to or instead of those specified by XA_MIDIBANK_DEVICE are used Includes Mobile DLS soundbanks Example This macro would be used for a MIDI stream from a Mobile XMF file that uses both the default MIDI instrument banks as well as Mobile DLS 9 2 42 XA _MIDI_UNKNOWN define XA MIDL UNKNOWN OxFFFFFFFF Value Description XA_MIDI_UNKNOWN Unknown value for MIDI stream attribute 9 2 43 XA_MILLIBEL define XA_MILLIBEL_MIN XAmillibel XA_MILLIBEL_MAX 10 define XA_MILLIBEL_MAX XAmillibel Ox7FFF Limit values for millibel units XA_MILLIBEL_MIN Minimum volume level This volume may be treated as silence in some implementations LIBEL 9 2 44 XA MILLIHERTZ MAX define XA_MILLIHERTZ_ MAX XAmilliHertz OxFFFFFFFF Limit value for milliHertz unit 9 2 45 XA MILLIMETER_MAX define XA_MILLIMETER_MAX XAmillimeter Ox7FFFFFFF Limit value for millimeter unit COpenMAX AL L 9 2 46 XA NODE PA
57. define XA_VIDEOLEVEL_VC1_HIGH XAuint32 0x00000003 define XA VIDEOLEVEL VC1 LO XAuint32 0x00000004 define XA VIDEOLEVEL VC1 L1 XAuint32 0x00000005 define XA VIDEOLEVEL VC1 L2 XAuint32 0x00000006 define XA VIDEOLEVEL VC1 L3 XAuint32 0x00000007 define XA VIDEOLEVEL VC1 L4 XAuint32 0x00000008 These macros are used for defining VC 1 video profiles and levels Value Description XA_VIDEOPROFILE_VC1_SIMPLE VC 1 Simple Profile XA_VIDEOPROFILE_VC1_MAIN VC 1 Main Profile XA_VIDEOPROFILE_VC1_ADVANCED VC 1 Advanced Profile XA_VIDEOLEVEL_VC1_LOW VC 1 Level Low XA_VIDEOLEVEL_VC1_MEDIUM VC 1 Level Medium XA VIDEOLEVEL VC1 HIGH VC 1 Level High VC 1 Level LO XA_VIDEOLEVEL_VC1_L1 VC 1 Level L1 XA_VIDEOLEVEL_VC1_L2 VC 1 Level L2 XA_VIDEOLEVEL_VC1_L3 VC 1 Level L3 XA_VIDEOLEVEL_VC1_L4 VC 1 Level L4 VP8 Profiles and Levels define XA_VIDEOPROFILE_VP8_ MAIN XAuint32 0x00000001 define XA_VIDEOLEVEL_VP8_ VERSIONO XAuint32 0x00000001 define XA_VIDEOLEVEL_VP8 VERSION1 XAuint32 0x00000002 define XA_VIDEOLEVEL_VP8_VERSION2 XAuint32 0x00000003 define XA_VIDEOLEVEL_VP8_ VERSION3 XAuint32 0x00000004 These macros are used for defining VP8 video profiles and levels VP8 Main Profile ERSIONO EOPROFILE_VP8_MAIN OL G VP8 Level Version 0 458
58. 0x00000011 define XA RESULT ENGINEOPTION UNSUPPORTED XAuint32 0x00000012 define XA RESULT SOURCE SINK INCOMPATIBLE XAuint32 0x00000013 The XA RESULT values are described Success Use of the method violates a pre condition not including invalid parameters The pre conditions are defined in the method specifications ECONDITIONS_VIOLATE _ RESULT_PARAME ER_INVALID An invalid parameter has been detected In case of parameters if the pointer passed by pointer such as the self parameters is corrupt an implementation s behavior is undefined However it is recommended that implementations at least check for NULL pointers XA_RE EMORY_FAILURE The method was unable to allocate or release memory XA_RE ESOURCE ERROR Operation failed due to a lack of resources usually a result of object realization 447 Ein Operation ignored since object is in Unrealized or Suspended state ERROR Failure due to an I O error file or other I O device ER_INSUFFICIEN One or more of the buffers passed to the method is too small to service the request __CORRUPTI Failure due to corrupted content also applies for malformed MIDI messages sent programmatically __UNSUPPORTI Failure due to an unsupported content format such as unsupported codec _NOT_FOUND Failed to retrieve content for example file not found RMISSION_D
59. COpenMAX AL 7 6 Metadata Extractor Object Description This object can be used for reading metadata without allocating resources for media playback Using this object is recommended particularly when the application is interested only in presenting metadata without playing the content and when it wants to present metadata of multiple files The latter is particularly interesting for generation of playlists for presentation purposes because a media player would unnecessarily allocate playback resources Furthermore players cannot change their data source dynamically therefore for metadata extraction from multiple files the application needs to create and destroy player objects many times which is both inefficient and may result in fragmentation of the heap PROFILE NOTES Creation of objects of this type is mandated in all profiles Mandated Interfaces XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding dynamic interfaces see section 3 1 6 to the object This interface is an implicit interface on this object XADynamicSourceltf see section 8 11 This interface is deprecated Use XADynamicSourceSinkChangeltf see section8 12 instead This interface exposes controls for changing the data source during the lifetime of the object to be able to read metadata
60. COpenMAX AL i Available v Optional interface Not available Not mandated dynamic Key Interface is exposed subject to resource constraints a Interface is not exposed Interface maybe exposed implementation dependant subject to resource constraints 3 1 7 The XADynamicinterfaceManagementltf Interface The XADynamicInterfaceManagementItf interface provides methods for handling interface exposure on an object after the creation and realization of the object The XADynamicInterfaceManagementItf itself is an implicit interface on all object types The dynamic nature of an interface is unrelated to it being optional or mandated for an object An interface that is mandated as dynamic can actually be realized both at object creation time as well as dynamically at any point in the object s lifetime using the XADynamicInterfaceManagement It f Interfaces that represent a significant resource drain if realized on object creation but that are never used are prime candidates for dynamic interfaces By making them dynamic the application developer can use them only when needed often resulting in significant resource optimization Dynamic interfaces are explicitly called out in the Mandated Interfaces sections of the corresponding objects in section 7 Although this interface provides a method for requesting the acquisition of an additional interface namely AddInterface the implementation may deny th
61. CheckErr res res player gt GetInterface player amp XA_IID_ACME DISTORTION void amp distortionItf if XA_RESULT_FEATURE_UNSUPPORTED res supported false else CheckErr res supported true continue using the player normally whether the extension is supported or not ees player SCeclmcerirace player A AUD IP IWAWBACK void amp playbackItf CheckErr res COpenMAX AL s whenever calling an extension s method vean ic witha a condition if supported employ one of the interface s methods res distortionItf gt SetDistortionGain distortionItf Checkin sels ee VODE gt ypenMAX AL 26 4 Functional Overview 4 1 Object Overview OpenMAX AL represents entities in its architecture as objects including Engine Object Media Objects Metadata Extractor Object Audio Output Mix Objects Camera Objects LED Array Objects Radio Objects Vibration Control Objects The following sections provide an overview of each of these 4 1 1 Engine Object The engine object is the entry point to the OpenMAX AL API This object enables you to create all the other objects used in OpenMAX AL The engine object is special in the sense that it is created using a global function xaCreateEngine see section 6 1 The result of the creation process is the XAOb ject It f interface
62. For example a line out jack would not be a suitable for telephony downlink audio minSampleRate Minimum sampling rate supported maxSampleRate Maximum sampling rate supported isFreqRangeContinuous Returns XA_BOOLEAN_TRUE if the output device supports a continuous range of sampling rates between minSampleRate and maxSampleRate otherwise returns XA_BOOLEAN_FALSE pSamplingRatesSupported Indexed array containing the supported sampling rates as defined in the XA_SAMPLINGRATE macros Ignored if isFreqRangeContinuous is XA_BOOLEAN_TRUE numOfSamplingRatesSupported Size of the samplingRatesSupported array Ignored if isFreqRangeContinuous is XA_BOOLEAN_TRUE COpenMAX AL j Maximum number of channels supported for mono devices value would be 1 The table below shows examples of the first six fields of the XAAUdioOutputDescriptor struct for various audio output devices For the sake of brevity and clarity the full names of the XA DI abbreviated to include just the distinct portion of the names such as XA DI EVCONNI EV macros have been ECTION_INTEGRATI ED appears as INTEGRATED and XA_DEVSCOPE_USER as USER Table 16 Examples of Audio Output Devices deviceName Device device device isFor Connection Scope Location Telephony Earpiece INTEGRATED USER HANDSET TRUE Loudspeaker INTEGRATED ENVIRON HANDSET TRUE ME
63. Methods RegisterMetadataCallback XAresult RegisterMetadataCallback XAMetadataMessagelItf self xaMetadataCallback callback void pContext Description Sets or clears the player s metadata callback Parameters self in Interface self reference callback in Address of the metadata callback pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Seealso xaMetadataCallback COpenMAX AL i 8 24 XAMetadataTraversalltf Description The XAMetadataTraversalItf interface is used in order to support advanced metadata extraction It allows developers to traverse a file using a variety of modes which determine how to traverse the metadata and define how the methods within the interface behave The interface provides the ability to set the traversal mode to determine how many child nodes exist within a given scope and what their type is and to set the scope This interface is a mandated interface of Media Player objects see section 7 4 and implicit on Metadata Extractor see section 7 6 objects Dynamic Interface Addition If this interface is added dynamically using XADynamicInterfaceManagement It f the set of exposed metadata nodes might be limited compared to the set of exposed nodes had this
64. RA ONDITIONS_VIOLAT ETER_INVALID ESUL ESO URCE_LOST ESUL ROL_LOST 337 GetFrequency XAresult GetFrequency XAVibraItf self XAmilliHertz pFrequency Returns the vibration frequency of the I O device Pre conditions The Vibra I O device must support setting intensity per XAVibraDescriptor supportsFrequency pFrequency out Address to store the vibration frequency Range is XAVibraDescriptor minFrequency XAVibraDescriptor maxFrequency Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PRECONDITIONS_VIOLAT XA_RESULT_PARAMETER_INVALID SetIntensity XAresult SetIntensity XAVibraItf self XApermille intensity Sets the vibration intensity of the Vibra I O device Pre conditions The Vibra I O device must support setting intensity per XAVibraDescriptor supportsIntensity Parameters self Pointer to a XAVibralItf interface Intensity of vibration Range is 0 1000 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PRECONDITIONS_VIOLATI XA_RESULT_PARAMETER_INVALID XA_RESULT_CONTROL_LOST MypenMAX AL i GetIntensity XAresult GetIntensity const XAVibraItf self XApermille pIntensity Returns the vibration intensity of the
65. Red 22 15 Green 14 7 and Blue 6 0 XA_COLORFORMAT_25BITARGB1888 25 bits per pixel ARGB format with colors stored as Alpha 24 Red 23 16 Green 15 8 and Blue 7 0 XA_COLORFORMAT_32BITBGRA8888 32 bits per pixel ARGB format with colors stored as Alpha 31 24 Red 23 16 Green 15 8 and Blue 7 0 XA_COLORFORMAT_32BITARGB8888 24 bits per pixel ABGR format with colors stored as Alpha 31 24 Blue 23 16 Green 15 8 and Red 7 0 XA_COLORFORMAT_YUV411PLANAR YUV planar format organized with three separate planes for each color component namely Y U and V U and V pixels are sub sampled by a factor of four both horizontally and vertically XA_COLORFORMAT_YUV420PLANAR YUV planar format organized with three separate planes for each color component namely Y U and V U and V pixels are sub sampled by a factor of two both horizontally and vertically XA_COLORFORMAT_YUV420SEMIPLANAR YUV planar format organized with a first plane containing Y pixels and a second plane containing interleaved U and V pixels U and V pixels are sub sampled by a factor of two both horizontally and vertically XA_COLORFORMAT_YUV422PLANAR YUV planar format organized with three separate planes for each color component namely Y U and V XA_COLORFORMAT_YUV422SEMIPLANAR YUV planar format organized with a first plane containing Y pixels and a second plane containing interleaved U and V pixels XA_COLORFORMAT_YCBYCR 16 bits pe
66. Snapshots can be stored to a file system specified by the XADat aSink parameter of the InitiateSnapshot method or if the XADat aSink specified is NULL the application gets the image data directly as a memory buffer via the xaSnapshot TakenCallback callback This direct passing of the memory buffer is not supported with burst shooting Please see the documentation of the methods below for details This is a mandated interface of Media Recorder objects see section 7 5 See section D 5 for an example using this interface Call Sequence The following is the typical call sequence for taking a photo 1 Set up e XAImageEncoderItf SetImageSettings for choosing the codec and the resolution e XACameraltf SetAutoLocks self 0 free all locks e XACameraltf use various methods to set up flash zoom exposure focus white balance etc 2 Memory allocation e xXASnapshotItf InitiateSnapshot gt xaSnapshotInitiatedCallback 3 Halfway press for locking the automatic settings that can be locked pre exposure e XACameraltf SetAutoLocks self XA_CAMERA_AUTO_LOCK_FOCUS XA_CAMERA_AUTO_LOCK_EXPOSURE an example to lock auto focus and auto exposure T xaCameraCallback context XA CAMERACBEVENT FOCUSSTATUS XA CAMERA FOCUSMODESTATUS_REACHED i gt xaCameraCallback context XA_CAMERACBEVENT_EXPOSURESTATUS XA_CAMERA_AUTOEXPOSURESTATUS_SUCCESS
67. TERROR REPORTING asiss agsean saiseas sosa sas ganess neiasneaig sas REENE EaR TEENA EERSTE EEA TEN AEE ENEEK ENE EEEE EEEL SERNA 22 3 5 MEMORY MANAGEMENT 52563 2cseeecesticaccssuscoseouto ELEA AER ER O E AEE E R EAE A Eana RAEE EES NE asi nasc 22 IAL Generalean a E E E E EE E E EE EE 22 IIEL Parameters sne ses vc tants saateyes catesecstensscssavsvecscemses si suasseseaheasPwexestes sceaeuecdye etsyssdertetentesstubvelecstensieesnapeaewenstcts 22 3 9 2 COLD ACKS sea a aa ia E E EA A Ea E vedanta RE EEE E SR 23 33 3 EXCephOnS os oein a E EE N EE EEE N N EA NE ES AEA E NEN ee 23 36 EXTENSIBILITY P E EE 23 IOL Principles eieiei nn EEE ENEN EEE EE EEEN E EE ENE EENE 23 3 6 2 Permitted Modifications to Physical Code esccescesseesseesseeseeeeceeeeesecesecesceseensecesecaecaecauecseeeseeeeeeenaes 23 3 6 3 Extending Supported Interface Types ccccccsccescesecsseesseeseeseeeseeseceeeeseceeeeeeeeseceaecsaecsaecaaecaaeeaeeeasennees 23 3 6 4 Extending Supported Object TyPes siisicssscsseissesionssonssontesssieseosvesseetsoscegunssrcaadesssisrossvsapuctonsiuntveaeanndeaseas 24 3 6 5 Extending Method Parameter RANGES scccsccesccesecsseesseesseeeeeescesecesecesecueceeeeesecaecaecaecsecsaeeaeeesseenees 24 360 6 RESUIE COES is snaa a a E E A AE E qed aaae E SE ESE E a ER 24 30 7 Data LOCatOTS cnisa a A NEE E E E E E E E EE aa 24 3 6 8 Interface ID Allocation Scheme siiin iape a E E aR aos 25 3 6 9 Avoiding Naming Collisions
68. This interface exposes methods for navigating through metadata This interface is a mandated interface on this object This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces ypenMAX AL i XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding interfaces to the object after creation This interface is an implicit interface on this object XAVolumeltf see section 8 42 This interface exposes volume related controls This interface is a mandated interface on this object for media containing audio XAStreaminformation see section 8 35 This interface exposes stream property interface and selection This interface is a mandated interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor specific manner XADynamicSourceltf see section 8 11 This interface is deprecated Use XADynamicSourceSinkChangelItf see section 8 12 instead This interface enables changing the data source of the player post creation XADynamicSourceSinkChangeltf see section 8 12 Thisinterface enables changing the data source or the data snk of the object post creation XAEqualizerltf see section 8 14 Th
69. XA RESULT MEMORY EFAILURE Comments If the engine fails to create the object due to lack of memory or resources it will return the XA RESULT MEMORY FAILURE or the XA_RESULT_RESOURCE_ERROR error respectively Output Mix Object see section 7 7 ypenMAX AL 5 CreateMetadataExtractor XAresult CreateMetadataExtractor XAEngineltf self XAObjectItf pMetadataExtractor const XADataSource pDataSource XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired Creates a Metadata Extractor object numInterfaces in Number of interfaces that the object is requested to support not including implicit interfaces pinterfacelds piInterfaceRequired in Array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code pMetadataExtractor out Newly created metadata extractor object pDataSource in Pointer to the structure specifying the media data source such as a media file Only local data sources are mandated to be supported Must be non NULL in Array of numInterfaces interface IDs which the object should support This parameter is ignored if numInterfaces is zero XA RESULT FEATURE UNSUPPORTED will be th
70. XAAudioIODeviceCapabilitiesIt self XAuint32 deviceID XAint32 pNumAudioInputs XAuint32 pAudioInputDeviceIDs This method returns an array of audio input devices physically associated with this audio I O device Parameters self Interface self reference ID of the input or output device pNumAudiolInputs in out As an input specifies the length of the pAudioInputDevicelDs array ignored if pAudioInputDevicelDs is NULL As an output specifies the number of audio input device IDs associated with devicelID Returns zero if there is no such association pAudiolInputDevicelDs out Array of audio input device IDs Should be ignored if pNumAudiolInputs is zero that is if there are no associated audio inputs This parameter is populated by the call with the array of input device IDs provided that pNumInput s is equal to or greater than the number of actual input device IDs Return value The return value can be one of the following XA_RESULT_SUCC XA_RESULT_PARAMETER_INVALID XA_RESULT_BUFFER_INSUFFICIENT XA RESULT IO ERROR Comments This method can be called on both audio input and audio output devices It is useful for determining coupling of audio inputs and outputs on certain types of accessories For example it is helpful to know that microphone 01 is actually part of the same Bluetooth headset as speaker 03 Also many car kits have multiple speakers and multiple microphones Hence the need for an array
71. XAmillisecond mSec Sets the position of the playback marker Parameters se1 self tin in Interface self reference a ii Position of the marker expressed in milliseconds and relative to the beginning of mi content Return value uil return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID Comments The player will notify the application when the playback head passes through the marker via a callback with a XA_PLAYEVENT_HEADATMARKER event By default there is no marker position defined When a marker position coincides with a periodic position update as specified by SetPositionUpdatePeriod then both the marker position callback and the periodic position update callback shall be posted next to each other The order of the two callbacks is insignificant ClearMarkerPosition SetPositionUpdatePeriod ClearMarkerPosition XAresult ClearMarkerPosition XAPlayItf self Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID This function succeeds even if the marker is already clear SetMarkerPosition ypenMAX AL GetMarkerPosition XAresult GetMarkerPosition XAPlayIt self XAmillisecond pMsec Oueries the position of playback marker Pre conditions A marker has been set using SetMarkerPosition with n
72. XAresult GetProgrammeType XARDSItf self XAuint32 pPty Description Gets the current Programme TYpe PTY as short The return value zero corresponds to No Programme Type or to undefined type Please note that PTYs in RBDS differ from the ones in RDS Parameters Interface self reference pPty out Programme TYpe or zero XA_RDSPTYNONE or XA_RBDSPTYNONE for undefined type Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetProgrammeTypeString XAresult GetProgrammeTypeString XARDSItf self XAboolean isLengthMax16 XAchar pPty Description Gets the current Programme TYpe PTY as a String with the maximum of 8 or 16 characters in English char set TBD as defined in RDS and RBDS specifications Please note that PTYs in RBDS differ from the ones in RDS Parameters Interface self reference isLengthMax16 in True for the maximum length of 16 characters false for the maximum length of 8 characters pty out Programme TYpe or None for an undefined type The application needs to pass here an array of length 17 or 33 depending on the isLengthMax16 parameter since each character used in RDS can take two UTF 8 encoded words and the string is null terminated Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALID
73. on the same display e Window Corresponds to the window within the display A window may be sized to encompass the entire display and yet it is considered an independent entity for instance a fullsize window may be later sized down to a region less than the entire display or have other windows on top of or behind it The window is provided by the native windowing manager in the form of a native handle All interaction with this entity is handled exclusively via native interfaces using the native handle not via the OpenMAX AL Multiple media objects may operate on the same window e Region Corresponds to the area within the native window where the media object presents its output This may include the entire window area or be some subset of the window area The region is specific to a particular media object COpenMAX AL i Display Region Window Figure 5 Display with windowed rendering Display Region Figure 6 Display with full screen rendering The native display handle and the native window handle associated with an AL media object are of type XA_DATALOCATOR_NATIVEDISPLAY and reside in the data sink structure Together these handles provide media objects the hooks necessary to interact with the native windowing manager Note that OpenMAX AL does not presently standardize the interaction with the native windowing manager but assumes this communication will take place via platform specific interfaces ypenMAX AL i 4 7 Open
74. pKey gt encoding XA_CHARACTERENCODING_ASCII strepy char pKey gt langCountry en us strcepy char pKey gt data KhronosTitle pValue XAMetadataInfo malloc sizeof XAMetadataInfo 31 sizeof XAchar pValue gt size 32 pValue gt encoding XA_CHARACTERENCODING_ASCII Sercpy Char a oO Vicliic sci Oliinitatay eae Meat Stu iy strcpy char pValue gt data This is the title of the image res metadataInsertionItf gt InsertMetadataItem metadataInsertionItf XA_ROOT_NODE_ID pKey pValue XA_BOOLEAN_TRUI CheckErr res Ira lt Initiate shooting res snapshotItf gt InitiateSnapshot snapshotItf 1 1 XA_BOOLEAN_TRUE amp fileSink SnapshotInitiatedCallback SnapshotTakenCallback NULL CheckErr res sem_wait amp semCamInit FOCUSING halfway press of the trigger Lock the auto focus Assumes that LOCK_AUTOFOCUS is supported Real application should check it first using GetSupportedAutoLocks in XACameraCapabilitiesItf res cameralItf gt SetAutoLocks cameraltf XA_CAMERA_LOCK_AUTOFOCUS CheckErr res sem_wait amp semFocus COpenMAX AL HR TAKE THE PICTURE res snapshotItf gt TakeSnapshot snapshotiItf CheckErr res sem_wait amp semCamInit The picture should be now in the directory specified by the fileSink UNFREEZE TH
75. see section 8 24 of the engine object The implementation is not required to support the creation of more than one engine at a given time The engine object can have two different modes of operation thread safe mode and non thread safe mode The application specifies the mode of operation upon engine object creation See section 3 2 for details The engine object shall expose the XAThreadSyncIt f interface see section 8 35 to enable synchronization between the API s callback contexts and the application contexts After creation of the engine object most of the work will be done with the XAEngineIt f interface see section8 13 exposed by this object An additional functionality of the engine object is querying implementation specific capabilities This includes the encoder and decoder capabilities of the system The OpenMAX AL API gives implementations some freedom regarding their capabilities and these capabilities may even change according to runtime conditions For this reason during runtime the application may query the actual capabilities However this specification defines a minimum set of capabilities expressed as a set of use cases that shall be supported on every implementation according to the profiles that are implemented These use cases are described in detail in section 4 7 The engine object represents the system s various multimedia related devices via unique device IDs It supports the enumeration of audio input au
76. sometimes called also as AF Servo continually adjusts the focus as long as the mode is active When this mode is selected use XACameraltf SetAutoLocks with parameter XA_CAMERA_LOCK_AUTOFOCUS to activate the continuous focusing The continuous focusing deactivates once XA_CAMERA_LOCK_AUTOFOCUS bit is cleared XA_CAMERA_FOCUSMODE_CONTINUOUS_CENTROID Continuous centroid focus mode It is to be noted that not all cameras will be able to provide focus status events in continuous focusing mode But this feature is quite useful for those cameras that do have this capability ypenMAX AL 7 9 2 14 XA CAMERA FOCUSMODESTATUS define XA CAMERA FOCUSMODESTATUS_OFF XAuint32 0x00000001 define XA CAMERA FOCUSMODESTATUS_REQUEST XAuint32 0x00000002 define XA CAMERA FOCUSMODESTATUS_REACHED XAuint32 0x00000003 define XA CAMERA FOCUSMODESTATUS UNABLETOREACH XAuint32 0x00000004 define XA_CAMERA FOCUSMODESTATUS_LOST XAuint32 0x00000005 These values are used to set camera focus mode Value Description XA_CAMERA_FOCUSMODESTATUS_OFE Manual focus mode is in use focus status is not available XA_CAMERA_FOCUSMODESTATUS_REQUES Focus request is in progress XA_CAMERA_FOCUSMODESTATUS_REACHED Focus has been reached XA_CAMERA_FOCUSMODESTATUS_UNABLETOREACH Unable to achieve focus XA_CAMERA_FOCUSM
77. ypenMAX AL 320 ReleaseBuffer XAresult ReleaseBuffers XASnapshotItf self const XADataSink pImage Parameters Interface self reference Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID xaSnapshotTakenCallback GetMaxPicsPerBurst XAresult GetMaxPicsPerBurst XASnapshotItf self XAuint32 pMaxNumberOfPictures This method tells how many pictures it is possible to be taken during single burst pMaxNumberOfPictures i Maximum number of pictures that the device supports to be taken in a single burst Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID MypenMAX AL GetBurstFPSRange XAresult GetBurstFPSRange XASnapshotItf self XAuint32 pMinFPS XAuint32 pMaxFPS Description This method tells the range of shooting rates possible in burst shooting mode Please note that these rates might be different depending on which encoder and which resolution has been chosen not all the rates can necessarily be reached with every resolution or encoder Parameters in Interface self reference Minimum rate supported in frames per second pMaxFPS out Maximum rate supported in frames per second This is zero if burst mode is not supported by the device Return value The return value can be one of
78. ypenMAX AL GetProgrammeldentificationCode XAresult GetProgrammeIdentificationCode XARDSItf self XAint16 pPIcode Description Gets the current Programme Identification code PI The PI is not intended for directly displaying to the end user but instead to identify uniquely a programme This can be used to detect that two frequencies are transmitting the same programme Parameters Interface self reference pPIcode Programme Identification code or zero for an undefined PI code Return value The return value can be the following XA_RESUL XA_RESUL GetClockTime SUCC ESS PARA XAresult GetClockTime XARDSItf self ETER_INVALID XAtime pDateAndTime Return value The return value can be one of the following XA RESUL SUCC XA_RESUL PARA ESS ETER_INVALID ypenMAX AL 291 GetTrafficAnnouncement XAresult GetTrafficAnnouncement XARDSItf self XAboolean pTa Return value The return value can be the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID GetTrafficProgramme XAresult GetTrafficProgramme XARDSItf self XAboolean pTp Return value ES return ES can be the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID COpenMAX AL i SeekByProgrammeType XAresult SeekB
79. ypenMAX AL i GetVideoDecoderCapabilities XAresult GetVideoDecoderCapabilities XAVideoDecoderCapabilitiesIt self XAuint32 decoderId XAuint32 pIndex XAVideoCodecDescriptor pDescriptor Parameters Interface self reference Specifies video decoder Refer to XA VIDEOCODEC macros pIndex in out If pDescriptor is NULL pIndex returns the number of video decoders capability descriptions Each decoder must support at least one profile mode pair and therefore have at least one Codec Descriptor If pDescriptor is non NULL pIndex is a incrementing value used to enumerate capability descriptions Supported index range is 0 to N 1 where N is the number of video decoders capability descriptions Structure defining the capabilities of the video decoder Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL N 8 39 XAVideoEncoderltf Description This interface is used to set the parameters to be used by an video encoder This interface is a mandated interface of Media Recorder objects see section 7 5 Prototype XA API extern const XAInterfaceID XA IID VIDEOENCODER struct XAVideoEncoderItf_ typedef const struct XAVideoEncoderItf_ const XAVideoEncoderItf struct XAVideoEncoderItf_ XAresult SetVideoSettings XAVideoEncoderItf self XAVideoSettings pSettings XAresult GetVide
80. 1 4 is fundamentally required on every object so it is designated as implicit on all object types that is the application never needs to explicitly request that it be exposed on any object COpenMAX AL Every object type also defines a set of interfaces that are available on objects of this type but will not be exposed by an object unless explicitly requested by the application during the object s creation These explicitly requested interfaces are called explicit interfaces Finally every object type also defines a set of interfaces that may be added and removed by the application during the object s lifetime These types of interfaces are called dynamic interfaces and they are managed by a dedicated interface called XADynamicInterfaceManagementIt f see section 8 10 which enables this dynamic binding Attempts to dynamically add or remove implicit interfaces on an object will fail The set of explicit and dynamic interfaces for a given object type may vary between implementations see section 3 5 However for a given profile each object type has a set of mandated explicit interfaces and a set of mandated dynamic interfaces that shall be supported by every implementation When an application requests explicit interfaces during object creation it can flag any interface as required If an implementation is unable to satify the request for an interface that is not flagged as required this will not cause the object to fail creation
81. 32 bit LlocatorType field which identifies the locator type see XA_DATALOCATOR definitions and hence the structure pointed to Note The available XA_DATALOCATOR definitions may be extended through an API extension pFormat A pointer to the specified format structure This may point to any of the following structures XADataFormat_PCM Deprecated XADataFormat_PCM_EX XADataFormat_MIME XADataFormat_RawImage The first field of each of these structures includes the 32 bit format Type field which identifies the format type XA_DATAFORMAT definitions and hence the structure pointed to pFormat is ignored if pLocator is XADataLocator_IODevice COpenMAX AL 9 1 21 XAEngineOption typedef struct XAEngineOption XAuint32 feature XAuint32 data XAEngineOption Structure used for specifying different options during engine creation Feature identifier See XA_ENGINEOPTION macros Value to use for feature 9 1 22 XAFocusPointPosition typedef struct XAFocusPointPosition_ XAuint32 left XAuint32 top XAuint32 width XAuint32 height XAFocusPointPosition This structure is used to specify the camera focus region point position and size The height of the focus point 9 1 23 XAHSL typedef struct XAHSL_ XAmillidegree hue XApermille saturation XApermille lightness XAHSL XAHSL represents a color defined in terms of the HSL color space Hue Range is 0 360000 in millidegr
82. AL Interface ID b3 16ad80 df05 1 1db b5b6 0002a5d5c51b Defaults No callback registered Callbacks xaRadioCallback typedef void XAAPIENTRY xaRadioCallback XARadioItf caller void pContext XAuint32 event XAuint32 eventIntData XAboolean eventBooleanData Description Notifies the application about radio event Parameters in Interface on which this callback was registered in User context data that is supplied when the callback method is registered in One of the radio event codes see section 9 2 58 XA_RADIO_ macros eventIntData in Event specific integer parameter Specifies additional notification callback event specific information The contents of this parameter are dependent on the event being reported See section 9 2 58 XA_RADIO_EVENT macros eventBooleanData Event specific Boolean argument Specifies additional notification callback event specific information The contents of this parameter are dependent on the event being reported See section 9 2 58 XA_RADIO_EVENT macros Comments None ypenMAX AL Methods SetFreqRange XAresult SetFreqRange XARadioItf self XAuint8 range EVENT FRE DUENCY RANGE CHANGED or EVEN FRE QUENCY_RANGE_ERROR events used for notification of the result Description Sets the frequency range Asynchronous xaRadioCall
83. Defaults A recorder defaults to the XA_RECORDSTATE_STOPPED state with no marker no duration limit and an update period of 1000 milliseconds there are no markers set nor callbacks registered and the callback event flags are cleared Callbacks xaRecordCallback typedef void XAAPIENTRY xaRecordCallback XARecordItf caller void pContext XAuint32 event Notifies the recorder application of a recording event Parameters Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered in Event that has occurred see XA_RECORDEVENT macro Comments None RegisterCallback ypenMAX AL Methods SetRecordState XAresult SetRecordState XARecordItf self XAuint32 state Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID All state transitions are legal GetRecordState XAresult GetRecordState XARecordItf self XAuint32 pState Gets the recorder s current record state Parameters Interface self reference pState out Pointer to a location to receive the current record state of the recorder This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID COpenMAX AL SetDura
84. E A ae ER E A ES 379 9 1 20 AAD Q1AS ource kirosin ei ee E A E E E RETE 380 9 1 21 XAEnemeOpnOn s aeieea aa gab BAS R gh SG HEASH AS DHAG SN ace E Cho BAS AG SAN Sin ae 381 9 1 22 AAFOCUSPOINLP OSUHON sis saccasccdinstiessi cack sacecitenvieatevsvan chatebes ch cbadiesidtestacdouetesdbeveviestanedbndasbasbesdieedsecdss 38 9 1 23 XAHS D gesstis sia sat sutes sxsestss sssvectensvs pth seset duevs see tu cue chin tove cvestougewe suisvueus sete tian rae SSN GIS Ga Na dearest cuore daunedes 381 COpenMAX AL i 9 1 24 XAIMASECOdECDESCHIPIOR ois sscssetssaiinassnniesadesssssesesnsapedssoiieantenscesbssscerdeesondsoadiparaente pedesbispessensagedeso 382 9 1 25 XAIMAGES CUMIN GS nsiro i neiaa eA NEEE EEEE NERES E EE ENN A OTS 382 9 1 26 XAlmageStreamInform ti n isicesoesissessescdeesenseisacaecotensvontinbszanedaishartapasascssoivonsimananaa des EF EERE 382 9 1 27 XAInterface lD srai e E EEA E AE E A E 384 9 1 28 XALEDDescript t svison ina E E E EE A E T 384 9 1 29 XAMediaContainer Information siinseist ienes EEEE ES 384 9 1 30 XAMet dat Info esros inna E EOE R E 385 9 1 31 XAMIDIStrCGMINJOMATION cccccsiveaveriensieesscussvessevesteabsvssscabecetsesnsessbeteeceavvansveasebberbesessgusotebbetbaveass 385 9 1 32 XANa tiveHandle vrsiti cute bezenseibavenotagedeens pasa sits E REEE EE ER E A NEEE EEE AniS 386 9 1 33 MA RECION GIO ioeo oaa EEE E chisieve E EE a sung tous A E KEE R E manna 386 9 1 34 XATimedTextStreamInfOrmation ccccccccccsccesecssecs
85. Initially the object is in the off state Default frequency and intensity are undefined Methods Vibrate XAresult Vibrate XAVibraItf self XAboolean vibrate Activates or deactivates vibration for the I O device Pointer to a XAVibralIt f interface in Boolean indicating whether to vibrate Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_IO_ERROR XA_RESULT_CONTROL_LOST COpenMAX AL IsVibrating XAresult IsVibrating XAVibraItf self XAboolean pVibrating Returns whether the I O device is vibrating in Pointer to a XAVibralIt f interface pVibrating out Address to store a Boolean indicating whether the I O device is vibrating T SUCCESS Return value The return value can be one of the following XA_RESUL XA RESULT PARAMETER INVALID SetFrequency XAresult SetFrequency XAVibraItf self XAmilliHertz frequency Sets the vibration freguency of the I O device Pre conditions The Vibra I O device must support setting intensity per XAVibraDescriptor supportsFrequency Return value The return value can be one of the following XA_R XA_R XA_R XA_R XA_R Pointer to a XAVibralt f interface Frequency of vibration Range is XAVibraDescriptor minFrequency XAVibraDescriptor maxFrequency ESUL UCC ESS ESUL REC ESUL
86. Interface self reference callback in Callback function invoked when one of the specified events occurs A NULL value indicates that there is no callback pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetCallbackEventsMask XAresult SetCallbackEventsMask XARecordItf self XAuint32 eventFlags Sets the notification state of record events Parameters Interface self reference eventFlags in Combination record event flags indicating which callback events are enabled See XA_RECORDEVENT macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID The callback event flags default to all flags cleared MypenMAX AL i GetCallbackEventsMask XAresult GetCallbackEventsMask XARecordIiItf self XAuint32 pEventFlags Oueries the notification state of record events self in Interface self reference pEventFlags out Pointer to a location to receive the combination of record event flags indicating which callback events are enabled This must be non NULL See XA_RECORDEVENT macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID
87. On the other hand if the interface is flagged as required and the implementation is unable to satisfy the request for the interface the object will not be created The following table summarizes whether an object is created and an interface is exposed according to how the specification relates their types and how the application designates the interface at the object s creation Table 5 Interface Exposure Rules During Object Creation Determined by the application Interface requested by application mitertacenat Interface marked as Interface not marked as requested by required required application Implicit Mandated interface me ee ve ee A Optional interface Not y available Object is created and interface is exposed subject to resource constraints x Object is created but interface is not exposed Determined by specification implementation amp Key Object is not created and interface is not exposed The next table summarizes whether interface is exposed on an object when the application requests to add the interface dynamically according to whether the specification mandates support for the interface on the object type and whether this support is mandated dynamically or not Table 6 Interface Exposure Rules for Dynamic Adding of Interfaces Determined by application Application dynamically adds interface Mandated Mandated interface vA impl emen tatio
88. PLAYER Set arrays required and iidArray for no interfaces ie slimyoula ialie required 0 XA_BOOLEAN_FALSE iidArray 0 XA_IID_NULL Create the music player res EnginelItf gt CreateMediaPlayer EnginelItf amp player amp audioSource NULL amp audioSink NULL NULL NULL 0 iidArray required CheckErr res Realizing the player in synchronous mode res player gt Realize player XA_BOOLEAN_FALSE Check i f Get the play interac res player gt GetInterface player XA_IID_PLAY void amp playItf CheckErr res fe Sige wy Err res ypenMAX AL 479 Before we start set volume to 3dB 300mB res volumelItf gt SetVolumeLevel volumeItf 300 CheckErr res Set up the radio frequency range res radioltf gt IsFreqRangeSupported radioItf XA_FREQRANGE FMEUROAMERICA amp sSupported CheckErr res if supported res radioltf gt GetFreqRangeProperties radioltf XA_FREQRANGE_FMEUROAMERICA amp minFreg amp maxFreq amp freqinterval CheckErr res res radioItf gt SetFreqRange radioItf XA_FREQRANGE_FMEUROAMERICA CheckErr res else res radioI tf gt IsFreqRangeSupported radioItf XA_FREQRANGE_FMJAPAN amp supported CheckErr res if supported res radioltf gt GetFreqRangeProperties radiolItf XA_FREQRANGE_FMJAPAN am
89. PLAYER XA_PROFILES_PLUS_MIDT and XA_PROFILES MEDIA PLAYER XA_PROFILES_ MEDIA PLAYER _RECORDE XA_PROFILES_PLUS_MIDT ypenMAX AL QueryNumSupportedInterfaces XAresult QueryNumSupportedInterfaces XAEngineltf self XAuint32 objectID XAuint32 pNumSupportedinterfaces Oueries the number of supported interfaces available objectID i ID of the object being gueried Refer to XA_OBJECTID type If the engine does not support the identified object this method will return XA_RESULT_FEATURE_UNSUPPORTED pNumSupportedInterfaces Identifies the number of supported interfaces available Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The number of supported interfaces will include both mandated and optional interfaces available for the object This method can be used to determine whether or not an object is supported by an implementation by examining the return value QuerySupportediInteraces ypenMAX AL QuerySupportedInterfaces XAresult QuerySupportedInterfaces XAEngineltf self XAuint32 objectID XAuint32 index XAInterfaceID pInterfaceId Oueries the supported interfaces Parameters Interface self reference objectID in ID of the object being queried Refer to XA_OBJECTID type If
90. Radio I O Device Description This object represents an radio tuner and maybe used by media objects as a data source See section D 3 for an example using this object PROFILE NOTES This object is a standardized extension and consequently optional in all profiles Mandated Interfaces XARadioltf see section 8 30 This interface exposes control over the basic tuning related functionality This interface is also used for switching the radio on or off This interface is an implicit interface on this object XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding interfaces to the object after creation This interface is an implicit interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor specific manner XARDSItf see section 8 31 This interface exposes Radio Data System functionality ypenMAX AL i 7 9 Vibra I O Device Description The Vibra I O device object controls device vibration Its functionality is limited to activate deactivate the vibration function of the device as well as setting its frequency and intensity if supported PROFILE NOTES This object is a standardized extension and consequently optional
91. This may be used to indicate the required calling conventions for global functions 9 2 3 XA_AUDIOCODEC define XA_AUDIOCODEC_PCM XAuint32 0x00000001 define XA _AUDIOCODEC_MP3 XAuint32 0x00000002 define XA_AUDIOCODEC_AMR XAuint32 0x00000003 define XA_AUDIOCODEC_AMRWB XAuint32 0x00000004 define XA_AUDIOCODEC_AMRWBPLUS XAuint32 0x00000005 define XA_AUDIOCODEC_AAC XAuint32 0x00000006 define XA_AUDIOCODEC_WMA XAuint32 0x00000007 define XA AUDIOCODEC REAL XAuint32 0x00000008 define XA _AUDIOCODEC_VORBIS XAuint32 0x00000009 These macros are used for setting the audio encoding type XA_AUDIOCOD XA_AUDIOCODEC_AMRWBP LUS Adaptive Multi Rate Wideband Extended AMR WB speech encoder EC_AAC MPEG4 Advanced Audio Coding EC_WMA Windows Media Audio BAL Real Audio EC_VORBIS Vorbis Audio XA_AUDIOCOD 9 2 4 XA_AUDIOPROFILE and XA_AUDIOMODE define XA_ AUDIOSTREAMFORMAT UNDEFINED XAuint32 0x00000000 ypenMAX AL i XA_AUDIOSTRI RAMFORMAT UNDE PCM Profiles and Modes define XA_AUDIOPROFILE_PCM The macros are used for defining the PCM audio profiles XA_AUDIOPRO XAuint32 0x00000001 The codec does not have a stream format FILE Default Profile for PCM encoded Audio MP3 Profiles and Modes define XA _AUDIOPROFILE MPEG1_L3 XAuint32 0x00000001 define XA _AUDIOPROFILE MPEG2_L3 XAuint32 0x00000002 define
92. Typographic Conventions This document uses the following conventions Table 2 Format and Typographic Conventions Sample code API parameter specifications COpenMAX AL 1 7 Acknowledgements The OpenMAX AL specification is the result of the contributions of many people The following is a partial list of contributors in order of company name then contributers surname including the respective companies represented at the time of their contribution Stewart Chao AMD now with Qualcomm Wilson Kwan AMD now with Qualcomm Chris Grigg Beatnik Andrew Ezekiel Rostaing Beatnik Tim Granger Broadcom Roger Nixon Broadcom Wolfgang Schildbach Coding Technologies Nathan Charles Creative Lewis Balfour Ericsson Harald Gustafsson Ericsson Hakan Gardrup Ericsson Glenn Kasten Google Jean Michel Trivi Google Brian Murray Freescale Erik Noreke Independent Yeshwant Muthusamy Nokia Chair Matti Paavola Nokia Past Chair Scott Peterson NVIDIA Isaac Richards NVIDIA Neil Trevett NVIDIA Jim Van Welzen NVIDIA Past Chair Tom Longo Qualcomm Past Editor John Mortimer QSound Mark Williams QSound Ytai Ben Tsvi Samsung Natan Linder Samsung Gal Sivan Samsung David Eaton SRS Labs Jefferson Hobbs SRS Labs Robert Alm ST Ericsson Joakim Roubert ST Ericsson Weijun Jiang SKY MobileMedia Stephan Tassart ST Microelectronics Brian Evans Symbian James Ingram Symbian Leo Estevez Texas Instruments
93. XA _AUDIOPROFILE_MPEG25_ L3 XAuint32 0x00000003 define XA_AUDIOCHANMODE_MP3_ MONO XAuint32 0x00000001 define XA _AUDIOCHANMODE MP3 STEREO XAuint32 0x00000002 define XA _AUDIOCHANMODE MP3 _JOINTSTEREO XAuint32 0x00000003 define XA _AUDIOCHANMODE MP3 DUAL XAuint32 0x00000004 The macros are used for defining the MP3 audio profiles and modes ROFI MPEG25_ MPEG 2 5 Layer III U HANMODE_MP3_MONO MP3 Mono mode MP3 Stereo Mode HANMODE__ HANMODE_MP3_JOINTSTERE MP3 Joint Stereo mode MP3 Dual Stereo mode HANMODE_MP3_DUAL MypenMAX AL a AMR Profiles and Modes define XA AUDIOPROFILE AMR XAuint32 0x00000001 define XA AUDIOSTREAMFORMAT CONFORMANCE XAuint32 0x00000001 define XA AUDIOSTREAMFORMAT IF1 XAuint32 0x00000002 define XA AUDIOSTREAMFORMAT IF2 XAuint32 0x00000003 define XA _AUDIOSTREAMFORMAT FSF XAuint32 0x00000004 define XA_AUDIOSTREAMFORMAT RTPPAYLOAD XAuint32 0x00000005 define XA_AUDIOSTREAMFORMAT ITU XAuint32 0x00000006 The macros are used for defining the AMR audio profiles and modes XA_AUDIOPROFILE_AMR Adaptive Multi Rate audio codec XA_AUDIOSTREAMFORMAT_CONFORMANCE Standard test sequence format XA_AUDIOSTREAMFORMAT_IF1 Interface format 1 A XA_AUDIOSTRE AMFOR _IF2 AMR WB Profiles and Modes define XA_AUDIOPROFILE_AMRWB
94. XAMetadataExtractionIt f interface is able to search all metadata in any file using a variety of search modes This interface is mandated on Media Player objects see section 7 4 and implicit on Metadata Extractor see section 7 6 objects See section D 6 for an example using this interface Dynamic Interface Addition If this interface is added dynamically using DynamicInterfaceManagement Itf the set of exposed metadata items might be limited compared to the set of exposed items had this interface been requested during object creation time Typically this might be the case in some implementations for efficiency reasons or when the interface is added dynamically during playback of non seakable streamed content and the metadata is located earlier in the stream than what was the interface addition time Khronos Keys The keys that can be used to access metadata are the keys defined in the metadata specification of the media format in question In addition the OpenMAX AL specification defines a few format agnostic keys called Khronos keys The Khronos keys are for those developers who may not be familiar with the original metadata keys of the various media formats but still want to extract metadata using OpenMAX AL and OpenMAX AL It is the responsibility of API implementations to map these Khronos keys to the format specific standard metadata keys The Khronos keys are not meant to replace the standard metadata keys or to restric
95. XAPlaybackRateItf self XApermille rate XAuint32 pCapabilities ypenMAX AL 255 XAresult GetRateRange XAPlaybackRateItf self XAuint8 index XApermille pMinRate XApermille pMaxRate XApermille pStepSize XAuint32 pCapabilities Interface ID c36f1440 f776 1 1 db ac48 0002a5d5c5 1b Methods XAresult SetRate XAPlaybackRateItf self XApermille rate Sets the rate of presentation Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments 1000 is the default rate The application may query supported rates via the get Rat eRange method The XA_RESULT_FEATURE_UNSUPPORTED return value accommodates the circumstance where the content being played does not afford adjustments of the playback rate ypenMAX AL GetRate XAresult GetRate XAPlaybackRateItf self XApermille pRate ets eae gheata oi Parameters Interface self reference Pointer to a location to receive the rate of the player This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL 7 SetProperty Constraints XAresult SetPropertyConstraints XAPlaybackRateItf self XAuint32 constraints Sets the current rate property constraints Bitmask of the allowed rate
96. XAuint32 0x00000008 define XA_RECORDEVENT_HEADSTALLED XAuint32 0x00000010 define XA_RECORDEVENT BUFFER_FULL XAuint32 0x00000020 These values represent the possible record events Recording head is at the specified duration limit and the recorder has stopped Recording head is at the specified marker position ER Recording head has begun to move Recording head has temporarily stopped moving Recording has reached the end of the memory buffer i e XADataLocator_Address When the recorder is unable to write any more data e g when the memory buffer it is writing to is full the recorder transitions to the XA_RECORDSTATE_STOPPED state This event will not be posted when recording to a file 9 2 67 XA RECORDSTATE define XA RECORDSTATE STOPPED XAuint32 0x00000001 define XA RECORDSTATE PAUSED XAuint32 0x00000002 define XA RECORDSTATE RECORDING XAuint32 0x00000003 These values represent the recording state of an object XA_RECORDSTATE_STOPPED Recorder is stopped The destination is closed E_ PAUSED Recorder is stopped The destination is open but not receiving captured content XA_RECORDSTATE_RECORDING Recorder is recording The destination is open and receiving captured content 446 XA_RECORDSTA 9 2 68 XA RENDERINGHINT define XA_RENDERINGHINT_NONE X
97. XAuint32 XA_ENGINEOPTION_MAJORVERSION XAuint32 1 XAuint32 XA_ENGINEOPTION_MINORVERSION XAuint32 1 CREATE ENGINE Create OpenMAX AL res xaCreateEngine amp engine 3 EngineOption 0 NULL NULL CheckErr res Realizing the XA Engine in synchronous mode res engine gt Realize engine XA_BOOLEAN_FALSE CheckErr res Get the XA Engine Interface which is implicit res engine gt GetInterface engine XA_IID_ENGINE void amp EnginelItf CheckErr res Initialize arrays requiared and iidArray for i 0 i lt MAX_NUMBER_INTERFACES i required i XA_BOOLEAN_FALS iidArray i XA_IID_NULL Es CREATE OUTPUTMIX Set arrays required and iidArray for VOLUME interface required 0 XA_BOOLEAN_TRUE iidArray 0 XA_IID_VOLUME Create Output Mix object to be used by player res EnginelItf gt CreateOutputMix Engineltf amp outputMix 1 iidArray required CheckErr res Realizing the Output Mix object in synchronous mode res outputMix gt Realize outputMix XA_BOOLEAN_FALSE CheckErr res Get play and equalizer interfaces res outputMix gt GetInterface outputMix XA_IID_VOLUME void amp volumelItf CheckErr res CREATE RADIO Set arrays required and iidArray for RDS interface Rad
98. an unsupported contrast level is requested Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID MypenMAX AL os GetContrast XAresult GetContrast XAImageControlsItf self XAint32 pContrast Gets the current contrast level in Interface self reference pContrast out Current contrast level The value for contrast ranges from 100 to 100 where 0 indicates no contrast change Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetGamma XAresult SetGamma XAImageControlsItf self XApermille gamma Sets the gamma level Parameters i Interface self reference gamma i Defines the gamma level XA_RESULT_PARAMETER_INVALID is returned if an unsupported gamma level is requested Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL a GetGamma XAresult GetGamma XAImageControlsItf self XApermille pGamma Gets the current gamma level Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL a GetSupportedGammaSettings XAresult GetSupportedGammaSettings XAImageCo
99. and or instantaneous image data A media recorder must support either the record interface or the snapshot interface A media recorder may support both interfaces The capture of a segment of audio and or video data This type of capture is controlled via the XARecordItf interface The encoding parameters for audio and video are set using the XAAUdioEncoderItf and XAVideoEncoderItf respectively The capture of a still image This type of capture is controlled via the XASnapshot Itf interface The encoding parameters are set using the XAImageEncoderlItf An application may choose to associate both a media player object and a media recorder object with the same camera I O device object to implement a camcorder or still image camera application In such a case if the application instructs the media recorder to freeze on a snapshot any media player that shares the camera I O device object will transition to the paused playback state See section D 4 and section D 5 for examples using this object PROFILE NOTES Creation of objects of this type is mandated in the Media Player Recorder profile Mandated Interfaces XARecorditf see section 8 32 This interface controls the recording state of the media recorder enabling the capture of data over some segment of time This interface is a mandated interface when recording audio or video media XAAudioEncoderltf see section 8 3 This interface controls the parameters of audio encodin
100. as stand alone files provided to a media player object on creation or embedded within a Mobile XMF file In addition the media player supports the GM soundbanks MIDI by default In several cases a media player will not be able to handle two DLS banks at the same time for example bank provided during media player creation and bank embedded in the content In such a case player creation may fail and the application can retry the creation without providing the additional bank When a program is selected for a MIDI channel using bank select program change messages the media player will first look for the program in the embedded DLS bank if such exists If it is not found the media player will look in the DLS bank that was provided on creation if applicable If it is still not found the media player will try to load the program from the built in GM bank If the program does not exist there either the media player shall generate silence on the specified channel but should still keep track of that channel s state 4 6 Display Regions Conceptually OpenMAX AL maintains three separate notions relating to the visual output e Display Corresponds to the entire logical screen area or desktop The display is provided by the native windowing manager in the form of a native handle All interaction with this entity is handled exclusively via native interfaces using the native handle not via OpenMAX AL Multiple media objects may operate
101. ataSource Metadata Extractor O XAMetadataExtractionltf XAMetadataTraversalltf O XADynamicSourceSinkChangeltf O XAObjectltf I O XAMetadataMessageltf Figure 14 Reading meta data use case A Metadata Extractor object will read the metadata of a media file without allocating resources for audio playback As in other use cases we create the object using XAEngineIt f interface of the engine object and upon creation we set the data source of the Metadata Extractor The data source is typically a URI pointing to a media file in the local file system However the Metadata Extractor supports the XADynamicSourceSinkChangelt f interface which we can use to change the data source Therefore we may extract metadata from multiple files in series without creating a new Metadata Extractor object for every single file The XAMetadataExtractionItf and XAMetadataTraversalitf interfaces are used for actually reading and traversing the metadata from a file The XAMetadataMessageltf is used to set callbacks that execute whenever a metadata item is encountered PROFILE NOTES The support for this use case is mandated in all profiles COpenMAX AL PART 2 API Reference 5 Base Types and Units OpenMAX AL defines a set of cross platform fixed width types that are used within the API The definition of these are system dependent and the platform provider must specify these types OpenMAX AL also defines a set of types for diffe
102. bit XALEDDescriptor ledCount 1 which indicates the last LED in the array Bits set outside this range are ignored COpenMAX AL i ISLEDArrayActivated XAresult IsLEDArrayActivated XALEDArrayItf self XAuint32 pLightMask Returns the state of each LED in an array of LEDs in out pLightMask out Address to store a bit mask indicating which LEDs are activated or deactivated ESU SUCC ESS Return value The return value can be one of the following XA_R 1 XA_RESULT_PARAMETER_INVALID Comments Valid bits in pLight the array to bit XALI ask range from the least significant bit which indicates the first LED in DDescriptor ledCount 1 which indicates the last LED in the array Bits set outside this range are ignored SetColor XAresult SetColor XALEDArrayItf self XAuint8 index const XAHSL pColor Sets the color of an individual LED The LED must support setting color per XALEDDescriptor colorMask in Index of the LED Range is 0 XALEDDescriptor ledCount Return value The return value can be one of the following XA_R j XA_R iT XA_R rae XA_R Interface self reference Address of a data structure containing an HSL color ESU _SUCC ESS ESU ESU PARA ESU T_CONT PRECONDITIONS_VIOLAT ET ER_INVALID ROL_LOST COrpenMA
103. call to ChangeSource is ignored Two successive calls to ChangeSource asking for different changes will result in two callbacks in the correct order RegisterSourceChangeCallback ChangeSource xaSinkChangeCallback typedef void XAAPIENTRY xaSinkChangeCallback XASourceSinkChangelItf caller void pContext XAuint32 resultCode const XADataSink pExistingDataSink const XADataSink pNewDataSink Callback that executes whenever the ChangeSink method finishes execution Pre Nome conditions was registered callback is registered resultCode Result code indicating the status of the Sink change Possible result codes are the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALI XA ESULT_MEMORY_FAILURE XA R R d R R RROR XA_RESULT_CO R R R ESULT_IO_E NT_CORRUPTE XA_RESULT_CONTENT_UNSUPPOR XA_RESULT_CO NT_NOT_FOUN ier 2 1 a RMISSION DENIED XA ORMATS_INCOMPATIBLE pExistingDataSink in Bainte t Te current data Sink passed in the ChangeSink method pNewDataSink in Pointer to the new data Sink passed in the ChangeSink method Comments The resultCode indicates whether the Sink change reguested by ChangeSink actually succeeded or not XA_RESULT_SOURCE_SINK_INCOMPATIBLE is returned if the application tries to connect two media objects with incompatible media formats XA RESUL ERMISSION_DENIED is returned if the sink to be connected does Ei E
104. can be determined when it is part of the recorder object and source sink combination For example an encoder might have an input sampling rate range of 8 kHz 48 kHz overall but when a recorder object is connected to a low cost microphone the effective sampling rate range of the encoder might only be 8 kHz 16 kHz This interface is a mandated interface of engine objects see section 7 2 and media recorder objects see section 7 5 Prototype XA API extern const XAInterfaceID XA IID AUDIOENCODERCAPABILITIES struct XAAudioEncoderCapabilitiesItf_ typedef const struct XAAudioEncoderCapabilitiesItf_ const XAAudioEncoderCapabilitiesItf struct XAAudioEncoderCapabilitiesItf_ XAresult GetAudioEncoders XAAudioEncoderCapabilitiesItf self XAuint32 pNumEncoders XAuint32 pEncoderIds XAresult GetAudioEncoderCapabilities XAAudioEncoderCapabilitiesIt self XAuint32 encoderId XAuint32 pIndex XAAudioCodecDescriptor pDescriptor Interface ID e0f55ca0 f2d0 1 1df b250 0002a5d5c51b COpenMAX AL Defaults Not applicable Methods GetAudioEncoders XAresult GetAudioEncoders XAAudioEncoderCapabilitiesItf self XAuint32 pNumEncoders XAuint32 pEncoderIds Oueries the supported audio encoders SUCC PARA _ BUFF Return value The return value can be one of the following XA_RESUL XA_RESUL XA_RESUL ESS ET n
105. caused also by other applications that change the presets The event IntData parameter for this event contains the index of the preset that was modified The eventBooleanData parameter for this event is not used and shall be ignored XA RADLO EK COMPLE XA RADILO EO STATUS CHANG XA RADILO ENT SIGNAL STRENGTH CHANG XA RADLO ENT SOUELCH CHANGI XA RADLO XA RADLO ENCY_RANGE This event indicates that the seek is completed and the frequency of the tuner is the one that is given as event IntData parameter or if nothing was found the starting frequency that will be then given as parameter The eventBooleanData parameter for this event is not used and shall be ignored This event indicates that the signal received by the radio has changed from stereo to mono or from mono to stereo The eventIntData parameter for this event is not used and shall be ignored The eventBooleanData parameter for this event is XA_BOOLEAN_FALSE if the signal changed from stereo to mono and XA_BOOLEAN_TRUE if the signal changed from mono to stereo This event indicates that the strength of the signal received by the radio has changed The eventIntData parameter for this event contains the new signal strength in percent The eventBooleanData parameter for this event is not used and s
106. code may be a language code a language country code or a country code Formatting of language codes and language country codes is defined by IETF RFC 3066 RFC3066 which incorporates underlying ISO specifications 639 ISO639 and 3166 ISO3166 and a syntax Formatting of country codes is defined by ISO 3166 ISO3166 9 1 32 XANativeHandle typedef void XANativeHandle An opaque handle native to the platform that represents a display or window 9 1 33 XARectangle typedef struct XARectangle_ XAuint32 left XAuint32 top XAuint32 width XAuint32 height XARectangle This structure is used to specify a rectangle ret eccnpton O Horizontal position of the leftmost column of pixels top Vertical position of the topmost row of pixels The rectangle s width in pixels The rectangle s height in pixels ypenMAX AL i 9 1 34 XATimedTextStreaminformation typedef struct XATimedTextStreamInformation_ XAuint16 layer XAuint32 width XAuint32 height XAuint16 tx XAuint16 ty XAuint32 bitrate XAchar langCountry 16 XAmillisecond duration XATimedTextStreamInformation This structure is used for querying the information about a timed text stream These values represent the default settings described within the stream and may be overwritten with updated settings within the stream as the stream is processed layer Specifies the layering depth similar to z index in SMIL of the text in relation to ot
107. codes for RT content types and they are defined in Radiotext plus RT Specification Version 2 1 See RDS Forum 2006 07 21 R06 040 1 mm mm gt rraces oe e aa ERSION s eomm e wovewnr fs fomos ee a pomem s wem ass orae a rae 444 Programme Interactivity Private classes RDSR US_INFOALARM S_INFOADVISE S_INFOURI S_INFOOTHE ESHORT ORIALSTAFF ypenMAX AL 47 2 vomas ss yomen st Ranna 1 SC Ranna 1 56 Private classes may be defined by the service provider 57 Private classes may be defined by the service provider 58 Private classes may be defined by the service provider 445 Descriptor XA RDSRTPLUS PLACE ao _APPOINTME URCHASE 9 2 66 XA RECORDEVENT define XA_RECORDEVENT_HEADATLIMIT XAuint32 0x00000001 define XA_RECORDEVENT_HEADATMARKER XAuint32 0x00000002 define XA_RECORDEVENT_HEADATNEWPOS XAuint32 0x00000004 define XA_RECORDEVENT_HEADMOVING
108. const XAInterfaceID XA_IID_VIDEODECODERCAPABILITIES struct XAVideoDecoderCapabilitiesItf_ typedef const struct XAVideoDecoderCapabilitiesItf_ const XAVideoDecoderCapabilitiesItf struct XAVideoDecoderCapabilitiesItf_ XAresult GetVideoDecoders XAVideoDecoderCapabilitiesItf self XAuint32 pNumDecoders XAuint32 pDecoderIds XAresult GetVideoDecoderCapabilities XAVideoDecoderCapabilitiesIt self XAuint32 decoderId XAuint32 pIndex XAVideoCodecDescriptor pDescriptor Interface ID d18cb200 e616 1 1dc ab01 0002a5d5c5 1b Defaults Not applicable Methods COpenMAX AL GetVideoDecoders XAresult GetVideoDecoders XAVideoDecoderCapabilitiesIt self XAuint32 pNumDecoders XAuint32 pDecoderIds Retrieves available video decoders pNumDecoders in out If pDecoderlIds is NULL pNumDecoders returns the number of decoders available All implementations must have at least one decoder If pDecodersIds is non NULL as an input pNumDecoders specifies the size of the pDecoderIds array and as an output it specifies the number of decoder IDs available within the pDecoderlIds array pDecoderlIds out Atray of video decoders provided by the engine Refer to XA_VIDEOCODEC macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetVideoDecoderCapabilities
109. controls for brightness contrast and gamma adjustments XAlmageEffectsitf see section 8 17 This interface controls the image effects This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces XAVideoPostProcessingltf see section 8 41 This interface controls scaling mirroring cropping and rotating ypenMAX AL i 7 2 Engine Object Description This object type is the entry point of the API An implementation shall enable creation of at least one such object but attempting to create more instances either by a single application or by several different applications may fail The engine object supports creation of all other OpenMAX AL objects via its XAEngineIt f interface and querying of the implementation s capabilities via interfaces See Appendix D for examples using this object PROFILE NOTES Creation of objects of this type is mandated in all profiles Creation An engine is created using the global function xaCreateEngine see section 6 1 Mandated Interfaces XAEngineltf see section 8 13 This interface exposes methods for creation of other OpenMAX AL objects This interface is an implicit interface on this object XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding inter
110. define XA_RDSPROGRAMMETYPE_RDSPTY_SCIENCE XAuint32 0x00000008 define XA_RDSPROGRAMMETYPE_RDSPTY_VARIEDSPEECH XAuint32 0x00000009 define XA_RDSPROGRAMMETYPE _RDSPTY_POPMUSIC XAuint32 0x0000000A define XA_RDSPROGRAMMETYPE RDSPTY_ROCKMUSIC XAuint32 0x0000000B define XA_RDSPROGRAMMETYPE RDSPTY_EASYLISTENING XAuint32 0x0000000C define XA_RDSPROGRAMMETYPE RDSPTY_LIGHTCLASSICAL XAuint32 0x0000000D define XA_RDSPROGRAMMETYPE RDSPTY_SERIOUSCLASSICAL XAuint32 0x0000000E define XA_RDSPROGRAMMETYPE_RDSPTY_OTHERMUSIC XAuint32 0x0000000F define XA_RDSPROGRAMMETYPE RDSPTY WEATHER XAuint32 0x00000010 define XA_RDSPROGRAMMETYPE _RDSPTY_FINANCE XAuint32 0x00000011 define XA_RDSPROGRAMMETYPE_RDSPTY_CHILDRENSPROGRAMMES XAuint32 0x00000012 define XA_RDSPROGRAMMETYPE RDSPTY_SOCIALAFFAIRS XAuint32 0x00000013 define XA_RDSPROGRAMMETYPE RDSPTY_RELIGION XAuint32 0x00000014 define XA_RDSPROGRAMMETYPE _RDSPTY_PHONEIN XAuint32 0x00000015 define XA_RDSPROGRAMMETYPE RDSPTY TRAVEL ypenMAX AL 7 XAuint32 0x00000016 define XA RDSPROGRAMMETYPE RDSPTY LEISURE XAuint32 0x00000017 define XA_RDSPROGRAMMETYPE_RDSPTY_JAZZMUSIC XAuint32 0x00000018 define XA_RDSPROGRAMMETYPE_RDSPTY_COUNTRYMUSIC XAuint32 0x00000019 define XA_RDSPROGRAMMETYPE_RDSPTY_NATIONALMUSIC XAuint32 0x0000001A define XA_RDSPROGRAMMETYPE_RDSPTY_OLDIESMUSIC
111. device intensity and frequency Section 2 4 discusses optional features in the API These features enable the development of multimedia rich applications such as media players media recorders and games 2 1 Motivation The definition of OpenMAX AL profiles accommodates the fact that OpenMAX AL may be used for a range of devices catering to different market segments Not all implementations of OpenMAX AL will need or can accommodate all of the functionality represented by this large set of features For example a media playback only device would have little use for implementing all the media recording functionality that is also part of the API Thus OpenMAX AL segments the APIs into two groupings of functional affinity relative to typical devices specifically a collection of player functionality and a collection of recorder functionality 2 2 OpenMAX AL Profile Definition An OpenMAX AL profile is a defined subset of features of the same functional type collectively required on any implementation that claims to support that profile 2 3 Profiles OpenMAX AL defines two profiles Media Player and Media Player Recorder A short description and rationale of each of the profiles is discussed below COpenMAX AL i e Media Player This profile encapsulates media playback functionality including the ability to render audio video and image data in one or more formats The Media Player profile is appropriate for playback only devices whic
112. exposes controls for manipulating the volume of specific audio input and audio output devices The units used for setting and getting the volume can be in millibels or as arbitrary volume steps the units supported by the device can be queried with GetVolumeScale method Support for this interface is optional but where supported this interface should be exposed on the engine object Prototype XA API extern const XAInterfaceID XA IID DEVICEVOLUME struct XADeviceVolumelItf_ typedef const struct XADeviceVolumeItf_ const XADeviceVolumelItf struct XADeviceVolumelItf_ XAresult GetVolumeScale XADeviceVolumeItf self XAuint32 deviceID XAint32 pMinValue XAint32 pMaxValue XAboolean pIsMillibelScale XAresult SetVolume XADeviceVolumeItf self XAuint32 deviceID XAint32 volume XAresult GetVolume XADeviceVolumeItf self XAuint32 devicelID XAint32 pVolume Interface ID 4bb44020 f775 1 1db ad03 0002a5d5c51b Defaults The default volume setting of each device should be audible ypenMAX AL 129 Methods GetVolumeScale XAresult GetVolumeScale XADeviceVolumeItf self XAuint32 devicelID XAint32 pMinValue XAint32 pMaxValue XAboolean pIsMillibelScale Parameters Interface self reference pIsMillibelscale H true the volume values used by GetVolume SetVolume and this method are in millibel units if false the volume values are in arbitrary volume
113. for the key beyond the size of the structure If the given size is smaller than the needed size XA_RESULT_BUFFER_INSUFFICIENT is returned and only data of the given size will be written however no invalid strings are written That is the null terminator always exists and multibyte characters are not cut in the middle GetSupportedKeysCout GetKeySize ypenMAX AL i GetFreeKeysEncoding XAresult GetFreeKeysEncoding XAMetadataInsertionItf self XAint32 nodeID XAuint32 pEncodingIndex XAuint32 pEncoding Description A method to be used in case implementation supports free keys for metadata insertion This method tells supported character encodings for those free keys pFreeKeys in Get SupportedKeysCount should be true ID of the node whose supported keys are queried pEncodingIndex in Metadata insertion free keys encodings Index Range is 0 EncodingCount 1 P Encoding A supported character encoding for free keys to be written See XA_CHARACTERENCODING macros Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALID XA_RESULT_PRECONDITIONS_VIOLATED GetSupportedKeysCount ypenMAX AL InsertMetadataltem XAresult InsertMetadataItem XAMetadataInsertionItf self XAint32 nodeID XAMetadataInfo pKey XAMetadataInfo pValue XAboolean overwrite D
114. from multiple files without creating a new object for every single file This interface is an implicit interface on this object XADynamicSourceSinkChangeltf see section 8 12 This interface enables changing the data source or the data sink of the object post creation This interface is an implicit interface on this object XAMetaDataExtractionltf see section 8 21 This interface exposes controls for metadata extraction This interface is an implicit interface on this object XAMetaDataMessageltf see section 8 23 This interface is used to set metadata callbacks To be used in conjunction with XAMetadataExtractionltf This interface is an implicit interface on this object XAMetaDataTraversalltf see section 8 24 This interface exposes controls for metadata traversal This interface is an implicit interface on this object ypenMAX AL XAStreaminformation see section 8 35 This interface exposes stream property interface and selection This interface is a mandated interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor specific manner COpenMAX AL 60 7 7 Output Mix Object Description The output mix object represents a set of audio output devices to which one audio output stream is sent The application retrieves an output mix object from the engine and may specify that output mix as the s
115. imageSettings colorFormat 0 ignored only used with raw images res imageEncoderItf gt SetImageSettings imageEncoderItf amp imageSettings CheckErr res j reee all avconarcie seccing locks se res cameraltf gt SetAutoLocks cameralItf 0 CheckErr res Assumes that all these modes are supported Real application SENON io ehe cki eh Camera Capa bibit eS ee res cameraItf gt SetFocusMode cameraItf XA_CAMERA_FOCUSMODE_AUTO 0 XA_BOOLEAN_TRUE CheckErr res res cameraltf gt SetExposureMode cameraltf XA_CAMERA_EXPOSUREMODE_AUTO 0 CheckErr res res cameraltf gt SetFlashMode cameraltf CM penMAX AL XA_CAMERA_FLASHMODE_AUTO CheckErr res Setup the file name prefix photo and the path Ce Mypiccures uri locatorType XA_DATALOCATOR_URI uri pURI XAchar file C MyPictures photo mime formatType XA_DATAFORMAT_ MIME mime pMimeType XAchar image jpeg mime containerType XA_CONTAINERTYPE_UNSPECIFIED fileSink pLocator fileSink pFormat voila EEL void amp mime Setup the metadata to be inserted to the image file Real applications should use GetKeys to check the supported keys for qyiealicime pkey XAMetadataInfto malloc Gal wieone OCNMecaclaicalinic 12 Silweoir CACIngie ep ARNr onos Mee has 12 characters pKey gt size 13
116. in all profiles Mandated Interfaces XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding dynamic interfaces see section 3 1 6 to the object This interface is an implicit interface on this object XAVibraltf see section 8 37 This interface exposes all vibration functionality for a Vibra I O Device This interface is an implicit interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor specific manner ypenMAX AL 8 Interface Definitions This section documents all the interfaces and methods in the API Almost all methods generate result codes whether synchronously or asynchronously Such methods must return either one of the explicit result codes listed in the method s documentation or one of the following result codes e XA_RESULT_RESOURCE_ERROR e XA_RESULT_RESOURCE_LOST e XA RESULT INTERNAL ERROR e XA_RESULT_UNKNOWN_ERROR e XA RESULT OPERATION ABORTED e XA RESULT FEATURE UNSUPPORTED For a full definition of these result codes see section 9 2 67 8 1 XA_IID NULL XA HD NULL is a placeholder interface ID for the interface array used when cr
117. include locatorType Locator type which must be XA_DATALOCATOR_NATIVEDISPLAY for this structure Handle of the native display window Handle of the native display 9 1 16 XADataLocator_Null typedef struct XADataLocator_Null_ XAuint32 locatorType XADataLocator Null Fields include Field Description locatorType Locator type which must be XA_DATALOCATOR_NULL for this structure 9 1 17 XADataLocator_OutputMix typedef struct XADataLocator_OutputMix_ XAuint32 locatorType XAObjectItf outputMix XADataLocator_OutputMix Fields include MypenMAX AL Field Description locatorType Locator type which must be XA_DATALOCATOR_OUTPUTMIX for this structure outputMix The OutputMix object as retrieved from the engine 9 1 18 XADataLocator_URI typedef struct XADataLocator_URI_ XAuint32 locatorType const XAchar pURI XADataLocator_URI Fields include Field Description locatorType Locator type which must always be XA_DATALOCATOR_URI for this structure pURI URI expressed as a string ypenMAX AL 378 9 1 19 XADataSink typedef struct XADataSink_ void pLocator void pFormat XADataSink Fields include pLocator Pointer to the specified data locator structure This may point to any of the following structures XA XA XA XA XA XA XA XA Datal Datal Datal Datal DataLocator_Address D
118. indicates more abstractly the progress a player has made in preparing data for playback ypenMAX AL 264 RegisterCallback XAresult RegisterCallback XAPrefetchStatusItf self xaPrefetchCallback callback void pContext Sets the prefetch callback function Parameters Interface self reference callback in Callback function invoked when one of the specified events occurs A NULL value indicates that there is no callback pContext in User context data that is to be returned as part of the callback method Return value The return value can be the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments Callback function defaults to NULL The context pointer can be used by the application to pass state to the callback function XA_PREFETCHEVENT macros see section 9 2 55 SetCallbackEventsMask XAresult SetCallbackEventsMask XAPrefetchStatusItf self XAuint32 eventFlags Sets the notification state of the prefetch events Parameters Interface self reference eventFlags in Bitmask of prefetch event flags indicating which callback events are enabled See XA_PREFETCHEVENT macros in section 9 2 55 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Event flags default to all flags cleared MypenMAX AL o GetCallbackE
119. insertion the insertion for that node will fail and that will be indicated with xaMetadataInsertionCallback Mandated Keys An implementation of XAMet adataInsertionItf must merely support all methods on the interface This specification does not mandate that an implementation supports writing any particular key Khronos key or otherwise even in cases where the interface itself is mandated on an object The supported keys for writing can be queried with methods Get SupportedKeysCount GetKeySize and GetKeys COpenMAX AL i Prototype XA API extern const XAInterfaceID XA IID METADATAINSERTION struct XAMetadataInsertionItf typede const struct XAMetadataInsertionItf const XAMetadataInsertionIt typedef struct XAMetadataInsertionItf_ XAresult CreateChildNode XAMetadataInsertionItf self XAint32 parentNodelID XAuint32 type XAchar pMimeType XAint32 pChildNodeID XAresult GetSupportedKeysCount XAMetadataInsertionItf self XAint32 nodeID XAboolean pFreeKeys XAuint32 pKeyCount XAuint32 pEncodingCount XAresult GetKeySize XAMetadataInsertionItf self XAint32 nodeID XAuint32 keyIndex XAuint32 pKeySize XAresult GetKey XAMetadataInsertionItf self XAint32 nodeID XAuint32 keyIndex XAuint32 keySize XAMetadataInfo pKey XAresult GetFreeKeysEncoding XAMetadataInsertionItf self XAint32 nodeID XAuint32 encodingIndex XAuint32 pEnco
120. interface provides a means of enumerating all video encoders available on an engine where each an encoderld represents each encoder It also provides a means to query the capabilities of each encoder A given encoder may support several profile level pairs each with their own capabilities such as maximum resolution appropriate to that profile and level pair Therefore this interface represents the capabilities of a particular encoder as a list of capability entries queriable by encoderID and capability entry index The set of video encoders supported by the engine does not change during the lifetime of the engine though dynamic resource constraints may limit actual availability when an video encoder is requested This interface is a mandated interface of engine objects see section 7 2 Prototype XA_API extern const XAInterfaceID XA_IID_VIDEOENCODERCAPABILITIES struct XAVideoEncoderCapabilitiesItf_ typedef const struct XAVideoEncoderCapabilitiesItf_ const XAVideoEncoderCapabilitiesItf struct XAVideoEncoderCapabilitiesItf_ XAresult GetVideoEncoders XAVideoEncoderCapabilitiesItf self XAuint32 pNumEncoders XAuint32 pEncoderIds XAresult GetVideoEncoderCapabilities XAVideoEncoderCapabilitiesIt self XAuint32 encoderId XAuint32 pIndex XAVideoCodecDescriptor pDescriptor Interface ID Saef2760 e872 1 1db 849f 0002a5d5c5 1b Defaults Not applicable Methods COpenMAX AL GetVide
121. is different from the charset encoding that the media metadata item uses it is optional for the implementation to convert the values of the filter key and the media metadata item key to the same charset and evaluate whether they match Language country filter will consider a metadata item to match the criteria if the item s value language country matches the filter s language country code The value encoding filter will simply match all items with the same value encoding While it is possible to use all three criteria when calling AddKeyFilter it is also possible to include fewer criteria ilterMask is used for defining which criteria should be considered when calling AddKeyFilter It is constructed by bit wise ORing of the metadata filter macros see section 9 2 39 Note that AddKeyFilter treats parameters as if they were ANDed together For example calling AddKeyFilter with key data and language country code but not encoding means that the filter will cause metadata that matches both the key and the language country code to be returned but not metadata that matches only one Further note that subsequent calls to AddKeyFilter are treated as if they were Ored together For example if the first call passed a key but nothing else and a second call passed a key and an encoding but no language country code the interface will return metadata matching the first key and metadata matching both the second key and th
122. is registered Priority XA_PRIORITY_NORMAL Preemptable by object of same priority that is realized later than this object XA BOOLI RAN FALSE 233 Callbacks xaObjectCallback typedef void XAAPIENTRY xaObjectCallback XAObjectItf caller const void pContext XAuint32 event XAresult result XAuint32 param void pInterface object s resource state Parameters caller in Interface on which this callback was registered pContext in User context data that is supplied when the callback method is registered EV event in One of the XA_OBJECT_E A callback function notifying of a runtime error termination of an asynchronous call or change in the NT macros result i If event is XA_OBJECT_EVENT_RUNTIME_ERROR result contains the error code If event is XA_OBJUECT_EVENT_ASYNC_TERMINATION result contains the asynchronous function return code For other values of event this parameter should be ignored If event is XA_OBJECT_EVENT_RUNTIME_ERROR XA_OBJECT_EVENT_RESOURCES_LOST or XA_OBJECT_EVENT_ASYNC_TERMINATION param contains the state of the object after the event For other values of event this parameter should be ignored pinterface in If event is XA_OBJECT_EVENT_ITF_CONTROL_TAKEN XA_OBJECT_EVENT_ITF_CONTROL_RETURNED or XA_OBJECT_EVENT_ITF_PARAMETERS_CHANGED
123. is silent A stereo position of 1000 o pans the object fully to the right the left channel is silent Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The exact pan and balance curves used for this method are implementation dependent subject to satisfying the parameter description For objects whose format is mono this method controls a constant energy pan effect For objects whose format is stereo this method controls a balance effect ypenMAX AL i GetStereoPosition XAresult GetStereoPosition XAVolumeItf self XApermille pStereoPosition Gets the object s stereo position setting pStereoPosition Pointer to a location to receive the current stereo position setting This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL 9 Macros and Typedefs gt ypenMAX AL 363 9 1 Structures 9 1 1 XAAudioCodecDescriptor typedef struct XAAudioCodecDescriptor_ XAuint32 maxChannels XAuint32 minBitsPerSample XAuint32 maxBitsPerSample XAmilliHertz minSampleRate XAmilliHertz maxSampleRate XAboolean isFreqRangeContinuous XAmilliHertz pSampleRatesSupported XAuint32 numSampleRatesSupported XAuint32 minBitRate XAuint32 maxBitRate XAboolean isBitrateRangeContinuous XAuint
124. it applicable to all media platforms 1 4 1 The OpenMAX Application Layer The OpenMAX AL API provides application level multimedia solutions with portability across an array of platforms by providing a common abstraction for a system s media playback and recording functionality The API organizes this abstraction around a set of high level objects An application acquires all objects from one engine object which encapsulates an OpenMax AL session and serves as an umbrella for all other objects Application OpenMAX AL API AL Engine Object F Figure 1 OpenMAX AL application engine and object abstraction Principle among these objects is the media object Each media object represents either a playback or recording task denoted media player or media recorder respectively which takes data from a designated source and sends it to a designated sink In some cases the sources and sinks are themselves objects For instance a camera device might act as a source or an audio output mix might act as a sink In other cases a source or sink is simply a location such as a memory buffer containing a sound or a file to which one writes recorded data All objects expose interfaces which serve as controls relevant to their operation Interfaces constitute structures of methods grouped by functional affinity Thus a player exposes interfaces for playback rate control seeking and metadata extraction An application co
125. name Returns 0 is a stream name is not available pName out This is a string buffer containing the name of the stream If this pointer is NULL the pNameSize parameter identifies the length of the stream s name This allows the application to properly size the buffer that will contain the stream name The character coding is UTF 8 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_CONTENT_CORRUPTED XA RESULT CONTENT UNSUPPORTI Comments For streams identified as XA DOMAINTYPE UNKNOWN it may still be possible to retrieve the stream name if any exists If the method is not able to retrieve the stream name it will identify this by returning a value of 0 via the pNameSize parameter refer to the pNameSize parameter for more information Obtaining the stream specific names may be useful for content that contain multiple alternative tracks For example DVD content can contain multiple audio language tracks the application may utilize the stream names if present to enumerate and populate the selection list for the user ypenMAX AL i RegisterStreamChangeCallback XAresult RegisterStreamChangeCallback XAStreamInformationItf self xaStreamEventChangeCallback callback void pContext cal Specifies the callback method pContext in User context data that is to be returned as p
126. of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID None GetChildCount MypenMAX AL GetChildInfo XAresult XGetChildInfo XAMetadataTraversalIt f self XAuint32 index XAint32 pNodeID XAuint32 pType XAuint32 size XAchar pMimeType Returns information about a child Unique identification number of the child Node type See XA_NODETYPE macro Size of the memory block passed as mimeType Range is 0 max Get ChildMIMETypeSize Parameters Interface self reference in Child index Range is 0 GetChildCount size in out Address to store the MIME type ESS KT ER _INVALID Return value The return value can be one of the following XA_RESULT_SUCC XA_RESULT_PARAME To ignore MIME type set size to 0 and mimeType to NULL Get ChildCount ypenMAX AL 229 SetActiveNode XAresult SetActiveNode XAMetadataTraversallItf self XAuint32 index Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments Set Act iveNode causes the current scope to descend or ascend to the given index To descend set index to 0 Get ChildCount To ascend to the parent scope set index to XA_NODE_PARENT Calling SetActiveNode with index set to XA_NODE_PARENT will return XA_RESULT_PA
127. output mix object is defined in section 7 7 and the output mix interface is described in section 8 25 4 1 5 Camera Object Control of one of the device s cameras is handled via the Camera object The number of cameras supported by a device and their capabilities can be retrieved from the media engine via the XACameraCapabilitiesItf interface A camera I O device exposes the XACameralt f interface which is used to control camera features such as flash focusing metering exposure compensation sensitivity shutter speed aperture white balance and zoom The camera I O object is connected to a media recorder media object to capture still images or video 4 1 6 LED Array Control Object Control of the device s LEDs is handled via the LED array object Querying the capabilities of and creating a LED array object is an engine level operation while control over individual LEDs is handled by the object 4 1 7 Radio Object Control of the device s FM AM radio is handled via the Radio object Instantiating a Radio object is an engine level operation The Radio I O device can expose two interfaces XARadioItf and XARDSItf XARadioItf is an implicit interface that is used to control the basic functionality such as setting the frequency XARDSIt f is an optional interface to control Radio Data System functionality The Radio I O device object shall be connected to a Media Player object to make the radio audible COpenMAX AL 4 1 8 Vibratio
128. pEngineOptions m pinterfacelds piInterfaceRequired Return value The return value can be one of the following XA 1 XA iT_F XA_RI T_ME XA_ i i XA XA The number of elements in the options array This parameter value is ignored if pl If numOpt ions is equal to 0 the engine is initialized without any optional features EngineOptions is NULL Array of optional configuration data A NULL value initializes the engine without the optional features being Number of interfaces that the object is requested to support not including implicit interfaces An array of numInterfaces interface IDs which the object should support This parameter is ignored if numInterfaces is zero R R R R R R XA RESULT E EATUR E UNSUPPORTI returned An array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code ED will be then This parameter is ignored if numInterfaces is zero ES U ES U UCC ARA ES U EMO ESS ETER_INVALID RY_FAILURE ES URE UNSUPPORTI ES ESO RCE_ERROR ES HOP TION_UNSUPPORT xaCreateEneine Comments The options supported by an individual implementation are imp
129. pExtensionName XAboolean pSupported XAresult QueryLEDCapabilities XAEngineltf self XAuint32 pIndex XAuint32 pLEDDevicelID XALEDDescriptor pDescriptor XAresult QueryVibraCapabilities XAEngineltf self XAuint32 pIndex XAuint32 pVibraDevicelID XAVibraDescriptor pDescriptor Interface ID de9000a0 d6dd 1 1 df be24 0002a5d5c5 1b Defaults None ypenMAX AL n Methods CreateCameraDevice XAresult CreateCameraDevice XAEngineltf self XAObjectItf pDevice XAuint32 deviceID XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired Creates a camera device Parameters self Interface self reference pDevice out Newly created camera device object deviceID ID of the camera device numInterfaces in Number of interfaces that the object is requested to support piInterfacelds in Array of numInterfaces interface IDs which the not including implicit interfaces object should support This parameter is ignored if numInterfaces is zero XA_RESULT_FEATURE_UNSUPPORTED will be then returned piInterfaceRequired in Array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code This parameter is ignored if numInterfaces is zero Return
130. partially specified code will match fully specified codes that match the part that is specified For example en will match en us and other en variants Likewise us will match en us and other us variants Formatting of language codes and language country codes is defined by IETF RFC 3066 RFC3066 which incorporates underlying ISO specifications 639 ISO639 and 3166 ISO3166 and a syntax Formatting of country codes is defined by ISO 3166 ISO3166 9 1 31 XAMIDIStreaminformation typedef struct XAMIDIStreamInformation_ XAuint32 channels XAuint32 tracks XAuint32 bankType XAchar langCountry 16 XAmillisecond duration XAMIDIStreamInformation ypenMAX AL This structure is used for querying the information about a MIDI stream channels Number of MIDI channels If the number of channels is unknown the value shall be XA_MIDI_UNKNOWN tracks Number of MIDI tracks If the number of tracks is unknown the value shall be XA_MIDI_UNKNOWN bankType Identifies the type of MIDI sound bank s used as defined in XA_MIDIBANK If the bank information is unknown the value shall be XA_MIDI_UNKNOWN langCountry Language country code of the stream Will be an empty null terminated string in case it is not known or applicable Also see note below duration Identifies the total duration of the MIDI stream If the duration is unknown this value shall be XA TIME UNKNOWN The language country
131. players and recorders that typically have no use for MIDI functionality Mandating MIDI in OpenMAX AL would place a gratuitous burden on such devices to implement MIDI just to claim compliance with OpenMAX AL For this reason MIDI is designated as optional functionality All MIDI related features are in an optional MIDI category an exception to the second rule defined in section 2 4 Implementations that do support MIDI functionality can lay claim to this MIDI designation in addition to the profile s they support Example AL Media Player MIDI or AL Media Player Recorder MIDI However to avoid fragmentation of the API with respect to MIDI an implementation can lay claim to the MIDI designation only if it supports all of the following MIDI related features MIDI file playback and related callbacks SP MIDI Mobile DLS Mobile XMF 2 6 Profile Notes Profiles notes are used within this specification to identify objects and interfaces where support is optional in one or more of the profiles Objects and interfaces without profile notes are mandated in all profiles Here are some representative examples of profile notes found in the specification PROFILE NOTES This object represents an optional feature and consequently optional in all profiles PROFILE NOTES This interface is mandated only in the Media Player profile 2 7 Behavior for Unsupported Features If an application attempts to us
132. properties requested An implementation may choose any of the given properties to implement rate and none of the excluded properties See XA_RATEPROP macros their corresponding bits are mutually exclusive All audio properties and their corresponding bits are If the constraints cannot be satisfied this method returns Parameters self Interface self reference constraints in All video properties and mutually exclusive If the bitmask is not well formed this method returns XA_RESULT_PARAMETER_INVALID XA RESULT FEATURE UNSUPPORTED Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID have only an audio property set The default video and audio properties are Comments Note that rate property capabilities may vary from one rate to another This implies that a setting supported for one rate may be unsupported for another Implementations controlling the rate of both video and audio will always have exactly one video property set exactly one bit in the least significant byte and one audio property set exactly one bit in the second least significant byte Implementations controlling the rate only of audio will XA_RATEPROP_SMOOTHVIDEO and XA_RATEPROP_NOPITCHCORAUDIO respectively ypenMAX AL 258 GetProperties XAresult GetProperties XAPlaybackRateItf self XAuint32 pProperties
133. reverb it is still applied on A but with the same parameters as on B See the related object event macros XA_OBJECT_EVENT_ITF_CONTROL_TAKEN XA_OBJECT_EVENT_ITF_ CONTROL RETURNED and XA OBJECT EVENT IT F_PARAMETERS_CHANGED and the error code XA_RESULT_CONTROL_LOST for details E COpenMAX AL r Prototype XA API extern const XAInterfaceID XA IID OBJECT struct XAObjectItf_ typedef const struct XAObjectItf_ const XAObjectItf struct XAObjectItf_ XAresult Realize xAObjectItf self XAboolean async XAresult Resume XAObjectItf self XAboolean async XAresult GetState XAObjectItf self XAuint32 pState XAresult GetInterface XAObjectItf self const XAInterfaceID iid void pInterface XAresult RegisterCallback XAObjectItf self xaObjectCallback callback void pContext void AbortAsyncOperation XAObjectItf self void Destroy XAObjectItf self XAresult SetPriority XAObjectiItf self XAuint32 priority XAresult GetPriority XAObjectItf self XAuint32 pPriority XAresult SetLossOfControliInterfaces XAObjectItf self XAuint16 numInterfaces const XAInterfaceID pInterfacelIDs XAboolean enabled ypenMAX AL 232 Interface ID 99alce50 cbh4e 11df bd3b 0800200c9a66 Defaults The object is in Unrealized state No callback
134. semaphore post void sem_wait Sem_t pSemaphore Implementation specific semaphore wait ypenMAX AL 476 Checks for error If any errors exit the application void CheckErr XAresult res dic eee P YON Ia SOIL eg sis Debug printing to be placed here seal ig UL 8 void RadioCallback XARadioItf caller WOE pContext XAuint32 event XAuint32 event IntData XAboolean eventBooleanData if event XA_RADIO_EVENT_FREQUENCY_CHANGED sem_post amp semFreq else if event XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED sem_post amp semFreqRange void RDSCallback XARDSItf caller WOLE pContext XAuintl16 event XAuint8 eventData if event XA_RDS_EVENT_NEW_PS update Programme Service name on the screen by querying it from GetProgrammeServiceName fe Initializes the OpenMAX AL engine and starts the playback of radio eo Wow lnie volc XAEnginelItf Engineltf XADataSource audioSource XADataLocator_IODevice locatorlIODevice XADataSink audioSink XADataLocator_OutputMix locator_outputmix XAVolumeltf volumeltf XAresult res LNE y XAboolean supported CO penMAX AL XAboolean reguired MAX NUMBER INTERFEACES XAInterfaceID iidArray MAX_NUMBER_INTERFACES Ti XAEngineOption EngineOption XAuint32 XA_ENGINEOPTION_THREADSAFE XAuint32 XA_BOOLEAN_TRUE
135. structure including data for the key beyond the size of the structure If the given size is smaller than the needed size XA_RESULT_BUFFER_INSUFFICIENT is returned and only data of the given size will be written however no invalid strings are written That is the null terminator always exists and multibyte characters are not cut in the middle Ses eal ypenMAX AL GetValueSize XAresult GetValueSize XAMetadataExtractionItf self XAuint32 index XAuint32 pSize Returns the byte size of a given metadata value Parameters Interface self reference Metadata item Index Range is 0 Get ItemCount pSize out Address to store value size size must be greater than 0 Must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments Get ValueSize is used for S il how large a block of memory is necessary to hold the value returned by Get Value ypenMAX AL GetValue XAresult GetValue XAMetadataExtractionItf self XAuint32 index XAuint32 size XAMetadataInfo pValue Returns a XAMet adat alInfo structure and associated data referenced by the structure for a value Parameters Interface self reference Metadata item Index Range is 0 Get ItemCount size in Size of the memory block passed as value Range is 0 GetValueSize
136. that is sold as long as such product includes significant independent work developed by the seller A link to the current version of this specification on the Khronos Group website should be included whenever possible with specification distributions Khronos Group makes no and expressly disclaims any representations or warranties express or implied regarding this specification including without limitation any implied warranties of merchantability or fitness for a particular purpose or non infringement of any intellectual property Khronos Group makes no and expressly disclaims any warranties express or implied regarding the correctness accuracy completeness timeliness and reliability of the specification Under no circumstances will the Khronos Group or any of its Promoters Contributors or Members or their respective partners officers directors employees agents or representatives be liable for any damages whether direct indirect special or consequential damages for lost revenues lost profits or otherwise arising from or in connection with these materials SAMPLE CODE and EXAMPLES as identified herein are expressly depicted herein with a grey watermark and are included for illustrative purposes only and are expressly outside of the Scope as defined in Attachment A Khronos Group Intellectual Property IP Rights Policy of the Khronos Group Membership Agreement A Member or Promoter Member shall have no obligation to gr
137. the case of a Metadata Extractor object only local data sources are mandated to be supported The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_MEMORY_FAILURE XA RESULT IO ERROR XA_RESULT_CONTENT_CORRUPTED R R R R R XA RESULT CONTENT UNSUPPORTI XA RESULT CONTENT NOT FOUND XA RESULT PERMLSSION DENLED Setting a source for a Metadata Extractor object will reset its XAMetadataExtractionItf and XAMetadataTraversallItf interfaces to point to the new source and reset those interfaces to their initial values Setting of the new source shall be accepted in any player object state The playback of the new source shall start from the beginning of the content The player object shall maintain the same player object state upon accepting the new source For example if the player object is currently in XA_PLAYSTATE_PLAYING state it shall maintain the XA_PLAYSTATE_ PLAYING state None ypenMAX AL 7 8 12 XADynamicSourceSinkChangeltf Description This interface exposes a control for changing the specified data source or data sink of the object during the life time of the object This interface is optional on the MediaPlayer and MediaRecorder objects and implicit on the Metadata Extractor object Prototype XA API extern const XAInterfaceID XA IID DYNAMICSOURCESINKCHAN
138. the char array passed in the pName parameter is of insufficient length the pName parameter is filled to its maximum the pNameLength parameter is updated to the needed length and a XA_RESULT_BUFFER_INSUFFICIENT return value is returned The returned string is always valid That is the null terminator always exists and multibyte characters are not cut in the middle ypenMAX AL j RegisterRadioCallback XAresult RegisterRadioCallback XARadioItf self xaRadioCallback callback void pContext Sets or clears the xaRadioCallback Parameters ES Br in Interface self reference Address of the callback in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL 831 XARDSItf Description This interface is for accessing the Radio Data System for VHE FM sound broadcasting RDS IEC 62106 features This interface can also be used with Radio Broadcast Data System RBDS United States RBDS Standard NRSC 4 A but RDS terminology Glossary of RDS Terms is used in this API documentation This interface can be exposed on the Radio I O device object if RDS is supported Please note that right after setting a new frequency the RDS fields might contain empty or default values and it c
139. the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetShutterFeedback XAresult SetShutterFeedback XASnapshotItf self XAboolean enabled Toggles the shutter feedback such as shutter sound or some visual feedback while taking a snapshot Parameters Interface self reference True to enable shutter feedback false to disable it Return value The return value can be one of the following XA_RESULT_SUCCESS Comments Some implementations will return XA_RESULT_FEATURE_UNSUPPORTED when trying to switch off the feedback in case shutter feedback is mandatory because of legislative reasons MypenMAX AL GetShutterFeedback XAresult GetShutterFeedback XASnapshotItf self XAboolean pEnabled Description This method tells if the shutter feedback such as shutter sound or some visual feedback while taking a snapshot is enabled Parameters Interface self reference True if shutter feedback is enabled false if it is disabled SUCC T PARA ESS KT FR INVALILD Return value The return value can be one of the following XA RESULT XA RESU f ypenMAX AL 323 8 35 XAStreaminformationltf Description XAStreamInformationIt f is used to query a stream s properties This interface is a mandatory interface of Media Player see section 7 4 and Metadata Extractor objects see sec
140. the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_MEMORY_FAILURE Comments If the engine fails to create the object due to lack of memory or resources it will return the XA_RESULT_MEMORY_FATLURE or the XA_RESULT_RESOURCE_ERROR error respectively See also XAEnginelIt f see section 8 13 to determine the capabilities of the LED device LED array I O device object see section 7 3 ypenMAX AL s CreateVibraDevice XAresult CreateVibraDevice XAEngineItf self XAObjectIt f pDevice XAuint32 deviceID XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired Creates a vibrator device Parameters self Interface self reference pDevice out Newly created vibrator device object deviceID in ID of the vibrator device numInterfaces in Number of interfaces that the object is requested to support not including implicit interfaces piInterfacelds in Array of numInterfaces interface IDs which the object should support This parameter is ignored if numInterfaces is zero piInterfaceRequired in Array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code XA_RESULT_FEATURE_UNSUPPORTED will be then returned This pa
141. the values associated with KhronosAlbumArtJPEG and KhronosAlbumArtPNG keys have the encoding XA_CHARACTERENCODING_BINARY Seek Points XAMetadataExtractionItf can be used for querying the seek points of the media This is done by using the standard metadata ASCII key KhronosSeekPoint The associated value of Khronos seek points are represented with XAMet adat a Info structures which is the case with all the metadata keys The character encoding of this XAMet adat aInfo structure is XA_CHARACTERENCODING_BINARY since the value has special format described in Figure 16 ypenMAX AL p character encoding time offset name of the name 1 4 5 8 9 ps length Figure 16 Fields of KhronosSeekPoint XAMetadataInfo The data field of the XAMetadataInfo struct contains in its first 4 bytes the time offset little endian of the seek point as XAmilliseconds The length of the value is 4 bytes since XAmillisecond is XAuint 32 SeekItf SetPosition can be used for seeking that seek point The bytes from the 5th to the 8th contain the character encoding of the name of the seek point as a XA_CHARACTERENCODING macro Starting from the 9th byte the data field contains the name of the seek point for example the chapter name in the character encoding defined in bytes 5 to 8 and the language defined in the XAMet adata Info struct The name is always null terminated which means that even if the n
142. unknown The length of the Radio Text information element is 64 characters maximum Therefore the application needs to pass here an array of length 129 since each character used in RDS can take two UTF 8 encoded words and the string is null terminated in RDS can take two UTF 8 encoded words and the string is null terminated Should be ignored if pbescriptorContentType is zero pDescriptorContentType out The Radio Text class of the descriptor One of the classes XA_RDSRTPLUS_PLACE XA_RDSRTPLUS_APPOINTM XA_RDSRTPLUS_IDENTIFIE XA_RDSRTPLUS_PURCHASE or XA_RDSRTPLUS_GETDATA If this is zero no associated descriptor is available for pDescriptor out Descriptor associated with the Radio Text information element that was queried The length of the descriptor element is also 64 characters maximum Therefore the application needs to pass here an array of length 129 since each character used the queried RT information element Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments A RT information element can be complemented by another information element pDescriptor Therefore this method has also ppescriptor and pDescriptorContentType as additional out parameters The descriptor itself belongs to PLACE APPOINTMENT PURCHASE or GETDATA class COpenMAX AL GetProgrammeType
143. used to determine the default LED array s capabilities Structure defining the capabilities of the LED array device Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments An application can determine the number of LED array devices by calling this method with pDescriptor set to NULL and examining pIndex The application can then determine the capabilties of all the LED array devices by calling this method multiple times with p Index pointing to each different index from 0 up to one less than the number of LED array devices An LED array device is selected using the Create LEDDevice method XA_DEFAULTDEVICEID_LED see section 9 2 26 ypenMAX AL i OueryVibraCapabilities XAresult QueryVibraCapabilities XAEngineItf self XAuint32 pIndex XAuint32 pVibraDevicelID XAVibraDescriptor pDescriptor Oueries the vibration device for its capabilities pIndex in out As an input specifies which vibration device to obtain the capabilities of the supported range is 0 n where n is the number of vibration devices available ignored if pDescriptor is NULL As an output specifies the number of vibration devices available in the system Returns 0 if no vibration devices are available i pVibraDeviceld in out If pIndex is non NULL then returns the vibration device ID corresponding to vibration
144. vailableAudioInputsChangedCallback XAresult RegisterAvailableAudioInputsChangedCallback XAAudiolODeviceCapabilitiesItf self xaAvailableAudioInputsChangedCallback callback void pContext Sets or clears xaAvailableAudioInputsChangedCallback self Interface self reference pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID xaAvailableAudiolInputsChangedCallback MypenMAX AL i GetAvailableAudioOutputs XAresult GetAvailableAudioOutputs XAAudioIODeviceCapabilitiesIt self XAint32 pNumOutputs XAuint32 pOutputDeviceIDs Gets the number and IDs of audio output devices currently available pOutputDevicelIDs As an input specifies the size of the pOutputDevicelDs array ignored if pOutputDevicelDs is NULL As an output specifies the number of audio output devices currently available in the system Returns 0 if no audio output devices are active in the system pNumOut put s is equal to or greater than the number of actual device IDs pNumOutputs in out Tr SUCCI BUFF Return value The return value can be one of the following XA RESULT XA RESULT 1 XA RESUL i out Array of audio output device IDs that are currently available in the system This parameter is populated
145. value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_MEMORY_FAILURE If the engine fails to create the object due to lack of memory or resources it will return the XA RESULT MEMORY FAILURE or the XA RESULT RESOURCE ERROR error respectively See also XACameraCapabilitiesIt f see section 8 7 to determine the capabilities of the camera device Camera I O device object see section 7 1 ypenMAX AL Si CreateRadioDevice XAresult CreateRadioDevice XAEngineItf self XAObjectIt f pDevice XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired Creates a radio device None out Newly created radio device object numInterfaces in Number of interfaces that the object is requested to support not including implicit interfaces piInterfacelds in Array of numInterfaces interface IDs which the This parameter is ignored if numInterfaces is zero object should support piInterfaceRequired in Array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code XA RESULT FEATURE UNSUPPORTED will be then returned This parameter is ignored if numInterfaces is ze
146. value can be one of the following XA_RESULT_SUCC XA_RESULT_PARAMETER_INVALID Comments The range returned by GetBandLevelRange must at least include OmB The application may pass NULL as one of the out parameters to find out only the other one s value ypenMAX AL 171 SetBandLevel XAresult SetBandLevel XAEqualizerItf self XAuint16 band XAmillibel level Sets the given equalizer band to the given gain value Parameters Interface self reference band in Frequency band that will have the new gain The numbering of the bands starts from 0 and ends at number of bands 1 level in New gain in millibels that will be set to the given band getBandLevelRange will define the maximum and minimum values Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_CONTROL_LOST GetBandLevel XAresult GetBandLevel XAEqualizerItf self XAuint16 band XAmillibel pLevel Gets the gain set for the given equalizer band Parameters Interface self reference band in Frequency band whose gain is requested The numbering of the bands starts from 0 and ends at number of bands 1 out Gain in millibels of the given band This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID
147. was registered in User context data that is supplied when the callback method is registered ypenMAX AL z xaSnapshotTakenCallback typede void XAAPIENTRY X xaSnapshotTakenCallback XASnapshotItf caller void context XAuint32 numberOfPicsTaken const XADataSink pImage This method is called when the snapshot has been taken Parameters caller Interface on which this callback was registered context in Callback context passed to XASnapshotItf InitiateSnapshot numberOfPicsTaken in The number of snapshots taken if the shooting was successful zero if snapshots couldn t be taken because some reason including out of memory situations and situations when forced flash wasn t loaded pimage in A memory address data sink the picture that was taken The application should use Re leaseBuf fer to free the allocated memory after the application has completed processing with the image data Please note that if a data sink was specified with InitiateSnapshot method the picture s is are stored in the location defined by the XADat aS ink instead Comments A hint remember to unfreeze the viewfinder by changing the viewfinder player to the playing state after some time if the viewfinder was frozen Or you might want to ask the end user if he or she wants to save the image before unfreezing In some implementations the saving to the XADataSink specified by InitiateSnapshot method can be
148. will specify which objects accept the data locators defined by the extension COpenMAX AL 3 6 8 Interface ID Allocation Scheme A common interface ID allocation scheme shall be used for vendor specific interface IDs to prevent collisions by different vendors The UUID mechanism provided freely in the Web site below is highly recommended to be used by all providers of extensions http www itu int ITU T asn1 uuid html The interface IDs do not have to be registered it is assumed that the above mechanism will never generate the same ID twice 3 6 9 Avoiding Naming Collisions It is recommended that vendors providing extended APIs qualify all the global identifiers and macros they provide with some unique prefix such as the vendor name This prefix will come after the API prefix such as XAAcmeDistortionItf This is meant to reduce the risk of collisions between vendor specific identifiers and other versions of the specification of other vendors The example below demonstrates using extensible features of the specification The code will compile both on implementations which support the extended API as well as those which do not void ShowExtensibility XAEnginelItf eng XAresult res XAboolean supported XAObjectItf player XAAcmeDistortionItf distortionItf XAPlayItf playbackit XAmillibel vol create an audio player res ng gt CreateMediaPlayer eng amp player
149. 0 to N 1 where N is the number of capabilities structures one for each profile mode pair of the encoder There is one structure per profile mode of the encoder Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALID Comments This method outputs a structure that contains one or more pointers to arrays The memory for these arrays shall be allocated by the OpenMAX AL implementation and shall not be deallocated by the application The OpenMAX AL implementation shall keep the data contained within the arrays valid for the lifetime of this interface s host object The memory for the structure itself is allocated by the application and therefore shall be freed by the application GetAudioEncoders pDescriptor Pointer to structure defining the capabilities of the audio encoder ypenMAX AL i 8 5 XAAudiolODeviceCapabilitiesitf Description This interface is for enumerating the audio I O devices on the platform and for querying the capabilities and characteristics of each available audio I O device This interface is supported on the engine object see section 7 2 See section D 2 and section D 4 for examples using this interface Prototype XA_API extern const XAInterfaceID XA_IID_AUDIOIODEVICECAPABILITIES struct XAAudiolIODeviceCapabilitiesItf_ typedef const struct XAAudiolODeviceCapabilitiesItf_ const XAAudioIODeviceCapabilitiesI
150. 000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 453 define XA VIDEOLEVEL H263 10 XAuint32 0x00000001 define XA VIDEOLEVEL H263 20 XAuint32 0x00000002 define XA VIDEOLEVEL H263 30 XAuint32 0x00000003 define XA_VIDEOLEVEL_H263_40 XAuint32 0x00000004 define XA _VIDEOLEVEL_H263_ 45 XAuint32 0x00000005 define XA_VIDEOLEVEL_H263_ 50 XAuint32 0x00000006 define XA _VIDEOLEVEL_H263_ 60 XAuint32 0x00000007 define XA VIDEOLEVEL H263 70 XAuint32 0x00000008 These macros are used for defining H 263 video profiles and levels Description H 263 Baseline Profile H 263 H 320 Coding Efficiency Version 2 Backward Compatibility Profile H263 BASEL _H263_H320CODING _H263_BACKWARDCOMPATIBLE H 263 Version 1 Backward Compatibility Profile _H263_ISWV2 H 263 Version 2 Interactive and Streaming Wireless Profile _H263_ISWV3 H 263 Version 3 Interactive and Streaming Wireless Profile _H263_HIG ESSION H 263 Conversational High Compression Profile H 263 Conversational Internet Profile H 263 Conversational Interlace Profile HLATE H 263 High Latency Profile H 263 Level 10 H 263 Level 20 H 263 Level 30 H 263 Level 40 H 263 Level 45 H 263 Level 50 H 263 Level 60 H 263 Level 70
151. 000003 define XA_OBJECTID_MEDIAPLAYER XAuint32 0x00000004 define XA_OBJECTID_MEDIARECORDER XAuint32 0x00000005 define XA_OBJECTID_RADIODEVICE XAuint32 0x00000006 define XA_OBJECTID_OUTPUTMIX XAuint32 0x00000007 define XA_OBJECTID_METADATAEXTRACTOR XAuint32 0x00000008 define XA_OBJECTID_CAMERADEVICE XAuint32 0x00000009 These macros are the object identifiers use while querying for the supported interfaces RACTOR 9 2 51 XA_ORIENTATION define XA_ORIENTATION_UNKNOWN define XA_ORIENTATION_OUTWARDS define XA_ORIENTATION_INWARDS XAuint32 0x00000001 XAuint32 0x00000002 XAuint32 0x00000003 These macros are used to describe the device orientation relative to the user XA_ORIENTATION_UNKNOWN The pointing direction of the device is user configurable or cannot be known for some other reason ENTA ION_INWARDS The device is pointing towards the user when the device is held in a natural way ION_OUTWARDS The device is pointing away from the user when the device is held in a natural way XA ORII XA ORIE 429 9 2 52 XA PCM REPRESENTATION define XA PCM REPRESENTATION SIGNED INT define XA PCM REPRESENTATION UNSIGNED INT define XA PCM REPRESENTATION FLOAT XAuint32 0x00000001 XAuint32 0x00000002 XAuint32 0x00000003 XA_P
152. 00004 define XA_IODEVICE_RADIO XAuint32 0x00000005 define XA_IODEVICE_AUDIOOUTPUT XAuint32 0x00000006 These macros are used when creating I O device data sources and sinks XA_IOD __AUDIOINPUT Device for audio input such as microphone or line in _L i EVICE XA_IODEVICE_LEDARRAY Device for LED arrays XA_IODEVICE_VIBRA Device for vibrators COpenMAX AL a E_ CAMERA Device for camera used for capturing images __RADIO Device for tuning radio signals __AUDIOOUTPUT Device for audio output 9 2 39 XA_METADATA_FILTER define XA METADATA FILTER KEY XAuint8 0x01 define XA METADATA FILTER LANG XAuint8 0x02 define XA METADATA FILTER ENCODING XAuint8 0x04 Bit masks for metadata filtering criteria a mm I 9 2 40 XA_METADATATRAVERSALMODE define XA_METADATATRAVERSALMODE_ALL XAuint32 0x00000001 define XA_METADATATRAVERSALMODE_NODE XAuint32 0x00000002 XA_METADA RAVERSALMODE represents a method of traversing metadata within a file ie ooo oooO _ALL Search the file linearly without considering its logical organization Search by individual nodes boxes chunks etc within a file This is the default mode with the default active node being the root node ypenMAX AL L 9 2 41 XA_MIDIBANK define XA_MIDIBANK_DEVICE 0x00000001
153. 0003 define XA_AUDIOMODE_REALAUDIO_SURROUND XAuint32 0x00000004 The macros are used for defining the Real Audio audio profiles and modes E RE RealAudio Encoder ODE_REALAUDIO_G2 RealAudio G2 ODE_REALAUDIO_8 RealAudio 8 ODE_REALAUDIO_10 RealAudio 10 ODE_REALAUDIO_SURROUND RealAudio Surround ypenMAX AL Vorbis Profiles and Levels define XA AUDIOPROFILE VORBIS XAuint32 0x00000001 define XA AUDIOMODE VORBIS XAuint32 0x00000001 The macros are used for defining the Vorbis audio profiles and modes XA_AUDIOPROFILE_VORBIS Vorbis Encoder XA_AUDIOMODE_VORBIS Default mode for Vorbis encoded audio 9 2 5 XA_BOOLEAN define XA BOOLEAN FALSE XAboolean 0x00000000 define XA BOOLEAN TRUE XAboolean 0x00000001 Canonical values for Boolean type Yawe eseription S O AN FALSE False value for XAboolean AN TRUE True value for XAboolean COpenMAX AL 9 2 6 XA BYTEORDER define XA BYTEORDER BIGENDIAN XAuint32 0x00000001 define XA_BYTEORDER_LITTLEENDIAN XAuint32 0x00000002 define XA_BYTEORDER_NATIVE lt system dependent gt XA_BY ER represents the byte order of a block of 16 bit 32 bit or 64 bit data Big endian data EENDIAN Little endian data Either big or little endian based on system configuration via XA_BYTEORDER_NATIVEBIGENDIAN 9 2 7 XA_CAMERA_APERTUREMODE define XA_CAMERA_AP
154. 0007 0x00000008 0x00000009 0x0000000A 0x0000000B 0x0000000C 0x0000000D 0x0000000E 0x0000000F 0x00000010 0x00000011 0x00000012 0x00000013 0x00000014 0x00000015 0x00000016 0x00000017 0x00000018 0x00000019 0x0000001A 0x0000001B 0x0000001C 0x0000001D XA_CONTAINERTYPE represents the container type of the data source or sink Value Description XA_CONTAINERTYPE_UNSPECIFIED The container type is not specified XA_CONTAINERTYPE_RAW There is no container Content is in raw form XA_CONTAINERTYPE_ASF The container type is ASF XA_CONTAINERTYPE_AVI The container type is AVI XA_CONTAINERTYPE_BMP The container type is BMP XA_CONTAINERTYPE_JPG The container type is JPEG XA_CONTAINERTYPE_JPG2000 The container type is JPEG 2000 XA_CONTAINERTYPE_M4A The container type is M4A XA_CONTAINERTYPE_MP3 The container type is MP3 XA_CONTAINERTYPE_MP4 The container type is MP4 XA_CONTAINERTYPE_MPEG_ES The container type is MPEG Elementary Stream XA_CONTAINERTYPE_MPEG_PS The container type is MPEG Program Stream ypenMAX AL 412 Value Description XA_
155. 00100 define XA_RATEPROP_STAGGEREDAUDIO XAuint32 0x00000200 define XA_RATEPROP_NOPITCHCORAUDIO XAuint32 0x00000400 define XA_RATEPROP_PITCHCORAUDIO XAuint32 0x00000800 These values represent the rate related properties of an object a EPROP_STAGGERE Displays staggered video Implementation presents a subset of video frames dropping some intermediate frames This property accommodates limitations of rewind and high speed fast forward EPROP_SMOOTHVIDI Displays smooth video Implementation presents all video frames but the presentation timing respects the current rate EPROP_SILE UDIO Silences audio output This property accommodates limitations of rewind and high speed fast forward EPROP_STAGGEREDAUDIO Plays small chunks of audio at 1x forward skipping segments of audio between chunks The progression of the playback head between chunks obeys the direction and speed implied by the current rate This property accommodates limitations of rewind and high speed fast forward a EPROP_NOPITCHCORAUDIO Plays audio at the current rate but without pitch correction EPROP_PITCHCORAUDIO Plays audio at the current rate but with pitch correction ypenMAX AL 9 2 63 XA RDS EVENT define XA RDS EVENT NEW PI XAuint16 0x0001 define XA RDS EVENT NEW PTY XAuint16 0x0002 define XA RDS EVENT NEW PS XAuint16 0x0004 define XA
156. 1a 1 1df a6f9 0002a5d5c5 1b Defaults The default values are 50 for brightness 0 for contrast and 1000 for gamma Methods SetBrightness XAresult SetBrightness XAImageControlsItf self XAuint32 brightness Sets the brightness level brightness Defines the brightness level The value for brightness ranges from 0 to 100 where 0 produces all black pixels and 100 produces all white XA RESULT PARAMETER INVALID is returned if an unsupported brightness level is reguested Return value The return value can be one of the following XA RESULT SUCCESS XA RESULT PARAMETER INVALID ypenMAX AL GetBrightness XAresult GetBrightness XAImageControlsItf self XAuint32 pBrightness Gets the current brightness level in Interface self reference pBrightness out Current brightness level The value for brightness ranges from 0 to 100 where 0 produces all black pixels and 100 produces all white Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetContrast XAresult SetContrast XAImageControlsItf self XAint32 contrast Sets the contrast level Parameters Interface self reference contrast in Defines the contrast level The value for contrast ranges from 100 to 100 where 0 indicates no contrast change XA RESULT PARAMETER INVALID is returned if
157. 24BITARGB6666 XA_COLORFORMAT_ 24BITABGR6666 These values are used to set pixel color formats XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 0x0000000A 0x0000000B 0x0000000C 0x0000000D 0x0000000E 0x0000000F 0x00000010 0x00000011 0x00000013 0x00000015 0x00000016 0x00000018 0x00000019 0x0000001A 0x0000001B 0x0000001C 0x0000001D 0x0000001E 0x0000001F 0x00000020 0x00000021 0x00000022 0x00000023 0x00000024 0x00000025 0x00000026 0x00000029 0x0000002A 0x0000002B Value Description XA_COLORFO RMAT_UNUSED Value used when color format is not used or applicable XA_COLORFO RMAT_MONOCHROME 1 bit per pixel monochrome XA_COLORFO RMAT_8BITRGB332 8 bits per pixel RGB format with colors stored as Red 7 5 Green 4 2 and Blue 1 0 XA_COLORFO R
158. 32 pBitratesSupported XAuint32 numBitratesSupported XAuint32 profileSetting XAuint32 modeSetting XAuint32 streamFormat XAAudioCodecDescriptor This structure is used for querying the capabilities of an audio codec Maximum number of audio channels Minimum bits per sample of PCM data Maximum bits per sample of PCM data minSampleRate Minimum sampling rate supported maxSampleRate Maximum sampling rate supported isFreqRangeContinuous Returns XA_BOOLEAN_TRUE if the device supports a continuous range of sampling rates between minSampleRate and maxSampleRate otherwise returns XA_BOOLEAN_FALSE pSampleRatesSupported Indexed array containing the supported sampling rates Ignored if isFreqRangeContinuous is XA_BOOLEAN_TRUE If pSampleRatesSupported is NULL the number of supported sample rates is returned in numSampleRatesSupported numSampleRatesSupported Size of the pSamplingRatesSupported array Ignored if isFreqRangeContinuous is XA_BOOLEAN_TRUE minBitRate Minimum bitrate maxBitRate Maximum bitrate isBitrateRangeContinuous Returns XA_BOOLEAN_TRUE if the device supports a continuous range of bitrates between minBitRate and maxBitRate otherwise returns XA_BOOLEAN_FALSE ypenMAX AL C pBitratesSupported Indexed array containing the supported bitrates Ignored if isBitrateRangeContinuous is XA_BOOLEAN_TRUE If pBitratesSupported is NULL
159. ADILO XA RADLO XA RADLO ENCY CHANG ENCY RANGI ET CHANGI 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 0x0000000A This event indicates that the status of the antenna was changed Some devices contain antennas that can be unplugged from the device The event IntData parameter for this event is not used and shall be ignored The eventBooleanData parameter for this event is XA_BOO JEAN_FALS XA BOO EAN RUI E if the antenna was detached and E if the antenna was attached This event indicates that the frequency was changed This can be caused either by manual tuning with SetFrequency or by automatic switching based on RDS The event IntData parameter for this event contains the new frequency in Hertz The eventBooleanData parameter for this event is XA_BOO EAN RUI E if the the change of the frequency was automatic and caused by RDS related reason and XA_BOO EAN_FALSE otherwise This event indicates that the frequency range was changed The event IntData parameter for this event contains the new frequency range See XA_Freq_Range macros The eventBooleanData parameter for this event is not used and shall be ignored This event indicates that a preset has been modified This can be
160. AEE AEE EE RE OE EEEE EE EEEE EE EE EEE EEEE 213 8 23 XAMETADATAMESSAGEITE riea o CSE EEE EE E REOR oig AE EEE 224 8 24 XAMETADATATRAVERSALITE 0 0 0 esse cesecseecseeesceeneesneesccesceseessecsaecsaecnsecaaecaaseneveneesnsesseeseeeseesessaeenaeenaes 226 8 25 DA OBIBCTUI TB corine iieiea a sues see sanseeed sea E EE A EE o EEEE REE EEE EE ede Geasies sdosi const voznGeta sess ies 231 8 26 XAOUTPUTMIXITE ne Sede Sadi e EE Si Ree hatte eee Ree ae ee Ae Ge es 241 8 27 XAPLAYI TE osar eree a R a EE EA E degen tecnster cage AE RE 245 8 28 XAPLAYBACKRATEITE scire a E E a E E ERE E SVE E EEE AEEA SEEE eee 255 8 29 AAPREFETCHSTATUSITE rcii oi pie aR a deotecadodestastaescesnsetecaape cewteanes tesaacesuasersceticades tens 262 8 30 AARADIOD ESG TSNGHA E E EE ed ogE E E A ae 268 8 31 XARDSI BE castes vacates cqntesetata cece se E E A E cause osetiny N E E R A 283 8 32 XARECORDITF ir iaeiei ni n a a aa aei ae aa R ni a aa a ai aei 301 8 33 DA SEERITE necne oiaren e eo Sea E soe ences E E ERE HH E N AEE EE 310 8 34 XASNAPSHOTITE onreine a E E E E E ewe Gans Noa E E E EEE 314 8 35 AASTREAMINFORMATIONITE seseoeaeeseassheeneaseissaishs ieissocsassassageisagsasasshsish sE ei eK EEEE PEKEE K OE eh kss av inii 324 8 36 KATHREADS YNCITP pesnitve ie arti E NE EEEE EEDE oe EA TT SERET sae 333 8 37 XAVIBRAITF sider rer orare erar aee VEE O EEE E rE EE SEE E EEE E NEEE EE EEEE E ERE ESEE EE ER EPES EEE AEE Eri EE 335 8 38 XA VIDEODECODERCAPABILITIESITE 0 ceessesseseeeeee
161. AFORMAT PCM XAuint32 0x00000002 define XA _DATAFORMAT RAWIMAGE XAuint32 0x00000003 define XA_DATAFORMAT PCM EX XAuint32 0x00000004 These values represent the possible data locators XA_DATAFORMAT_MIME Data format is the specified as a MIME type XA_DATAFORMAT_PCM Data format is PCM Deprecated XA_DATAFORMAT_RAWIMAGE Data format is raw image XA_DATAFORMAT_PCM_EX Data format is PCM_EX ypenMAX AL 9 2 25 define define define define define define define define define define XA_DATALOCATOR XA_DATALOCATOR_NULL XA_DATALOCATOR_URI XA_DATALOCATOR_ADDRESS XA_DATALOCATOR_IODEVICE XA_DATALOCATOR_OUTPUTMIX XA_DATALOCATOR_NATIVEDISPLAY XA_DATALOCATOR_RESERVED6 XA_DATALOCATOR_RESERVED7 XA_DATALOCATOR_MEDIAOBJECT XA_DATALOCATOR_CONTENTPIPE These values represent the possible data locators Description ESS X Al Al IX F _DA _DA ECT _DA 9 2 26 define define define define define ENTPIPE XA_DEFAULTDEVICEID XA_DEFAULTDEVICEID AUDIOINPUT XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 No data will be generated or co
162. AGEENCODER and METADATAINSERTION interfaces required 0 XA_BOOLEAN_TRUE Biol mail OMS SA ICID SIVA SHOS 0 required 1 XA_BOOLEAN_TRUE iidArray 1 XA_IID_IMAGEENCODER required 2 XA_BOOLEAN_TRUE iidArray 2 XA_IID_METADATAINSERTION fs Create che players res engineItf gt CreateMediaRecorder engineItf amp recorder NULL amp videoSource amp fileSink 3 ilidArray required CheckErr res Realizing the player in synchronous mode res recorder gt Realize recorder XA_BOOLEAN FALSE CheckErr res Get the interfaces res recorder gt GetInterface recorder XA_IID_SNAPSHOT void amp snapshotItf CheckErr res res recorder gt GetInterface recorder XA_IID_IMAGEENCODER void amp imageEncoderItf CheckErr res res recorder gt GetInterface recorder XA_IID_METADATAINSERTION void amp metadataInsertionItf CheckErr res Register callbacks res metadataInsertionItf gt RegisterCallback metadataInsertionItf MetadataInsertionCallback NULL CheckErr res SET UP THE CAMERA set the image codec and resolution Real application should first check the support with ImageEncoderCapabilitiesItf imageSettings encoderId XA_IMAGECODEC_JPEG imageSettings width 1024 imageSettings height 6 imageSettings compressionLevel 0 default compression
163. ALID The maximum supported level is implementation dependent but will always be at least 0 mB MypenMAX AL SetMute XAresult SetMute XAVolumeItf self XAboolean mute Mutes or unmutes the object Parameters tin fin Interface self reference tin tiny true the object is muted If false the object is unmuted Return value The return value can be the following XA_RESULT_SUCCESS Comments Muting the object does not change the volume level reported by Get VolumeLevel Calling SetMute with mute set to true when the object is already muted is a valid operation that has no effect Calling SetMute with mute set to false when the object is already unmuted is a valid operation that has no effect XAresult GetMute XAVolumelItf self XAboolean pMute Retrieves the object s mute state Parameters self self f in lin Interface self reference sm Pointer to a Boolean to receive the object s mute state This must be non NULL Return value haa return can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID MypenMAX AL k EnableStereoPosition XAresult EnableStereoPosition XAVolumeItf self XAboolean enable Enables or disables the stereo positioning effect Parameters Interface self reference enable in Iftrue enables the stereo position effect I
164. ATUS XAuint32 0x00000003 define XA_CAMERACBEVENT EXPOSURESTATUS XAuint32 0x00000004 define XA_CAMERACBEVENT WHITEBALANCELOCKED XAuint32 0x00000005 define XA _CAMERACBEVENT_ ZOOMSTATUS XAuint32 0x00000006 These values are used to identify the callback event type ENT_ROTATION This event indicates that a change in the camera s rotation setting has occurred The eventData parameter will specify the new rotation setting A rotation value of 0 degrees indicates the camera is un rotated A value of OxFFFFFFFF will be returned if the camera rotation can not be determined EVENT_FLASHRE This event indicates that the flash is ready for use The eventData parameter for this event is not used and shall be ignored ENT_FOCUSSTATUS This event indicates that focusing is completed The eventData parameter contains the focus status see XA_CAMERA_FOCUSMODESTATUS XA_CAMERACBEVENT_EXPOSURESTATUS This event indicates that locking of the auto exposure is completed The eventData parameter contains the exposure status see XA_CAMERA_AUTOEXPOSURESTATUS XA_CAMERACBEVENT_WHITEBALANCELOCKED This event indicates that locking of the automatic white balance is completed The eventData parameter for this event is not used and shall be ignored XA_CAMERACBEVENT_ZOOMSTATUS This event indicates that zooming is completed The eventData parameter contains the zoom setting in permille units
165. AULTDEVICEID_CAMERA see section 9 2 26 ypenMAX AL i QueryFocusRegionPatterns XAresult QueryFocusRegionPatterns XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAuint32 pPatternID XAuint32 pFocusPattern XAuint32 pCustomPointsl1 XAuint32 pCustomPoints2 Oueriesthe camera devicefor itsfocusregion patterns pPatternID in out If pFocusPattern is NULL pPatternID returns the number of focus region patterns supported by the camera Returns 0 if no focus region patterns are supported If pFocusPattern is non NULL pPatternID is an incrementing value used for enumerating focus region patterns Supported index range is 0 to N 1 where N is the number of focus region patterns pFocusPattern Focus point pattern used by the camera See XA_FOCUSPOINTS macros custom focus points information pCustomPoints2 See description of pCustomPointsl Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID pCustomPoints1 out Identifies the focus points available for the custom focus region pattern XA_FOCUSPOINTS_CUSTOM The parameter returns points that are selectable and the points are identified as a bit array This parameter is to be ignored if not used to query for the GetSupportedAutoLocks XAresult GetSupportedAutoLocks XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAuint32 pNumCombinations
166. A_RESULT_PRECONDITIONS_VIOLATED None ypenMAX AL i Resumelnterface XAresult ResumeInterface XADynamicInterfaceManagementItf self const XAInterfaceID iid XAboolean async I Optionally asynchronous method for resuming a dynamically exposed interface on the object Parameters in Interface self reference in Valid interface type ID that has been exposed on this object by use of the Addinterface method aync in If XA_BOOLEAN_FALSE the method will block until termination Otherwise the method will return XA_RESULT_SUCCESS and will be executed asynchronously However if the implementation is unable to initiate the asynchronous call XA_RESULT_RESOURCE_ERROR will be returned Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments When successful the interface is exposed on the object and the interface pointer can be obtained by XAObjectItf GetInterface This method can be used on a Suspended dynamic interface after reception of a resources available event XA_DYNAMIC_ITF_EVENT_RESOURCE_AVAILABLE RegisterCallback XAresult RegisterCallback XADynamicInterfaceManagementItf self xaDynamicInterfaceManagementCallback callback void pContext Description Registers a callback on the object that executes when a runtime error terminat
167. Auint32 0x00000000 define XA_RENDERINGHINT_ANTIALIASING XAuint32 0x00000001 These values represent rendering hints for image and video processing They can be used with XAVideoPostProcessingItf F ERINGHINT_ 9 2 69 ERINGHINT _ANTIALIASING quality XA_RESULT No specific hint is given The application prefers speed A hint to use anti aliasing in processing The application prefers define XA_RESULT_SUCCESS XAuint32 0x00000000 define XA RESULT PRECONDITIONS VIOLATED XAuint32 0x00000001 define XA RESULT PARAMETER INVALID XAuint32 0x00000002 define XA_RESULT_MEMORY_FAILURE XAuint32 0x00000003 define XA_RESULT_RESOURCE_ERROR XAuint32 0x00000004 define XA_RESULT_RESOURCE_LOST XAuint32 0x00000005 define XA RESULT IO ERROR XAuint32 0x00000006 define XA RESULT BUFFER_INSUFFICIENT XAuint32 0x00000007 define XA RESULT CONTENT CORRUPTED XAuint32 0x00000008 define XA RESULT CONTENT UNSUPPORTED XAuint32 0x00000009 define XA RESULT CONTENT NOT FOUND XAuint32 O0Ox0000000A define XA RESULT PERMISSION DENIED XAuint32 0x0000000B define XA RESULT FEATURE UNSUPPORTED XAuint32 0x0000000C define XA_RESULT INTERNAL ERROR XAuint32 0x0000000D define XA_RESULT_UNKNOWN_ERROR XAuint32 Ox0000000E define XA RESULT OPERATION ABORTED XAuint32 0x0000000F define XA RESULT CONTROL LOST XAuint32 0x00000010 define XA RESULT READONLY XAuint32
168. C OpenMAX AL OpenMAX Application Layer Application Programming Interface Specification Version 1 1 Specification Copyright 2011 The Khronos Group Inc January 18 2011 Copyright 2011 The Khronos Group Inc All Rights Reserved This specification is protected by copyright laws and contains material proprietary to the Khronos Group Inc It or any components may not be reproduced republished distributed transmitted displayed broadcast or otherwise exploited in any manner without the express prior written permission of the Khronos Group You may use this specification for implementing the functionality therein without altering or removing any trademark copyright or other notice from the specification but the receipt or possession of this specification does not convey any rights to reproduce disclose or distribute its contents or to manufacture use or sell anything that it may describe in whole or in part Khronos Group grants express permission to any current Promoter Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible Such distributed specification may be reformatted AS LONG AS the contents of the specification are not changed in any way The specification may be incorporated into a product
169. CM_REPRESENTATION denotes the type of PCM data Signed integer data XA_PCM_RE ION_SIGN XA_PCM_RE ION_UNSIGN Unsigned integer data XA_PCM_RE ION_FLOAT Floating point data 9 2 53 XA_PCMSAMPLEFORMAT define XA_PCMSAMPLEFORMAT FIXED_8 define XA_PCMSAMPLEFORMAT FIXED 16 define XA_PCMSAMPLEFORMAT_ FIXED 20 define XA_PCMSAMPLEFORMAT FIXED 24 define XA_PCMSAMPLEFORMAT FIXED 28 define XA_PCMSAMPLEFORMAT_ FIXED 32 define XA_PCMSAMPLEFORMAT FIXED 64 XAuint16 0x0008 XAuint16 0x0010 XAuint16 0x0014 XAuint16 0x0018 XAuint16 0x001C XAuint16 0x0020 XAuint16 0x0040 These macros list the various sample formats that are possible on audio input and output devices Fixed point 32 bit samples in 32 bit container left justifed Fixed point 64 bit samples in 64 bit container left justifed 9 2 54 XA PLAYEVENT define XA_PLAYEVENT_HEADATEND XAuint32 0x00000001 define XA_PLAYEVENT_HEADATMARKER XAuint32 0x00000002 define XA_PLAYEVENT_HEADATNEWPOS XAuint32 0x00000004 define XA_PLAYEVENT_HEADMOVING XAuint32 0x00000008 define XA_PLAYEVENT_HEADSTALLED XAuint32 0x00000010 define XA_PLAYEVENT_DURATIONUPDATED XAuint32 0x00000020 ypenMAX AL 430 These values represent the possible play events Playback head is at the end of the cu
170. CONTAINERTYPE_MPEG_TS The container type is MPEG Transport Stream XA_CONTAINERTYPE_OT The container type is QuickTime XA_CONTAINERTYPE_WAV The container type is WAV XA_CONTAINERTYPE_XMF_0 The container type is XMF Type 0 XA_CONTAINERTYPE_XMF_1 The container type is XMF Type 1 XA_CONTAINERTYPE_XMF_2 The container type is Mobile XMF XMF Type 2 XA_CONTAINERTYPE_XMF_3 The container type is Mobile XMF with Audio Clips XMF Type 3 XA_CONTAINERTYPE_XMF_GENERIC The container type is the XMF Meta File Format no particular XMF File Type XA_CONTAINERTYPE_AMR This container type is the file storage format variant of AMR the magic number in the header can be used to disambiguate between AMR NB and AMR WB XA_CONTAINERTYPE_AAC This container type is for ADIF and ADTS variants of AAC This refers to AAC in aac files XA_CONTAINERTYPE_3GPP The container type is 3GPP XA_CONTAINERTYPE_3GA This container type is an audio only variant of the 3GPP format mainly used in 3G phones XA_CONTAINERTYPE_RM This container type is Real Media XA_CONTAINERTYPE_DMF This container type is Divx media format XA_CONTAINERTYPE_SME This container type is a standard MIDI file SMF SP MIDI XA_CONTAINERTYPE_MOBILE_DLS This container type is a Mobile DLS file mDLS XA_CONTAINERTYPE_OGG This container type is a OGG 9 2 24 XA_DATAFORMAT define XA DATAFORMAT MIME XAuint32 0x00000001 define XA _DAT
171. Callback ypenMAX AL i Methods CreateChildNode XAresult CreateChildNode XAMetadataInsertionItf self XAint32 parentNodeID XAuint32 type XAchar pMimeType XAint32 pChildNodeID Description Creates a new child node for the given parent This child can be utilized with InsertMetadatalItem method This method does not actually write yet anything on media object The actual writing and creation of the node will happen only if the node id is given to InsertMetadatalItem method as argument an ID of the parent node for this new child node type Type of the new node See XA_NODETYPE macros pMimeType in Suggested MIME type for this new child node The given MIME type is a hint only and the implementation might override it The application is allowed to provide a zero length string here if the application doesn t want to specify the MIME type pChildNodeID ID of the created child node Return value The return value can be one of the following XA_RESULT_SUCCESS XA RESULT PARAMETER INVALID XA_RESULT_CONTENT_UNSUPPORTI Comments XA_RESULT_FEATURE_UNSUPPORTED is returned if the media object does not support tree like metadata That is writing metadata only to the root is supported and therefore creating new nodes is not supported XA RESULT CONTENT UNSUPPORTED is returned if the media object does not support the given node type
172. Comments Please note the restrictions applying to operations performed from within callback context in section 3 3 RegisterCallback 133 ypenMAX AL Methods AddInterface XAresult AddInterface XADynamicInterfaceManagementItf self const XAInterfaceID iid XAboolean async Description Optionally asynchronous method for exposing an interface on an object In asynchronous mode the success or failure of exposing the interface will be sent to the registered callback function Interface has not been exposed Parameters self Interface self reference async in If XA_BOOLEAN_FALSE the method will block until termination Otherwise the method will return XA_RESULT_SUCCESS and will be executed asynchronously However if the implementation is unable to initiate the asynchronous call XA_RESULT_RESOURCE_ERROR will be returned Return value The return value can be one of the following XA_RESUL UCCESS XA RESULT RAMETER_INVALID XA RESULT ORY_FAILURE XA_RESUL ECONDITIONS_VIOLATI Comments When successful the interface is exposed on the object and the interface pointer can be obtained by XAObjectItf GetInterface Adding the interface to the object acquires the resources required for its functionality The operation may fail if insufficient resources are available In such a case the application may wait until resources become available XA_DYNAMIC_ITF_EVENT_RESOURCE_AVAILABLE and then resume the inte
173. DING_GB2312 GB 2312 Chinese XA_CHARACTERENCODING_HZGB2312 HZ GB 2312 Chinese XA_CHARACTERENCODING_GB12345 GB 12345 Chinese XA_CHARACTERENCODING_GB18030 GB 18030 Chinese XA_CHARACTERENCODING_GBK GBK CP936 Chinese XA_CHARACTERENCODING_1IS02022JP ISO 2022 JP Japanese XA_CHARACTERENCODING_1IS02022JP1 ISO 2022 JP 1 Japanese XA_CHARACTERENCODING_IS088591 ISO 8859 1 Latin 1 XA_CHARACTERENCODING_IS088592 ISO 8859 1 Latin 2 XA_CHARACTERENCODING_IS088593 ISO 8859 1 Latin 3 XA_CHARACTERENCODING_IS0O88594 ISO 8859 1 Latin 4 XA_CHARACTERENCODING_IS088595 ISO 8859 1 Latin Cyrillic XA_CHARACTERENCODING_IS088596 ISO 8859 1 Latin Arabic XA_CHARACTERENCODING_IS088597 ISO 8859 1 Latin Greek XA_CHARACTERENCODING_1IS088598 ISO 8859 1 Latin Hebrew XA_CHARACTERENCODING_IS088599 ISO 8859 1 Latin 5 XA_CHARACTERENCODING_ISO885910 ISO 8859 1 Latin 6 XA_CHARACTERENCODING_IS0885913 ISO 8859 1 Latin 7 XA_CHARACTERENCODING_IS0885914 ISO 8859 1 Latin 8 XA_CHARACTERENCODING_ISO885915 ISO 8859 1 Latin 9 XA_CHARACTERENCODING_ISOEUCJP ISO EUC JP XA_CHARACTERENCODING_SHIFTJIS Shift JIS Japanese XA_CHARACTERENCODING_SMS7BIT SMS 7 bit XA_CHARACTERENCODING_UTF7 Unicode UTF 7 XA_CHARACTERENCODING_IMAPUTF7 Unicode UTF 7 per IETF RFC 2060 XA_CHARACTERENCODING_UTF8 Unicode UTF 8 XA_CHARACTERENCODING_JAVACONFORMANTUTF8 Unicode UTF 8 Java Conformant XA_CHARACTERENCODING_UTF16BE Unicode UTF 16 Big Endian XA_CHARACTERENC
174. DSPROGRAMMETYPE_RBDSPTY_RHYTHMANDBLUES XAuint32 0x00000010 ypenMAX AL 439 define XA RDSPROGRAMMETYPE RBDSPTY SOFTRHYTHMANDBLUES XAuint32 0x00000011 define XA RDSPROGRAMMETYPE RBDSPTY LANGUAGE XAuint32 0x00000012 define XA RDSPROGRAMMETYPE RBDSPTY RELIGIOUSMUSIC XAuint32 0x00000013 define XA_RDSPROGRAMMETYPE_RBDSPTY_RELIGIOUSTALK XAuint32 0x00000014 define XA_RDSPROGRAMMETYPE_RBDSPTY_PERSONALITY XAuint32 0x00000015 define XA_RDSPROGRAMMETYPE_RBDSPTY_PUBLIC XAuint32 0x00000016 define XA_RDSPROGRAMMETYPE_RBDSPTY_COLLEGE XAuint32 0x00000017 define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED1 XAuint32 0x00000018 define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED2 XAuint32 0x00000019 define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED3 XAuint32 0x0000001A define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED4 XAuint32 0x0000001B define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED5 XAuint32 0x0000001C define XA_RDSPROGRAMMETYPE_RBDSPTY_WEATHER XAuint32 0x0000001D define XA_RDSPROGRAMMETYPE_RBDSPTY_EMERGENCYTEST XAuint32 0x0000001E define XA_RDSPROGRAMMETYPE_RBDSPTY_EMERGENCY XAuint32 0x0000001F The RDS Programme Types are XA_RDSPROGRA ETYPE RDSPTY EDUCATION ypenMAX AL i
175. DecoderCapabilitiesItf struct XAAudioDecoderCapabilitiesItf_ XAresult GetAudioDecoders XAAudioDecoderCapabilitiesItf self XAuint32 pNumDecoders XAuint32 pDecoderIds XAresult GetAudioDecoderCapabilities XAAudioDecoderCapabilitiesIt self XAuint32 decoderId XAuint32 pIndex XAAudioCodecDescriptor pDescriptor Interface ID deac0cc0 3995 1 1dc 8872 0002a5d5c5 1b Defaults Not applicable ypenMAX AL i Methods GetAudioDecoders XAresult GetAudioDecoders XAAudioDecoderCapabilitiesIt self XAuint32 pNumDecoders XAuint32 pDecoderIds Retrieves the available audio decoders Parameters Interface self reference pNumDecoders in out If pDecoderIds is NULL pNumDecoders returns the number of decoders available All implementations must have at least one decoder If pDecodersIds is non NULL as an input pNumDecoders specifies the size of the pDecoderIds array and as an output it specifies the number of decoder IDs available within the pDecoderlIds array pDecoderlIds out Array of audio decoders provided by the engine Refer to XA_AUDIOCODEC macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetAudioDecoderCapabilities ypenMAX AL i GetAudioDecoderCapabilities XAresult GetAudioDecoderCapabilities XAAudioDecoderCapabilitiesItf self XAuint32 decod
176. E XA FOCUSPOINTS THREE 3X1 Focus point pattern for XA_FOCUSPOINTS_THREE_3X1 ypenMAX AL Bi XA FOCUSPOINTS FIVE CROSS Focus point pattern for XA FOCUSPOINTS FIVE CROSS XA FOCUSPOINTS SEVEN CROSS Focus point pattern for XA FOCUSPOINTS SEVEN CROSS EI Ls XA FOCUSPOINTS NINE SOUARE Focus point pattern for XA FOCUSPOINTS NINE SOUARE e s XA_FOCUSPOINTS_ELEVEN_ CROSS Focus point pattern for XA_FOCUSPOINTS_ELEVEN_CROSS ypenMAX AL ms onga EEE a Boo XA_FOCUSPOINTS TWELVE_3X4 Focus point pattern for XA_FOCUSPOINTS_TWELVE_3X4 e s e XA_FOCUSPOINTS_TWELVE_ 4X3 Focus point patter for XA_FOCUSPOINTS_TWELVE_4X3 w Ea E XA_FOCUSPOINTS_SIXTEEN_4X4 Focus point patter for XA_FOCUSPOINTS_ SIXTEEN 4X4 ui E e ypenMAX AL 422 XA FOCUSPOINTS CUSTOM Focus point pattern for XA FOCUSPOINTS CUSTOM EES EES 9 2 35 XA_FREQRANGE define XA FREORANGE FMEUROAMERICA XAuint8 0x01 define XA FREORANGE FMJAPAN XAuint8 0x02 define XA_FREQRANGE AMLW XAuint8 0x03 define XA_FREQRANGE AMMW XAuint8 0x04 define XA_FREQRANGE AMSW XAuint8 0x05 These macros are used to specify the frequency range and the modulation AN EUROAMERICA European and American FM frequency range AN JAPAN Japanese FM frequency range AM Long Wave AM Medium Wave AM Short Wave 9 2 36 XA_IMAGECODEC define XA _IMAGECODEC_JPEG XAu
177. E EEN T E E E EE ES 436 XA RDS_EVENT oaia E E E E E E AE E EEO EE AES 437 XA_RDSPROGRAMMETY BE cecce e AEEKO 438 COpenMAX AL 9 2 65 XA _RDSRTPEUS wsaacshecsazsisetsaeei setsoatipessenie pades bss E E O E E NEE EE AE 443 9 2 66 XA RECORDEVENT scrie E KERE NE N EE EAEE E NEEESE NEn NA CE SEER 446 9 2 67 KA RECORDS TALE vais asoa aE E A A a A EE E A EEEa ai 446 9 2 68 XA RENDERINGHINT oiai E E e A a a Sea ec R E ee eee 447 9 2 69 XA RESULT scenene n a e aa ae ha ini sail e Ea ERER ES 447 9 2 70 XA ROOT NODE ID orere eieiei oaie E EEOSE OE ETET EE E EN E EERS has Fan est 448 9 2 7 XA SAMPLINGRATE eiie i A E A E a E EE Aa E E E 449 9 2 72 XA SEEK MODE iie aa OE E T EER 449 9 2 73 XA STEREO MODE shinee e ea a E EE ERNE eaa od Bha phais cans N EEE A ARR 450 9 2 74 XAS PEAKE Faisin hena RE T E E E N e a lei 450 9 2 75 XA _STREAMCBE VENT siccis ennaa na n a a a i a 451 9 2 76 XAS TUME re E E E E a E AE E E 451 9 2 77 XA VIDEO CODE G soiien eaa Se EAER E E E Aa S aaa 452 9 2 78 XA VIDEOMIRROR sscecesccesssecesecesseetnseceencecsecesacecsaeceeceecsaeceeceecsaeceeaeecsaeceeaeecsaeceeeeeesaeceeeeeenaeess 452 9 2 79 XA_VIDEOPROFILE and XA_VIDEOLEVEL 1 00 ccccssscsssseessceesceenseceeccecseceeneecaecseneeeaeeeeneeeaeees 453 9 2 80 XA VIDE OS CALE peiie EERE evs cpuacaesshicteads covetens EEE chuauete EE E NE RE counters 459 PART 3 APPENDICES 1 isscsusscssssssusiassesesssssasassassevessevsssadtassossssessssastascosesscesosasievaesesseisssasd
178. E VIEWFINDER after the user has previewed the photo unfreeze the viewfinder res playItf gt SetPlayState playItf XA_PLAYSTATE_PLAYING CheckErr res SHUTDOWN Stop the viewkincer res play ter gt 96tP layScace olay Iti XA_PLAYSTATE_STOPPED CheckErr res f DESEO the Cojeces player SDesciroy player p player gt Destroy recorder camera gt Destroy camera Shutdown OpenMAX AL engine gt Destroy engine rerun Oy D 6 Metadata Extraction OpenMAX AL Metadata Extraction include lt stdio h gt include lt stdlib h gt include lt OMXAL OpenMAXAL h gt f Checks Oe error Wir any errors erie the agolicarionml void CheckErr XAresult res if res XA_RESULT_SUCCESS Debug printing to be placed here ex TECDE Prints all ASCII metadata key value pairs from the root of the media since XAMetadataTraversalItf is not used ay void TestMetadataSimple XAMetadataExtractionItf mdExtrItf CpenMAX AL z XAresult res XAuint32 mdCount 0 XAuint32 i scan through the metadata items get the size of and malloc memory for the metadata item res mdExtriItf gt GetKeySize mdExtrItf i e itemsi ze nee eas key malloc itemSize LE key no malloe error extract the k
179. ENIE Failure due to violation of DRM user permissions policies etc E_UNSUPPORTI Failure due to an unsupported feature This can occur either when calling Get Interface on an unsupported interface or when attempting to call a method not supported in an interface This can also occur when an interface with an unknown ID is used either during object creation or in a GetInterface call See Section 2 7 _E Failure due to an unrecoverable internal error KNOWN_ERROR Catch all error including system errors Should never be returned when any of the above errors apply RATION_ABORTED Operation was aborted as a result of a user request Another entity is now controlling the interface and it cannot be controlled by this application currently xaOb jectCallback can be used for monitoring this behavior this error code can only occur between XA_OBJECT_EVENT_ITF_CONTROL_ a XA_OBJE F_CON NED events Operation failed because the parameter in question is Read Only EOPTION_UNSUPPORTED Failure due to an unsupported engine option E SINK INCOMPATIBLE The source and sink being connected are incompatible incompatibility could be due to format and or locator type mismatch
180. ERA_FOCUSPOINTS ypenMAX AL i GetFocusRegionPattern XAresult GetFocusRegionPattern XACameraItf self XAuint32 pFocusPattern XAuint32 pActivePointsl1 XAuint32 pActivePoints2 Gets the camera focus region pattern pFocusPattern out Specifies the focus region pattern Refer to XA_CAMERA_FOCUSPOINTS pActivePointsl Specifies the focus points being used for the custom auto focus region pattern mode XA_CAMERA_FOCUSPOINTS_CUSTOM This parameter identifies the focus points ranging from 0 to 31 This parameter is ignored if manual focus mode is selected or non custom focus points patterns are selected This parameter is a bit mapped representation of the focus points Focus point 0 is identified by bit 0 focus point 1 is identified by bit 1 and so on If a bit is set this indicates the point is to be used for autofocus For example to select only the center sixteen points points 18 to 21 26 to 29 34 to 37 and 42 to 45 e pActivePoints1 will have a value of 0x3C3C0000 e pActivePoints2 will have a value of 0x00003C3C pActivePoints2 See description of activePointsl Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetFocusRegionPattern XA_CAMERA_FOCUSPOINTS COpenMAX AL n GetFocusRegionPositions XAresult GetFocusRegionPositions XACameraIt
181. ERTUREMODE_MANUAL XAuint32 0x00000001 define XA_CAMERA_APERTUREMODE_AUTO XAuint32 0x00000002 These values are used to set camera aperture setting XA_CAMERA_APERTUREMODE_MANUAL Manual aperture mode XA_CAMERA_APERTUREMODE_AUTO Auto aperture mode 9 2 8 XA_CAMERA_AUTOEXPOSURESTATUS define XA_CAMERA AUTOEXPOSURESTATUS_SUCCESS XAuint32 0x00000001 define XA CAMERA AUTOEXPOSURESTATUS_UNDEREXPOSURE XAuint32 0x00000002 define XA CAMERA AUTOEXPOSURESTATUS_OVEREXPOSURE XAuint32 0x00000003 These values represent different statuses of the automatic exposure fave HH EXPOSURE US_SUCCE Auto exposure has been successfully locked EXPOSURE EREXPOSURE Auto exposure has been locked but the photo will we underexposed in the current lighting conditions Consider changing manually the exposure settings or freeing the lock and trying the locking again ERA_AUTOEXPOSURESTATUS_OVEREXPOSURE Auto exposure has been locked but the photo will we overexposed in the current lighting conditions Consider changing manually the exposure settings or freeing the lock and trying the locking again COpenMAX AL i 9 2 9 XA CAMERACBEVENT define XA CAMERACBEVENT ROTATION XAuint32 0x00000001 define XA CAMERACBEVENT FLASHREADY XAuint32 0x00000002 define XA_CAMERACBEVENT_FOCUSST
182. Encoders sin Interface self reference Specifies video encoder Refer to XA_VIDEOCODEC macros piIndex If pCapabilities is NULL pIndex returns the number of capabilities Each encoder must support at least one profile mode pair and therefore have at least one Codec Descriptor If pCapabilities is non NULL pIndex is an incrementing value used for enumerating profiles Supported index range is 0 to N 1 ypenMAX AL al 8 41 XAVideoPostProcessingltf Description The video post processing interface provides operations on video data It is realized on an object that supports image or video content Post processing operations are carried out in the following order 1 Cropping 2 Rotating 3 Mirroring 4 Scaling All the changes will only be committed once Commit is called This allows clients to apply a group of changes to the video stream in one shot How to position the image data on the output screen is out of scope of this interface Scaling Scaling is defined in this API by using three methods Set SourceRectangle SetDestinationRectangle and SetScaleOptions SetSourceRectangle defines the rectangle in the original frame that is to be used for further processing SetDest inat ionRectangle defines then the size of the processed output frame The amount of scaling applied is then determined by the size difference between the source rectangle and destination rectangle together with the sca
183. GE struct XADynamicSourceSinkChangeItf_ typedef const struct XADynamicSourceSinkChangeItf_ const XADynamicSourceSinkChangelItf struct XADynamicSourceSinkChangelItf_ XAresult ChangeSource XADynamicSourceSinkChangeltf self const XADataSource pExistingDataSource const XADataSource pNewDataSource XAboolean async XAresult ChangeSink XADynamicSourceSinkChangeltf self const XADataSink pExistingDataSink const XADataSink pNewDataSink XAboolean async XAresult RegisterSourceChangeCallback XADynamicSourceSinkChangeltf self xaSourceChangeCallback callback void pContext XAresult RegisterSinkChangeCallback XADynamicSourceSinkChangeltf self xaSinkChangeCallback callback void pContext Interface ID 069a2b20 c432 1 1df 85 1a 0800200c9a66 ypenMAX AL Defaults None Callbacks xaSourceChangeCallback typedef void XAAPIENTRY xaSourceChangeCallback XASourceSinkChangelItf caller void pContext XAuint32 resultCode const XADataSource pExistingDataSource const XADataSource pNewDataSource Description Callback that executes whenever the ChangeSource method finishes execution None Parameters caller in Interface instantiation on which the callback was registered pContext in User context data that is supplied when the callback is registered CopenMAX resultCode in Result code indicating the status of the sourc
184. GRATED XA_DEVSCOPE_USER and XA_DEVLOCATION_HANDSET while a Bluetooth headset microphone would have the following values XA_DEVCONNECTION_ATTACHED_WIRELESS XA_DEVSCOPE_USER and XA_DEVLOCATION_HEADSET pDeviceName Human readable string representing the name of the device such as Bluetooth microphone or wired microphone One of the device connection types listed in the XA_DEVCONNECTION macros One of the device scope types listed in the XA_DEVSCOPE macros One of the device location types listed in the XA_DEVLOCATION macros isForTelephony Returns XA_BOOLEAN_TRUE if the audio input device is deemed suitable for telephony uplink audio otherwise returns XA_BOOLEAN_FALSE For example a line in jack would not be considered suitable for telephony as it is difficult to determine what can be connected to it minSampleRate Minimum sampling rate supported maxSampleRate Maximum sampling rate supported isFreqRangeContinuous Returns XA_BOOLEAN_TRUE if the input device supports a continuous range of sampling rates between minSampleRate and maxSampleRate otherwise returns XA_BOOLEAN_FALSE pSamplingRatesSupported Indexed array containing the supported sampling rates as defined in the XA_SAMPLING_RATE macros Ignored if isFreqRangeContinuous is XA_BOOLEAN_TRUE numOfSamplin
185. GetFreqRange XARadioItf self XAuint8 pRange XAresult IsFreqRangeSupported XARadioItf self XAuint8 range XAboolean pSupported XAresult GetFreqRangeProperties XARadioItf self XAuint8 range XAuint32 pMinFreq XAuint32 pMaxFreq XAuint32 pFreqinterval XAresult SetFrequency XARadioItf self XAuint32 freq XAresult CancelSetFrequency XARadioItf self XAresult GetFrequency XARadioItf self XAuint32 pFreq COpenMAX AL XAresult SetSquelch XARadioItf self XAboolean squelch XAresult GetSquelch XARadioItf self XAboolean pSquelch XAresult SetStereoMode XARadioItf self XAuint32 mode XAresult GetStereoMode XARadioItf self XAuint32 pMode XAresult GetSignalStrength XARadioItf self XAuint32 pStrength XAresult Seek XARadioItf self XAboolean upwards XAresult StopSeeking XARadioItf self XAresult GetNumberOfPresets XARadioItf self XAuint32 pNumPresets XAresult SetPreset XARadioItf self XAuint32 preset XAuint32 freq XAuint8 range XAuint32 mode const XAchar pName XAresult GetPreset XARadioItf self XAuint32 preset XAuint32 pFreq XAuint8 pRange XAuint32 pMode XAchar pName XAuint16 pNameLength XAresult RegisterRadioCallback XARadioItf self xaRadioCallback callback void pContext COpenMAX
186. I 9 2 32 XA_ENGINEOPTION Resources have been stolen from the dynamically managed interface causing it to become Suspended Resources have been stolen from the dynamically managed interface causing it to become unrecoverable Resources have become available which may enable the dynamically managed interface to resume define XA ENGINEOPTION_THREADSAFE XAuint32 0x00000001 define XA ENGINEOPTION_LOSSOFCONTROL XAuint32 0x00000002 define XA ENGINEOPTION_MAJORVERSION XAuint32 0x00000003 define XA ENGINEOPTION_MINORVERSION XAuint32 0x00000004 define XA ENGINEOPTION_STEPVERSION XAuint32 0x00000005 Engine object w EOPTION_THREADSAFE Thread safe engine creation option used with XAEngineOption structure see section 9 1 19 If the data field of the XAEngineOption structure is set to XA_BOOLEAN_TRUE the engine object is created in thread safe mode Otherwise the engine object is created a non thread safe mode see section 4 1 1 creation options see section 6 1 ROPTION_LOSSOFCONTROL Global loss of control setting used with XAEngineOption structure see section 9 1 19 If the data field of the XAEngineOption structure is set to XA_BOOLEAN_TRUE the engine object allows loss of control notifications to occur on interfaces Otherwise none of the interfaces exhibits loss of control behavior This global setting is best suit
187. L implementation of the game profile should be capable of playing content encoded with an MP3 codec While this is a recommended practice an implementation could still be considered as conforming to the OpenMAX AL API without implementing this functionality Will The stated functionality is not a requirement for an implementation of the OpenMAX AL API Will is typically used when referring to a third party as in the application framework will correctly handle errors Deprecated Some APIs are marked as deprecated This means that the API was defined in an earlier version of the specification but is no longer recommended for use In most cases a preferred alternative API is available Implementations are permitted to continue providing the deprecated API and applications are encouraged to convert from the deprecated API to the recommended alternative API Deprecated APIs are likely to be removed completely in a subsequent version 1 6 1 Parameter Range Notation Valid parameter ranges are specified using both enumerated lists of valid values and sequential ranges The ranges are specified using the following interval notation Error Reference source not found a b for open intervals a b for closed intervals and a b and a b for half closed intervals defined as follows a b xla lt x lt b a b xla lt x lt b a b xla lt x lt b a b xla lt x lt b COpenMAX AL 1 6 2 Format and
188. LED which is the main status LED of the device Range is 0 LedCount 1 colorMask Bitmask indicating which LEDs support color Valid bits range from the least significant bit which indicates the first LED in the array to bit LedCount 1 which indicates the last LED in the array 9 1 29 XAMediaContainerInformation typedef struct XAMediaContainerInformation_ XAuint32 containerType XAmillisecond mediaDuration XAuint32 numStreams XAMediaContainerInformation ypenMAX AL i XAMediaContainerInformation is used for querying information about a media container Identifies the media container type Refer to XA_CONTAINERTYPE mediaDuration Identifies the total duration of the content If the duration is unknown this value shall be XA_TIME UNKNOWN numSt reams Identifies the number of streams tracks available within the media container 9 1 30 XAMetadatalnfo typedef struct XAMetadataInfo_ XAuint32 size XAuint32 encoding XAchar langCountry 16 XAuint8 data 1 XAMetadataInfo XAMet adatalInfo represents a key or a value from a metadata item key value pair Size of the data in bytes size must be greater than 0 Character encoding of the data langCountry Language country code of the data see note below data Key or value as represented by the encoding The language country code may be a language code a language country code or a country code When specifying the code note that a
189. LE_MPEG2_422 XAuint32 0x00000003 define XA_VIDEOPROFILE_MPEG2_ SNR XAuint32 0x00000004 define XA_VIDEOPROFILE_MPEG2 SPATIAL XAuint32 0x00000005 define XA_VIDEOPROFILE_MPEG2_HIGH XAuint32 0x00000006 define XA_VIDEOLEVEL_MPEG2 LL XAuint32 0x00000001 define XA_VIDEOLEVEL_MPEG2 ML XAuint32 0x00000002 define XA_VIDEOLEVEL_MPEG2_H14 XAuint32 0x00000003 define XA_VIDEOLEVEL_MPEG2 HL XAuint32 0x00000004 These macros are used for defining MPEG 2 video profiles and levels EG2_ SIMPLE EG2_MAIN EG2_SPATIAL EG2_HIGH H 263 Profiles and Levels define define define define define define define define define XA_VIDEOPROFILE_H263_BASELINE XA_VIDEOPROFILE_H263_H320CODING Description MPEG 2 Simple Profile MPEG 2 Main Profile MPEG 4 2 2 Profile MPEG 2 SNR Profile MPEG 2 Spatial Profile MPEG 2 High Profile MPEG 2 Level Low MPEG 2 Level Main MPEG 2 Level High 1440 MPEG 2 Level High XA_VIDEOPROFILE_H263_BACKWARDCOMPATIBLE XA_VIDEOPROFILE_H263_ISWV2 XA_VIDEOPROFILE_H263_ISWV3 XA_VIDEOPROFILE_H263_HIGHCOMPRESSION XA_VIDEOPROFILE_H263_INTERNET XA_VIDEOPROFILE_H263_INTERLACE XA_VIDEOPROFILE_H263_HIGHLATENCY ypenMAX AL XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 0x00000001 0x00
190. MAT_12BITRGB444 12 bits per pixel RGB format with colors stored as Red 11 8 Green 7 4 and Blue 3 0 XA_COLORFO RMAT_16BITARGB4444 16 bits per pixel ARGB format with colors stored as Alpha 15 12 Red 11 8 Green 7 4 and Blue 3 0 ypenMAX AL 409 Value Description XA_COLORFORMAT_16BITARGB1555 16 bits per pixel ARGB format with colors stored as Alpha 15 Red 14 10 Green 9 5 and Blue 4 0 XA_COLORFORMAT_16BITRGB565 16 bits per pixel RGB format with colors stored as Red 15 11 Green 10 5 and Blue 4 0 XA_COLORFORMAT_16BITBGR565 16 bits per pixel BGR format with colors stored as Blue 15 11 Green 10 5 and Red 4 0 XA_COLORFORMAT_18BITRGB666 18 bits per pixel RGB format with colors stored as Red 17 12 Green 11 6 and Blue 5 0 XA_COLORFORMAT_18BITARGB1665 18 bits per pixel ARGB format with colors stored as Alpha 17 Red 16 11 Green 10 5 and Blue 4 0 XA_COLORFORMAT_19BITARGB1666 19 bits per pixel ARGB format with colors stored as Alpha 18 Red 17 12 Green 11 6 and Blue 5 0 XA_COLORFORMAT_24BITRGB888 24 bits per pixel RGB format with colors stored as Red 23 16 Green 15 8 and Blue 7 0 XA_COLORFORMAT_24BITBGR888 24 bits per pixel BGR format with colors stored as Blue 23 16 Green 15 8 and Red 7 0 XA_COLORFORMAT_24BITARGB1887 24 bits per pixel ARGB format with colors stored as Alpha 23
191. MAX AL TakeSnapshot XAresult TakeSnapshot XASnapshotItf self This method takes the specified number of snapshots stores them either to the XADataSink if Description i i r i r i it is specified by InitiateSnapshot or to memory if no XADataSink is specified and then calls xaSnapshotTakenCallback method Asynchronous xaSnapshotInitiatedCallback must have been called before this method is called Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESUL RECONDITIONS_VIOLATED InitiateSnapshot CancelSnapshot CancelSnapshot XAresult CancelSnapshot XASnapshotItf self Description This method cancels an ongoing shooting session Snapshooting needs to be initiated again after calling this method with InitiateSnapshot method Synchronous Shooting session must be going on Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PRECONDITIONS_VIOLATI Comments Please note that in some implementations it is still possible to cancel the saving of the picture once the viewfinder is frozen for preview by calling this CancelSnapshot method Some implementations save the picture directly to XADat aSink already immediately once it is shot in that case CancelSnapshot returns XA_R during freezing previewing ESULT_PR ECONDITIONS_VIOLAT ED
192. MAX AL 411 9 2 23 define define define define define define define define define define define define define define define define define define define define define define define define define define define define define XA_CONTAINERTYPE XA_CONTAINERTYPE_UNSPECIFIED XA_CONTAINERTYPE_RAW XA_CONTAINERTYPE_ASF XA_CONTAINERTYPE_AVI XA_CONTAINERTYPE_BMP XA_CONTAINERTYPE_JPG XA_CONTAINERTYPE_JPG2000 XA_CONTAINERTYPE_M4A XA_CONTAINERTYPE_MP3 XA_CONTAINERTYPE_MP4 XA_CONTAINERTYPE_MPEG_ES XA_CONTAINERTYPE_MPEG_ PS XA_CONTAINERTYPE_MPEG_TS XA_CONTAINERTYPE_QT XA_CONTAINERTYPE_WAV XA_CONTAINERTYPE_XMF_0 XA_CONTAINERTYPE_XMF_1 XA_CONTAINERTYPE_XMF_ 2 XA_CONTAINERTYPE_XMF_ 3 XA_CONTAINERTYPE_XMF_GENERIC XA_CONTAINERTYPE_AMR XA_CONTAINERTYPE_AAC XA_CONTAINERTYPE_3GPP XA_CONTAINERTYPE_3GA XA_CONTAINERTYPE_RM XA_CONTAINERTYPE_DMF XA_CONTAINERTYPE_SMF XA_CONTAINERTYPE_MOBILE_DLS XA_CONTAINERTYPE_OGG XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x0000
193. MAX AL Use Cases This section illustrates the typical use of objects and interfaces in some typical cases of OpenMAX AL use The support for these use cases is mandatory in all profiles unless otherwise stated in profile notes We ind interfaces and objects with grey color 4 7 1 Audio and Video Playback o XAObjectitf o XAEngineltf XAVideoDecoderCapabilitiesltf o XAAudioDecoderCapabilitiesltf creates OutputDevic icate optional Default e Output O XAOutputMixltf O XAObjectltf URI DataSource Media Player Daise O XASeekitf 8Sink Native O XAVolumeltf Display O XAPlayltf O XAObjectitf Figure 7 Audio and video use case The Media Player object facilitates audio and video playback A Media Player is created using the XA Device EngineItf interface of the engine object Upon creation we associate the Media Player with an Output Mix which we create via the XAEngineItf interface for audio output and with a native display handle for video output We also set the data source of the Media Player during creation The data source could be for example a URI pointing to a video file in the local file system The Output Mix is by default associated with the system dependent device default output PROFILE NOTES The support for this use case is mandated in all profiles 33 4 7 2 Audio Playback XAObjectltf XAEnginelt
194. NT Bluetooth headset WIRELESS USER HEADSET TRUE speaker Wired headset speaker WIRED USER HEADSET TRUE Carkit loudspeaker WIRED ENVIRON CARKIT TRUE MENT Carkit handset speaker WIRED USER CARKIT TRUE System line out jack INTEGRATED UNKNOWN HANDSET FALSE Dock loudspeaker WIRED ENVIRON DOCK FALSE MENT FM radio Transmitter WIRED ENVIRON DOCK FALSE MENT Networked media NETWORK UNKNOWN REMOTE FALSE renderer 9 1 5 XAAudioStreamIinformation typedef struct XAAudioStreamInformation_ XAuint32 codecId XAuint32 channels XAmillHertz sampleRate XAuint32 bitRate XAchar langCountry 16 XAmillisecond duration XAAudioStreamInformation COpenMAX AL 370 This structure is used for querying the information about an audio stream Identifies the stream s codec format ID Refer to XA_AUDIOCODEC Identifies the number of audio channels within the stream Identifies the audio stream s sample rate If the sample rate is unknown this value shall be 0 bitRate Identies the audio stream s bit rate in units of bits per second If the bit rate is unknown this value shall be 0 langCountry Language country code of the stream see note below duration Identifies the total duration of the audio stream If the duration is unknown this value shall be XA_TIME UNKNOWN The language country code may be a language code a language country code or a country code Formatting of language codes and language country codes is d
195. ODESTATUS_LOST Focus has been lost 9 2 15 XA _CAMERA_ISOSENSITIVITYMODE define XA_CAMERA_ISOSENSITIVITYMODE_MANUAL XAuint32 0x00000001 define XA_CAMERA_ISOSENSITIVITYMODE_AUTO XAuint32 0x00000002 These values are used to set camera ISO sensitivity Value Description XA_CAMERA_ISOSENSITIVITYMODE_MANUAL Manual sensitivity mode XA_CAMERA_ISOSENSITIVITYMODE_AUTO Auto sensitivity mode 9 2 16 XA _CAMERA_LOCK define XA CAMERA LOCK AUTOFOCUS XAuint32 0x00000001 define XA_CAMERA LOCK AUTOEXPOSURE XAuint32 0x00000002 define XA CAMERA LOCK AUTOWHITEBALANCE XAuint32 0x00000004 These values are used to refer to various locks of the automatic camera settings Value Description XA_CAMERA_LOCK_AUTOFOCUS Lock for the automatic focus XA_CAMERA_LOCK_AUTOEXPOSURI ES Lock for the automatic exposure settings 7 XA_CAMERA_LOCK_AUTOWHITEBALANCI Lock for the automatic white balance MypenMAX AL i 9 2 17 XA CAMERA METERINGMODE define XA CAMERA METERINGMODE AVERAGE XAuint32 0x00000001 define XA_CAMERA_METERINGMODE_SPOT XAuint32 0x00000002 define XA_CAMERA_METERINGMODE_MATRIX XAuint32 0x00000004 These values are used to set camera metering mode for exposure Value Description XA_CAMERA_METERINGMODE_AVERAGE Cente
196. ODEVICE oirinn E E E secs EA EE EEE E ENEO E E aE 424 XA METADATA FILTER soricei sieo a E EREE EAE NEE NA ES 425 XA METADATATRAVERSALMODE viriai EAEE E EES 425 XA MIDIBANK iici e e eE EA E AE E E ETS 426 XA MIDI UNKNOWN ceases vesossessutssbisonssniive Suites stip cuseasasechopitaandedadea ssi zessuaessedsontdoatteaunpedesptbsaeteoendehens 426 XA MILLIBE L oerrinne e n RNE EA EEA EE EE A ERE 426 XA MHLIHERITZ MAX peneira ai n E AE EE R RA 426 XA MILLIMETER MARX virii EAE EAEE EE EEA 426 XA NODE PARENT iieiaei he 427 KXA NODETYP E ene E E EEE EA EEE ER EE E E RE RR THIN IA Nie 427 XA OBJECT EVENT cat isesstedigesebitisptthensstinte E A E BAR 428 MA OBIE CT SIATE sciscvsscstasedeaytitatscssa5ice E E E E EA EE 428 MA OBIE CTID perns an a E E R E E AE ska A R E A ER 429 KAC ORIENTATION cineri E e EE EE A E E E EE 429 XA PCM REPRESENTATION sisidesssdssaonsstidictevtestestantitensditiindis wriede E E eas 430 XA PCMSAMPEEFORMAT irni a EE E E EE 430 XA PLAYEVEN T o a sons E E ass ha E E E R E R E 430 KA PEAY STALE caiie E cubes sap A E RE E E E EE A e 431 XA PREFEICHEVEN Tiseaeaat sagaaihiasseaideagssio sa anibigeesoiteaisois is ilea E si d wes eee Eaie a 431 XA PREFETCHSTATUS iepa r E E E E EEE 432 MA SPIT ORLY oriin E EE EE R heeds canta AE A A R E E ae T n 432 XA PROFILE vroren n e a n T E E A EE E 432 XA RADIO EVEN nori a ia a A EEEE EAEN RE ORATE E ENN EE 434 XA RATECONTROLMODE picon E E E EERS 436 XA RATEPROP sicissiieieoin iri C
197. ODING_UTF16LE Unicode UTF 16 Little Endian ypenMAX AL 408 9 2 22 define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define XA_COLORFORMAT XA_COLORFORMAT_UNUSED XA_COLORFORMAT_MONOCHROME XA_COLORFORMAT_8BITRGB332 XA_COLORFORMAT_12BITRGB444 XA_COLORFORMAT_16BITARGB4444 XA_COLORFORMAT_16BITARGB1555 XA_COLORFORMAT_16BITRGB565 XA_COLORFORMAT_16BITBGR565 XA_COLORFORMAT_18BITRGB666 XA_COLORFORMAT_18BITARGB1665 XA_COLORFORMAT_19BITARGB1666 XA_COLORFORMAT_24BITRGB888 XA_COLORFORMAT_24BITBGR888 XA_COLORFORMAT_24BITARGB1887 XA_COLORFORMAT_25BITARGB1888 XA_COLORFORMAT_32BITBGRA8888 XA_COLORFORMAT_32BITARGB8888 XA_COLORFORMAT_YUV411PLANAR XA_COLORFORMAT_YUV420PLANAR XA_COLORFORMAT_YUV420SEMIPLANAR XA_COLORFORMAT_YUV422PLANAR XA_COLORFORMAT_YUV422SEMIPLANAR XA_COLORFORMAT_YCBYCR XA_COLORFORMAT_YCRYCB XA_COLORFORMAT_CBYCRY XA_COLORFORMAT_CRYCBY XA_COLORFORMAT_YUV444INTERLEAVED XA_COLORFORMAT_RAWBAYER8BIT XA_COLORFORMAT_RAWBAYER10BIT XA_COLORFORMAT_RAWBAYER8BITCOMPRESSED XA_COLORFORMAT_L2 XA_COLORFORMAT_L4 XA_COLORFORMAT_L8 XA_COLORFORMAT_1L16 XA_COLORFORMAT_ L24 XA_COLORFORMAT_L32 XA_COLORFORMAT_18BITBGR666 XA_COLORFORMAT_
198. OR XA_RESULT_CONTENT_UNS XA RESULT CONTENT NOT XA_RESULT_PERMISSION_ Comments Realizing the object acquires the resources required for its functionality The operation may fail if insufficient resources are available In such a case the application may wait until resources become available and a XA_OBJECT_EVENT_RESOURCES_AVAILABLE event is received and then retry the realization Another option is to try and increase the object s priority thus increasing the likelihood that the object will steal another object s resources COpenMAX AL i XAresult Resume XAObjectItf self XAboolean async Description Transitions the object from Suspended state to Realized state either synchronously or asynchronously The object must be in Suspended state Parameters Interface self reference async in If XA_BOOLEAN_FALSE the method will block until termination Otherwise the method will return XA_RESULT_SUCCESS and will be executed asynchronously On termination the xaObjectCallback will be invoked if registered with the XA_OBJECT_EVENT_ASYNC_TERMINATION The result parameter of the xaObjectCallback will contain the result code of the function However if the implementation is unable to initiate the asynchronous call XA_RESULT_RESOURCE_ERROR will be returned
199. PARAMETER_INVALID XA_RESU EMORY_FAILUR TM E The change will only be committed once Commit is called SetDestinationRectangle MypenMAX AL SetDestinationRectangle XAresult SetDestinationRectangle XAVideoPostProcessingItf self const XARectangle pDestRect Description Defines the destination rectangle for the processed frame This rectangle in conjunction with the scaling options used fit crop stretch determines the scaling applied to the frame Parameters Interface self reference pDestRect in Define the destination rectangle to use Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESUL EMORY_FATLURI Comments The change will only be committed once Commit is called The method works with SetSourceRectangle to do cropping and scaling If SetSourceRectangle is not called by default the original frame size will be used as the source rectangle SetSourceRectangle and SetScaleOptions ypenMAX AL j SetScaleOptions XAresult SetScaleOptions XAVideoPostProcessingItf a XAuint32 scaleOptions XAuint32 backgroundColor XAuint32 renderingHints Sets the options for scaling scaleOptions backgroundColor renderingHints SUCC ESS Interface self reference Defines the scale option There a
200. RAMETER_INVALID if the active node is root ypenMAX AL i 8 25 XAObjectitf Description The XAObject It f interface provides essential utility methods for all objects Such functionality includes the destruction of the object realization and recovery acquisition of interface pointers a callback for runtime errors and asynchronous operation termination A maximum of one asynchronous operation may be performed by an object at any given time Trying to invoke an asynchronous operation when an object is already processing an asynchronous call is equivalent to aborting the first operation then invoking the second one XAOb ject It f is an implicit interface of all object types and is automatically available upon creation of every object Please refer to section 3 1 1 for details on the object states This interface is supported on all objects see section 7 Priority This interface exposes a control for setting an object s priority relative to the other objects under control of the same instance of the engine This priority provides a hint that the implementation can use when there is resource contention between objects Given resource contention between objects an implementation will give preference to the object with the highest priority This may imply that the implementation takes resources from one object to give to another if the two objects are competing for the same resour
201. RDS EVENT NEW RT XAuint16 0x0008 define XA RDS EVENT NEW RT PLUS XAuint16 0x0010 define XA RDS EVENT NEW CT XAuint16 0x0020 define XA RDS EVENT NEW TA XAuint16 0x0040 define XA RDS EVENT NEW_TP XAuint16 0x0080 define XA RDS EVENT NEW ALARM XAuint16 0x0100 These macros are used to define which of the RDS fields have changed The Programme Identification code has changed The event Data parameter for this event is not used and shall be ignored The Programme TYpe has changed The event Data parameter for this event is not used and shall be ignored The Programme Service name has changed The event Data parameter for this event is not used and shall be ignored The Radio Text has changed The event Data parameter for this event is not used and shall be ignored A Radio Text plus information element has changed The RT class code of the changed information element is given as eventData parameter of the callback This event is posted also in the case when an information element is cleared Then Only one event is send in cases when there is an additional descriptor element associated with another information element The Clock Time and date has changed The eventData parameter for this event is not used and shall be ignored The Traffic Announcement has changed The event Data parameter for this even
202. RENT define XA_NODE_PARENT XAuint32 OxFFFFFFFF XA_NODE_PARENT is used by XAMetadataTraversalItf SetActiveNode to set the current scope to the node s parent 9 2 47 XA NODETYPE define XA_NODETYPE_UNSPECIFIED XAuint32 0x00000001 define XA_NODETYPE_AUDIO XAuint32 0x00000002 define XA_NODETYPE_VIDEO XAuint32 0x00000003 define XA_NODETYPE_IMAGE XAuint32 0x00000004 YPE represents the type of a node ypenMAX AL i 9 2 48 XA OBJ ECT EVENT define XA_OBJECT_EVENT_RUNTIME_ERROR XAuint32 0x00000001 define XA_OBJECT_EVENT_ASYNC_TERMINATION XAuint32 0x00000002 define XA_OBJECT_EVENT_RESOURCES_LOST XAuint32 0x00000003 define XA_OBJECT_EVENT_RESOURCES_AVAILABLE XAuint32 0x00000004 define XA_OBJECT_EVENT_ITF_CONTROL_TAKEN XAuint32 0x00000005 define XA_OBJECT_EVENT_ITF_CONTROL_RETURNED XAuint32 0x00000006 define XA_OBJECT_EVENT_ITF_PARAMETERS CHANGED XAuint32 0x00000007 The macros identify the various event notifiations that an object may emit Runtime error An asynchronous operation has terminated Resources have been stolen from the object causing it to become Unrealized or Suspended Resources have become available which may enable the object to recover An interface has lost control ERMINATION ESOURC
203. ROFILES MEDIA PLAYER XA PROFILES MEDIA PLAYER RECORDER XA_PROFILES_PLUS_MIDT Media player profile For a description of the profile see section 2 3 Media player recorder profile For a description of the profile see section 2 3 MIDI designation For a description of the designation see section 2 5 XA_PROFILES_PLUS_MIDI cannot be set alone it must be set along with XA_PROFILE_MEDIA_PLAYER or XA_PROFILE MEDIA PLAYER RECORDER COpenMAX AL 9 2 60 XA RADIO EVENT define define define define define define define define define define RADIO EVENT ANTENNA_STATUS_CHANGED RADIO EVENT FREQUENCY_CHANGED RADIO EVENT FREQUENCY_RANGE_CHANGED RADIO EVENT PRESET_CHANGED RADIO EVENT SEEK_COMPLETED RADIO EVENT STEREO_STATUS_CHANGED RADIO EVENT SIGNAL_STRENGTH_CHANGED RADIO EVENT SQUELCH_CHANGED RADIO EVENT FREQUENCY_ERROR SSSSSSS SSS RADIO EVENT FREQUENCY_RANGE_ERROR XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 These macros are used to define the radio related event and the event specific parameters used by xaRadioCallback ENT_ANTENNA_STATUS_CHANG XA_RADIO XA R
204. Required XAresult CreateOutputMix XAEngineItf self XAObjectItf pMix XAuint32 numInterfaces const XAInterfaceID pInterfaceIds const XAboolean pInterfaceRequired XAresult CreateMetadataExtractor XAEngineltf self XAObjectItf pMetadataExtractor const XADataSource pDataSource XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired XAResult CreateExtensionObject XAEngineItf self XAObjectItf pObject void pParameters XAuint32 objectID XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired XAresult GetImplementationInfo XAEngineltf self XAuint32 pMajor XAuint32 pMinor XAuint32 pStep Xauint32 niImplementationTextSize XAchar pImplementationText ypenMAX AL i XAresult QuerySupportedProfiles XAEngineItf self XAint16 pProfilesSupported XAresult QueryNumSupportedInterfaces XAEnginelItf self XAuint32 objectID XAuint32 pNumSupportedInterfaces XAresult QuerySupportedinterfaces XAEngineltf self XAuint32 objectID XAuint32 index XAInterfaceID pInterfaceId XAresult QueryNumSupportedExtensions XAEngineItf self XAuint32 pNumExtensions XAresult QuerySupportedExtension XAEngineItf self XAuint32 index XAchar pExtensionName XAuint16 pNameLength XAresult IsExtensionSupported XAEngineItf self const XAchar
205. T_PARAMETER_INVALID See Also Set LSOSensitivity XA_CAMERA_ISOSENSITIVITYMOD Get SupportedISOSensitivitySettings ypenMAX AL M SetAperture XAresult SetAperture XACameraItf self XAuint32 aperture XAuint32 manualSetting Sea eae al fsere Lim Interface self reference Parameters ise iii had ag in Specifies the camera aperture mode Refer to XA_CAM FRA AP ERTUR EMODE F in Ifthe manual aperture mode is enabled this value specifies the manual setting This parameter is ignored if manual aperture mode is disabled A setting of 100 is equal to an f stop of 1 0 ESS Return value The return value can be one of the following XA RESULT SUCCE See Also GetAperture Get SupportedApertureManualSettings ypenMAX AL XA_CAMERA_AP ERTUREMODE 105 GetAperture XAresult GetAperture XACameraItf self XAuint32 pAperture XAuint32 pManualSetting Gets the camera aperture Parameters in Interface self reference pAperture out Specifies the camera aperture mode Refer to XA_CAMERA_APERTUREMODE pManualSetting If the manual aperture mode is enabled this value specifies the manual setting If automatic aperture mode is used the exposure is locked and the device supports this this value specifies the automatically determined aperture
206. T_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL d XAresult Seek XARadioItf self XAboolean upwards Starts the seek from the current frequency to the given direction Asynchronous xaRadioCallback callback with XA_RADIO_EVENT_SEEK_COMPLETED event is used for notifying of the result from the other end until a signal is found or the original frequency is reached Interface self reference upwards in If true the seek progresses towards higher frequencies and if false the seek progresses towards lower frequencies Return value The return value can be the following Description If the end of the tuner s frequency band is reached before a signal was found the scan continues XA RESULT SUCCESS StopSeeking XAresult StopSeeking XARadioItf self frequency is the one where seeking stopped Description Cancels an outstanding seek reguest The method blocks while canceling the outstanding reguest After cancellation the Has not effect if no seek operation is ongoing Return value The return value can b in Interface self reference e the following XA RESULT SUCCI ESS ypenMAX AL 278 GetNumberOfPresets XAresult GetNumberOfPresets XARadioItf self XAuint32 pNumPresets Returns the number of preset slots the device has for storing the presets pNumPresets Number of pre
207. The application destroys the object by calling the Dest roy method of the XAObject It f interface COpenMAX AL i The application obtains other interfaces of the object by calling the Get Interface method of the XAOb ject Itf interface The application retrieves an interface by its type ID which uniquely identifies it an object cannot contain more than one interface of a certain type The application controls the state of the object by calling the Realize and Resume methods of the XAOb ject It f interface For a complete and detailed specification of this interface type see section 8 24 3 1 5 The Engine Object and XAEngineltf Interface Other fundamental entities in the architecture are the engine object and the XAEngineItf interface These entities serve as the API s entry point The application begins an OpenMAX AL session by creating an engine object The engine object is created using the global function xaCreateEngine see section 6 1 The result of engine object creation is a XAOb ject It f interface regardless of the implementation An implementation can optionally support multiple versions of the API When the application creates the engine object it specifies the version of the engine object If the requested version of the API is supported an engine object of that version is returned Any object or interface created or derived from that engine object will adhere to the same version of the specification as
208. Vibra I O device Pre conditions The Vibra I O device must support setting intensity per XAVibraDescriptor supportsIntensity Parameters Pointer to a XAVibralIt f interface pintensity out Address to store the vibration intensity of the Vibra I O device Range is 0 1000 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PRECONDITIONS_VIOLATI XA_RESUL TER_INVALID ypenMAX AL i 8 38 XAVideoDecoderCapabilitiesitf Description This interface provides methods of querying the video decoding capabilities of the media engine This interface provides a means of enumerating all video decoders available on an engine where each an decoderld represents each decoder It also provides a means to query the capabilities of each decoder A given decoder may support several profile level pairs each with their own capabilities such as maximum resolution appropriate to that profile and level pair Therefore this interface represents the capabilities of a particular decoder as a list of capability entries queriable by decoderID and capability entry index The set of video decoders supported by the engine does not change during the lifetime of the engine though dynamic resource constraints may limit actual availability when an video decoder is requested This interface is a mandated interface of engine objects see section 7 2 Prototype XA_API extern
209. VolumeLevel volumeItf 300 CheckErr res Play the media res playItf gt SetPlayState playItf XA_PLAYSTATE_PLAYING CheckErr res while c getchar q XAuint32 playState switch c case ig Play the media if it is not already playing res playItf gt GetPlayState playItf CpenMAX AL amp playState CheckErr res if playState XA_PLAYSTATE_PLAYING res playItf gt SetPlayState playItf XA_PLAYSTATE_ PLAYING CheckErr res break case 2 Pause the media ii ie is playing res playItf gt GetPlayState playItf amp playState CheckErr res if playState XA_PLAYSTATE_PLAYING res playItf gt SetPlayState playItf KAME PAY S TAMEMPAUSE DF Claeelshici 128 p break default break Stop the media playback res Play licit SSecP LayScace olay Lti XA_PLAYSTATE STOPPED CheckErr res Destroy the player object player gt Destroy player Destroy the output mix object OutputMix gt Destroy OutputMix int xa_main void XAresult reS XAObjectItf engine Create OpenMAX AL engine in thread safe mode XAEngineOption EngineOption XAuint32 XA_ENGINEOPTION_THREADSAFE XAuint32 XA_BOOLEAN_TRUE XAuint32 XA_ENGINEOPTION_MAJORVERSION XAuint32 1 XAuint32 XA_ENGINEOPTION_MINORVERSION XAuint32 1
210. X AL 199 GetColor XAresult GetColor XALEDArrayItf self XAuint8 index XAHSL pColor Returns the color of an individual LED The LED must support setting color per XALEDDescriptor colorMask Parameters in Interface self reference in Index of the LED Range is 0 XALEDDescriptor ledCount out Address to store a data structure containing an HSL color Return value The return value can be one of the following XA_RESULT_SUCCESS XA RESULT PRECONDLTIONS VIOLATI XA RESUL TER_INVALID ypenMAX AL 8 21 XAMetadataExtractionltf Description The XAMet adataExtractionItf interface allows an application developer to acquire metadata It is used for scanning through a file s metadata providing the ability to determine how many metadata items are available to filter for or against metadata items by key and to have the engine fill in a data structure containing full metadata information for a metadata item The XAMetadataExtractionItf interface defaults to a simple search in the case of simple formats MP3 ADTS WAVE AU AIFF etc there is only one location for metadata and this simple method searches it completely in the case of advanced formats MP4 3GP XMF SMIL etc there are potentially many locations for metadata and the engine searches only the topmost layer of metadata Used in combination with the XAMetadataTraversalltf interface the
211. XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID MypenMAX AL UsePreset XAresult UsePreset XAEqualizerItf self XAuint16 index Sets the equalizer according to the given preset Pre conditions Parameters i Interface self reference i New preset that will be taken into use The valid range is 0 number of presets 1 Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_CONTROL_LOST GetNumberOfPresets XAresult GetNumberOfPresets XAEqualizerItf self XAuint16 pNumPresets Description Gets the total number of presets the equalizer supports The presets will have indices 0 number of presets 1 pNumPresets out Number of presets the equalizer supports This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID COpenMAX AL a GetPresetName XAresult GetPresetName XAEqualizerItf self XAuint16 index XAuint16 pSize XAchar pName Gets the preset name based on the index pSize in out As an output pSize will be returned with the character count required to store the name If pName is not NULL then as an input pSize specifies the size of pName This parameter must not be NULL pName out A non empty
212. XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID See Also Set FocusMode XA_CAMERA_FOCUSMODE Get SupportedFocusManualSettings ypenMAX AL i SetFocusRegionPattern XAresult SetFocusRegionPattern XACameraItf self XAuint32 focusPattern XAuint32 activePointsl1 XAuint32 activePoints2 Sets the camera focus region pattern Parameters Interface self reference focusPattern in Specifies the focus region pattern Refer to XA_CAMERA_FOCUSPOINTS activePointsl i Specifies the focus points to be used for the custom auto focus region pattern mode XA_CAMERA_FOCUSPOINTS_CUSTOM This parameter identifies the focus points ranging from 0 to 31 This parameter is ignored if manual focus mode is selected or non custom focus points patterns are selected This parameter is a bit mapped representation of the focus points Focus point 0 is identified by bit 0 focus point 1 is identified by bit 1 and so on If a bit is set this indicates the point is to be used for autofocus For example to select only the center sixteen points points 18 to 21 26 to 29 34 to 37 and 42 to 45 e activePoints1 will have a value of 0x3C3C0000 e activePoints2 will have a value of 0x00003C3C activePoints2 See description of activePointsl Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetFocusRegionPattern XA_CAM
213. XAresult GetSupportedShutterSpeedManualSettings XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAmicrosecond pMinValue XAmicrosecond pMaxValue XAuint32 pNumSettings XAmicrosecond pSettings This method gets the supported manual shutter speed settings in out lue pMaxValue out Identifies the maximum manual shutter speed setting supported pNumSettings supported in out If pSettings is NULL pNumSettings returns the number of supported manual shutter speed settings If the available manual settings are continuous from pMinValue to pMaxValue pNumSettings returns 0 If pSettings is non NULL and a non continuous range is supported pNumSet tings is length of the pSettings array pSettings out Returns an array of supported shutter speed settings pSettings may be NULL The array of values returned must include pMinValue and pMaxValue Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If manual shutter speed settings are unsupported the method returns XA_RESULT_FEATURE_UNSUPPORTED The memory for the pSettings array shall be allocated by the OpenMAX AL application ypenMAX AL k GetSupported WhiteBalanceManualSettings XAresult GetSupportedWhiteBalanceManualSettings XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAuint32 pMinValu
214. XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 RENCODING represents a character encoding for metadata keys and values 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 0x0000000A 0x0000000B 0x0000000B 0x0000000C 0x0000000D 0x0000000E 0x0000000F 0x00000010 0x00000011 0x00000012 0x00000013 0x00000014 0x00000015 0x00000016 0x00000017 0x00000018 0x00000019 0x0000001A 0x0000001B 0x0000001C 0x0000001D 0x0000001E 0x0000001F 0x00000020 407 Value Description XA_CHARACTERENCODING_UNKNOWN Unknown character encoding XA_CHARACTERENCODING_BINARY Binary data XA_CHARACTERENCODING_ASCII ASCII XA_CHARACTERENCODING_BIG5 Big 5 XA_CHARACTERENCODING_CODEPAGE1252 Microsoft Code Page 1252 XA_CHARACTERENCO
215. _CAMERACAP_AUTOEXPOSURE EXPOSURE ah ah P_MANU P_AU XA_CAMERACA OSENSITIVITY Auto sensitivity mode supported XA_CAMERACAP_MANUALSENSITIVITY Manual sensitivity setting supported P_AU ER T bh URE 400 XA CAMERACAE PTICALZOO 9 2 11 ERACAP_CONTRAST ERACAP_GAMMA XA CAMERA EXPOSUREMODE define XA CAMERA EXPOSUREMODE MANUAL XAuint32 0x00000001 define XA CAMERA EXPOSUREMODE AUTO XAuint32 0x00000002 define XA CAMERA EXPOSUREMODE NIGHT XAuint32 0x00000004 define XA CAMERA EXPOSUREMODE BACKLIGHT XAuint32 0x00000008 define XA CAMERA EXPOSUREMODE SPOTLIGHT XAuint32 0x00000010 define XA CAMERA EXPOSUREMODE SPORTS XAuint32 0x00000020 define XA_CAMERA_EXPOSUREMODE_SNOW XAuint32 0x00000040 define XA_CAMERA_EXPOSUREMODE_BEACH XAuint32 0x00000080 define XA_CAMERA_EXPOSUREMODE_LARGEAPERTURE XAuint32 0x00000100 define XA_CAMERA_EXPOSUREMODE_SMALLAPERTURE XAuint32 0x00000200 define XA_CAMERA_EXPOSUREMODE_PORTRAIT XAuint32 0x00000400 define XA_CAMERA_EXPOSUREMODE_NIGHTPORTRAIT XAuint32 0x00000800 Camera supports contrast controls Camera supports gamma controls These values are used to set camera exposure
216. _RDSRTPLUS_ITEMTRACKNUMBER XA_RDSRTPLUS_ITEMARTIST XA_RDSRTPLUS_ITEMCOMPOSITION XA_RDSRTPLUS_ITEMMOVEMENT XA_RDSRTPLUS_ITEMCONDUCTOR XA_RDSRTPLUS_ITEMCOMPOSER XA_RDSRTPLUS_ITEMBAND XA_RDSRTPLUS_ITEMCOMMENT XA_RDSRTPLUS_ITEMGENRE XA_RDSRTPLUS_INFONEWS XA_RDSRTPLUS_INFONEWSLOCAL XA_RDSRTPLUS_INFOSTOCKMARKET XA_RDSRTPLUS_INFOSPORT XA_RDSRTPLUS_INFOLOTTERY XA_RDSRTPLUS_INFOHOROSCOPE XA_RDSRTPLUS_INFODAILYDIVERSION XA_RDSRTPLUS_INFOHEALTH XA_RDSRTPLUS_INFOEVENT XA_RDSRTPLUS_INFOSZENE XA_RDSRTPLUS_INFOCINEMA XA_RDSRTPLUS_INFOTV XA_RDSRTPLUS_INFODATETIME XA_RDSRTPLUS_INFOWEATHER XA_RDSRTPLUS_INFOTRAFFIC XA_RDSRTPLUS_INFOALARM XA_RDSRTPLUS_INFOADVISERTISEMENT XA_RDSRTPLUS_INFOURL XA_RDSRTPLUS_INFOOTHER XA_RDSRTPLUS_STATIONNAMESHORT XA_RDSRTPLUS_STATIONNAMELONG XA_RDSRTPLUS_PROGRAMNOW XA_RDSRTPLUS_PROGRAMNEXT XA_RDSRTPLUS_PROGRAMPART XA_RDSRTPLUS_PROGRAMHOST XA_RDSRTPLUS_PROFRAMEDITORIALSTAFF XA_RDSRTPLUS_PROGRAMFREQUENCY XA_RDSRTPLUS_PROGRAMHOMEPAGE XA_RDSRTPLUS_PROGRAMSUBCHANNEL XA_RDSRTPLUS_PHONEHOTLINE XA_RDSRTPLUS_PHONESTUDIO XA_RDSRTPLUS_PHONEOTHER XA_RDSRTPLUS_SMSSTUDIO XA_RDSRTPLUS_SMSOTHER XA_RDSRTPLUS_EMATLHOTLINE XA_RDSRTPLUS_EMATLSTUDIO XA_RDSRTPLUS_EMATLOTHER XA_RDSRTPLUS_MMSOTHER XA_RDSRTPLUS_CHAT XA_RDSRTPLUS_CHATCENTER XA_RDSRTPLUS_VOTEQUESTION XA_RDSRTPLUS_VOTECENTER XA_RDSRTPLUS_OPENCLASS45 AL XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8 XAuint8
217. a bit is set this indicates the region contains the focus status as described by pFocusStatus Refer to XA_CAMERA_FOCUSREGIONS for a bit mapped representation of each focus region pRegionStatus2 See description of pRegionStatusl Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetFocustiode _ XA_CAMERA_FOCUSMODESTATUS ypenMAX AL i SetMeteringMode XAresult SetMeteringMode XACameraItf self XAuint32 meteringMode Sets the camera metering mode for exposure Parameters Interface self reference meteringMode in Specifies the camera metering mode Refer to XA_CAMERA_METERINGMODE Return value The return value can be one of the following XA_RESULT_SUCCESS GetMeteringMode _XA_CANBRA_MBTERINGHOD GetMeteringMode XAresult GetMeteringMode XACameraItf self XAuint32 pMeteringMode Gets the camera metering mode for exposure in Interface self reference pMeteringMode Specifies the camera metering mode Refer to XA_CAMERA_METERINGMODE Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetMeteringvode XA CAMERA METERINGMOD MypenMAX AL SetExposureMode XAresult SetExposureMode XACameraItf s
218. a source is an input parameter to a media object specifying from where the media object will receive a particular type of data such as audio video or image A data sink is an input parameter to a media object specifying to where the media object will send a particular type of data such as audio video or image The number and types of data sources and sinks differ from one media object to another The following characteristics define a data source or sink Its data locator which identifies where the data resides Possible locators include URIs such as a filename Memory addresses TO devices Output mixes Cameras Content pipes e Its data format which identifies the characteristics of the data stream Possible formats include MIME type based formats PCM formats RAW image formats An application specifies a media object s respective data source s and sink s upfront in the creation method for the media object Collectively the media object together with its associated source s and sinks s define the use case the application wants executed COpenMAX AL i 4 1 3 Metadata Extractor Object Player objects support reading of the metadata of the media content and recorder objects support writing metadata However sometimes it is useful just to be able to read metadata without having to be able to playback the media A Metadata Extractor object can be used for reading metadata without allocating resources for media pl
219. aces will be defined in a manner similar to standard interfaces The extended interface types will have unigue IDs generated by the extension provider Note that the extending API may not alter standard interfaces or apply different semantics on standard interfaces even if the syntax is preserved An exception to this rule is extending the valid parameter range of functions detailed later Functions may not be added to any of the interfaces defined in the specification To do that a new interface which includes the desired standard interface must be defined along with a new interface ID which must be generated It is also highly recommended that whenever an interfaces signature changes even slightly a new interface ID will be generated and the modified interface will be considered a new one This is to protect applications already written to work with the original interface 3 6 4 Extending Supported Object Types An extended API may introduce new object types to those specified in the standard API The extended objects may expose either standard or extended interface types Should it expose standard interfaces they must still behave as specified Otherwise the extended API may provide extended interface types with different semantics The extended objects will be created by extended interfaces with creation functions These extended interfaces typically will be exposed by the standard engine object but can also be exposed on other obj
220. adushepsbansseseasueeavedysecbcapnceobtbnote suas pidespeaueesiaensensoes 371 917 XADa t Format MIME iiccticvccesccsscncctiersonsestsrtccteessinsegevesieccbessaustoesenes does eaeseodseewedderenedecdeanee cous eansegeveuitede 372 9 1 8 XADataFormat_PCM ccccccccccccccccccccccccccecccesccecccccccesccesecececesesececeseeesecessceceeeseceseessceeseeesesuseesssensueeseaes 372 9 1 9 XADa ataFormat PCM EX Gmm rir ei ni minmi mimi mmwwevmvvevwvwvvvmvvwvwwwvwwewwvvwwwevvwevwvwwwvwwvwvwvvvvvvv 374 9 1 10 XADat Format Rawlm pe rimesse n ee NE neie NERE Nr PET TE EEEa a RE 375 9 1 11 XA Data Fola a AR 27 Lam mm mmw wewvwwevwwwvwvwwwvvvwwvwwvvvvvvvewvewwmvwwvwvvwwevwvvvvwv 375 9 1 12 XADaataLocatOr_COntentPipe cccccccsccecssecesnceensecssncesnsecseseecseceeseecsaeceeneecaecseneecaeceeneecnaeeeeneeenaeees 375 9 1 13 XA Data Locator LODOVIC mam ennn e a E a NE E AaS 376 9 1 14 XADataLocator MCCidOD CCE ss sccscisscnszesassetssnsianctesustedssossacsnatecsansiunsteowasedanthiondevunssedhessiaeavebengnneees 377 9 1 15 XADataLocator_NativeDisplay eieeseeeseeseeseeeseeeseeasesaseesseessesseossesssesssesseasesaseenssensseessesssesssesesesesne 377 9 1 16 XADataLocator Null occccccccccccccccccccccccccecccecccececececececececececeeecesesssessseseseseseseseseeeseseseceseceseseseeeeeeeeeeens 377 9 1 17 XADat Locator OutputMik scenene ii a E N a EE a 377 9 1 18 KA Datahocator URI noiire anooiiiai EE O Oa EERS ROERE 378 9 1 19 XADalAS K eren E R E E R
221. allback ypenMAX AL 92 Methods RegisterCallback XAresult RegisterCallback XACameraItf self xaCameraCallback callback void pContext cal in Specifies the callback method pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Refer to XA_CAMERACBE xaCameraCallback ENT for the possible callback event notifications SetFlashMode XAresult SetFlashMode XACameraItf self XAuint32 flashMode Sets the camera flash setting Parameters in Interface self reference flashMode Specifies the camera flash setting Refer to XA_CAMERA_FLASHMODE Return value The return value can be one of the following XA_RESULT_SUCCESS MypenMAX AL GetFlashMode XAresult GetFlashMode XACameraItf self XAuint32 pFlashMode i eee fin pFl ashMode out Specifies the camera flash setting Refer to XA_CAMERA_FLASHMODE Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID None SetFlashMode IsFlashReady XAresult IsFlashReady XACameraItf self XAboolean pReady Specifies whether the flash is ready Return value The return value can be one of the
222. aller must pass the interface pointer in this argument Additionally each of the callback prototypes has a first argument called caller whose type is the interace type Here is an example of a simple interface struct XASomeInterfacelItf_ typedef const struct XASomeInterfaceItf_ const XASomeInterfaceltf struct XASomeInterfacelItf_ XAresult Methodl XASomeInterfacelItf self XAuint32 value XAresult Method2 XASomeInterfacelItf self XAuint32 pValue i This interface is called XASomeInterfacelItf and has two methods Method1 and Method2 Such an interface will be used as follows An mi S24 XAresult res XASomeInterfaceItf someltf Hi coo Obtain chis incertace Sowelaow os res somelItf gt Methodl someItf 42 CheckErr res res somelItf gt Method2 somelItf amp 1 CheckErr res Note that this code excludes the mechanism for obtaining the interface itself which will be explained in the following sections 3 1 4 The XAObjectitf Interface XAOb ject It f is a special interface type fundamental to the architecture Every object type in the API exposes this interface It is the entry point for an object since every method that creates a new object actually returns the XAObjectItf of this object Using this interface an application may perform all the basic operations on the object and may access other interfaces exposed by the object
223. alue The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID Comments itemCount is determined by the current metadata filter For example in a situation where four metadata items exist and there is no filter Get ItemCount will return 4 if there is a filter that matched only one of the keys Get ItemCount will return 1 Get ItemCount returns the number of metadata items for a given metadata scope active node The scope is determined by methods within XAMet adataTraversalItf ypenMAX AL i GetKeySize XAresult GetKeySize XAMetadataExtractionItf self XAuint32 index XAuint32 pKeySize Address to store key size size must be greater than 0 Must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments Get KeySize is used for determining how large a block of memory is necessary to hold the key returned by Get Key ypenMAX AL i XAresult GetKey XAMetadataExtractionItf self XAuint32 index XAuint32 keySize XAMetadataInfo pKey Returns a XAMet adata Info structure and associated data referenced by the structure for a key Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALI XA_RESULT_BUFFER_INSUFFICII Comments Get Key fills out the XAMet adatalInfo
224. alueSize void pConfigValue Interface ID 2879ed80 d6dd 1 1df 87db 0002a5d5c5 1b Defaults None COpenMAX AL Methods SetConfiguration XAresult SetConfiguration XAConfigExtensionsItf self const XAchar pConfigKey XAuint32 valueSize const void pConfigValue Sets the configuration as a key value pair Parameters self Interface self reference pConfigkey in String representing the key the parameter attribute name of the configuration valueSize in The size of the value referenced by pConfigValue in bytes pConfigValue in Address of the parameter attribute being set Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The configValue input parameter is passed by reference For example this method could be used to set the RTSP proxy IP address and port number for example 123 213 123 5 80 or the bearer specific bandwidth limits for example 900 1800 MHz It is up to the underlying object to appropriately parse the key value pair and make sense of the parameter setting ypenMAX AL j GetConfiguration XAresult GetConfiguration XAConfigExtensionItf self const XAchar pConfigKey XAuint32 pValueSize void pConfigValue Gets the configuration setting as a key value pair Parameters Interface self reference pConfigKey in String representing t
225. ame media object state upon accepting the new source For example if the player object is currently in XA_PLAYSTATE_PLAYING State it shall maintain the xA_PLAYSTATE_PLAYING state This method is asynchronous The application would need to register for the xaSourceChangeCallback to get notification of the outcome of the source change xaSourceChangeCallback RegisterSourceChangeCallback ChangeSink XAresult ChangeSink XADynamicSourceSinkChangelItf self const XADataSink pExistingDataSink const XADataSink pNewDataSink XAboolean async Changes the specified data sink of the media object Parameters in Interface self reference ExistingDataSink in Pointer to the structure specifying the existing media data sink Must be non NULL pNewDataSink in Pointer to the structure specifying the new media data sink Must be non NULL async in If xa BooLEAN FALSE the method will block until termination Otherwise the method will return XA_RESULT_SUCCESS and will be ypenMAX AL ChangeSink Return value Comments See also executed asynchronously On termination the xaSinkChangeCallback will be invoked if registered The resultCode parameter of the callback will contain the result code of the method However if the implementation is unable to initiate the asynchronous call XA_RESULT_RESOURCE_ERROR will be returned The following return values are poss
226. ame would be empty the length of the value is always at least 9 bytes There can be multiple KhronosSeekPoint items for the same seek point to allow multiple language support That is the number of KhronosSeekPoint items is the number of seek points times the number of languages supported The AddKeyFilter method can be used for looking at seek points only in specific language by setting the pKey parameter as KhronosSeekPoint and the valueLangCount ry parameter to contain the language country code of interest Mandated Keys An implementation of XAMet adataExtractionItf must support all methods on the interface This specification does not mandate that an implementation support any particular key Khronos key or otherwise even in cases where the interface itself is mandated on an object Filtering of Metadata Items The interface enables filtering of metadata items according to several criteria see AddKeyFilter Theoretically the application may never use the filtering functionality and do filtering itself However in practice an implementation may use the filtering information in order to make extraction more efficient in terms of memory consumption or computational complexity For that matter it is recommended that applications that are not interested in the entire set of metadata items will use the filtering mechanism COpenMAX AL i Prototype XA API extern const XAInterfaceID XA IID METADATAEXTRACTION
227. amera use case Still camera use case is similar to the video camera use case except the Media Recorder exposes different interfaces It provides the XASnapshotIt f interface for still image capture and XAImageEncoderItf for the image encoder settings instead of the XARecordItf and XAVideoEncoderlIt f interfaces respectively PROFILE NOTES The support for this use case is mandated only in the Media Player Recorder profile 4 7 7 Radio Playback o XAObjectltf o XAEngineltf Defaul OutputDevice r amh Device O XARDSItf O XAVolumeltf O XARadioltf O XAPlayltf O XAOutputMixttf O XAObjectltf O XAObjectltf O XAObjectitf Figure 13 Radio playback use case A Media Player object may also facilitate the radio playback use case As always we create the Media Player using the XAEngineItf interface of the engine object Upon creation we associate the Media Player with an Output Mix which we create with the XAEngineItf interface for audio output By default OpenMAX AL automatically associates the Output Mix with the system dependent default output device During the creation we set the Radio I O device which we create with the XAEngineItf interface as the data source PROFILE NOTES The support for this use case is optional in all profiles since support for Radio I O device object is optional COpenMAX AL 4 7 8 Reading Metadata o XAObjectitf XAEngineltf I creates I URI DataS
228. ames per se cond This value is represented in Q16 format where the upper 16 bits represent the integer value and the lower 16 bits represent the fractional value maxBitRate Maximum encoding bitrate in units of bits per second ypenMAX AL 388 rateControlSupported Encoding rate control modes supported See XA RAT This field is only valid for encoders otherwise it is reserved ECONTROLMODE macros profileSetting Profile supported by codec See XA_VIDEOPROF ILI amp Macros levelSetting Level supported by codec See XA_VIDEOLEVEL macros 9 1 38 XAVideoSettings typedef struct XAVideoSettings_ XAuint32 encoderId XAuint32 width XAuint32 height XAuint32 frameRate XAuint32 bitRate XAuint32 rateControl XAuint32 profileSetting XAuint32 levelSetting XAuint32 keyFrameInterval XAVideoSettings This structure is used to set the video encoding parameters Identifies the supported video encoder Refer to XA_VIDEOCODEC macros Frame width horizontal resolution height Frame height vertical resolution frameRate Encoding frame rate in units of frames per second This value is represented in Q16 format where the upper 16 bits represent the integer value and the lower 16 bits represent the fractional value bitRate Encoding bitrate in units of bits per second rateControl Encoding rate control mode See XA RATI i E macros profileSetting Prof
229. an take in order of seconds time until RDS data is received these callbacks will be called then See section D 3 for an example using this interface Prototype XA_API extern const XAInterfaceID XA_IID_RDS struct XARDSItf typedef const struct XARDSItf_ const XARDSItf struct XARDSItf XAresult QueryRDSSignal XARDSItf self XAboolean pIsSignal XAresult GetProgrammeServiceName XARDSItf self XAchar pPSname XAresult GetRadioText XARDSItf self XAchar pRt XAresult GetRadioTextPlus XARDSIt self XAuint8 contentType XAchar pInformationElement XAchar pDescriptor XAuint8 pDescriptorContentType XAresult GetProgrammeType XARDSIt self XAuint32 pPty XAresult GetProgrammeTypeString XARDSIt self XAboolean isLengthMax16 XAchar pPty COpenMAX AL s XAresult GetProgrammeIdentificationCode XARDSItf self XAint16 pPICode XAresult GetClockTime XARDSIt self XAtime pDateAndTime XAresult GetTrafficAnnouncement XARDSItf self XAboolean pTa XAresult GetTrafficProgramme XARDSItf self XAboolean pTp XAresult SeekByProgrammeType XARDSItf self XAuint32 pty XAboolean upwards XAresult SeekTrafficAnnouncement XARDSIt self XAboolean upwards XAresult SeekTrafficProgramme XARDSItf self XAboolean upwards XAresult SetAutomaticSwitching XARDSItf sel
230. ange XAuint32 pMinFreq XAuint32 pMaxFreq XAuint32 pFreqInterval Description Returns the minimum and maximum supported freguencies and the modulation of the given freguency range Parameters self Interface self reference range in Freguency range whose properties are gueried See XA FREORANGE macros section for ranges Use IsFreqRangeSupported to query supported ranges first out Minimum frequency of the given frequency range in Hertz out Maximum frequency of the given frequency range in Hertz pFreqinterval out Interval between supported frequencies on the given frequency range That is the frequency accuracy of the device Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL i SetFrequency XAresult SetFrequency XARadioItf self XAuint32 freq Description Sets the frequency asynchronously xaRadioCallback callback with XA_RADIO_EVENT_FREQUENCY_CHANGED or XA_RADIO_EVENT_FREQUENCY_ERROR events used for notification of the result The implementation rounds the given value to the nearest supported one See pFreqInterval parameter of Get FreqRangeProperties method Parameters seit seit tin lin Interface self reference a ies New frequency in Hertz Must be between pMinFreq and pMaxFreq as of Get FreqRangeProperties method
231. ant any licenses under any Necessary Patent Claims covering SAMPLE CODE and EXAMPLES Khronos OpenKODE OpenVG OpenSL ES and OpenMAX are trademarks of the Khronos Group Inc OpenCL is a trademark of Apple Inc COLLADA is a trademark of Sony Computer Entertainment Inc and OpenGL is a registered trademark of Silicon Graphics Inc used under license by Khronos All other product names trademarks and or company names are used solely for identification and belong to their respective owners COpenMAX AL i Table of Contents PART 1 USER MANUAL issssssssessssssssssvsesscscvsenseseossscesensasesseosdsassebssecescosdsoesebssnedsoosdsessobsdsseseosdsoesobsdsedsoosdsossobsdssessossees 1 1 OVERVIEW sonore a E O E E E 2 1 1 PURPOSE OFTHIS DOCUMENT neiere ien aina A cies E A a A e EA EE ESENG 2 LILI Abou tthe Khronos GrOIPSisesneenheaagae agas seas aiissghasgg sia e e E E EEEE E E E sa 2 1 2 SCOPE seeiis e E E Gara ett oe ee E 2 1 3 INTENDED AUDIENCE n se seihstbescesteessuasedisiegsntensseboacdonnstdendcedndediecsetns EEEE E E AE E Sin EE a Pe inier EEEE Ee 2 14 A BRIEF HISTORY OFOPENMAX noeeue ireanii eener keen iranis iE E i iann e ia 3 141 The OpenMAX Application Layer c isseisevssatesvsssessepsesecsooasseutensaseceansdsystevcnpectensinntvebeagndeapsdpessaessessonesons 3 14 2 Relationship to OpenMAX Une sicosscsiessassesvvensosscscsteevvesnsveveavedsenesveduovuiveductuetesteveetegssuene stevvivesbeveteeueteey 4 1 5 RELATIONSHIP TO OPENSL ESG
232. aphore Implementation specific semaphore wait Checks for error If any errors exit the application void CheckErr XAresult res if res XA_RESULT_SUCCESS Debug printing to be placed here esate 1L p CALLBACKS void CameraCallback XACameraltf caller VORO pContext XAuint32 event Id XAuint32 eventData if eventId XA_CAMERACBEVENT_FOCUSSTATUS if eventData XA_CAMERA FOCUSMODESTATUS_UNABLETOREACH Unable to focus to the subject now Notify the user to try again or shoot anyway fe Tuis Sxemole Just exits exit 1 else if eventData XA_CAMERA_FOCUSMODESTATUS_REACHED sem_post amp semFocus void SnapshotInitiatedCallback XASnapshotitf caller VONE context sem_post amp semCamInit void SnapshotTakenCallback XASnapshot Itf caller CpenMAX AL i wale se context XAuint32 numberOfPicsTaken const XADataSink image if numberOfPicsTaken 1 error for some reason wrong number of pics were taken exite UL a sem_post amp semCamShoot void MetadataInsertionCallback XAMetadataInsertionItf caller void pContext XAMetadataInfo pKey XAMetadataInfo pValue XAint32 nodelID XAboolean result if result XA_RESULT_SUCCESS print an error message deallocate memory free pKey free pValue Please note that not all
233. application context and callback context s or between multiple callback contexts See comment in description section regarding thread safety of this method EnterCriticalSection ypenMAX AL i 8 37 XAVibraltf Description XAVibraltf interface is used to activate and deactivate the Vibra I O device object as well as to set its frequency and intensity if supported XAVibraltf uses the following state model which indicates whether the vibration device is vibrating or not CreateVibraOutputDevice Vibrate XA_BOOLEAN_TRUE Vibrate XA_BOOLEAN_FALSE Destroy Destroy Figure 20 Vibra I O device state model This interface is supported on the Vibra I O device object see section 7 9 Prototype XA API extern const XAInterfaceID XA IID VIBRA struct XAVibraItf_ typedef const struct XAVibraItf_ const XAVibralItf struct XAVibraItf_ XAresult Vibrate XAVibraItf self XAboolean vibrate XAresult IsVibrating XAVibraItf self XAboolean pVibrating XAresult SetFrequency XAVibraItf self XAmilliHertz frequency XAresult GetFrequency XAVibraItf self XAmilliHertz pFrequency ypenMAX AL XAresult SetIntensity XAVibraItf self XApermille intensity XAresult GetIntensity XAVibraItf self XApermille pIntensity Interface ID fe374c00 f776 1 1db a8f0 0002a5d5c51b Defaults
234. apshot Itf and XARecordIt f for details regarding exactly when the media is written to the sink The metadata should have been set with this interface before the writing takes place Metadata Insertion for Tree based Structures For tree based metadata structures e g 3GPP or MP4 files instead of using CreateChildNode to create the tree from scratch the XAMetadataInsertionItf can be used in conjunction with the optional XAMetadataTraversalltf on the media recorder object to insert metadata items in the appropriate nodes in the tree This requires that the implementation of the media recorder object detect the container format of the data sink that was specified at the time that the object was created see the CreateMediaRecorder method in Section 8 13 and create the appropriate metadata tree structure The XAMetadataTraversalltf can then be used to traverse this tree structure with traversal mode set to XA_ METADATATRAVERSALMODE_NODE to determine the node IDs and insert metadata items at the appropriate nodes using XAMetadatalInsertionlItf InsertMetadataltem This mechanism has the following advantages it frees the application developer from the burden of determining the correct metadata tree structure for a given container format and ensures a higher level of accuracy of the tree structure used implementers typically have the wherewithal to use the correct structure XAMetadataTraversalltf is not needed for inserting metadata into flat
235. arameters Interface self reference level in Volume level in millibels The valid range is XA_MILLIBEL_MIN maximum supported level where maximum supported level can be queried with the method GetMaxVolumeLevel The maximum supported level is always at least 0 mB Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If the object is muted calls to Set VolumeLevel will still change the internal volume level but this will have no audible effect until the object is unmuted N ypenMAX AL a GetVolumeLevel XAresult GetVolumeLevel XAVolumeItf self XAmillibel pLevel Gets the object s volume level Parameters seif f fse1t m lin Interface self reference a ad Pointer to a location to receive the object s volume level in millibels This must be non NULL Return value 3 return lal can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetMaxVolumeLevel XAresult GetMaxVolumeLevel XAVolumeItf self XAmillibel pMaxLevel Gets the maximum supported level self e self in Interface self reference ail out Pointer to a location to receive the maximum supported volume level in millibels This must be non NULL Return value inal return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INV
236. are enabled the order for which these image effects are applied is vendor implementation specific See also QuerySupportedImageEffect DisableImageEffect IsImageEffectEnabled DisableImageFffect XAresult DisableImageEffect XAImageEffectsItf self XAuint32 imageEffectID Disable an image effect imageEffectId in self Interface self reference If the specified image effect is already disabled XA_RESU See also QuerySupportedImagel IsImageEffectEnabled ypenMAX AL Identifies the supported image effect Refer to XA_IMAGEEFFECT macro see section 9 2 37 Return value The return value can be one of the following XA_RESULT_SUCCESS Effect 1 LT_SUCCESS will be return EnableiImage l Effect 189 IsImageEffectEnabled XAresult IsImageEffectEnabled XAImageEffectsItf self XAuint32 imageEffectID XAboolean pEnabled Checks to see if an image effect is enabled Interface self reference imageEffectId in Identifies the supported image effect Refer to XA_IMAGEEFFECT macro see section 9 2 37 pl Identifies if the image effect is enabled XA_BOOLEAN_TRUI indicates that the effect is enabled and XA_BOOLEAN_FALS indicates that the effect is disabled Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID See als
237. art of the callback method ESS KT FR INVALILD Return value The return value can be one of the following XA RESULT SUCCI XA RESULT PARAME xaStreamEventChangeCallback ypenMAX AL 330 OueryActiveStreams XAresult QueryActiveStreams XAStreamInformationItf self XAuint32 pNumStreams XAboolean pActiveStreams Returns the active state for all streams Must not be called on a Metadata Extractor object pNumStreams in out Size of the pActiveStreams array If pActiveStreams is null QueryActiveStreams will fill in the desired size of the array This will be equal to the total number of streams pActiveStreams out An array of XAboolean values indicating which streams are active Return value The return value can be one of the following XA_R 1 E XA_R i R XA_R 1 XA_R 1 ESU ES UCCESS RAMETER_INVALID ES RECONDITIONS_VIOLAT ES UFFER_INSUFFICIENT If numStreams i s less than the total number of streams the implementation may elect to return SULT_BU FFER_INSUFFICIENT This function shall not be called on a metadata extractor object and shall return Comments a XA_RE iT ER_ ENT XA_RESULT_PRECONDITIONS_VIOLATED in this case ypenMAX AL i SetActiveStream XAresult SetActiveStream XAStreamInfo
238. ataLocator_IODevice DataLocator_NativeDisplay DataLocator_OutputMix Locator_URI Locator_MediaObject Locator_Null Locator_ContentPipe The first field of each of these structures includes the 32 bit LlocatorType field which identifies the locator type See XA_DATALOCATOR definitions and hence the structure pointed to Note The available XA_DATALOCATOR definitions may be extended through an API extension pFormat A pointer to the specified format structure This may point to any of the following structures XADataFormat_PCM Deprecated XADataFormat_PCM_EX XADataFormat_MIME XADataFormat_RawImage The first field of each of these structures includes the 32 bit format Type field which identifies the format type XA_DATAFORMAT definitions and hence the structure pointed to pFormat is ignored if pLocator is XADataLocator_IODevice XADataLocator_OutputMix XADataLocator_NativeDisplay XADataLocator_MediaObject or XADataLocator_Null COpenMAX AL 9 1 20 XADataSource typedef struct XADataSource void pLocator void pFormat XADataSource Fields include pLocator Pointer to the specified data locator structure This may point to any of the following structures XA XA XA XA XA XA Datal Datal Datal Datal Datal Datal Locator_Address Locator_IODevice Locator_URI Locator_MediaObject Locator_Null Locator_ContentPipe The first field of each of these structures includes the
239. ate has an effect on the player s prefetch status see XAPrefetchStatusItf for details The player may return XA_RESULT_PERMISSION_DENIED XA_RESULT_CONTENT_CORRUPTED or XA_RESULT_CONTENT_UNSUPPORTED respectively if at the time a state change is requested it detects insufficient permissions corrupted content or unsupported content When the player reaches the end of content the play state will transition to paused and the play cursor will remain at the end of content ypenMAX AL i GetPlayState XAresult GetPlayState XAPlayItf self XAuint32 pState Gets the player s current play state Parameters Interface self reference pState out Pointer to a location to receive the current play state of the player This must be non NULL Return value The return value can be one of the following XA_RESUL _ SUCCESS XA_RESUL _PARAMETER_INVALID GetDuration XAresult GetDuration XAPlayItf self XAmillisecond pMsec Gets the duration of the current content in milliseconds None in Interface self reference Parameters pMsec out Pointer to a location to receive the number of milliseconds corresponding to the total duration of this current content If the duration is unknown this value shall be XA_TIME_UNKNOWN This must be non NULL Return value The return value can be one of the fol
240. aticTrafficAnnouncement XARDSItf self XAboolean pAutomatic Announcement in another program Based on TP and TA fields Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID COpenMAX AL GetODAGroup XAresult GetODAGroup XARDSItf self XAuint16 AID xaGetODAGroupCallback callback void pContext Description Returns asynchronously via callback xaGetODAGroupCallback the application Group and the message bits concerning the given ODA Open Data Application ODA is a mechanism that a broadcaster can use to transfer data that is not explicitly specified in the RDS standard Open Data Applications are subject to a registration process Transmission protocols used by ODAs may be public or private See RDS Forum web page http www rds org uk for details cal Address of the callback pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL i SubscribeODAGroup XAresult SubscribeODAGroup XARDSItf self XAint16 group XAboolean useErrorCorrection di Description Subscribes the given ODA group If the given group was already subscribed this call doesn t do anything Only new data in groups that have been sub
241. atically considered a valid implementation of the non thread safe mode however implementations of both modes may choose to implement them differently Implementers should note that implementation of thread safe mode assumes knowledge of the threading mechanisms used by the application 3 3 Notifications In several cases the application needs to be notified when some event occurred inside the OpenMAX AL implementation such as when playback of a file has ended or when an asynchronous method has completed These notifications are implemented as callback functions the application registers a method whose signature is specified by the API and this method will be called by the OpenMAX AL implementation every time a certain event occurs Callback functions are registered per interface and per event type thus registering a callback for a certain event on a given object through one of its interfaces will not cause this callback to be called if the same event occurs on a different object or if a different event occurs on the same object The event type is simply designated by the method that was used to register the callback At any given time a maximum of one callback function may be registered per interface per event type Registering a new callback on the same interface using the same registration method will un register the old callback Similarly registering NULL is the way to un register an existing callback without registering a new one
242. ation XA_DEVLOCATION_HANDSET mendev ecer InputDeviceIDs i mic available XA_BOOLEAN_TRUE break If neither of the preferred input audio devices is available no point in continuing if mic_available Appropriate error message here excite iL p Initialize arrays requared and aidArray for i 0 i lt MAX_NUMBER_INTERFACES i required i XA_BOOLEAN_FALS iidArray i XA_IID_NULL es Get the optional DEVICE VOLUME interface from the engine res engine gt GetInterface engine CO penMAX AL I XA_IID_DEVICEVOLUME void amp devicevolumeltf CheckErr res Set recording volume of the microphone to 3 dB This assumes that mic device uses millibels should use GetVolumeScale to be sure res devicevolumelItf gt SetVolume devicevolumeltf Mle CewiLeelD SOO s Claeeldmicie resik Setup cre darca source structure locator_mic locatorType XA_DATALOCATOR_IODEVICE locator_mic deviceType XA_TODEVICE_AUDIOINPUT loci tor imierdevi teei mic_devicelID GI locator_mic device NULL audioSource pLocator void amp locator_mic audioSource pFormat TENUTI fj Serio the carca sink scrcectre lt uri locatorType XA DATALOCATOR_URI CUR XAchar file recordsample wav mime formatType XA_DATAFORMAT_ MIME mime pMimeType XAchar audio x wav m
243. ayback Using this object is recommended particularly when the application is interested only in presenting metadata without playing the content and when wanting to present metadata of multiple files The latter is particularly interesting for generating playlists for presentation purposes because a player object would unnecessarily allocate playback resources Furthermore players cannot change their data source dynamically therefore for metadata extraction from multiple files the application needs to create and destroy player objects many times which is both inefficient and may result in fragmentation of the heap A Metadata Extractor object does not have a data sink but it has one data source that can be dynamically changed 4 1 4 Audio Output Mix Object The API allows for routing of audio to multiple audio outputs and includes an audio output mix object that facilitates this functionality The application retrieves an output mix object from the engine and may specify that output mix as the sink for a media object The audio output mix object is specified as a sink for a media object using the XA_DATALOCATOR_OUTPUTMIX data locator as described in section 9 2 25 The engine populates the output mix with a set of default audio output devices The application may query for this list of devices or request changes to it via the XAOutputMixItf interface The API does not provide a direct audio output IO device as a sink for media objects The audio
244. ayer XAObjectIt OutputMix XAPlayItf eg baine i XAEnginelItf Engineltf XAAudiolODeviceCapabilitiesItf AudiolODeviceCapabilitiesItf XAAudioOutputDescriptor AudioOutputDescriptor XAresult reep XADataSink audioSink XADataSink videoSink XADataLocator_OutputMix locator_outputmix XADataLocator_NativeDisplay locator_displayregion XAVolumeltf volumeltf XADataSource AWSOUIECES XADataLocator_URI uri XADataFormat_MIME mime Tae ala endan e XAboolean required MAX_NUMBER_INTERFACES XAInterfaceID iidArray MAX_NUMBER_INTERFACES XAuint32 OutputDeviceIDs MAX_NUMBER_OUTPUT_DEVICES COpenMAX AL XAint32 numOutputs 0 XAboolean hfs_available XA BOOLEAN FALSE XAboolean hfs_default XA BOOLEAN FALSE XAuint32 hfs_devicelID 0 XANativeHandle nativeWindowHandle NULL XANativeHandle nativeDisplayHandle NULL Get the XA Engine Interface which is implicit res engine gt GetInterface engine XA_IID_ENGINE void amp EngineItf CheckErr res Get the Audio IO DEVICE CAPABILITIES interface which is also imolieit res engine gt GetInterface engine XA_TID_AUDIOIODEVICHCAPABILITIES void amp AudiolODeviceCapabilitiesItf CheckErr res numOutputs MAX _NUMBER_OUTPUT_DEVICES res AudiolODeviceCapabilitiesItf gt GetAvailableAudioOutputs AudiolODeviceCapabilitiesItf numOutputs Outpu
245. back callback with XA_RADIO XA_RADIO i 1 Parameters range in Interface self reference New frequency range See XA_FREQRANGE macros section for ranges Use IsFreqRangeSupported to query supported ranges Return value The return value can be one of the following XA_RESUL SUCC ESS XA_RESU _PARAI KT ER_INVALID See Section 9 2 58 XA_RADIO_EVENT macros GetFreqRange XAresult GetFreqRange XARadioItf self XAuint8 pRange Gets the current freguency range Interface self reference Current frequency range See XA_FREQRANGE macros section for ranges Return value The return value can be one of the following XA_RESUL XA_RESU UCC i PARA ESS ET ER_INVALID ypenMAX AL 271 IsFreqRangeSupported XAresult IsFreqRangeSupported XARadioItf self XAuint8 range XAboolean pSupported Parameters Interface self reference range out Frequency range whose availability is queried See XA_FRE macro section for ranges pSupported True if the range is supported false otherwise Return value The return value can be one of the following XA RESULT SUCCI XA RESULT PARAMETER INVALID ypenMAX AL GetFreqRangeProperties XAresult GetFreqRangeProperties XARadioItf self XAuint8 r
246. bile DLS format This is an optional parameter If NULL the default bank of instruments definitions is used This parameter is ignored for non MIDI data sources pAudioSnk in Pointer to the structure specifying the audio data sink such as an audio output device This field may be NULL such as when the data does not contain audio NULL such as when the data does not contain video or an piImageVideoSnk in Pointer to the structure specifying the image video data sink such as a native window handle This field may be image devices as data sinks may not be supported for non MIDI media Pointer to the structure specifying the Vibra I O device to which the media player should send vibration data If NULL no Vibra I O devices will be controlled Vibra I O controlled LED array I O devices as data sinks may not be supported for non MIDI media numInterfaces Number of interfaces that the object is requested to support not including implicit interfaces in EDArray in Pointer to the structure specifying the LED array I O device to which the media player should send LED array data If NULL no LED array I O devices will be in ypenMAX AL CreateMediaPlayer piInterfacelIds i Array of numInterfaces interface IDs which the object should support This parameter is ignored if numInterfaces is zero piInterfaceRequired i Array of numInterfaces flags each specifying whether the respective interface is r
247. by the call with the array of output device IDs provided that ESS R_INSUFFICI _PARA F T FR INVALIL ENT D Comments Note that available implies those audio output devices that are active that is can render audio and this number may be less than or equal to the total number of audio output devices on the system For example if a system has both an integrated loudspeaker and a 3 5mm headphone jack but if the headphone jack is not connected to anything the number of available audio outputs is only 1 Device IDs should not be expected to be contiguous Device IDs are unique the same device ID shall not be used for different device types GetAvailableAudiolInputs ypenMAX AL 82 OueryAudioOutputCapabilities XAresult QueryAudioOutputCapabilities XAAudioIODeviceCapabilitiesIt self XAuint32 deviceID XAAudioOutputDescriptor pDescriptor pDescriptor Structure defining the characteristics of the audio output device Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA RESULT IO ERROR Comments This method outputs a structure that contains one or more pointers to arrays The memory for these arrays shall be allocated by the OpenMAX AL implementation and shall not be deallocated by the application The OpenMAX AL implementation shall keep the data contained within the arrays valid for the lifetime of this int
248. cancelled by calling Cancel Snapshot method while the viewfinder is frozen if CancelSnapshot is not called the picture will by stored automatically once the viewfinder is unfrozen See Cancel Snapshot method for details Implementations may chose not to support a NULL data sink specified in the InitiateSnapshot method and return XA_FEATURE_ UNSUPPORTED COpenMAX AL il Methods InitiateSnapshot XAresult InitiateSnapshot XASnapshotItf self XAuint32 numberOfPictures XAuint32 fps XAboolean freezeViewFinder const XADataSink pSink xaSnapshotInitiatedCallback initiatedCallback xaSnapshotTakenCallback takenCallback void pContext Description This method prepares the device for snapshot to shorten the actual shooting delay with TakeSnapshot method The various settings for snapshot are set with this method the specified number of snapshots the output location either to the XADat aS ink if it is specified or to memory if no XADat aSink is specified and then calls xaSnapshotInitiatedCallback method Asynchronous Second call of this method before the call to TakeSnapshot method will reinitialize the shooting with the new parameter values Pre conditions The image settings need to be set with XAImageEncoderItf SetImageSettings method prior calling this method unless the default image settings will be used by calling CancelSnapshot method If CancelSnapshot has not been call
249. ces and the latter has higher priority Given objects of identical priority competing for resources the implementation steals the resources from the object that acquired them earlier to give to the object that requested them most recently Different objects may require entirely different resources For this reason it is possible that an object of high priority may have its resources stolen before an object of low priority For example a high priority object may require access to dedicated hardware on the device while the low priority object does not If this dedicated hardware is demanded by the system the resources may need to be stolen from the higher priority object leaving the low priority object in the Realized state Loss of Control Loss of control of an interface and its associated underlying resource means that the application has lost the ability to set the parameters of the interface and resource but the interface and resource are otherwise still functioning and available for the application to use For example imagine a system with a maximum of one environmental reverb unit limited to one due to memory CPU constraints or because it is implemented in a hardware DSP An application configures the environmental reverb for its output mix A Another higher priority application configures the environmental reverb for its own output mix B The implementation may now signal to the first application that output mix A has lost control of the
250. cific manner XADynamicSourceltf see section 8 11 This interface is deprecated Use XADynamicSourceSinkChangelIt see section 8 12 instead This interface enables changing the data source of the recorder post creation XADynamicSourceSinkChangeltf see section 8 12 This interface enables changing the data source or the data sink of the object post creation XAEqualizerltf see section 8 14 This interface controls a recorder specific equalizer effect This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces XAlmageControlsitf see section 8 15 This interface exposes controls for brightness contrast and gamma adjustments XAlmageEffectsitf see section 8 17 This interface controls the image effects This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces ypenMAX AL i XAMetadataExtractionltf see section 8 21 This interface exposes methods for retrieving metadata XAMetadataMessageltf see section 8 23 This interface exposes methods for setting metadata callbacks To be used in conjunction with XAMetadataExtractionltf XAMetadataTraversalltf see section 8 24 This interface exposes methods for navigating through metadata XAVideoPostProcessingltf see section 8 41 This interface controls scaling mirroring cropping and rotating XAVolumeltf see section 8 42 This interface exposes volume related controls
251. corder Radio Camera Output Mix Vibra LED Array Extractor Interface MP MP MR MP MP MR MP MR XAMetadataExtractionItf XAMetadataInsertionItf XAMetadataMessagelItf XAMetadataTraversallitf XAObjectItf XAOutputMixItf XAPlayItf XAPlaybackRatelItf XAPrefetchStatusItf XARadiolItf XARDSItf XARecordIitf XASeekItf XASnapShotItf XAStreamInformationItf XAThreadSyncitf XAVibraItf XAVideoDecoderCapabilitiesItf XAVideoEncoderCapabilitiesItf XAVideoEncoderItf XAVideoPostProcessingItf XAVolumeltf COpenMAX AL 464 Legend Object mandated in Media Player profile Object mandated in Media Player Recorder profile MP Object optional in Media Player profile MR Object optional in Media Player Recorder profile Implicit and mandated interface Mandated explicit interface Mandated explicit interface with some optional methods see comments Applicable optional interfaces Comments for mandated interfaces Mandated only for timed based media content stored locally Mandated only for uses cases with audio or video Mandated only for uses cases with image sa ar bar is Mandated only for u
252. ct XAThreadSyncItf_ XAresult EnterCriticalSection XAThreadSyncItf self XAresult ExitCriticalSection XAThreadSyncItf self Interface ID 3599ea0 f776 1 1db b3ea 0002a5d5c5 1b ypenMAX AL 7 Defaults Not in critical section state Methods EnterCriticalSection XAresult EnterCriticalSection XAThreadSyncItf self Description Blocks until the engine is not in critical section state then transitions the engine into critical section state The calling context must not already be in critical section state Return value The return value can be one of the following XA RESULT SUCCESS XA RESULT PRECONDLTIONS VIOLATI Comments Use this method to achieve synchronization between application context and callback context s or between multiple callback contexts See comments in the description section regarding thread safety of this method ExitCriticalSection ExitCriticalSection XAresult ExitCriticalSection XAThreadSyncItf self Description Transitions the engine from critical section state to non critical section state Pre conditions The engine must be in critical section state The call must be made from the same context that entered the critical section Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PRECONDITIONS_VIOLATI Comments Use this method to achieve synchronization between client
253. ctions the result code is contained in the data of the notification sent upon the completion of the operation Every API method has a set of pre conditions associated with it consisting of e API state in which the method should be called e Context from which the method can be called The pre conditions are clearly documented for every method When the application violates any of the pre conditions the method call will fail and the method s result code will indicate the violation The API will remain stable and its state will not be affected by the call However it is recommended that applications do not rely on this behavior and avoid violating the pre conditions The main value of this behavior is to aid in the debug process of applications and to guarantee stability in extreme conditions and specifically under race conditions However the API s behavior may be undefined and even unstable in any of the following conditions e Corruption of the self parameter which is passed as every method s first parameter or any other parameter passed by pointer e Violation of the threading policy 3 5 Memory Management 3 5 1 General The application is responsible for allocating and deallocating all memory originating within the application space OpenMAX AL is responsible for allocating and deallocating all memory originating within the OpenMAX AL implementation At no point shall the application deallocate memory allocated by the Op
254. define XA_ROOT_NODE_ID XAint32 Ox7FFFFFFF This define is used to refer to the root node of the metadata tree ypenMAX AL 5 9 2 71 XA SAMPLINGRATE define XA SAMPLINGRATE 8 XAuint32 8000000 define XA SAMPLINGRATE 11 025 XAuint32 11025000 define XA SAMPLINGRATE 12 XAuint32 12000000 define XA SAMPLINGRATE 16 XAuint32 16000000 define XA SAMPLINGRATE 22 05 XAuint32 22050000 define XA SAMPLINGRATE 24 XAuint32 24000000 define XA SAMPLINGRATE 32 XAuint32 32000000 define XA SAMPLINGRATE 44 1 XAuint32 44100000 define XA_SAMPLINGRATE 48 XAuint32 48000000 define XA_SAMPLINGRATE 64 XAuint32 64000000 define XA_SAMPLINGRATE 88 2 XAuint32 88200000 define XA_SAMPLINGRATE 96 XAuint32 96000000 define XA_SAMPLINGRATE_ 192 XAuint32 192000000 These macros specify the commonly used sampling rates in milliHertz supported by most audio I O devices Q Q Q Q XA_SAMPLIN Q RATE_22_05 XA_SAMPLIN Q RATE_24 XA_SAMPLIN Q RATE_32 XA_SAMPLIN Q RATE_44_ XA_SAMPLIN Q RATE 48 XA SAMPLIN Q RATE_64 XA_SAMPLIN Q RATE 88 2 XA_SAMPLIN Q RATE 96 XA SAMPLIN Q RATE 192 9 2 72 XA_SEEKMODE define XA_SEEKMODE FAST define XA_SEEKMODE ACCURATE XAuint32 0x0001 XAuint32 0x0002 These values represent seek modes The nature of encoded c
255. defines a fixed set of priorities for use with this method None ypenMAX AL GetPriority XAresult GetPriority struct XAObjectItf self XAint32 pPriority aati paca Parameters in Interface self reference pPriority out Pointer to a location to receive the object s priority This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetLossOfControllnterfaces XAresult SetLossOfControliInterfaces XAObjectItf self XAint16 numInterfaces const XAInterfaceID pInterfacelIDs XAboolean enabled Description Sets unsets loss of control functionality for a list of interface IDs The default value of the enabled flag is determined by the global setting see XA_ENGINEOPTION_LOSSOFCONTROL 9 2 32 nunTaterfaces in The length of the plnterfaceIDs array ignored if pInterfaceIDs is NULL pInterfaceIDs in Array of interface IDs representing the interfaces impacted by the enabled flag enabled in If XA_BOOLEAN_TRUE loss of control functionality is enabled for all interfaces represented by pInterfacelIDs If XA_BOOLEAN_FALSE loss of control functionality is disabled for all interfaces represented by pInterfacelIDs Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALID Comments A call to this method overrides the global setting for lo
256. device pIndex If pIndex is NULL then as an input specifies which vibration device to obtain the capabilities of XA_DEFAULTDEVICEID_VIBRA can be used to determine the default vibration device s capabilities pDescriptor Structure defining the capabilities of the vibration device Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments An application can determine the number of vibration devices by calling this method with pDescriptor set to NULL and examining pIndex The application can then determine the capabilties of all the vibration devices by calling this method multiple times with p Index pointing to each different indexes from 0 up to one less than the number of vibration devices A vibration device is selected using the CreateVibraDevice method XA_DEFAULTDEVICEID_VIBRA see section 9 2 26 ypenMAX AL j 8 14 XAEqualizerltf Description XAEqualizerItf is an interface for manipulating the equalization settings of a media object The equalizer EQ can be set up in two different ways by setting individual frequency bands or by using predefined presets The preset settings can be directly taken into use with the method UseP reset The current preset can be queried with the method GetPreset If none of the presets is set XA_EQUALIZER_UNDEFINED will be returned XA_EQUALIZER_UNDEFINED will also be re
257. ding XAresult InsertMetadataItem XAMetadataInsertionItf self XAint32 nodeID XAMetadataInfo pKey XAMetadataInfo pValue XAboolean overwrite XAresult RegisterCallback XAMetadataInsertionItf self xaMetadataInsertionCallback callback void pContext ypenMAX AL 215 Interface ID Ofe726a0 d7 1b 1 1df 9d6c 0002a5d5c5 1b Defaults Not applicable Callback xaMetadataInsertionCallback typedef void XAAPIENTRY xaMetadataInsertionCallback XAMetadataInsertionItf caller void pContext XAMetadataInfo pKey XAMetadataInfo pValue XAint32 nodeID XAboolean result Callback function called on completion of actual writing of a metadata key value pair Parameters caller Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered in The key that was written or that was tried to be written in case of failure The application can now free the memory allocated for this struct in The value that was written or that was tried to be written in case of failure The application can now free the memory allocated for this struct nodeID in ID of the node where this key value pair is or would be in case of failure result in True if writing of the metadata key value pair was successful false otherwise This is not a method of the interface but is the callback description and prototype Register
258. ding audio use case An Audio Recording use case is handled by an Media Recorder object It is created using XAI Enginelt f interface of the engine object Upon creation it is associated with an audio data source which can be for example a microphone an audio input device The data sink of the Media Recorder can be a URI pointing to an audio file in the local file system on which the audio will be recorded PROFILE NOTES The support for this use case is mandated only in the Media Player Recorder profile 35 4 7 4 Image Player o XAObjectltf o XAEngineltf o XAlmageDecoderCapabilitiesltf creates i Native Display URI DataSource Media Player DataSink O XAMetadataTraversailtf O XAMetadataExtractionltf O XAlmageControlltf O XAlmageEffectsltf O XAPlayltf O XAObjectitf Figure 10 Image player use case Media Player object also supports image playback We create a Media Player using the XA the engine object Upon creation we associate the Media Player with a native display hand Engineltf interface of le for image output We also set the data source of the Media Player during creation The data source can be for example a URI pointing to an image file in the local file system PROFILE NOTES The support for this use case is mandated in all profiles 36 4 7 5 Video Camera o XAObjectltf o XAEngineltf o XACameraCapabilitiesltf o XAAudiolODevic
259. ding devices The OpenMAX AL API design devotes particular attention to application developer friendliness Its status as an open cross platform API enables developers to port the same source across multiple devices with minimal effort Thus OpenMAX AL provides a stable base for application development This document specifies the OpenMAX AL API It does not define how to implement the API 1 3 Intended Audience This specification is meant for application developers and implementers The document is split into a user manual section and an API reference section Application developers can use this document as a user guide to learn about how to use OpenMAX AL and they can refer to the API reference when developing their applications Implementers of the API can use this specification to determine what constitutes an implementation conforming to the OpenMAX AL standard COpenMAX AL 1 4 A Brief History of OpenMAX The OpenMAX set of APIs was originally conceived as a method of enabling portability of components and media applications throughout the mobile device landscape Brought into the Khronos Group in mid 2004 by a handful of key mobile hardware companies OpenMAX has gained the contributions of companies and institutions spanning the spectrum of the multimedia field As such OpenMAX stands to unify the industry in taking steps toward media component portability Stepping beyond mobile platforms the general nature of the OpenMAX AL API makes
260. dio output camera radio LED and vibrator devices as well as mechanisms to query their capabilities Applications can use information regarding the devices capabilities to e Determine if they can even run on the system for example an application that can render only 8 kHz 8 bit audio might not be able to run on a system that can handle only sampling rates of 16 kHz and above at its outputs COpenMAX AL e Configure the user interface accordingly so that the user is presented with the correct device choices in the UI menus The audio I O device capabilities interface is described in section 8 3 4 1 2 Media Objects A media object implements a multimedia use case by performing some media processing task given a prescribed set of inputs and outputs Media objects include but are not limited to objects that present and capture media streams often referred to as players and recorders respectively They operate on audio video and image data or some combination of them The following characteristics define a media object e The operation it performs denoted by the creation method used to instantiate the media object e The inputs it draws data from denoted as its data sources and specified at media object creation e The outputs it sends data to denoted as its data sinks and specified at media object creation The media object creation methods are described in section 8 13 4 1 2 1 Data Source and Sink Structures A dat
261. e XAuint32 pMaxValue XAuint32 pNumSettings pSettings This method gets the supported manual white balance settings in in i XAuint 32 cameraDeviceID Camera Device ID supported in units of Kelvins lue pMaxValue out Identifies the maximum manual white balance setting supported in units of Kelvins pNumSettings in out If pSettings is NULL pNumSettings returns the number of supported manual white balance settings If the available manual settings are continuous from pMinValue to pMaxValue pNumSettings returns 0 If pSettings is non NULL and a non continuous range is supported pNumSet tings is length of the pSettings array pSettings out Returns an array of supported white balance settings pSettings may be NULL The values identified in the array are in units of Kelvins The array of values returned must include pMinValue and pMaxValue Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If manual white balance settings are unsupported the method returns XA_RESULT_FEATURE_UNSUPPORTED The memory for the pSettings array shall be allocated by the OpenMAX AL application COpenMAX AL D GetSupportedZoomSettings XAresult GetSupportedZoomSettings XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAboolean digitalEnabled XAboolean macroE
262. e define define define define define define define define define define define define define define define define define define define define define define define define define define XA_CHARACTERENCODING XA_CHARACTERENCODING_ UNKNOWN XA_CHARACTERENCODING_ BINARY XA_CHARACTERENCODING_ASCII XA_CHARACTERENCODING_BIG5 XA_CHARACTERENCODING_CODEPAGE1252 XA_CHARACTERENCODING_GB2312 XA_CHARACTERENCODING_HZGB2312 XA_CHARACTERENCODING_GB12345 XA_CHARACTERENCODING_GB18030 XA_CHARACTERENCODING_GBK XA_CHARACTERENCODING_IMAPUTF7 XA_CHARACTERENCODING_ISO2022JP XA_CHARACTERENCODING_IS02022JP1 XA_CHARACTERENCODING_ISO88591 XA_CHARACTERENCODING_IS0885910 XA_CHARACTERENCODING_IS0885913 XA_CHARACTERENCODING_1IS0885914 XA_CHARACTERENCODING_IS0885915 XA_CHARACTERENCODING_IS088592 XA_CHARACTERENCODING_IS088593 XA_CHARACTERENCODING_IS088594 XA_CHARACTERENCODING_IS088595 XA_CHARACTERENCODING_IS088596 XA_CHARACTERENCODING_IS088597 XA_CHARACTERENCODING_ISO088598 XA_CHARACTERENCODING_ISO88599 XA_CHARACTERENCODING_ISOEUCJP XA_CHARACTERENCODING_SHIFTJIS XA_CHARACTERENCODING_SMS7BIT XA_CHARACTERENCODING_UTF7 XA_CHARACTERENCODING_UTF8 XA_CHARACTERENCODING_JAVACONFORMANTUTEF8 XA_CHARACTERENCODING_UTF16BE XA_CHARACTERENCODING_UTF16LE XA_CHARACTE ypenMAX AL XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32
263. e if the application instructs the media recorder to freeze on a snapshot any media player that shares the camera I O device object will transition to the paused playback state See section D 1 section D 2 section D 3 and section D 5 for examples using this object PROFILE NOTES Creation of objects of this type is mandated in all profiles Mandated Interfaces XAPlayltf see section 8 27 This interface controls the playback state of the media player This interface is an implicit interface on this object XAPrefetchStatusltf see section 8 29 This interface enables querying the prefetch status of the audio player This interface is a mandated interface on this object XASeekitf see section 8 33 This interface controls the position of the playback head and any looping of playback This interface is a mandated interface on this object XAMetadataExtractionltf see section 8 21 This interface exposes methods for retrieving metadata This interface is a mandated interface on this object This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces XAMetadataMessageltf see section 8 23 This interface is used to set metadata callbacks during streaming and or local playback To be used in conjunction with XAMetadataExtractionItf This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces XAMetadataTraversalltf see section 8 24
264. e a feature that is not present in a specific implementation of OpenMAX AL the implementation shall fail the request to use the feature returning the XA_RESULT_FEATURE_UNSUPPORTED error code see section 3 4 Error Reporting This can happen either when calling Get Interface onan unsupported interface or when attempting to call an unsupported method in an interface Furthermore if an interface with an unknown ID is used either during object creation or ina Get Interface call this same result code shall be returned This facilitates portability of applications using non standard extensions ypenMAX AL i 3 Design Overview 3 1 Object Model 3 1 1 Objects and Interfaces The OpenMAX AL API adopts an object oriented approach using the C programming language The API includes two fundamental concepts on which are built all other constructs an object and an interface An object is an abstraction of a set of resources assigned for a well defined set of tasks and the state of these resources An object has a type determined on its creation The object type determines the set of tasks that the object can perform This can be considered similar to a class in C An interface is an abstraction of a set of related features that a certain object provides An interface includes a set of methods which are functions of the interface An interface also has a type which determines the exact set of methods of the interface We can de
265. e available in out out pCameraDeviceld in out If pIndex is non NULL then returns the camera device ID corresponding to camera device pIndex If pIndex is NULL then as an input specifies which camera device to obtain the capabilities of XA_DEFAULTDEVICEID_CAMERA can be used to determine the default camera device s capabilities pDescriptor Structure defining the capabilities of the camera Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments An application can determine the number of camera devices by calling this method with pDescriptor set to NULL and examining pIndex The application can then determine the capabilties of all the camera devices by calling this method multiple times with pIndex pointing to each different indexes from 0 up to one less than the number of camera devices A camera is selected using the CreateCameraDevice method This method outputs a structure that contains one or more pointers to arrays The memory for these arrays shall be allocated by the OpenMAX AL implementation and shall not be deallocated by the application The OpenMAX AL implementation shall keep the data contained within the arrays valid for the lifetime of this interface s host object The memory for the structure itself is allocated by the application and therefore shall be freed by the application XA_DEF
266. e change Possible result codes are the following XA RESULT SUCCI XA RESUL RAMETER_INVALI XA_RESUL _FAILURE XA_RESUL ERROR XA_RES ENT_CORRUPTED R R R XA RESULT ENT UNSUPPORTI XA RESUL ENT NOT FOUND XA RESULT PERMISSION DENIED XA RESUL RMATS INCOMPATIBLI pExistingDataSource Pointer to the current data source passed in the ChangeSource method pNewDataSource in Pointer to the new data source passed in the ChangeSource method The resultCode indicates whether the source change requested by ChangeSource actually succeeded or not XA_RESULT_SOURCE_SINK_INCOMPATIBLE is returned if the application tries to connect two media objects with incompatible media formats and or locator types XA RESULT PERMISSION DENIED is returned if the source to be connected has protected content and the media object does not have the requisite permissions to process it The pExistingDataSource and pNewDataSource pointers are exactly the same pointers passed in the ChangeSource method in AL 140 xaSourceChangeCallback the XADynamicSourceSinkChangelItf AS such no implementation memory space is being exposed by this callback It is worth noting that e Two successive calls to ChangeSource asking for the same change would result in only one callback That is the second
267. e encoding For example to filter for all metadata that uses the ASCII encoding for the value pass valueEncoding as XA_CHARACTERENCODING_ASCII and filterMask as XA_METADATA_FILTER_ENCODING To filter for all metadata that uses the ASCII encoding for the value and uses the language country code en us pass valueEncoding as XA_CHARACTERENCODING_ASCIT valueLangCountry as en us and filterMask as XA_METADATA_FILTER_ENCODING XA_METADATA_FILTER_LANG Note that when the filter is clear that is when no filter criteria have been added or after they have been cleared the filter is defined so that Get ItemCount returns all metadata items as if each criteria was set to a wildcard COpenMAX AL ClearKeyFilter XAresult ClearKeyFilter XAMetadataExtractionI Clears the key filter Return value The return value can b XA RESULT SUCCI tf self e one of the following ESS Comments Note that when the filter is clear that is when no filter criteria have been added or after they have been cleared the filter is defined so that Get ItemCount returns all metadata items as if each criteria was set to a wildcard Se ypenMAX AL 212 8 22 XAMetadatalnsertionltf Description This interface is for inserting overwriting metadata to the media object The actual inserting will happen once the output is written see XASn
268. e following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID Comments Squelch changes made by other applications can trigger a XA_RADIO_EVENT_SQUELCH_CHANGED event See Section 9 2 58 XA RADIO macros SetStereoMode XAresult SetStereoMode XARadioItf self XAuint32 mode Sets the current stereo mode Interface self reference in New stereo mode See XA_STE Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID rk macros current content The supported modes are dependent on the broadcast content and some modes Comments xA RESULT FEATURE UNSUPPORTED is returned if the given mode is not supported for the cannot be selected if not appropriate For example XA_STEREOMODE_STEREO mode is not possible if the broadcast is mono ypenMAX AL 276 GetStereoMode XAresult GetStereoMode XARadioItf self XAuint32 pMode Oueries the current stereo mode Parameters Interface self reference Current stereo mode See XA_STEREO_MODE macros Return value The return value can be the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetSignalStrength XAresult GetSignalStrength XARadioItf self XAuint32 pStrength Return value The return value can be the following XA_RESUL
269. e method returns XA_RESULT_FEATURE_UNSUPPORTED The memory for the pSettings array shall be allocated by the OpenMAX AL application ypenMAX AL 124 GetSupportedZoomSettings COpenMAX AL i 8 8 XAConfigExtensionsitf Description This interface provides a mechanism for an application to set and query both the codec and non codec configurations of the underlying media engine such as audio video image These configuration parameters are in the form of key value pairs As such the method signatures do not assume any vendor specific or platform specific knowledge of the underlying media engine or codecs The methods of this interface have been designed such that they can be used to get set the parameters for any OpenMAX AL object in a vendor specific manner Therefore the usage of this interface is not limited to media engines or codecs It applicable to all OpenMAX AL objects This interface can be exposed on any OpenMAX AL object Prototype XA API extern const XAInterfaceID XA IID CONFIGEXTENSION struct XAConfigExtensionsItf_ typedef const struct XAConfigExtensionsItf_ const XAConfigExtensionsItf struct XAConfigExtensionsItf_ XAresult SetConfiguration XAConfigExtensionsItf self const XAchar pConfigKey XAuint32 valueSize const void pConfigValue XAresult GetConfiguration XAConfigExtensionsItf self const XAchar pConfigKey XAuint32 pV
270. e of XAMetadataMessageItf For example any filters that are active will cause metadata during playback to be filtered prior to its exposure via callback This interface is supported on the Media Player see section 7 4 and Metadata Extractor see section 7 6 Prototype XA API extern const XAInterfaceID XA IID METADATAMESSAGE struct XAMetadataMessagelItf_ typedef const struct XAMetadataMessageItf_ const XAMetadataMessagelItf struct XAMetadataMessagelItf_ XAresult RegisterMetadataCallback XAMetadataMessageItf self xaMetadataCallback callback void pContext Interface ID Ta8ff2f0 2033 1 1e0 ac64 0800200c9a66 Callbacks xaMetadataCallback typedef void XAAPIENTRY xaMetadataCallback XAMetadataMessageItf caller void pContext XAuint32 index i Description Executes when a Metadata element is encountered during playback ypenMAX AL 224 xaMetadataCallback Parameters caller in Interface instantiation on which the callback was registered pContext in User context data that is supplied when the callback method is registered index in Metadata item Index for the metadata encountered Interaction with this Index is done via the XAMetadataExtractionItf interface that must accompany the XAMet adataMessagelIt f interface Additionally this Index is only guaranteed to be valid and fixed for the duration of the callback
271. e possible status of a player s prefetching operation a Playback is suffering due to data starvation DERF LOW FFICIENTDATA Playback is not suffering due to data starvation or spillover Playback is suffering due to data spillover ERF LOW XA_PRIORITY 9 2 58 define XA PRIORITY LOWEST XAuint32 OxFFFFFFFF define XA_PRIORITY_VERYLOW XAuint32 0xE0000000 define XA PRIORITY LOW XAuint32 0xC0000000 define XA PRIORITY BELOWNORMAL XAuint32 0xA0000000 define XA PRIORITY NORMAL XAuint32 Ox7FFFFFFF define XA PRIORITY _ABOVENORMAL XAuint32 0x60000000 define XA_PRIORITY_HIGH XAuint32 0x40000000 define XA_PRIORITY_VERYHIGH XAuint32 0x20000000 define XA_PRIORITY HIGHEST XAuint32 0x00000000 Convenient macros representing various different priority levels for use with the Set Priority method 9 2 59 XA_PROFILE define XA_PROFILES MEDIA PLAYER define XA_PROFILES MEDIA _PLAYER_RECORDER define XA_PROFILES_PLUS_MIDI XAint16 0x0001 XAint16 0x0002 XAint16 0x0004 Macros used to report profiles supported Valid combinations are XA_PROFILES_MEDIA_PLAYER XA_PROFILES MEDIA PLAYER XA PROFILES MEDIA PLAYER RECORDER XA_PROFILES MEDIA PLAYER XA PROFILES PLUS MIDT and 432 ypenMAX AL XA P
272. e recordItf XA_RECORDSTATE_ RECORDING Destroy the recorder object recorder gt Destroy recorder xa main void XAresult res XAObjectItf engine Create OpenMAX AL engine in thread safe mode Tp EngineOption XAuint32 XA_ENGINEOPTION_THREADSAFE XAuint32 XA _BOOLEAN_TRUE XAuint32 XA_ENGINEOPTION_MAJORVERSION XAuint32 1 XAuint32 XA_ENGINEOPTION_MINORVERSION XAuint32 1 res xaCreateEngine amp engine 3 EngineOption 0 NULL NULL CheckErr res Realizing the AL Engine in synchronous mode res engine gt Realize engine XA_BOOLEAN_FALSE CheckErr res TestAudioRecording engine Shutdown OpenMAX AL engine engine gt Destroy engine exit 0 D 5 Snapshot with Preview yf de typedef XAuint16 Sem t OpenMAX AL Snapshot with Preview include lt stdio h gt include lt stdlib h gt include lt string h gt include lt OMXAL OpenMAXAL h gt fine MAX_NUMBER_INTERFACES 5 Dummy semaphore and event related types prototypes and defines Sem_t semFocus System semaphore type would replace Sem_t ypenMAX AL 485 Sem_t semCamInit Sem_t semCamShoot void sem_post Sem_t pSemaphore Implementation specific semaphore post void sem_wait Sem_t pSem
273. e request The criteria for denial are implementation dependent For example the state of an object s player or recorder may influence the success or failure of dynamic interface addition Upon a successful AddInterface call for a specified interface that interface is immediately usable There is no separate call to realize the given interface The interface instance is obtained just as for static interfaces by using the Get Interface method An application may retire a dynamic interface with a RemoveInterface call After a Removelnterface call the dynamic interface is no longer usable When an object is unrealized all interfaces including the dynamic interfaces are unusable and effectively removed from the object 3 1 8 Resource Allocation The exact amount of resources available on an OpenMAX AL implementation may vary across different implementations and over the lifetime of an engine object As a result an application using the OpenMAX AL API must always be prepared to handle cases of failure in object realization or dynamic interface addition In addition an object s resources may be stolen by another entity such as another object or the underlying system without prior notice To allow applications to influence the resource allocation by the system a priority mechanism is introduced Priority values are set on a per object basis Applications can use these object priorities to influence the behavior of the syst
274. e than some other interfaces Therefore for information only each object type has also a list of applicable optional interfaces The implementer is not limited to support only these listed interfaces but these lists provide the application developer a hint concerning which optional interfaces might be supported COpenMAX AL i 7 1 Camera I O Device Description The camera I O device object provides access to still image and video data from a camera source and exposes controls for camera related settings A Media Recorder object may leverage a camera object to capture image or video data See section D 5 for an example using this object PROFILE NOTES Creation of objects of this type is mandated in the Media Player Recorder profile Mandated Interfaces XACameraltf see section 8 6 This interface controls the camera This interface is an implicit interface on this object XAObjectitf see section 8 24 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding interfaces to the object after creation This interface is an implicit interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor specific manner XAlmageControlsitf see section 8 15 This interface exposes
275. eCallback callback void pContext Description Registers a callback to notify the application when there are changes to the device IDs associated with the output mix self Interface self reference cal Callback to receive the changes in device IDs associated with the output mix pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ReRoute XAresult ReRoute XAOutputMixItf self XAint32 numOutputDevices XAuint32 pOutputDevicelIDs Reguests a change to the specified set of output devices on an output mix numOutputDevices Number of output devices specified pOutputDevicelIDs in List of the devices specified Note IDs may include XA_DEFAULTDEVICEID_AUDIOOUTPUT Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments This method simply requests for a change in routing The implementation may choose not to fulfill the request If it does not fulfill the request the method returns XA_RESULT_FEATURE_UNSUPPORTED MypenMAX AL 8 27 XAPlayltf Description PlayItf is an interface for controlling the playback state of an object The playback state machine is as follows Table 12 Play Head Position in D
276. eCapabilitiesitf o XAVideoEncoderCapabilitiesltf o XAAudioEncoderCapabilitiesltf Native DataSink Display O XACameraltf O XAObjectltf URI DataSink Media Recorder coute O XAAudioEncoderltf Micro pate O XAVideoEncoderltf phone O XARecordlitf O XAObjectitf Figure 11 Video camera use case Video camcorder use case requires a Media Recorder object for recording and a Media Player for the viewfinder We create both using the XAEnginelIt f interface of the engine object Upon creation we associated both with the same Camera object which we create with the XAEngineItf interface We set the audio data source of the Media Recorder to be a microphone an audio input device The data sink for the Media Player is a native window or display handle as it was in the previous video playback use case The data sink of the Media Recorder can be a URI pointing to a video file in the local file system where the data will be recorded PROFILE NOTES The support for this use case is mandated only in the Media Player Recorder profile COpenMAX AL 4 7 6 Still Camera o XAObjectltf o XAEngineltf o XACameraCapabilitiesltf o XAlmageEncoderCapabilitiesltf Native Display DataSink O XACameraltf URI DataSink Media Recorder O XAlmageEncoderltf O XASnapshotitf O XAObjectltf O XAObjectltf Figure 12 Still c
277. eSettings XAresult GetImageSettings XAImageEncoderItf self XAImageSettings pSettings Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID SetImageSetting MypenMAX AL GetSizeEstimate XAresult GetSizeEstimate XAImageEncoderItf self XAuint32 pSize Get estimated image si7e Parameters in fin Interface self reference lou out Estimated encoding size in bytes of the image based on current settings Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL 8 19 XAlmageEncoderCapabilitieslitf Description This interface provides methods of querying the image encoding capabilities of the media engine This interface provides a means of enumerating all image encoders available on an engine where an encoderld represents each encoder It also provides a means for querying the capabilities of each encoder The set of image encoders supported by the engine does not change during the lifetime of the engine though dynamic resource constraints may limit actual availability when an image encoder is requested This interface is a mandated interface of engine objects see section 7 2 Prototype XA_API extern const XAInterfaceID XA_IID_IMAGEENCODERCAPABILITIES struct XAImageEncoderCapabi
278. eating an object XA_RESULT_FEATURE_UNSUPPORTED will be returned if the engine tries to create an object that has XA HD NULL as a required interface Also using it in XAObject GetInterface or XADynamicInterfaceManagement AddInterface will always fail Interface ID ec7178ec e5e 1 4432 a3f4 4657e6795210 66 8 2 XAAudioDecoderCapabilitiesitf Description This interface provides methods for querying the audio decoding capabilities of the media engine This interface provides a means of enumerating all audio decoders available on an engine where a decoderld represents each decoder It also provides a means to query the capabilities of each decoder A given decoder may support several profile mode pairs each with their own capabilities such as maximum sample rate or bit rate appropriate to that profile and mode pair Therefore this interface represents the capabilities of a particular decoder as a list of capability entries queriable by decoderID and capability entry index The set of audio decoders supported by the engine does not change during the lifetime of the engine though dynamic resource constraints may limit actual availability when an audio decoder is requested This interface is a mandated interface of engine objects see section 7 2 Prototype XA_API extern const XAInterfaceID XA_IID_AUDIODECODERCAPABILITIES struct XAAudioDecoderCapabilitiesItf_ typedef const struct XAAudioDecoderCapabilitiesItf_ const XAAudio
279. ecified in a getter s method name a getter shall always return the exact value that was set by a previous call to a setter even if that value had been rounded off internally by the implementation An exception to this rule is that a Boolean getter must return only logically but not necessarily numerically the same value as was set Here is a short example that demonstrates the use of a getter and a setter XAresult res XAVolumelItf volumeltf XAmillibel vol eS r res res volumeltf gt GetVolumeLevel volumelItf amp vol CheckErr res volumeltf gt SetVolumeLevel volumelItf vol 7 Check iG Unless specified otherwise applications are responsible for allocation and deallocation of memory buffers used in the interface methods COpenMAX AL i 3 1 3 Representation in Code As stated in the previous section objects have no representation in code OpenMAX AL refers an object via its XAOb ject It f interface see section 8 24 The API represents interfaces as C structures where all the fields are method pointers representing the methods These interface structures are always stored and passed as pointer to pointer to struct and never by value this level of indirection enables more efficient API implementations Each of the interface methods has a first argument called se1f whose type is the interface type Thus when calling an interface method the c
280. ectangle ypenMAX AL 354 SetMirror XAresult SetMirror XAVideoPostProcessingItf self XAuint32 mirror Sets post processing options for mirroring mirror Defines the mirroring type for video post processors XA RESULT PARAMETER INVALID is returned if an unsupported mirroring type is reguested Refer to XA VIDEOMIRROR macro Parameters Interface self reference Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID The change will only be committed once Commit is called XA_VIDEOMIRROR Commit XAresult Commit XAVideoPostProcessingItf self Commit all video post None in Return value The return value can b XA_RESULT_SUCCI processing changes since the last Commit Interface self reference e one of the following ESS Comments All the changes will only be committed once Commit is called This ensures that a all the changes are applied to the same video frame and b there are no intermediate or orphan frames created during this post processing ypenMAX AL 355 8 42 XAVolumeltf Description This interface exposes controls for manipulating the object s audio volume properties This interface additionally exposes a stereo position control Its exact effect is determined by the object s format if the object s format is mono a pan effect
281. ection mechanism is introduced There is one critical section per engine object Applications that require more flexibility can implement such a mechanism on top of this critical section mechanism The semantics of the critical section mechanism are specified as follows The engine is said to be in a critical section state during the time between when a call to EnterCriticalSection has returned successfully and until the time when a call to ExitCriticalSection is made m When the engine is in a critical section state any call to EnterCriticalSection will block until the engine exited the critical section state or until an error has occurred the return code of the EnterCriticalSection call will reflect which of the conditions has occurred One important point is worth mentioning when the engine is operating in non thread safe mode the EnterCriticalSection and ExitCriticalSection methods are not thread safe in the sense that their behavior is undefined should the application call them from within multiple applicaton contexts concurrently These methods will however work properly when invoked from a single application context in concurrency with one or more callback contexts This interface is supported on the engine object see section 7 2 Prototype XA API extern const XAInterfaceID XA_IID_THREADSYNC struct XAThreadSyncItf_ typedef const struct XAThreadSyncItf_ const XAThreadSyncItf stru
282. ects 3 6 5 Extending Method Parameter Ranges An extended API may support an extended range of parameters for a standard method than the range mandated by the specification The semantics of the extended range are left to the extended API s specification However for mandated ranges the API shall behave exactly according to the specification Care must be taken when the extended API is vendor specific in these cases future versions of the API may use these extended values for different purposes To help guard against collisions with future API versions implementations of an extended API shall have the most significant bit set on any extensions to an enumeration a fixed set of discrete unsigned values For example define XA_SEEKMODE_ FAST XAuint32 0x0001 define XA_SEEKMODE_ ACCURATE XAuint32 0x0002 ACME extension to SEEKMODE enumeration define XA SEEKMODE ACME _FOO XAuint32 0x8001 The most significant bit does not need to be set for any extensions to continuous ranges or for signed values 3 6 6 Result Codes It is not possible to extend the result codes for any standardized method in the API An implementation shall return one of the result codes listed in the method s documentation 3 6 7 Data Locators An extended API may introduce new data locators to those specified in the standard API The extended data locators may be used in place of the data locators defined in the main specification The extension
283. ed for applications that are interested in coarse grained loss of control functionality either it is allowed for that instance of the engine object or not See XAObject It f for details on loss of control EOPTION_MAJORVERSION The API major version for the requested engine object The data field of the XAEngineOption structure is set to the integer major version of the requested engine object The default value is 1 BOP TION_MINORVERSION The API minor version for the requested engine object The data field of the XAEngineOption structure is set to the integer minor version of the requested engine object The default value is 0 ROPTION_STE The API step version for the requested engine object The data field of the XAEngineOption structure is set to the integer step version of the requested engine object Because step versions are backwards compatible a higher step version of the engine than requested may be returned The default value is 0 418 ypenMAX AL 9 2 33 XA EOUALI7ER define XA_EQUALIZER_UNDEFINED XAuint16 OxFFFF This value is used when equalizer setting is not defined _ EQUALIZER_UNDI E The setting is not defined COpenMAX AL s 9 2 34 XA_FOCUSPOINTS define XA FOCUSPOINTS ONE XAuint32 0x00000001 define XA FOCUSPOINTS THREE 3X1 XAuint32 0x00000002 define XA FOCUSPOINTS FIVE CROSS XAuint32 0x00000003 defi
284. ed once the viewfinder is unfrozen again the picture will be then stored See CancelSnapshot for details Parameters in Interface self reference numberOfPictures i Number of pictures that will be taken If the number is larger than one camera will take snapshots in a burst mode consequently as fast as it cans Zero value here cancels the shooting This cannot be smaller than zero or larger than GetMaxPicsPerBurst Hint to the device that how many pictures per second should be taken in burst mode This parameter is ignored if numberOfPictures is one zeViewfinder If true freezes the viewfinder for preview once the picture has been taken by changing the viewfinder player s state to paused If multiple pictures are about to be taken only the last picture shot will be frozen on the viewfinder If false does not freeze the viewfinder once the picture has been taken Please note that in some implementations it is still possible to cancel the saving of the picture once the viewfinder is frozen ypenMAX AL InitiateSnapshot pSink in XADataSink where to store the resulting images If sink is NULL the resulting image will be stored instead into memory reserved by the implementation and the address of that memory buffer will be given with the xaSnapshotTakenCallback inanew implementation generated data sink of the type XA_DATALOCATOR_ADDRESS If this option is used numberOfPicture parameter must be 1 The XADataSi
285. ees Refers to the range between 0 and 360 degrees ue saturation Saturation of the color Range is 0 1000 in permille Refers to the range between 0 0 and 100 0 Lightness of the color Range is 0 1000 in permille Refers to the range between 0 0 and 100 0 MypenMAX AL a 9 1 24 XAlmageCodecDescriptor typedef struct XAImageCodecDescriptor_ XAuint32 codecId XAuint32 maxWidth XAuint32 maxHeight XAImageCodecDescriptor This structure is used to query the capabilities of image encoders and decoders Identifies the supported image codec Refer to XA_IMAGECODEC macros maxWidth Maximum frame width horizontal resolution maxHeight Maximum frame height vertical resolution 9 1 25 XAlmageSettings typedef struct XAImageSettings_ XAuint32 encoderId XAuint32 width XAuint32 height XApermille compressionLevel XAuint32 colorFormat XAImageSettings This structure is used for setting the encoding parameters Identifies the supported image encoder Refer to XA_IMAGECODEC macros compressionLevel Compression level is in the range of 0 to 1000 A value of 0 indicates implementation default A level of 1000 produces the highest compression and a level of 1 produces the lowest compression Note This parameter is to be ignored if the encoder does not support this capability Color format to use if XA_IMAG EC RAW is specified Refer to XA_COLORFORMAT macros
286. efined by IETF RFC 3066 RFC3066 which incorporates underlying ISO specifications 639 ISO639 and 3166 ISO3166 and a syntax Formatting of country codes is defined by ISO 3166 ISO3166 9 1 6 XACameraDescriptor typedef struct XACameraDescriptor XAchar pName XAuint32 maxWidth XAuint32 maxHeight XAuint32 orientation XAuint32 featuresSupported XAuint32 exposureModesSupported XAuint32 flashModesSupported XAuint32 focusModesSupported XAuint32 meteringModesSupported XAuint32 whiteBalanceModesSupported XACameraDescriptor Structure used to query the camera capabilities Zoom factor ranges will vary from to the value specified featureSupported A bitwise OR of camera features supported See XA_CAMERACAP macros exposureModesSupported A bitwise OR of exposure modes supported See XA_CAMERA_EXPOSUREMODE macros flashModesSupported A bitwise OR of flash modes supported See XA_CAMERA_F LASHMOD macros ypenMAX AL i focusModesSupported meteringModesSupported iteBalanceModesSupported A bitwise OR of 9 1 7 XADataF ormat_ MIME typedef struct XADataFormat_MIME_ XAuint32 formatTyp e A bitwise OR of focus modes supported See XA CAMERA FOCUSMODI macros A bitwise OR of metering modes supported See XA_CAMERA_MET RINGMODE macros const XAchar pMimeType XAuint32 container XADataFormat_MIME Fields include Type
287. eles CA USA January 2001 Language codes http www iso org iso en prods services popstds languagecodes html ISO 639 SI units and recommendations for the use of their multiples and of certain other units ISO 1000 1992 2003 Country name codes http www iso org iso en prods services popstds countrynamecodes html ISO 3166 1 2006 JSR 135 Mobile Media API http www jcp org en jsr detail id 135 Mobile DLS Specification RP 041 MIDI Manufacturers Association Los Angeles CA USA 2003 The Complete MIDI 1 0 Detailed Specification Document version 96 1 MIDI Manufacturers Association Los Angeles CA USA 1996 Contains MIDI 1 0 Detailed Specification MIDI Time Code Standard MIDI Files 1 0 General MIDI System Level 1 MIDI Show Control 1 1 and MIDI Machine Control ISO IEC JTC1 SC29 WG11 MPEG International Standard IS 11172 3 Coding of moving pictures and associated audio for digital storage media at up to about 1 5 Mbit s Part 3 Audio 1993 ISO IEC JTC1 SC29 WG11 MPEG International Standard IS 13818 3 Information Technology Generic Coding of Moving Pictures and Associated Audio Part 3 Audio 1998 Mobile XMF Content Format Specification RP 042 MIDI Manufacturers Association Los Angeles CA USA September 2004 Tags for the Identifications of Languages http tools ietf org html rfc3066 RFC 3066 IETF 2001 Scalable Polyphony MIDI Specification RP 034 MIDI Manufacturers Associa
288. elf XAuint32 exposureMode XAuint32 compensation Sets the camera exposure mode ERA EXPOSUR EMOD Parameters in Interface self reference exposureMode in Specifies the camera exposure mode Refer to XA CAMERA E E E compensation in Ifthe auto exposure mode setting is enabled this value specifies the auto exposure compensation setting This parameter is ignored if auto mode setting is not enabled The parameter is in units of 1 10 of EV compensation Return value The return value can be one of the following XA_RESULT_SUCCESS _EXPOSUR GetExposure _XA_CAME GetExposureMode XAresult GetExposureMode XACameraiItf self XAuint32 pExposureMode XAuint32 pCompensation Gets the camera exposure mode XA CAMERA _ EXPOSUR F EMODE If the auto exposure mode setting is enabled this value specifies the auto exposure compensation setting The parameter is in units of 1 10 of EV compensation Return value XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID The return value can be one of the following see a ypenMAX AL RA_EXPOSUREMODE Parameters in Interface self reference ExposureMode Specifies the camera exposure mode Refer to pCompensation 102 SetISOSensitivity XAresult SetISOSensitivity XACameraItf self XAui
289. em when resource conflicts arise For example when a high priority object needs a certain resource and the resource is currently assigned to a lower priority object the resource will most likely be stolen from the low priority object by the system and re assigned to the high priority object An application can change the priority of COpenMAX AL i an object at any point during the lifetime of the object It is also worth noting that these object priorities set by the application are confined to this instance of the API engine They are unrelated to the priorities that may be assigned by the system to the application itself and other components running on the system for the purposes of resource management When a resource is stolen from an object this object will automatically transition to either the Suspended state or the Unrealized state depending on whether its interface states are preserved or reset respectively To which of the states the object transitions is determined solely by the implementation When in either of these two states all of this object s interfaces except for the XAObjectItf interface and the XADynamicInterfaceManagementItf interface become unusable and return an appropriate error code Dynamic interfaces are treated the same as any other interfaces If the object the dynamic interface is exposed on is Suspended or Unrealized the dynamic interfaces will be suspended or unrealized respectively The applicat
290. en returned This parameter is ignored if numInterfaces is zero Return value The return value can be one of the following XA XA XA XA XA XA XA X R R R R R R R R ESUL ESUL ESS RAMET ER_INVALID ESULT ES ES TENT ES TENT ORY _ERRO CORRUPTI _UNSUPPO FAILURE R ESULT_ ESULT_PE TENT RMISS _NOT_FOUND ION_DENIED A Metadata Extractor Object see section 7 6 ypenMAX AL 158 CreateExtensionObject XAresult CreateExtensionObject XAEngineltf self XAObjectItf pObject void pParameters XAuint32 objectID XAuint32 numInterfaces const XAInterfaceID pInterfacelIds const XAboolean pInterfaceRequired Description Creates an object This method is used for extension objects defined externally from the specification Objects defined by the specification must be created by the specific creation methods in the engine interface As documented by extension pObject out Newly created object pParameters in Pointer to a structure specifying the parameters used for creating the object numInterfaces Number of interfaces that the object is requested to support not including implicit interfaces in piInterfacelds in Array of numInterfaces interface IDs which the object should support This parameter is ignored if
291. enMAX AL implementation and the OpenMAX AL implementation will not deallocate memory allocated by the application Exceptions to this rule are not allowed 3 5 1 1 Parameters Parameters passed to OpenMAX AL methods are used during the duration of the method call The application is free to change or deallocate any parameters or parameter associated memory after a call to OpenMAX AL with the exception of memory buffers Memory buffers passed from the application to the OpenMAX AL implementation are to be kept valid by the application for the duration of the use by the COpenMAX AL OpenMAX AL implementation The duration of the memory buffer use and when the application can deallocate the memory is described in the interface or object description where they are used 3 5 2 Callbacks The information passed to the application from the OpenMAX AL implementation in a callback is valid for the duration of the callback only The OpenMAX AL implementation is free to deallocate any memory associated with a callback to the application as soon as the callback returns The application is responsible for saving any information passed to it in a callback required for later use This includes any memory buffers passed from the OpenMAX AL implementation to the application 3 5 3 Exceptions Any exceptions and behavior in contrast to the memory management rules stated above will be described in the interface description which behaves in contrast to the abo
292. enseansseussessieveeeussessucssaivsczes 460 APPENDIX A REFERENCES cscssscssssscscscsssccscccsccssccssscssscssscsssssessneesecssecssccsscssscssscsssessscssecssecesecssessocssoees 461 APPENDIX B GLOSSARY OF RDS TERMS ccssssssssscssssssesesssessssssnsnsnsnsessscssesesesssesssssssnsssesssnssssesesessrerees 462 APPENDIX C OBJECT INTERFACE MAPPING j ccccsscssscssscssscesscncesscssscssccsscssscssscssscssscssscssecesecsseesscesooes 463 APPENDIX D SAMPLE CODE scsssssssssssssssssssosssesesesssssesesesssssneseseseseserecscscesosessesssesesesssesesesesscnesesesosesererers 466 D 1 AUDIO PLAYBACK WITH EQUALIZER lt si sscsccvcecscsssssiccntcedessosdescceeavessnsesceice coesssssuesdedessouvsseeceecaddesesuetacceace 466 D 2 AUDIO VIDEO PLAYBACK soisin menier a e aae a stars scassttecnestactdga ETE E E EREE devs 470 D 3 RADIO WITH RDS SUPPORT eruen E E E E EE E E NES 476 D 4 AUDIO RECORDING THROUGH MICROPHONE scescssecsseeseeeseeeeeseeeeeecesscesecesecaecaecsaecaeecaeeeaeeeeeeeaeenens 481 D 5 SNAPSHOT WITH PRE VIE W ciocoii E E E R E E AE EE tose 485 D 6 METADATA EXTRACTION s6 524 sccedecesacesccevensstedsesssceivesadeacteseseecoepessarecassiveastssecaaen E REE E E RERE 492 COpenMAX AL i PART 1 USER MANUAL 1 Overview 1 1 Purpose of this Document This document details the API for OpenMAX Application Layer AL 1 1 Developed as an open standard by the Khronos Group OpenMAX AL is an application level mu
293. ent Must be between 0 and the specified duration limit This must be non NULL Return value The return value can be one of the following XA_RESUL _SUCCESS XA_RESUL __PARAMETER_INVALID MypenMAX AL SetPositionUpdatePeriod XAresult SetPositionUpdatePeriod XARecordItf self XAmillisecond mSec ae ma Return value The return C can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID Comments The recorder will notify the application when the recording head passes through the positions implied by the specified period Those positions are defined as the whole multiples of the period relative to the beginning of the content GetPositionUpdatePeriod XAresult GetPositionUpdatePeriod XARecordItf self XAmillisecond pMSec Oueries the interval between periodic position notifications Parameters self e self E in tin Interface self reference i ui Pointer to a location to receive the period between position notifications in ae This must be non NULL Return value ina return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID MypenMAX AL 833 XASeekitf Description XASeekItf is an interface for manipulating a playback head including setting its position and looping characteristics When supported seeking may be used re
294. eo and image capture and rendering The primary focus of OpenSL ES is advanced audio and MIDI functionality for mobile devices Further both OpenMAX AL and OpenSL ES are partitioned into profiles based on market segments e OpenSL ES has three overlapping profiles Phone Music and Game e OpenMAX AL has two overlapping profiles Media Player and Media Player Recorder Each of these profiles has well defined feature sets and conformance requirements For example to be compliant with the OpenMAX AL Media Player profile an OpenMAX AL implementation must provide audio image and video playback functionality An audio only OpenMAX AL implementation would not be compliant with either profile of the OpenMAX AL specification This segmentation into profiles ensures that there will be no confusion whatsoever regarding which API is suitable for a particular set of use cases e Example 1 an audio only application will have no need for video and image functionality and therefore would likely pick one of the OpenSL ES profiles depending on the use cases of interest e Example 2 a media playback and recording application would use the OpenMAX AL Media Player Recorder profile e Example 3 An advanced multimedia game application that needs audio video image playback and recording as well as advanced audio features like 3D audio and effects would use both the Media Player Recorder profile of OpenMAX AL and the Game profile of OpenSL ES The two API
295. equired on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code XA_RESULT_FEATURE_UNSUPPORTED will be then returned This parameter is ignored if numInterfaces is zero Return value The return value can be one of the following XA RESULT UCCESS XA_RESUL ECONDITIONS_VIOLATI XA_RESUL RAMETER_INVALID XA_RESUL iMORY_FAILURI Comments If the engine fails to create the object due to lack of memory or resources it will return the XA RESULT MEMORY FAILURE or the XA_RESULT_RESOURCE_ERROR error respectively Media Player Object see section 7 4 COpenMAX AL CreateMediaRecorder XAresult CreateMediaRecorder XAEngineItf self XAObjectIt f pRecorder const XADataSource pAudioSrc const XADataSource pImageVideoSrc const XADataSink pDataSnk XAuint32 numInterfaces const XAInterfaceID pInterfacelIds const XAboolean pInterfaceRequired Creates a media recorder If data source s locator is an object e g camera or radio this object must be in the realized state Parameters self Interface self reference Newly created media recorder object pAudioSre in Pointer to the structure specifying the audio data source such as a microphone device If this field is NULL then no audio source is specified and the recorder
296. er latency 9 2 73 XA _STEREO_MODE define XA_STEREOMODE_ MONO define XA_STEREOMODE_STEREO define XA STEREOMODE AUTO XAuint32 0x00000001 XAuint32 0x00000002 XAuint32 0x00000003 These macros are used to define the stereo modes a e 9 2 74 XA SPEAKER define XA_SPEAKER FRONT LEFT XAuint32 0x00000001 define XA_SPEAKER FRONT RIGHT XAuint32 0x00000002 define XA_SPEAKER_FRONT_ CENTER XAuint32 0x00000004 define XA_SPEAKER_ LOW FREQUENCY XAuint32 0x00000008 define XA_SPEAKER BACK LEFT XAuint32 0x00000010 define XA_SPEAKER_ BACK RIGHT XAuint32 0x00000020 define XA_SPEAKER FRONT LEFT OF CENTER XAuint32 0x00000040 define XA_SPEAKER_FRONT_RIGHT OF CENTER XAuint32 0x00000080 define XA_SPEAKER BACK CENTER XAuint32 0x00000100 define XA SPEAKER SIDE LEFT XAuint32 0x00000200 define XA SPEARKER SIDE RIGHT XAuint32 0x00000400 define XA_SPEAKER_TOP_CENTER XAuint32 0x00000800 define XA_SPEAKER TOP FRONT LEFT XAuint32 0x00001000 define XA SPEAKER TOP FRONT CENTER XAuint32 0x00002000 define XA SPEAKER TOP FRONT RIGHT XAuint32 0x00004000 define XA SPEAKER TOP BACK LEFT XAuint32 0x00008000 define XA_SPEAKER TOP BACK CENTER XAuint32 0x00010000 define XA_SPEAKER TOP BACK RIGHT XAuint32 0x00020000 ypenMAX AL 450 Speaker location macros used when specifying a channel mask
297. er speed Refer to XA CAMERA SHUTTERSPEEDMODE pManualSetting If the manual shutter speed mode is enabled this value specifies the manual setting If automatic shutter speed mode is used the exposure is locked and the device supports this this value specifies the automatically determined shutter speed if the exposure is not locked or exposing this value is not supported this value is zero The parameter is in units of microseconds Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID See Also Set ShutterSpeed XA_CAMERA_SHUTTERSPEEDMODE GetSupportedWhiteBalanceManualSettings ypenMAX AL i SetWhiteBalance XAresult SetWhiteBalance XACameraItf self XAuint32 whiteBalance XAuint32 manualSetting Sets the camera white balance Parameters Interface self reference whiteBalance in Specifies the camera white balance mode Refer to XA CAMERA WHLTEBALANCEMODE manualSetting in Ifthe manual white balance mode is enabled this value specifies the manual setting This parameter is ignored if manual white balance mode is disabled Parameter is in units of Kelvins Return value The return value can be one of the following XA_RESULT_SUCCESS See Also GetWhiteBalance XA_CAMERA_WHITEBALANC Get SupportedFocusManualSettings GetWhiteBalance XAresult GetW
298. erId XAuint32 pIndex XAAudioCodecDescriptor pDescriptor Queries for the audio decoder s capabilities Parameters Interface self reference decoderld in Identifies the supported audio decoder Refer to XA_AUDIOCODEC macros pindex in out If pDescriptor is NULL pIndex returns the number of capabilities structures one per profile mode pair of the decoder Each decoder must support at least one profile mode pair and therefore have at least one Codec Descriptor If pDescriptor is non NULL pIndex is an incrementing value used for enumerating capabilities Supported index range is 0 to N 1 where N is the number of capabilities structures one for each profile mode pair of the decoder pDescriptor out Pointer to structure defining the capabilities of the audio decoder There is one structure per profile mode pair of the decoder Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALID Comments This method outputs a structure that contains one or more pointers to arrays The memory for these arrays shall be allocated by the OpenMAX AL implementation and shall not be deallocated by the application The OpenMAX AL implementation shall keep the data contained within the arrays valid for the lifetime of this interface s host object The memory for the structure itself is allocated by the application and therefore shall be freed by the application
299. ered in Bitwise OR of the RDS Event macros which tells which of the RDS fields have changed their value entData in Event specific integer parameter Specifies additional notification callback event specific information The contents of this parameter are dependent on the event being reported See 9 2 61 RDS Event macros Please note that after changing the frequency it might take a couple of seconds before all the RDS fields are received Typically not all the fields are received at same time Therefore typically after changing the frequency multiple xaRDSCallback will take place each containing only the events for the new fields received at time Note use xaRadioCallback and XA_RADIO_EVE EEK_COMPLETED callback from tuning callbacks also RDS based seeks Methods QueryRDSSignal XAresult QueryRDSSignal XARDSItf self XAboolean pIsSignal Returns the status of the RDS reception Parameters Interface self reference pIsSignal True if RDS signal is received false otherwise Return value The return value can be one of the following XA_RESULT_SUCCI XA_RESULT_PARAMETER_INVALID ypenMAX AL GetProgrammeServiceName XAresult GetProgrammeServiceName XARDSItf self XAchar pPSname Gets the current Programme Service name PS Parameters Interface self reference pPSnane out Name of the Programme Service or a ze
300. eressrecsoeeeseeorseeesseeeseeetseso 398 9 2 8 XA_CAMERA_AUTOEXPOSURESTATUG scssssssscssscssevesonesseneseseveteccsecesenseseseneaceneatsesenerseeess 398 9 29 XA CAMERAGBEVENTE ssip e aaia iaer e R ena a aE E a EEAS A NARE S 399 9 2 10 XA CAMERACAP eoi cuesione eoi na iaee enr opia oa ea Taa aee NEE SENE EE NEEE 400 COpenMAX AL i 9 2 11 9 2 12 9 2 13 9 2 14 9 2 15 9 2 16 9 2 17 9 2 18 9 2 19 9 2 20 9 2 21 9 2 22 9 2 23 9 2 24 9 2 25 9 2 26 9 2 27 9 2 28 9 2 29 9 2 30 9 2 31 9 2 32 9 2 33 9 2 34 9 2 35 9 2 36 9 2 37 XA_CAMERA EXP OSOREMODE s scierie aniar neire erari a E E i N NEEE e E EAE ES 401 XA CAMERA FLASHMODE wcctenvssssvsceessetscsvasede Guecotnetyorbancvercetees vis AEA E A ONENE 402 XA CAMERA FOCUSMODE sirsiran aE E AE EAEE E EA RE 403 XA CAMERA FOCUSMODESTATUS 0 ccsccsscsssscssessseeseessseseceseeeseceseceseceaecnaecsaecaaeeaeeeaeeeaeenaees 404 XA CAMERA _ISOSENSITIVITYMODE svison ea a iaa 404 XA CAMERA LOCK preiei a a n EEA EEA EERE E A EE 404 XA CAMERA METERINGMODE uerrini seinare oen AEE E EERE ASE 405 XA_CAMERA_SHUTTERSPEEDMODE 0 ecccscessessseesseeeeeseeeeeeseceseceecusecuaecaecnaecuecaeeeseeeaeeeaees 405 XA_CAMERA_WHITEBALANCEMODE J 0 cccsccsssesssessseesseseeeneeeeceeeceeceseceaecnaecaueceeseeeeeeeeenees 406 MA CAMERA ZOOM renr EE E E RE cpeatauacb HR E BHEO hesgtaecbigows he lenieauiaets 407 XA CHARACTEREN CODING i igs
301. erface XADynamicInterfaceManagementItf self const XAInterfaceID iid XAresult ResumeInterface XADynamicInterfaceManagementItf self const XAInterfaceID iid XAboolean async ypenMAX AL XAresult RegisterCallback XADynamicInterfaceManagementItf self xaDynamicInterfaceManagementCallback callback void pContext Interface ID 6e2340c0 f775 11db 85da 0002a5d5c5 1b Callbacks xaDynamicInterfaceManagementCallback typedef void XAAPIENTRY xaDynamicInterfaceManagementCallback XADynamicInterfaceManagementItf caller void pContext XAuint32 event XAresult result const XAInterfaceID iid dynamic interface s resources Parameters caller Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered A callback function notifying of a runtime error termination of an asynchronous call or change in a event in One of the dynamic interface management event macros See XA DYNAMLC ITE EVENT macros result in Contains either the error code if event is XA_DYNAMIC_ITF_EVENT_RUNTIME_ERROR or the asynchronous function return code if event is XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION The result may be XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA RESULT MEMORY FAILURE Interface type ID that the event affects
302. erface s host object The memory for the structure itself is allocated by the application and therefore shall be freed by the application QueryAudiolnputCapabilities QuerySampleFormatsSupported RegisterA vailableAudioOutputsChangedCallback XAresult RegisterAvailableAudioOutputsChangedCallback XAAudiolODeviceCapabilitiesItf self xaAvailableAudioOutputsChangedCallback callback void pContext Sets or clears xaAvailableAudioOutputsChangedCallback self Interface self reference pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID xaAvailableAudioOutputsChangedCallback MypenMAX AL RegisterDefaultDeviceIDMap Changed Callback XAresult RegisterDefaultDeviceIDMapChangedCallback XAAudiolODeviceCapabilitiesItf self xaDefaultDeviceIDMapChangedCallback callback void pContext cal Address of the callback pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID xaDefaultDeviceIDMapChangedCallback ypenMAX AL i GetAssociatedAudiolnputs XAresult GetAssociatedAudioInputs
303. escription Inserts the key value pair to the specified node of the metadata tree If the specified node does not exist in media object the key value pair cannot be written Giving XA_ROOT_NODE_ID as the node writes the key value pair to the root overwrite flag tells what to do if the there is already a value set for the given key in the given node For example camera device might write automatically some metadata to the resulting image Please note that in some formats the LangCount ry field of XAMet adat aInfo structs will be ignored Parameters self B E Interface self reference ID of the node whereto the metadata is to be written ID given by XAMetadataTraversalItf GetChildInfo can be used here if XAMet adataTraversallItf is available and the node exists already Otherwise CreateChildNode should be used to get the node ID Key to be written The application should not deallocate or change the content of this struct before receiving the corresponding xaMetadataInsertionCallback or destroying the object This flag is used to coordinate the insertion of the same metadata information being provided by both the source and application If true the information provided by the application shall be used If false the information provided by the source shall be used Note This parameter is only applicable when the same metadata information will be available from both the source and application pValue in
304. eseeseeeseceseessecssecssecsaecsaecaeseaeseseseneeseeesesessesseesseenass 340 8 39 XA VIDEQGENCODERITP i vcsiaietasseaechvastenasvensocnsveyedsssulvcbeostiesstedsebarsecacaiebesbebecnsnstanesobsvunessnsvasebssseinedvesverateas 343 8 40 XA VIDEOENCODERCAPABILITIESITE 0 cscesceesesseeeeeeeeeeseeeseeeseesecsaecsaecsaecsaecaeecaeeeeeseeeeseeeeeeeseseenaeenaes 345 COpenMAX AL i 8 41 XA VIDEOPOSTPROCESSINGITE 00seeeseeeseeeseveseceseeeseeecesecesesesesesesesesereseseseseceeeseeesesesesecesesereseeeseseeens 348 8 42 DAN OLUMELTE iesen a ceaacesecis uch dete deys cus gs hais E a a tues beusedate dio ttebpebsteesysiienes 356 9 MACROS AND TYPEDEES sccscsscsssssssscnssscsssscssscsssscsssssssssssssessssnessesscssossessnessssnessssnessesesssnessssnesseseoss 363 9 1 STRUCTURES seinri dietei eiiieaen niesie deoda niiet EAEN cian cosecseescuscdvatones savseuscsassanedsede doked esacscesuecdavdees iesceus 364 901 XAAudioCodecDescriptor csscccsscccorsssssccensessvscccnnessnsccensessnscecnseesusceonsessuscecnsesensceensessusescnseennsceenesess 364 912 XAAUIOENCOACrSCHINGS 2 eceeeseceseceenseceseeeenseceseeeessecseeeescecseceecsaeceaeeesseceeneeenaecseaeeesaeceeeeeenaeceeeeeenaeees 366 913 XAAUIOINPULDeSCHIDIOR nsaisan ieis aa A O a E E E A aS 367 914 XAA dioOutp tDescriptOT ceia a R E EI AEE 369 GIS XAA di StredmInNOrmatiONi suisia i siaii 370 916 XA CAMCTADESCHIPION ines aves is veveesseccodiisnsseersnsaeayszecesese
305. esesesouesessesseesessessessuessssessussessessaeseuesesseesseseeeeseaesesnssgs 30 4 5 PLAYBACK OF MIDI eoira eenean e eise i eena N E e eee E a ENE NASE aE e EEE 30 4 5 1 Support for Mobile DLS s sceiscsessesenstsrrsseseieesventinntonneagnseapsasassedeapesuonnigndvaneapeaoapsoresscseiseacepusensnapnapeasares 31 6 DISPLAY REGIONS peera cuesuaes deamon ad sbvaue Gaaeestovewtedpauapuais caontavnensoueloduensale cusdeavodgensudyatnsvadscdavestoatensedes 31 407 OPENMAX AL USE CASES s 3 500sedu0csssseessens ecb covestevoneiseveedueitensysubedneveavtessoathedeeseabtens T ESE E ESE ES SEKSER RSie 33 47 41 Audio and Video PIGYDGCK vvcsnvesscensntivineveystvsuiagannsinvacseendessedivasoscavavite inci duaquunitedagbesvodoascneenee KERERE 33 472 Audio PIGYDGCK serepet ea E E Ee NEEE ERE E AEREE 34 47 3 Recording Aulio secco e E ET EE A ETE 35 474 Image PLAY OTE reneo E E E E E EE AO E ORE SA 36 ARI Video Cam ra rrerreeer reenn r he aE apni eds ais bod eile aige ei EE EEEE NEA KEENE NATN EAN 37 4 76 SUL COMO sona AE E E E E a E A EAE A EAE POS E EER as 38 ATT RAGIOPIGYDGCK Cirtaemaimtimamanahamagaanaarhmhinamhaimrihmaanhainmarmhnahaaimihemooamaiemhaerimhminenimaaan 39 478 Reading Metadata meieni tipo asta aa sia E E d ig sise s s no Hat E A E EEA 40 PART 2 API REFERENCE cccsscssssssssssssssscssssssnscsssssssssnssscencesessssssssssessssssnessossssessssssesssssescosssesossossssssssnesseses 41 5 BASE TYPES AND UNITS cccsssssss
306. ethod returns XA RESULT FEATURE UNSUPPORTI ypenMAX AL i GetLoop XAresult GetLoop XASeekItf self XAboolean pLoopEnabled XAmillisecond pStartPos XAmillisecond pEndPos Queries whether looping is enabled or disabled and retrieves loop points Parameters in Interface self reference pLoopEnabled out Pointer to a location to receive the flag indicating whether looping is enabled true or disabled false This must be non NULL StartPos out Pointer to a location to receive the position in milliseconds relative to the beginning of content specifying the start of the loop This must be non NULL P pl Pointer to a location to receive the postion in milliseconds relative to the beginning of content specifying the end the loop A value of XA_TIME_UNKNOWN denotes the end of the stream This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL i 8 34 XASnapshotitf Description This interface is for controlling the photographing of still images with a camera device It contains the InitiateSnapshot method for prefetching the shooting for minimizing the delay with the actual taking of the photo which is done by the TakeSnapshot method There are also mechanisms for controlling the shutter feedback sound and for querying for burst shooting capabilities
307. ettings XAresult GetEncoderSettings XAAudioEncoderItf self XAAudioEncoderSettings pSettings Get audio encoder settings Parameters in Interface self reference pSettings out Specifies a pointer to the structure that will return the audio encoder settings Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID SetEncoderSettings MypenMAX AL i 8 4 XAAudioEncoderCapabilitiesitf Description This interface provides methods for querying the audio encoding capabilities of the media engine This interface provides a means of enumerating all audio encoders available on an engine where an encoderld represents each encoder It also provides a means to query the capabilities of each encoder A given encoder may support several profile mode pairs each with their own capabilities such as maximum sample rate or bit rate appropriate to that profile and mode pair Therefore this interface represents the capabilities of a particular encoder as a list of capability entries queriable by encoderID and capability entry index The set of audio encoders supported by the engine does not change during the lifetime of the engine though dynamic resource constraints may limit actual availability when an audio encoder is requested This interface is also mandated on the media recorder objects so that the effective capabilities of the encoder
308. example AMR encoders use this to select between IF1 IF2 or RTPPAYLOAD bit stream formats Refer to XA AUDIOSTREAMFORMAT XXX defines in section 9 2 3 Codec specific encoder options For example WMA encoders use it to specify codec version framesize frequency extensions and other options See the relevant encoder documentatation for format This is typically a bitfield specifying encode options Use a value of zero to specify use of the default encoder settings for the encoder Block alignment in bytes of an audio sample ypenMAX AL i 9 1 3 XAAudiolnputDescriptor typedef struct XAAudioInputDescriptor_ XAchar pDeviceName XAint16 deviceConnection XAint16 deviceScope XAint16 deviceLocation XAboolean isForTelephony XAmilliHertz minSampleRate XAmilliHertz maxSampleRate XAboolean isFreqRangeContinuous XAmilliHertz pSamplingRatesSupported XAint16 numOfSamplingRatesSupported XAint16 maxChannels XAAudioInputDescriptor This structure is used for returning the description of audio input device capabilities The deviceConnection deviceScope and deviceLocation fields collectively describe the type of audio input device in a standardized way while still allowing new device types to be added by vendor specific extensions of the corresponding macros if necessary For example on a mobile phone the integrated microphone would have the following values for each of these three fields respectively XA_DEVCONNECTION_INTE
309. ey into the memory res mdExtritf gt GetKey mdExtritf i itemSize key CheckErr res if key gt encoding XA_CHARACTERENCODING_ASCIT res mdExtriItf gt GetValueSize mdExtriItf i amp itemSize CheckErr res j value malloc itemSize if value ime wediee error extract the value into the memory res mdExtrItf gt GetValue mdExtriItf ems izen Value cheek res if value gt encoding XA_CHARACTERENCODING_ASCII buime Item d key s value s i key gt data value gt data free value free key res mdExtriItf gt GetItemCount mdExtritf amp mdCount CheckErr res wor a OF i lt melCowmer ari XAMetadataInfo key NULL XAMetadataInfo value NULL XAuint32 itemSize 0 r 493
310. f XAboolean automatic XAresult GetAutomaticSwitching XARDSIt self XAboolean pAutomatic XAresult SetAutomaticTrafficAnnouncement XARDSIt self XAboolean automatic XAresult GetAutomaticTrafficAnnouncement XARDSIt self XAboolean pAutomatic XAresult GetODAGroup XARDSIt self XAuint16 AID xaGetODAGroupCallback callback void pContext XAresult SubscribeODAGroup XARDSItf self XAint16 group XAboolean useErrorCorrection COpenMAX AL j XAresult UnsubscribeODAGroup XARDSIt self XAint16 group XAresult ListODAGroupSubscriptions XARDSIt self XAint16 pGroups XAuint32 pLength XAresult RegisterRDSCallback XARDSItf self xaRDSCallback callback void pContext XAresult RegisterODADataCallback XARDSIt self xaNewODADataCallback callback void pContext Interface ID 2e79e200 d7 1c 1 1df 9aa6 0002a5d5c5 1b Defaults No callback registered COpenMAX AL Callbacks xaGetODAGroupCallback typedef void XAAPIENTRY xaGetODAGroupCallback XARadioItf caller void pContext XAboolean success XAint16 group XAuint16 message Description Callback of the KXARDSItf GetODAGroup method Gives asynchronously the application Group and the message bits concerning the given ODA Open Data Application Parameters Interface on which this callback was registered User context data tha
311. f XAAudioDecoderCapabilitiesltf Engine si 7 creates 27 Mm Pa x ae ra XV gi X b creates creates sp 7 ae A URI DataSource Default Output Device F O XAEqualizerltf O XAOutputMixitf ai DataSource O XAObjectitf Media Player O XASeekItf O XAVolumeltf O XAPIlayltf O XAObjectitf Figure 8 Audio playback with multiple players use case OpenMAX AL may support playback multiple audio files simultaneously This use case leverages two Media Player objects for audio playback We create the Media Players using the XAEnginelIt f interface of the engine object Upon creation we associate the Media Players with an Output Mix which we created with the XAEngineItf interface for audio output We also set the data sources of the Media Players during creation The data sources can be for example URIs pointing to audio files in the local file system The Output Mix is by default associated with the system dependent default output device PROFILE NOTES The support for this use case is mandated in all profiles COpenMAX AL 4 7 3 Recording Audio o XAObjectitf o XAEngineltf o XAAudiolODeviceCapabilitiesltf o XAAudioEncoderCapabilitiesltf creates I I a I I I I I I I I I Micro URI phone DataSource Media Recorder DataSink O XAAudioEncoderltf O XARecordlitf O XAObjectitf Figure 9 Recor
312. f false disables the stereo positioning effect no attenuation due to stereo positioning is applied to the left or right channels Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID IsEnabledStereoPosition XAresult IsEnabledStereoPosition XAVolumeItf self XAboolean pEnable Returns the enabled state of the stereo positioning effect self in Interface self reference pEnable out Pointer to a location to receive the enabled state of the stereo positioning effect Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID MypenMAX AL SetStereoPosition XAresult SetStereoPosition XAVolumeItf self XApermille stereoPosition Description Sets the stereo position of the object For mono objects this will control a constant energy pan effect and for stereo objects this will control a balance effect Parameters Interface self reference stereoPosition in Stereo position in the range 1000 c 1000 o A stereo position of 0 o indicates the object is in the center That is in the case of balance no attenuation is applied to the left and right channels and in the case of pan 3 dB attenuation is applied to the left and right channels A stereo position of 1000 o pans the object fully to the left the right channel
313. f sel XAuint32 pNumPositionEntries XAFocusPointPosition pFocusPosition Gets the camera focus region pattern s positioning and size for each point in the active focus pattern None pNumPositionEntries in out As an input this parameter specifies the size of the input buffer As an output this parameter specifies the number of position points being returned pFocusPos ition l SUCC rl PARA ESS out Specifies the focus point s position information The application provides this buffer and the buffer size needs to be a multiple of XAFocusPointPosition ET ER_INVALID Return value The return value can be one of the following XA RESULT XA RESULT SetFocusRegionPattern XA_CAMERA_FOCUSPOINTS ypenMAX AL 99 GetFocusModeStatus XAresult GetFocusModeStatus XACameraItf self XAuint32 pFocusStatus XAuint32 pRegionStatusl1 XAuint32 pRegionStatus2 Gets the camera focus status Parameters ise ii e ise ii f in Interface self reference asa Status Specifies the camera focus mode status Refer to XA_CAMERA_FOCUSMODESTATUS pRegionStatus smid Specifies the individual focus region status pRegionStatus1 and pRegionStatus2 are bit mapped representation of the individual focus regions pRegionStatus1 identifies the focus points ranging from 0 to 31 pRegionStatus2 identifies the focus points ranging from 32 to 63 If
314. face on which this callback was registered in User context data that is supplied when the callback method is registered RegisterDeviceChangeCallback Executes whenever an output mix changes its set of destination output devices Upon this notification ypenMAX AL Methods GetDestinationOutputDeviceIDs XAresult GetDestinationOutputDeviceIDs XAOutputMixItf self XAint32 pNumDevices XAuint32 pDeviceIDs Retrieves the device IDs of the destination output devices currently associated with the output mix pNumDevices in out As an input specifies the length of the pDeviceIDs array ignored if pDeviceIDs is NULL As an output specifies the number of destination output device IDs associated with the output mix pDevicelIDs out Populated by the call with the list of deviceIDs provided that pNumDevices is equal to or greater than the number of actual device IDs If pNumDevices is less than the number of actual device IDs the error code XA_RESULT_BUFFER_INSUFFICIENT is returned Note IDs may include XA_DEFAULTDEVICEID_AUDIOOUTPUT SUCC _PARA ESS ET ER_INVALID Return value The return value can be one of the following XA_RESUL XA_RESUL XA_RESUL _ BUFF ypenMAX AL ER_INSUFFICIENT 243 RegisterDeviceChangeCallback XAresult RegisterDeviceChangeCallback XAOutputMixItf self xaMixDeviceChang
315. faces to the object after creation This interface is an implicit interface on this object XAAudiolODeviceCapabilitiesitf see section 8 3 This interface exposes methods for querying available audio device capabilities This interface is an implicit interface on this object XAAudioDecoderCapabitieslitf see section 8 2 This interface exposes methods for querying audio decoder capabilities This interface is a mandated interface on this object ypenMAX AL XAAudioEncoderCapabitiesltf see section 8 4 This interface exposes methods for querying audio encoder capabilities This interface is a mandated interface on this object XACameraCapabilitiesitf see section 8 7 This interface exposes methods for querying camera device capabilities This interface is mandated only for Media Player Recorder profile XAlmageDecoderCapabitiesitf see section 8 16 This interface exposes methods for querying image decoder capabilities This interface is a mandated interface on this object XAlmageEncoderCapabitiesltf see section 8 19 This interface exposes methods for querying image encoder capabilities This interface is a mandated interface on this object XAVideoDecoderCapabitiesltf see section 8 38 This interface exposes methods for querying video decoder capabilities This interface is a mandated interface on this object XAVideoEncoderCapabitiesitf see section 8 40 This interface exposes methods for querying
316. false to switch it off Return value The return value can be one of the following XA_RESUL SUCC CONT XA_RESUL EFINED no preset ROL LOST IsEnabled XAresult IsEnabled XAEqualizerItf self XAboolean pEnabled Gets the enabled status of the effect Interface self reference True if the effect is on otherwise false This must be non NULL Return value The return value can be one of the following XA_RESUL SUCC XA_RESUL ESS _PARA ET ER_INVALID ypenMAX AL 170 GetNumberOfBands XAresult GetNumberOfBands XAEqualizerItf self XAuint16 pNumBands Description Gets the number of frequency bands that the equalizer supports A valid equalizer must have at least two bands Parameters Interface self reference out pNumBands out Number of frequency bands that the equalizer supports This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCC ESS XA_RESULT_PARA GetBandLevelRange ET ER_INVALID XAresult GetBandLevelRange XAEqualizerItf self XAmillibel pMin XAmillibel pMax Returns the minimum and maximum band levels supported Minimum supported band level in millibels Interface self reference Maximum supported band level in millibels ESS Return value The return
317. fine the interface itself as a combination of its type and the object to which it is related An interface ID indentifies an interface type This identifier is used within the source code to refer to the interface type Objects and interfaces are tightly related an object exposes one or more interfaces all of which have different interface types that is an object may contain at most one interface of each interface type A given interface instance is exposed by exactly one object The application controls the object s state and performs the object operations exclusively through the interfaces it exposes Thus the object itself is a completely abstract notion and has no actual representation in code yet it is very important to understand that behind every interface stands an object The relationship between object types and interface types is as follows The object type determines the types of interfaces that may be exposed by objects of this type Each object type definition in this document includes a detailed list of the interfaces on that object PROFILE NOTES The set of interface types allowed for a given object type may vary across profiles This will be explicitly stated in this document per object and per interface type An object s lifetime is the time between the object s creation and its destruction The application explicitly performs both object creation and destruction as will be explained later in this document
318. following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID xaCameraCallback ypenMAX AL SetFocusMode XAresult SetFocusMode XACameraItf self XAuint32 focusMode XAmillimeter manualSetting XAboolean macroEnabled Sets the camera focus mode Parameters Interface self reference focusMode in Specifies the camera focus mode Refer to XA_CAMERA_FOCUSMODE manualSetting in Ifthe manual focus mode is enabled this value specifies the manual setting This parameter is ignored if manual focus mode is disabled macroEBnabled in Specifics whether macro mode is enabled The return value can be one of the following Return value XA_RESULT_SUCCESS See Also Get FocusMode Get SupportedFocusManualSettings ypenMAX AL XA CAMERA FOCUSMODE 95 GetFocusMode XAresult GetFocusMode XACameraItf self XAuint32 pFocusMode XAmillimeter pManualSetting XAboolean pMacroEnabled Gets the camera focus mode Parameters in Interface self reference pFocusMode out Specifies the camera focus mode Refer to XA_CAMERA_FOCUSMODE pManualSetting If the manual focus mode is enabled this value specifies the manual setting This parameter is ignored if manual focus mode is disabled pMacroEnabled out Specifics whether the macro mode is enabled Return value The return value can be one of the following
319. from multiple sources The working groups for each API have co operated to deliberately design AL to be amenable to an IL based implementation For example IL defines the set of low level components to satisfy the constituent functionality of high level AL use cases Thus an AL implementor may construct a media object as a chain of IL components OpenMAX AL does not mandate an AL solution be based on IL nor does it mandate any particular implementation detail Nevertheless the relationship between APIs enables a rich and efficient software ecosystem for multimedia 1 5 Relationship to OpenSL ES OpenMAX AL is an application level multimedia playback and recording API for mobile embedded devices OpenSL ES OSLES is an application level enhanced audio API also designed for mobile embedded devices As such both APIs do overlap in certain basic audio functionality such as audio playback audio recording and basic MIDI The Venn diagram in Figure 3 illustrates the functional overlap in the two APIs COrenSLIES C 2penMAX AL Enhanced audio API Multimedia API Figure 3 OpenSL ES versus OpenMAX AL As the Venn diagram shows OpenMAX AL has audio features like analog radio tuner and RDS that are not part of OpenSL ES Similarly OpenSL ES has advanced audio features like effects reverberation stereo widening bass boost etc and positional 3D audio that are not part of OpenMAX AL The primary focus of OpenMAX AL is media audio vid
320. g This interface is a mandated interface when recording audio media XAAudioEncoderCapabilitiesitf see section 8 4 This interface exposes methods for querying audio encoder capabilities This interface is a mandated interface when recording audio media COpenMAX AL i XAVideoEncoderltf see section 8 39 This interface controls the parameters of video encoding This interface is a mandated interface when recording video media XASnapshotitf see section 8 34 This interface enables the capture of still image data This interface is a mandated interface when recording image media XAlmageEncoderltf see section 8 18 This interface controls the parameters of image encoding This interface is a mandated interface when recording image media XAMetadatalnsertionltf see section 8 22 This interface exposes methods for adding metadata to media This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding interfaces to the object after creation This interface is an implicit interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor spe
321. gRatesSupported Size of the samplingRatesSupported array Ignored if isFreqRangeContinuous is XA_BOOLE COpenMAX AL il Maximum number of channels supported for mono devices value would be 1 The table below shows examples of the first five fields of the XAAUdioInputDescriptor struct for various audio input devices For the sake of brevity and clarity the full names of the XA_DEV macros have been abbreviated to include just the distinct portion of the names such as XA_DEVCONNECTION_INTEGRATED appears as INTEGRATED and XA_DEVSCOPE_PRIVATE as PRIVATE Table 15 Examples of Audio Input Devices deviceName device Connection device Scope device isForTelephony Location Handset microphone INTEGRATED USER HANDSET TRUE Bluetooth microphone WIRELESS USER HEADSET TRUE Wired headset WIRED USER HEADSET TRUE microphone Carkit microphone WIRED ENVIRON CARKIT TRUE MENT Carkit handset WIRED USER CARKIT TRUE microphone System line in jack INTEGRATED UNKNOWN HANDSET FALSE Networked media Server NETWORK UNKNOWN REMOTE FALSE COpenMAX AL s 9 1 4 XAAudioOutputDescriptor typedef struct XAAudioOutputDescriptor_ XAchar pDeviceName XAint16 deviceConnection XAint16 deviceScope XAint16 deviceLocation XAboolean isForTelephony XAmilliHertz minSampleRate XAmilliHertz maxSampleRate XAboolean isFreqRangeContinuous XAmilliHertz pSamplingRatesSup
322. gardless of playback state or rate This interface is an implicit interface of Media Player objects see section 7 4 Prototype XA API extern const XAInterfaceID XA IID SEEK struct XASeekItf_ typedef const struct XASeekItf_ const XASeekItf struct XASeekItf_ XAresult SetPosition XASeekItf self XAmillisecond pos XAuint32 seekMode XAresult SetLoop XASeekItf self XAboolean loopEnable XAmillisecond startPos XAmillisecond endPos XAresult GetLoop XASeekItf self XAboolean pLoopEnabled XAmillisecond pStartPos XAmillisecond pEndPos Interface ID ee6a3 120 776 1 1db b5 18 0002a5d5c5 1b Defaults The playback position defaults to 0 milliseconds the beginning of the current content Global and local looping are disabled by default COpenMAX AL 310 Methods SetPosition XAresult SetPosition XASeekItf self XAmillisecond pos XAuint32 seekMode Sets the position of the playback head a in Inherent seek mode See the seek mode definition see section 9 2 71 for details If the seek mode is not supported this method will return XA_RESULT_FEATURE_UNSUPPORTED Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The implementation may set the position to the nearest discrete sample or frame Note that the position is defined relative to the content playing at 1x forward rate po
323. h do not include any support for capturing or recording media Personal media players are good examples of devices that would use this profile e Media Player Recorder This profile encapsulates all inclusive media playback and recording functionality including the ability to capture as well as render audio video and image data in one or more formats High end mobile phones are good examples of devices that would use this profile This profile subsumes the Media Player profile The following table lists the features in the two profiles of OpenMAX AL A Y in a cell indicates that the corresponding API feature is mandatory in that profile while a blank cell indicates an absence of that feature Table 3 Features of the OpenMAX AL Profiles API Profile Feature Hoe jena KEY USE CASES Playback of audio and video files Rendering of image sources Recording and storage of audio and video sources Capture and storage of image sources DATA ACCESS Support for various media container formats Specify a stream source local remote file memory flash etc Identify data sources by name such as URL URI or by file handle Respect DRM Select an input source from among a multitude of available inputs Select an output destination from among a multitude of available outputs DEVICE CAMERA Camera flash activation Camera Effects Exposure settings exposure time aperture and ISO sensitivity Focus control including macro focus on off
324. hall be ignored This event indicates that the squelch has been modified by another application The event IntData parameter for this event is not used and shall be ignored The eventBooleanData parameter for this event is not used and shall be ignored This event indicates that an error has occurred while changing the frequency via the SetFrequency method The event IntData parameter for this event contains one of the following two error codes XA_RESULT_FEATURE_UNSUPPORTED and XA_RESULT_UNKNOWN_ERROR The eventBooleanData parameter for this event is is not used and shall be ignored This event indicates that an error has occurred while changing the frequency range via the SetFrequencyRange method The event IntData parameter for this event contains one of the following two error codes XA_RESULT_FEATURE_UNSUPPORTED and XA_RESULT_UNKNOWN_ERROR The event BooleanData parameter for this event is not used and shall be ignored 9 2 61 XA_RATECONTROLMODE define XA_RATECONTROLMODE_CONSTANTBITRATE XAuint32 0x00000001 define XA_RATECONTROLMODE_VARIABLEBITRATE XAuint32 0x00000002 These macros are used to set the rate control mode a ee IS _ CONSTANTBI Constant bitrate mode 9 2 62 XA RATEPROP define XA_RATEPROP_STAGGEREDVIDEO XAuint32 0x00000001 define XA_RATEPROP_SMOOTHVIDEO XAuint32 0x00000002 define XA_RATEPROP_SILENTAUDIO XAuint32 0x000
325. he key the name of the parameter attribute being queried If configKey is not recognized as a valid parameter attributes of the underlying object XA_RESULT_PARAMETER_INVALID is return i ut pValueSize in out Address of the size of the memory block passed as pConfigValue pConfigValue out Address of the value of the parameter attribute that is returned If the size of the memory block passed as pConfigValue is too small to return the entire value XA RESULT PARAMETER INVALID is returned Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID Comments If the memory area specified by pConfigValue and pValueSize is too small to receive the entire value only the first pValueSize bytes will be returned in pConfigValue pValueSize will be set to the minimum size required for the call to succeed The pConfigValue output parameter is passed by reference For example this method could be used for querying the RTSP proxy IP address and port number 123 213 123 5 80 or the bearer specific bandwidth limits 900 1800 MHz It is up to the underlying object to appropriately parse the key string and return the corresponding parameter setting in the appropriate format An error is returned if the key is not recognized by the underlying object ypenMAX AL a 8 9 XADeviceVolumeltf Description This interface
326. he audio input device that has changed In the case of an addition it is up to the application to use QUeryAudiolInputCapabilities to determine the full characteristics of the newly available audio input device QueryAudiolInputCapabilities ypenMAX AL xaA vailableAudioOutputsChangedCallback typedef void XAAPIENTRY xaAvailableAudioOutputsChangedCallback XAAudiolODeviceCapabilitiesItf caller void pContext XAuint32 devicelID XAint32 numOutputs XAboolean isNew Description This callback executes when the set of available audio output devices changes as when a new Bluetooth headset is connected or a wired headset is disconnected Parameters Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered in ID of the audio output device that has changed that is was either removed or added Updated number of available audio output devices isNew in Set to XA_BOOLEAN_TRUE if the change was an addition of a newly available audio output device XA_BOOLEAN_FALSE if an existing audio output device is no longer available Comments The callback does not provide additional details about the audio output device that has changed In the case of an addition it is up to the application to use QUeryAudioOutputCapabilities to determine the full characteristics of the newly available audio output device QueryAudioOut
327. heckErr res Play the music res playItf gt SetPlayState playItf XA_PLAYSTATE_PLAYING CheckErr res Draw the graphical EQ drawEQDisplay Shuts down the OpenMAX AL engine ef void destroy void XAresult res f Stop the music res playItf gt SetPlayState playItf XA_PLAYSTATE STOPPED CheckErr res Destroy the player player gt Destroy player Destroy Output Mix object outputMix gt Destroy outputMix Shutdown OpenMAX AL engine gt Destroy engine je Called by UI when user increases or decreases a band level a void setBandLevel XAint16 band XAboolean increase XAuintl16 numBands XAmillibel bandLevel XAmillibel minLevel XAmillibel maxLevel COpenMAX AL XAresult res res equalizerItf gt GetNumberOfBands equalizerItf numBands CheckErr res res equalizerItf gt GetBandLevelRange equalizerIt minLevel amp maxLevel CheckErr res if band gt numBands Error Insert debug print here exit 0 res equalizerItf gt GetBandLevel equalizerItf band amp bandLevel CheckErr res if increase XA_BOOLEAN TRUE increase the level by 1 dB 100mB if the max supported level is not exceeded bandLevel bandLevel 100 if bandLevel lt maxLevel
328. her rendered video content from this container A greater negative value represents a distance closer to the viewer Specifies the width of the text region in the original video coordinates height Specifies the height of the text region in the original video coordinates y Specifies the Y position value for the text region in relation to the original video area Specifies the bitrate of the stream in units of bits per second langCountry Language country code of the stream see note below duration Identifies the total duration of the audio stream If the duration is unknown this value shall be XA_TIME UNKNOWN The language country code may be a language code a language country code or a country code Specifies the X position value for the text region in relation to the original video area Formatting of language codes and language country codes is defined by IETF RFC 3066 RFC3066 which incorporates underlying ISO specifications 639 ISO639 and 3166 ISO3166 and a syntax Formatting of country codes is defined by ISO 3166 ISO3166 9 1 35 XAVendorStreamIinformation typedef struct XAVendorStreamInformation_ void VendorStreamInfo XAVendorStreamInformation This structure is used for querying the information about a vendor specific stream VendorStreamInfo Information about this vendor specific stream COpenMAX AL i 9 1 36 XAVibraDescriptor typedef struct XAVibraDescriptor_ XAboolean supportsFreque
329. hiteBalance XACameraItf self XAuint32 pWhiteBalance XAuint32 pManualSetting Gets the camera white balance in Interface self reference Parameters pWhiteBalance out Specifies the camera white balance mode Refer to ERA WHITEBALANCEMODE pManualSetting If the manual white balance mode is enabled this value specifies the manual setting This parameter is ignored if manual white balance mode is disabled Parameter is in units of Kelvins Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID See Also SetWhiteBalance XA_CAMERA_WHITEBALANC GetSupportedFocusManualSettings MypenMAX AL i SetAutoLocks XAresult SetAutoLocks XACameraItf self XAuint32 locks Description This method locks the given automatic camera settings This method is typically called when the camera trigger is half pressed Locking is an asynchronous operation and results in related xaCameraCallback calls with the events XA_CAMERACBEVENT_FOCUSSTATUS XA_CAMERACBEVENT_EXPOSURESTATUS and or XA_CAMERACBEVENT_WHITEBALANCELOCKED depending on which locks were requested Parameters The camera interface locks in A bitwise OR of the settings that will be locked XA_CAMERA_LOCK macros define different locks Zero can be used to unlock all the settings The value must be one of the val
330. ible _RESUL ESS _RESULT_PARAMETER_INVALI _RESULT_MEMORY_FAILURE _RESULT_IO_ERROR _RESULT_ NT_CORRUPTED _RESULT_CONTENT_UNSUPPORTI _RESULT_CONTENT_NOT_FOUND _RESULT_PERMISSION_DENIED XA_RESULT_FORMATS_INCOMPATIBLI fl A E If invoked as an asynchronous method it returns XA_RESULT_SUCCESS and the resultCode parameter of the callback will contain the result of this method s execution Setting of the new sink shall be accepted in any media object state e For media audio player objects the playback of the content to the new sink will continue from the current position in the content e For media audio recorder objects the recording of the content to the new sink will continue from the current position in the content The media object shall maintain the same media object state upon accepting the new sink For example if the player object is currently in XA_PLAYSTATE_PLAYING State it shall maintain the xA_PLAYSTATE_PLAYING state This method is asynchronous The application would need to register for the xaSinkChangeCallback to get notification of the outcome of the sink change xaSinkChangeCallback RegisterSinkChangeCallback RegisterSourceChangeCallback XAresult RegisterSourceChangeCallback XADynamicSourceSinkChangelItf self xaSourceChangeCallback callback void
331. ication is sent but the object state is not affected Also other interfaces on the same object are not affected The application may register for notification of dynamic interface resource changes After a lost resources notification the dynamically exposed interface will become unusable Two different types of lost resources notification can be received resource lost and resource lost permanently The first type of notifications indicates that the dynamic interface may be resumed by the application after a resource available notification has been received When the ResumeInterface call succeeds the dynamic interface will be fully recovered The second type of notification means that the current instance of the exposed dynamic interface can t recover from the resource loss and shall be retired by the application 3 2 Threading Model 3 2 1 Mode of Operation The OpenMAX AL API is generally synchronous This means that an API method will return only after its operation is complete and any state changes caused by the method call will be immediately reflected by subsequent calls However in some specific cases a synchronous operation is not desirable due to operations that may take a long time In such cases the actual termination of the operation will be signaled by a notification Any state changes caused by the call are undefined between the time of the call and until the time of notification COpenMAX AL i Asynchronous functions w
332. ich must always be XA DATALOCATOR ADDRESS for this structure pAddress Address of the first byte of data length Length of the data in bytes 9 1 12 XADataLocator_ContentPipe typedef struct XADataLocator_ContentPipe_ XAuint32 locatorType const void pContentPipe const XAchar pURI XADataLocator_ContentPipe MypenMAX AL i Fields include locatorType Locator type which must be XA_DATALOCATOR_CONTENTPIPE for this structure pContentPipe Pointer to the structure for the content pipe Refer to the Content Pipe Specification CP for details pURI The URI for the content pipe 9 1 13 XADataLocator_lODevice typedef struct XADataLocator_IODevice_ XAuint32 locatorType XAuint32 deviceType XAuint32 deviceID XAObjectIt f device XADataLocator_IODevice Fields include Locator type which must be XA_DATALOCATOR_IODEVICE for this structure ypenMAX AL i 9 1 14 XADataLocator_MediaObject typedef struct XADataLocator MediaObject XAuint32 locatorType XAObjectit mediaObject XADataLocator_MediaObject Fields include locatorType Locator type which must be XA_DATALOCATOR_MEDTIA for this structure mediaObject Media object created by the engine 9 1 15 XADataLocator_NativeDisplay typedef struct XADataLocator_NativeDisplay_ XAuint32 locatorType XANativeHandle hWindow XANativeHandle hDisplay XADataLocator_NativeDisplay Fields
333. ick and choose from the entire set of optional features to augment their implementations of either of the two profiles An important exception to this rule is MIDI functionality See section 2 5 for an explanation of the special designation for MIDI in OpenMAX AL 3 Vendors are free to implement features from more than one profile but they can claim compliance with a profile only if they implement all of the features of that profile Example If a vendor implements the Media Player profile in its entirety and adds just audio recording from the recorder profile then that vendor can only claim compliance with the Media Player profile The following table lists some of the optional features in OpenMAX AL with the rationale for their optionality Table 4 Optional Features in OpenMAX AL Optional Feature Reason for Optionality Reception and playback of analog radio content Implies dependency on radio hardware such as FM radio chip Controlling the analog radio tuner of the device Implies dependency on radio hardware Retrieve RDS Radio Data System content from the Implies dependency on radio hardware currently tuned station MIDI functionality See Section 2 5 for the special designation for MIDI in OpenMAX AL ypenMAX AL i 2 5 MIDI in OpenMAX AL MIDI is considered fundamental functionality for mobile phones an important class of target devices for OpenMAX AL However there exist other target devices for AL such as personal media
334. if the exposure is not locked or exposing this value is not supported this value is zero A setting of 100 is equal to an f stop of 1 0 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID See Also SetAperture XA_CAMERA_APERTUREMOD Get SupportedApertureManualSettings ypenMAX AL j SetShutterSpeed XAresult SetShutterSpeed XACameraItf self XAuint32 shutterSpeed XAmicrosecond manualSetting Sets the camera shutter speed fsere fin Interface self reference Parameters se1 iii Bid in Specifies the camera shutter speed mode Refer to ERA SHUTTERSP F EDMODE in Ifthe manual shutter speed mode is enabled this value specifies the manual setting This parameter is ignored if manual shutter speed mode is disabled The parameter is in units of microseconds ESS Return value The return value can be one of the following XA_RESULT_SUCCE See Also Get ShutterSpeed XA_CAMERA_SHUTT Get SupportedWhiteBalanceManualSettings ypenMAX AL ERSPE FE DMODE 107 GetShutterSpeed XAresult GetShutterSpeed XACameraItf self XAuint32 pShutterSpeed XAmicrosecond pManualSetting Gets the camera shutter speed Parameters in Interface self reference pShutterSpeed ou Specifies the camera shutt
335. ifferent Play States Play State Head forced to beginning Prefetching Head trying to move Stopped Playing This interface an implicit interface of Media Player objects see section 7 4 See section D 2 for an example using this interface Prototype XA_API extern const XAInterfaceID XA_IID PLAY struct XAPlayItf_ typedef const struct XAPlayItf_ const XAPlayItf struct XAPlayItf_ XAresult SetPlayState XAPlayItf self XAuint32 state XAresult GetPlayState XAPlayItf self XAuint32 pState XAresult GetDuration XAPlayItf self XAmillisecond pMsec XAresult GetPosition XAPlayItf self XAmillisecond pMsec XAresult RegisterCallback XAPlayItf self xaPlayCallback callback void pContext XAresult SetCallbackEventsMask XAPlayItf self XAuint32 eventFlags ypenMAX AL XAresult GetCallbackEventsMask XAPlayItf self XAuint32 pEventFlags XAresult SetMarkerPosition XAPlayItf self XAmillisecond mSec XAresult ClearMarkerPosition XAPlayItf self XAresult GetMarkerPosition XAPlayItf self XAmillisecond pMsec XAresult SetPositionUpdatePeriod XAPlayItf self XAmillisecond mSec XAresult GetPositionUpdatePeriod XAPlayItf self XAmillisecond pMsec Interface ID b9c293e0 f776 1 1db 80df 0002a5d5c5 1b Defaults Initially the playback s
336. ile to use for encoding See XA_VIDEOPROFILE macros levelSetting Level to use for encoding See XA_VIDEOLEVEL macros keyFrameInterval Number of frames between keyframes A value of 0 indicates that frequency of keyframes to be determined automatically ypenMAX AL 389 9 1 39 XAVideoStreamInformation typedef struct XAVideoStreamInformation_ XAuint32 codecId XAuint32 width XAuint32 height XAuint32 frameRate XAuint32 bitRate XAmillisecond duration XAVideoStreamInformation This structure is used for querying the information about a video stream frameRate Identifies the video stream s frame rate in units of frames per second If the frame rate is unknown this value shall be 0 This value is represented in Q16 format where the upper 16 bits represent the integer value and the lower 16 bits represent the fractional value bitRate Identifies the video stream s bit rate in units of bits per second If the bit rate is unknown this value shall be 0 duration Identifies the total duration of the video stream If the duration is unknown this value shall be XA_TIME_UNKNOWN ypenMAX AL a 9 2 Macros 9 2 1 XA API define XA API system dependent A platform specific macro used to declare OPENMAX AL function prototypes It is modified to meet the requirements for a particular platform 9 2 2 XAAPIENTRY define XAAPIENTRY lt system dependent gt A system dependent API entry point macro
337. ill be clearly designated as such in their documentation Otherwise a synchronous mode of operation should be assumed 3 2 2 Thread Safety The OpenMAX AL API may operate in one of two modes which determine the behavior of the entire API regarding reentrancy e Thread safe mode The application may call the API functions from several contexts concurrently The entire API will be thread safe that is any combination of the API functions may be invoked concurrently including invocation of the same method more than once concurrently by multiple application threads and are guaranteed to behave as specified e Non thread safe mode The application needs to take care of synchronization and ensure that at any given time a maximum of one API method is being called The entire API is not thread safe that is the application needs to ensure that at any given time a maximum of one of the API functions is being executed or else undefined behavior should be expected An implementation shall support one or more of these modes The mode of operation is determined on engine creation and cannot be changed during the lifetime of the engine object An implementation shall support at least one of these modes and should document which modes are supported Note that an application written to work with non thread safe mode will be able to work with a thread safe mode engine without change As a result a valid implementation of thread safe mode is autom
338. ime containerType XA_CONTAINERTYPE_WAV audioSink pLocator wOaLGl Gisele audioSink pFormat void amp mime Create media recorder with NULL for a the image video source SUMS chis is wor auclhlo omly recording res EnginelItf gt CreateMediaRecorder Engineltf amp recorder amp audioSource NULL amp audioSink 0 iidArray required CheckErr res Realizing the recorder in synchronous mode res recorder gt Realize recorder XA_BOOLEAN_FALSE CheckErr res Get the RECORD interface it is an implicit interface res recorder gt GetInterface recorder GN IWID IRACORD woslel Saseeormcliicit Claeselinicie izes 8 Setup to receive position event callbacks res recordItf gt RegisterCallback recordItf RecordEventCallback NULL CheckErr res fe SEC MOCUCICALIONS CO OCCME arter every Secome mey be wseitul dim updating a recording progress bar res recordItf gt SetPositionUpdatePeriod recordIitf POSITION_UPDATE_PERIOD CheckErr res res recordItf gt SetCallbackEventsMask recordItf XA_RECORDEVENT_HEADATNEWPOS CheckErr res eC Eel ome Wisci onko eher recording eOe condea sO 101010 ml Lligecemcls Bese a record i Oe e DUTE On MME Eco nrden 30000 CheckErr res Record the audio ypenMAX AL 7 int XAEngineOption res recordItf gt SetRecordStat
339. ink for a media object The engine must support at least one output mix though it may support more The API does not provide a direct audio output IO device as a sink for media objects An output mix is a logical object it does not necessarily represent a physical mix Thus the actual implementation of the mixing defined logically by the mix objects and their association with media objects is an implementation detail The output mix does not represent the system s main mix Furthermore a mix object represents the application s contribution to the output the implementation may mix this contribution with output from other sources The engine populates the output mix with the default set of audio output devices The application may request rerouting of that mix via calls to add and remove devices but whether those requests are fulfilled is entirely the prerogative of the implementation Furthermore the implementation may perform its own rerouting of the output mix In this case the implementation makes the application aware of changes to the output mix via a notification Manipulation of the output mixes leverages the use of device IDs to specify the device s operated on The engine includes a special ID called the default device ID which represents a set of one or more devices to which the implementation deems audio output should go by default Although the application may use the default device ID when manipulating an output mix only the i
340. int32 0x00000001 define XA _IMAGECODEC_ GIF XAuint32 0x00000002 define XA _IMAGECODEC BMP XAuint32 0x00000003 define XA_IMAGECODEC_ PNG XAuint32 0x00000004 define XA _IMAGECODEC TIFF XAuint32 0x00000005 define XA _IMAGECODEC_ RAW XAuint32 0x00000006 These macros are used to set the image encoding format CpenMAX AL k XA IMAGECODEC PNG PNG Portable Network Graphics image format XA_IMAGECODEC_TIFE TIFF Tagged Image File Format image format XA_IMAGECODEC_RAW RAW image format Use XA_COLORFORMAT to set color format 9 2 37 XA_IMAGEEFFECT define XA_IMAGEEFFECT MONOCHROME XAuint32 0x00000001 define XA_IMAGEEFFECT NEGATIVE XAuint32 0x00000002 define XA_IMAGEEFFECT SEPIA XAuint32 0x00000003 define XA_IMAGEEFFECT_EMBOSS XAuint32 0x00000004 define XA_IMAGEEFFECT_PAINTBRUSH XAuint32 0x00000005 define XA_IMAGEEFFECT_SOLARIZE XAuint32 0x00000006 define XA_IMAGEEFFECT CARTOON XAuint32 0x00000007 These macros are used to set the image effect type EEF EECT_MONOCHROME Monochrome image effect EEFFE E E Negative image effect 9 2 38 XA_IODEVICE define XA IODEVICE_AUDIOINPUT XAuint32 0x00000001 define XA IODEVICE LEDARRAY XAuint32 0x00000002 define XA _IODEVICE VIBRA XAuint32 0x00000003 define XA_IODEVICE_CAMERA XAuint32 0x000
341. int32 0x00000006 These macros are used to set the video encoding format XA_VI C_MPE MPEG2 also known as H 262 video format 1G2 EG4 MPEG4 Part 10 Advanced Video Coding also known as H 264 video format Windows Media Codec video format 9 2 78 These macros are used to set the video XAVideoPostProcessingItf XA_VIDEOMIRROR_NONE EOMLRROR VERTICAL BOMIRROR_HORIZONTAL FOMIRROR_BOTH ypenMAX AL DEOCODE _VIDEOCODE DEOCODE DEOCODE EOCODE XA_VIDEOMIRROR define XA_VIDEOMIRROR_NONE define XA_VIDEOMIRROR_VERTICAL define XA_VIDEOMIRROR_HORIZONTAL define XA_VIDEOMIRROR_BOTH XAuint32 0x00000001 XAuint32 0x00000002 XAuint32 0x00000003 XAuint32 0x00000004 mirroring They are intended to be used with No mirroring Flips the image across the horizontal axis That is the topmost parts of the source image will become the lowermost parts of the target image and vice versa Flips the image across the vertical axis That is the leftmost parts of the source image will become the rightmost parts of the target image and vice versa Flips the image across both axes This equals 180 degrees rotation 452 9 2 79 XA VIDEOPROFILE and XA VIDEOLEVEL MPEG 2 Profiles and Levels define XA_VIDEOPROFILE_MPEG2 SIMPLE XAuint32 0x00000001 define XA_VIDEOPROFILE_MPEG2 MAIN XAuint32 0x00000002 define XA_VIDEOPROFI
342. int32 0x00000008 These macros are used for defining MPEG 4 video profiles and levels JESCALABLE MPEG 4 Main Profile _BASTICANIMATED MPEG 4 Advanced Scalable Texture 455 AVC Profiles and Levels define define define define define define define define define define define define define define define define define define define define define define define XA_VIDEOPROFILE_AVC_BASELINE XA_VIDEOPROFILE_AVC_MAIN XA_VIDEOPROFILE_AVC_EXTENDED XA_VIDEOPROFILE_AVC_HIGH XA_VIDEOPROFILE_AVC_HIGH10 XA_VIDEOPROFILE_AVC_HIGH422 XA_VIDEOPROFILE_AVC_HIGH444 XA_VIDEOLEVEL_AVC_1 XA_VIDEOLEVEL_AVC_1B XA VIDEOLEVEL AVC 11 XA VIDEOLEVEL AVC 12 XA VIDEOLEVEL AVC 13 XA VIDEOLEVEL AVC 2 XA VIDEOLEVEL AVC 21 XA VIDEOLEVEL AVC 22 XA VIDEOLEVEL AVC 3 XA VIDEOLEVEL AVC 31 XA VIDEOLEVEL AVC 32 XA VIDEOLEVEL AVC 4 XA VIDEOLEVEL AVC 41 XA VIDEOLEVEL AVC 42 XA VIDEOLEVEL AVC 5 XA VIDEOLEVEL AVC 51 ypenMAX AL Description MPEG 4 Level 0 MPEG 4 Level Ob MPEG 4 Level 1 MPEG 4 Level 2 MPEG 4 Level 3 MPEG 4 Level 4 MPEG 4 Level 4a MPEG 4 Level 5 XAuint32 XAuint32 XAuint32 XAuint32 XAui
343. interface been requested during object creation time Typically this might be the case in some implementations for efficiency reasons or when the interface is added dynamically during playback of non seakable streamed content and the metadata is located earlier in the stream than what was the interface addition time Prototype XA API extern const XAInterfaceID XA_IID_METADATATRAVERSAL struct XAMetadataTraversalItf_ typedef const struct XAMetadataTraversalItf_ const XAMetadataTraversalItf struct XAMetadataTraversalItf_ XAresult SetMode XAMetadataTraversalItf self XAuint32 mode XAresult GetChildCount XAMetadataTraversalIt f self XAuint32 pCount XAresult GetChildMIMETypeSize XAMetadataTraversalIt f self XAuint32 index XAuint32 pSize XAresult GetChildiInfo XAMetadataTraversalItf self XAuint32 index XAint32 pNodeID XAuint32 pType XAuint32 size XAchar pMimeType COpenMAX AL i XAresult SetActiveNode XAMetadataTraversalIt f self XAuint32 index Interface ID 73ffb0e0 f776 11db a00e 0002a5d5c51b Defaults The metadata traversal mode defaults to XA_METADATATRAVERSALMODE_NODE The default metadata scope is the root of the file The active node is root Methods SetMode XAresult SetMode XAMetadataTraversalItf self XAuint32 mode ESS KT Return value The retur
344. ioItf aS amjelli siie required 0 XA_BOOLEAN_TRUE COpenMAX AL k iidArray 0 XA_IID_RDS Create Radio object to be used by player res EnginelItf gt CreateRadioDevice Engineltf radio 1 iidArray required CheckErr res Realizing the Radio object in synchronous mode Get play and equalizer interfaces res radio gt GetInterface radio GN WILD RADIO vord Girerclii ineic 2 Claeselmicie iae s p res radio gt GetInterface radio GN IID IRDS Vodi L rds IEE Checker sees Register callbacks res radioltf gt RegisterRadioCallback radioItf RadioCallback NULL CheckErr res j res rdsItf gt RegisterRDSCallback rdsItf NDSCEallIoaelk NUTI N Cligelkaserr ass 8 Setup the carca gotrce serterture locatortODevice locatorType XA DATALOCATOR IODEVICE locatortlODevice deviceTyp XA_TODEVICE_RADIO locatorlODevice deviceID 0 fe slepaveeeyel locatorIODevice device radio audioSource pLocator void amp locatorlODevice audioSource pFormat NULL Setup the data sink structure locator_outputmix locatorType XA_DATALOCATOR_OUTPUIMIX locator_outputmix outputMix outputMix res outputMix gt Realize radio XA BOOLEAN FALSE CheckErr res IP Leas ies audioSink pLocator void amp locator_outputmix audioSink pFormat NULL CREATE
345. ion may request to be notified of such a transition This is done by registering for a notification on the object The application may also request to be notified when resources become available again which may allow for the object to regain usability The notification will include any dynamic interfaces as well that is the notification is sent when all the interfaces and the object can have their resources Individual notification is NOT sent for each dynamic interface The application may attempt to recover an Unrealized or Suspended object by calling its Realize or Resume methods respectively If the call succeeds the object will return to the Realized state and its interface states will be either recovered or reset to default depending on whether it was unrealized or suspended The RemoveInterface method is special and can be used in any object state to retire dynamically exposed interfaces This may help in successfully realizing or resuming the object When a stolen resource is freed the implementation checks whether this resource can be used in order to recover an interface in a resources stolen state The check is made in object priority order from high to low It is not guaranteed however that attempting to recover an object after getting this notification will succeed An important difference regarding interfaces that are exposed dynamically is how resources are managed When a dynamic interface loses its resources a notif
346. ion of an Sa call or change in a dynamic interface s resources occurs fsere in Interface self reference in Address of the result callback If NULL the callback is disabled pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS xaDynamicInterfaceManagementCallback ypenMAX AL 8 11 XADynamicSourceltf Description This interface is deprecated Use XADynamicSourceSinkChangeltf see section 8 12 instead This interface exposes a control for changing the data source of the object during the life time of the object Prototype XA API extern const XAInterfaceID XA IID DYNAMICSOURCE struct XADynamicSourcelItf_ typedef const struct XADynamicSourceItf_ const XADynamicSourcelItf struct XADynamicSourcelItf_ XAresult SetSource XADynamicSourcelItf self const XADataSource pDataSource Interface ID 9Ofcl bce0 de23 1 1df 8cb0 0002a5d5c5 1b Defaults The data source that was set on object creation ypenMAX AL 137 Methods SetSource XAresult SetSource XADynamicSourceIt f self const Parameters Comments XADataSource pDataSource Sets the data source for the object None Interface self reference pDataSource in Pointer to the structure specifying the media data source such as a container file Must be non NULL In
347. ion to receive the object s volume setting This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments XA _RESULT_FEATURE_UNSUPPORTED is returned if the specified device does not support changes to its volume MypenMAX AL 8 10 XADynamicinterfaceManagementitf Description The XADynamicInterfaceManagementItf interface provides methods for handling interface exposure on an object after the creation and realization of the object The primary method for exposing interfaces on an object is by listing them in the engine object s creation methods see section 8 13 XADynamicInterfaceManagementItf is an implicit interface of all object types Please refer to section 3 1 7 for details about how dynamically exposed interfaces work with the object states and other exposed interfaces This interface is supported on all objects see section 7 Defaults No dynamic interfaces are exposed No callback is registered Prototype XA_API extern const XAInterfaceID XA_IID_DYNAMICINTERFACEMANAGEMENT struct XADynamicInterfaceManagementItf_ typedef const struct XADynamicInterfaceManagementItf_ const XADynamicInterfaceManagementItf struct XADynamicInterfaceManagementItf_ XAresult AddInterface XADynamicInterfaceManagementItf self const XAInterfaceID iid XAboolean async XAresult RemovelInt
348. is applied and if the object s format is stereo a balance effect is applied This interface is supported on the Media Player see section 7 4 and Output Mix objects see section 7 7 and may be optionally supported on other objects such as the Media Recorder object see section 7 5 Prototype XA API extern const XAInterfaceID XA IID VOLUME struct XAVolumelItf_ typedef const struct XAVolumeItf_ const XAVolumeltf struct XAVolumeItf_ XAresult SetVolumeLevel XAVolumeItf self XAmillibel level XAresult GetVolumeLevel XAVolumeItf self XAmillibel pLevel XAresult GetMaxVolumeLevel XAVolumeItf self XAmillibel pMaxLevel XAresult SetMute XAVolumeItf self XAboolean mute XAresult GetMute XAVolumeItf self XAboolean pMute XAresult EnableStereoPosition XAVolumeItf self XAboolean enable XAresult IsEnabledStereoPosition XAVolumeItf self XAboolean pEnable XAresult SetStereoPosition XAVolumeItf self XApermille stereoPosition ypenMAX AL 7 XAresult GetStereoPosition XAVolumeItf self XApermille pStereoPosition Interface ID 088ba520 f777 1 1db a5e3 0002a5d5c5 1b Defaults Volume level 0 mB Mute disabled not muted Stereo position disabled 0 o center Methods SetVolumeLevel XAresult SetVolumeLevel XAVolumeItf self XAmillibel level Sets the object s volume level P
349. is interface controls a player specific equalizer effect This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces XAlmageControlsitf see section 8 15 This interface exposes controls for brightness contrast and gamma adjustments XAlmageEffectsitf see section 8 17 This interface controls the image effects This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces ypenMAX AL XAPlaybackRateltf see section 8 28 This interface exposes playback rate related controls This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces XAVideoPostProcessingltf see section 8 41 This interface controls scaling mirroring cropping and rotating 55 7 5 Media Recorder Object Description The media recorder records audio video or image content to the destination specified by the data sink The media recorder captures it from the inputs specified as data sources and performs any specified encoding or processing The application may omit the audio source or image video source when creating a media recorder that is by passing NULL as a parameter if the application does not intend to capture the corresponding data type Media recorders may capture data from a variety of sources For instance a media recorder may support the capture of a segment of audio and or video data over time
350. is is the number of supported character encodings for this node Please use GetFreeKeysEncoding method to query them one at a time Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALID ypenMAX AL i GetKeySize XAresult GetKeySize XAMetadataInsertionItf self XAint32 nodeID XAuint32 index XAuint32 pKeySize Index for supported metadata keys Range is 0 KeyCount 1 pKeySize out Address to store key size size must be greater than 0 Must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments Get KeySize is used for determining how large a block of memory is necessary to hold the key returned by Get Key ypenMAX AL j XAresult GetKey XAMetadataInsertionItf self XAint32 nodeID XAuint32 index XAuint32 keySize XAMetadataInfo pKey Description Returns a XAMet adat a Info structure and associated data referenced by the structure for a supported key keySize Size of the memory block passed as key Range is 1 GetKeySize pKey Address to store the key Must be non NULL Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALI XA_RESULT_BUFFER_INSUFFICII Comments Get Key fills out the XAMetadatalInfo structure including data
351. latform specific value gt nativeDisplayHandle lt a platform specific value gt Setup the video data sink structure locator_displayregion locatorType XA_DATALOCATOR_NATIVEDISPLAY locator_displayregion hWindow nativeWindowHandle locator_displayregion hDisplay nativeDisplayHandle videoSink pLocator void amp locator_displayregion videoSink pFormat NULL Create the media player pBankSrce is NULL as we have a non MIDI data source res EnginelItf gt CreateMediaPlayer EnginelItf player amp avSource NULL amp audioSink amp videoSink NULL NULL 1 iidArray required CheckErr res Realizing the player in synchronous mode res player gt Realize player XA_BOOLEAN_FALSE CheckErr res fis Get play interface 4 7 res player gt GetInterface player XA_IID_PLAY void amp playItf CheckErr res Setup to receive position event callbacks res playItf gt RegisterCallback playItf PlayEventCallback NULL CheckErr res eo SEC MOCITICALIONS CO OCOL arter every I geconc micht be weeieuil in Updating a progress bar res playItf gt SetPositionUpdatePeriod playItf POSITION_UPDATE_PERIOD CheckErr res res playItf gt SetCallbackEventsMask playItf XA_PLAYEVENT_HEADATNEWPOS CheckErr res Before we start set volume to 3dB 300mB res volumelItf gt Set
352. leOptions parameter of the SetScaleOptions method Figure 21 shows examples of scaling between source and destination rectangles of different sizes by using each of the three scale options STRETCH FIT and CROP COpenMAX AL Stretch Figure 21 Scaling examples using the three scale options Figure 22 is an example of cropping and scaling Figure 22 a is the original video frame with aspect ratio 4 3 Figure 22 b is the cropped video with aspect ratio 1 1 It would be the result of calling Set SourceRectangle with a 1 1 rectangle i e a square as the input parameter Figure 22 c is the scaled frame with the scale option Fit to the destination rectangle which has the aspect ratio 16 9 It would be the result of calling SetScaleOptions with XA_VIDEOSCALE_FIT 0 for black and XA_RENDERINGHINT_NONE as input parameters followed by SetDestinationRectangle with a 16 9 rectangle as the input parameter a b c Figure 22 Example of cropping and scaling MypenMAX AL u Prototype XA API extern const XAInterfaceID XA IID VIDEOPOSTPROCESSING struct XAVideoPostProcessingItf typedef const struct XAVideoPostProcessingItf const XAVideoPostProcessingItf struct XAVideoPostProcessingItf_ XAresult SetRotation XAVideoPostProcessingItf self XAmillidegree rotation XAresult IsArbitra
353. lementation dependent Standardized options are documented in section 9 2 32 The engine is destroyed via the destroy method in XAObjectItf See Appendix D for examples using this method Engine object see section 7 2 COpenMAX AL 62 xaQueryNumSupportedEnginelnterfaces xaQueryNumSupportedEngineInterfaces XA API XAresult XAAPIENTRY xaOueryNumSupportedEngineInterfaces XAuint32 pNumSupportedInterfaces Oueries the number of supported interfaces available on engine object Parameters pNumSupportedInterfaces out Identifies the number of supported interfaces available Must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The number of supported interfaces will include both mandated and optional interfaces available for the engine object See also xaQuerySupportedEngineInterfaces XAEnginelItf QueryNumSupportedInterfaces see section 8 13 63 xaQuerySupportedEnginelnterfaces xaQuerySupportedEnginelInterfaces XA API XAresult XAAPIENTRY xaQuerySupportedEngineInterfaces XAuint32 index XAInterfaceID pInterfacelId Oueries the supported interfaces on engine object Parameters index in Incrementing index used to enumerate available interfaces Supported index range is 0 to N 1 where N is the number of supported interfaces pinterfacelId out Identifies the suppor
354. lephone number and broadcaster s web address TA Traffic Announcement A Boolean indicating when a traffic announcement is currently on air See TP P T Traffic Programme A flag telling that the programme carries traffic announcements See TA identification code ypenMAX AL Appendix C Object Interface Mapping The following table describes the object interface mapping per profile It also shows mandated objects for each profile in its second row Object Media Recorder Interface Radio Camera Output Mix XAAudioDecoderCapabilitiesItf MP Vibra Metadata LED Array Extractor si XAAudioEncoderCapabilitiesItf MP MR ve x p XAAudioEncoderItf XAAudiolODeviceCapabilitiesItf XACameraltf XACameraCapabilitiesItf XAConfigExtensionsItf XADeviceVolumelItf XADynamicInterfaceManagementItf XADynamicSourceltf XADynamicSourceSinkChangeltf XAEnginelItf XAEqualizerItf XAImageControlsIitf XAImageDecoderCapabilitiesItf XAImageEffectsItf XAImageEncoderCapabilitiesItf XAImageEncoderItf M NS XALEDArrayItf Open MAX AL 463 Media Media Metadata Object Eneine Player Re
355. less than or equal to the total number of audio input devices in the system For example if a system has both an integrated microphone and a line in jack but the line in jack is not connected to anything the number of available audio inputs is only 1 Device IDs should not be expected to be contiguous Device IDs are unique the same device ID shall not be used for different device types GetAvailableAudioOutputs ypenMAX AL i OueryAudiolnputCapabilities XAresult QueryAudioInputCapabilities XAAudioIODeviceCapabilitiesIt self XAuint32 deviceID XAAudioInputDescriptor pDescriptor NN pDescriptor Structure defining the capabilities of the audio input device Return value The return value can be one of the following XA RESULT SUCCI XA RESULT PARAMETER INVALID XA RESULT IO E R Comments This method outputs a structure that contains one or more pointers to arrays The memory for these arrays shall be allocated by the OpenMAX AL implementation and shall not be deallocated by the application The OpenMAX AL implementation shall keep the data contained within the arrays valid for the lifetime of this interface s host object The memory for the structure itself is allocated by the application and therefore shall be freed by the application QueryAudioOutputCapabilities QuerySampleFormatsSupported RegisterA
356. libel minLevel AL 466 CrpenMAX XAmillibel maxLevel XAmilliHertz minFreq XAmilliHertz maxFreq LNE band XAresult reg res equalizerItf gt GetNumberOfBands equalizerItf amp numBands CheckErr res res equalizerItf gt GetBandLevelRange equalizerItf amp minLevel amp maxLevel CheckErr res for band 0 band lt numBands band ges equalizerItf gt GetBandFreqRange equalizerItf XAint16 band amp minFreg amp maxFreq CheckErr res res equalizerItf gt GetBandLevel equalizerItf XAint16 band amp bandLevel CheckErr res j drawEQBand minFreq maxFreq bandLevel jes Initializes the OpenMAX AL engine starts the playback of some music from a file and draws the graphical equalizer of voel Louie weal XAEngineItf Engineltf XADataSource audioSource XADataLocator_URI HEAL XADataFormat_MIME mime XADataSink audioSink XADataLocator_OutputMix locator_outputmix XAVolumeltf volumeltf XAresult res WE aks XAboolean required MAX_NUMBER_INTERFACES XAInterfaceID iidArray MAX_NUMBER_INTERFACES XAEngineOption EngineOption XAuint32 XA_ENGINEOPTION_THREADSAFE XAuint32 XA_BOOLEAN_TRUE XAuint32 XA_ENGINEOPTION_MAJORVERSION XAuint32 1 XAuint32 XA_ENGINEOPTION_MINORVERSION XAuint32 1 Create OpenMAX AL
357. litiesItf _ typedef const struct XAImageEncoderCapabilitiesItf_ const XAImageEncoderCapabilitiesItf struct XAImageEncoderCapabilitiesItf_ XAresult GetImageEncoderCapabilities XAImageEncoderCapabilitiesItf self XAuint32 pEncoderId XAImageCodecDescriptor pDescriptor XAresult QueryColorFormats const XAImageEncoderCapabilitiesIt self XAuint32 pIndex XAuint32 pColorFormat Interface ID c19f0640 e86f 1 1db b2d2 0002a5d5c5 1b Defaults Not applicable ypenMAX AL Methods GetImageEncoderCapabilities XAresult GetImageEncoderCapabilities XAImageEncoderCapabilitiesItf self XAuint32 pEncoderId XAImageCodecDescriptor pDescriptor Retrieves image encoder capabilities pEncoderlId in out If pDescriptor is NULL pEncoderId returns the number of image encoders Returns 0 if the engine does not provide any image encoders If pDescriptor is non NULL pEncoderIdisa incrementing value used to enumerate image encoders Supported index range is 0 to N 1 where N is the number of image encoders pDescriptor out Structure defining the capabilities of the image encoder Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If XA_IMAGECODEC_RAW is one of the image codecs supports QueryColorFormats should be used to determine the color formats supported PROFILE NOTES A Media Player Recorde
358. ll list of valid speaker locations is defined in section 9 2 73 The channels specified in channelMask must be present in the prescribed order from least significant bit up For example if only XA_SPEAKER_FRONT_LEFT and XA_SPEAKER_FRONT_RIGHT are specified the samples for the front left speaker must come first in the interleaved stream The number of bits set in channelMask should be the same as the number of channels specified in numChannels Endianness of the audio data See XA_BYT ER macro for definition representataion Representation of the audio data See XA_PCM_R ENTATION macro for definition ypenMAX AL 9 1 10 XADataFormat_Rawlmage typedef struct XADataFormat_RawImage_ XAuint32 formatType XAuint32 colorFormat XAuint32 height XAuint32 width XAuint32 stride XADataFormat_RawImage Structure used to describe the raw image data formatType The format type which must always be XA_DATAFORMAT_RAWIMAGE for this structure colorFormat Raw image color format Refer to XA_COLORFORMAT macros height Frame height vertical resolution width Frame width horizontal resolution stride Number of bytes in a line of the image 9 1 11 XADataLocator_Address typedef struct XADataLocator Address XAuint32 locatorType const void pAddress XAuint32 length XADataLocator_ Address Fields include locatorType Locator type wh
359. llback and XA_RADIO_EVENT_SEEK_COMPLETED is used for notifying of the result StopSeeking method of XARadioItf can be used to abort an ongoing seek Parameters seif e seif e f in Interface self reference Bad in If true the seek progresses towards higher frequencies and if false the seek progresses towards lower frequencies Return value a return value can be the following XA RESULT SUCCESS SeekTrafficProgramme XAresult SeekTrafficProgramme XARDSItf self XAboolean upwards EE Seeks for a frequency sending Traffic Programme TP If the end of the tuner s frequency band is reached before a Traffic Programme is found the scan continues from the other end until a Traffic Programme is found or the original frequency is reached Asynchronous tuner callback xaRadioCallback and XA_RADIO_EVENT_SEEK_COMPLETED is used for notifying of the result StopSeeking method of XARadioItf can be used to abort an ongoing seek Parameters sef sef f in Interface self reference Bui in If true the seek progresses towards higher frequencies and if false the seek progresses towards lower frequencies Return value sg return value can be the ae XA_RESULT_SUCCE ypenMAX AL SetAutomaticSwitching XAresult SetAutomaticSwitching XARDSItf self XAboolean automatic tching of the transmitter in the case of a stronger transmitter
360. lowing XA_RESU LT_SUCCESS XA_RESU iT _ PARAMETER INVALID MypenMAX AL GetPosition XAresult GetPosition XAPlayItf self XAmillisecond pMsec I Returns the current position of the playback head relative to the beginning of the content None Parameters lin Interface self reference pMsec out Pointer to a location to receive the position of the playback head relative to the beginning of the content and is expressed in milliseconds This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The returned value is bounded between 0 and the duration of the content Note that the position is defined relative to the content playing at 1x forward rate positions do not scale with changes in playback rate RegisterCallback XAresult RegisterCallback XAPlayItf self xaPlayCallback callback void pContext Sets the playback callback function Parameters in Interface self reference Callback function invoked when one of the specified events occurs A allback in NULL value indicates that there is no callback User context data that is to be returned as part of the callback method pContext in Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The callback function default
361. ltAudioDevices XAAudioIODeviceCapabilitiesIt self XAuint32 defaultDeviceID XAint32 pNumAudioDevices XAuint32 pAudioDeviceIDs XAresult QuerySampleFormatsSupported XAAudiolODeviceCapabilitiesItf self XAuint32 deviceID XAmilliHertz samplingRate XAint32 pSampleFormats XAint32 pNumOfSampleFormats Interface ID 2b276d00 f775 1 1db a963 0002a5d5c5 1b Defaults TO device capabilities vary widely from system to system Defaults are not applicable ypenMAX AL i Callbacks xaAvailableAudioInputsChangedCallback typedef void XAAPIENTRY xaAvailableAudioInputsChangedCallback XAAudioIODeviceCapabilitiesItf caller void pContext XAuint32 deviceID XAint32 numInputs XAboolean isNew Description This callback executes when the set of available audio input devices changes as when a new Bluetooth headset is connected or a wired microphone is disconnected Parameters Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered in ID of the audio input device that has changed that is was either removed or added Updated number of available audio input devices isNew in Set to XA_BOOLEAN_TRUE if the change was an addition of a newly available audio input device XA_BOOLEAN_FALSE if an existing audio input device is no longer available Comments The callback does not provide additional detail about t
362. ltimedia playback and recording API for mobile embedded devices It provides a device independent cross platform interface for applications to access a device s audio video and imaging capabilities 1 1 1 About the Khronos Group The Khronos Group is a member funded industry consortium focused on the creation of open standard royalty free APIs to enable the authoring and accelerated playback of dynamic media on a wide variety of platforms and devices All Khronos members can contribute to the development of Khronos API specifications are empowered to vote at various stages before public deployment and may accelerate the delivery of their multimedia platforms and applications through early access to specification drafts and conformance tests The Khronos Group is responsible for open APIs such as OpenGL ES OpenKODE OpenSL ES and OpenVG 1 2 Scope OpenMAX AL accommodates common multimedia application use cases by standardizing a set of representative objects as well as interfaces on those objects to control and configure them It is an application level C language multimedia API designed for resource constrained devices The OpenMAX AL API design puts particular emphasis on ensuring the API is suitable for mobile embedded devices including basic mobile phones smart feature phones PDAs and mobile digital music players Nevertheless this does not preclude its applicability to other sophisticated media playback and recor
363. lue can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_CONTENT_CORRUPTED XA RESULT CONTENT UNSUPPORTI It is not possible to query Information for streams identified as XA_DOMAINTYPE_UNKNOWN any attempt to do so shall return a result of XA_RESULT_CONTENT_UNSUPPORTED Table 14 Stream Information Structures vs Domain Types Value Associated Structure XA_DOMAINTYPE_AUDIO XAAudioStreamInformation XA_DOMAINTYPE_VIDEO XAVideoStreamInformation XA_DOMAINTYPE_IMAGE XAImageStreamInformation XA_DOMAINTYPE_TIMEDTEXT XATimedTextStreamInformation XA_DOMAINTYPE_VENDOR XA VendorStreamInformation XA_DOMAINTYPE_MIDI XAMIDIStreamInformation XA_DOMAINTYPE_UNKNOWN Unknown type ypenMAX AL OueryStreamName XAresult QueryStreamName XAStreamInformationItf self XAuint32 streamIndex XAuint16 pNameSize XAchar pName Queries information about the media container streamIndex in Index identifying the stream within the container that is being queried The stream index value is same stream index indentifer that is obtained via QueryStreamType pNameSize in out This is used both as input and output On input it bounds the size of the stream s string name buffer On output it specifies the size of the stream s string
364. menting index used to enumerate available effects Supported index range is 0 to N 1 where N is the number of effects pImageEffectId out Identifies the supported image effect Refer to XA IMAGEEFFECT macro see section 9 2 37 SUCC _PARAI ESS KT ER_INVALID Return value The return value can be one of the following XA_RESUL XA_RESUL EffectsItf is implemented it shall support at least one effect The image Comments If XATmagel effects supported by a media object may not change during the lifetime of the media object ypenMAX AL Effect DisableImageEffect IsImageEffectEnabled 188 EnableImageFffect XAresult EnableImageEffect XAImageEffectsItf self XAuint32 imageEffectID Enables an image effect imageEffectId in XA_IMAGEEFFEC Identifies the supported image effect Refer to ERROR Return value The return value can be one of the following XA_RESUL UCCESS XA_RESUL ESOURCE_ Comments Vendor implementations may allow multiple image effects to be enabled simultaneously If enabling the requested image effect requires disabling a previously enabled image effect the requested image effect will not be enabled and the XA_R returned T macro see section 9 2 37 ESULT_RESOURCE_ERROR will be When multiple image effects
365. metadata lists since XAMetadataInsertionItf can be used to insert all metadata items into the root node by just specifying the root note ID XA_ROOT_NODE_ID See Appendix D 5 for sample code on flat list metadata insertion This interface is a mandated interface of Media Recorder objects see section 7 5 See section D 5 for an example using this interface Khronos Keys In general the keys that can be used to write metadata are the keys defined in the metadata specification of the media format in question In addition the OpenMAX AL specification defines a few format agnostic keys called Khronos keys The Khronos keys are for developers who may not be familiar with the original metadata keys of the various media formats but still want to insert metadata using OpenMAX AL It is the responsibility of the API implementations to map these Khronos keys to the format specific standard metadata keys The Khronos keys are not meant to replace the standard metadata keys or to restrict the number of metadata keys available to the application Developers conversant with the standard metadata keys in each format can still specify exactly the keys they are interested in with the help of the MetadataInsertionItf MetadataInsertionItf GetKeys can be used for querying which format specific keys and Khronos keys are supported for writing by the implementation The support for the Khronos keys is format dependent See MetadataExtractionItf see sec
366. method will block until termination Otherwise the method will return XA_RESULT_SUCCESS and will be executed asynchronously On termination the xa sl SourceChangeCallback will be invoked if registered The resultCode parameter of the callback will contain the result code of the method However if the implementation is unable to initiate the asynchronous call XA_RESULT_RESOURCE_ERROR will be returned ypenMAX AL ChangeSource Return The following return values are possible value xa RESULT SUCCESS ESULT_PARAMETER_INVALID ESULT_MEMOR R XA XA Y URE R XA RESULT IO E XA RESULT CONTENT UPTED R R R R J XA RESULT CONTENT UNSUPPORTI R J R R XA_RESULT_CONTENT_NOT_FOUND XA RESULT PERMLSSION DENLED XA ESULT_FORMATS_INCOMPATIBLI If invoked as an asynchronous method it returns XA RESULT SUCCESS and the resultCode parameter of the callback will contain the result of this method s execution Comments Setting of the new source shall be accepted in any media object state e For media audio player objects playback of the new source will start from the beginning of the content e For media audio recorder objects the recording of the new source will start from the beginning of the content The media object shall maintain the s
367. minor version number pimplementationTextSize in out Size of the implementationText string As input specifies the size of the pImplementationText array to be allocated by the application As output returns the size of the implementation text pimplementationText Text describing the implementation including This text must identify whether the implementation leverages OpenMAX IL partially fully or not at all Beyond this requirement the actual contents of this string is up to the implementation s discretion Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_BUFFER_INSUFFICIENT Comments For 1 1 0 implementations of OpenMAX AL this method should return 1 1 and 0 for the Major Minor and Step fields respectively ypenMAX AL i OuerySupportedProfiles XAresult QuerySupportedProfiles XAEngineItf self XAint16 pProfilesSupported i Queries supported profiles of the OpenMAX AL implementation pProfilesSupported out Bitmask containing profiles supported as defined in the XA_PROFILE macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments Valid values of pProfilesSupported are XA_PROFILES_MEDIA_PLAYER XA_PROFILES MEDIA PLAYER XA_PROFILES_ MEDIA PLAYER _RECORD XA PROFILES MEDIA
368. mplementation may alter the physical devices this ID represents Furthermore the implementation may change the mapping to physical devices dynamically See section D 1 and section D 2 for examples using this object PROFILE NOTES Creation of objects of this type is mandated in all profiles Mandated Interfaces XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding dynamic interfaces see section 3 1 6 to the object This interface is an implicit interface on this object XAOutputMixitf see section 8 26 This interface exposes controls for querying the associated destination output devices This interface is an implicit interface on this object XAEqualizerltf see section 8 14 COpenMAX AL i This interface exposes controls over an equalizer effect This interface is a dynamic interface on this object See section 3 1 6 for details on dynamic interfaces This interface is a mandated interface on this object XAVolumeltf see section 8 41 This interface exposes volume related controls This interface is a mandated interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor specific manner COpenMAX AL 62 7 8
369. mponent of OpenMAX AL for implementation of the Media Player profile 4 4 Image Renderering and Capture This section introduces OpenMAX AL functionality for the rendering and capture of image content An image player supports the rendering of image data OpenMAX AL supports both file based and in memory data sources as well as piped content The API supports data encoded in many formats although the formats supported by a device are implementation dependent An image recorder supports the capture of image data Captured snapshots may be encoded or raw Image capture is an optional component of OpenMAX AL for implementations of the Media Player profile 4 5 Playback of MIDI OpenMAX AL supports MIDI playback using the standard player creation mechanism the creation method XAEnginelItf CreateMediaPlayer This method provides the ability to specify a MIDI data source and an audio output device as well as an optional data source for an instrument bank data source and data sinks for an LED array output device and a Vibra output device OpenMAX AL supports MIDI data sources that refer to SP MIDI SP MIDJ and Mobile XMF mXMF files Playback is controlled via the standard OpenMAX AL interfaces such as XAVolumeItf XAPlaybackIitf XAPlaybackRatelItf and XASeekItf MIDI players also support metadata extraction via the XAMetadataExtractionItf ypenMAX AL i 4 5 1 Support for Mobile DLS OpenMAX AL supports Mobile DLS mDLS soundbanks
370. n D 4 Audio Recording through Microphone IE OpenMAX AL Audio Recording through Microphone Example ral include lt stdio h gt ine ile lt scClliio in include lt OMXAL OpenMAXAL h gt define MAX_NUMBER_INTERFACES 5 define MAX_NUMBER_INPUT_DEVICES 3 define POSITION_UPDATE_PERIOD 1000 1 sec Checka iO error Wir any errore exit the apolicariom CpenMAX AL void CheckErr XAresult res if res XA_RESULT_SUCCESS Debug printing to be placed here Sse iL void RecordEventCallback XARecorditf caller WOE pContext XAuint32 recordevent Callback code goes here Test recording of audio from a microphone into a specified file SE void TestAudioRecording XAObjectItf engine XAOb jectItf recorder XARecordItf Tecord iet XAEngineItf Engineltf XAAudiolODeviceCapabilitiesItf AudiolODeviceCapabilitiesItf XAAudiolInputDescriptor AudiolInputDescriptor XAresult res XADataSource audioSource XADataLocator_IODevice locator_mic XADeviceVolumeltf devicevolumeltf XADataSink audioSink XADataLocator_URI uri XADataFormat_MIME mime TE aL XAboolean required MAX_NUMBER_INTERFACES XAInterfaceID iidArray MAX_NUMBER_INTERFACES XAuint32 InputDevicelIDs MAX_NUMBER_INPUT_DEVICES XAint32 numiInputs 0 XAboolean mic_available XA_BOOLEAN_ FALSE XAuint32 mic_deviceID
371. n Control Object Control of the device s vibration support is handled via the Vibra object Querying the capabilities of and creating a Vibra object is an engine level operation while control of the actual vibration is handled by the object 4 2 Audio Playback and Recording This section introduces OpenMAX AL functionality for the playback and recording of sampled audio content An audio player is used for sampled audio playback OpenMAX AL supports both file based and in memory data sources as well as piped content The API supports data encoded in many formats although the formats supported by a device are implementation dependent An audio recorder is used for capturing audio data Audio capture is an optional component of OpenMAX AL for implementations of the Media Player profile 4 3 Video Playback and Recording This section introduces OpenMAX AL functionality for the playback and recording of video A video player supports the playback of synchronized audio video content and video content absent of audio OpenMAX AL supports both file based and in memory data sources as well as piped content The API supports data encoded in many formats although the formats supported by a device are implementation dependent An application can also use a video player to display the preview window for a camera A video recorder is used for capturing synchronized audio video content and video content absent of audio Video capture is an optional co
372. n a sample If bit sPerSamp1e is equal to 8 then the data s representation is XA_PCM_REPRES Otherwise the data s representation is XA_PCM_REPR ES ENTATION_SIGNI ENTATION_UNSIGNI ED_INT FD INT containerSize The container size for PCM data in bits for example 24 bit data in a 32 bit container Data is left justified within the container For best performance it is recommended that the container size be the size of the native data types channelMask Channel mask indicating mapping of audio channels to speaker location The channelMask member specifies which channels are present in the multichannel stream The least significant bit corresponds to the front left speaker XA_SPEAKER_FRONT_LI EFT the next least significant bit corresponds to the front right speaker XA_SPEAKER_FRONT_RIGHT and so on The full list of valid speaker locations is defined in section 9 2 73 The channels specified in channelMask must be present in the prescribed order from least significant bit up For example if only XA_SPEAK XA_SPEAKER_FRONT_RIGHT are specified the samples for the front left speaker must come first in the interleaved stream The number of bits set in channelMask should be the same as the number of channels specified in numChannels Endianness of the audio data See XA_BYTEORDER macro for definition ypenMAX AL ER_FRONT_LEFT and
373. n may query for the new stream information via QueryStreamInformation Parameters caller in Interface on which this callback was registered eventID i Identifies the type of notification callback being report Refer to XA_STREAMCBEVENT for a list of available events streamIndex in Identifies the stream with the property change EventData i Specifies additional information specific to a notification callback event The contents of this parameter is depedent on the event being reported pContext i User context data that is supplied when the callback method is registered When the streamIndex parameter returns the reserved value of 0 Media Container Identification it indicates that a change in the number of available streams has been detected within the media container QueryMediaContainerInformation shall be used to determine the new number of available streams within the media container See Also RegisterStreamChangeCallback QueryStreamInformation QueryMediaContainerInformation COpenMAX AL i Methods QueryMediaContainerInformation XAresult QueryMediaContainerInformation XAStreamInformationItf self XAMediaContainerInformation pInfo Queries information about the media container Structure containing the media container information Return value The return value can be one of the following XA_R ESUL XA_R ESUL SUCC _PARA ESS
374. n of this type is system dependent A Boolean type where zero is false and all remaining values are true XAmillibel A type for representing volume in millibels mB one thousandth of a Bel one hundredth of a decibel A type for representing time in milliseconds ms one thousandth of a second XAmilliHertz A type for representing frequency in milliHertz mHz one thousandth of a Hertz A type for representing distance in millimetres mm one thousandth of a meter A type for representing an angle in millidegrees mdeg one thousandth of a degree XApermille A type for representing a scale or factor in permille One permille 1 c is equal to a factor of 0 001 One thousand permille 1000 c is equal to a factor of one A type for representing time in microseconds one millionth of a second A type for representing time measured as seconds since midnight 1 January 1970 UTC A type for standard OpenMAX AL errors that all functions defined in the API return ypenMAX AL i 6 Functions 6 1 xaCreateEngine xaCreateEneine XA API XAresult XAAPIENTRY xaCreateEngine XAObjectItf pEngine XAuint32 numOptions const XAEngineOption pEngineOptions XAuint32 numInterfaces const XAInterfaceID pInterfacelIds const XAboolean pInterfaceRequired Initializes the engine object and gives the user a handle Parameters out Pointer to the resulting engine object Fi F i
375. n supports n rate ranges this value is between 0 and n 1 and all values greater than n cause the method to return XA_RESULT_PARAMETER_INVALID pMinRate out Pointer to a location to receive the minimum rate supported May be negative or positive Must be equal to or less than maxRate This must be non NULL pMaxRate out Pointer to a location to receive the maximum rate supported May be negative or positive Must be equal to or greater than minRate This must be non NULL pStepSize out Pointer to a location to receive the distance between one rate and an adjacent rate in the range A value of zero denotes a continuous range This must be non NULL pCapabilities Pointer to a location to receive the bitmask of supported rate properties in the given range This must be non NULL See XA_RATEPROP macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments An implementation expresses the set of supported rates as one or more ranges Each range is defined by the lowest and highest rates in the range the step size between these bounds and the rate properties of this range If all rates an implementation supports are evenly spaced and have same capabilities Get RateRange method may return a single range If not the GetRateRange method will return as many ranges as necessary in order to adequately express the set of rates and associated properties s
376. n value can be one of the following XA RESULT SUCCI XA RESULT PARA FR INVALILD Comments Metadata traversal mode determines how a file is parsed for metadata It is possible to traverse the file either by iterating through the file in tree fashion by node XA_METADATATRAV ERSALMODE_NODE the default mode or by scanning through the file as if it were a flat list of metadata items XA_METADATATRAVERSALMODE_ALL The optimal mode is largely determined by the file format XA_METADATATRAVERSALMODE ypenMAX AL 227 GetChildCount XAresult GetChildCount XAMetadataTraversalIt f self XAuint32 pCount Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID Comments Child count is determined by the metadata traversal mode If the mode is set to XA_LMETADATATRAVERSALMODE_ALL GetChildCount will always return 0 If the mode is set to XA_METADATATRAVERSALMODE_NODE GetChildCount will return the number of nodes within the current scope For example in a Mobile XMF file with one SMF node and one Mobile DLS node GetChildCount will return 2 from the root GetChildMIMETypeSize XAresult GetChildMIMETypeSize XAMetadataTraversalItf self XAuint32 index XAuint32 pSize Return value The return value can be one
377. nabled XApermille pMaxValue XAuint32 pNumSettings XApermille pSettings XAboolean pSpeedSupported This method gets the supported zoom settings ML Parameters Enabled Interface self reference Camera Device ID If XA_BOOLEAN_TRUE returns zoom settings for macro mode If XA_BOOLEAN_FALSE returns zoom settings for normal mode pMaxValue Identifies the maximum zoom setting supported pNumSettings in out If pSettings is NULL pNumSettings returns the number of supported zoom settings If the available settings are continuous from 1000 to pMaxValue pNumSettings returns 0 If pSettings is non NULL and a non continuous range is supported pNumSet tings is length of the pSettings array pSettings out Returns an array of supported zoom settings pSettings may be NULL The array of values returned must include 1000 and pMaxValue digitalEnabled in If XA_BOOLEAN_TRUE returns zoom settings when optical and digital zoom is enabled If XA_BOOLEAN_FALSE returns zoom settings when only optical zoom is enabled out i pSpeedSupported out Returns XA_BOOLEAN_TRUE if zoom speed parameter in XACameraltf SetZoomis supports returns XA_BOOLEAN_FALSE otherwise Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The minimum zoom settings is 1000 c If zoom is not supported th
378. nc in If XA_BOOLEAN_FALSE the method will block until the requested zoom is completed Otherwise the method will return XA RESULT SUCCESS and will be executed asynchronously However if the implementation is unable to initiate the asynchronous call XA_RESULT_RESOURCE_ERROR will be returned Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments When this method is executed asynchronously the event XA_CAMERACBEVENT_ZOOMSTATUS is returned when zoom operation is completed GetZoom GetSupportedZoomSettings ypenMAX AL n GetZoom XAresult GetZoom XACameraItf self XApermille pZoom XAboolean pDigitalEnabled To in pDigitalEnabled out Specifies whether digital zoom is being used XA_BOOLEAN_TRUE if digital zoom is used XA_BOOLEAN_ FALSE otherwise Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARA ER _INVALID SetZoom GetSupportedZoomSettings ypenMAX AL S 8 7 XACameraCapabilitiesitf Description This interface provides methods for querying the capabilities of camera I O devices The set of cameras supported by the engine does not change during the lifetime of the engine though dynamic resource constraints may limit actual availabili
379. ncy XAboolean supportsIntensity XAmilliHertz minFrequency XAmilliHertz maxFrequency XAVibraDescriptor XAVibraDescriptor represents the capabilities of the Vibra I O device supportsFrequency Boolean indicating whether the Vibra I O device supports setting the frequency of vibration Boolean indicating whether the Vibra I O device supports setting the intensity of supportsIntensity vibration Minimum frequency supported by the Vibra I O device Range is 1 minFrequency XA_MILLIHERTZ_MAX If supportsFrequency is set to XA_BOOLEAN_ FALSE this will be set to 0 Maximum frequency supported by the Vibra I O device Range is minFrequency max XAmilliHertz If supportsFrequency is set to XA_BOOLEAN_FALSE this maxFrequency will be set to 0 9 1 37 XAVideoCodecDescriptor typedef struct XAVideoCodecDescriptor_ XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 codeclId maxWidth maxHeight maxFrameRate maxBitRate rateControlSupported profileSetting levelSetting XAVideoCodecDescriptor This structure is used to query the capabilities of video encoders and decoders codec Id Identifies the supported video codec Refer to XA VIDI EOCOD EC macros maxWidth Maximum frame width horizontal resolution maxHeight Maximum frame height vertical resolution maxFrameRate Maximum encoding frame rate in units of fr
380. ne XA _FOCUSPOINTS SEVEN CROSS XAuint32 0x00000004 define XA_FOCUSPOINTS_NINE_SQUARE XAuint32 0x00000005 define XA _FOCUSPOINTS ELEVEN CROSS XAuint32 0x00000006 define XA_FOCUSPOINTS_TWELVE_3X4 XAuint32 0x00000007 define XA_FOCUSPOINTS_TWELVE_4X3 XAuint32 0x00000008 define XA _FOCUSPOINTS_ SIXTEEN SQUARE XAuint32 0x00000009 define XA _FOCUSPOINTS CUSTOM XAuint32 0x0000000A These macros are used to describe the camera s focus point pattern The patterns are used to set the active focus points and to retrieve which points are in focus The focus points are represented using as bits of a XAuint 32 value The focus point pattern is the pattern of available focus points particular to a camera For a given camera with a given pattern the application may set the active focus by some subset of points within the camera s pattern Likewise the application may query the subset of points in focus for a given camera with a given pattern A 32 bit mask represents such a subset of points where each bit position in the mask corresponds to a point in the pattern Each pattern definition below specifies the point to bit correspondence by labelling each point with the appropriate bit position XA_FOCU __SQUARE Nine focus points positioned in a square pattern Sa XA_FOCUSPOINTS_ONE Focus point pattern for XA_FOCUSPOINTS_ONE
381. ned scope Good examples of audio I O devices with such a scope would be line in and line out jacks It is difficult to tell what types of devices will be plugged into these jacks I O devices connected via a network connection also fall into this category _ DEVSCOPE_ENVIRONM VO device allows environmental public input or playback of content such as audio For example an integrated loudspeaker is an environmental audio output device since audio rendered to it can be heard by multiple people Similarly a microphone that can accept audio from multiple people is an environmental audio input device TO device allows input from or playback of content such as audio to a single user For example an earpiece speaker is a single user audio output device since audio rendered to it can be heard only by one person Similarly the integrated microphone on a mobile phone is a single user input device it accepts input from just one person 9 2 30 XA_DOMAINTYPE define define define define define define define XA_DOMAINTYPE_AUDIO 0x00000001 XA_DOMAINTYPE_VIDEO 0x00000002 XA_DOMAINTYPE_IMAGE 0x00000003 XA_DOMAINTYPE_TIMEDTEXT 0x00000004 XA_DOMAINTYPE_MIDI 0x00000005 XA_DOMAINTYPE_VENDOR OxFFFFFFFE XA_DOMAINTYPE_UNKNOWN OxFFFFFFFF These values are used to determine which domain the functionality is associated with
382. neecsaeeeeneeceaecesneessaeeeeneecsaeeeanee 13 3 DESIGN OVERVIEW ssisiecssscasessssassssssvasessasnssvnsnsossossaseasessnseasnssasnssensasessoosnsensoosnsensossnsunsecsusedsessnsenseosusensessnsense 14 3L OBIECT MODEL 4 soci araen areor aE Or nea ueeconatet e e E EE EEE EEE EE E E EE 14 JILI Objects and Interfaces siira o a A R E A ERSA 14 3 1 2 Getters and SCUCTS reciia nerian reinen earen eaS ea ER a AER E ERE EREE 15 3 13 Repr sentation in COG ss scssvessivseveasevsivegeceeccetietesnsthevansosistsiveteisesatdeteavedbusvavesteusiversouenveducvoansabeaseye nieve 16 COpenMAX AL 3 14 The XAObjectlif Interferie anin ne E r R E E ENEO E is 16 3 15 The Engine Object and XAEngineltf Interface eeeeeeeseesessasssssasssssesessssssssshsessessessassessesshsessssesssnsse 17 3 16 The Relationship Between Objects and InterfaceS n nenseseseeesneseeeeeerrrerrrrreresreerrsrrrrerrerreserrees 17 3 1 7 The XADynamiclnterfaceManagementItf Interface osoesoseseeeeeeeeseeeeeeeeerreerrsrrererrreresreresrrrrreserrees 19 SL Resource Aocati OMen e a a aari e E iaei 19 3 2 THREADING MODEL spoirs oroni rir i e EE NEE EEN EE SEa EAEE EE E ESE Re 20 BAA Mo odeof Operaatiot erer iaai e AE E EE EN E EE E E EEE A 20 B22 Thread Safety roienc enan a E E E bevlavecesvtaupasuveavasvevnsteieqnsoveatyeoteabieanyeuniyy 21 Sed INOTIFICATIONS aoise sis caneaighs ssigoes eRe Ee EE oE EEEE tory EAE SLG EHS ah EE TE Sue E EE TEE E ERE ES E oga EEE EERE EEES 21 3 4
383. ning transition to Stopped the newly captured data is appended to data already sent to the destination This interface is a mandated interface of Media Recorder objects see section 7 5 See section D 4 for an example using this interface ypenMAX AL 301 Prototype XA API extern const XAInterfaceID XA IID RECORD struct XARecordItf_ typedef const struct XARecordItf_ const XARecordItf struct XARecordItf_ XAresult SetRecordState XARecordItf self XAuint32 state XAresult GetRecordState XARecordItf self XAuint32 pState XAresult SetDurationLimit XARecordItf self XAmillisecond msec XAresult GetPosition XARecordItf self XAmillisecond pMsec XAresult RegisterCallback XARecordItf self xaRecordCallback callback void pContext XAresult SetCallbackEventsMask XARecordItf self XAuint32 eventFlags XAresult GetCallbackEventsMask XARecordItf self XAuint32 pEventFlags XAresult SetMarkerPosition XARecordItf self XAmillisecond mSec XAresult ClearMarkerPosition XARecordItf self ypenMAX AL 302 XAresult GetMarkerPosition XARecordItf self XAmillisecond pMsec XAresult SetPositionUpdatePeriod XARecordItf self XAmillisecond mSec XAresult GetPositionUpdatePeriod XARecordItf self XAmillisecond pMsec Interface ID d7948cc0 f776 1 1db 8a3b 0002a5d5c5 1b
384. nk should be of type XA_DATALOCATOR_URI and the URI should specify besides of protocol and optional path the filename prefix The structure of the generated file name is lt prefix gt lt number gt lt file_extension gt prefixisa user given prefix taken from the URI number is a string generated automatically by the implementation The generated string is a zero padded four digit running number starting from 0 Therefore the sequence of generated strings is 0000 0001 0002 etc The length of the string increases if more digits are needed to represent the number so 9999 will be followed by 10000 If a file with the same name exists in the file system directory already the next number will be used file_extension is a system generated extension to the file It could be for example jpg The system should use the extension corresponding to the chosen encoding initiatedcallback pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA RESULT SUCCI XA_RESULT_PARAMETER_INVALID See also xADataSink documentation for details for example on specifying a file system directory using an URL TakeSnapshot Implementations may chose not to support a NULL sink parameter Such implementations would return XA_FEATURE_UNSUPPORTED if this method is called with a NULL sink COpen
385. ns are mutually exclusive for a given I O device es T O device is integrated onto the system that is mobile phone music player etc T O device is connected to the system via a wired connection Additional macros might be added if more granularity is needed for each wired connection such as USB proprietary etc EVCONNECTION_ATTACHED_ iL T O device is connected to the system via a wireless connection Additional macros might be added if more granularity is needed for each wireless connection such as Bluetooth etc _DEVCONNECTION_NETWORK T O device is connected to the system via some kind of network connection either wired or wireless This is different from the above connections such as Bluetooth headset or wired accessory in the sense that this connection could be to a remote device that could be quite distant geographically unlike a Bluetooth headset or a wired headset that are in close proximity to the system Also a network connection implies going through some kind of network routing infrastructure that is not covered by the attached macros above A Bluetooth headset or a wired headset represents a peer to peer connection whereas a network connection does not Examples of such network audio I O devices include remote content servers that feed audio input to the system or a remote media renderer that plays out audio from the system tran
386. nsitivitySettings XAresult GetSupportedISOSensitivitySettings XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAuint32 pMinValue XAuint32 pMaxValue XAuint32 pNumSettings pSettings This method gets the supported manual ISO settings in in i XAuint 32 cameraDeviceID Camera Device ID supported in units of ISO values Lue i pMaxVal out Identifies the maximum manual ISO supported in units of ISO values pNumSettings in out If pSettings is NULL pNumSettings returns the number of supported manual ISO sensitivity settings If the available manual settings are continuous from pMinValue to pMaxValue pNumSettings returns 0 If pSettings is non NULL and a non continuous range is supported pNumSet tings is length of the pSettings array pSettings out Returns an array of supported ISO sensitivity settings pSettings may be NULL The values identified in the array are in units of ISO values The array of values returned must include pMinValue and pMaxValue Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If manual ISO settings are unsupported the method returns XA_RESULT_FEATURE_UNSUPPORTED The memory for the pSettings array shall be allocated by the OpenMAX AL application ypenMAX AL GetSupportedA pertureManualSettings XA
387. nstructs a use case by instantiating the requisite set of objects and then creating the correct associations between them For instance an application achieves playback of a 3gp file by creating an audio output mix and then creating a media player with that output mix as an audio sink a video window as the video sink and a file as the source The application controls a use case by retrieving interfaces from the objects that implement it and calling methods on those interfaces Given the playback example above the application may retrieve a playback interface from the player and then control the player s operation by using methods on the playback interface to change the state between stopped paused and playing COpenMAX AL i Play Interface Source File URI Media Player Sink Display Window Figure 2 Local file playback use case 1 4 2 Relationship to OpenMAX IL The OpenMAX AL represents the highest layer of the OpenMAX family of APIs As such it serves the multimedia needs of application developers The Khronos group also provides an API for system integrators denoted as the OpenMAX Integration Layer IL OpenMAX IL defines an integration framework for the internals of a multimedia architecture which abstracts the codecs file manipulations transformations and peripheral components installed on a system The IL also provides a means for these components to interoperate with each other even if they are delivered
388. nsumed Data resides at the specified URI Data is stored at the specified memory mapped address Data will be generated or consumed by the specified IO device Note for audio output use the output mix Data will be generated or consumed by a media object XAuint32 XA_DEFAULTDEVICEID_AUDIOOUTPUT XAuint32 XA_DEFAULTDEVICEID_ LED XA_DEFAULTDEVICEID_VIBRA XA_DEFAULTDEVICEID CAMERA XAuint32 XAuint32 XAuint32 This macro may be used with any method that manipulates device IDs D_VIBRA OxFFFFFFFF OxFFFFFFFE OxFFFFFFFD OxFFFFFFFC OxFFFFFFFB Data will be generated or consumed by a content pipe XA_DEFAULTDEVICEID_AUDIOINPUT Identifier denoting the set of input devices that the implementation receives audio from by default Identifier denoting default LED array device Identifier denoting default vibra device XA_DEFAULTDEVICEID_AUDIOOUTPUT Identifier denoting the set of output devices that the implementation sends audio to by default XA_D ULTD EID_L i 414 a IeRR II 9 2 27 XA_DEVICECONNECTION define XA DEVCONNECTION INTEGRATED XAint16 0x0001 define XA DEVCONNECTION ATTACHED WIRED XAint16 0x0100 define XA DEVCONNECTION ATTACHED WIRELESS XAint16 0x0200 define XA_DEVCONNECTION_NETWORK XAint16 0x0400 These macros list the various types of I O device connections possible These connectio
389. nt32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 0x0000000A 0x0000000B 0x0000000C 0x0000000D 0x0000000E 0x0000000F 0x00000010 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 456 These macros are used for defining AVC video profiles and levels i AVC BASELINE D _ AVC 13 EVE EVE EVE EVE V V OLE AVC Level 1 Oo OC lt lt OO XA_VI AVC_31 a alia AVC Level 3 1 to O lt lt O lt lt mh mh XA VI O LL AVC 5 XA VIDE O lt EL AVC 51 ypenMAX AL AVC Level 5 AVC Level 5 1 457 VC 1 Profiles and Levels define XA VIDEOPROEFEILE VC1 SIMPLE XAuint32 0x00000001 define XA_VIDEOPROFILE_VC1_MAIN XAuint32 0x00000002 define XA_VIDEOPROFILE_VC1_ADVANCED XAuint32 0x00000003 define XA_VIDEOLEVEL_VC1_LOW XAuint32 0x00000001 define XA_VIDEOLEVEL_VC1_MEDIUM XAuint32 0x00000002
390. nt32 focusPattern XAuint32 activePoints1 XAuint32 activePoints2 XAresult GetFocusRegionPattern XACameraItf self XAuint32 pFocusPattern XAuint32 pActivePoints1 XAuint32 pActivePoints2 XAresult GetFocusRegionPositions XACameraItf self XAuint32 pNumPositionEntries XAFocusPointPosition pFocusPosition XAresult GetFocusModeStatus XACameraItf self XAuint32 pFocusStatus XAuint32 pRegionStatusl1 XAuint32 pRegionStatus2 XAresult SetMeteringMode XACameraItf self XAuint32 meteringMode XAresult GetMeteringMode XACameraItf self XAuint32 pMeteringMode XAresult SetExposureMode XACameraItf self XAuint32 exposureMode XAuint32 compensation XAresult GetExposureMode XACameraItf self XAuint32 pExposureMode XAuint32 pCompensation XAresult SetISOSensitivity XACameraItf self XAuint32 isoSensitivity XAuint32 manualSetting XAresult GetISOSensitivity XACameraItf self XAuint32 pIsoSensitivity XAuint32 pManualSetting XAresult SetAperture XACameraItf self XAuint32 aperture XAuint32 manualSetting ypenMAX AL 90 XAresult GetAperture XACameraItf self XAuint32 pAperture XAuint32 pManualSetting XAresult SetShutterSpeed XACameraItf self XAuint32 shutterSpeed XAmicrosecond manualSetting XAresult GetShutterSpeed XACameraItf self XAuint32 pShutterSpeed
391. nt32 isoSensitivity XAuint32 manualSetting Sets the camera ISO sensitivity Parameters Interface self reference sensitivity in Specifies the camera ISO sensitivity mode Refer to XA_CAMERA_ISOSENSITIVITYMOD manualSetting in Ifthe manual ISO sensitivity mode is enabled this value specifies the manual setting This parameter is ignored if manual ISO sensitivity mode is disabled The parameter is an ISO value Return value The return value can be one of the following XA_RESULT_SUCCESS See Also Get ISOSensitivity XA_CAMERA_ISOSENSITIVITYMOD Get Supported1ISOSensitivitySettings ypenMAX AL GetISOSensitivity XAresult GetISOSensitivity XACameraItf self XAuint32 pIsoSensitivity XAuint32 pManualSetting Gets the camera ISO sensitivity Parameters in Interface self reference pSensitivity out Specifies the camera ISO sensivitity mode Refer to XA_CAMERA_TSOSENSITIVITYMODE pManualSetting If the manual ISO sensitivity mode is enabled this value specifies the manual setting If automatic ISO sensitivity mode is used the exposure is locked and the device supports this this value specifies the automatically determined ISO sensitivity if exposure is not locked or exposing this value is not supported this value is zero The parameter is an ISO value Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESUL
392. ntrolsItf self XApermille pMinValue XApermille pMaxValue XAuint32 pNumSettings XApermille pSettings This method gets the supported gamma settings i pNumSettings in out If pSettings is NULL pNumSettings returns the number of supported gamma settings If the available manual settings are continuous from pMinValue to pMaxValue pNumSettings returns 0 If pSettings is non NULL and a non continuous range is supported pNumSet tings is length of the pSettings array pSettings out Returns an array of supported gamma settings pSettings may be NULL The array of values returned must include pMinValue and pMaxValue Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If gamma settings are unsupported the method returns XA_RESULT_FEATURE_UNSUPPORTED The memory for the pSettings array shall be allocated by the OpenMAX AL application ypenMAX AL i 8 16 XAlmageDecoderCapabilitiesltf Description This interface provides methods of querying the image decoding capabilities of the media engine This interface provides a means of enumerating all image decoders available on an engine where each an decoderld represents each decoder It also provides a means to query the capabilities of each decoder The set of image decoders supported by the engine does not change during the lifetime of
393. null terminated string containing the name of the given preset The character coding is UTF 8 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL 8 15 XAlmageControisitf Description The image and color controls interface is used to apply adjustments to the associated I O device It is realized on a object that supports image or video content Changes in brightness contrast and gamma are applied at the beginning of a frame Prototype XA API extern const XAInterfaceID XA_IID_IMAGECONTROLS struct XAImageControlsItf_ typedef const struct XAImageControlsItf_ const XAImageControlsItf struct XAImageControlsItf_ XAresult SetBrightness XAImageControlsItf self XAuint32 brightness XAresult GetBrightness XAImageControlsItf self XAuint32 pBrightness XAresult SetContrast XAImageControlsItf self XAint32 contrast XAresult GetContrast XAImageControlsItf self XAint32 pContrast XAresult SetGamma XAImageControlsItf self XApermille gamma XAresult GetGamma XAresult GetSupportedGammaSettings XAImageControlsItf self XApermille pGamma XAImageControlsItf self XApermille pMinValue XApermille pMaxValue XAuint32 pNumSettings XApermille pSettings Interface ID ypenMAX AL 178 3a449960 d7
394. numInterfaces is zero in Array of numInterfaces flags each specifying pinterfaceRequired whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code XA RESULT FEATURE UNSUPPORTED will be then returned This parameter is ignored if numInterfaces is zero Return value The return value can be one of the following XA_RESULT_SUCCESS XA RESULT PRECONDLTIONS VIOLATI XA_RESULT_PARAMETER_INVALID XA_RESUL MORY_FAILURE XA_RESUL ERROR XA_RESULT_PERMISSION_DENIE Comments If the engine fails to create the object due to lack of memory or resources it will return the XA RESULT MEMORY FAILURE or the XA_RESULT_RESOURCE_ERROR error respectively The Ob ject ID and the data structure pointed to by pParameters should be defined by an extension When Ob ject ID is not valid the method will return P XA_RESUL EATURE UNSUPPORTED COpenMAX AL 5 CreateExtensionObject Sesion GetImplementationInfo XAresult GetImplementationInfo XAEngineltf self XAuint32 pMajor XAuint32 pMinor XAuint32 pStep Xauint32 pImplementationTextSize XAchar pImplementationText Queries the OpenMAX AL implementation information pStep out Step within the
395. o QUerySUpportedImageEffect DisableImageEffect EnableImageEffect ypenMAX AL i 8 18 XAlmageEncoderiltf Description This interface is used to set the parameters to be used by an image encoder This interface is a mandated interface of Media Recorder objects see section 7 5 Prototype XA API extern const XAInterfaceID XA_IID_IMAGEENCODER struct XAImageEncoderItf_ typedef const struct XAImageEncoderItf_ const XAImageEncoderItf struct XAImageEncoderItf_ XAresult SetImageSettings XAImageEncoderItf self const XAImageSettings pSettings XAresult GetImageSettings XAImageEncoderItf self XAImageSettings pSettings XAresult GetSizeEstimate XAImageEncoderItf self XAuint32 pSize Interface ID cd49f140 df04 1 1db 8888 0002a5d5c5 1b Defaults The default value for image is JPEG for image width is 640 for image height is 480 and for compression level is 0 COpenMAX AL a Methods SetImageSettings XAresult SetImageSettings XAImageEncoderItf self const XAImageSettings pSettings Settings shall be applied prior to initiating a snapshot request SnapShotItf InitiateSnaphot Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_PRECONDITIONS_VIOLATED GetImag
396. o intervening ClearMarkerPosition Parameters Interface self reference pMsec out Pointer to a location to receive the position of the marker expressed in milliseconds relative to the beginning of the content Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_PRECONDITIONS_VIOLAT SetMarkerPosition ClearMarkerPosition SetPositionUpdatePeriod XAresult SetPositionUpdatePeriod XAPlayItf self XAmillisecond mSec Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The player will notify the application when the playback head passes through the positions implied by the specified period Those positions are defined as the whole multiples of the period relative to the beginning of the content By default the update period is 1000 milliseconds When a periodic position update coincides with a marker position as specified by SetMarkerPosition then both the update period callback and the marker position callback shall be posted next to each other The order of the two callbacks is insignificant SetMarkerPosition ypenMAX AL i GetPositionUpdatePeriod XAresult GetPositionUpdatePeriod XAPlayItf self XAmillisecond pMsec Queries the interval between periodic position notifications
397. oEncoders XAresult GetVideoEncoders XAVideoEncoderCapabilitiesIt self XAuint32 pNumEncoders XAuint32 pEncoderIds Retrieves available video encoders None Encoders in out If pEncoderIds is NULL pNumEncoders returns the number of encoders available Returns 0 if there are no encoders If pEncodersTIds is non NULL as an input pNumEncoders specifies the size of the pEncoderIds array and as an output it specifies the number of encoder IDs available within the pEncoderlIds array pEncoderlIds out Atray of video encoders provided by the engine Refer to XA_VIDEOCODEC macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID een PROFILE NOTES A Media Player Recorder profile implementation must support at least one encoder GetVideoEncoderCapabilities ypenMAX AL GetVideoEncoderCapabilities XAresult GetVideoEncoderCapabilities XAVideoEncoderCapabilitiesIt self XAuint32 encoderId XAuint32 pIndex XAVideoCodecDescriptor pDescriptor Retrieves video encoder capabilities where N is the number of capabilities of the encoder pDescriptor out Structure defining the capabilities of the video encoder Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID None Get Video
398. oSettings XAVideoEncoderItf self XAVideoSettings pSettings Interface ID 9444db60 df06 11db b311 0002a5d5c51b Defaults No default settings are mandated OpenMAX AL 7 Methods SetVideoSettings XAresult SetVideoSettings XAVideoEncoderItf self XAVideoSettings pSettings Set video encoder settings RecordItf shall be in stopped state pSettings Video encoder settings XA_RESULT_FEATURE_UNSUPPORTED is returned if the requested encoder is not supported Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_PRECONDITIONS_VIOLAT None Get ImageSetting Get VideoSettings XAresult GetVideoSettings XAVideoEncoderItf self XAVideoSettings pSettings Get video encoder settings Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The getter returns the exact value that was set by the previous call to the setter That is the keyFramelInterval field of the returned XAVideoSettings struct is zero if the frequency of keyframes is set to be determined automatically Set ImageSetting MypenMAX AL 840 XAVideoEncoderCapabilitiesitf Description This interface provides methods of querying the video decoding capabilities of the media engine This
399. of associated input devices For applications that both accept and render audio this method helps to determine whether an audio input and an audio output belong to the same physical accessory An audio device cannot be associated with itself So in the example above if this method were to be called with microphone 01 as the deviceID parameter it would return an empty array since there are no other inputs associated with microphone 01 on that Bluetooth headset If this method is called with the special device IDs XA_DEFAULTDEVICEID_AUDIOINPUT and XA_DEFAULTDEVICEID_AUDIOOUTPUT the result is undefined GetDefaultAudioDevices ypenMAX AL GetAssociated AudioOutputs XAresult GetAssociatedAudioOutputs XAAudiolODeviceCapabilitiesItf self XAuint32 deviceID XAint32 pNumAudioOutputs XAuint32 pAudioOutputDevicelIDs This method returns an array of audio output devices physically associated with this audio I O device Pre conditions None Parameters self Interface self reference pNumAudioOutputs in out As an input specifies the length of the pAudioOutputDevicelDs array ignored if pAudioOutputDevicelDs is NULL As an output specifies the number of audio output device IDs associated with devicelID Returns zero if there is no such association pAudioOutputDevicelDs out Array of audio output device IDs Should be ignored if pNumAudioOut puts is zero
400. only captures video or image data pimageVideoSrc in Pointer to the structure specifying the video data source such as a camera device If this field is NULL then no image video source is specified and the recorder only captures audio data XASnapshotItf InitiateSnapshot is used to define the output of the captured image s If pDataSnk is a URI say a file that already exists it will be overwritten numInterfaces in Number of interfaces that the object is requested to support not including implicit interfaces piInterfacelds in Array of numInterfaces interface IDs which the object should support pDataSnk in Pointer to the structure specifying the audio video data sink such as a container file This parameter is ignored if XASnapshotItf and not XARecordIt f is used since This parameter is ignored if numInterfaces is zero pinterfaceRequired in Array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code XA_RESULT_FEATURE_UNSUPPORTED will be then returned This parameter is ignored if numInterfaces is zero ypenMAX AL CreateMediaRecorder Return value The return value can be one of the following XA RESUL UCCESS XA_RESULT_PRECONDITIONS_VIOLATI XA_RESULT_PARAMETER_INVALID XA_RESUL EMORY_FAILURI XA_RESUL EADONLY
401. ontent and of the API implementation may imply tradeoffs between the accuracy and speed of a seek operation Seek modes afford the application a means to specify which characteristic accuracy or speed should be preferred For some encoded data formats dependencies exist between discrete samples frames Seeking an exact position may thus imply some latency while the implementation builds up data at the desired position from data preceding it or ypenMAX AL SS even following it For example when the position specified corresponds to a B frame the implementation will need to reconstruct the forward and backwards reference frames for that B frame Alternatively an implementation may seek the independent sample frame such as an Intraframe nearest to the desired position Although this reduces latency this approach implies a larger potential distance between the desired position and the position realized by the implementation FF F Prefer the speed of a seek over the accuracy of a seek Upon a SetPosition call the implementation minimizes latency potentially at the expense of accuracy effective playback head position may vary slightly from the requested position E ACCURATE Prefer the accuracy of a seek over the speed of a seek Upon a Set Position call the implementation minimizes the distance between the effective playback head position and the requested position potentially at the price of high
402. op a aaa ga e aes ae cas She gean E TEES E e a S e E us ive ENEE Na 129 8 10 XADYNAMICINTERFACEMANAGEMENTITE cesccesscecsseeesececeseceseceeseeecsaececeeenaeceaeeeenaeceeeerenaeceeeeenaeees 132 8 11 XADYNAMICSOURCEITP eiorinn renn r a cade dens GS EEE S E aa E E EEE ceva ete R 137 8 12 XADYNAMICSOURCESINKCHANGEITE ccsssccesecessseceseeesseecesneeesaeceeeeesaeceseeesnaeceaeeeeaaeceenesenaeseeeeeneeess 139 8 13 XCAENGINEITR eeren eR eles goed tedates sid C M Ta Eas GAN Sao nace saneeea pea pren ee Sede Sareea ae 146 COpenMAX AL 8 14 KAEBOUALIZERIT E mm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmiu 168 8 15 XAIMAGECONTROLSITE sereciirereo iiine ninae E EEEE EE ETRE EEE E EE EE 178 8 16 XAIMAGEDECODERCAPABILITIESITE eeceeeseesseescesecesecesecseceecesecsaecsaecsaecsaecasecseseaeseeeeseeeseseseesseesaeenaes 184 8 17 XAIMAGEEPRECTSITB arere riie e ENE EE cuteveni cs EEE EERE 187 8 18 XAIMAGEENCODERITR aiseria kiesni ean E eo EEE E E EEEE EEEE E EE E EEE EESE AES 191 8 19 XAIMAGEENCODERCAPABILITIESITE s seeeeeeeseeseseterstrrereretrsreterstrtestertretestttenetntestuttreteserttnsenteseerereteret 194 8 20 XALEDARRAYITE eeoa rrer ieee Ei e EEE ar EEE EE EE E E Ee AS EEEE OERE ESEE EE EEEE EEE EEEE EE 197 8 21 RAMETADATAEXTRACTIONITE cc csdvinssessesenscvanvevecventedsceisesbecssvasee svoersteducunstessivbabnssbusies leeevibesansiedacnavene 201 8 22 XAMETADATAINSERTIONITE siipeen en reur dE ure PENET E
403. opt to stop operation immediately if it is greater than 1 without needing to invoke other methods to get the new number of devices mapped to XA_DEFAULTDEVICEID_AUDIOOUTPUT or XA_DEFAULTDEVICEID_AUDIOINPUT QueryAudioOutputCapabilities ypenMAX AL i Methods GetAvailableAudiolnputs XAresult GetAvailableAudiolInputs XAAudioIODeviceCapabilitiesIt self XAint32 pNumInputs XAuint32 pInputDevicelIDs Gets the number and IDs of audio input devices currently available pNumInputs in out As an input specifies the length of the pInputDevicelIDs array ignored if pInputDevicelIDs is NULL As an output specifies the number of audio input device IDs available in the system Returns 0 if no audio input devices are available in the system piInputDevicelDs out Array of audio input device IDs currently available in the system This parameter is populated by the call with the array of input device IDs provided that pNumInputs is equal to or greater than the number of actual input device IDs If pNumInputs is less than the number of actual input device IDs the error code XA_RESULT_BUFFER_INSUFFICIENT is returned Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_BUFFER_INSUFFICII XA_RESULT_PARAMETER_INVALI Comments Note that available implies those audio input devices that are active that is can accept input audio and this number may be
404. or i 0 i lt MAX_NUMBER_INTERFACES i required i XA_BOOLEAN_FALS iidArray i XA_IID_NULL Es Set arrays required and iidArray for VOLUME interface required 0 XA_BOOLEAN_TRUE iidArray 0 XA_IID_VOLUME Create Output Mix object to be used by player res EnginelItf gt CreateOutputMix Engineltf amp OutputMix 1 iidArray required CheckErr res Realizing the Output Mix object in synchronous mode res OutputMix gt Realize OutputMix XA_BOOLEAN_FALSE CheckErr res Get the volume interface on the output mix res OutputMix gt GetInterface OutputMix XA_IID_VOLUME void amp volumelItf CheckErr res Setup the audio video data source structure uri locatorType XA_DATALOCATOR_URI uri pURI XAchar file avmedia 3gp mime formatType XA_DATAFORMAT_ MIME mime pMimeType XAchar video 3gpp mime containerType XA_CONTAINERTYPE_3GPP provided as a hint to the player avSource pLocator void uri avSource pFormat void amp mime Setup the audio data sink structure locator_outputmix locatorType XA_DATALOCATOR_OUTPUTMIX CpenMAX AL locator_outputmix outputMix OutputMix audioSink pLocator void amp locator_outputmix audioSink pFormat NULL Set nativeWindowHandle and nativeDisplayHandle to platform specific values here nativeWindowHandle lt a p
405. orted by the implementation based on the given index Parameters Interface self reference ee AS The index of the extension Must be 0 numExtensions 1 out pExtensionName The name of the supported extension as defined in the Khronos registry http www khronos org registry or in vendor specific documentation The length of the needed char array should be first figured out from pNameLength out parameter by calling this method with pExtensionName as null pNameLength As an output specifies the length of the name including the terminating NULL As an input specifies the length of the given pExtensionName char array ignored if pExtensionName is NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALI XA_RE iT_BUFFER_INSUFFICII Comments If the given length is smaller than the needed size XA_RESULT_BUFFER_INSUFFICIENT is returned and only data of the given size will be written however no invalid strings are written That is the null terminator always exists and multibyte characters are not cut in the middle QueryNumSupportedExtensions IsExtensionSupported ypenMAX AL IsExtensionSupported XAresult IsExtensionSupported XAEngineItf self const XAchar X pExtensionName XAboolean pSupported Queries if the given extension is supported by the implementation
406. p minFreg amp maxFreq amp freqinterval CheckErr res res radioltf gt SetFreqRange radioItf XA_FREQRANGE_FMJAPAN CheckErr res else NO FM reception supported Insert error message here exit 1 sem wait amp semFreqRange Start the playback cas olay lic SSecyP layScace oLa Lti XA_PLAYSTATE_PLAYING CheckErr res Shuts down the OpenMAX AL engine Ai void destroy void XAresult res Stop the audio res playItf gt SetPlayState playItf XA_PLAYSTATE_ STOPPED CheckErr res Destroy the player player gt Destroy player Destroy Output Mix object outputMix gt Destroy outputMix ypenMAX AL a Destroy Radio object radio Destroy radio Shutdown OpenMAX AL engine gt Destroy engine Callec loy WL winein USE TUNS to Or Cwm yf void tune XAboolean tuneUp XAresult res XAuint32 newFreq if tuneUp XA_BOOLEAN_TRU eal EWES CULESMEN reg r ieee lime Sicwelll p if newFreg gt maxFreq newFreq minFreq else MSW CSC CUuEwSinelk ceci TE ieSCilinie Sie welll p if newFreq lt minFreq SWE SC WES recy res radioltf gt SetFrequency radioItf newFreq CheckErr res sem wait amp semF req Curren rec me Bee Insert here code to update the new frequency to scree
407. pContext Sets or clears xaSourceChangeCallback None Parameters in Interface self reference callback in Pointer to the callback function to be called when the ChangeSource method finishes execution penMAX AL i RegisterSourceChangeCallback pContext in User context data that is to be returned as part of the callback method Return value The return value can be one of the following ER_INVALID Comments None xaSourceChangeCallback RegisterSinkChangeCallback XAresult RegisterSinkChangeCallback XADynamicSourceSinkChangelItf self xaSinkChangeCallback callback void pContext Sets or clears xaSinkChangeCallback Pre None conditions Parameters Interface self reference cal Llback in Pointer to the callback function to be called when the ChangeSink method finishes execution pContext in User context data that is to be returned as part of the callback method Return The return value can be one of the following value xa RESULT SUCCESS XA RESULT PARAMETER INVALID _ xaSinkChangeCallback MypenMAX AL 8 13 XAEngineltf Description This interface exposes creation methods of all the OpenMAX AL object types See Appendix D for examples using this interface Prototype XA API extern const XAInterfaceID XA IID ENGINE struct XAEngineItf typedef const struct XAEngineItf_
408. pInterface contains the interface affected For other values of event this parameter should be ignored Comments Please note the restrictions applying to operations performed from within callback context in section 3 3 RegisterCallback ypenMAX AL i Methods Realize XAresult Realize XAObjectItf self XAboolean async Description Transitions the object from Unrealized state to Realized state either synchronously or asynchronously The object must be in Unrealized state Parameters in Interface self reference async in If XA_BOOLEAN_FALSE the method will block until termination Otherwise the method will return XA_RESULT_SUCCESS and will be executed asynchronously On termination the xaObjectCallback will be invoked if registered with the XA_OBJECT_EVENT_ASYNC_TERMINATION The result parameter of the xaObjectCallback will contain the result code of the function However if the implementation is unable to initiate the asynchronous call XA_RESULT_RESOURCE_ERROR will be returned Return value The return value can be one of the following XA_RESUL UCCESS XA_RESUL FSOURCE_ERROR _S _R XA_RESULT_PRECONDITIONS_VIOLAT XA _M ae R R RES EMORY_FAILURE XA_RES O_ERROR R R R R XA_RESULT_CONTENT_C
409. pNumSettings XAmillimeter pSettings This method gets the supported manual focus settings oe jin Enabled in If XA_BOOLEAN_TRUE returns focus settings for macro mode If XA_BOOLEAN_FALSE returns focus settings for normal mode pMinVal out Identifies the minimum manual focus setting supported lue pMaxValue out Identifies the maximum manual focus setting supported A value of OxFFFFFFFF indicates infinity pNumSettings in out If pSettings is NULL pNumSettings returns the number of supported manual focus settings If the available manual settings are continuous from pMinValue to pMaxValue pNumSettings returns 0 If pSettings is non NULL and a non continuous range is supported pNumSettings is length of the pSettings array pSettings out Returns an array of supported focus settings pSettings may be NULL The array of values returned must include pMinValue and pMaxValue A value of OxFFFFFFFF indicates infinity Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The value of OxFFFFFFFF for infinity should not be used with a continuous range of focus settings If manual focus settings are unsupported the method returns XA_RESULT_FEATURE_UNSUPPORTED The memory for the pSettings array shall be allocated by the OpenMAX AL application None COpenMAX AL i GetSupportedISOSe
410. ported XAint16 numOfSamplingRatesSupported XAint16 maxChannels XAAudioOutputDescriptor This structure is used for returning the description of audio output device capabilities The deviceConnection deviceScope and deviceLocation fields collectively describe the type of audio output device in a standardized way while still allowing new device types to be added by vendor specific extensions of the corresponding macros if necessary For example on a mobile phone the earpiece would have the following values for each of these three fields respectively XA_DEVCONNECTION_INTEGRATED XA_DEVSCOPE_USER and XA_DEVLOCATION_HANDSET while a pair of speakers that are part of a music dock would have the following XA_DEVCONNECTION_ATTACHED_WIRED XA_DEVSCOPE_ENVIRONMENT and XA_DEVLOCATION_DOCK pDeviceName Human readable string representing the name of the output device such as integrated loudspeaker or Bluetooth headset deviceConnection One of the device connection types listed in the XA_DEVCONNECTION macros deviceScope One of the device scope types listed in the XA_DEVSCOPE macros deviceLocation One of the device location types listed in the XA_DEVLOCATION macros isForTelephony Returns XA_BOOLEAN_TRUE if the audio output device is deemed suitable for telephony downlink audio otherwise returns XA_BOOLEAN_FALSE
411. putCapabilities ypenMAX AL n xaDefaultDeviceIDMapChangedCallback typedef void XAAPIENTRY xaDefaultDeviceIDMapChangedCallback XAAudiolODeviceCapabilitiesItf caller void pContext XAboolean isOutput XAint32 numDevices Description This callback executes when the set of audio output devices mapped to XA DEFAULTDEVICEID AUDIOINPUT or XA DEFAULTDEVICEID AUDIOOUTPUT changes Parameters Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered isOutput in If true then devices mapped to XA_DEFAULTDEVICEID_AUDIOOUTPUT have changed otherwise the devices mapped to XA_DEFAULTDEVICEID_AUDIOINPUT have changed numDevices in New number of physical audio output devices to which XA_DEFAULTDEVICEID_AUDIOOUTPUT or XA_DEFAULTDEVICEID_AUDIOINPUT is now mapped depending on the value of isOutput Is always greater than or equal to 1 Comments The callback does not provide additional details about the audio output devices now mapped to the default device ID It is up to the application to retrieve the device IDs and to use the device IDs to query the capabilities of each device numDevices is included in the callback for the benefit of those applications who may not wish to send receive their audio stream to from more than one output device Such applications can examine numDevices and
412. r deviceType XA_IODEVICE_CAMERA cameraLocator devicelID XA_DEFAULTDEVICEID_ CAMERA fe AGjiororeeel cameraLocator device camera videoSource pLocator void amp cameraLocator videoSource pFormat NULL CREATE VIEWFINDER PLAYER Setup the data sink structure for the viewfinder displayLocator locatorType XA_DATALOCATOR_NATIVEDISPLAY displayLocator hWindow window displayLocator hDisplay display videoSink pLocator void amp displayLocator videoSink pFormat NULL Create the player res engineltf gt CreateMediaPlayer engineltf amp player NULL amp videoSource NULL amp videoSink NULL NULL 1 iidArray required CheckErr res Realizing the player in synchronous mode res player gt Realize player XA_BOOLEAN_FALSE CheckErr res Get the play interface res player gt GetInterface player XA_IID_PLAY void amp playItf CheckErr res start the viewfinder Cas play lice SSecyP layScace olay LEi p XA_PLAYSTATE_PLAYING CheckErr res CREATE RECORDER f SECwWS eines lane SiiNk SieiwwerwieSs wor clas wecorcleie NULL since it is never used but instead the DataSink is given in InitiateSnapshot function fileSink pLocator NULL fileSink pFormat NULL CpenMAX AL Set arrays required and iidArray for SNAPSHOT IM
413. r pixel YUV interleaved format organized as COpenMAX AL 410 Value Description YUYV i e YCbYCr XA COI T_YCRYCB 16 bits per pixel YUV interleaved format organized as YVYU i e YCrYCb XA_COl T_CBYCRY 16 bits per pixel YUV interleaved format organized as UYVY i e CbYCrY XA_CO T_CRYCBY 16 bits per pixel YUV interleaved format organized as VYUY i e CrYCbY XA COI T_YUV444INTE 12 bits per pixel YUV format with colors stores as Y 11 8 U 7 4 and V 3 0 XA COI T RAWBAYI SMIA 8 bit raw Bayer pattern camera format XA COI T RAWBAYI SMIA 10 bit raw Bayer pattern camera format XA COI T RAWBAYI SMIA compressed 8 bit camera output format XA COI 2 bit per pixel luminance XA COI 4 bit per pixel luminance XA COI1 8 bit per pixel luminance XA COI 16 bit per pixel luminance XA COI1 24 bit per pixel luminance XA COI 32 bit per pixel luminance XA COI1 SP Pe eS eS S S Se ey eye 18 bits per pixel BGR format with colors stored as Blue 17 12 Green 11 6 and Red 5 0 XA CO 24 bits per pixel ARGB format with colors stored as Alpha 23 18 Red 17 12 Green 11 6 and Blue 5 0 XA COI 24 bits per pixel ARGB format with colors stored as Alpha 23 18 Blue 17 12 Green 11 6 and Red 5 0 ypen
414. r profile implementation must support at least one encoder ypenMAX AL OueryColorFormats XAresult QueryColorFormats const XAImageEncoderCapabilitiesIt self XAuint32 pIndex XAuint32 pColorFormat i This method is used to query the color formats supported by the image encoder out If pColorFormats is NULL pIndex returns the number of color formats supported Returns 0 if there are no color formats are supported If pColorFormats is non NULL pIndex is an incrementing value used for enumerating the color formats supported Supported index range is 0 to N 1 where N is the number of color format supports Pointer to the color format May be NULL See XA_COLORFORMAT macros pIndex pColorFormat out i SUCC PARA ESS Success ET ER_INVALID One or more of the parameters hod are invalid Return value The return value can be one of the following XA RESULT E XA_RESULT_ TER passed to the met j This method returns color formats associated with the XA_IMAGE EC_RAW codec ypenMAX AL 196 8 20 XALEDArrayltf Description XAL XALI EDArrayItf is used to activate deactivate the LEDs as well as to set the color of LEDs if supported EDArrayItf uses the following state model per LED which indicates whether the LED is on or off Create_LEDArrayOutputDevice Acti
415. r weighted average metering mode XA_CAMERA_METERINGMODE_SPOT Spot partial metering mode XA_CAMERA_METERINGMODE_MATRIX Matrix or evaluative metering mode 9 2 18 XA _CAMERA_SHUTTERSPEEDMODE define XA_CAMERA_SHUTTERSPEEDMODE_MANUAL XAuint32 0x00000001 define XA_CAMERA_SHUTTERSPEEDMODE_AUTO XAuint32 0x00000002 These values are used to set camera shutter speed Value Description XA_CAMERA_SHUTTERSPEEDMODE_MANUAL Manual shutter speed mode XA_CAMERA_SHUTTERSPEEDMODE_AUTO Auto shutter speed mode ypenMAX AL 405 9 2 19 XA CAMERA WHITEBALANCEMODE define XA CAMERA WHITEBALANCEMODE MANUAL XAuint32 0x00000001 define XA CAMERA WHITEBALANCEMODE AUTO XAuint32 0x00000002 define XA CAMERA WHITEBALANCEMODE SUNLIGHT XAuint32 0x00000004 define XA CAMERA WHITEBALANCEMODE CLOUDY XAuint32 0x00000008 define XA CAMERA WHITEBALANCEMODE SHADE XAuint32 0x00000010 define XA CAMERA WHITEBALANCEMODE TUNGSTEN XAuint32 0x00000020 define XA CAMERA WHITEBALANCEMODE FLUORESCENT XAuint32 0x00000040 define XA CAMERA WHITEBALANCEMODE INCANDESCENT XAuint32 0x00000080 define XA_CAMERA WHITEBALANCEMODE_FLASH XAuint32 0x00000100 define XA_CAMERA WHITEBALANCEMODE_SUNSET XAuint32 0x00000200 These values are used to set camera white balance
416. rameter is ignored if numInterfaces is zero Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_MEMORY_FAILURE Comments If the engine fails to create the object due to lack of memory or resources it will return the XA RESULT MEMORY FAILURE or the XA_RESULT_RESOURCE_ERROR error respectively See also XAEnginelIt f see section 8 13 to determine the capabilities of the LED device Vibra I O device object see section 7 9 ypenMAX AL i CreateMediaPlayer XAresult CreateMediaPlayer XAEngineltf self XAObjectItf pPlayer const XADataSource pDataSrc const XADataSource pBankSrc const XADataSink pAudioSnk const XADataSink pImageVideoSnk const XADataSink pVibra const XADataSink pLEDArray const XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired Creates a media player object Pre conditions If data source s or data sink s locator is an object e g camera radio or output mix this object must be in the realized state out Newly created media player object pDataSrc in Pointer to the structure specifying the data source such as a container file For MIDI the data source must be a i Mobile XME or SP MIDI file reference pBankSrc in Pointer to the structure specifying the instrument bank in Mo
417. re three options XA_VIDEOSCALE_STRETCH The source and destination rectangle s width and height parameters are used to calculate the scaling factors independently Aspect ratio is ignored XA_VIDEOSCALE_FIT The minimum scale factor between the destination rectangle s width over the source rectangle s width and the destination rectangle s height over the source rectangle s height is used Aspect ratio is maintained Frame is centered XA_VIDEOSCALE_CROP The maximum scale factor between the destination rectangle s width over the source rectangle s width and the destination rectangle s height over the source rectangle s height is used Aspect ratio is maintained Frame is centered Figure 21 illustrates these three options 32 bit RGBA color value with 8 bits each for red green blue and alpha This color will be used to fill the borders when scaleOptions is set to XA_VIDEOSCALE_FTT As an example the cell in Figure 21 Fit row and 16 9 gt 4 3 column has black borders on its top and bottom parts The alpha value specifies the transparency level of those borders only and does not affect the alpha value of the actual video frame Defines the rendering hints to use during scaling Refer to XA_RENDERINGHINT macros Return value The return value can be one of the following XA_RESULT_ E XA RESULT PARA FR INVALILD SetDestinationR
418. rent in audio and video content In the context of this use case the playback states have the following interpretation Table 8 Presentation and Playback State for Audio Video Media Playback State Audio Content Image Video Content The display of an image file Due to its instantaneous nature an image file cannot be seeked and its rate cannot be changed In the context of this use case the playback states have the following interpretation Table 9 Presentation and Playback State for Image Media Playback State Audio Content Image Video Content Stopped not applicable not applicable Playing not applicable not applicable same as playing state The rendering of live preview data In this case the source is a camera as in the case of a viewfinder In this context the playback states have the following interpretation Table 10 Presentation and Playback State for Live Preview Playback State Audio Content Image Video Content Presentation Stopped not applicable not presented not updating ypenMAX AL Playback State Audio Content Image Video Content Presentation Playing notapplicable presented updating Paused notapplicable presented not updating A application may choose to associate both a media player object and a media recorder object with the same camera TO device object to implement a camcorder or still image camera application In such a cas
419. rent units required by the API such as distance and volume To aide programmability most of these units are based on the thousandth unit of a SI unit SO1000 5 1 Standard Units The table below shows the standard types for units used in OpenMAX AL Table 7 OpenMAX AL Unit Types Angle millidegree mdeg Distance millimeter mm Frequency milliHertz mHz XAmill idegree XAmill XAmil imeter iHertz Scale Factor permille 0 XApermille Time millisecond ms XAmil isecond Time microsecond us XAmicrosecond 5 2 Base Types typedef system dependent XAint8 typedef system dependent XAuint8 typedef system dependent XAint16 typede system dependent XAuint16 typedef system dependent XAint32 typede system dependent XAuint32 typedef system dependent XAuint64 typedef system dependent XAfloat32 typedef system dependent XAfloat64 typedef system dependent XAchar typedef XAuint32 XAboolean typedef XAint16 XAmillibel typedef XAuint32 XAmillisecond typedef XAuint32 XAmilliHertz typedef XAint32 XAmillimeter typedef XAint32 XAmillidegree typedef XAint16 XApermille typedef XAuint32 XAmicrosecond typedef XAuint64 XAtime typedef XAuint32 XAresult ypenMAX AL 42 BEIR XAchar A character type All strings within the API except where explicitly defined otherwise are UTF 8 null terminated XAchar arrays The definitio
420. result GetSupportedApertureManualSettings XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAuint32 pMinValue XAuint32 pMaxValue XAuint32 pNumSettings XAuint32 pSettings This method gets the supported manual aperture settings i pMinValue out Identifies the minimum manual aperture setting supported A setting of 100 is equal to an f stop of 1 0 pMaxValue out Identifies the maximum manual aperture setting supported A setting of 100 is equal to an f stop of 1 0 pNumSettings in out If pSettings is NULL pNumSettings returns the number of supported manual aperture settings If the available manual settings are continuous from pMinValue to pMaxValue pNumSettings returns 0 If pSettings is non NULL and a non continuous range is supported pNumSet tings is length of the pSettings array pSettings out Returns an array of supported aperture settings pSettings may be NULL The array of values returned must include pMinValue and pMaxValue A setting of 100 is equal to an f stop of 1 0 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments If manual aperture settings are unsupported the method returns XA_RESULT_FEATURE_UNSUPPORTED The memory for the pSettings array shall be allocated by the OpenMAX AL application ypenMAX AL GetSupportedShutterS peedManualSettings
421. rface Additionally the application may increase the object s priority thus increasing the likelihood that the object will steal another object s resources Adding an interface that is already exposed will result in a return value of XA_RESULT_PRECONDITIONS_VIOLATED XAObjectiItf GetInterface ypenMAX AL Removelnterface XAresult XADyn const Pre conditions Parameters Comments RemovelInterface amicInterfaceManagementItf self XAInterfaceID iid Synchronous method for removing a dynamically exposed interface on the object This method is supported in all object states Interface has been exposed Interface self reference iid in Valid interface type ID that has been exposed on this object by use of the AddiInterface method The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_PRECONDITIONS_VIOLATI An object that is in Suspended or Unrealized states waits also for resources for dynamically managed interfaces before sending a resources available event By removing a dynamic interface in Unrealized or Suspended state the object does not wait for resources for that dynamic interface Removing an interface that is not exposed will result in a return value of X
422. rmationItf self XAuint 32 streamNum XAboolean active XAboolean commitNow Set unset the active state for a specified stream The commitNow parameter allows a number of changes to be deferred and then committed at once Return value The return value can be one of the following XA RES _SUCCESS XA_RES _PARAMETER_INVALID XA_RES _PRECONDITIONS_VIOLAT I Comments It is implementation specific if multiple active streams per domain type are allowed No changes will be made to the active state of any stream until this function is called with a commitNow value of XA_BOOLEAN_TRUE The implementation may return XA_RESULT_FEATURE_UNSUPPORTED if it does not support selecting multiple active streams if the specified stream type is unsupported or if the current set of selected streams cannot be made active This function shall not be called on a metadata extractor object and shall return XA_RESULT_PRECONDITIONS_VIOLATED in this case ypenMAX AL i 836 XAThreadSynclitf Description Registered callbacks can be invoked concurrently to application threads and even concurrently to other callbacks The application cannot assume anything about the pContext from which registered callbacks are invoked and thus using the native synchronization mechanisms for synchronization of callback contexts is not guaranteed to work For this purpose a critical s
423. ro Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_MEMORY_FAILURE Comments If the engine fails to create the object due to lack of memory or resources it will return the XA RESULT MEMORY FAILURE or the XA_RESULT_RESOURCE_ERROR error respectively Radio I O device object see section 7 8 ypenMAX AL HR CreateLEDDevice XAresult CreateLEDDevice XAEngineItf self XAObjectIt f pDevice XAuint32 deviceID XAuint32 numInterfaces const XAInterfaceID pInterfacelds const XAboolean pInterfaceRequired Creates an LED device out Newly created LED device object numInterfaces in Number of interfaces that the object is requested to support not including implicit interfaces piInterfacelds in Array of numInterfaces interface IDs which the object should support This parameter is ignored if numInterfaces is zero pinterfaceRequired in Array of numInterfaces flags each specifying whether the respective interface is required on the object or optional A required interface will fail the creation of the object if it cannot be accommodated and the error code XA_RESULT_FEATURE_UNSUPPORTED will be then returned This parameter is ignored if numInterfaces is zero Return value The return value can be one of
424. ro length string if unknown The length of the name is 8 characters Therefore the application needs to pass here an array of length 17 since each character used in RDS can take two UTF 8 encoded words and the string is null terminated Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetRadioText XAresult GetRadioText XARDSItf self XAchar pRt Gets the current Radio Text RT Parameters Interface self reference pRt out Radio Text or zero length string if unknown The length of the Radio Text is 64 characters maximum and it is null terminated Therefore the application needs to pass here an array of length 129 since each character used in RDS can take two UTF 8 encoded words and the string is null terminated Return value The return value can be the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID COpenMAX AL lt GetRadioTextPlus XAresult GetRadioTextPlus XARDSItf self XAuint8 contentType XAchar pInformationElement XAchar pDescriptor XAuint8 pDescriptorContentType Gets the current Radio Text RT information element based on the given class code contentType in Radio Text class code of the information element that is queried See 9 2 64 XA_RDSRTPLUS macros pinformationElement Radio Text information element or zero length string if
425. ros are used for defining the AAC audio profiles and modes I m AAC inside MPEG 4 ISO File Format AAC Raw Format access units OpenMAXIAL E AAC E_AAC_SSR Windows Media Audio Profiles and Modes define XA AUDIOPROFILE WMA7 XAuint32 0x00000001 define XA AUDIOPROFILE WMA8 XAuint32 0x00000002 define XA AUDIOPROFILE WMA9 XAuint32 0x00000003 define XA_AUDIOPROFILE_WMA10 XAuint32 0x00000004 define XA_AUDIOMODE_WMA_LEVEL1 XAuint32 0x00000001 define XA_AUDIOMODE_WMA_LEVEL2 XAuint32 0x00000002 define XA_AUDIOMODE_WMA_LEVEL3 XAuint32 0x00000003 define XA_AUDIOMODE_WMA_LEVEL4 XAuint32 0x00000004 define XA_AUDIOMODE_WMAPRO_LEVELMO XAuint32 0x00000005 define XA_AUDIOMODE_WMAPRO_LEVELM1 XAuint32 0x00000006 define XA_AUDIOMODE_WMAPRO_LEVELM2 XAuint32 0x00000007 define XA_AUDIOMODE_WMAPRO_LEVELM3 XAuint32 0x00000008 The macros are used for defining the WMA audio profiles and modes WMA Level 1 ypenMAX AL RealAudio Profiles and Levels define XA_AUDIOPROFILE_REALAUDIO XAuint32 0x00000001 define XA_AUDIOMODE_REALAUDIO_G2 XAuint32 0x00000001 define XA_AUDIOMODE_REALAUDIO_8 XAuint32 0x00000002 define XA_AUDIOMODE_REALAUDIO_10 XAuint32 0x0000
426. rrent content and the player has paused Playback head is at the specified marker position specified in by application 9 2 55 XA_PLAYSTATE define XA PLAYSTATE STOPPED XAuint32 0x00000001 define XA PLAYSTATE PAUSED XAuint32 0x00000002 define XA PLAYSTATE PLAYING XAuint32 0x00000003 These values represent the playback state of an object XA_PLAYS E_STOPPED Player is stopped The playback head is forced to the beginning of the content and is not trying to move XA_PLAYSTATE_PAUSED Player is paused The playback head may be anywhere within the content but is not trying to move XA_PLAYSTATE_PLAYING Player is playing The playback head may be anywhere within the content and is trying to move 9 2 56 XA_PREFETCHEVENT define XA_PREFETCHEVENT_STATUSCHANGE XAuint32 0x00000001 define XA_PREFETCHEVENT_FILLLEVELCHANGE XAuint32 0x00000002 These values represent the possible prefetch related events _STATUSC E Prefetch status has changed a EVELCHANGE Prefetch fill level has changed ypenMAX AL 9 2 57 XA PREFETCHSTATUS define XA_PREFETCHSTATUS_UNDERFLOW define XA_PREFETCHSTATUS_SUFFICIENTDATA define XA_PREFETCHSTATUS_OVERFLOW XAuint32 0x00000001 XAuint32 0x00000002 XAuint32 0x00000003 These values represent th
427. rt The value associated with this key the image itself is in binary in one of several image formats KhronosCopyright Copyright text KhronosSeekPoint Seek points of the media In this regard three important scenarios are worth considering Scenario 1 Some of the Khronos keys do not have an equivalent standard metadata key in the media format under consideration Only those Khronos keys for which there exists a mapping to the standard keys of the media are populated the remaining Khronos keys remain empty that is no mapping exists and they are not exposed Scenario 2 The application is interested in metadata keys that are not part of the list of Khronos keys The application has the option of ignoring the Khronos keys entirely and directly specifying exactly those standard metadata keys that it is interested in using XAMetadat aExtractionItf Scenario 3 The application s metadata key list of interest is a proper superset of the Khronos key list The application has the option of ignoring the Khronos key list entirely as in Scenario 2 or it can use the Khronos key list and supplement it by accessing the extra format specific standard keys directly using the XAMetadataExtractionItf All the Khronos keys are encoded in ASCII The encoding and the language country code of the associated values depend on the media content However the encoding of the values is in one of the encoded strings with an exception that
428. ryRotationSupported XAVideoPostProcessingItf self XAboolean pSupported XAresult SetScaleOptions XAVideoPostProcessingItf self XAuint32 scaleOptions XAuint32 backgroundColor XAuint32 renderingHints XAresult SetSourceRectangle XAVideoPostProcessingItf self const XARectangle pSrcRect XAresult SetDestinationRectangle XAVideoPostProcessingItf self const XARectangle pDestRect XAresult SetMirror XAVideoPostProcessingItf self XAuint32 mirror XAresult Commit XAVideoPostProcessingItf self Interface ID 898b6820 7e6e 1 1dd 8caf 0002a5d5c51b Defaults The default behavior is no rotation no scaling no cropping and no mirroring Therefore both the source and destination rectangles are by default of the original frame size The default scale options are scaleOptions XA_VIDEOSCALE_FIT backgroundColor 0 black and not transparent ypenMAX AL 350 e renderingHints XA_RENDERINGHINT_NONE no hint Methods SetRotation XAresult SetRotation XAVideoPostProcessingItf self XAmillidegree rotation Sets post processing options for rotation Parameters Interface self reference rotation in Defines the clock wise rotation angle Return value The return value can be one of the following XA RESULT SUCCI XA RESULT PARAMETER INVALID Comments The change will only be committed once Commit is called
429. s have been designed such that their architecture is identical Further each API has identical API methods for the same functionality At the same time the APIs are also independent each can be used as a OpenMAX AL standalone API by itself as in Examples 1 and 2 or can co exist with the other on the same device as in Example 3 1 6 Conventions Used When this specification discusses requirements and features of the OpenMAX AL API specific words are used to indicate the requirement of a feature in an implementation The table below shows a list of these words Table 1 Requirement Terminology Word Definition The stated functionality is an optional requirement for an implementation of the OpenMAX AL API Optional features are not required by the specification but may have conformance requirements if they are implemented This is an optional feature as in The implementation may have vendor specific extensions Shall The stated functionality is a requirement for an implementation of the OpenMAX AL API If an implementation fails to meet a shall statement it is not considered as conforming to this specification Shall is always used as a requirement as in The implementation shall support the play interface Should The stated functionality is not a requirement for an implementation of the OpenMAX AL API but is recommended or is a good practice Should is usually used as follows An OpenMAX A
430. s interface can be used to get and set parameters for any AL object in a vendor specific manner COpenMAX AL i 7 4 Media Player Object Description The media player object plays audio video or image content as specified by the data source It performs any implicit decoding applies any specified processing and performs synchronized rendering of final audio video and image streams to the destinations specified by the audio and image video data sinks The application may omit the audio sink or image video sink when creating a media player that is by passing NULL as a parameter if the media player does not wish to playback the desired content Media players may render data from a variety of sources The controls exposed in the playback interface are appropriate for all sources Though conceptually identical the precise effect of each playback state depends on the use case Unlike the playback interface the seek and playback rate controls may be inappropriate for sources where such functionality is not achievable For instance persistent time based content is amenable to seeking and rate control yet live data is amenable to neither To illustrate consider these typical use cases The playback of an audio only video only or audio and video file The ability to seek and set rate on this player depends on the nature of the content and or the capabilities of the media player implementation The media player performs any synchronization inhe
431. s to NULL The context pointer can be used by the application to pass state to the callback function ypenMAX AL i SetCallbackEventsMask XAresult SetCallbackEventsMask XAPlayItf self XAuint32 eventFlags Enables disables notification of playback events Parameters Interface self reference eventFlags in Bitmask of play event flags indicating which callback events are enabled The presence of a flag enables notification for the corresponding event The absence of a flag disables notification for the corresponding event See XA_PLAYEVENT macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID The callback event flags default to all flags cleared GetCallbackEventsMask XAresult GetCallbackEventsMask XAPlayItf self XAuint32 pEventFlags Oueries for the notification state enabled disabled of playback events in Interface self reference EventFlags out Pointer to a location to receive the bitmask of play event flags indicating which callback events are enabled This must be non NULL See XA_PLAYEVENT macros Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL SetMarkerPosition XAresult SetMarkerPosition XAPlayItf self
432. scribed will cause a newODA callback Parameters self Interface self reference in Group to subscribe 0A 0 OB 1 1A 2 1B 3 useErrorCorrection in True to use the following error correction if the same data arrives twice within three data arrivals it is correct False not to use error correction Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID See also Get ODAGroup can be used to find out which group to subscribe if the AID Application Identification is known UnsubscribeODAGroup XAresult UnsubscribeODAGroup XARDSItf self XAint16 group Description Unsubscribes the given ODA group If the given group has not been subscribed this doesn t do anything Only new data in groups that have been subscribed will cause a newODA callback Interface self reference in Group to unsubscribe 0A 0 OB 1 1A 2 1B 3 Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID MypenMAX AL ListODAGroupSubscriptions XAresult ListODAGroupSubscriptions XARDSItf self XAint16 pGroups XAunit32 pLength Lists ODA groups that are currently subscribed Parameters Interface self reference pGroups out An array of the groups that are subscribed OA 0 OB 1 1A 2 1B 3 The length of the needed arra
433. scsssssssscssesssssssssccsnsssesesssnsssssnesscsecssosssssessessnesssssessessessossossnessssnessesooss 42 Del STANDARD UNITS ep re E cde Se ead haon NENESE ai sessssades see ates ovtestdvace dvs vasdssus ds han Tea geG seas ho neste bs taeees tes 42 D2 BASE TYPES csvccsscsccsdesccovecucsteosestcescesnevecencsntesgentssceseestssadacdinbones seus ceuchseiad vasdecawesiesacencotectsedeedsseucsdecdeesicvasdecs ses 42 COpenMAX AL 6 FUNCTIONS csssssssssssssssssesssssssssscssnsesscsensesscsensessssenssensssessensessscensnssscensnssscenensssesssusssesnssessessssessesessesseseseens 44 6 1 XACREATEENGINE 25 32 ion cit E ie bitten nae GN ee sage nen Ai bate ao eens 44 62 XAQUERYNUMSUPPORTEDENGINEINTERFACES sccccceesssceceesseeeceneececseeecsesaeeecseeecseaeeecseauececseneeeneseeeeesenaes 46 6 3 XAQUERYSUPPORTEDENGINEINTERFACES sne Ker EE EK Eae E Eaa EAK EN Er aaan 46 OBJECT DEFINITIONS siscscseassssasasessssvasessssvasecsnseasessasessnseasvssaseasvcsnseasossnseasocsnseaseosusensucsnsensacsnsunsecsnsensessasense 47 esl CAMERA VO DEVICE nania e a E E E E RE A A ai 48 Td ENGINE OBJECT nisnin E E E A R S EE eed EE A A E A aia 49 ded LEEDARRAYVODEVICE spirene anenee aana aao aea BHAR Aae E En EEEn Ea a aae aa et aana 51 TA MEDIA PLAYER OBJECT ruien e e a Ca Sh amh E E EA AT A sea A E A E ERER 52 go MEDARECORDER OBJECT seeto eeste on aise agas aois Bay uteesbedneesvectvduencaitesbedsekuevenstesss exbblecobasvadesedbetenseeseagedeate
434. secsseesseeseeessesseesseeeecesecesecesecaecaecsaecaaeeeseaeeeaees 387 9 1 35 XA Vendor StreamInfOrmation cccccccccccscccssccesscecssecssscecseceeccecsecseceecsecseceecsaecseceeesaeceeaeeenseceeeeeenaeens 387 9 1 36 AAV IDPADOSCHIPION vis sicesdeuctssccesstiassicckissazecaeenvieadevevan ana gha ch cbabiesidtenzacdovstesdasveviectanedbniaauasbesdisesseddss 388 9 1 37 XAVideoCodecDescriptor scesssecesecesnceeeseceeseecnsecesacecssecesaeecsaeceeaeecssecseaeecsaecseaeecsaeceeaeeeaeceeeeeeaeees 388 9 1 38 KMAV ideOS CtiNGS czectsdestevteasedivertGouy ian SSN e aor gas sae needs h vie E E hen teenie 389 9 1 39 KA Vid COStEGMIN OTMATION ois szessaessines sassassasiesntsuodssnsasenastuadadeibe se sviveds aeesepsuoed E 390 92 MACROS cis sags tei sece sag aca aR ANG ae 391 92 XA APIa eee she ge otal toes eda a cases desea EE gabe vue desks Sosee haeuaes choos seacenite O 39 O22 XAAPIENTRY sictisssstsscs ied bs ais tosescesabobetsggeceensattl eas todgesa ide tay diakencs tude Bi tegeekgeNestng REA 39 923 XA AUDIOCODE C criei E E E A casadeay beta encopiecsdoeineesasetoaee 39 9 2 4 XA_AUDIOPROFILE and XA_AUDIOMODE 00 cccecccescesseesseesseesseeseesnceseeeeeeeeeeseenseeesecuseensecnaesaeens 39 925 XA BOOLFAN sireeni a coud n ailgeaa as dana tabebaens a ao a Ea ea a E s Ea 397 9236 XALBYTE ORDER sacacoscste oer a a a R aa Ea E rae S E e a EOE EIERS 398 9 2 7 XA _ CAMERA_APERTUREMODE sesenseesseeesreesseeessesereesreeesneestseeneeesssees
435. sepia emboss paintbrush solarize red eye Y reduction cartoon and negative METADATA esc msn rendedmetaconeat YY EVENT AND ERROR NOTIFICATIONS CAPABILITY QUERIES COpenMAX AL i kikiki API Profile Feature Enumerate and query the capabilities of available input sources Enumerate and query the capabilities of available output destinations Query the API version number Query capabilities of the OpenMAX AL implementation MISCELLANEOUS Query the degree to which an OpenMAX AL implementation is based on OpenMAX IL Y Y none partial or full Minimum 16 bit PCM audio output 2 4 Optionality Rules of Features and Profiles In an effort to minimize confusion among developers and reduce fragmentation OpenMAX AL adheres to the following rules on features and profiles 1 All features within a profile are mandatory this is critical in assuring developers and implementers that if they pick a profile all the functionality representative of that profile will indeed be present Then applications written towards a specific profile will indeed be portable across OpenMAX AL implementations of that profile 2 A feature that does not fit in any of the profiles is considered to be an optional feature OpenMAX AL does not categorize optional features in any way to avoid a potentially confusing combinatorial explosion and effectively negating the benefits of the first rule Vendors are free to p
436. ses cases with audio ypenMAX AL i Appendix D Sample Code This appendix provides sample code illustrating how objects can be used together to support simple use cases The sample code shows how to use the API and is for purposes of illustration only it is not intended to provide realistic application code and these code fragments are not necessarily complete D 1 Audio Playback with Equalizer IE OpenMAX AL Audio Playback with Equalizer 2 include lt stdio h gt include lt stdlib h gt include lt OMXAL OpenMAXAL h gt define MAX NUMBER INTERFACES 5 J Global variasles Showlel be local in real ajyolli aienem XAObjectItf engine OpenMAX AL Engine XxXAObjectItf player XAObjectItf outputMix XAPlayItf jolleny Wie ag B XAEqualizerItf equalizerItf fs CMSCKS ror error Wir any errors exit the appolicaciomi void CheckErr XAresult res if res XA RESULT SUCCESS Debug printing to be placed here exil fe Draws single EQ band to the screen Called by drawEQDisplay f void drawEQBand int minFreq int maxFreq int level Insert drawing routines here for single EQ band Use GetBandLevelRange and screen height to map the level to screen a y coordinate Called when the display is repainted sf void drawEQDisplay void XAuintl6 numBands XAmillibel bandLevel XAmil
437. seseuctsscsiid G cestadea tanettawespsedic te siek Ges scedigtastbidessptadhenc sted aseedeess lees 407 KA COLOREORMAT rimia a E apcnstcest sssteaxs E EEE 409 XA CONTAINERTYPE naene an a A ER ag tytuatanabbediouevientetead es 412 XA DATAFORMAT norec E eag EE seta swe tvouboupetb tue esse reovedbeneyes 413 XA_DATALOCAT OR aoisage ninne e a E visag E E oh vesgtoneendees 414 XA DEFAULTDEVICEID cererii e E EE ts siivete saved satsteed deen E EEE 414 XA _DEVICECONNECTION ceisia teno pe E Ra A a AEE SEE GS RA E AERE ET 415 MA DEVICELOGCATION oirnne iee e E E EEE E cubby aie Neen A HG IsH I Ni 416 KA DEVICES COPE scsi icevstecizeasebitessvisdiancstidti E T wa eee ese 416 KA DOMAIN CY PEE vcsse sors soxssusatcay a canetoas cuteteap E EEEE 417 XA DYNAMIC ITF SEVENT icenian R E E s inn 417 XA ENGINE OPTION is scssvscsdeisebhibevssnusdedeaneisatcnaceseceaasdaateaies E a E E S 418 XA EQUALIZER oiciisots i na aE EN OERE E EAE NRE ORE E E ENN EE 419 XA FOCUSPOINIS cios esa in E E E A E E ERA 420 XA_FREORANGE cenoria e EE E EE N E EE S 423 XA AMAGE CODE GC sitia ia EE E shes E REN EE AAEE A NEEE EAE AaS 423 XA IMAGEEFFECGI iriri a E ROEE NEEE EESE E ENKEN NENE EES 424 COpenMAX AL l 9 2 38 9 2 30 9 2 40 9 2 41 9 2 42 9 2 43 9 2 44 9 2 45 9 2 46 9 2 47 9 2 48 9 2 49 9 2 50 9 2 51 9 2 52 9 2 53 9 2 54 9 2 55 9 2 56 9 2 57 9 2 58 9 2 59 9 2 60 9 2 61 9 2 62 9 2 63 9 2 64 XA _J
438. sets Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The presets are persistent and therefore all the preset slots contain always values Please note that in some devices it is possible to change the preset values also by using other mechanism than OpenMAX AL The initial values in a brand new device are implementation dependent ypenMAX AL i SetPreset XAresult SetPreset XARadioItf self XAuint32 preset XAuint32 freq XAuint8 range XAuint32 mode const XAchar pName Parameters Interface self reference preset in Index number of the preset Should be between 1 and the amount of presets returned by Get NumberOfPresets freq in Frequency to be stored to the preset Use Get FreqRangeProperties to query supported ranges first range in Frequency range to be stored to the preset See XA_FREQRANGE macros section for ranges Use IsFreqRangeSupported to query supported ranges first in Stereo mode to be stored to the preset in Name for the preset Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The presets are persistent and therefore all the preset slots contain always values Please note that in some devices it is possible to change the preset values also by using other mechanism than
439. sitions do not scale with changes in playback rate Parameters self in Interface self reference Pe Desired playback position in milliseconds relative to the beginning of content ypenMAX AL i SetLoop XAresult SetLoop XASeekItf self XAboolean loopEnable XAmillisecond startPos XAmillisecond endPos Ls Enables or disables looping and sets the start and end points of looping When looping is enabled and the playback head reaches the end position the player automatically sets the head to the start position and remains in the XA_PLAYSTATE_PLAYING state Setting a loop does not otherwise have any effect on the playback head even if the head is outside the loop at the time the loop is set Specified end position is greater than specified start position startPos in Position in milliseconds relative to the beginning of content specifying the start of the loop endPos in Position in milliseconds relative to the beginning of content specifying the end the loop endPos must be greater than startPos A value of XA_TIME_UNKNOWN denotes the end of the stream Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Parameters Interface self reference in Specifies whether looping is enabled true or disabled false If local looping is not supported this m
440. smitted to it across a network COpenMAX AL s 9 2 28 XA_DEVICELOCATION define XA_DEVLOCATION_HANDSET XAint16 0x0001 define XA_DEVLOCATION_HEADSET XAint16 0x0002 define XA_DEVLOCATION_CARKIT XAint16 0x0003 define XA_DEVLOCATION_DOCK XAint16 0x0004 define XA_DEVLOCATION_REMOTE XAint16 0x0005 These macros list the location of the I O device XA_DEVLOCATION_REMOTE I O device is in a remote location most likely connected via some kind of a network Although it might seem like XA_DEVLOCATION_REMOTE is redundant since it is currently used with only XA_DEVCONNECTION_NETWORK it is needed since none of the other device location macros fit a device whose connection type is XA_DEVCONNECTION_NETWORK 9 2 29 XA_DEVICESCOPE define XA_DEVSCOPE_UNKNOWN XAint16 0x0001 define XA_DEVSCOPE_ENVIRONMENT XAint16 0x0002 define XA DEVSCOPE USER XAint16 0x0003 These macros list the scope of the I O device with respect to the end user These macros help the application to make routing decisions based on the type of content such as audio being rendered For example telephony downlink will always default to a user audio output device unless specifically changed by the user a DEVSCOPE UNKNOWN I O device can have either a user scope or an environment scope or an as yet undefi
441. ss of control functionality for the specified list of interfaces ypenMAX AL i 8 26 XAOutputMixitf Description XAOutputMixIt f is an interface for interacting with an output mix including querying for the associated destination output devices registering for the notification of changes to those outputs and requesting changes to an output mix s associated devices This interface is supported on the Output Mix see section 7 7 object Prototype XA API extern const XAInterfaceID XA IID OUTPUTMIX struct XAOutputMixItf_ typedef const struct XAOutputMixItf_ const XAOutputMixItf struct XAOutputMixItf_ XAresult GetDestinationOutputDevicelIDs XAOutputMixItf self XAint32 pNumDevices XAuint32 pDeviceIDs XAresult RegisterDeviceChangeCallback XAOutputMixItf self xaMixDeviceChangeCallback callback void pContext XAresult ReRoute XAOutputMixItf self XAint32 numOutputDevices const XAuint32 pOutputDeviceIDs Interface ID ab3c9c00 de20 1 1df b8ef 0002a5d5c5 1b Defaults An output mix defaults to device ID values specific to the implementation COpenMAX AL Callbacks xaMixDeviceChangeCallback typedef void XAAPIENTRY xaMixDeviceChangeCallback XAOutputMixItf caller void pContext the application may query for the new set of devices via the XAOut putMixIt f interface Inter
442. ssed by the object This method affects asynchronous calls initiated from XAObjectItf or XADynamicInterfaceManagementItf only If no such call is being processed the call is ignored If a callback is registered it will be invoked with a XA_OBJEC XA_RE EV ENT_ASYNC_TER ESUL _OP ypenMAX AL INATION as event and ERATION_ABORTED as return code 238 Destroy void Destroy XAObjectItf self Description Preconditions Comments Destroys the object Destroy implicitly transfers the object through Unrealized state thus freeing any resources allocated to the object prior to freeing it All references to interfaces belonging to this object become invalid and may cause undefined behavior if used All pending asynchronous operations are aborted as if AbortAsyncOperations has been called SetPriority XAresult SetPriority XAObjectItf self XAuint32 priority Pre conditions Return value Set the object s priority None Interface self reference priority in The priority The valid range for this parameter is INT_MIN INT_MAX The smaller the number the higher the priority Zero is the highest priority The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Although it is possible to set any priority within the specified range XA_PRIORITY see section 9 2 57
443. steps Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_CONTROL_LOST Comments This method may return XA_RESULT_FEATURE_UNSUPPORTED if the specified device does not support changes to its volume The scale is always continuous and device specific It could be for example 0 15 if arbitrary volume steps are used or 32768 0 if millibels are used XAAudiolODeviceCapabilitiesItf XAOutputMixItf ypenMAX AL ir SetVolume XAresult SetVolume XADeviceVolumeItf self XAuint32 deviceID XAint32 volume Bi ai line Parameters Interface self reference lin Device identifier o volume in The new volume setting The valid range is continuous and its boundaries can be queried from GetVolumeScale method Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_CONTROL_LOST Comments The minimum and maximum supported volumes are device dependent This method may fail if the specified device does not support changes to its volume or the volume is outside the range supported by the device XAAudiolODeviceCapabilitiesItf XAOutputMixItf GetVolume XAresult GetVolume XADeviceVolumeItf self XAuint32 deviceID XAint32 pVolume pVolume out Pointer to a locat
444. stored media sources Another example usage is to display fill level percentage to the end user by using the callback and the GetFillLevel method Underflow Sufficient Data Overflow 1000 permille Figure 18 Prefetch continuum range This interface is an implicit interface of Media Player objects see section 7 4 Prototype XA_API extern const XAInterfaceID XA_IID_PREFETCHSTATUS struct XAPrefetchStatusItf _ typedef const struct XAPrefetchStatusItf_ const XAPrefetchStatusItf struct XAPrefetchStatusItf_ XAresult GetPrefetchStatus XAPrefetchStatusItf self XAuint32 pStatus XAresult GetFillLevel XAPrefetchStatusItf self XApermille pLevel COpenMAX AL k XAresult RegisterCallback XAPrefetchStatusItf self xaPrefetchCallback callback void pContext XAresult SetCallbackEventsMask XAPrefetchStatusItf self XAuint32 eventFlags XAresult GetCallbackEventsMask XAPrefetchStatusItf self XAuint32 pEventFlags XAresult SetFillUpdatePeriod XAPrefetchStatusItf self XApermille period XAresult GetFillUpdatePeriod XAPrefetchStatusItf self XApermille pPeriod Interface ID cceac0a0 f776 1 1db bb9c 0002a5d5c51b Defaults Initially there is no callback registered the fill update period is 100 permille and the event flags are clear Callbacks xaPrefetchCallback typedef void XAAPIENTRY xaPrefetchCallback XAPrefetchSta
445. systems support deallocating memory in a callback Please consult the target device s documentation An alternative is to perform the memory deallocation in the application s main thread and just notify the main thread from this callback inge masta me arce Claaie aucew XAObjectItf engine XAObjectItf player XAObjectItf recorder XAObjectItf camera XAPlayltt Jo eis lbigae 2 XASnapshotItf snapshotIitf XAMetadataInsertionItf metadataInsertionItf XAImageEncoderItf imageEncoderItf XACameraltf cameraltf XAEnginelItf engineltf camera XADataSource videoSource XADataLocator_IODevice cameraLocator viewfinder XADataSink videoSink XADataLocator_NativeDisplay displayLocator ypenMAX AL 7 In a real application get the native handles from the operating system XANativeHandle window 0 XANativeHandle display 0 is oucpoue tile XADataSink fileSink output directory and picture name pretiz XADataLocator_URI uri XADataFormat_MIME mime XAresult res XAImageSettings imageSettings XAMetadataInfo pKey XAMetadataInfo pValue cio sb XAboolean required MAX_NUMBER_INTERFACES XAInterfaceID iidArray MAX_NUMBER_INTERFACES CREATE AL ENGINE XAEngineOption EngineOption XAuint32 XA_ENGINEOPTION_THREADSAFE XAuint32 XA_BOOLEAN_TRUE
446. t QuerySupportedEffects or EnableImageEf fect can be called to determine if a specific effect is supported The image effects supported by a media object may not change during the lifetime of the media object A platform may allow effects to support optional sets of parameters that control that effect such as supplying a threshold or strength field These should be supplied using the configuration extensions interface see section 8 8 If XAImageEffectsItf is implemented it shall support at least one effect Prototype XA API extern const XAInterfaceID XA IID IMAGEEFFECTS struct XAImageEffectsItf_ typedef const struct XAImageEffectsItf_ const XAImageEffectsItf struct XAImageEffectsItf_ XAresult QuerySupportedIimageEffects XAImageEffectsItf self XAuint32 index XAuint32 pImageEffectId XAresult EnableImageEffect XAImageEffectsItf self XAuint32 imageEffectID XAresult DisableImageEffect XAImageEffectsItf self XAuint32 imageEffectID XAresult IsImageEffectEnabled XAImageEffectsItf self XAuint32 imageEffectID XAboolean pEnabled Interface ID b865bca0 df04 1 1db bab9 0002a5d5c51b ypenMAX AL Defaults Initially all effects are disabled Methods QuerySupportedImageEffects XAresult QuerySupportedImageEffects XAImageEffectsItf self XAuint32 index XAuint32 pImageEffectId Oueries image effects supported in Incre
447. t band returns 0 mHz as the minimum frequency and the highest band returns the ERTZ_MAX as the maximum frequency The application may pass NULL as one of the out parameters to find out only the other one s Comments returned here do not this is in order to simplify the applications that want to use this XA MILLIHI value ypenMAX AL 7 GetBand XAresult GetBand XAEqualizerItf self XAmilliHertz frequency XAuint16 pBand Description Gets the band that has the most effect on the given frequency If no band has an effect on the given frequency XA EOUALI2ER UNDEF INED is returned self Interface self reference in Frequency in milliHertz which is to be equalized via the returned band pBand out Frequency band that has most effect on the given frequency or XA_EQUALIZER_UNDEFINED if no band has an effect on the given frequency This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID GetCurrentPreset XAresult GetCurrentPreset XAEqualizerItf self XAuint16 pPreset Gets the current preset Parameters in Interface self reference pPreset out Preset that is set at the moment If none of the presets are set XA_EQUALIZER_UNDEFINED will be returned This must be non NULL Return value The return value can be one of the following
448. t is not used and shall be ignored The Traffic Programme has changed The event Data parameter for this event is not used and shall be ignored EW_ALARM The Alarm status has changed The event Data parameter for this event is not used and shall be ignored ypenMAX AL a 9 2 64 XA_RDSPROGRAMMETYPE The interpretation of values of this type depends on the origin of the RDS broadcast in North America a slightly different standard RBDS is used These PTY codes are defined by static values XA_RDSPROGRAMMETYPE_RBDSPTY_XXxX for example XA_RDSPROGRAMMETYPE_RBDSTYPE_SOFTROCK Elsewhere including Europe the RDS standard is used In these areas the PTY codes are defined by static values XA PROGRAMMETYPE RDSTYPE XXX for example XA_PROGRAMMETYPE_RDSPTY_CHILDRENSPROGRAMMES define XA_RDSPROGRAMMETYPE_RDSPTY_NONE XAuint32 0x00000000 define XA_RDSPROGRAMMETYPE_RDSPTY_NEWS XAuint32 0x00000001 define XA_RDSPROGRAMMETYPE_RDSPTY_CURRENTAFFAIRS XAuint32 0x00000002 define XA RDSPROGRAMMETYPE RDSPTY INFORMATION XAuint32 0x00000003 define XA RDSPROGRAMMETYPE RDSPTY SPORT XAuint32 0x00000004 define XA RDSPROGRAMMETYPE RDSPTY EDUCATION XAuint32 0x00000005 define XA_RDSPROGRAMMETYPE_RDSPTY_DRAMA XAuint32 0x00000006 define XA_RDSPROGRAMMETYPE_RDSPTY_CULTURE XAuint32 0x00000007
449. t is supplied when the callback method is registered success in True if the query was successful false if there is no data available with the given ODA Application ID group in Group OA 0 OB 1 1A 2 1B 3 1 if there is no data available with the given ODA Application ID in Message bits of the given ODA 16 bits Comments If the ODA uses both type A and B groups the callback will be executed twice once for each group type xaNewODA DataCallback typedef void XAAPIENTRY xaNewODADataCallback XARDSItf caller void pContext XAint16 group XAuint64 data New data from a subscribed ODA group has been received Parameters Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered stot Group 0A 0 0B 1 1A 2 1B 3 in data in Payload data 37 least significant bits for type A groups and 21 least significant bits for type B groups the rest of the bits will be zeros Comments None MypenMAX AL xaRDSCallback typedef void XAAPIENTRY xaRDSCallback XARDSIt caller void X pContext XAuint16 event XAuint8 eventData callback executes whenever at least one of the RDS fields changes The application should use RDSItf to query the new field values ller in Interface on which this callback was registered ontext User context data that is supplied when the callback method is regist
450. t the number of metadata keys available to the application Developers conversant with the standard metadata keys in each format can still specify exactly the keys they are interested in with the help of the Met adataExtractionItf The support for these Khronos keys is format dependent The following table lists the Khronos keys This list does not purport to be a comprehensive union of the standard keys in the various media formats On the contrary it is deliberately limited to the set of commonly used metadata items It should be considered as a baseline list Table 11 Khronos Keys KhronosTitle The title of the low level entity such as the name of the song book chapter image video clip KhronosAlbum The title of the high level entity such as the name of the song video image album the name of the book COpenMAX AL a KhronosComment Other comments on the media For example for images this could be the event at which the photo was taken etc Khronos ArtistURL A URL pointing to the artist s site KhronosContentURL A URL pointing to the site from which alternate versions of the content can be downloaded KhronosRating A subjective rating of the media KhronosAlbumArtJPEG Associated JPEG image such as album art The value associated with this key the image itself is in binary in one of several image formats KhronosAlbumArtPNG Associated PNG image such as album a
451. tDevicelIDs CheckErr res Search for integrated handsfree loudspeaker ror i Of 2 lt minMOwEjomESss L res AudiolODeviceCapabilitiesItf gt QueryAudiocOutputCapabilities AudiolODeviceCapabilitiesItf OutputDeviceIDs i amp AudioOutputDescriptor CheckErr res if AudioOutputDescriptor deviceConnection XA_DEVCONNECTION_INTEGRATED amp amp AudioOutputDescriptor deviceScope XA_DEVSCOPE_ENVIRONMENT amp amp AudioOutputDescriptor deviceLocation XA_DEVLOCATION_HANDSET hfs_deviceID OutputDevicelIDs il hfs_available XA_BOOLEAN_TRUE break If preferred output audio device is not available no point in continuing if hfs available Appropriate error message here Goalie Y 8 numOutputs MAX _NUMBER_OUTPUT_DEVICES res AudiolODeviceCapabilitiesItf gt GetDefaultAudioDevices AudiolODeviceCapabilitiesItf XA_DEFAULTDEVICEID_AUDIOOUTPUT amp numOutputs OutputDevicelDs COpenMAX AL CheckErr res Check whether Default Output devices include the handsfree loudspeaker ror i Of 1 lt MmMmOUToEsS Lia if OutputDeviceIDs i hfs_deviceID hfs_default XA_BOOLEAN_TRUE break Expect handsfree loudspeaker to be set as one of the default output devices if hfs_default Debug princing co ba pllacedmnetremcy exit 1 Initialize arrays required and iidArray f
452. tate is XA_PLAYSTAT m cleared ah __STOPPED the position is at the beginning of the content the update period is one second and there are no markers set nor callbacks registered and the callback event flags are 246 Callbacks xaPlayCallback typedef void XAAPIENTRY xaPlayCallback XAPlayItf caller void pContext XAuint32 event Description Notifies the player application of a playback event Parameters caller Interface on which this callback was registered pContext User context data that is supplied when the callback method is registered event in Indicates which event has occurred see XA PLAYEVENT macros Comments None See also RegisterCallback ypenMAX AL Methods SetPlayState XAresult SetPlayState XAPlayItf self XAuint32 state Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID XA RESULT PERMLSSLON DENLE XA RESULT CONTENT CORRUEPTI XA_RESULT_CONTENT_UNSUPPO Comments AJ state transitions are legal The state defaults to XA_PLAYSTATE_STOPPED Note that although the state change is immediate there may be some latency between the execution of this method and its effect on behavior In this sense a player s state technically represents the application s intentions for the player Note that the player s st
453. te seif seif Interface self reference The interface type ID FE ace out This should be a non NULL pointer to a variable of the interface s type for example if a XAObject It f is retrieved this parameter should be of type XAObjectItf type The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_PRECONDITIONS_VIOLATI If the object does not expose the requested interface type the return code will be XA_RESULT_FEATURE_UNSUPPORTED None MypenMAX AL K RegisterCallback XAresult RegisterCallback XAObjectItf self xaObjectCallback callback void pContext Description Registers a callback on the object that executes when a runtime error occurs or an asynchronous operation terminates Interface self reference Address of the result callback If NULL the callback is disabled Parameters self pContext in _ SUCCESS User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESUL XA_RESULT_PARAMETER_INVALID The callback will report only runtime errors and results of calls to asynchronous functions xaObjectCallback AbortAsyncOperation void AbortAsyncOperation XAObjectItf self Description Aborts asynchronous call currently proce
454. ted interface corresponding to the given index Must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The number of supported interfaces will include both mandated and optional interfaces available for the engine object See also xaQueryNumSupportedEngineInterfaces XAEnginelItf QueryNumSupportedInterfaces see section 8 13 MypenMAX AL 7 7 Object Definitions This section documents all the object types supported by the API Some object types are mandated to be supported only in a selection of the profiles Where this is the case the object s description will include a profile note stating this Each object type has a list of mandated interfaces that must be supported for that object type If the object type itself is not mandated if the implementation allows creation of objects of that type it must still support all the mandated interfaces for the object type The list of mandated interfaces may vary according to profile as documented in the profiles notes The mandated interface sections also documents whether an interface is implicit or must be supported dynamically Besides of the mandated interfaces an object is free to support any interfaces defined in this specification and any vendor specific interfaces However some interfaces specified in this specification make much more sense with a specific object typ
455. tf struct XAAudiolODeviceCapabilitiesItf_ XAresult GetAvailableAudioInputs XAAudiolODeviceCapabilitiesItf self XAint32 pNumInputs XAuint32 pInputDevicelIDs XAresult QueryAudioInputCapabilities XAAudiolODeviceCapabilitiesItf self XAuint32 devicelID XAAudioInputDescriptor pDescriptor XAresult RegisterAvailableAudioInputsChangedCallback XAAudioIODeviceCapabilitiesIt self xaAvailableAudioInputsChangedCallback callback void pContext XAresult GetAvailableAudioOutputs XAAudiolODeviceCapabilitiesItf self XAint32 pNumOutputs XAuint32 pOutputDeviceIDs XAresult QueryAudioOutputCapabilities XAAudiolODeviceCapabilitiesItf self XAuint32 devicelID XAAudioOutputDescriptor pDescriptor XAresult RegisterAvailableAudioOutputsChangedCallback XAAudiolODeviceCapabilitiesItf self xaAvailableAudioOutputsChangedCallback callback void pContext ypenMAX AL XAresult RegisterDefaultDeviceIDMapChangedCallback XAAudioIODeviceCapabilitiesIt self xaDefaultDeviceIDMapChangedCallback callback void pContext XAresult GetAssociatedAudiolInputs XAAudiolODeviceCapabilitiesItf self XAuint32 deviceID XAint32 pNumAudiolInputs XAuint32 pAudioInputDeviceIDs XAresult GetAssociatedAudioOutputs XAAudiolODeviceCapabilitiesItf self XAuint32 deviceID XAint32 pNumAudioOutputs XAuint32 pAudioOutputDeviceIDs XAresult GetDefau
456. that is there are no associated audio outputs This parameter is populated by the call with the array of output device IDs provided that pNumAudioOut puts is equal to or greater than the number of actual device IDs Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID XA_RESULT_BUFFER_INSUFFICIENT XA RESULT IO ERROR Comments This method can be called on both audio input and audio output devices It is useful for determining coupling of audio inputs and outputs on certain types of accessories For example it is helpful to know that microphone 01 is actually part of the same Bluetooth headset as speaker 03 Also many car kits have multiple speakers and multiple microphones Hence the need for an array of associated output devices For applications that both accept and render audio this method helps to determe whether an audio input and an audio output belong to the same physical accessory An audio device cannot be associated with itself So in the example above if this method were to be called with speaker 03 as the deviceID parameter it would return an empty array since there are no other outputs associated with speaker 03 on that Bluetooth headset If this method is called with the special device IDs XA_DEFAULTDEVICEID_AUDIOINPUT and XA_DEFAULTDEVICEID_AUDIOOUTPUT the result is undefined GetDefaultAudioDevices
457. the engine does not support the identified object this method will return XA_RESULT_FEATURE_UNSUPPORTED in index Incrementing index used to enumerate available interfaces Supported index range is 0 to N 1 where N is the number of supported interfaces pinterfaceld Identifies the supported interface Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The number of supported interfaces will include both mandated and optional interfaces available for the object QueryNumSupportediInterfaces QueryNumSupportedExtensions XAresult QueryNumSupportedExtensions XAEngineltf self XAuint32 pNumExtensions Oueries the number of supported extensions self in Interface self reference pNumExtensions out Identifies the number of supported extensions by this implementation Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Comments The number of supported extensions will include both standardized extensions listed in Khronos registry and vendor specific extensions QuerySupportedExtensions MypenMAX AL i OuerySupportedExtension XAresult QuerySupportedExtension XAEngineItf self XAuint32 index XAchar pExtensionName XAuint16 pNameLength I Gets the name of the extension supp
458. the engine object After creating the engine object the application can obtain this object s XAEnginelIt f interface This interface contains creation methods for all the other object types in the API To create an object process e Create and realize an engine object if one has not been created already e Obtain the XAEnginelIt f interface from this object e Call the appropriate object creation method of this interface e Ifthe call succeeds the method will return an XAOb ject It f interface of the new object e After working with the object call the Dest roy method of the XAObject It f to free the object and its resources For a complete and detailed specification of the engine object and the XAEnginelIt f interface type please refer to sections 7 2 and 8 11 respectively 3 1 6 The Relationship Between Objects and Interfaces The set of interfaces exposed by an object is determined by three factors e The object s type e The interfaces requested by the application during the object s creation e The interfaces added and removed by the application during the object s lifetime An object s type determines the set of interfaces that will always exist regardless of whether the application requests them or not These interfaces are called implicit interfaces and every object type has its own set of implicit interfaces that will exist on every object of this type The XAOb ject It f interface introduced in section 3
459. the engine though dynamic resource constraints may limit actual availability when an image decoder is requested This interface is a mandated interface of engine objects see section 7 2 Prototype XA_API extern const XAInterfaceID XA_IID_IMAGEDECODERCAPABILITIES struct XAImageDecoderCapabilitiesItf_ typedef const struct XAImageDecoderCapabilitiesItf_ const XAImageDecoderCapabilitiesItf struct XAImageDecoderCapabilitiesItf_ XAresult GetImageDecoderCapabilities XAImageDecoderCapabilitiesItf self XAuint32 pDecoderId XAImageCodecDescriptor pDescriptor XAresult QueryColorFormats const XAImageDecoderCapabilitiesItf self XAuint32 pIndex XAuint32 pColorFormat Interface ID c333e7a0 e616 lldc a93e 0002a5d5c51b Defaults Not applicable ypenMAX AL j Methods GetImageDecoderCapabilities XAresult GetImageDecoderCapabilities XAImageDecoderCapabilitiesItf self XAuint32 pDecoderId XAImageCodecDescriptor pDescriptor Retrieves image decoder capabilities Interface self reference Parameters pDecoderlId in out If pDescriptor is NULL pDecoderld returns the number of image decoders All implementations must have at least one decoder If pDescriptor is non NULL pDecoderld is a incrementing value used to enumerate image decoders Supported index range is 0 to N 1 where N is the number of image decoders Structure defining the capabilities of the image decoder
460. the number of supported bitrates is returned in numBitratesSupported numBitratesSupported Size of the pBit ratesSupported array Ignored if isBitrateRangeContinuous is XA_BOOLEAN_TRUE Profile supported See XA_AUDIOPROFILE defines see section 9 2 4 Level supported See XA_AUDIOMODE defines see section 9 2 4 streamFormat Stream format of the codec See XA_AUDIOSTREAMFORMAT defines see section 9 2 4 COpenMAX AL se 9 1 2 XAAudioEncoderSettings typedef struct XAAudioEncoderSettings_ XAuint32 XAuint32 XAuint32 encoderlId channelsIn channelsOut XAmilliHertz sampleRate XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 bitRate bitsPerSample rateControl profileSetting levelSetting channelMode streamFormat encodeOptions blockAlignment XAAudioEncoderSettings This structure is used to set the audio encoding parameters ee i profileSetting streamFormat encodeOptions blockAlignment the channelMode field the channe1Mode field overrides Audio samplerate of input audio data Bitrate of encoded data Bits per sample of input data Encoding rate control mode See XA_RATECONTROLMOD FE macros Profile to use for encoding See XA_AUDIOPROF ILE macros Level to use for encoding See XA_AUDIOMODE macros Channel mode for encoder See XA_AUDIOCHANMODE macros Format of encoded bit stream For
461. tion 7 6 Prototype XA_API extern const XAInterfaceID XA IID STREAMINFORMATION struct XAStreamInformationItf _ typedef const struct XAStreamInformationItf_ const XAStreamInformationIitf struct XAStreamInformationItf_ XAresult QueryMediaContainerInformation XAStreamInformationItf self XAMediaContainerInformation pInfo XAresult QueryStreamType XAStreamInformationItf self XAuint32 streamIndex XAuint32 pDomain XAresult QueryStreamInformation XAStreamInformationItf self XAuint32 streamIndex void pInfo XAresult QueryStreamName XAStreamInformationItf self XAuint32 streamIndex XAuint16 pNameSize XAchar pName XAresult RegisterStreamChangeCallback XAStreamInformationItf self xaStreamEventChangeCallback callback void pContext XAresult QueryActiveStreams XAStreamInformationItf self XAuint32 pNumStreams XAboolean pActiveStreams ypenMAX AL XAresult SetActiveStream XAStreamInformationItf self XAuint32 streamNum XAboolean active XAboolean commitNow Interface ID 75e0e2a0 d7 1d 1 1df 8c92 0002a5d5c51b Callbacks xaStreamEventChangeCallback typedef void XAAPIENTRY xaStreamEventChangeCallback XAStreamInformationItf caller XAuint32 eventId XAuint32 streamIndex void pEventData void pContext Description Executes whenever a stream event has changed Upon this notification the applicatio
462. tion Los Angeles CA USA December 2001 Information Technology Open Systems Interconnection Procedures for the operation of OSI Registration Authorities Generation and Registration of Universally Unique Identifiers UUIDs and their Use as ASN 1 Object Identifier Components ITU T Rec X 667 ISO IEC 9834 8 2004 Open Sound Library for Embedded Systems OpenSL ES Application Programming Interface Specification Khronos Group COpenMAX AL D Appendix B Glossary of RDS Terms This glossary is informative not normative Please see the RDS specification for accurate definitions of these terms Alternate Frequency Information about other frequencies broadcasting the same programme Clock Time and date Current time and date I Enhanced Other Information about other programme services and their content Networks information Open Data Usages of RDS technology that are not explicitly specified by the RDS Application standard Programme The PI is not meant to directly display to the end user but to uniquely identify Identification code a programme This can be used for operations such as detecting that two frequencies are transmitting the same programme Programme TYpe code A code that specifies the current programme type Radio Text Text transmission RT gives access to specific elements RT content type classes of Radio Text messages Examples are song title news studio te
463. tion 8 21 for the definitions of the Khronos keys In this regard three important scenarios are worth considering Scenario 1 Some of the Khronos keys do not have an equivalent standard metadata key in the media format under consideration Just those Khronos keys for which there exists a mapping to the standard keys of the media can be available for writing and are exposed via method GetKeys ypenMAX AL i Scenario 2 The application is interested in metadata keys that are not part of the list of Khronos keys The application has the option of ignoring the Khronos keys entirely and directly specifying exactly those standard metadata keys that it is interested in keeping in mind what Get Keys method lists about their availability Scenario 3 The application s metadata key list of interest is a proper superset of the Khronos key list The application has the option of ignoring the Khronos key list entirely as in Scenario 2 or it can use the Khronos key list and supplement it by writing by the extra format specific standard keys directly takin into account what keys Get Keys method describes to be available for writing The encoding of the associated values to Khronos keys must be in one of the string encodings with an exception that the values associated with KhronosAlbumArtJPEG and KhronosAlbumArtPNG keys have to be in encoding XA_CHARACTERENCODING_BINARY If this rule is not followed when Khronos keys are used for metadata
464. tionLimit XAresult SetDurationLimit XARecordItf self XAmillisecond msec Sets the duration of current content in milliseconds Parameters lin flin Interface self reference tin tiny N on 7ero limit on the duration of total recorded content in milliseconds Return value The return value can be one of the following XA RESULT SUCCESS XA_RESULT_PARAMETER_INVALID Comments When the recorder reaches the limit it automatically transitions to the XARECORDSTATE_STOPPED state and notifies the application via the XARECORDEVENT_HEADATLIMIT event GetPosition XAresult GetPosition XARecordItf self XAmillisecond pMsec I Returns the current position of the recording head relative to the beginning of content Pre conditions None Parameters self e self EI fin Interface self reference Pointer to a location to receive the position of the recording head relative to the beginning of the content expressed in milliseconds This must be non NULL Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID The position is synonymous with the amount of recorded content ypenMAX AL RegisterCallback XAresult RegisterCallback XARecordiItf self xaRecordCallback callback void pContext Registers the record callback function Parameters
465. torType XA_DATALOCATOR_URI uri pURI achar tdles musie way mime formatType XA_DATAFORMAT_ MIME mime pMimeType XAchar audio x wav mime containerType XA_CONTAINERTYPE_WAV audioSource pLocator void G amp uri audioSource pFormat void amp mime f SSW cle GAA SiiMdk serue turek locator_outputmix locatorType XA_DATALOCATOR_OUTPUTMIX locator_outputmix outputMix outputMix audioSink pLocator void amp locator_outputmix audioSink pFormat NULL Set arrays required and iidArray for no interfaces PlayItf is imoliciw m required 0 XA_BOOLEAN_FALSE iidArray 0 XA_ITID_NULL required 1 XA_BOOLEAN_FALSE indArray mi XA_TID_NULL ypenMAX AL i Create the music player res Engineltf gt CreateMediaPlayer EnginelItf amp player amp audioSource NULL amp audioSink NULL NULL NULL 0 iidArray required CheckErr res Realizing the player in synchronous mode res player gt Realize player XA_BOOLEAN_FALSE CheckErr res fs Get thae play intertace res player gt GetInterface player SGA IID PIA KYOalcl Gjollenyinci p a enee kE ETIE SSI Before we start set volume to 3dB 300mB and enable equalizer res volumelItf gt SetVolumeLevel volumeitf 300 CheckErr res res equalizerItf gt SetEnabled equalizerItf XA_BOOLEAN_ TRUE C
466. turned when a preset has been set but the equalizer settings have been altered later with Set BandLevel Presets have names that can be used in the user interface There are methods for getting and setting individual EQ band gains Set BandLevel and Get BandLevel methods for querying the number of the EQ bands available Get NumberOfBands and methods for querying their center frequencies Get CenterFreq The gains in this interface are defined in millibels hundredths of a decibel but it has to be understood that many devices contain a Dynamic Range Control DRC system that will affect the actual effect and therefore the value in millibels will affect as a guideline rather than as a strict rule This interface affects different parts of the audio processing chain depending on which object the interface is exposed If this interface is exposed on an Output Mix object the effect is applied to the output mix If this interface is exposed on a Player object it is applied to the Player s output only This interface is supported on the Output Mix see section 7 7 object See section D 1 for an example using this interface Prototype XA API extern const XAInterfaceID XA IID EQUALIZER struct XAEqualizerItf_ typedef const struct XAEqualizerItf_ const XAEqualizerItf struct XAEqualizerItf_ XAresult SetEnabled XAEqualizerItf self XAboolean enabled XAresult IsEnabled
467. tusItf caller void pContext XAuint32 event Notifies the player application of a prefetch event Parameters Interface on which this callback was registered User context data that is supplied when the callback method is registered Event that has occurred See XA_PRE ENT macros in section 9 2 55 RegisterCallback ypenMAX AL D Methods GetPrefetchStatus XAresult GetPrefetchStatus XAPrefetchStatusItf self XAuint32 pStatus Gets the player s current prefetch status None pstatus Return value The return value can be one of the following in out Interface self reference Pointer to a location to receive the current prefetch status of the player The status returned is of the XA_PREFETCHSTATUS defines see section 9 2 56 This must be non NULL XA_RESUL _SUCC XA_RESUL GetFillLevel ESS _PARAI XAresult GetFillLevel XAPrefetchStatusItf self XApermille pLevel Oueries the fill level of the prefetch KT FR INVALILD Interface self reference pLevel out Pointer to a location to receive the data fill level in parts per thousand This must be non NULL _SUCC _PARA ESS ET ER_INVALID Return value The return value can be one of the following XA_RESUL XA RESUL Comments The fill level is not tied to specific buffer within a player but
468. ty when a camera is requested This interface is a mandated interface of engine objects see section 7 2 COpenMAX AL 113 Prototype XA API extern const XAInterfaceID XA IID CAMERACAPABILITIES struct XACameraCapabilitiesItf_ typedef const struct XACameraCapabilitiesItf_ const XACameraCapabilitiesItf struct XACameraCapabilitiesItf_ XAresult GetCameraCapabilities XACameraCapabilitiesItf self XAuint32 pIndex XAuint32 pCameraDevicelID XACameraDescriptor pDescriptor XAresult QueryFocusRegionPatterns XACameraCapabilitiesIt self XAuint32 cameraDevicelID XAuint32 pPatternID XAuint32 pFocusPattern XAuint32 pCustomPoints1 XAuint32 pCustomPoints2 XAresult GetSupportedAutoLocks XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAuint32 pNumCombinations XAuint32 pLocks XAresult GetSupportedFocusManualSettings XACameraCapabilitiesIt self XAuint32 cameraDevicelID XAboolean macroEnabled XAmillimeter pMinValue XAmillimeter pMaxValue XAuint32 pNumSettings XAmillimeter pSettings XAresult GetSupportedISOSensitivitySettings XACameraCapabilitiesItf self XAuint32 cameraDevicelID XAuint32 pMinValue XAuint32 pMaxValue XAuint32 pNumSettings XAuint32 pSettings XAresult GetSupportedApertureManualSettings XACameraCapabilitiesIt self XAuint32 cameraDevicelID XAuint32 pMinValue XAuint32 pMaxValue XA
469. ues given by XACameraCapabilitiesItf GetSupportedAutoLocks Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID A lock doesn t have any effect if the corresponding setting is in manual mode Seen GetAutoLocks XAresult GetAutoLocks XACameraItf self XAuint32 pLocks This method gets the current state of the automatic camera setting locks Parameters The camera interface pLocks out A bitwise OR of the settings that are currently locked See XA_CAMERA LOCK macros for different locks Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID Seda ypenMAX AL i Set oom XAresult SetZoom XACameraItf self XApermille zoom XAboolean digitalEnabled XAuint32 speed XAboolean async Sets the new zoom factor digitalEnabled in If XA_BOOLEAN_TRUE digital zoom and optical zoom is used otherwise only optical zoom is used speed in Hints the zooming speed Accepted values are XA_CAMERA_ZOOM_SLOW XA_CAMERA_ZOOM_NORMAL XA_CAMERA_ZOOM_FAST and XA_CAMERA_ZOOM_FASTEST This parameter is a hint and the exact actual zooming speed is implementation dependent The exact speed might also be different when shooting video or still images sy
470. uint32 pNumSettings XAuint32 pSettings COpenMAX AL H XAresult GetSupportedShutterSpeedManualSettings XACameraCapabilitiesIt self XAuint32 cameraDevicelID XAmicrosecond X pMinValue XAmicrosecond pMaxValue XAuint32 pNumSettings XAmicrosecond pSettings XAresult GetSupportedWhiteBalanceManualSettings XACameraCapabilitiesItf self XAuint32 XAuint32 XAuint32 XAuint32 XAuint32 XAresult GetSupportedZoomSettings XACameraCapabilitiesItf self cameraDevicelID pMinValue pMaxValue pNumSettings pSettings XAuint32 cameraDevicelID XAboolean digitalEnabled XAboolean macroEnabled XApermille pMaxValue XAuint32 pNumSettings XApermille pSettings XAboolean pSpeedSupported Interface ID 3af32780 d6db 1 1df bda5 0002a5d5c51b Defaults Not applicable Methods ypenMAX AL 115 GetCameraCapabilities XAresult GetCameraCapabilities XACameraCapabilitiesItf self XAuint32 pIndex XAuint32 pCameraDevicelID XACameraDescriptor pDescriptor Oueries the camera device for its capabilities pIndex in out As an input specifies which camera device to obtain the capabilities of the supported range is O n where n is the number of camera devices available If pDescriptor is NULL then as an output specifies the number of camera devices available in the system Returns 0 if no camera devices ar
471. umber of encoders available Returns 0 if there are no encoders in out If pEncoderIds is NULL pNumEncoders returns the If pEncodersIds is non NULL as an input pNumEncoders specifies the size of the pEncoderIds array and as an output it specifies the number of encoder IDs available within the Parameters Interface self reference Encoders i pEncoderlds out Array of XA AUD ER_INVALI pEncoderIds array audio encoders provided by the engine Refer to IOCODEC macros D ER_INSUFFICIENT Comments PROFILE NOTES A Media Player Recorder profile implementation must support at least one encoder a7 ypenMAX AL EncoderCapabilities 73 GetAudioEncoderCapabilities XAresult GetAudioEncoderCapabilities XAAudioEncoderCapabilitiesIt self XAuint32 encoderId XAuint32 pIndex XAAudioCodecDescriptor pDescriptor Queries for the audio encoder s capabilities Parameters Self Interface self reference encoderld in Identifies the supported audio encoder Refer to XA_AUDIOCODEC macros pindex in out If pDescriptor is NULL pIndex returns the number of capabilities structures one per profile mode pair of the decoder Each encoder must support at least one profile mode pair and therefore have at least one Codec Descriptor If pDescriptor is non NULL pIndex is an incrementing value used for enumerating capabilities structures Supported index range is
472. upported In this case the application must call Get RateRange multiple times to query all the ranges Get RateRange returns only one range per call ypenMAX AL z Rate range 1 Rate range 2 Rate range 3 IX 2X 3X Rate range examples Range 1 has a min of 4000 a max of 2000 and a step of 500 Range 2 has a min of 2000 a max of 2000 and a step of 0 Range 3 has a min of 2000 a max of 4000 and a step of 500 COpenMAX AL z 8 29 XAPrefetchStatusitf Description XAPrefetchStatusItf is an interface for querying the prefetch status of a player The prefetch status is a continuum ranging from no data prefetched to the maximum amount of data prefetched It includes a range where underflow may occur and a range where there is a sufficient amount of data present The underflow and sufficient data ranges may not relate to fixed fill level positions but be implementation dependent and dynamically vary based on factors as e g buffering length consumption rate communication latency hysteresis etc The prefetch status interface allows an application to query for prefetch status or register prefetch status callbacks The latency of status and fill level callbacks are implementation dependent One example usage of the XAPrefetchStatusItf is to order the player into paused state when receiving an underflow event and into play state when receiving a sufficient data event when playing network
473. urn value The return value can be one of the following XA_RESULT_SUCC XA_RESULT_PARAMETER_INVALID XA_RESULT_BUFFER_INSUFFICIENT XA RESULT IO ERROR QueryAudiolnputCapabilities OueryAudioOutputCapabilities COpenMAX AL i 8 6 XACameraltf Description The camera interface is used for querying and changing the settings of a camera I O device This interface is implicit on the camera I O device object see section 7 1 See XASnapshot It f see section 8 33 for a typical photographing call sequence example See section D 5 for an example using this interface Prototype XA_API extern const XAInterfaceID XA_IID CAMERA struct XACameraItf_ typedef const struct XACameraItf_ const XACameralItf struct XACameraItf_ XAresult RegisterCallback XACameraItf self xaCameraCallback callback void pContext XAresult SetFlashMode XACameraItf self XAuint32 flashMode XAresult GetFlashMode XACameraItf self XAuint32 pFlashMode XAresult IsFlashReady XACameraItf self XAboolean pReady XAresult SetFocusMode XACameraItf self XAuint32 focusMode XAmillimeter manualSetting XAboolean macroEnabled XAresult GetFocusMode XACameraItf self XAuint32 pFocusMode XAmillimeter pManualSetting XAboolean pMacroEnabled ypenMAX AL 89 XAresult SetFocusRegionPattern XACameraItf self XAui
474. vateLEDArray XA_BOOLEAN_TRUE ActivateLEDArray XA BOOLEAN FALSE Destroy Destroy Figure 15 XALEDArrayltf state model This interface is supported on the LED Array see section 7 3 object Prototype XA API extern const XAInterfaceID XA IID LED struct XALEDArrayItf_ typedef const struct XALEDArrayItf_ const XALEDArrayItf struct XALEDArrayItf_ XAresult XALE XAui XAresult ActivateLEDArray DArrayItf self nt32 lightMask IsLEDArrayActivated XALEDArrayItf self XAui XAresult nt32 pLightMask SetColor XALEDArrayItf self XAui nt8 index const XAHSL pColor XAresult GetColor XALEDArrayItf self XAuint8 index XAHSL pColor ypenMAX AL 197 Interface ID a534d920 f775 11db 8b70 0002a5d5c5 1b Defaults Initially all LEDs are in the off state Default color is undefined Methods ActivateLEDArray XAresult ActivateLEDArray XALEDArrayItf self XAuint32 lightMask Activates or deactivates individual LEDs in an array of LEDs lightMask in Bit mask indicating which LEDs should be activated or deactivated Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RE iT _ PARAMETER_INVALID XA_RE iT _CONTROL_LOST Comments Valid bits in 1ightMask range from the least significant bit which indicates the first LED in the array to
475. ve rules 3 6 Extensibility 3 6 1 Principles The OpenMAX AL API was designed with extensibility in mind An extended API is defined as one that provides functionality additional to that defined by the specification yet considered still conforming to the specification The main principles of the extensibility mechanism are e Any application written to work with the standard API will still work unchanged on the extended API e For an application that makes use of extensions it will be possible and simple to identify cases where these extensions are not supported and thus to degrade its functionality gracefully Possible extensions may include vendor specific extensions as well as future versions of OpenMAX AL 3 6 2 Permitted Modifications to Physical Code The OpenMAX AL header files shall be edited only for the following purpose e To amend definitions of types for example 32 bit signed integers such that they have correct representation Any vendor specific extensions to the API shall reside in header files other than the OpenMAX AL header files 3 6 3 Extending Supported Interface Types An extended API may introduce new interface types and expose these interfaces on either existing object types or on extended object types see section 3 6 4 An extended API may also expose standard interfaces on standard extended object types that do not normally require exposing these interfaces COpenMAX AL The extended interf
476. video encoder capabilities This interface is a mandated interface on this object XAThreadSynclitf see section 8 36 This interface exposes methods for entering and exiting critical section This interface is a mandated interface on this object Applicable Optional Interfaces XADeviceVolumeltf see section 8 9 This interface controls audio input and output device specific volumes XAConfigExtensionsltf see section 8 8 This interface can be used to get and set parameters for any AL object in a vendor specific manner ypenMAX AL 50 7 3 LED Array I O Device Description The LED array I O device object encapsulates and controls a set of LEDs Its functionality covers setting LED color activating and deactiving LEDs PROFILE NOTES This object is a standardized extension and consequently optional in all profiles Mandated Interfaces XAObjectitf see section 8 25 This interface exposes basic object functionality This interface is an implicit interface on this object XALEDArrayltf see section 8 20 This interface exposes all LED capabilities for a LED array ODevice This interface is an implicit interface on this object XADynamiclInterfaceManagementltf see section 8 10 This interface is used for adding dynamic interfaces see section 3 1 6 to the object This interface is an implicit interface on this object Applicable Optional Interfaces XAConfigExtensionsltf see section 8 8 Thi
477. white balance modes supported See HI TEBALANCEMODE macros formatType The format type which must always be XA_DATAFORMAT_MIME for this structure pMimeType The mime type of the data expressed as a string containerType The container type of the data When an application uses this structure to specify the data source for a player use case the application may leave the containerType unspecified for example XA_CONTAINI ERTYP E_UNSPI ECIFII ED or may provide a specific value as a hint to the player When an application uses this structure to specify the data sink for a recorder use case the application is dictating the container type of the captured content 9 1 8 XADataFormat_PCM NOTE This structure is deprecated Use XADataFormat_PCM_EX instead ypenMAX AL 372 typedef struct XADataFormat_PCM_ XAuint32 formatType XAuint32 numChannels XAuint32 samplesPerSec XAuint32 bitsPerSample XAuint32 containerSize XAuint32 channelMask XAuint32 endianness XADataFormat_PCM Fields include formatType The format type which must always be XA_DATAFORMAT_PC for this structure numChannels Numbers of audio channels present in the data Multi channel audio is always interleaved in the data buffer samplesPerSec The audio sample rate of the data Note This is in milliHertz and not Hertz as the field name would suggest bitsPerSample Number of actual data bits i
478. with the same AF and or EON fields Description Sets the automatic swi PI presence Based on Please note that NOT ALL IMPLEMENTATIONS SUPPORT THIS FUNCTIONALITY Parameters in Interface self reference True to turn on the automatic switching false to turn it off Return value The return value can b e one of the following XA RESULT SUCCI ESS GetAutomaticSwitching XAresult GetAutomaticSwitching XARDSItf self XAboolean pAutomati c Description Gets the mode of the automatic switching of the transmitter in case of a stronger transmitter with the same PI presence pAutomatic True if the automatic switching is on false otherwise Return value The return value can b e the following XA_RESULT_SUCC ESS XA_RESULT_PARA ETER_INVALID ypenMAX AL 295 SetAutomaticTrafficAnnouncement XAresult SetAutomaticTrafficAnnouncement XARDSItf self XAboolean automatic Description Sets the automatic switching of the program in case of the presence of Traffic Announcement in another program Based on TP and TA fields Please note that NOT ALL IMPLEMENTATIONS SUPPORT THIS FUNCTIONALITY Parameters Interface self reference in True to turn on the automatic switching false to turn it off Return value The return value can be one of the following XA_RESULT_SUCCESS GetAutomaticTrafficAnnouncement XAresult GetAutom
479. y should be first figured out from pLength out parameter by calling this method with pGroups as null pLength in out As an output specifies the length of the groups array That is the number of subscribed groups As an input specifies the length of the given pGroups array ignored if pGroups is NULL Return value The return value can be one of the following XA_RESULT_SUCC XA_RESULT_PARAMETER_INVALID XA_RESULT_BUFFER_INSUFFICIENT Comments If the given length is smaller than the needed size XA_RESULT_BUFFER_INSUFFICIENT is returned and only data of the given size will be written RegisterODA DataCallback XAresult RegisterODADataCallback XARDSItf self xaNewODADataCallback callback void pContext Sets or clears the xaNewODADataCallback xaNewODADataCallback is used tranfer the actual ODA data to the application lback Address of the callback in User context data that is to be returned as part of the callback method Return value The return value can be one of the following XA_RESULT_SUCCESS XA_RESULT_PARAMETER_INVALID ypenMAX AL RegisterRDSCallback XAresult RegisterRDSCallback XARDSItf self xaRDSCallback callback void pContext Description Sets or clears the xaRDSCallback xaRDSCallback is used to monitor changes in RDS fields Parameters EE in Interface self reference
480. yProgrammeType XARDSItf self XAuint32 pty XAboolean upwards Description Seeks for the frequency sending the given Programme TYpe PTY If the end of the tuner s frequency band is reached before the given Programme TYpe is found the scan continues from the other end until the given Programme TYpe is found or the original frequency is reached Asynchronous tuner callback xaRadioCallback and XA_RADIO_EVENT_SEEK_COMPLETED is used for notifying of the result StopSeeking method of XARadioltf can be used to abort an ongoing seek Parameters Interface self reference i i Programme TYpe to seek for XA_RESULT_PARAMETER_INVALID is returned if pty parameter is not following the RDS specification upwards in If true the seek progresses towards higher frequencies and if false the seek progresses towards lower frequencies Return value The return value can be one of the following XA RESULT SUCCESS XA RESULT PARAMETER INVALID ypenMAX AL i SeekTrafficA nnouncement XAresult SeekTrafficAnnouncement XARDSItf self XAboolean upwards ET Seeks for a frequency sending Traffic Announcement TA If the end of the tuner s frequency band is reached before a Traffic Announcement is found the scan continues from the other end until a Traffic Announcement is found or the original frequency is reached Asynchronous tuner callback xaRadioCa
481. ysical audio devices represented by the device IDs is implementation dependent The application can choose to be notified of the implementation induced changes to this mapping by registering for the xal See Also RegisterDefaultDeviceID GetAssociatedAudiolInputs ypenMAX AL apChangedCallback GetAssociatedAudioOutputs 87 QuerySampleFormatsSupported XAresult QuerySampleFormatsSupported XAAudiolODeviceCapabilitiesItf self XAuint32 deviceID XAmilliHertz samplingRate XAint32 pSampleFormats XAint32 pNumOfSampleFormats Description Gets an array of sample formats supported by the audio I O device for the given sampling rate The rationale here is that an audio I O device might not support all sample formats at all sampling rates Therefore it is necessary to query the sample formats supported for each sampling rate of interest samplingRate in Sampling rate for which the sampling formats are to be determined pSampleFormats Array of sample formats supported as defined in the XA_PCMSAMPLEFORMAT macros This parameter is populated by the call with the array of supported sample formats provided that pNumOfSampleFormats is equal to or greater than the number of actual sample formats pNumOfSampleFormats in out As an input specifies the length of the pSampleFormats array ignored if pSampleFormats is NULL As an output specifies the number of sample formats supported Ret

Download Pdf Manuals

image

Related Search

Related Contents

warning  Télécharger ce livre gratuitement  Manual de instrucciones  CONTROLLED ENVIRONMENT CHAMBER  VTH15 Series User`s Manual  PDF - Powerjet Engineering  

Copyright © All rights reserved.
Failed to retrieve file