201017
authorhgs
Fri, 30 Apr 2010 19:18:45 -0500
changeset 19 4a629bc82c5e
parent 14 80975da52420
child 20 b67dd1fc57c5
201017
khronosfws/openmax_al/bwins/openmaxalu.def
khronosfws/openmax_al/data/openmaxal.cfg
khronosfws/openmax_al/eabi/openmaxalu.def
khronosfws/openmax_al/group/bld.inf
khronosfws/openmax_al/group/openmaxal.mmp
khronosfws/openmax_al/inc/openmaxalwrapper.h
khronosfws/openmax_al/inc/profileutilmacro.h
khronosfws/openmax_al/rom/openmax_al.iby
khronosfws/openmax_al/sis/openmax_al.pkg
khronosfws/openmax_al/sis/openmax_al_udeb.pkg
khronosfws/openmax_al/sis/openmax_al_urel.pkg
khronosfws/openmax_al/src/adptcommon/xaadptbasectx.c
khronosfws/openmax_al/src/adptcommon/xaadptbasectx.h
khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.c
khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.h
khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c
khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.h
khronosfws/openmax_al/src/camera/xacameradevice.c
khronosfws/openmax_al/src/camera/xacameradevice.h
khronosfws/openmax_al/src/camera/xacameraitf.c
khronosfws/openmax_al/src/camera/xacameraitf.h
khronosfws/openmax_al/src/common/openmaxal.c
khronosfws/openmax_al/src/common/xacommon.c
khronosfws/openmax_al/src/common/xaconfigextensionsitf.c
khronosfws/openmax_al/src/common/xaconfigextensionsitf.h
khronosfws/openmax_al/src/common/xadynamicsourceitf.c
khronosfws/openmax_al/src/common/xadynamicsourceitf.h
khronosfws/openmax_al/src/common/xaequalizeritf.c
khronosfws/openmax_al/src/common/xaequalizeritf.h
khronosfws/openmax_al/src/common/xaglobals.h
khronosfws/openmax_al/src/common/xaimagecontrolsitf.c
khronosfws/openmax_al/src/common/xaimagecontrolsitf.h
khronosfws/openmax_al/src/common/xaimageeffectsitf.c
khronosfws/openmax_al/src/common/xaimageeffectsitf.h
khronosfws/openmax_al/src/common/xametadataextractionitf.c
khronosfws/openmax_al/src/common/xametadataextractionitf.h
khronosfws/openmax_al/src/common/xametadatatraversalitf.c
khronosfws/openmax_al/src/common/xametadatatraversalitf.h
khronosfws/openmax_al/src/common/xanlinearvolumeitf.h
khronosfws/openmax_al/src/common/xanokialinearvolume_iid.c
khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c
khronosfws/openmax_al/src/common/xanokiavolumeext_iid.c
khronosfws/openmax_al/src/common/xanokiavolumeextitf.c
khronosfws/openmax_al/src/common/xanvolumeextitf.h
khronosfws/openmax_al/src/common/xaobjectitf.c
khronosfws/openmax_al/src/common/xaobjectitf.h
khronosfws/openmax_al/src/common/xaobjects.h
khronosfws/openmax_al/src/common/xastreaminformationitf.c
khronosfws/openmax_al/src/common/xastreaminformationitf.h
khronosfws/openmax_al/src/common/xavideopostprocessingitf.c
khronosfws/openmax_al/src/common/xavideopostprocessingitf.h
khronosfws/openmax_al/src/common/xavolumeitf.c
khronosfws/openmax_al/src/common/xavolumeitf.h
khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.h
khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.c
khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.h
khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.c
khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.h
khronosfws/openmax_al/src/engine/xadevicevolumeitf.c
khronosfws/openmax_al/src/engine/xadevicevolumeitf.h
khronosfws/openmax_al/src/engine/xaengine.c
khronosfws/openmax_al/src/engine/xaengine.h
khronosfws/openmax_al/src/engine/xaengineitf.c
khronosfws/openmax_al/src/engine/xaengineitf.h
khronosfws/openmax_al/src/engine/xaimagedecodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xavideodecodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xavideoencodercapabilitiesitf.c
khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c
khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.h
khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xacameraitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xacameraitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xadevicevolumeitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xadevicevolumeitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xadynamicsourceitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xadynamicsourceitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaengineadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xaengineadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xaequalizeritfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaequalizeritfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.c
khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.h
khronosfws/openmax_al/src/gst_adaptation/xaimagecontrolsitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaimagecontrolsitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaimageeffectsitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaimageeffectsitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaimageencoderitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaimageencoderitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaledarrayadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xaledarrayadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xaledarrayitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaledarrayitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xamediaplayeradaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xamediaplayeradaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xametadataadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xametadataadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xaoutputmixadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xaoutputmixadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xaoutputmixitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaoutputmixitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaplaybackrateitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaplaybackrateitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaplayitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaplayitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaradioadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xaradioadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xaradioitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaradioitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xaseekitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaseekitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xasnapshotitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xasnapshotitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xastaticcameracapsadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xastaticcameracapsadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xavibraadaptctx.c
khronosfws/openmax_al/src/gst_adaptation/xavibraadaptctx.h
khronosfws/openmax_al/src/gst_adaptation/xavibraitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xavibraitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xavideoencoderitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xavideoencoderitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xavideopostprosessingitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xavideopostprosessingitfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xavolumeitfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xavolumeitfadaptation.h
khronosfws/openmax_al/src/ledarray/xaledarraydevice.c
khronosfws/openmax_al/src/ledarray/xaledarraydevice.h
khronosfws/openmax_al/src/ledarray/xaledarrayitf.c
khronosfws/openmax_al/src/ledarray/xaledarrayitf.h
khronosfws/openmax_al/src/mediaplayer/xamediaplayer.c
khronosfws/openmax_al/src/mediaplayer/xamediaplayer.h
khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.c
khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.h
khronosfws/openmax_al/src/mediaplayer/xaplayitf.c
khronosfws/openmax_al/src/mediaplayer/xaplayitf.h
khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.c
khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.h
khronosfws/openmax_al/src/mediaplayer/xaseekitf.c
khronosfws/openmax_al/src/mediaplayer/xaseekitf.h
khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c
khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.h
khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.c
khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.h
khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c
khronosfws/openmax_al/src/mediarecorder/xamediarecorder.h
khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.c
khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.h
khronosfws/openmax_al/src/mediarecorder/xarecorditf.c
khronosfws/openmax_al/src/mediarecorder/xarecorditf.h
khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.c
khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.h
khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.c
khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.h
khronosfws/openmax_al/src/metadataextractor/xametadataextractor.c
khronosfws/openmax_al/src/metadataextractor/xametadataextractor.h
khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.cpp
khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.h
khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp
khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h
khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.cpp
khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.h
khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.cpp
khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.h
khronosfws/openmax_al/src/mmf_adaptation/xaadaptationcontextbasemmf.c
khronosfws/openmax_al/src/mmf_adaptation/xaadaptationcontextbasemmf.h
khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xaengineadaptctxmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xaengineadaptctxmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.c
khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.h
khronosfws/openmax_al/src/mmf_adaptation/xangavideosink.cpp
khronosfws/openmax_al/src/mmf_adaptation/xangavideosink.h
khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.h
khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.h
khronosfws/openmax_al/src/outputmix/xaoutputmix.c
khronosfws/openmax_al/src/outputmix/xaoutputmix.h
khronosfws/openmax_al/src/outputmix/xaoutputmixitf.c
khronosfws/openmax_al/src/outputmix/xaoutputmixitf.h
khronosfws/openmax_al/src/radio/xaradiodevice.c
khronosfws/openmax_al/src/radio/xaradiodevice.h
khronosfws/openmax_al/src/radio/xaradioitf.c
khronosfws/openmax_al/src/radio/xaradioitf.h
khronosfws/openmax_al/src/radio/xardsitf.c
khronosfws/openmax_al/src/radio/xardsitf.h
khronosfws/openmax_al/src/vibra/xavibradevice.c
khronosfws/openmax_al/src/vibra/xavibradevice.h
khronosfws/openmax_al/src/vibra/xavibraitf.c
khronosfws/openmax_al/src/vibra/xavibraitf.h
mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp
mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioControllerUtility/Src/MP3AudioControllerUtility.cpp
mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Src/AACAudioPlayControllerPlugin.cpp
mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Src/AMRAudioPlayControllerPlugin.cpp
mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/awbaudioplaycontroller/Src/AWBAudioPlayControllerPlugin.cpp
mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Src/MP3AudioPlayControllerPlugin.cpp
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/ActiveScheduledTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioStreamTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioToneTestModule/data/mmc/metadata/DRM_NRTmeta.dcf
mmfenh/enhancedmediaclient/Client/EABI/EnhancedMediaClient.def
mmfenh/enhancedmediaclient/Client/group/EnhancedMediaClient.mmp
mmfenh/enhancedmediaclient/Client/src/Components/ControlFactory/ControlFactoryImpl.cpp
mmfenh/enhancedmediaclient/Client/src/Components/ControlFactory/ControlFactoryImpl.h
mmfenh/enhancedmediaclient/Client/src/Components/StreamControl/ClientStreamControl.cpp
mmfenh/enhancedmediaclient/Client/src/Components/StreamControl/ClientUtility.cpp
mmfenh/enhancedmediaclient/Plugins/FileSource/group/FileSource.mmp
mmfenh/enhancedmediaclient/Plugins/MultimediaDataSource/DataSourceFactory/group/MultimediaDataSourceFactory.mmp
mmfenh/enhancedmediaclient/Plugins/MultimediaDataSource/DataSourceFactory/src/MultimediaDataSourceFactory.cpp
mmfenh/enhancedmediaclient/group/bld.inf
mmfenh/enhancedmediaclient/rom/EnhancedMediaClient.iby
mmfenh/group/bld.inf
mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh
mmmw_plat/audio_output_control_utility_api/tsrc/AudioOutputControlTestClass/inc/AudioOutputControlTestClass.h
mmmw_plat/enhanced_media_client_api/tsrc/Conf/EnhanMediaTestClass.cfg
mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/EABI/EnhanMediaTestClassu.def
mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/EnhanMediaTestClass.h
mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestCallbacks.cpp
mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestClassBlocks.cpp
mmmw_plat/group/bld.inf
mmmw_plat/openmax_al_api/openmax_al_api.metaxml
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_dynsrcitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_noklinvolitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_nokvolextitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_volumeitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_aiodcitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_audenccapitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_engineitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_global.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mo.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mo_mdextractionitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_mdextractionitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_objectitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_playitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_preemption.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_seekitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_strminfoitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_variousformats.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr_audioencoderitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr_mdinsertionitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr_recorditf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_objectitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_ro_audioencoderitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_ro_mdinsertionitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_ro_recorditf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/JapJap.mp3
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/readme.txt
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/test.3gp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/test.mp3
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/testmp4.mp4
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/bld.inf
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.mmp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.pkg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/TimeoutController.h
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/openmaxaltestmodule.h
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/profileutilmacro.h
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/init/testframework.ini
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/TimeoutController.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalcommontests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaldynitfmgmtitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaldynsrcitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalnokialinearvolumeitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalnokiavolumeextitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalobjectcallbacks.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalobjectitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalstrminfoitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmodule.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalvolumeitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/engine/openmaxalengineitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/metadata/openmaxalmetadataextractionitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/player/openmaxalplayitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/player/openmaxalseekitftests.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/recorder/openmaxalaudioencoderitftests.cpp
mmmw_plat/openmax_al_ext_api/group/bld.inf
mmmw_plat/openmax_al_ext_api/inc/xanokialinearvolumeitf.h
mmmw_plat/openmax_al_ext_api/inc/xanokiavolumeextitf.h
mmmw_plat/openmax_al_ext_api/openmax_al_ext_api.metaxml
mmmw_plat/openmax_al_ext_api/readme_ext.txt
mmmw_plat/system_tone_service_api/inc/systemtoneservice.h
mmmw_plat/system_tone_service_api/system_tone_service_api.metaxml
mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg
mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif_calendaralarm.cfg
mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif_common.cfg
mmmw_plat/system_tone_service_api/tsrc/group/systemtoneservicestif.mmp
mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h
mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp
mmmw_plat/telephony_multimedia_service_api/inc/tmssource.h
mmmw_plat/telephony_multimedia_service_api/tsrc/Conf/TMSAudioServicesTestClass.cfg
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/inc/TMSAudioServicesTestClass.h
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/sis/TmsAudioServicesTestClass.sis
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/sis/TmsAudioServicesTestClass.sisx
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocks.cpp
mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocksCallbacks.cpp
mmserv/group/bld.inf
mmserv/metadatautility/Src/MetaDataParser.cpp
mmserv/metadatautility/Src/MetaDataParser.h
mmserv/metadatautility/Src/MetaDataUtilityBody.cpp
mmserv/radioutility/radio_utility/group/Radio_Utility.mmp
mmserv/radioutility/radio_utility/inc/trace.h
mmserv/radioutility/radio_utility/inc/traceconfiguration.hrh
mmserv/radioutility/radio_utility/src/RadioFmTunerUtility.cpp
mmserv/radioutility/radio_utility/src/RadioFmTunerUtilityBody.cpp
mmserv/radioutility/radio_utility/src/RadioFmTunerUtilityBody.h
mmserv/radioutility/radio_utility/src/RadioMonitor.cpp
mmserv/radioutility/radio_utility/src/RadioMonitorBody.cpp
mmserv/radioutility/radio_utility/src/RadioMonitorBody.h
mmserv/radioutility/radio_utility/src/RadioPlayerUtility.cpp
mmserv/radioutility/radio_utility/src/RadioPlayerUtilityBody.cpp
mmserv/radioutility/radio_utility/src/RadioPlayerUtilityBody.h
mmserv/radioutility/radio_utility/src/RadioRdsUtility.cpp
mmserv/radioutility/radio_utility/src/RadioRdsUtilityBody.cpp
mmserv/radioutility/radio_utility/src/RadioRdsUtilityBody.h
mmserv/radioutility/radio_utility/src/RadioUtility.cpp
mmserv/radioutility/radio_utility/src/RadioUtilityBody.cpp
mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp
mmserv/radioutility/radioserver/Server/Src/RadioServerShutdown.cpp
mmserv/radioutility/radioserver/Server/Src/RadioServerShutdown.h
mmserv/sts/bwins/systemtoneservice.def
mmserv/sts/eabi/systemtoneservice.def
mmserv/sts/inc/sts.h
mmserv/sts/inc/stsclientservercommon.h
mmserv/sts/inc/stsimplementation.h
mmserv/sts/inc/stsplayer.h
mmserv/sts/src/systemtoneservice.cpp
mmserv/sts/stsimplementation/src/rstssession.cpp
mmserv/sts/stsimplementation/src/rstssession.h
mmserv/sts/stsimplementation/src/stsimplementation.cpp
mmserv/sts/stsplayer/src/sts.cpp
mmserv/sts/stsplayer/src/stsplayer.cpp
mmserv/sts/stsserver/src/stsserver.cpp
mmserv/sts/stsserver/src/stsserver.h
mmserv/sts/stsserver/src/stsserverexe.cpp
mmserv/sts/stsserver/src/stsserversession.cpp
mmserv/sts/stsserver/src/stsserversession.h
mmserv/sts/tsrc/ststester/sis/ststester.pkg
mmserv/sts/tsrc/ststester/src/ststester.cpp
mmserv/sts/tsrc/ststester/src/ststester.h
mmserv/thumbnailengine/TneAPISrc/HXTneserver.cpp
mmserv/tms/inc/tmsbufferimpl.h
mmserv/tms/inc/tmseffectimpl.h
mmserv/tms/inc/tmsformatimpl.h
mmserv/tms/inc/tmssinkimpl.h
mmserv/tms/tmscallserver/inc/tmscsdownlink.h
mmserv/tms/tmscallserver/inc/tmscsuplink.h
mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp
mmserv/tms/tmsimpl/eabi/tmsimpl.def
mmserv/tms/tmsimpl/src/tmsbufferimpl.cpp
mmserv/tms/tmsimpl/src/tmseffectimpl.cpp
mmserv/tms/tmsimpl/src/tmsformatimpl.cpp
mmserv/tms/tmsimpl/src/tmssinkimpl.cpp
mmserv/tms/tmsimpl/src/tmssourceimpl.cpp
mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h
mmserv/tms/tmsserver/inc/tmsaudiotoneutility.h
mmserv/tms/tmsserver/src/tmsaudioinbandtoneplayer.cpp
mmserv/tms/tmsserver/src/tmsaudiotoneutilityimpl.cpp
mmserv/tms/tmsserver/src/tmsserver.cpp
tsrc/group/bld.inf
--- a/khronosfws/openmax_al/bwins/openmaxalu.def	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/bwins/openmaxalu.def	Fri Apr 30 19:18:45 2010 -0500
@@ -42,4 +42,6 @@
 	XA_IID_VIDEOENCODERCAPABILITIES @ 41 NONAME
 	XA_IID_VIDEOPOSTPROCESSING @ 42 NONAME
 	XA_IID_VOLUME @ 43 NONAME
+	XA_IID_NOKIALINEARVOLUME @ 44 NONAME
+	XA_IID_NOKIAVOLUMEEXT @ 45 NONAME
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/data/openmaxal.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,62 @@
+#/*
+#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#* All rights reserved.
+#* This component and the accompanying materials are made available
+#* under the terms of "Eclipse Public License v1.0"
+#* which accompanies this distribution, and is available
+#* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#*
+#* Initial Contributors:
+#* Nokia Corporation - initial contribution.
+#*
+#* Contributors:
+#*
+#* Description: 
+#*
+#*/
+#============================================================================>|
+# Must not exceed 80 chars each line=========================================>|
+#============================================================================>|
+<mediaplayer>
+<mmf>
+<urischeme>
+# Num of entries followed by actual entries all ending with a comma
+3,file,http,rtsp,
+</urischeme>
+<fileext>
+15,3gp,wma,wmv,wav,amr,mp3,mp4,rm,ra,avi,mkv,aac,mid,awb,3g2,
+</fileext>
+</mmf>
+
+<gst>
+<urischeme>
+# Num of entries followed by actual entries all ending with a comma
+0,
+</urischeme>
+<fileext>
+0,
+</fileext>
+</gst>
+</mediaplayer>
+
+<mediarecorder>
+#<mmf>
+#<urischeme>
+# Num of entries followed by actual entries all ending with a comma
+#1,file,
+#</urischeme>
+#<fileext>
+#2,amr,mp4,
+#</fileext>
+#</mmf>
+
+<gst>
+<urischeme>
+# Num of entries followed by actual entries all ending with a comma
+1,file,
+</urischeme>
+<fileext>
+3,wav,amr,mp4,
+</fileext>
+</gst>
+</mediarecorder>
\ No newline at end of file
--- a/khronosfws/openmax_al/eabi/openmaxalu.def	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/eabi/openmaxalu.def	Fri Apr 30 19:18:45 2010 -0500
@@ -42,4 +42,6 @@
 	XA_IID_VIDEOENCODERCAPABILITIES @ 41 NONAME DATA 4
 	XA_IID_VIDEOPOSTPROCESSING @ 42 NONAME DATA 4
 	XA_IID_VOLUME @ 43 NONAME DATA 4
+	XA_IID_NOKIALINEARVOLUME @ 44 NONAME DATA 4
+	XA_IID_NOKIAVOLUMEEXT @ 45 NONAME DATA 4
 
--- a/khronosfws/openmax_al/group/bld.inf	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -26,6 +26,8 @@
 #ifdef FF_OPENMAX_AL
 ../data/openmax_al_stub.sis /epoc32/data/z/system/install/openmax_al_stub.sis
 ../rom/openmax_al.iby       CORE_MW_LAYER_IBY_EXPORT_PATH(openmax_al.iby)
+../data/openmaxal.cfg       /epoc32/winscw/c/openmaxal/openmaxal.cfg
+
 #endif
 
 PRJ_MMPFILES
--- a/khronosfws/openmax_al/group/openmaxal.mmp	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/group/openmaxal.mmp	Fri Apr 30 19:18:45 2010 -0500
@@ -31,47 +31,53 @@
 CAPABILITY ALL -TCB
 
 MACRO   USE_NGA_SURFACES
-//MACRO   _GSTREAMER_BACKEND_
+//MACRO 	MARKERPOSITIONTIMERLOG
+//MACRO		POSITIONUPDATETIMERLOG
+//MACRO 	USE_LOCAL_WINDOW_RESOURCES
+//MACRO           PROFILE_TIME
+//MACRO           PRINT_TO_CONSOLE_TIME_DIFF
 
-#ifdef _GSTREAMER_BACKEND_
-SOURCEPATH      ../Src/adaptation
-SOURCE	XAAdaptationContextBase.c
-SOURCE	XAAudioEncoderItfAdaptation.c
-SOURCE	XACameraAdaptCtx.c
-SOURCE	XACameraItfAdaptation.c
-SOURCE	XADeviceVolumeItfAdaptation.c
-SOURCE	XADynamicSourceItfAdaptation.c
-SOURCE	XAEngineAdaptCtx.c
-SOURCE	XAEqualizerItfAdaptation.c
-SOURCE	XAImageControlsItfAdaptation.c
-SOURCE	XAImageEffectsItfAdaptation.c
-SOURCE	XAImageEncoderItfAdaptation.c
-SOURCE	XALEDArrayAdaptCtx.c
-SOURCE	XALEDArrayItfAdaptation.c
-SOURCE	XAMediaPlayerAdaptCtx.c
-SOURCE	XAMediaRecorderAdaptCtx.c
-SOURCE	XAMetadataAdaptation.c
-SOURCE	XAMetadataAdaptCtx.c
-SOURCE	XAOutputMixAdaptCtx.c
-SOURCE	XAOutputMixItfAdaptation.c
-SOURCE	XAPlaybackRateItfAdaptation.c
-SOURCE	XAPlayItfAdaptation.c
-SOURCE	XARadioAdaptCtx.c
-SOURCE	XARadioItfAdaptation.c
-SOURCE	XARDSItfAdaptation.c
-SOURCE	XARecordItfAdaptation.c
-SOURCE	XASeekItfAdaptation.c
-SOURCE	XASnapShotItfAdaptation.c
-SOURCE	XAStaticCameraCapsAdaptation.c
-SOURCE	XAStaticCapsAdaptation.c
-SOURCE	XAVibraAdaptCtx.c
-SOURCE	XAVibraItfAdaptation.c
-SOURCE	XAVideoEncoderItfAdaptation.c
-SOURCE	XAVideoPostProsessingItfAdaptation.c
-SOURCE	XAVolumeItfAdaptation.c
-// 9.2 only (Exclude on other platforms)
-SOURCE  XANGAVideoSink.cpp
-#endif
+SOURCEPATH      ../src/gst_adaptation
+SOURCE	        xaadaptationgst.c
+SOURCE 	        xagstcapabilitiesmgr.c
+SOURCE	        xaaudioencoderitfadaptation.c
+SOURCE	        xacameraadaptctx.c
+SOURCE	        xacameraitfadaptation.c
+SOURCE	        xadevicevolumeitfadaptation.c
+SOURCE	        xadynamicsourceitfadaptation.c
+SOURCE	        xaengineadaptctx.c
+SOURCE	        xaequalizeritfadaptation.c
+SOURCE	        xaimagecontrolsitfadaptation.c
+SOURCE	        xaimageeffectsitfadaptation.c
+SOURCE	        xaimageencoderitfadaptation.c
+SOURCE	        xaledarrayadaptctx.c
+SOURCE	        xaledarrayitfadaptation.c
+SOURCE	        xamediaplayeradaptctx.c
+SOURCE	        xamediarecorderadaptctx.c
+SOURCE	        xametadataadaptation.c
+SOURCE	        xametadataadaptctx.c
+SOURCE	        xaoutputmixadaptctx.c
+SOURCE	        xaoutputmixitfadaptation.c
+SOURCE	        xaplaybackrateitfadaptation.c
+SOURCE	        xaplayitfadaptation.c
+SOURCE	        xaradioadaptctx.c
+SOURCE	        xaradioitfadaptation.c
+SOURCE	        xardsitfadaptation.c
+SOURCE	        xarecorditfadaptation.c
+SOURCE	        xaseekitfadaptation.c
+SOURCE	        xasnapshotitfadaptation.c
+SOURCE	        xastaticcameracapsadaptation.c
+SOURCE	        xavibraadaptctx.c
+SOURCE	        xavibraitfadaptation.c
+SOURCE	        xavideoencoderitfadaptation.c
+SOURCE	        xavideopostprosessingitfadaptation.c
+SOURCE	        xavolumeitfadaptation.c
+SOURCE 	        xastreaminformationitfadaptation.c
+
+SOURCEPATH ../src/adptcommon
+SOURCE 	        xaframeworkmgr.c
+SOURCE 	        xacapabilitiesmgr.c
+SOURCE 	        xaadptbasectx.c
 
 SOURCEPATH      ../src/camera
 SOURCE          xacameradevice.c
@@ -93,6 +99,11 @@
 SOURCE          xathreadsafety.c
 SOURCE          xavideopostprocessingitf.c
 SOURCE          xavolumeitf.c
+SOURCE 		xastreaminformationitf.c
+SOURCE          xanokialinearvolume_iid.c
+SOURCE          xanokiavolumeext_iid.c
+SOURCE          xanokialinearvolumeitf.c
+SOURCE          xanokiavolumeextitf.c
 
 SOURCEPATH      ../src/engine
 SOURCE          xaaudiodecodercapabilitiesitf.c
@@ -133,34 +144,45 @@
 
 SOURCEPATH      ../src/outputmix
 SOURCE          xaoutputmix.c
-SOURCE		    xaoutputmixitf.c
+SOURCE		xaoutputmixitf.c
 
 SOURCEPATH      ../src/radio
 SOURCE          xaradiodevice.c
-SOURCE		    xaradioitf.c
-SOURCE		    xardsitf.c
+SOURCE		xaradioitf.c
+SOURCE		xardsitf.c
 
 SOURCEPATH      ../src/vibra
 SOURCE          xavibradevice.c
-SOURCE		    xavibraitf.c
+SOURCE		xavibraitf.c
 
 SOURCEPATH      ../src/mmf_adaptation
-SOURCE	xaengineadaptctxmmf.c
-SOURCE	xamediaplayeradaptctxmmf.c
-SOURCE	xaplayitfadaptationmmf.c
-SOURCE	xaadaptationcontextbasemmf.c
-SOURCE  cmmfbackendengine.cpp
-SOURCE  xamediarecorderadaptctxmmf.c
-SOURCE  xarecorditfadaptationmmf.c
-SOURCE 	sfmrlocaltimer.cpp
+//	Removing below file since currently there is no Engine related
+// 	mmf adaptation
+//SOURCE          xaengineadaptctxmmf.c
+SOURCE	        xamediaplayeradaptctxmmf.c
+SOURCE	        xaplayitfadaptationmmf.c
+SOURCE	        xaadaptationmmf.c
+SOURCE          cmmfbackendengine.cpp
+SOURCE          xamediarecorderadaptctxmmf.c
+SOURCE          xarecorditfadaptationmmf.c
+SOURCE 	        sfmrlocaltimer.cpp
+SOURCE          xanokialinearvolumeitfadaptationmmf.c
+SOURCE          xanokiavolumeextitfadaptationmmf.c
+SOURCE 	        xammfcapabilitiesmgr.c
+//SOURCE          xangavideosink.cpp
+SOURCE          markerpositiontimer.cpp
+SOURCE          positionupdatetimer.cpp 
+SOURCE          xaseekitfadaptationmmf.c
+SOURCE          xadynamicsourceitfadaptationmmf.c
+SOURCE 	        xastreaminformationitfadaptationmmf.c
+SOURCE  	cmetadatautilityitf.cpp
+SOURCE		xametadataadaptctxmmf.c
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../src
 USERINCLUDE     ../src/khronos
 USERINCLUDE     ../src/mmf_adaptation
-#ifdef _GSTREAMER_BACKEND_
-USERINCLUDE     ../Src/adaptation
-#endif
+USERINCLUDE     ../src/gst_adaptation
 USERINCLUDE     ../src/camera
 USERINCLUDE     ../src/common
 USERINCLUDE     ../src/engine
@@ -170,19 +192,18 @@
 USERINCLUDE     ../src/outputmix
 USERINCLUDE     ../src/radio
 USERINCLUDE     ../src/vibra
+USERINCLUDE	../src/adptcommon
 
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 SYSTEMINCLUDE /epoc32/include/platform/mw/khronos 
-// 9.2
-#ifdef _GSTREAMER_BACKEND_
+
 SYSTEMINCLUDE  	/sf/mw/gstreamer/include/gstreamer
 SYSTEMINCLUDE  	/sf/mw/gstreamer/include/gstreamer/gst
 SYSTEMINCLUDE  	/sf/mw/gstreamer/include/gstreamer/gst/interfaces
 SYSTEMINCLUDE  	/sf/mw/gstreamer/include/gstreamer/gst/app
 SYSTEMINCLUDE  	/sf/mw/gstreamer/include/gstreamer/gst/video
-#endif
 
 LIBRARY         euser.lib
 LIBRARY         libc.lib
@@ -191,23 +212,21 @@
 
 LIBRARY         mediaclientvideodisplay.lib
 LIBRARY         ws32.lib
-LIBRARY			inetprotutil.lib
+LIBRARY		inetprotutil.lib
 LIBRARY         mediaclientaudio.lib
 LIBRARY         MMFControllerFramework.lib
 LIBRARY         mediaclientvideo.lib
-
-#ifdef _GSTREAMER_BACKEND_
+LIBRARY         AudioInputRouting.lib
 LIBRARY         libgmodule.lib
 LIBRARY         libgobject.lib
 LIBRARY         libgstreamer.lib
 LIBRARY         libgstapp.lib
-LIBRARY		    libgstphotography.lib
-LIBRARY 	    libgstinterfaces.lib 
-LIBRARY		    libgstvideo.lib
-LIBRARY 	    libgstbase.lib
-LIBRARY 	    libgstcoreelements.lib
-LIBRARY		    libgstcoreindexers.lib
-#endif 
+LIBRARY		libgstphotography.lib
+LIBRARY 	libgstinterfaces.lib 
+LIBRARY		libgstvideo.lib
+LIBRARY 	libgstbase.lib
+LIBRARY 	libgstcoreelements.lib
+LIBRARY		libgstcoreindexers.lib
+LIBRARY 	MetaDataUtility.lib
+STATICLIBRARY   hxmetadatautil.lib
 
-
-
--- a/khronosfws/openmax_al/inc/openmaxalwrapper.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/inc/openmaxalwrapper.h	Fri Apr 30 19:18:45 2010 -0500
@@ -23,5 +23,7 @@
 #define XA_API __declspec(dllexport)
  
 #include <OpenMAXAL.h>
+#include <xanokiavolumeextitf.h>
+#include <xanokialinearvolumeitf.h>
 
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/inc/profileutilmacro.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef PROFILEUTILMACRO_H
+#define PROFILEUTILMACRO_H
+/*
+// MACROS to be defined to use profiling
+PROFILE_TIME
+PROFILE_RAM_USAGE
+PROFILE_HEAP_USAGE
+PRINT_TO_CONSOLE_TIME_DIFF
+PRINT_TO_CONSOLE_RAM_DIFF
+PRINT_TO_CONSOLE_HEAP_DIFF
+*/
+
+#if defined(PROFILE_TIME) || defined(PROFILE_RAM_USAGE) || defined(PROFILE_HEAP_USAGE)
+#include <e32debug.h>
+#include <hal.h>
+#endif
+
+#ifdef PROFILE_TIME
+#define TAG_TIME_PROFILING_BEGIN \
+    TTime beginProfilingTime; \
+    beginProfilingTime.HomeTime()
+
+#define TAG_TIME_PROFILING_BEGIN_NO_VAR_DEF \
+    beginProfilingTime.HomeTime()
+
+#define TAG_TIME_PROFILING_END \
+    TTime endProfilingTime; \
+    endProfilingTime.HomeTime(); \
+    TTimeIntervalMicroSeconds diffInMicroSecs = endProfilingTime.MicroSecondsFrom(beginProfilingTime)
+
+#define TAG_TIME_PROFILING_END_NO_VAR_DEF \
+    endProfilingTime.HomeTime(); \
+    diffInMicroSecs = endProfilingTime.MicroSecondsFrom(beginProfilingTime)
+
+#define PRINT_TO_CONSOLE_TIME_DIFF \
+    RDebug::Printf("VPROFILEDAT: %s : Time taken[%u]microseconds ", __PRETTY_FUNCTION__, diffInMicroSecs.Int64())
+
+#define PRINT_TO_CONSOLE_HOME_TIME \
+    TTime homeTime; \
+    homeTime.HomeTime(); \
+    RDebug::Printf("VPROFILEDAT: %s : Home Time [%u]microseconds ", __PRETTY_FUNCTION__, homeTime.Int64())
+
+#define PRINT_TO_CONSOLE_HOME_TIME_NO_VAR_DEF \
+    homeTime.HomeTime(); \
+    RDebug::Printf("VPROFILEDAT: %s : Home Time [%u]microseconds ", __PRETTY_FUNCTION__, homeTime.Int64())
+
+#else /* Empty macros */
+#define TAG_TIME_PROFILING_BEGIN
+#define TAG_TIME_PROFILING_BEGIN_NO_VAR_DEF
+#define TAG_TIME_PROFILING_END
+#define TAG_TIME_PROFILING_END_NO_VAR_DEF
+#define PRINT_TO_CONSOLE_TIME_DIFF
+#define PRINT_TO_CONSOLE_HOME_TIME
+#define PRINT_TO_CONSOLE_HOME_TIME_NO_VAR_DEF
+#endif /*PROFILE_TIME*/
+
+#ifdef PROFILE_RAM_USAGE
+#define TAG_RAM_PROFILING_BEGIN \
+    TInt beginProfilingRAM; \
+    TInt err1 = HAL::Get(HALData::EMemoryRAMFree, beginProfilingRAM)
+
+#define TAG_RAM_PROFILING_END \
+    TInt endProfilingRAM; \
+    TInt err2 = HAL::Get(HALData::EMemoryRAMFree, endProfilingRAM)
+
+#define PRINT_TO_CONSOLE_RAM_DIFF \
+    if ((err1 == KErrNone) && (err2 == KErrNone)) \
+        { \
+        TInt diffRAM = (beginProfilingRAM - endProfilingRAM); \
+        if ( diffRAM > 0 ) \
+            { \
+            RDebug::Printf("VPROFILEDAT: %s : RAM used[%u]bytes ", __PRETTY_FUNCTION__, diffRAM); \
+            } \
+        else \
+            { \
+            RDebug::Printf("VPROFILEDAT: %s : RAM freed[%u]bytes ", __PRETTY_FUNCTION__, (-diffRAM)); \
+            } \
+        } \
+    else \
+        { \
+        RDebug::Printf("VPROFILEDAT: %s : Error1[%d] Error2[%d] ", __PRETTY_FUNCTION__, err1, err2); \
+        }
+
+#else /* Empty macros */
+#define TAG_RAM_PROFILING_BEGIN
+#define TAG_RAM_PROFILING_END
+#define PRINT_TO_CONSOLE_RAM_DIFF
+#endif /*PROFILE_RAM_USAGE*/
+
+#ifdef PROFILE_HEAP_USAGE
+#define TAG_DEFAULT_HEAP_PROFILING_BEGIN \
+    TInt beginProfilingHEAPBiggestBlock; \
+    TInt beginProfilingHEAP = User::Available(beginProfilingHEAPBiggestBlock) \
+
+#define TAG_DEFAULT_HEAP_PROFILING_END \
+    TInt endProfilingHEAPBiggestBlock; \
+    TInt endProfilingHEAP = User::Available(endProfilingHEAPBiggestBlock) \
+
+#define PRINT_TO_CONSOLE_HEAP_DIFF \
+    TInt diffHEAP = beginProfilingHEAP - endProfilingHEAP; \
+    if ( diffHEAP > 0 ) \
+        { \
+        RDebug::Printf("VPROFILEDAT: %s : HEAP used[%u]bytes ", __PRETTY_FUNCTION__, diffHEAP); \
+        } \
+    else \
+        { \
+        RDebug::Printf("VPROFILEDAT: %s : HEAP freed[%u]bytes ", __PRETTY_FUNCTION__, (-diffHEAP)); \
+        }
+#else /* Empty macros */
+#define TAG_DEFAULT_HEAP_PROFILING_BEGIN
+#define TAG_DEFAULT_HEAP_PROFILING_END
+#define PRINT_TO_CONSOLE_HEAP_DIFF
+#endif /*PROFILE_HEAP_USAGE*/
+
+#endif /* PROFILEUTILMACRO_H */
--- a/khronosfws/openmax_al/rom/openmax_al.iby	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/rom/openmax_al.iby	Fri Apr 30 19:18:45 2010 -0500
@@ -29,6 +29,7 @@
 
 //OpenMAX_AL_Stub
 data=ZSYSTEM/install/openmax_al_stub.sis         System/Install/openmax_al_stub.sis
+data=/epoc32/winscw/c/openmaxal/openmaxal.cfg           openmaxal/openmaxal.cfg
 
 #endif //FF_OPENMAX_AL
 
--- a/khronosfws/openmax_al/sis/openmax_al.pkg	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/sis/openmax_al.pkg	Fri Apr 30 19:18:45 2010 -0500
@@ -11,7 +11,7 @@
 ;
 ; Contributors:
 ;
-; Description: OpenMAX AL - UDEB build
+; Description: OpenMAX AL - UREL build
 ;
 ;File: openmax_al.pkg
 
@@ -31,5 +31,6 @@
 :"Nokia"
 
 ;Files To Copy...<src> <destination>
-"/epoc32/release/armv5/udeb/openmaxal.dll"         -"!:/sys/bin/openmaxal.dll"
+"/epoc32/release/armv5/urel/openmaxal.dll"         -"!:/sys/bin/openmaxal.dll"
+"../data/openmaxal.cfg"                             -   "c:/openmaxal/openmaxal.cfg"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/sis/openmax_al_udeb.pkg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: OpenMAX AL - UDEB build
+;
+;File: openmax_al.pkg
+
+;Languages
+&EN
+
+;Header
+#{"OpenMax_AL"},(0x10207CAF),1,0,0, TYPE=SA, RU
+
+;Series 60 v5.0
+[0x101F7961], 0,0,0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;Files To Copy...<src> <destination>
+"/epoc32/release/armv5/udeb/openmaxal.dll"          -   "!:/sys/bin/openmaxal.dll"
+"../data/openmaxal.cfg"                             -   "c:/openmaxal/openmaxal.cfg"
+
--- a/khronosfws/openmax_al/sis/openmax_al_urel.pkg	Mon May 03 12:59:52 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: OpenMAX AL - UREL build
-;
-;File: openmax_al.pkg
-
-;Languages
-&EN
-
-;Header
-#{"OpenMax_AL"},(0x10207CAF),1,0,0, TYPE=SA, RU
-
-;Series 60 v5.0
-[0x101F7961], 0,0,0, {"Series60ProductID"}
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Files To Copy...<src> <destination>
-"/epoc32/release/armv5/urel/openmaxal.dll"         -"!:/sys/bin/openmaxal.dll"
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,260 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <assert.h>
+#include <string.h>
+#include "xaadptbasectx.h"
+#include "xathreadsafety.h"
+
+/*
+ * XAAdaptationBaseCtx* XAAdaptationBase_Create()
+ * 1st phase initialization function for Adaptation Base context structure.
+ * Reserves memory for base context and initializes GStreamer FW.
+ */
+XAresult XAAdaptationBase_Init( XAAdaptationBaseCtx* pSelf, XAuint32 ctxId )
+{
+    DEBUG_API("->XAAdaptationBase_Init");
+
+    if ( pSelf )
+    {
+    if(!pSelf->evtHdlrs)
+        {
+        pSelf->evtHdlrs = g_array_new (FALSE, FALSE, sizeof (XAAdaptEvtHdlr));
+        if(!pSelf->evtHdlrs)
+            {
+            DEBUG_ERR("Memory allocation failure in Base Ctx.")
+            return XA_RESULT_MEMORY_FAILURE;
+            }
+        }
+    pSelf->ctxId = ctxId;
+    }
+    else
+    {
+        DEBUG_ERR("Invalid Adaptation Base Context.")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_API("<-XAAdaptationBase_Init");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAAdaptationBase_PostInit()
+ * 2nd phase initialization for Adaptation Base.
+ */
+XAresult XAAdaptationBase_PostInit( XAAdaptationBaseCtx* ctx )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAAdaptationBase_PostInit");
+    DEBUG_API("<-XAAdaptationBase_PostInit");
+    return ret;
+}
+
+/*
+ * void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
+ * Frees all Base context variables .
+ */
+void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
+{
+    g_array_free(ctx->evtHdlrs, TRUE);
+    ctx->evtHdlrs = NULL;
+    DEBUG_API("<-XAAdaptationBase_Free");
+}
+
+/*
+ * XAresult XAAdaptationBase_AddEventHandler
+ * Adds event handler for certain event types.
+ */
+XAresult XAAdaptationBase_AddEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler,
+                                    XAuint32 evtTypes, void *pHandlerCtx )
+{
+    XAuint32 i;
+    XAAdaptEvtHdlr tmp;
+    DEBUG_API("->XAAdaptationBase_AddEventHandler");
+    if(!ctx)
+    {
+        DEBUG_ERR("no context");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    for(i=0; i<ctx->evtHdlrs->len; i++)
+    {
+        if( (g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i)).handlerfunc == evtHandler )
+        {
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+    }
+    tmp.handlerfunc = evtHandler;
+    tmp.handlercontext = pHandlerCtx;
+    tmp.eventtypes = evtTypes;
+    g_array_append_val(ctx->evtHdlrs, tmp);
+    DEBUG_API("<-XAAdaptationBase_AddEventHandler");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAAdaptationBase_RemoveEventHandler
+ * Removes event handler for certain event types.
+ */
+XAresult XAAdaptationBase_RemoveEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler)
+{
+    XAuint32 i;
+    DEBUG_API("->XAAdaptationBase_RemoveEventHandler");
+    if(!ctx)
+    {
+        DEBUG_ERR("no context");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    for(i=0; i<ctx->evtHdlrs->len; i++)
+    {
+        if( (g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i)).handlerfunc == evtHandler )
+        {
+            g_array_remove_index(ctx->evtHdlrs, i);
+            return XA_RESULT_SUCCESS;
+        }
+    }
+    DEBUG_API("<-XAAdaptationBase_RemoveEventHandler");
+    /*did not find, return error*/
+    return XA_RESULT_PARAMETER_INVALID;
+}
+
+void XAAdaptationBase_SendAdaptEvents(XAAdaptationBaseCtx* ctx, XAAdaptEvent* event)
+{
+    XAuint32 i;
+    XAAdaptEvtHdlr* tmp;
+    for(i=0; i<ctx->evtHdlrs->len; i++)
+    {
+        tmp = &g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i);
+        if( tmp->eventtypes & event->eventtype )
+        {
+            (tmp->handlerfunc)(tmp->handlercontext, event);
+        }
+    }
+}
+
+/*
+ * XAresult XAEqualizerItfAdapt_ThreadEntry(XAAdaptationGstCtx *adapCtx)
+ * Description: Safety thread entry
+ */
+XAresult XAAdaptationBase_ThreadEntry(XAAdaptationBaseCtx *adaptCtx)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAAdaptationBase_ThreadEntry");
+    if(!adaptCtx )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAAdaptationBase_ThreadEntry");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+
+    }
+    
+    switch(adaptCtx->ctxId)
+        {
+        case XAMediaPlayerAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer);
+            break;
+        case XAMediaRecorderAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
+            break;
+        case XARadioAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
+            break;
+        case XACameraAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
+            break;
+        case XAOutputMixAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
+            break;
+        case XAVibraAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSVibra);
+            break;
+        case XALedArrayAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSLEDArray);
+            break;
+        case XAMDAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMetaDataExtractor);
+            break;
+        case XAEngineAdaptation:
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSEngine);
+            break;
+        default:
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            /* invalid parameter */
+            res = XA_RESULT_PARAMETER_INVALID;
+            break;
+        }
+
+    DEBUG_API("<-XAAdaptationBase_ThreadEntry");
+    return res;
+}
+/*
+ * XAresult XAEqualizerItfAdapt_ThreadExit(XAAdaptationGstCtx *adaptCtx)
+ * Description: Safety thread exit
+ */
+XAresult XAAdaptationBase_ThreadExit(XAAdaptationBaseCtx *adaptCtx)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAAdaptationBase_ThreadExit");
+    if(!adaptCtx )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAAdaptationBase_ThreadExit");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+
+    }
+
+    switch(adaptCtx->ctxId)
+        {
+        case XAMediaPlayerAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
+            break;
+        case XAMediaRecorderAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+            break;
+        case XARadioAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
+            break;
+        case XACameraAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
+            break;
+        case XAOutputMixAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
+            break;
+        case XAVibraAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
+            break;
+        case XALedArrayAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
+            break;
+        case XAMDAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMetaDataExtractor);
+            break;
+        case XAEngineAdaptation:
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSEngine);
+            break;
+        default:
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            /* invalid parameter */
+            res = XA_RESULT_PARAMETER_INVALID;
+            break;
+        }
+
+    DEBUG_API("<-XAAdaptationBase_ThreadExit");
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAADPTBASECTX_H_
+#define XAADPTBASECTX_H_
+
+#include <glib.h>
+#include "openmaxalwrapper.h"
+#include "xaglobals.h"
+#include "xaframeworkmgr.h"
+#include "xacapabilitiesmgr.h"
+#include "xaplatform.h"
+/* ENUMERATIONS */
+
+/**
+GLOBAL ENUMERATIONS
+ */
+
+typedef enum {
+    XAMediaPlayerAdaptation = 0,
+    XAMediaRecorderAdaptation,
+    XARadioAdaptation,
+    XACameraAdaptation,
+    XAOutputMixAdaptation,
+    XAVibraAdaptation,
+    XALedArrayAdaptation,
+    XAMDAdaptation,
+    XAEngineAdaptation
+}AdaptationContextIDS;
+
+#define XA_ADAPT_PU_INTERVAL 50                     /* position update interval */
+#define XA_ADAPT_ASYNC_TIMEOUT 3000                 /* timeout to wait async events */
+#define XA_ADAPT_ASYNC_TIMEOUT_SHORT 1000           /* timeout to wait async events */
+#define XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC 1000000   /* timeout to wait async events */
+
+#define XA_ADAPT_POSITION_UPDATE_EVT 0xf0           /* position update event */
+#define XA_ADAPT_SNAPSHOT_TAKEN 0xf1                /* snapshot taken event */
+#define XA_ADAPT_SNAPSHOT_INITIATED 0xf2            /* snapshot intitiated event */
+#define XA_ADAPT_MDE_TAGS_AVAILABLE 0xf3            /* metadata taglist changed */
+#define XA_ADAPT_OMIX_DEVICESET_CHANGED 0xf4        /* Output mix device changed event */
+#define XA_ADAPT_RADIO_FREQUENCY_CHANGED 0xf6       /* Radio frequency changed event */
+#define XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED 0xf7 /* Radio frequency range changed event */
+#define XA_ADAPT_RADIO_SEEK_COMPLETE 0xf8           /* Radio seek complete changed event */
+#define XA_ADAPT_RDS_GET_ODA_GROUP_DONE 0xf9        /* RDS get oda group done event */
+#define XA_ADAPT_BUFFERING 0xfa
+#define XA_ADAPT_MDE_TAGS_WRITTEN 0xfb
+/* TYPEDEFS */
+
+#define RADIO_DEFAULT_FREQ_RANGE XA_FREQRANGE_FMEUROAMERICA
+#define RADIO_DEFAULT_FREQ 88000000
+
+
+/* TYPEDEFS */
+
+/* Adaptation device IDs */
+//#define XA_ADAPTID_ALSASRC          0xAD7E5001  //Krishna commented
+#define XA_ADAPTID_DEVSOUNDSRC          0xAD7E5001
+//#define XA_ADAPTID_ALSASINK         0xAD7E5002
+#define XA_ADAPTID_DEVSOUNDSINK     0xAD7E5002
+#define XA_ADAPTID_AUTOAUDIOSINK    0xAD7E5003
+#define XA_ADAPTID_AUDIOTESTSRC     0xAD7E5004
+#define XA_ADAPTID_AUTOVIDEOSINK    0xAD7E5005
+#define XA_ADAPTID_VIDEOTESTSRC     0xAD7E5006
+#define XA_ADAPTID_V4L2SRC          0xAD7E5007
+#define XA_ADAPTID_JACKSINK         0xAD7E5008
+#define XA_ADAPTID_MOTIONJPEG       0xAD7E5009
+#define XA_ADAPTID_THEORA           0xAD7E500A
+#define XA_ADAPTID_VORBIS           0xAD7E500B
+
+#define XA_ADAPTID_VIBRA            0xAD7E500C
+#define XA_ADAPTID_LEDARRAY         0xAD7E500D
+
+#define XA_ADAPTID_RAWVIDEO         0xAD7E500E
+
+//#define XA_ADAPT_DEFAULTAUDIOOUTPUT XA_ADAPTID_ALSASINK
+#define XA_ADAPT_DEFAULTAUDIOOUTPUT XA_ADAPTID_DEVSOUNDSINK
+
+#ifdef XA_USE_TEST_PLUGINS
+#define XA_ADAPT_DEFAULTAUDIOINPUT  XA_ADAPTID_AUDIOTESTSRC
+#else
+#define XA_ADAPT_DEFAULTAUDIOINPUT  XA_ADAPTID_DEVSOUNDSRC
+#endif
+
+
+#define XA_ADAPT_OGGPROFILE_UNKNOWN 0x1
+
+#define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_8   0x1
+#define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_16  0x2
+#define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_20  0x4
+#define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_24  0x8
+#define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_28  0x10
+#define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_32  0x20
+
+#define XA_ADAPT_MAX_BITRATE_COUNT 10
+
+#define XA_ADAPTID_UNINITED 0
+
+#define XA_ADAPT_VOLUME_VOLUME_CHANGED          0xfb			 /* volume changed */
+#define XA_ADAPT_VOLUME_MUTE_CHANGED            0xfc         	/* mute changed */
+#define XA_ADAPT_VULOME_STEREOPOSITION_CHANGED  0xfd
+
+/* Adaptation event structure */
+typedef struct XAAdaptEvent_
+{
+    XAAdaptEventTypes  eventtype; /* what kind of event, e.g. playitf event  */
+    XAuint8            eventid;   /* eventtype-specific event, e.g. XA_PLAYEVENT macro */
+    XAuint32           datasize;  /* event data size */
+    void*              data;      /* event data if needed */
+} XAAdaptEvent;
+
+/* Forward declaration of adaptation basecontext */
+typedef struct XAAdaptationBaseCtx_ XAAdaptationBaseCtx;
+
+/*
+ * Structure that holds all common variables for every
+ * Gst-Adaptation context structures.
+ */
+typedef struct XAAdaptationBaseCtx_
+{
+/*     Common Variables for all adaptation elements */
+    XAuint32        ctxId;
+    GArray*         evtHdlrs;     /*array of event handlers */
+    FrameworkMap*   fwkmapper;
+    FWMgrFwType     fwtype;
+    XACapabilities* capslist;
+    
+} XAAdaptationBaseCtx_;
+
+
+/* Adaptation event callback */
+typedef void (*xaAdaptEventHandler) ( void *pHandlerCtx, XAAdaptEvent* event );
+
+typedef struct XAAdaptEvtHdlr_
+{
+    xaAdaptEventHandler handlerfunc;    /* function handling the callback */
+    void               *handlercontext; /* context of handler */
+    XAuint32            eventtypes;     /* what kind of events this handles */
+} XAAdaptEvtHdlr;
+
+
+
+
+/* FUNCTIONS */
+XAresult XAAdaptationBase_Init( XAAdaptationBaseCtx* pSelf, XAuint32 ctxId );
+XAresult XAAdaptationBase_PostInit( XAAdaptationBaseCtx* ctx );
+XAresult XAAdaptationBase_AddEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler,
+                                    XAuint32 evtTypes,void *pHandlerCtx );
+XAresult XAAdaptationBase_RemoveEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler );
+void XAAdaptationBase_SendAdaptEvents(XAAdaptationBaseCtx* ctx, XAAdaptEvent* event);
+XAresult XAAdaptationBase_ThreadEntry(XAAdaptationBaseCtx *adaptCtx);
+XAresult XAAdaptationBase_ThreadExit(XAAdaptationBaseCtx *adaptCtx);
+void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx );
+
+#endif /* XAADPTBASE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,525 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "xacapabilitiesmgr.h"
+#include "xammfcapabilitiesmgr.h"
+#include "xagstcapabilitiesmgr.h"
+#include <stdio.h>
+#include <string.h>
+
+static XAresult XACapabilitiesMgr_GetAudioInputDeviceCapabilities(XACapabilities **ppNode);
+static XAresult XACapabilitiesMgr_GetAudioOutputDeviceCapabilities(XACapabilities **ppNode);
+
+/* XAresult XAGSTCapabilitiesMgr_UpdateAudioIOCapabilitieList
+ * Description: Update the capabilities list supported by GStreamer framework.
+ */
+XAresult XACapabilitiesMgr_UpdateAudioIOCapabilitieList(
+                FrameworkMap *frameworkMap,
+                XACapabilities **ppListHead)
+
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *lastNode;
+    XACapabilities *firstNode ;
+    XACapabilities *newNode = NULL;
+    
+    if(!frameworkMap || !ppListHead)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+    
+     lastNode = *ppListHead;
+     firstNode = *ppListHead;
+     
+
+    DEBUG_API("->XACapabilitiesMgr_UpdateAudioIOCapabilitieList");
+
+
+
+    /* traverse and point to the last node in the list */
+    while(lastNode && lastNode->next)
+    {
+        lastNode = lastNode->next;
+    }
+
+    /* If no input devices are supported, the function returns
+     * XA_RESULT_SUCCESS and newNode will be NULL*/
+    newNode = NULL;
+    res = XACapabilitiesMgr_GetAudioInputDeviceCapabilities(&newNode);
+    if (res != XA_RESULT_SUCCESS)
+        {
+        return res;
+        }
+    
+    if (lastNode)
+    {
+        lastNode->next = newNode;
+    }
+    if (newNode)
+    { /* if a new node is created move lastNode to the new item */
+        if (!firstNode)
+            firstNode = newNode;
+        lastNode = newNode;
+    }
+    
+    /* If no input devices are supported, the function returns
+     * XA_RESULT_SUCCESS and newNode will be NULL*/
+    newNode = NULL;
+    res = XACapabilitiesMgr_GetAudioOutputDeviceCapabilities(&newNode);
+    if (res != XA_RESULT_SUCCESS)
+        {
+        return res;
+        }
+    
+    if (lastNode)
+    {
+        lastNode->next = newNode;
+    }
+    if (newNode)
+    { /* if a new node is created move lastNode to the new item */
+        if (!firstNode)
+            firstNode = newNode;
+        lastNode = newNode;
+    }
+    /* if empty list, then append first node as the head */
+    if (!(*ppListHead))
+        {
+        *ppListHead = firstNode;
+        }
+    DEBUG_API("<-XACapabilitiesMgr_UpdateAudioIOCapabilitieList");
+    return res;
+}
+
+XAresult XACapabilitiesMgr_CreateCapabilitieList(
+            FrameworkMap* frameworkMap,
+            XACapabilities** ppListHead)
+{
+    XACapabilities* list = NULL;
+    XAresult res = XA_RESULT_SUCCESS;
+    if(!ppListHead)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+
+    *ppListHead = NULL;
+
+    res = XACapabilitiesMgr_UpdateAudioIOCapabilitieList(frameworkMap, &list);
+    if (res != XA_RESULT_SUCCESS)
+    {
+        XACapabilitiesMgr_DeleteCapabilitieList(&list);
+        return res;
+    }
+    
+    res = XAGSTCapabilitiesMgr_UpdateCapabilitieList(frameworkMap, &list);
+    if (res != XA_RESULT_SUCCESS)
+    {
+        XACapabilitiesMgr_DeleteCapabilitieList(&list);
+        return res;
+    }
+
+    res = XAMMFCapabilitiesMgr_UpdateCapabilitieList(frameworkMap, &list);
+    if (res != XA_RESULT_SUCCESS)
+    {
+        XACapabilitiesMgr_DeleteCapabilitieList(&list);
+        return res;
+    }
+
+    *ppListHead = list;
+    return res;
+}
+
+XAresult XACapabilitiesMgr_DeleteCapabilitieList(XACapabilities** ppListHead)
+{
+    XACapabilities* currNode = NULL;
+    XACapabilities* nextNode = NULL;
+    XAresult res = XA_RESULT_SUCCESS;
+    
+    if(!ppListHead)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+
+    currNode = *ppListHead;
+    while (currNode)
+    {
+        if (currNode->capsType == AUD_I)
+        {
+            XAAudioInputDescriptor* entries = (XAAudioInputDescriptor*)currNode->pEntry;
+            XAint32 i;
+            for(i=0;i< currNode->noOfEntries;i++)
+            {
+                free(entries[i].samplingRatesSupported);
+                free(entries[i].deviceName);
+            }
+            free(entries);
+        }
+        else if (currNode->capsType == AUD_O)
+        {
+            XAAudioOutputDescriptor* entries = (XAAudioOutputDescriptor*)currNode->pEntry;
+            XAint32 i;
+            for(i=0;i< currNode->noOfEntries;i++)
+            {
+                free(entries[i].samplingRatesSupported);
+                free(entries[i].pDeviceName);
+            }
+            free(entries);
+        }
+        else if (currNode->capsType == AUD_E)
+        {
+            XAAudioCodecDescriptor* entries = (XAAudioCodecDescriptor*)currNode->pEntry;
+            XAint32 i;
+            for(i=0;i< currNode->noOfEntries;i++)
+            {
+                free(entries[i].pSampleRatesSupported);
+                free(entries[i].pBitratesSupported);
+            }
+            free(entries);
+
+        }
+
+        if(currNode->adaptId)
+            {
+            free(currNode->adaptId);
+            }
+        
+        nextNode = currNode->next;
+        free(currNode);
+        currNode = nextNode;
+    }
+
+    *ppListHead = NULL;
+    return res;
+}
+
+
+/* XAresult XACapabilitiesMgr_GetCapsCount
+ * Description: Count capabilities of certain type. Filter is specified by
+ *              bitmasking XACapsType values.
+ */
+XAresult XACapabilitiesMgr_GetCapsCount(XACapabilities* pListHead, XACapsType filter, XAuint32* count)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities* currNode = pListHead;
+
+    DEBUG_API("->XACapabilitiesMgr_GetCapsCount");
+    if(!currNode || !count)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+
+    (*count)=0;
+    while (currNode)
+    {
+        if ( (currNode->capsType & filter) == filter )
+        {
+            (*count)++;
+        }
+        currNode = currNode->next;
+    }
+
+    DEBUG_API("<-XACapabilitiesMgr_GetCapsCount");
+    return res;
+}
+
+/* XAresult XACapabilitiesMgr_GetCapsById
+ * Description: Get capabilities of type XACapsType and matching id
+ */
+XAresult XACapabilitiesMgr_GetCapsById(XACapabilities* pListHead, XACapsType filter, XAuint32 maxId, XACapabilities* data)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities* currNode = pListHead;
+    XAboolean found = XA_BOOLEAN_FALSE;
+
+    DEBUG_API("->XACapabilitiesMgr_GetCapsById");
+
+    if(!currNode)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+
+    while (currNode)
+    {
+        if (((currNode->capsType & filter) == filter ) && (maxId==currNode->xaid))
+        {
+            memcpy(data, currNode, sizeof(XACapabilities));
+            found = XA_BOOLEAN_TRUE;
+            break;
+        }
+        currNode = currNode->next;
+    }
+
+    if(!found)
+    {
+       res = XA_RESULT_FEATURE_UNSUPPORTED;
+       return res;
+    }
+
+    DEBUG_API("<-XACapabilitiesMgr_GetCapsById");
+    return res;
+}
+
+/* XAresult XACapabilitiesMgr_GetCapsByIdx
+ * Description: Get n'th capabilities of type XACapsType
+ */
+XAresult XACapabilitiesMgr_GetCapsByIdx(XACapabilities* pListHead, XACapsType filter, XAuint32 idx, XACapabilities* data)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities* currNode = pListHead;
+    XAboolean found = XA_BOOLEAN_FALSE;
+    XAuint32 j = 0;
+
+
+    DEBUG_API("->XACapabilitiesMgr_GetCapsByIdx");
+
+    if(!currNode)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+
+
+    while (currNode)
+    {
+        if ((currNode->capsType & filter) == filter )
+        {
+            if( idx == j++ )
+            {
+                memcpy(data, currNode, sizeof(XACapabilities));
+                found = XA_BOOLEAN_TRUE;
+                break;
+            }
+        }
+        currNode = currNode->next;
+    }
+
+    if(!found)
+    {
+       res = XA_RESULT_PARAMETER_INVALID;
+       return res;
+    }
+
+    DEBUG_API("<-XACapabilitiesMgr_GetCapsByIdx");
+    return res;
+}
+
+/* XAresult XACapabilitiesMgr_QueryColorFormats
+ * Description: Get color formats associated with the XA_IMAGECODEC_RAW codec.
+ */
+XAresult XACapabilitiesMgr_QueryColorFormats(XACapabilities* pListHead, XAuint32* pIndex, XAuint32* pColorFormats)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities temp;
+
+    DEBUG_API("->XACapabilitiesMgr_QueryColorFormats");
+
+    if( !pIndex )
+    {
+        DEBUG_ERR("illegal NULL parameter");
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+
+    res = XACapabilitiesMgr_GetCapsById(pListHead, (XACapsType)((XACapsType)(XACAP_ENCODER|XACAP_IMAGE)), XA_IMAGECODEC_RAW, &temp);
+    if( res == XA_RESULT_SUCCESS )
+    {
+        if( !pColorFormats )
+        {   /* query number of color formats */
+            *pIndex = 1; /* one used by camera context */
+        }
+        else
+        {   /* query color format */
+            if( *pIndex >= 1 ) /* one used by camera context */
+            {
+                DEBUG_ERR("index parameter invalid");
+                res = XA_RESULT_PARAMETER_INVALID;
+            }
+            else
+            {   /* internal format used by pipeline, look camera context for details  */
+                *pColorFormats = XA_COLORFORMAT_YUV420PLANAR;
+            }
+        }
+    }
+    else
+    {
+        *pIndex = 0;
+    }
+
+    DEBUG_API("<-XACapabilitiesMgr_QueryColorFormats");
+    return res;
+}
+
+/* Add AudioInputDeviceCaps */
+XAresult XACapabilitiesMgr_GetAudioInputDeviceCapabilities(XACapabilities** ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioInputDescriptor *entries = NULL;
+/*    XAAudioInputDescriptor *entries = NULL;*/
+    XAchar micDeviceName[] = "Default Mic";
+    int strLen = 0;
+
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_I;
+    newNode->xaid = 0xAD7E5001;
+    newNode->noOfEntries = 1;
+
+    /* Allocate array */
+    entries = (XAAudioInputDescriptor*) calloc(1 , sizeof(XAAudioInputDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+ 
+    strLen = strlen((char*)micDeviceName);
+    entries->deviceName = (XAchar *)calloc(strLen + 1, sizeof(XAchar));
+    if (!entries->deviceName)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    strncpy((char*)entries->deviceName, (char*)micDeviceName, strLen);
+    entries->deviceName[strLen] = '\0'; /*Null terminate it*/
+    entries->deviceConnection = XA_DEVCONNECTION_INTEGRATED;
+    entries->deviceScope = XA_DEVSCOPE_ENVIRONMENT;
+    entries->deviceLocation = XA_DEVLOCATION_HANDSET;
+    entries->isForTelephony = XA_BOOLEAN_FALSE;
+    entries->minSampleRate=8000000; /* milliHz */
+    entries->maxSampleRate = 96000000; /* milliHz */
+    entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+    entries->numOfSamplingRatesSupported = 12;
+    entries->samplingRatesSupported = (XAmilliHertz*)calloc(entries->numOfSamplingRatesSupported, sizeof(XAmilliHertz));
+    if (!entries->samplingRatesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    /* entries in milliHz */
+    entries->samplingRatesSupported[0] = 8000000;
+    entries->samplingRatesSupported[1] = 11025000;
+    entries->samplingRatesSupported[2] = 12000000;
+    entries->samplingRatesSupported[3] = 16000000;
+    entries->samplingRatesSupported[4] = 22050000;
+    entries->samplingRatesSupported[5] = 24000000;
+    entries->samplingRatesSupported[6] = 32000000;
+    entries->samplingRatesSupported[7] = 44100000;
+    entries->samplingRatesSupported[8] = 48000000;
+    entries->samplingRatesSupported[9] = 64000000;
+    entries->samplingRatesSupported[10] = 88200000;
+    entries->samplingRatesSupported[11] = 96000000;
+    entries->maxChannels = 2;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
+
+XAresult XACapabilitiesMgr_GetAudioOutputDeviceCapabilities(XACapabilities **ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioOutputDescriptor *entries = NULL;
+/*    XAAudioOutputDescriptor *entries = NULL;*/
+    XAchar outputDeviceName[] = "Default Speaker";
+    int strLen = 0;
+
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_O;
+    newNode->xaid = 0xAD7E5002;
+    newNode->noOfEntries = 1;
+
+    /* Allocate array */
+    entries = (XAAudioOutputDescriptor*)calloc(1, sizeof(XAAudioOutputDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+
+    strLen = strlen((char*)outputDeviceName);
+    entries->pDeviceName = (XAchar *)calloc(strLen + 1, sizeof(XAchar));
+    if (!entries->pDeviceName)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    strncpy((char*)entries->pDeviceName, (char*)outputDeviceName, strLen);
+    entries->pDeviceName[strLen] = '\0'; /*Null terminate it*/
+    entries->deviceConnection = XA_DEVCONNECTION_INTEGRATED;
+    entries->deviceScope = XA_DEVSCOPE_ENVIRONMENT;
+    entries->deviceLocation = XA_DEVLOCATION_HANDSET;
+    entries->isForTelephony = XA_BOOLEAN_FALSE;
+    entries->minSampleRate = 8000000; /* milliHz */
+    entries->maxSampleRate = 96000000; /* milliHz */
+    entries->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
+    entries->numOfSamplingRatesSupported = 12;
+    entries->samplingRatesSupported = (XAmilliHertz*)calloc(entries->numOfSamplingRatesSupported, sizeof(XAmilliHertz));
+    if (!entries->samplingRatesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    /* entries in milliHz */
+    entries->samplingRatesSupported[0] = 8000000;
+    entries->samplingRatesSupported[1] = 11025000;
+    entries->samplingRatesSupported[2] = 12000000;
+    entries->samplingRatesSupported[3] = 16000000;
+    entries->samplingRatesSupported[4] = 22050000;
+    entries->samplingRatesSupported[5] = 24000000;
+    entries->samplingRatesSupported[6] = 32000000;
+    entries->samplingRatesSupported[7] = 44100000;
+    entries->samplingRatesSupported[8] = 48000000;
+    entries->samplingRatesSupported[9] = 64000000;
+    entries->samplingRatesSupported[10] = 88200000;
+    entries->samplingRatesSupported[11] = 96000000;
+    entries->maxChannels = 2;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef XACAPABILITIESMGR_H
+#define XACAPABILITIESMGR_H
+
+#include "xaframeworkmgr.h"
+#include "openmaxalwrapper.h"
+#include "xaglobals.h"
+
+
+#define AUD_D (XACAP_DECODER|XACAP_AUDIO)
+#define AUD_E (XACAP_ENCODER|XACAP_AUDIO)
+#define VID_D (XACAP_DECODER|XACAP_VIDEO)
+#define VID_E ((XACapsType)(XACAP_ENCODER|XACAP_VIDEO))
+#define IMG_D (XACAP_DECODER|XACAP_IMAGE)
+#define IMG_E ((XACapsType)(XACAP_ENCODER|XACAP_IMAGE))
+#define AUD_O ((XACapsType)(XACAP_DEVSNK|XACAP_AUDIO))
+#define AUD_I (XACAP_DEVSRC|XACAP_AUDIO)
+#define VID_O (XACAP_DEVSNK|XACAP_VIDEO)
+#define VID_I (XACAP_DEVSRC|XACAP_VIDEO)
+#define ANY 0x7FFFFFFF
+
+/* Structure to hold commonly used capabilities of codec/device.
+ */
+typedef struct XACapabilities_ XACapabilities;
+
+struct XACapabilities_
+{
+    XAuint32    capsType;
+    XAuint32    xaid;       /* OpenMAX id (e.g. XA_VIDEOCODEC macro) */
+    XAchar*    adaptId;    /* TODO fill this */
+    /* TODO Do we need a flag for default device id? */
+    XAuint32    noOfEntries;
+    void*       pEntry;
+
+    /*add if/when needed*/
+    XACapabilities* next;
+};
+
+
+XAresult XACapabilitiesMgr_CreateCapabilitieList(
+            FrameworkMap* frameworkMap,
+            XACapabilities** ppListHead);
+
+XAresult XACapabilitiesMgr_DeleteCapabilitieList(XACapabilities** ppListHead);
+
+XAresult XACapabilitiesMgr_GetCapsCount(
+                XACapabilities* pListHead,
+                XACapsType filter,
+                XAuint32* count);
+
+XAresult XACapabilitiesMgr_GetCapsById(
+                XACapabilities* pListHead,
+                XACapsType filter,
+                XAuint32 maxId,
+                XACapabilities* data);
+
+XAresult XACapabilitiesMgr_GetCapsByIdx(
+                XACapabilities* pListHead,
+                XACapsType filter,
+                XAuint32 idx,
+                XACapabilities* data);
+
+XAresult XACapabilitiesMgr_QueryColorFormats(
+                XACapabilities* pListHead,
+                XAuint32* pIndex,
+                XAuint32* pColorFormats);
+
+#endif /* XACAPABILITIESMGR_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,579 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "xaframeworkmgr.h"
+#include <stdio.h>
+#include <string.h>
+
+/* Default line width permitted in the cfg file + 2 to hold "\r\n"*/
+#define LINEWIDTH 82
+
+typedef enum
+{
+    FWMgrTagNone,
+    FWMgrTagURIScheme,
+    FWMgrTagFileExt
+} FWMgrTagType;
+
+
+/* Config file location */
+const char configFileLocation[] = "c:/openmaxal/openmaxal.cfg";
+
+/* Tags used for parsing */
+const char mediaPlayerBeginTag[] = "<mediaplayer>";
+const char mediaPlayerEndTag[] = "</mediaplayer>";
+const char mediaRecorderBeginTag[] = "<mediarecorder>";
+const char mediaRecorderEndTag[] = "</mediarecorder>";
+const char mediaFrameworkMmfBeginTag[] = "<mmf>";
+const char mediaFrameworkMmfEndTag[] = "</mmf>";
+const char mediaFrameworkGstBeginTag[] = "<gst>";
+const char uriSchemeBeginTag[] = "<urischeme>";
+const char uriSchemeEndTag[] = "</urischeme>";
+const char mediaFrameworkGstEndTag[] = "</gst>";
+const char fileExtBeginTag[] = "<fileext>";
+const char fileExtEndTag[] = "</fileext>";
+
+/* Local function definitions */
+/* returns FWMgrTrue if processed successfully */
+static FWMgrBool processConfigEntry(
+        const char* buffer,
+        FWMgrMOType *mediaType,
+        FWMgrFwType *frameworkType,
+        FWMgrTagType *tagType,
+        FWMgrBool *newNode,
+        FrameworkMap **node);
+
+/* returns FWMgrTrue if processed successfully */
+static FWMgrBool processTagType(
+        const char* buffer,
+        FWMgrFwType *frameworkType,
+        FWMgrTagType *tagType,
+        FrameworkMap **node);
+
+/* returns FWMgrTrue if processed successfully */
+static FWMgrBool tokenizeTag(FWMgrTagType tagType, const char* buffer, FrameworkMap **node);
+
+/* Crates a default rules config file */
+static int createDefaultRules(const char * filename);
+
+/* Global functions from header file */
+
+/* FrameworkMap* XAFrameworkMgr_CreateFrameworkMap
+ * Description: Creates a list of framework and use-case map.
+ */
+FrameworkMap* XAFrameworkMgr_CreateFrameworkMap()
+{
+    char buffer[LINEWIDTH];
+    int readSize;
+    int lineNumber = 0;
+    FWMgrBool processedEntry = FWMgrTrue;
+    FWMgrMOType currentMediaType = FWMgrMOUnknown;
+    FWMgrFwType currentFrameworkType = FWMgrFWUknown;
+    FWMgrTagType currentTagType = FWMgrTagNone;
+    FrameworkMap *curNode = NULL;
+    FWMgrBool newNode;
+    FrameworkMap *frameworkMap = NULL;
+    FILE* fp = fopen(configFileLocation, "r");
+    
+    if (fp == NULL)
+        {
+        createDefaultRules(configFileLocation);
+        }
+
+    fp = fopen(configFileLocation, "r");
+    if (fp != NULL)
+    {
+        while((fgets(buffer, LINEWIDTH, fp) != NULL) && processedEntry)
+        {
+            /* keep looping until NULL pointer OR error... */
+            lineNumber++;
+            readSize = strlen(buffer);
+            /* Ignore comments line */
+            if (buffer[0] == '#')
+                continue;
+
+            /* Ignore replace "\r\n" with '\0' */
+            if ((readSize >= 2) && (buffer[readSize-2]=='\r') && (buffer[readSize-1]=='\n'))
+                buffer[readSize-2]='\0';
+
+            /* Ignore new line... */
+            if (readSize == 2)
+                continue;
+
+            processedEntry = processConfigEntry(
+                                buffer,
+                                &currentMediaType,
+                                &currentFrameworkType,
+                                &currentTagType,
+                                &newNode,
+                                &curNode);
+            if (newNode)
+            {
+                /*Just link to the last element in the chain*/
+                if (!frameworkMap)
+                {
+                    frameworkMap = curNode;
+                }
+                else
+                {
+                    FrameworkMap *lastNode = frameworkMap;
+                    while (lastNode->next)
+                    {
+                        lastNode = lastNode->next;
+                    }
+                    lastNode->next = curNode;
+                }
+            }
+        }
+        fclose(fp);
+    }
+    else
+    {
+        printf("unable to open config file!\n");
+    }
+    return frameworkMap;
+}
+
+#ifdef _DEBUG
+/* void XAFrameworkMgr_DumpFrameworkMap
+ * Description: Prints map to std console.
+ */
+void XAFrameworkMgr_DumpFrameworkMap(FrameworkMap *map)
+{
+    FrameworkMap *node = map;
+    int i;
+    int loopIndex = 0;
+    while (node)
+    {
+        loopIndex++;
+        printf("%d>", loopIndex);
+        if (node->moType == FWMgrMOPlayer)
+            printf("MediaPlayer-");
+        else if (node->moType == FWMgrMORecorder)
+            printf("MediaRecrdr-");
+        else
+            printf("UKNOWN-");
+        if (node->fwType == FWMgrFWMMF)
+            printf("MMF-");
+        else if (node->fwType == FWMgrFWGST)
+            printf("GST-");
+        else
+            printf("UKNOWN-");
+        printf("Scheme[");
+        for(i=0;i<node->uriSchemeCount;i++)
+            printf(" %s", node->uriSchemes[i]);
+        printf("]FileExt[");
+        for(i=0;i<node->fileExtCount;i++)
+            printf(" %s", node->fileExts[i]);
+        printf("]\n");
+        node = node->next;
+    }
+}
+#endif
+
+/* void XAFrameworkMgr_DeleteFrameworkMap
+ * Description: Deletes the list of framework and use-case map.
+ */
+void XAFrameworkMgr_DeleteFrameworkMap(FrameworkMap **map)
+{
+    FrameworkMap *node = *map;
+    FrameworkMap *nextNode = NULL;
+    int i;
+    while (node)
+    {
+        for(i=0;i<node->uriSchemeCount;i++)
+            free (node->uriSchemes[i]);
+        free (node->uriSchemes);
+
+        for(i=0;i<node->fileExtCount;i++)
+            free (node->fileExts[i]);
+        free (node->fileExts);
+
+        nextNode = node->next;
+        free (node);
+        node = nextNode;
+    }
+    *map = NULL;
+}
+
+/* FWMgrFwType XAFrameworkMgr_GetFramework
+ * Description: Returns the framework enum that handles uri.
+ */
+FWMgrFwType XAFrameworkMgr_GetFramework(
+                    FrameworkMap *map,
+                    const char *uri,
+                    FWMgrMOType mediaObject)
+{
+    FWMgrFwType retVal = FWMgrFWUknown;
+    char fileScheme[] = "file";
+    char *uriScheme = NULL;
+    char *fileExt = NULL;
+    FrameworkMap *node = map;
+    FWMgrBool uriMatchFound = FWMgrFalse;
+    FWMgrBool fileExtMatchFound = FWMgrFalse;
+    int i = 0;
+    int copyLen = 0;
+
+    if (!map || !uri)
+    {
+        /* TODO Log invalid uri */
+        return retVal;
+    }
+
+    /* Get uri scheme */
+    uriScheme = strchr(uri, ':');
+    if ( uriScheme == NULL)
+    {
+        /* TODO Log invalid uri */
+        return retVal;
+    }
+
+    copyLen = (uriScheme - uri);
+    uriScheme = (char*)calloc(copyLen + 1, sizeof(char));
+    strncpy(uriScheme, uri, copyLen);
+    uriScheme[copyLen] = '\0'; /*Null terminate it*/
+
+    if (strcasecmp(uriScheme, fileScheme) == 0)
+    {
+        /* Get uri extension */
+        char* dotLoc = strrchr(uri, '.');
+        if ( dotLoc == NULL)
+        {
+            /* TODO Log invalid uri */
+            free(uriScheme);
+            return retVal;
+        }
+        /* We need to add 1 to exclude '.'*/
+        copyLen = strlen(uri) - (dotLoc + 1 - uri);
+        fileExt = (char*)calloc(copyLen + 1, sizeof(char));
+        strncpy(fileExt, dotLoc + 1, copyLen);
+        fileExt[copyLen] = '\0'; /*Null terminate it*/
+    }
+
+    while (node)
+    {
+        if (mediaObject == node->moType)
+            {
+            uriMatchFound = FWMgrFalse;
+            fileExtMatchFound = FWMgrFalse;
+            /* Match for uri*/
+            for(i = 0; i < node->uriSchemeCount; i++)
+            {
+                if (strcasecmp(uriScheme, node->uriSchemes[i]) == 0)
+                    {
+                        uriMatchFound = FWMgrTrue;
+                        break;
+                    }
+            }
+            /* if uri scheme is not file, we only need to check for uri */
+            if (!fileExt)
+            {
+                fileExtMatchFound = FWMgrTrue;
+            }
+            else
+            {
+                for(i = 0; i < node->fileExtCount; i++)
+                {
+                    if (strcasecmp(fileExt, node->fileExts[i]) == 0)
+                    {
+                        fileExtMatchFound = FWMgrTrue;
+                        break;
+                    }
+                }
+            }
+
+            if ((uriMatchFound == FWMgrTrue) &&
+                (fileExtMatchFound == FWMgrTrue))
+                {
+                    retVal = node->fwType;
+                    break;
+                }
+            }
+        node = node->next;
+    }
+    free(uriScheme);
+    free(fileExt);
+    return retVal;
+}
+
+/* Local functions */
+
+/* FWMgrBool processConfigEntry
+ * Description: Processes a single line entry from the config file.
+ */
+FWMgrBool processConfigEntry(
+        const char* buffer,
+        FWMgrMOType *mediaType,
+        FWMgrFwType *frameworkType,
+        FWMgrTagType *tagType,
+        FWMgrBool *newNode,
+        FrameworkMap **node)
+{
+    FWMgrBool processedSuccessfully = FWMgrTrue;
+    *newNode = FWMgrFalse;
+    switch (*mediaType)
+    {
+        case FWMgrMOUnknown:
+        {
+            if (strcmp(buffer, mediaPlayerBeginTag) == 0)
+            {
+                *mediaType = FWMgrMOPlayer;
+                *frameworkType = FWMgrFWUknown;
+                *tagType = FWMgrTagNone;
+                *node = NULL;
+            }
+            else if (strcmp(buffer, mediaRecorderBeginTag) == 0)
+            {
+                *mediaType = FWMgrMORecorder;
+                *frameworkType = FWMgrFWUknown;
+                *tagType = FWMgrTagNone;
+                *node = NULL;
+            }
+        }
+            break;
+        case FWMgrMOPlayer:
+        case FWMgrMORecorder:
+        {
+            switch (*frameworkType)
+            {
+                case FWMgrFWUknown:
+                {
+                    if ((*mediaType == FWMgrMOPlayer) && (strcmp(buffer, mediaPlayerEndTag) == 0))
+                        *mediaType = FWMgrMOUnknown;
+                    else if ((*mediaType == FWMgrMORecorder) && (strcmp(buffer, mediaRecorderEndTag) == 0))
+                        *mediaType = FWMgrMOUnknown;
+                    else if ( (strcmp(buffer, mediaFrameworkMmfBeginTag) == 0) ||
+                              (strcmp(buffer, mediaFrameworkGstBeginTag) == 0) )
+                    {
+                        *frameworkType = FWMgrFWMMF;
+                        if (strcmp(buffer, mediaFrameworkGstBeginTag) == 0)
+                            *frameworkType = FWMgrFWGST;
+                        if (*node)
+                        {
+                            printf("Fatal error error. Entry already exists and creating another one!!!");
+                            return FWMgrFalse;
+                        }
+                        *node = (FrameworkMap*)calloc(1, sizeof(FrameworkMap));
+                        if (!(*node))
+                        {
+                            printf("Fatal error. No memory to create an Entry!!!");
+                            return FWMgrFalse;
+                        }
+                        *newNode = FWMgrTrue;
+                        (*node)->moType = *mediaType;
+                        (*node)->fwType = *frameworkType;
+                    }
+                }
+                    break;
+                case FWMgrFWMMF:
+                {
+                    processedSuccessfully = processTagType(
+                                                buffer,
+                                                frameworkType,
+                                                tagType,
+                                                node);
+                }
+                    break;
+                case FWMgrFWGST:
+                {
+                    processedSuccessfully = processTagType(
+                                                buffer,
+                                                frameworkType,
+                                                tagType,
+                                                node);
+                }
+                    break;
+                default:
+                    processedSuccessfully = FWMgrFalse;
+                    break;
+            };
+        }
+            break;
+        default:
+            processedSuccessfully = FWMgrFalse;
+            break;
+    };
+    return processedSuccessfully;
+}
+
+/* FWMgrBool processTagType
+ * Description: Processes a framework type, uri, file tags entry from the config file.
+ */
+FWMgrBool processTagType(const char* buffer,
+        FWMgrFwType *frameworkType,
+        FWMgrTagType *tagType,
+        FrameworkMap **node)
+{
+    FWMgrBool processedSuccessfully = FWMgrTrue;
+    switch (*tagType)
+    {
+        case FWMgrTagNone:
+        {
+            if (((*frameworkType == FWMgrFWMMF) && (strcmp(buffer, mediaFrameworkMmfEndTag) == 0)) ||
+                ((*frameworkType == FWMgrFWGST) && (strcmp(buffer, mediaFrameworkGstEndTag) == 0)))
+            {
+                *node = NULL;
+                *frameworkType = FWMgrFWUknown;
+            }
+            else if (strcmp(buffer, uriSchemeBeginTag) == 0)
+                *tagType = FWMgrTagURIScheme;
+            else if (strcmp(buffer, fileExtBeginTag) == 0)
+                *tagType = FWMgrTagFileExt;
+        }
+            break;
+        case FWMgrTagURIScheme:
+        {
+            if (strcmp(buffer, uriSchemeEndTag) == 0)
+                *tagType = FWMgrTagNone;
+            else
+            {
+                processedSuccessfully = FWMgrFalse;
+                if (*node)
+                    processedSuccessfully = tokenizeTag(FWMgrTagURIScheme, buffer, node);
+            }
+        }
+            break;
+        case FWMgrTagFileExt:
+        {
+            if (strcmp(buffer, fileExtEndTag) == 0)
+                *tagType = FWMgrTagNone;
+            else
+            {
+                processedSuccessfully = FWMgrFalse;
+                if (*node)
+                    processedSuccessfully = tokenizeTag(FWMgrTagFileExt, buffer, node);
+            }
+        }
+            break;
+        default:
+            break;
+    };
+    return processedSuccessfully;
+}
+
+/* FWMgrBool processTagType
+ * Description: Processes a framework type, uri, file tags entry from the config file.
+ */
+FWMgrBool tokenizeTag(FWMgrTagType tagType, const char* buffer, FrameworkMap **node)
+{
+    char* tempStartPtr = /*const_cast<char*>*/(char*)(buffer);
+    char* tempEndPtr = /*const_cast<char*>*/(char*)(buffer);
+    int index = 0;
+    int strLen = 0;
+
+    if (tagType == FWMgrTagURIScheme)
+    {
+        (*node)->uriSchemeCount = atoi(buffer);
+        (*node)->uriSchemes =  (char**)calloc((*node)->uriSchemeCount,  sizeof (*((*node)->uriSchemes)));
+        if (!(*node)->uriSchemes)
+        {
+            printf("Fatal error. No memory to create an Entry!!!");
+            return FWMgrFalse;
+        }
+    }
+    else if (tagType == FWMgrTagFileExt)
+    {
+        (*node)->fileExtCount = atoi(buffer);
+        (*node)->fileExts =  (char**)calloc((*node)->fileExtCount,  sizeof (*((*node)->fileExts)));
+        if (!(*node)->fileExts)
+        {
+            printf("Fatal error. No memory to create an Entry!!!");
+            return FWMgrFalse;
+        }
+    }
+    else
+        return FWMgrFalse;
+
+    /*Find the index of :*/
+    tempStartPtr = strchr(tempStartPtr, ',');
+    index = 0;
+    while (tempStartPtr && (strlen(tempStartPtr) > 1))
+    {
+        tempStartPtr++; /* Ignore separator ','*/
+        tempEndPtr = strchr(tempStartPtr, ',');
+        strLen = (tempEndPtr - tempStartPtr) + 1; /* To hold null terminator */
+        if (strLen > 0)
+        {
+            if (tagType == FWMgrTagURIScheme)
+            {
+                (*node)->uriSchemes[index] = (char*)calloc(strLen, sizeof(char));
+                strncpy((*node)->uriSchemes[index], tempStartPtr, strLen);
+                (*node)->uriSchemes[index][strLen-1] = '\0'; /*Null terminate it*/
+                index++;
+            }
+            else if (tagType == FWMgrTagFileExt)
+            {
+                (*node)->fileExts[index] = (char*)calloc(strLen, sizeof(char));
+                strncpy((*node)->fileExts[index], tempStartPtr, strLen);
+                (*node)->fileExts[index][strLen-1] = '\0'; /*Null terminate it*/
+                index++;
+            }
+        }
+        tempStartPtr = tempEndPtr;
+    }
+    return FWMgrTrue;
+}
+
+int createDefaultRules(const char * filename)
+{
+    FILE* fp = fopen(filename, "w");
+    if (fp == NULL)
+        return /*KErrAccessDenied*/-21;
+    fputs("#/*\r\n", fp);
+    fputs("#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\r\n", fp);
+    fputs("#* All rights reserved.\r\n", fp);
+    fputs("#* This component and the accompanying materials are made available\r\n", fp);
+    fputs("#* under the terms of \"Eclipse Public License v1.0\"\r\n", fp);
+    fputs("#* which accompanies this distribution, and is available\r\n", fp);
+    fputs("#* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\r\n", fp);
+    fputs("#*\r\n", fp);
+    fputs("#* Initial Contributors:\r\n", fp);
+    fputs("#* Nokia Corporation - initial contribution.\r\n", fp);
+    fputs("#*\r\n", fp);
+    fputs("#* Contributors:\r\n", fp);
+    fputs("#*\r\n", fp);
+    fputs("#* Description:\r\n", fp); 
+    fputs("#*\r\n", fp);
+    fputs("#*/\r\n", fp);
+    fputs("#============================================================================>|\r\n", fp);
+    fputs("# Must not exceed 80 chars each line=========================================>|\r\n", fp);
+    fputs("#============================================================================>|\r\n", fp);
+    fputs("<mediaplayer>\r\n", fp);
+    fputs("<mmf>\r\n", fp);
+    fputs("<urischeme>\r\n", fp);
+    fputs("# Num of entries followed by actual entries all ending with a comma\r\n", fp);
+    fputs("3,file,http,rtsp,\r\n", fp);
+    fputs("</urischeme>\r\n", fp);
+    fputs("<fileext>\r\n", fp);
+    fputs("15,3gp,wma,wmv,wav,amr,mp3,mp4,rm,ra,avi,mkv,aac,mid,awb,3g2,\r\n", fp);
+    fputs("</fileext>\r\n", fp);
+    fputs("</mmf>\r\n", fp);
+    fputs("</mediaplayer>\r\n", fp);
+    fputs("<mediarecorder>\r\n", fp);
+    fputs("<gst>\r\n", fp);
+    fputs("<urischeme>\r\n", fp);
+    fputs("# Num of entries followed by actual entries all ending with a comma\r\n", fp);
+    fputs("1,file,\r\n", fp);
+    fputs("</urischeme>\r\n", fp);
+    fputs("<fileext>\r\n", fp);
+    fputs("3,wav,amr,mp4,\r\n", fp);
+    fputs("</fileext>\r\n", fp);
+    fputs("</gst>\r\n", fp);
+    fputs("</mediarecorder>\r\n", fp);
+    fclose(fp);
+    return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,69 @@
+
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef XAFRAMEWORKMANAGER_H
+#define XAFRAMEWORKMANAGER_H
+
+#include <stdlib.h>
+
+typedef enum
+{
+    FWMgrMOUnknown,
+    FWMgrMOPlayer,
+    FWMgrMORecorder
+} FWMgrMOType;
+
+typedef enum
+{
+    FWMgrFWUknown,
+    FWMgrFWMMF,
+    FWMgrFWGST
+} FWMgrFwType;
+
+typedef enum
+{
+    FWMgrFalse,
+    FWMgrTrue
+} FWMgrBool;
+
+typedef struct FrameworkMap_ FrameworkMap;
+
+struct FrameworkMap_
+{
+    FWMgrMOType moType;
+    int uriSchemeCount;
+    char **uriSchemes;
+    int fileExtCount;
+    char **fileExts;
+    FWMgrFwType fwType;
+    FrameworkMap *next;
+};
+
+
+FrameworkMap* XAFrameworkMgr_CreateFrameworkMap(void);
+#ifdef _DEBUG
+void XAFrameworkMgr_DumpFrameworkMap(FrameworkMap *map);
+#endif
+void XAFrameworkMgr_DeleteFrameworkMap(FrameworkMap **map);
+
+FWMgrFwType XAFrameworkMgr_GetFramework(
+                    FrameworkMap *map,
+                    const char *uri,
+                    FWMgrMOType mediaObject);
+
+#endif //XAFRAMEWORKMANAGER_H
--- a/khronosfws/openmax_al/src/camera/xacameradevice.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/camera/xacameradevice.c	Fri Apr 30 19:18:45 2010 -0500
@@ -26,6 +26,9 @@
 #include "xaimageeffectsitf.h"
 #include "xavideopostprocessingitf.h"
 #include "xathreadsafety.h"
+#include "xaframeworkmgr.h"
+#include "xacameraadaptctx.h"
+#include "xacapabilitiesmgr.h"
 
 /* Static mapping of enumeration XACameraDeviceInterfaces to interface iids */
 static const XAInterfaceID* XACameraDeviceItfIIDs[CAMERA_ITFCOUNT]=
@@ -47,7 +50,9 @@
 /* XAResult XACameraDeviceImpl_Create
  * Description: Create object
  */
-XAresult XACameraDeviceImpl_CreateCameraDevice(XAObjectItf* pDevice,
+XAresult XACameraDeviceImpl_CreateCameraDevice(FrameworkMap* mapper,
+                                                XACapabilities* capabilities,   
+                                               XAObjectItf* pDevice,
                                                XAuint32 deviceID,
                                                XAuint32 numInterfaces,
                                                const XAInterfaceID * pInterfaceIds,
@@ -130,34 +135,26 @@
     /* Mandated dynamic itfs */
     pBaseObj->interfaceMap[CAMERA_IMAGEEFFECTSITF].isDynamic = XA_BOOLEAN_TRUE;
 
-
-    /* Initialize XACameraDeviceImpl variables */
-    pImpl->deviceID = deviceID;
-#ifdef _GSTREAMER_BACKEND_   
-    pImpl->adaptationCtx = XACameraAdapt_Create(pImpl->deviceID);
-#endif
-    
-    
     /* This code is put here to return Feature Not Supported since adaptation is not present*/
     /*************************************************/
     XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
     XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
     DEBUG_ERR("Required interface not found - abort creation!");
     DEBUG_API("<-XACameraDeviceImpl_Create");
-    return XA_RESULT_FEATURE_UNSUPPORTED;    
+    return XA_RESULT_FEATURE_UNSUPPORTED;
     /*************************************************/
-
     
-    
-    
-    /* Set ObjectItf to point to newly created object */
-/*
+/*     Initialize XACameraDeviceImpl variables 
+    pImpl->deviceID = deviceID;
+
+    pImpl->adaptationCtx = XACameraAdapt_Create(pImpl->deviceID);
+
+     Set ObjectItf to point to newly created object 
     *pDevice = (XAObjectItf)&(pBaseObj->self);
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
     DEBUG_API("<-XACameraDeviceImpl_Create");
-    return XA_RESULT_SUCCESS;
-*/
+    return XA_RESULT_SUCCESS;*/
 }
 
 /* XAResult XACameraDeviceImpl_QueryNumSupportedInterfaces
@@ -234,9 +231,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_   
+ 
     ret = XACameraAdapt_PostInit( pObjImpl->adaptationCtx );
-#endif
+
     if( ret != XA_RESULT_SUCCESS )
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
@@ -264,7 +261,7 @@
                                 XACameraDeviceImpl_DoRemoveItf);
                     }
                     break;
-#ifdef _GSTREAMER_BACKEND_   
+  
                 case CAMERA_CAMERAITF:
                     pItf = XACameraItfImpl_Create( pObjImpl->adaptationCtx );
                     break;
@@ -280,7 +277,7 @@
                 case CAMERA_VIDEOPOSTPROCESSINGITF:
                      pItf = XAVideoPostProcessingItfImpl_Create( pObjImpl->adaptationCtx );
                      break;
-#endif                     
+                  
                 default:
                     break;
             }
@@ -323,12 +320,12 @@
 {
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAuint8 itfIdx = 0;
+    XACameraDeviceImpl* pImpl = (XACameraDeviceImpl*)(*self);
+    assert( pObj && pImpl && pObj == pObj->self );
     DEBUG_API("->XACameraDeviceImpl_FreeResources");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSCamera);
-#ifdef _GSTREAMER_BACKEND_ 
-    XACameraDeviceImpl* pImpl = (XACameraDeviceImpl*)(*self);
-    assert( pObj && pImpl && pObj == pObj->self );
-#endif
+    
+
     
 
     /* free all allocated interfaces */
@@ -363,13 +360,13 @@
             pObj->interfaceMap[itfIdx].pItf = NULL;
         }
     }
-#ifdef _GSTREAMER_BACKEND_   
+  
     if ( pImpl->adaptationCtx != NULL )
     {
         XACameraAdapt_Destroy( pImpl->adaptationCtx );
         pImpl->adaptationCtx = NULL;
     }
-#endif
+
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSCamera);
     DEBUG_API("<-XACameraDeviceImpl_FreeResources");
     return;
@@ -384,10 +381,10 @@
  */
 XAresult XACameraDeviceImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
 {
-#ifdef _GSTREAMER_BACKEND_
+
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XACameraDeviceImpl* pImpl = (XACameraDeviceImpl*)(pObj);
-#endif
+
     XAresult ret = XA_RESULT_SUCCESS;
     DEBUG_API("->XACameraDeviceImpl_DoAddItf");
     if(mapEntry)
@@ -395,9 +392,7 @@
         switch( mapEntry->mapIdx )
         {
         case CAMERA_IMAGEEFFECTSITF:
-#ifdef _GSTREAMER_BACKEND_   
             mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->adaptationCtx );
-#endif
             break;
         default:
             DEBUG_ERR("XACameraDeviceImpl_DoAddItf unknown id");
--- a/khronosfws/openmax_al/src/camera/xacameradevice.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/camera/xacameradevice.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,9 +21,7 @@
 #include "openmaxalwrapper.h"
 #include "xaobjectitf.h"
 #include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "../adaptation/XACameraAdaptCtx.h"
-#endif
+#include "xaadptbasectx.h"
 /** MACROS **/
 
 
@@ -53,9 +51,9 @@
 
     /* variables */
     XAuint32 deviceID;
-#ifdef _GSTREAMER_BACKEND_
+
     XAAdaptationBaseCtx* adaptationCtx;
-#endif    
+  
 } XACameraDeviceImpl;
 
 
--- a/khronosfws/openmax_al/src/camera/xacameraitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/camera/xacameraitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xacameraitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XACameraItfAdaptation.h"
-#endif
+
+#include "xacameraitfadaptation.h"
+
 #include "xathreadsafety.h"
 
 /* XACameraItfImpl* GetImpl(XACameraItf self)
@@ -98,10 +98,16 @@
     /* check is flash mode changed */
     if( impl->flashMode != flashMode )
     {
-#ifdef _GSTREAMER_BACKEND_    
-        ret = XACameraItfAdapt_SetFlashMode( impl->adapCtx, flashMode );
-#endif        
-        if ( ret == XA_RESULT_SUCCESS )
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetFlashMode( (XAAdaptationGstCtx*)impl->adapCtx, flashMode );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }    
+    if ( ret == XA_RESULT_SUCCESS )
         {
             impl->flashMode = flashMode;
         }
@@ -189,10 +195,16 @@
     /* check is focus mode changed */
     if( impl->focusMode != focusMode )
     {
-#ifdef _GSTREAMER_BACKEND_       
-        ret = XACameraItfAdapt_SetFocusMode( impl->adapCtx, focusMode, manualSetting, macroEnabled  );
-#endif        
-        if ( ret == XA_RESULT_SUCCESS )
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetFocusMode( (XAAdaptationGstCtx*)impl->adapCtx, focusMode, manualSetting, macroEnabled  );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }    
+    if ( ret == XA_RESULT_SUCCESS )
         {
             impl->focusMode = focusMode;
             impl->focusManualSetting = manualSetting;
@@ -271,10 +283,16 @@
     /* check is focus pattern changed */
     if( focusPattern == impl->focusPattern )
     {
-#ifdef _GSTREAMER_BACKEND_   
-        ret = XACameraItfAdapt_SetFocusRegionPattern( impl->adapCtx, focusPattern, activePoints1, activePoints2 );
-#endif
-        if (ret == XA_RESULT_SUCCESS)
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetFocusRegionPattern( (XAAdaptationGstCtx*)impl->adapCtx, focusPattern, activePoints1, activePoints2 );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }     
+    if (ret == XA_RESULT_SUCCESS)
         {
             impl->focusPattern = focusPattern;
             if( !(impl->focusMode & XA_CAMERA_FOCUSMODE_MANUAL) )
@@ -349,11 +367,16 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-
-#ifdef _GSTREAMER_BACKEND_       
-    ret = XACameraItfAdapt_GetFocusRegionPositions( impl->adapCtx, pNumPositionEntries,
-                                                    pFocusPosition );
-#endif
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_GetFocusRegionPositions( (XAAdaptationGstCtx*)impl->adapCtx, pNumPositionEntries,
+                                                            pFocusPosition );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }  
     DEBUG_API("<-XACameraItfImpl_GetFocusRegionPositions");
     return ret;
 }
@@ -407,9 +430,15 @@
         DEBUG_API("<-XACameraItfImpl_SetMeteringMode");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_   
-    ret = XACameraItfAdapt_SetMeteringMode( impl->adapCtx, meteringMode );
-#endif
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetMeteringMode( (XAAdaptationGstCtx*)impl->adapCtx, meteringMode );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }    
     if ( ret == XA_RESULT_SUCCESS )
     {
         impl->meteringMode = meteringMode;
@@ -470,10 +499,16 @@
     /* check is focus mode changed */
     if( impl->exposureMode != exposure || impl->compensation != compensation )
     {
-#ifdef _GSTREAMER_BACKEND_   
-    ret = XACameraItfAdapt_SetExposureMode( impl->adapCtx, exposure, exposure );
-#endif
-        if ( ret == XA_RESULT_SUCCESS )
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetExposureMode( (XAAdaptationGstCtx*)impl->adapCtx, exposure, exposure );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    if ( ret == XA_RESULT_SUCCESS )
         {
             impl->exposureMode = exposure;
             impl->compensation = compensation;
@@ -539,10 +574,16 @@
     /* check is focus mode changed */
     if( impl->isoSensitivity != isoSensitivity || impl->isoManualSetting != manualSetting )
     {
-#ifdef _GSTREAMER_BACKEND_   
-    ret = XACameraItfAdapt_SetISOSensitivity( impl->adapCtx, isoSensitivity, manualSetting );
-#endif
-        if ( ret == XA_RESULT_SUCCESS )
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetISOSensitivity((XAAdaptationGstCtx*)impl->adapCtx, isoSensitivity, manualSetting );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    if ( ret == XA_RESULT_SUCCESS )
         {
             impl->isoSensitivity = isoSensitivity;
             impl->isoManualSetting = manualSetting;
@@ -616,10 +657,16 @@
     /* check is aperture mode or value changed */
     if( impl->aperture != aperture || impl->apertureManualSetting != manualSetting )
     {
-#ifdef _GSTREAMER_BACKEND_   
-        ret = XACameraItfAdapt_SetAperture( impl->adapCtx, aperture, manualSetting );
-#endif
-        if ( ret == XA_RESULT_SUCCESS )
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetAperture( (XAAdaptationGstCtx*)impl->adapCtx, aperture, manualSetting );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    if ( ret == XA_RESULT_SUCCESS )
         {
             impl->aperture = aperture;
             impl->apertureManualSetting = manualSetting;
@@ -689,10 +736,15 @@
         DEBUG_API("<-XACameraItfImpl_SetShutterSpeed");
         return XA_RESULT_PARAMETER_INVALID;
     }
-
-#ifdef _GSTREAMER_BACKEND_   
-    ret = XACameraItfAdapt_SetShutterSpeed( impl->adapCtx, shutterSpeed, manualSetting );
-#endif
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetShutterSpeed( (XAAdaptationGstCtx*)impl->adapCtx, shutterSpeed, manualSetting );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
     if ( ret == XA_RESULT_SUCCESS )
     {
         impl->shutterManualSetting = manualSetting;
@@ -766,10 +818,16 @@
     /* check is whitebalance mode or value changed */
     if( impl->whiteBalance != whiteBalance || impl->whiteBalManualSetting != manualSetting )
     {
-#ifdef _GSTREAMER_BACKEND_   
-        ret = XACameraItfAdapt_SetWhiteBalance( impl->adapCtx, whiteBalance, manualSetting );
-#endif
-        if ( ret == XA_RESULT_SUCCESS )
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetWhiteBalance( (XAAdaptationGstCtx*)impl->adapCtx, whiteBalance, manualSetting );
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    if ( ret == XA_RESULT_SUCCESS )
         {
             impl->whiteBalance = whiteBalance;
             impl->whiteBalManualSetting = manualSetting;
@@ -836,9 +894,17 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_   
-    ret = XACameraItfAdapt_SetAutoLocks( impl->adapCtx, locks );
-#endif
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetAutoLocks( (XAAdaptationGstCtx*)impl->adapCtx, locks );
+
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    
     if ( ret == XA_RESULT_SUCCESS )
     {
         impl->locks = locks;
@@ -899,10 +965,17 @@
         DEBUG_API("<-XACameraItfImpl_SetZoom");
         return XA_RESULT_PARAMETER_INVALID;
     }
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XACameraItfAdapt_SetZoom( (XAAdaptationGstCtx*)impl->adapCtx, zoom, digitalEnabled, speed, async );
 
-#ifdef _GSTREAMER_BACKEND_   
-    ret = XACameraItfAdapt_SetZoom( impl->adapCtx, zoom, digitalEnabled, speed, async );
-#endif
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    
     if ( ret == XA_RESULT_SUCCESS )
     {
         impl->zoom = zoom;
@@ -952,7 +1025,6 @@
 /* XACameraItfImpl* XACameraItfImpl_Create()
  * Description: Allocate and initialize CameraItfImpl
  */
-#ifdef _GSTREAMER_BACKEND_   
 
 XACameraItfImpl* XACameraItfImpl_Create( XAAdaptationBaseCtx *adapCtx )
 {
@@ -994,9 +1066,7 @@
         self->flashReady = XA_BOOLEAN_TRUE;
         self->adapCtx = adapCtx;
         self->cbPtrToSelf = NULL;
-#ifdef _GSTREAMER_BACKEND_
         XAAdaptationBase_AddEventHandler( adapCtx, &XACameraItfImp_AdaptCb, XA_CAMERAITFEVENTS, self );
-#endif
         self->self = self;
     }
 
@@ -1004,7 +1074,7 @@
     return self;
 }
 
-#endif
+
 /* void XACameraItfImpl_Free(XACameraItfImpl* self)
  * Description: Free all resources reserved at XACameraItfImpl_Create
  */
@@ -1012,14 +1082,11 @@
 {
     DEBUG_API("->XACameraItfImpl_Free");
     assert( self==self->self );
-#ifdef _GSTREAMER_BACKEND_   
     XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XACameraItfImp_AdaptCb );
-#endif
     free( self );
     DEBUG_API("<-XACameraItfImpl_Free");
 }
 
-#ifdef _GSTREAMER_BACKEND_
 /* void XACameraItfAdapt_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
  * @param void *pHandlerCtx - pointer to cb context (XACameraItfImpl)
  * @param XAAdaptEvent *event  - Event
@@ -1070,4 +1137,3 @@
     DEBUG_API("<-XACameraItfImp_AdaptCb");
 }
 
-#endif
--- a/khronosfws/openmax_al/src/camera/xacameraitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/camera/xacameraitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,7 @@
 #ifndef XACAMERAITF_H
 #define XACAMERAITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -69,10 +65,8 @@
     void                *context;
     XACameraItf         cbPtrToSelf;
 
-#ifdef _GSTREAMER_BACKEND_
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
 } XACameraItfImpl;
 
 /** METHODS **/
@@ -163,11 +157,9 @@
 XAresult XACameraItfImpl_GetZoom( XACameraItf self, XApermille *pZoom,
                                   XAboolean *pDigital );
 
-#ifdef _GSTREAMER_BACKEND_
 /* XACameraItfImpl -specific methods */
 XACameraItfImpl* XACameraItfImpl_Create( XAAdaptationBaseCtx *adapCtx );
 void XACameraItfImp_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
 void XACameraItfImpl_Free(XACameraItfImpl* self);
 
 #endif /* XACAMERAITF_H */
--- a/khronosfws/openmax_al/src/common/openmaxal.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/openmaxal.c	Fri Apr 30 19:18:45 2010 -0500
@@ -21,8 +21,8 @@
 
 #include "openmaxalwrapper.h"
 #include "openmaxal_iid.c"
-#include "common/xaglobals.h"
-
+#include "xaglobals.h"
+#include "xaobjects.h"
 
 EXPORT_C XAresult XAAPIENTRY xaCreateEngine(XAObjectItf *pEngine, XAuint32 numOptions,
                                    const XAEngineOption *pEngineOptions,
--- a/khronosfws/openmax_al/src/common/xacommon.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xacommon.c	Fri Apr 30 19:18:45 2010 -0500
@@ -120,15 +120,15 @@
                 {
                     /* try to parse mimetype first */
                     mime = ((XADataFormat_MIME*)(source->pFormat))->mimeType;
-                    if(strncmp((char*)mime,"audio",5)==0)
+                    if(mime && (strncmp((char*)mime,"audio",5)==0))
                     {
                         *type = XA_MEDIATYPE_AUDIO;
                     }
-                    else if(strncmp((char*)mime,"video",5)==0)
+                    else if(mime && (strncmp((char*)mime,"video",5)==0))
                     {
                         *type = XA_MEDIATYPE_VIDEO;
                     }
-                    else if(strncmp((char*)mime,"image",5)==0)
+                    else if(mime && (strncmp((char*)mime,"image",5)==0))
                     {
                         *type = XA_MEDIATYPE_IMAGE;
                     }
--- a/khronosfws/openmax_al/src/common/xaconfigextensionsitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaconfigextensionsitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -76,13 +76,13 @@
         DEBUG_INFO_A1("CP conf value %d", numValue);
         if(res == XA_RESULT_SUCCESS)
         {
-#ifdef _GSTREAMER_BACKEND_   
+
             /*Inform adaptation*/
             if( impl->ctx )
             {
-                res = XAAdaptationBase_SetCPConfiguration(impl->ctx,impl->testbufferconf);
+/*                res = XAAdaptationBase_SetCPConfiguration(impl->ctx,impl->testbufferconf);*/
             }
-#endif
+
         }
     }
     else
@@ -129,7 +129,7 @@
     return res;
 }
 
-#ifdef _GSTREAMER_BACKEND_   
+ 
 XAresult XAConfigExtensionsItfImpl_SetContext(XAConfigExtensionsItfImpl* self,XAAdaptationBaseCtx* adptctx)
     {
     XAresult res = XA_RESULT_SUCCESS;
@@ -147,7 +147,7 @@
     DEBUG_API("<-XAConfigExtensionsItfImpl_SetContext");
     return res;
     }
-#endif
+
 /**
  * XAConfigExtensionsItfImpl -specific methods
  **/
--- a/khronosfws/openmax_al/src/common/xaconfigextensionsitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaconfigextensionsitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,7 @@
 #ifndef XACONFIGEXTENSIONSITF_H
 #define XACONFIGEXTENSIONSITF_H
 
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
+#include "xaadptbasectx.h"
 
 /** MACROS **/
 
@@ -40,10 +36,10 @@
     struct XAConfigExtensionsItfImpl_* self;
     /* variables */
     XAuint8 testbufferconf;
-#ifdef _GSTREAMER_BACKEND_    
+   
     /*Adaptation variables*/
     XAAdaptationBaseCtx *ctx;
-#endif    
+  
 } XAConfigExtensionsItfImpl;
 
 /* Base interface XAConfigExtensionsItf implementation */
@@ -58,9 +54,9 @@
                             const XAchar* configKey,
                             XAuint32* pValueSize,
                             void* pConfigValue);
-#ifdef _GSTREAMER_BACKEND_
+
 XAresult XAConfigExtensionsItfImpl_SetContext(XAConfigExtensionsItfImpl* self,XAAdaptationBaseCtx* ctx);
-#endif
+
 /* XAConfigExtensionsItfImpl -specific methods */
 XAConfigExtensionsItfImpl* XAConfigExtensionsItfImpl_Create(void);
 void XAConfigExtensionsItfImpl_Free(XAConfigExtensionsItfImpl* self);
--- a/khronosfws/openmax_al/src/common/xadynamicsourceitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynamicsourceitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,10 +19,10 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xadynamicsourceitf.h"
-#ifdef _GSTREAMER_BACKEND_   
-#include "XAAdaptationContextBase.h"
-#include "XADynamicSourceItfAdaptation.h"
-#endif
+ 
+#include "xadynamicsourceitfadaptation.h"
+#include "xadynamicsourceitfadaptationmmf.h"
+
 
 /*****************************************************************************
  * Base interface XADynamicSourceItf implementation
@@ -44,7 +44,7 @@
         DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_   
+ 
     if( !impl->adaptCtx )
     {
         DEBUG_ERR("Adaptation not ready!!");
@@ -57,10 +57,17 @@
         res = XACommon_CheckDataSource(pDataSource,NULL);
         if(res==XA_RESULT_SUCCESS)
         {
-            res = XADynamicSourceItfAdapt_SetSource(impl->adaptCtx, pDataSource );
+            if(impl->adaptCtx->fwtype == FWMgrFWGST)
+                {
+                res = XADynamicSourceItfAdapt_SetSource((XAAdaptationGstCtx*)impl->adaptCtx, pDataSource );
+                }
+            else
+                {
+                res = XADynamicSourceItfAdaptMMF_SetSource((XAAdaptationMMFCtx*)impl->adaptCtx, pDataSource );
+                }
         }
     }
-#endif
+
     DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
     return res;
 }
@@ -68,7 +75,6 @@
 /*****************************************************************************
  * XADynamicSourceItfImpl -specific methods
  *****************************************************************************/
-#ifdef _GSTREAMER_BACKEND_   
 
 /* XADynamicSourceItfImpl* XADynamicSourceItfImpl_Create()
  * Description: Allocate and initialize DynamicSourceItfImpl
@@ -77,6 +83,7 @@
 {
     XADynamicSourceItfImpl* self = (XADynamicSourceItfImpl*)
         calloc(1,sizeof(XADynamicSourceItfImpl));
+    
     DEBUG_API("->XADynamicSourceItfImpl_Create");
     if( self )
     {
@@ -89,7 +96,7 @@
     DEBUG_API("<-XADynamicSourceItfImpl_Create");
     return self;
 }
-#endif
+
 /* void XADynamicSourceItfImpl_Free(XADynamicSourceItfImpl* self)
  * Description: Free all resources reserved at XADynamicSourceItfImpl_Create
  */
--- a/khronosfws/openmax_al/src/common/xadynamicsourceitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynamicsourceitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XADYNAMICSOURCEITF_H
 #define XADYNAMICSOURCEITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_   
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 
 /** TYPES **/
@@ -37,10 +34,9 @@
     struct XADynamicSourceItf_ itf;
     /* pointer to self */
     struct XADynamicSourceItfImpl_* self;
-#ifdef _GSTREAMER_BACKEND_   
     /* variables */
     XAAdaptationBaseCtx *adaptCtx;
-#endif
+
 } XADynamicSourceItfImpl;
 
 /** METHODS **/
@@ -51,10 +47,8 @@
 XAresult XADynamicSourceItfImpl_SetSource(XADynamicSourceItf self,
                                         XADataSource *pDataSource);
 
-#ifdef _GSTREAMER_BACKEND_   
 /* XADynamicSourceItfImpl -specific methods */
 XADynamicSourceItfImpl* XADynamicSourceItfImpl_Create(XAAdaptationBaseCtx *adaptCtx);
-#endif
 void XADynamicSourceItfImpl_Free(XADynamicSourceItfImpl* self);
 
 #endif /* XADYNAMICSOURCEITF_H */
--- a/khronosfws/openmax_al/src/common/xaequalizeritf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaequalizeritf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xaequalizeritf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAEqualizerItfAdaptation.h"
-#endif
+
+#include "xaequalizeritfadaptation.h"
+
 static const XAuint16 equalizerNumOfPresets = 0;
 
 /**
@@ -53,7 +53,7 @@
 {
     XAresult ret = XA_RESULT_SUCCESS;
     XAEqualizerItfImpl* impl = GetImpl(self);
-    
+    XAuint16 index = 0;
     DEBUG_API("->XAEqualizerItfImpl_SetEnabled");
 
     if(!impl)
@@ -63,15 +63,15 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_
-    XAuint16 index = 0;
+
+
     if(enabled && !(impl->enabled))
     {
         for(index = 0; index < EQUALIZER_NUM_OF_BANDS; index++)
         {
             if(impl->changeLevel[index])
             {
-                ret = XAEqualizerItfAdapt_SetBandLevel(impl->adapCtx, index, impl->levels[index]);
+                ret = XAEqualizerItfAdapt_SetBandLevel((XAAdaptationGstCtx*)impl->adapCtx, index, impl->levels[index]);
 
                 if(XA_RESULT_SUCCESS == ret)
                 {
@@ -84,7 +84,7 @@
     {
         for(index = 0; index < EQUALIZER_NUM_OF_BANDS; index++)
         {
-            ret = XAEqualizerItfAdapt_SetBandLevel(impl->adapCtx, index, EQUALIZER_DEFAULT_BAND_LEVEL);
+            ret = XAEqualizerItfAdapt_SetBandLevel((XAAdaptationGstCtx*)impl->adapCtx, index, EQUALIZER_DEFAULT_BAND_LEVEL);
 
             if(XA_RESULT_SUCCESS == ret)
             {
@@ -96,7 +96,7 @@
     {
         /* do nothing */
     }
-#endif
+
     if(ret == XA_RESULT_SUCCESS)
     {
         impl->enabled = enabled;
@@ -152,9 +152,9 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+
     *pNumBands = EQUALIZER_NUM_OF_BANDS;
-#endif
+
     DEBUG_API("<-XAEqualizerItfImpl_GetNumberOfBands");
     return ret;
 }
@@ -180,16 +180,16 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAEqualizerItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAEqualizerItfImpl_GetBandLevelRange");
         return ret;
     }
-    ret = XAEqualizerItfAdapt_GetBandLevelRange(impl->adapCtx, pMin, pMax);
-    XAEqualizerItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    ret = XAEqualizerItfAdapt_GetBandLevelRange((XAAdaptationGstCtx*)impl->adapCtx, pMin, pMax);
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAEqualizerItfImpl_GetBandLevelRange");
     return ret;
 }
@@ -236,8 +236,8 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAEqualizerItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID  || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAEqualizerItfImpl_SetBandLevel");
@@ -246,7 +246,7 @@
 
     if(impl->enabled)
     {
-        ret = XAEqualizerItfAdapt_SetBandLevel(impl->adapCtx, band, level);
+        ret = XAEqualizerItfAdapt_SetBandLevel((XAAdaptationGstCtx*)impl->adapCtx, band, level);
         if(XA_RESULT_SUCCESS == ret)
         {
             impl->levels[band] = level;
@@ -258,8 +258,8 @@
         impl->levels[band] = level;
     }
 
-    XAEqualizerItfAdapt_ThreadExit(impl->adapCtx);
-#endif    
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAEqualizerItfImpl_SetBandLevel");
     return ret;
 }
@@ -273,9 +273,10 @@
                                          XAmillibel *pLevel)
 {
     XAresult ret = XA_RESULT_SUCCESS;
+    
+    XAEqualizerItfImpl* impl = GetImpl(self);
     DEBUG_API("->XAEqualizerItfImpl_GetBandLevel");
-#ifdef _GSTREAMER_BACKEND_  
-    XAEqualizerItfImpl* impl = GetImpl(self);
+
     if(!impl || !pLevel ||  band >= EQUALIZER_NUM_OF_BANDS)
     {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
@@ -285,7 +286,6 @@
     }
 
     *pLevel = impl->levels[band];
-#endif
     DEBUG_API("<-XAEqualizerItfImpl_GetBandLevel");
     return ret;
 }
@@ -309,17 +309,17 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAEqualizerItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAEqualizerItfImpl_GetCenterFreq");
         return ret;
     }
-    ret = XAEqualizerItfAdapt_GetCenterFreq(impl->adapCtx, band, pCenter);
+    ret = XAEqualizerItfAdapt_GetCenterFreq((XAAdaptationGstCtx*)impl->adapCtx, band, pCenter);
 
-    XAEqualizerItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAEqualizerItfImpl_GetCenterFreq");
     return ret;
 }
@@ -356,17 +356,17 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAEqualizerItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAEqualizerItfImpl_GetBandFreqRange");
         return ret;
     }
-    ret = XAEqualizerItfAdapt_GetBandFreqRange(impl->adapCtx, band, pMin, pMax);
+    ret = XAEqualizerItfAdapt_GetBandFreqRange((XAAdaptationGstCtx*)impl->adapCtx, band, pMin, pMax);
 
-    XAEqualizerItfAdapt_ThreadExit(impl->adapCtx);
-#endif    
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+  
     DEBUG_API("<-XAEqualizerItfImpl_GetBandFreqRange");
     return ret;
 }
@@ -392,17 +392,17 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAEqualizerItfAdapt_ThreadEntry(impl->adapCtx);
+  
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAEqualizerItfImpl_GetBand");
         return ret;
     }
-    ret = XAEqualizerItfAdapt_GetBand(impl->adapCtx, frequency, pBand);
+    ret = XAEqualizerItfAdapt_GetBand((XAAdaptationGstCtx*)impl->adapCtx, frequency, pBand);
 
-    XAEqualizerItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAEqualizerItfImpl_GetBand");
     return ret;
 }
@@ -541,7 +541,7 @@
 /**
  * XAEqualizerItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_  
+ 
 
 /**
  * XAEqualizerItfImplImpl* XAEqualizerItfImpl_Create()
@@ -591,7 +591,7 @@
     DEBUG_API("<-XAEqualizerItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XAEqualizerItfImpl_Free(XAEqualizerItfImpl* self)
  * @param  XAEqualizerItfImpl* self -
--- a/khronosfws/openmax_al/src/common/xaequalizeritf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaequalizeritf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,12 +18,9 @@
 #ifndef XAEQUALIZERITF_H
 #define XAEQUALIZERITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_   
-#include "XAAdaptationContextBase.h"
-#include "XAEqualizerItfAdaptation.h"
-#endif
+#include "xaadptbasectx.h"
+#include "xaequalizeritfadaptation.h"
+
 /** MACROS **/
 /** TYPES **/
 
@@ -41,12 +38,12 @@
     /* variables */
     XAboolean   enabled;
     XAuint16    preset;
-#ifdef _GSTREAMER_BACKEND_   
+   
     XAmillibel  levels[EQUALIZER_NUM_OF_BANDS];
     XAboolean   changeLevel[EQUALIZER_NUM_OF_BANDS];
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
 } XAEqualizerItfImpl;
 
 /** METHODS **/
@@ -90,10 +87,10 @@
 XAresult XAEqualizerItfImpl_GetPresetName(XAEqualizerItf self, XAuint16 index,
                                           const XAchar **ppName);
 
-#ifdef _GSTREAMER_BACKEND_  
+
 /* XAEqualizerItfImpl -specific methods */
 XAEqualizerItfImpl* XAEqualizerItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-#endif
+
 void XAEqualizerItfImpl_Free(XAEqualizerItfImpl* self);
 
 #endif /* XAEQUALIZERITF_H */
--- a/khronosfws/openmax_al/src/common/xaglobals.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaglobals.h	Fri Apr 30 19:18:45 2010 -0500
@@ -40,29 +40,24 @@
     XA_RADIOITFEVENTS = 0x80,
     XA_RDSITFEVENTS = 0x100,
     XA_METADATAEVENTS = 0x200,
-    XA_ADDMORETYPES  = 0x400
+    XA_VOLUMEITFEVENTS = 0x400,
+    XA_NOKIALINEARVOLITFEVENTS = 0x800,
+    XA_NOKIAEXTVOLITFEVENTS = 0x1000,        
+    XA_ADDMORETYPES  = 0x2000    
 }XAAdaptEventTypes;
 
-#define XA_ADAPT_PU_INTERVAL 50                     /* position update interval */
-#define XA_ADAPT_ASYNC_TIMEOUT 3000                 /* timeout to wait async events */
-#define XA_ADAPT_ASYNC_TIMEOUT_SHORT 1000           /* timeout to wait async events */
-#define XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC 1000000   /* timeout to wait async events */
 
-#define XA_ADAPT_POSITION_UPDATE_EVT 0xf0           /* position update event */
-#define XA_ADAPT_SNAPSHOT_TAKEN 0xf1                /* snapshot taken event */
-#define XA_ADAPT_SNAPSHOT_INITIATED 0xf2            /* snapshot intitiated event */
-#define XA_ADAPT_MDE_TAGS_AVAILABLE 0xf3            /* metadata taglist changed */
-#define XA_ADAPT_OMIX_DEVICESET_CHANGED 0xf4        /* Output mix device changed event */
-#define XA_ADAPT_RADIO_FREQUENCY_CHANGED 0xf6       /* Radio frequency changed event */
-#define XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED 0xf7 /* Radio frequency range changed event */
-#define XA_ADAPT_RADIO_SEEK_COMPLETE 0xf8           /* Radio seek complete changed event */
-#define XA_ADAPT_RDS_GET_ODA_GROUP_DONE 0xf9        /* RDS get oda group done event */
-#define XA_ADAPT_BUFFERING 0xfa
-#define XA_ADAPT_MDE_TAGS_WRITTEN 0xfb
-/* TYPEDEFS */
+typedef enum
+{
+    XACAP_DECODER  = 0x1,
+    XACAP_ENCODER  = 0x2,
+    XACAP_DEVSNK   = 0x4,
+    XACAP_DEVSRC   = 0x8,
 
-#define RADIO_DEFAULT_FREQ_RANGE XA_FREQRANGE_FMEUROAMERICA
-#define RADIO_DEFAULT_FREQ 88000000
+    XACAP_AUDIO    = 0x10,
+    XACAP_VIDEO    = 0x20,
+    XACAP_IMAGE    = 0x40
+} XACapsType;
 
 
 typedef enum
@@ -83,143 +78,32 @@
 } XAMediaType;
 
 #define CPCONFIGKEY "TestAppPipeConfig"
+
+#define XA_RECMODE_STREAM 1
+#define XA_RECMODE_STILL 2
+
+#define XA_IMPL_SUPPORTED_AUDIO_OUT_NUM 3
+#define XA_IMPL_OMIX_MAX_CONNECTED_MEDIAPLAYERS 10
+
+/* Max volume level is implementation-dependent but must be at least 0mB
+ * now used max volume 10 mB
+ */
+#define MAX_PERCENTAGE_VOLUME 100
+#define MIN_VOLUME_LEVEL 0
+#define MAX_SUPPORT_VOLUME_LEVEL 9000
+
+/* Stereo position range is -1000 to 1000 permille. -1000 permille is fully left
+ * and 1000 permille is fully right. 0 permille is center.
+ */
+#define STEREO_POSITION_RIGHT 1000
+#define STEREO_POSITION_LEFT -1000
+#define STEREO_POSITION_CENTER 0
+
 /**
  * GLOBAL METHODS
  */
 
 
-/*
- * Engine
- */
-XAresult XAEngineImpl_Create(XAObjectItf *pEngine,
-                             XAuint32 numOptions,
-                             const XAEngineOption *pEngineOptions,
-                             XAuint32 numInterfaces,
-                             const XAInterfaceID *pInterfaceIds,
-                             const XAboolean *pInterfaceRequired);
-
-XAresult XAEngineImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XAEngineImpl_QuerySupportedInterfaces(XAuint32 index,
-                                               XAInterfaceID *pInterfaceId);
-
-/*
- * Media Player
- */
-XAresult XAMediaPlayerImpl_CreateMediaPlayer(XAObjectItf *pPlayer,
-                                           XADataSource *pDataSrc,
-                                           XADataSource *pBankSrc,
-                                           XADataSink *pAudioSnk,
-                                           XADataSink *pImageVideoSnk,
-                                           XADataSink *pVibra,
-                                           XADataSink *pLEDArray,
-                                           XAuint32 numInterfaces,
-                                           const XAInterfaceID *pInterfaceIds,
-                                           const XAboolean *pInterfaceRequired);
-
-XAresult XAMediaPlayerImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XAMediaPlayerImpl_QuerySupportedInterfaces(XAuint32 index,
-                                                  XAInterfaceID *pInterfaceId);
-
-/*
- * Metadata Extractor
- */
-XAresult XAMetadataExtractorImpl_Create(XAObjectItf *pMetadataExtractor,
-                                           XADataSource *pDataSource,
-                                           XAuint32 numInterfaces,
-                                           const XAInterfaceID *pInterfaceIds,
-                                           const XAboolean *pInterfaceRequired);
-
-XAresult XAMetadataExtractorImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XAMetadataExtractorImpl_QuerySupportedInterfaces(XAuint32 index,
-                                            XAInterfaceID *pInterfaceId);
-
-/*
- * Output Mix
- */
-XAresult XAOMixImpl_CreateOutputMix(XAObjectItf *pMix,
-                                    XAuint32 numInterfaces,
-                                    const XAInterfaceID *pInterfaceIds,
-                                    const XAboolean *pInterfaceRequired);
-
-XAresult XAOMixImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XAOMixImpl_QuerySupportedInterfaces(XAuint32 index,
-                                             XAInterfaceID *pInterfaceId);
-
-/*
- * Media Recorder
- */
-XAresult XAMediaRecorderImpl_CreateMediaRecorder(XAObjectItf* pRecorder,
-                                                 XADataSource* pAudioSrc,
-                                                 XADataSource* pImageVideoSrc,
-                                                 XADataSink* pDataSnk,
-                                                 XAuint32 numInterfaces,
-                                                 const XAInterfaceID *pInterfaceIds,
-                                                 const XAboolean *pInterfaceRequired);
-
-XAresult XAMediaRecorderImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XAMediaRecorderImpl_QuerySupportedInterfaces(XAuint32 index,
-                                                      XAInterfaceID *pInterfaceId);
-
-/*
- * Camera Device
- */
-XAresult XACameraDeviceImpl_CreateCameraDevice(XAObjectItf* pDevice,
-                                               XAuint32 deviceID,
-                                               XAuint32 numInterfaces,
-                                               const XAInterfaceID * pInterfaceIds,
-                                               const XAboolean * pInterfaceRequired);
-
-XAresult XACameraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XACameraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
-                                                     XAInterfaceID *pInterfaceId);
-
-/*
- * Radio Device
- */
-XAresult XARadioDeviceImpl_CreateRadioDevice(XAObjectItf* pDevice,
-                                             XAuint32 numInterfaces,
-                                             const XAInterfaceID * pInterfaceIds,
-                                             const XAboolean * pInterfaceRequired);
-
-XAresult XARadioDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XARadioDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
-                                                    XAInterfaceID *pInterfaceId);
-
-/*
- * Vibra Device
- */
-XAresult XAVibraDeviceImpl_CreateVibraDevice(XAObjectItf* pDevice,
-                                             XAuint32 deviceID,
-                                             XAuint32 numInterfaces,
-                                             const XAInterfaceID * pInterfaceIds,
-                                             const XAboolean * pInterfaceRequired);
-
-XAresult XAVibraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XAVibraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
-                                                    XAInterfaceID *pInterfaceId);
-
-/*
- * LED Array
- */
-XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice(XAObjectItf* pDevice,
-                                                   XAuint32 deviceID,
-                                                   XAuint32 numInterfaces,
-                                                   const XAInterfaceID * pInterfaceIds,
-                                                   const XAboolean * pInterfaceRequired);
-
-XAresult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
-
-XAresult XALEDArrayDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
-                                                    XAInterfaceID *pInterfaceId);
-
 
 /*
  * Check if interface IDs are equal
--- a/khronosfws/openmax_al/src/common/xaimagecontrolsitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaimagecontrolsitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,8 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xaimagecontrolsitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAImageControlsItfAdaptation.h"
-#endif
+#include "xaimagecontrolsitfadaptation.h"
+
 /**
  * XAImageControlsItfImpl* GetImpl(XAVolumeItf self)
  * Description: Validated interface pointer and cast it to implementations pointer.
@@ -63,22 +62,22 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageControlsItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAImageControlsItfImpl_SetBrightness");
         return ret;
     }
-    ret = XAImageControlsItfAdapt_SetBrightness(impl->adapCtx, brightness);
+    ret = XAImageControlsItfAdapt_SetBrightness((XAAdaptationGstCtx*)impl->adapCtx, brightness);
 
     if(ret == XA_RESULT_SUCCESS)
     {
         impl->brightness = brightness;
     }
 
-    XAImageControlsItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAImageControlsItfImpl_SetBrightness");
     return ret;
 }
@@ -129,22 +128,22 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageControlsItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED)
     {
         DEBUG_API("<-XAImageControlsItfImpl_SetContrast");
         return ret;
     }
-    ret = XAImageControlsItfAdapt_SetContrast(impl->adapCtx, contrast);
+    ret = XAImageControlsItfAdapt_SetContrast((XAAdaptationGstCtx*)impl->adapCtx, contrast);
 
     if(ret == XA_RESULT_SUCCESS)
     {
         impl->contrast = contrast;
     }
 
-    XAImageControlsItfAdapt_ThreadExit(impl->adapCtx);
-#endif    
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+   
     DEBUG_API("<-XAImageControlsItfImpl_SetContrast");
     return ret;
 }
@@ -203,22 +202,22 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageControlsItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAImageControlsItfImpl_SetGamma");
         return ret;
     }
-    ret = XAImageControlsItfAdapt_SetGamma(impl->adapCtx, gamma);
+    ret = XAImageControlsItfAdapt_SetGamma((XAAdaptationGstCtx*)impl->adapCtx, gamma);
 
     if(ret == XA_RESULT_SUCCESS)
     {
         impl->gamma = gamma;
     }
 
-    XAImageControlsItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAImageControlsItfImpl_SetGamma");
     return ret;
 }
@@ -275,8 +274,8 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageControlsItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAImageControlsItfImpl_GetSupportedGammaSettings");
@@ -288,20 +287,20 @@
     if( ppSettings && pNumSettings != 0 )
     {
         /* solve array of supported gamma settings */
-        ret = XAImageControlsItfAdapt_GetSupportedGammaSettings(impl->adapCtx,
+        ret = XAImageControlsItfAdapt_GetSupportedGammaSettings((XAAdaptationGstCtx*)impl->adapCtx,
                                                                 pMinValue, pMaxValue,
                                                                 pNumSettings, ppSettings);
     }
     else
     {
         /* Solve min and max values and numSettings */
-        ret = XAImageControlsItfAdapt_GetSupportedGammaSettings(impl->adapCtx,
+        ret = XAImageControlsItfAdapt_GetSupportedGammaSettings((XAAdaptationGstCtx*)impl->adapCtx,
                                                                 pMinValue, pMaxValue,
                                                                 pNumSettings, NULL);
     }
 
-    XAImageControlsItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAImageControlsItfImpl_GetSupportedGammaSettings");
     return ret;
 }
@@ -309,7 +308,6 @@
 /**
  * XAImageControlsItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_  
 
 /**
  * XAImageControlsItfImplImpl* XAImageControlsItfImpl_Create()
@@ -344,7 +342,7 @@
     DEBUG_API("<-XAImageControlsItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XAImageControlsItfImpl_Free(XAImageControlsItfImpl* self)
  * @param  XAImageControlsItfImpl* self -
--- a/khronosfws/openmax_al/src/common/xaimagecontrolsitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaimagecontrolsitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XAIMAGECONTROLSITF_H
 #define XAIMAGECONTROLSITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 
 /** MACROS **/
 #define DEFAULT_BRIGHTNESS_VALUE    50
@@ -49,10 +46,10 @@
     XAuint32    brightness;
     XAint32     contrast;
     XApermille  gamma;
-#ifdef _GSTREAMER_BACKEND_
+
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif    
+   
 
 } XAImageControlsItfImpl;
 
@@ -81,10 +78,9 @@
                                                           XApermille *pMaxValue,
                                                           XAuint32 *pNumSettings,
                                                           XApermille **ppSettings);
-#ifdef _GSTREAMER_BACKEND_   
+
 /* XAImageControlsItfImpl -specific methods */
 XAImageControlsItfImpl* XAImageControlsItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-#endif
 void XAImageControlsItfImpl_Free(XAImageControlsItfImpl* self);
 
 #endif /* XAIMAGECONTROLSITF_H */
--- a/khronosfws/openmax_al/src/common/xaimageeffectsitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaimageeffectsitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xaimageeffectsitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAImageEffectsItfAdaptation.h"
-#endif
+
+#include "xaimageeffectsitfadaptation.h"
+
 static XAImageEffectsItfImpl* GetImpl(XAImageEffectsItf self)
 {
     if(self)
@@ -60,15 +60,15 @@
         DEBUG_API("<-XAImageEffectsItfImpl_QuerySupportedImageEffects");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageEffectsItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAImageEffectsItfImpl_QuerySupportedImageEffects");
         return ret;
     }
 
-    ret = XAImageEffectsItfAdapt_QuerySupportedImageEffects(impl->adapCtx, index,
+    ret = XAImageEffectsItfAdapt_QuerySupportedImageEffects((XAAdaptationGstCtx*)impl->adapCtx, index,
                                                             pImageEffectId);
 
     if( ret == XA_RESULT_SUCCESS )
@@ -76,8 +76,8 @@
         impl->index = index;
     }
 
-    XAImageEffectsItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAImageEffectsItfImpl_QuerySupportedImageEffects");
     return ret;
 }
@@ -102,23 +102,23 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageEffectsItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAImageEffectsItfImpl_EnableImageEffect");
         return ret;
     }
 
-    ret = XAImageEffectsItfAdapt_EnableImageEffect(impl->adapCtx, imageEffectID);
+    ret = XAImageEffectsItfAdapt_EnableImageEffect((XAAdaptationGstCtx*)impl->adapCtx, imageEffectID);
 
     if( ret == XA_RESULT_SUCCESS )
     {
         impl->imageEffectID = imageEffectID;
     }
 
-    XAImageEffectsItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAImageEffectsItfImpl_EnableImageEffect");
     return ret;
 }
@@ -143,23 +143,23 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageEffectsItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAImageEffectsItfImpl_DisableImageEffect");
         return ret;
     }
 
-    ret = XAImageEffectsItfAdapt_DisableImageEffect(impl->adapCtx, imageEffectID);
+    ret = XAImageEffectsItfAdapt_DisableImageEffect((XAAdaptationGstCtx*)impl->adapCtx, imageEffectID);
 
     if( ret == XA_RESULT_SUCCESS )
     {
         impl->imageEffectID = NO_IMAGE_EFFECTS;
     }
 
-    XAImageEffectsItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAImageEffectsItfImpl_DisableImageEffect");
     return ret;
 }
@@ -186,19 +186,19 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAImageEffectsItfAdapt_ThreadEntry(impl->adapCtx);
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAImageEffectsItfImpl_IsImageEffectEnabled");
         return ret;
     }
 
-    ret = XAImageEffectsItfAdapt_IsImageEffectEnabled(impl->adapCtx, imageEffectID,
+    ret = XAImageEffectsItfAdapt_IsImageEffectEnabled((XAAdaptationGstCtx*)impl->adapCtx, imageEffectID,
                                                       pEnabled);
 
-    XAImageEffectsItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAImageEffectsItfImpl_IsImageEffectEnabled");
     return ret;
 }
@@ -206,7 +206,6 @@
 /**
  * XAImageEffectsItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_  
 
 /**
  * XAImageEffectsItfImplImpl* XAImageEffectsItfImpl_Create()
@@ -236,7 +235,7 @@
     DEBUG_API("<-XAImageEffectsItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XAImageEffectsItfImpl_Free(XAImageEffectsItfImpl* self)
  * @param  XAImageEffectsItfImpl* self -
--- a/khronosfws/openmax_al/src/common/xaimageeffectsitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaimageeffectsitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XAIMAGEEFFECTSITF_H
 #define XAIMAGEEFFECTSITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_   
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 #define NO_IMAGE_EFFECTS 0
 
@@ -43,10 +40,10 @@
     XAuint32    index;
     XAboolean   enabled;
     XAuint32    imageEffectID;
-#ifdef _GSTREAMER_BACKEND_   
+
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
 
 } XAImageEffectsItfImpl;
 
@@ -67,10 +64,8 @@
                                                     XAuint32 imageEffectID,
                                                     XAboolean *pEnabled);
 
-#ifdef _GSTREAMER_BACKEND_   
+   
 /* XAImageEffectsItfImpl -specific methods */
 XAImageEffectsItfImpl* XAImageEffectsItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-#endif
-
 void XAImageEffectsItfImpl_Free(XAImageEffectsItfImpl* self);
 #endif /* XAIMAGEEFFECTSITF_H */
--- a/khronosfws/openmax_al/src/common/xametadataextractionitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xametadataextractionitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -22,9 +22,14 @@
 
 #include "xametadataextractionitf.h"
 #include "xadebug.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAMetadataAdaptation.h"
-#endif
+
+#include "xametadataadaptation.h"
+
+#include "xaadaptationmmf.h"
+#include "xametadataadaptctxmmf.h"
+#include "xamediaplayeradaptctxmmf.h"
+#include "cmetadatautilityitf.h"
+
 /* XAMetadataExtractionItfImpl* GetImpl(XAMetadataExtractionItf self)
  * Description: Validate interface pointer and cast it to implementation pointer.
  **/
@@ -41,6 +46,20 @@
     return NULL;
 }
 
+static void* GetMetadataUtilityContext(XAAdaptationMMFCtx* adaptCtx)
+{
+	switch(adaptCtx->baseObj.ctxId)
+	{
+		case XAMediaPlayerAdaptation:
+	          return ((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfMetadataContext;
+		case XAMDAdaptation:
+	          return ((XAMetadataAdaptationMMFCtx*)adaptCtx)->mmfContext;
+		default:
+			break;
+	}
+
+	return NULL;
+}
 /*****************************************************************************
  * Base interface XAMetadataExtractionItf implementation
  *****************************************************************************/
@@ -66,24 +85,40 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_  
+ 
         if( impl->adaptCtx )
         {
-            if(impl->filteringOn)
-            {
-                *pItemCount = impl->filteredcount;
-            }
-            else
-            {
-                *pItemCount = impl->currentTags.itemcount;
-            }
-            res = XA_RESULT_SUCCESS;
+        	
+			if(impl->adaptCtx->fwtype == FWMgrFWMMF)
+			{
+				void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
+				if(mmfCtx)
+				{
+					res = mmf_get_item_count(mmfCtx, pItemCount);
+				}
+				else
+				{
+					res = XA_RESULT_PARAMETER_INVALID;
+				}
+			}
+			else
+			{
+            	if(impl->filteringOn)
+            	{
+	                *pItemCount = impl->filteredcount;
+    	        }
+        	    else
+            	{
+	                *pItemCount = impl->currentTags.itemcount;
+    	        }
+        	    res = XA_RESULT_SUCCESS;
+			}
         }
         else
         {
             res = XA_RESULT_INTERNAL_ERROR;
         }
-#endif
+
         DEBUG_INFO_A1("itemCount = %d", (int)*pItemCount);
     }
 
@@ -117,17 +152,32 @@
     }
     *pKeySize = 0;
 
-    /* check index and return unfiltered index */
-    if( CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-#ifdef _GSTREAMER_BACKEND_  
-    /* size = size of struct + size of data - 1 (struct size already includes one char) */
-    *pKeySize = sizeof(XAMetadataInfo) + impl->currentTags.mdeKeys[newidx]->size - 1;
-#endif
+	if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+	{
+		void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
+		if(mmfCtx)
+		{
+			res = mmf_get_key_size(mmfCtx, index, pKeySize);
+		}
+		else
+		{
+			res = XA_RESULT_PARAMETER_INVALID;
+		}
+	}
+	else
+	{
+	    /* check index and return unfiltered index */
+	    if( CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS )
+    	{
+	        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+    	    DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
+        	return XA_RESULT_PARAMETER_INVALID;
+	    }
+ 
+	    /* size = size of struct + size of data - 1 (struct size already includes one char) */
+    	*pKeySize = sizeof(XAMetadataInfo) + impl->currentTags.mdeKeys[newidx]->size - 1;
+	}
+
     DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetKeySize (%d)", (int)res);
     return res;
 }
@@ -149,9 +199,9 @@
     XAMetadataExtractionItfImpl *impl = NULL;
     XAresult res = XA_RESULT_SUCCESS;
     XAuint32 newidx = 0;
-#ifdef _GSTREAMER_BACKEND_  
+ 
     XAuint32 neededsize = 0;
-#endif
+
     XAuint32 newdatasize = 0;
     DEBUG_API("->XAMetadataExtractionItfImpl_GetKey");
 
@@ -163,35 +213,52 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    /* check index and return unfiltered index */
-    if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
+    memset(pKey,0,keySize);
+	
+	if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+	{
+		void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
+		if(mmfCtx)
+		{
+			res = mmf_get_key(mmfCtx, index, keySize, pKey);
+		}
+		else
+		{
+			res = XA_RESULT_PARAMETER_INVALID;
+		}
+	}
+	else
+	{
 
-    memset(pKey,0,keySize);
-#ifdef _GSTREAMER_BACKEND_     
-    /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
-    neededsize = sizeof(XAMetadataInfo) + impl->currentTags.mdeKeys[newidx]->size - 1;
-    if( keySize<neededsize )
-    {   /* cannot fit all of key data */
-        newdatasize = impl->currentTags.mdeKeys[newidx]->size - (neededsize-keySize);
-        DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
-        res = XA_RESULT_BUFFER_INSUFFICIENT;
-    }
-    else
-    {
-        newdatasize = impl->currentTags.mdeKeys[newidx]->size;
-        res = XA_RESULT_SUCCESS;
-    }
-    /* copy data up to given size */
-    memcpy(pKey,impl->currentTags.mdeKeys[newidx],keySize-1);
-    /* ensure null-termination */
-#endif    
-    memset(pKey->data+newdatasize-1,0,1);
-    pKey->size = newdatasize;
+	    /* check index and return unfiltered index */
+	    if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
+	    {
+	        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+	        DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
+	        return XA_RESULT_PARAMETER_INVALID;
+	    }
+
+	    
+	    /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
+	    neededsize = sizeof(XAMetadataInfo) + impl->currentTags.mdeKeys[newidx]->size - 1;
+	    if( keySize<neededsize )
+	    {   /* cannot fit all of key data */
+	        newdatasize = impl->currentTags.mdeKeys[newidx]->size - (neededsize-keySize);
+	        DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
+	        res = XA_RESULT_BUFFER_INSUFFICIENT;
+	    }
+	    else
+	    {
+	        newdatasize = impl->currentTags.mdeKeys[newidx]->size;
+	        res = XA_RESULT_SUCCESS;
+	    }
+	    /* copy data up to given size */
+	    memcpy(pKey,impl->currentTags.mdeKeys[newidx],keySize-1);
+	    /* ensure null-termination */
+	    
+	    memset(pKey->data+newdatasize-1,0,1);
+	    pKey->size = newdatasize;
+	}
 
     DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetKey (%d)", (int)res);
     return res;
@@ -223,17 +290,32 @@
     }
     *pValueSize = 0;
 
-    /* check index and return unfiltered index */
-    if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-#ifdef _GSTREAMER_BACKEND_  
-    /* size = size of struct + size of data - 1 (struct size already includes one char) */
-    *pValueSize = sizeof(XAMetadataInfo) + impl->currentTags.mdeValues[newidx]->size - 1;
-#endif
+	if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+	{
+		void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
+		if(mmfCtx)
+		{
+			res = mmf_get_value_size(mmfCtx, index,pValueSize);
+		}
+		else
+		{
+			res = XA_RESULT_PARAMETER_INVALID;
+		}
+	}
+	else
+	{
+	    /* check index and return unfiltered index */
+	    if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
+	    {
+	        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+	        DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
+	        return XA_RESULT_PARAMETER_INVALID;
+	    }
+	 
+	    /* size = size of struct + size of data - 1 (struct size already includes one char) */
+	    *pValueSize = sizeof(XAMetadataInfo) + impl->currentTags.mdeValues[newidx]->size - 1;
+	}
+
     DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetValueSize (%d)", (int)res);
     return res;
 }
@@ -255,9 +337,9 @@
     XAMetadataExtractionItfImpl *impl = NULL;
     XAresult res = XA_RESULT_SUCCESS;
     XAuint32 newidx = 0;
-#ifdef _GSTREAMER_BACKEND_  
+ 
     XAuint32 neededsize = 0;
-#endif
+
     XAuint32 newdatasize = 0;
     DEBUG_API("->XAMetadataExtractionItfImpl_GetValue");
 
@@ -269,36 +351,51 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    /* check index and return unfiltered index */
-    if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
+	memset(pValue,0,valueSize);
 
-    memset(pValue,0,valueSize);
-#ifdef _GSTREAMER_BACKEND_  
-    /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
-    neededsize = sizeof(XAMetadataInfo) + impl->currentTags.mdeValues[newidx]->size - 1;
-    if( valueSize<neededsize )
-    {   /* cannot fit all of key data */
-        newdatasize = impl->currentTags.mdeValues[newidx]->size - (neededsize-valueSize);
-        DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
-        res = XA_RESULT_BUFFER_INSUFFICIENT;
-    }
-    else
-    {
-        newdatasize = impl->currentTags.mdeValues[newidx]->size;
-        res = XA_RESULT_SUCCESS;
-    }
-    /* copy data up to given size */
-    memcpy(pValue,impl->currentTags.mdeValues[newidx],valueSize-1);
-    /* ensure null-termination */
-#endif
-    memset(pValue->data+newdatasize-1,0,1);
+	if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+	{
+		void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
+		if(mmfCtx)
+		{
+			res = mmf_get_value(mmfCtx, index, valueSize, pValue);
+		}
+		else
+		{
+			res = XA_RESULT_PARAMETER_INVALID;
+		}
+	}
+	else
+	{
+	    /* check index and return unfiltered index */
+	    if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
+	    {
+	        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+	        DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
+	        return XA_RESULT_PARAMETER_INVALID;
+	    }
 
-    pValue->size = newdatasize;
+	    /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
+	    neededsize = sizeof(XAMetadataInfo) + impl->currentTags.mdeValues[newidx]->size - 1;
+	    if( valueSize<neededsize )
+	    {   /* cannot fit all of key data */
+	        newdatasize = impl->currentTags.mdeValues[newidx]->size - (neededsize-valueSize);
+	        DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
+	        res = XA_RESULT_BUFFER_INSUFFICIENT;
+	    }
+	    else
+	    {
+	        newdatasize = impl->currentTags.mdeValues[newidx]->size;
+	        res = XA_RESULT_SUCCESS;
+	    }
+	    /* copy data up to given size */
+	    memcpy(pValue,impl->currentTags.mdeValues[newidx],valueSize-1);
+	    /* ensure null-termination */
+
+	    memset(pValue->data+newdatasize-1,0,1);
+
+	    pValue->size = newdatasize;
+	}
 
     DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetValue (%d)",(int)res);
     return res;
@@ -330,17 +427,18 @@
 {
     XAresult res = XA_RESULT_SUCCESS;
     
+    XAuint32 idx = 0;
+    XAuint8 matchMask = 0;
     
-#ifdef _GSTREAMER_BACKEND_  
+ 
     XAMetadataExtractionItfImpl *impl = NULL;
     const XAchar* parsedkey;
     impl = GetImpl(self);
-#endif
+
     DEBUG_API("->XAMetadataExtractionItfImpl_AddKeyFilter");
 
-#ifdef _GSTREAMER_BACKEND_  
-    XAuint32 idx = 0;
-    XAuint8 matchMask = 0;
+ 
+
     if( !impl )
     {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
@@ -349,51 +447,59 @@
     }
     else
     {
-        impl->filteringOn = XA_BOOLEAN_TRUE;
-        for(idx=0; idx < impl->currentTags.itemcount; idx++)
-        {
-            if((filterMask & XA_METADATA_FILTER_KEY) && pKey)
-            {
-                parsedkey = XAMetadataAdapt_ParseKhronosKey(pKey);
-                if( strcmp((char*)parsedkey,
-                           (char*)impl->currentTags.mdeKeys[idx]->data) == 0 )
-                {
-                    matchMask |= XA_METADATA_FILTER_KEY;
-                }
-            }
-            if(filterMask & XA_METADATA_FILTER_LANG && pValueLangCountry)
-            {
-                if( strcmp((char*)pValueLangCountry,
-                           (char*)impl->currentTags.mdeKeys[idx]->langCountry) == 0 )
-                {
-                    matchMask |= XA_METADATA_FILTER_LANG;
-                }
-            }
-            if(filterMask & XA_METADATA_FILTER_ENCODING)
-            {
-                if(keyEncoding==impl->currentTags.mdeKeys[idx]->encoding)
-                {
-                    matchMask |= XA_METADATA_FILTER_ENCODING;
-                }
-                if(valueEncoding==impl->currentTags.mdeValues[idx]->encoding)
-                {
-                    matchMask |= XA_METADATA_FILTER_ENCODING;
-                }
-            }
-            /* check if all filters apply */
-            if(filterMask == matchMask)
-            {
-                if(impl->tagmatchesfilter[idx] == XA_BOOLEAN_FALSE)
-                {
-                    impl->tagmatchesfilter[idx] = XA_BOOLEAN_TRUE;
-                    impl->filteredcount++;
-                }
-            }
-            /*reset matchmask*/
-            matchMask=0;
-        }
+    
+		if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+		{
+			DEBUG_API("<-XAMetadataExtractionItfImpl_AddKeyFilter Not Supported in MMF");
+			res = XA_RESULT_PARAMETER_INVALID;
+		}
+		else
+		{
+	        impl->filteringOn = XA_BOOLEAN_TRUE;
+	        for(idx=0; idx < impl->currentTags.itemcount; idx++)
+	        {
+	            if((filterMask & XA_METADATA_FILTER_KEY) && pKey)
+	            {
+	                parsedkey = XAMetadataAdapt_ParseKhronosKey(pKey);
+	                if( strcmp((char*)parsedkey,
+	                           (char*)impl->currentTags.mdeKeys[idx]->data) == 0 )
+	                {
+	                    matchMask |= XA_METADATA_FILTER_KEY;
+	                }
+	            }
+	            if(filterMask & XA_METADATA_FILTER_LANG && pValueLangCountry)
+	            {
+	                if( strcmp((char*)pValueLangCountry,
+	                           (char*)impl->currentTags.mdeKeys[idx]->langCountry) == 0 )
+	                {
+	                    matchMask |= XA_METADATA_FILTER_LANG;
+	                }
+	            }
+	            if(filterMask & XA_METADATA_FILTER_ENCODING)
+	            {
+	                if(keyEncoding==impl->currentTags.mdeKeys[idx]->encoding)
+	                {
+	                    matchMask |= XA_METADATA_FILTER_ENCODING;
+	                }
+	                if(valueEncoding==impl->currentTags.mdeValues[idx]->encoding)
+	                {
+	                    matchMask |= XA_METADATA_FILTER_ENCODING;
+	                }
+	            }
+	            /* check if all filters apply */
+	            if(filterMask == matchMask)
+	            {
+	                if(impl->tagmatchesfilter[idx] == XA_BOOLEAN_FALSE)
+	                {
+	                    impl->tagmatchesfilter[idx] = XA_BOOLEAN_TRUE;
+	                    impl->filteredcount++;
+	                }
+	            }
+	            /*reset matchmask*/
+	            matchMask=0;
+	        }
+	    }
     }
-#endif    
     DEBUG_API_A1("<-XAMetadataExtractionItfImpl_AddKeyFilter (%d)", (int)res);
     return res;
  }
@@ -405,9 +511,9 @@
 {
     XAMetadataExtractionItfImpl *impl = NULL;
     XAresult res = XA_RESULT_SUCCESS;
-#ifdef _GSTREAMER_BACKEND_  
+ 
     XAuint32 idx = 0;
-#endif
+
     DEBUG_API("->XAMetadataExtractionItfImpl_ClearKeyFilter");
     impl = GetImpl(self);
     if( !impl )
@@ -417,17 +523,26 @@
     }
     else
     {
-        if(impl->tagmatchesfilter)
-        {
-#ifdef _GSTREAMER_BACKEND_  
-            for(idx=0; idx < impl->currentTags.itemcount; idx++)
-            {
-                impl->tagmatchesfilter[idx] = XA_BOOLEAN_FALSE;
-            }
-#endif
-        }
-        impl->filteredcount = 0;
-        impl->filteringOn = XA_BOOLEAN_FALSE;
+    
+		if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+		{
+			DEBUG_API("<-XAMetadataExtractionItfImpl_ClearKeyFilter Not Supported in MMF");
+			res = XA_RESULT_PARAMETER_INVALID;
+		}
+		else
+		{
+	        if(impl->tagmatchesfilter)
+	        {
+	 
+	            for(idx=0; idx < impl->currentTags.itemcount; idx++)
+	            {
+	                impl->tagmatchesfilter[idx] = XA_BOOLEAN_FALSE;
+	            }
+
+	        }
+	        impl->filteredcount = 0;
+	        impl->filteringOn = XA_BOOLEAN_FALSE;
+	    }
     }
 
     DEBUG_API_A1("<-XAMetadataExtractionItfImpl_ClearKeyFilter (%d)", (int)res);
@@ -437,7 +552,7 @@
 /*****************************************************************************
  * XAMetadataExtractionItfImpl -specific methods
  *****************************************************************************/
-#ifdef _GSTREAMER_BACKEND_  
+
 /* XAMetadataExtractionItfImpl* XAMetadataExtractionItfImpl_Create()
  * Description: Allocate and initialize XAMetadataExtractionItfImpl
  */
@@ -464,7 +579,11 @@
         self->filteringOn = XA_BOOLEAN_FALSE;
 
         self->adaptCtx = adaptCtx;
-        XAAdaptationBase_AddEventHandler( adaptCtx, &XAMetadataExtractionItfImp_AdaptCb, XA_METADATAEVENTS, self );
+
+		if(self->adaptCtx->fwtype != FWMgrFWMMF)
+		{
+	        XAAdaptationBase_AddEventHandler( adaptCtx, &XAMetadataExtractionItfImp_AdaptCb, XA_METADATAEVENTS, self );
+		}
 
         self->self = self;
     }
@@ -472,7 +591,7 @@
     DEBUG_API("<-XAMetadataExtractionItfImpl_Create");
     return self;
 }
-#endif
+
 /* void XAMetadataExtractionItfImpl_Free(XAMetadataExtractionItfImpl* self)
  * Description: Free all resources reserved at XAMetadataExtractionItfImpl_Create
  */
@@ -480,19 +599,23 @@
 {
     DEBUG_API("->XAMetadataExtractionItfImpl_Free");
     assert(self==self->self);
-#ifdef _GSTREAMER_BACKEND_  
-    XAAdaptationBase_RemoveEventHandler( self->adaptCtx, &XAMetadataExtractionItfImp_AdaptCb );
-    XAMetadataAdapt_FreeImplTagList(&(self->currentTags), XA_BOOLEAN_TRUE);
-#endif
-    if(self->tagmatchesfilter)
-    {
-        free(self->tagmatchesfilter);
-    }
+ 
+	 if(self->adaptCtx->fwtype != FWMgrFWMMF)
+	 {
+    	XAAdaptationBase_RemoveEventHandler( self->adaptCtx, &XAMetadataExtractionItfImp_AdaptCb );
+	    XAMetadataAdapt_FreeImplTagList(&(self->currentTags), XA_BOOLEAN_TRUE);
+		
+		if(self->tagmatchesfilter)
+		{
+			free(self->tagmatchesfilter);
+		}
+	 }
+
     free(self);
     DEBUG_API("<-XAMetadataExtractionItfImpl_Free");
 }
 
-#ifdef _GSTREAMER_BACKEND_  
+ 
 /* With this method, adaptation infroms that new tags are found (e.g. if source,
  * has changed, live stream contains metadata...)
  */
@@ -510,7 +633,7 @@
     if( event && event->eventid == XA_ADAPT_MDE_TAGS_AVAILABLE )
     {
         /* get the tag list */
-        XAMetadataExtractionItfAdapt_FillTagList( impl->adaptCtx, &(impl->currentTags) );
+        XAMetadataExtractionItfAdapt_FillTagList( (XAAdaptationGstCtx*)impl->adaptCtx, &(impl->currentTags) );
         if(impl->tagmatchesfilter)
         {
             free(impl->tagmatchesfilter);
@@ -525,14 +648,14 @@
     DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
 }
 
-#endif
+
 /* For given index over filtered array, return index over whole array
  */
 XAresult CheckAndUnfilterIndex(XAMetadataExtractionItfImpl *impl,
                                XAuint32 oldidx, XAuint32 *newidx)
 {
     DEBUG_API("->CheckAndUnfilterIndex");
-#ifdef _GSTREAMER_BACKEND_  
+ 
     if( impl->filteringOn )
     {
         XAint16 i=-1;
@@ -568,7 +691,7 @@
         }
         *newidx=oldidx;
     }
-#endif
+
     DEBUG_API("<-CheckAndUnfilterIndex");
     return XA_RESULT_SUCCESS;
 }
--- a/khronosfws/openmax_al/src/common/xametadataextractionitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xametadataextractionitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,9 @@
 #ifndef XAMETADATAEXTRACTIONITF_H
 #define XAMETADATAEXTRACTIONITF_H
 
-#include "openmaxalwrapper.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAAdaptationContextBase.h"
-#include "XAMetadataAdaptation.h"
-#endif
+#include "xaadptbasectx.h"
+#include "xametadataadaptation.h"
+
 /** MACROS **/
 
 /** TYPES **/
@@ -42,11 +40,11 @@
     XAuint32                filteredcount;
     XAboolean*              tagmatchesfilter;
     XAboolean               filteringOn;
-#ifdef _GSTREAMER_BACKEND_  
+  
     XAMetadataImplTagList   currentTags;
 
     XAAdaptationBaseCtx *adaptCtx;
-#endif
+
 } XAMetadataExtractionItfImpl;
 
 /** METHODS **/
@@ -83,11 +81,10 @@
 
 XAresult XAMetadataExtractionItfImpl_ClearKeyFilter(XAMetadataExtractionItf self);
 
-#ifdef _GSTREAMER_BACKEND_  
+
 /* XAMetadataExtractionItfImpl -specific methods */
 XAMetadataExtractionItfImpl* XAMetadataExtractionItfImpl_Create( XAAdaptationBaseCtx *adaptCtx);
 void XAMetadataExtractionItfImp_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
 void XAMetadataExtractionItfImpl_Free(XAMetadataExtractionItfImpl* self);
 
 /* internal methods */
--- a/khronosfws/openmax_al/src/common/xametadatatraversalitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xametadatatraversalitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,9 +20,9 @@
 #include <assert.h>
 
 #include "xametadatatraversalitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAMetadataAdaptation.h"
-#endif
+
+#include "xametadataadaptation.h"
+
 /* XAMetadataTraversalImpl* GetImpl(XAMetadataTraversalItf self)
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -64,9 +64,9 @@
     }
     else if(impl->traversemode != mode)
     {
-#ifdef _GSTREAMER_BACKEND_  
-        res =XAMetadataTraversalItfAdapt_SetMode(impl->adaptCtx, mode);
-#endif
+
+        res =XAMetadataTraversalItfAdapt_SetMode((XAAdaptationGstCtx*)impl->adaptCtx, mode);
+
         if( res == XA_RESULT_SUCCESS )
         {
             impl->traversemode = mode;
@@ -107,9 +107,9 @@
         }
         else
         {
-#ifdef _GSTREAMER_BACKEND_  
-            res = XAMetadataTraversalItfAdapt_GetChildCount(impl->adaptCtx, pCount);
-#endif
+
+            res = XAMetadataTraversalItfAdapt_GetChildCount((XAAdaptationGstCtx*)impl->adaptCtx, pCount);
+
         }
     }
 
@@ -125,9 +125,9 @@
                                                          XAuint32 *pSize)
 {
     XAMetadataTraversalImpl *impl = NULL;
-#ifdef _GSTREAMER_BACKEND_  
+
     XAuint32 chCount = 0;
-#endif    
+  
     XAresult res = XA_RESULT_SUCCESS;
 
     DEBUG_API("->XAMetadataTraversalItfImpl_GetChildMIMETypeSize");
@@ -140,15 +140,15 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_  
-        res = XAMetadataTraversalItfAdapt_GetChildCount(impl->adaptCtx, &chCount);
+
+        res = XAMetadataTraversalItfAdapt_GetChildCount((XAAdaptationGstCtx*)impl->adaptCtx, &chCount);
         if(index >= chCount || res != XA_RESULT_SUCCESS)
         {
             /* out of bounds */
             res = XA_RESULT_PARAMETER_INVALID;
         }
-        res = XAMetadataTraversalItfAdapt_GetChildMIMETypeSize(impl->adaptCtx, index, pSize);
-#endif
+        res = XAMetadataTraversalItfAdapt_GetChildMIMETypeSize((XAAdaptationGstCtx*)impl->adaptCtx, index, pSize);
+
     }
 
     DEBUG_API("<-XAMetadataTraversalItfImpl_GetChildMIMETypeSize");
@@ -166,9 +166,9 @@
                                                  XAchar *pMimeType)
 {
     XAMetadataTraversalImpl *impl = NULL;
-#ifdef _GSTREAMER_BACKEND_  
+
     XAuint32 chCount = 0;
-#endif
+
     XAresult res = XA_RESULT_SUCCESS;
 
     DEBUG_API("->XAMetadataTraversalItfImpl_GetChildInfo");
@@ -180,8 +180,8 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_  
-        res = XAMetadataTraversalItfAdapt_GetChildCount(impl->adaptCtx, &chCount);
+
+        res = XAMetadataTraversalItfAdapt_GetChildCount((XAAdaptationGstCtx*)impl->adaptCtx, &chCount);
         if(index >= chCount || res != XA_RESULT_SUCCESS)
         {
             /* out of bounds */
@@ -189,9 +189,9 @@
             DEBUG_API("<-XAMetadataTraversalItfImpl_GetChildInfo");
             return XA_RESULT_PARAMETER_INVALID;
         }
-        res = XAMetadataTraversalItfAdapt_GetChildInfo(impl->adaptCtx, index,
+        res = XAMetadataTraversalItfAdapt_GetChildInfo((XAAdaptationGstCtx*)impl->adaptCtx, index,
                                                 pNodeID, pType, size, pMimeType);
-#endif
+
     }
 
     DEBUG_API("<-XAMetadataTraversalItfImpl_GetChildInfo");
@@ -205,9 +205,9 @@
                                                   XAuint32 index)
 {
     XAMetadataTraversalImpl *impl = NULL;
-#ifdef _GSTREAMER_BACKEND_  
+
     XAuint32 chCount = 0;
-#endif
+
     XAresult res = XA_RESULT_SUCCESS;
 
     DEBUG_API("->XAMetadataTraversalItfImpl_SetActiveNode");
@@ -219,8 +219,8 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_  
-        res = XAMetadataTraversalItfAdapt_GetChildCount(impl->adaptCtx, &chCount);
+
+        res = XAMetadataTraversalItfAdapt_GetChildCount((XAAdaptationGstCtx*)impl->adaptCtx, &chCount);
         if( res == XA_RESULT_SUCCESS )
         {
             if((impl->nodedepth==0 && index==XA_NODE_PARENT) ||
@@ -232,7 +232,7 @@
             else
             {
                 /* update node and childs */
-                res = XAMetadataTraversalItfAdapt_SetActiveNode(impl->adaptCtx, index);
+                res = XAMetadataTraversalItfAdapt_SetActiveNode((XAAdaptationGstCtx*)impl->adaptCtx, index);
                 if( res == XA_RESULT_SUCCESS )
                 {
                     if(index==XA_NODE_PARENT)
@@ -252,7 +252,7 @@
             DEBUG_API("<-XAMetadataTraversalItfImpl_SetActiveNode");
             return XA_RESULT_INTERNAL_ERROR;
         }
-#endif        
+      
     }
 
     DEBUG_API("<-XAMetadataTraversalItfImpl_SetActiveNode");
@@ -262,7 +262,6 @@
 /*****************************************************************************
  * XAMetadataTraversalImpl -specific methods
  *****************************************************************************/
-#ifdef _GSTREAMER_BACKEND_  
 
 /* XAMetadataTraversalImpl* XAMetadataTraversalItfImpl_Create()
  * Description: Allocate and initialize XAMetadataTraversalImpl
@@ -291,7 +290,7 @@
     DEBUG_API("<-XAMetadataTraversalItfImpl_Create");
     return self;
 }
-#endif
+
 /* void XAMetadataTraversalItfImpl_Free(XAMetadataTraversalImpl* self)
  * Description: Free all resources reserved at XAMetadataTraversalItfImpl_Create
  */
--- a/khronosfws/openmax_al/src/common/xametadatatraversalitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xametadatatraversalitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XAMETADATATRAVERSALITF_H
 #define XAMETADATATRAVERSALITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 
 /** TYPES **/
@@ -43,9 +40,9 @@
     XAuint32 index;
     XAuint32 nodedepth;
 
-#ifdef _GSTREAMER_BACKEND_  
+
     XAAdaptationBaseCtx *adaptCtx;
-#endif
+
 } XAMetadataTraversalImpl;
 
 /** METHODS **/
@@ -71,10 +68,9 @@
 XAresult XAMetadataTraversalItfImpl_SetActiveNode(XAMetadataTraversalItf self,
                                                 XAuint32 index);
 
-#ifdef _GSTREAMER_BACKEND_  
+
 /* XAMetadataExtractionItfImpl -specific methods */
 XAMetadataTraversalImpl* XAMetadataTraversalItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-#endif
 void XAMetadataTraversalItfImpl_Free(XAMetadataTraversalImpl* self);
 
 #endif /* XAMETADATATRAVERSALITF_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xanlinearvolumeitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XANLINEARVOLUMEITF_H
+#define XANLINEARVOLUMEITF_H
+
+#include "openmaxalwrapper.h"
+#include "xaadaptationmmf.h"
+
+/** MACROS **/
+
+/** TYPES **/
+
+/** ENUMERATIONS **/
+
+/** STRUCTURES **/
+/* Definition of XANokiaLinearVolumeItf implementation */
+typedef struct XANokiaLinearVolumeItfImpl_
+{
+    /* parent interface */
+    struct XANokiaLinearVolumeItf_ itf;
+    /* pointer to self */
+    struct XANokiaLinearVolumeItfImpl_* self;
+
+    XAmillibel volumeLevel;
+    XAuint32 eventFlags;
+    
+    XANokiaLinearVolumeItf         cbPtrToSelf;
+    xaNokiaLinearVolumeCallback    callback;
+    void               *context; 
+ 
+    /*Adaptation variables*/
+    XAAdaptationBaseCtx *adapCtx;
+
+} XANokiaLinearVolumeItfImpl;
+
+/** METHODS **/
+
+/* Base interface XANokiaLinearVolumeItf implementation */
+XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage);
+
+XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage);
+
+XAresult XANokiaLinearVolumeItfImpl_GetStepCount(XANokiaLinearVolumeItf self, XAuint32 *pStepCount);
+
+XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(XANokiaLinearVolumeItf self,
+                                              xaNokiaLinearVolumeCallback callback,
+                                              void * pContext);
+XAresult XANokiaLinearVolumeItfImpl_SetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 eventFlags );
+XAresult XANokiaLinearVolumeItfImpl_GetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 * pEventFlags);
+/* XANokiaLinearVolumeItfImpl -specific methods */
+XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
+void XANokiaLinearVolumeItfImpl_Free(XANokiaLinearVolumeItfImpl* self);
+void XANokiaLinearVolumeItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+
+#endif /* XANLINEARVOLUMEITF_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xanokialinearvolume_iid.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,15 @@
+/*
+ * Copyright goes here.
+ *
+ */
+
+
+#include "openmaxalwrapper.h"
+
+/*****************************************************************************/
+/* Interface IDs                                                             */
+/*****************************************************************************/
+/*866fa480-2610-11df-b13f-0002a5d5c51b*/
+static const struct XAInterfaceID_ XA_IID_NOKIALINEARVOLUME_ = { 0x866fa480, 0x2610, 0x11df, 0xb13f, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+XA_API const XAInterfaceID XA_IID_NOKIALINEARVOLUME = &XA_IID_NOKIALINEARVOLUME_;
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,296 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "xanlinearvolumeitf.h"
+#include "xanokialinearvolumeitfadaptationmmf.h"
+
+/**
+ * XANokiaLinearVolumeItfImpl* GetImpl(XANokiaLinearVolumeItf self)
+ * Description: Validated interface pointer and cast it to implementations pointer.
+ **/
+static XANokiaLinearVolumeItfImpl* GetImpl(XANokiaLinearVolumeItf self)
+{
+    if(self)
+    {
+        XANokiaLinearVolumeItfImpl* impl = (XANokiaLinearVolumeItfImpl*)(*self);
+        if(impl && impl == impl->self)
+        {
+            return impl;
+        }
+    }
+    return NULL;
+}
+
+/**
+ * XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(XANokiaLinearVolumeItf self,
+ *                                               xaNokiaLinearVolumeCallback callback,
+ *                                               void * pContext)
+ * Description: Sets or clears the xaVolumeCallback.
+ **/
+XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(XANokiaLinearVolumeItf self,
+                                              xaNokiaLinearVolumeCallback callback,
+                                              void * pContext)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaLinearVolumeItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_RegisterVolumeCallback");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_RegisterVolumeCallback");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    impl->callback = callback;
+    impl->context = pContext;
+    impl->cbPtrToSelf = self;
+
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_RegisterVolumeCallback");
+    return ret;
+}
+
+/**
+ * Base interface XANokiaLinearVolumeItf implementation
+ */
+
+/**
+ * XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 percentage)
+ * Description: Sets the object's volume level.
+ **/
+XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage)
+{
+    XANokiaLinearVolumeItfImpl *impl = GetImpl(self);
+    XAresult ret = XA_RESULT_SUCCESS;     
+    XAuint32 vol = *percentage;
+    
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_SetVolumeLevel");
+
+  
+    if((!impl) || (vol > MAX_PERCENTAGE_VOLUME))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+    if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
+    {
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
+        return ret;
+    }
+    if(impl->adapCtx->fwtype == FWMgrFWMMF)
+        {
+        ret = XANokiaLinearVolumeItfAdapt_SetVolumeLevel((XAAdaptationMMFCtx*)impl->adapCtx,  vol);
+        }
+
+    if(ret == XA_RESULT_SUCCESS)
+    {
+        impl->volumeLevel = vol;
+    }
+
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
+    return ret ;
+}
+
+/**
+ * XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(XANokiaLinearVolumeItf self, XAmillibel *pLevel)
+ * Description: Gets the object’s volume level.
+ **/
+XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaLinearVolumeItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_GetVolumeLevel");
+
+    if(!impl || !percentage)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *percentage = impl->volumeLevel;
+
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetVolumeLevel");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel(XANokiaLinearVolumeItf  self, XAmillibel *pMaxLevel)
+ * Description: Gets the maximum supported level.
+ **/
+XAresult XANokiaLinearVolumeItfImpl_GetStepCount(XANokiaLinearVolumeItf  self, XAuint32 *pStepCount)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaLinearVolumeItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_GetVolumeLevel");
+
+    if(!impl || !pStepCount)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+    if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
+    {
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
+        return ret;
+    }
+    if(impl->adapCtx->fwtype == FWMgrFWMMF)
+        {
+        ret = XANokiaLinearVolumeItfAdapt_GetStepCount((XAAdaptationMMFCtx*)impl->adapCtx, pStepCount);
+        }
+
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
+    return ret;
+}
+
+XAresult XANokiaLinearVolumeItfImpl_SetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 eventFlags )
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaLinearVolumeItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_SetCallbackEventsMask");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetCallbackEventsMask");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    impl->eventFlags = eventFlags;
+
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetCallbackEventsMask");
+    return ret;    
+    }
+
+XAresult XANokiaLinearVolumeItfImpl_GetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 * pEventFlags)
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaLinearVolumeItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_GetCallbackEventsMask");
+
+    if(!impl || !pEventFlags)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetCallbackEventsMask");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pEventFlags = impl->eventFlags;
+
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetCallbackEventsMask");
+    return ret;    
+    }
+
+/**
+ * XANokiaLinearVolumeItfImpl -specific methods
+ **/
+
+/**
+ * XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create()
+ * Description: Allocate and initialize VolumeItfImpl
+ **/
+XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx )
+{
+    XANokiaLinearVolumeItfImpl *self = (XANokiaLinearVolumeItfImpl*)
+        calloc(1,sizeof(XANokiaLinearVolumeItfImpl));
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_Create");
+
+    if(self)
+    {
+        /* init itf default implementation */
+        self->itf.GetStepCount = XANokiaLinearVolumeItfImpl_GetStepCount;
+        self->itf.GetVolumeLevel = XANokiaLinearVolumeItfImpl_GetVolumeLevel;
+        self->itf.SetVolumeLevel = XANokiaLinearVolumeItfImpl_SetVolumeLevel;
+       	self->itf.RegisterVolumeCallback = XANokiaLinearVolumeItfImpl_RegisterVolumeCallback;        
+       	self->itf.SetCallbackEventsMask = XANokiaLinearVolumeItfImpl_SetCallbackEventsMask;
+       	self->itf.GetCallbackEventsMask = XANokiaLinearVolumeItfImpl_GetCallbackEventsMask;
+        /* init variables */
+        self->volumeLevel = 0;
+
+        self->adapCtx = adapCtx;
+
+        XAAdaptationBase_AddEventHandler( adapCtx, &XANokiaLinearVolumeItfImpl_AdaptCb, XA_NOKIALINEARVOLITFEVENTS, self );
+        
+        self->self = self;
+    }
+
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_Create");
+    return self;
+}
+
+/**
+ * void XANokiaLinearVolumeItfImpl_Free(XANokiaLinearVolumeItfImpl* self)
+ * Description: Free all resources reserved at XANokiaLinearVolumeItfImpl_Create
+ **/
+void XANokiaLinearVolumeItfImpl_Free(XANokiaLinearVolumeItfImpl* self)
+{
+    DEBUG_API("->XANokiaLinearVolumeItfImpl_Free");
+    assert(self==self->self);
+    free(self);
+    DEBUG_API("<-XANokiaLinearVolumeItfImpl_Free");
+}
+
+/* void XANokiaLinearVolumeItfimpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
+ * Description: Event handler for adaptation events
+ */
+void XANokiaLinearVolumeItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
+{
+    XANokiaLinearVolumeItfImpl* impl =(XANokiaLinearVolumeItfImpl*)pHandlerCtx;
+    XAboolean eventBoolean = XA_BOOLEAN_FALSE;
+    
+    DEBUG_API("->XANokiaLinearVolumeItfimpl_AdaptCb");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XANokiaLinearVolumeItfImpl_AdaptCb, invalid context pointer!");
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_AdaptCb");
+        return;
+    }
+    assert(event);
+
+    if( event->eventid == XA_ADAPT_VOLUME_VOLUME_CHANGED && impl->callback )
+    {
+        if(XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED & impl->eventFlags)
+            {
+            DEBUG_API("Volume level changed in adaptation"); 
+            impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED, eventBoolean );
+            }
+    }       
+    else
+    {
+        /* do nothing */
+    }
+    DEBUG_API("<-XANokiaLinearVolumeItfimpl_AdaptCb");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xanokiavolumeext_iid.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,15 @@
+/*
+ * Copyright goes here.
+ *
+ */
+
+
+#include "openmaxalwrapper.h"
+
+/*****************************************************************************/
+/* Interface IDs                                                             */
+/*****************************************************************************/
+/*ca2193c0-260e-11df-a99f-0002a5d5c51b*/
+static const struct XAInterfaceID_ XA_IID_NOKIAVOLUMEEXT_ = { 0xca2193c0, 0x260e, 0x11df, 0xa99f, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+XA_API const XAInterfaceID XA_IID_NOKIAVOLUMEEXT = &XA_IID_NOKIAVOLUMEEXT_;
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xanokiavolumeextitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,516 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "xanvolumeextitf.h"
+#include "xanokiavolumeextitfadaptationmmf.h"
+
+/**
+ * XANokiaVolumeExtItfImpl* GetImpl(XANokiaVolumeExtItf self)
+ * Description: Validated interface pointer and cast it to implementations pointer.
+ **/
+static XANokiaVolumeExtItfImpl* GetImpl(XANokiaVolumeExtItf self)
+{
+    if(self)
+    {
+        XANokiaVolumeExtItfImpl* impl = (XANokiaVolumeExtItfImpl*)(*self);
+        if(impl && impl == impl->self)
+        {
+            return impl;
+        }
+    }
+    return NULL;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(XANokiaVolumeExtItf self,
+ *                                               xaNokiaVolumeExtCallback callback,
+ *                                               void * pContext)
+ * Description: Sets or clears the xaVolumeCallback.
+ **/
+XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(XANokiaVolumeExtItf self,
+                                              xaNokiaVolumeExtCallback callback,
+                                              void * pContext)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_RegisterVolumeCallback");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_RegisterVolumeCallback");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    impl->callback = callback;
+    impl->context = pContext;
+    impl->cbPtrToSelf = self;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_RegisterVolumeCallback");
+    return ret;
+}
+
+/**
+ * Base interface XANokiaVolumeExtItf implementation
+ */
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel level)
+ * Description: Sets the object's volume level.
+ **/
+XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel level)
+{
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    XAmillibel maximumLevel = 0; 
+ 
+    DEBUG_API("->XANokiaVolumeExtItfImpl_SetVolumeLevel");
+
+    /* check maximum volume level */
+  	if(XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(self, &maximumLevel) != XA_RESULT_SUCCESS)
+   	{
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
+        /* cannot solve maximum volume level */
+        return XA_RESULT_PARAMETER_INVALID;
+   	}
+    
+    if(!impl || level > maximumLevel)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    impl->volumeLevel = level;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
+    return ret ;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pLevel)
+ * Description: Gets the object’s volume level.
+ **/
+XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pLevel)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_GetVolumeLevel");
+
+    if(!impl || !pLevel)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pLevel = impl->volumeLevel;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_GetVolumeLevel");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf  self, XAmillibel *pMaxLevel)
+ * Description: Gets the maximum supported level.
+ **/
+XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf  self, XAmillibel *pMaxLevel)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_GetVolumeLevel");
+
+    if(!impl || !pMaxLevel)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMaxVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pMaxLevel = MAX_SUPPORT_VOLUME_LEVEL;
+    
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMaxVolumeLevel");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self, XAboolean mute)
+ * Description: Mutes or unmutes the object.
+ **/
+XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self, XAboolean mute)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_SetMute");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+    if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
+    {
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
+        return ret;
+    }
+    /* check is mute state changed */
+    if(mute != impl->mute)
+    {
+        if(impl->adapCtx->fwtype == FWMgrFWMMF)
+        {
+        ret = XANokiaVolumeExtItfAdapt_SetMute((XAAdaptationMMFCtx*)impl->adapCtx,  mute);
+        }
+
+        if(ret == XA_RESULT_SUCCESS)
+        {
+            impl->mute = mute;
+        }
+    }
+
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self, XAboolean *pMute)
+ * Description: Retrieves the object's state.
+ **/
+XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self, XAboolean *pMute)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_GetMute");
+
+    if(!impl || !pMute)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMute");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pMute = impl->mute;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMute");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(XANokiaVolumeExtItf self, XAboolean enable)
+ * Description: Enables or disables the stereo positioning effect.
+ **/
+XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(XANokiaVolumeExtItf self, XAboolean enable)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_EnableStereoPosition");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+    if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
+    {
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
+        return ret;
+    }
+    /* Check is stereo position state changed */
+    if(enable != impl->enableStereoPos)
+    {
+        if(impl->adapCtx->fwtype == FWMgrFWMMF)
+        {
+        ret = XANokiaVolumeExtItfAdapt_EnableStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
+                                                    enable);
+        }
+
+        if(ret == XA_RESULT_SUCCESS)
+        {
+            impl->enableStereoPos = enable;
+        }
+    }
+
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(XANokiaVolumeExtItf self,
+ *                                                  XAboolean *pEnable)
+ * Description: Returns the enabled state of the stereo positioning effect.
+ **/
+XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(XANokiaVolumeExtItf self,
+                                                 XAboolean *pEnable)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
+
+    if(!impl || !pEnable)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pEnable = impl->enableStereoPos;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_SetStereoPosition(XANokiaVolumeExtItf self,
+ *                                            XApermille stereoPosition)
+ * Description: Sets the stereo position of the object.
+ **/
+XAresult XANokiaVolumeExtItfImpl_SetStereoPosition(XANokiaVolumeExtItf self,
+                                           XApermille stereoPosition)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_SetStereoPosition");
+
+    if(!impl || (stereoPosition < STEREO_POSITION_LEFT) ||
+        (stereoPosition > STEREO_POSITION_RIGHT))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    impl->stereoPosition = stereoPosition;
+
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+    if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
+    {
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
+        return ret;
+    }
+    /* check is stereo position effect enabled if is then handle effect */
+    if(impl->enableStereoPos)
+    {
+    if(impl->adapCtx->fwtype == FWMgrFWMMF)
+        {
+        ret = XANokiaVolumeExtItfAdapt_SetStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
+                                                 stereoPosition);
+        
+        }
+    }
+
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
+    return ret;
+}
+
+/**
+ * XAresult XANokiaVolumeExtItfImpl_GetStereoPosition(XANokiaVolumeExtItf self,
+ *                                            XApermille *pStereoPosition)
+ * Description: Gets the object’s stereo position setting.
+ **/
+XAresult XANokiaVolumeExtItfImpl_GetStereoPosition(XANokiaVolumeExtItf self,
+                                           XApermille *pStereoPosition)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl *impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_GetStereoPosition");
+
+    if(!impl || !pStereoPosition)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetStereoPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pStereoPosition = impl->stereoPosition;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_GetStereoPosition");
+    return ret;
+}
+
+XAresult XANokiaVolumeExtItfImpl_SetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 eventFlags )
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_SetCallbackEventsMask");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetCallbackEventsMask");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    impl->eventFlags = eventFlags;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_SetCallbackEventsMask");
+    return ret;    
+    }
+
+XAresult XANokiaVolumeExtItfImpl_GetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 * pEventFlags)
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    XANokiaVolumeExtItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XANokiaVolumeExtItfImpl_GetCallbackEventsMask");
+
+    if(!impl || !pEventFlags)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetCallbackEventsMask");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pEventFlags = impl->eventFlags;
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_GetCallbackEventsMask");
+    return ret;    
+    }
+
+
+/**
+ * XANokiaVolumeExtItfImpl -specific methods
+ **/
+
+/**
+ * XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create()
+ * Description: Allocate and initialize VolumeItfImpl
+ **/
+XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create(XAAdaptationBaseCtx *adapCtx )
+{
+    XANokiaVolumeExtItfImpl *self = (XANokiaVolumeExtItfImpl*)
+        calloc(1,sizeof(XANokiaVolumeExtItfImpl));
+    DEBUG_API("->XANokiaVolumeExtItfImpl_Create");
+
+    if(self)
+    {
+        /* init itf default implementation */
+        self->itf.EnableStereoPosition = XANokiaVolumeExtItfImpl_EnableStereoPosition;
+        self->itf.GetMaxVolumeLevel = XANokiaVolumeExtItfImpl_GetMaxVolumeLevel;
+        self->itf.GetMute = XANokiaVolumeExtItfImpl_GetMute;
+        self->itf.GetStereoPosition = XANokiaVolumeExtItfImpl_GetStereoPosition;
+        self->itf.GetVolumeLevel = XANokiaVolumeExtItfImpl_GetVolumeLevel;
+        self->itf.IsEnabledStereoPosition = XANokiaVolumeExtItfImpl_IsEnabledStereoPosition;
+        self->itf.SetMute = XANokiaVolumeExtItfImpl_SetMute;
+        self->itf.SetStereoPosition = XANokiaVolumeExtItfImpl_SetStereoPosition;
+        self->itf.SetVolumeLevel = XANokiaVolumeExtItfImpl_SetVolumeLevel;
+       	self->itf.RegisterVolumeCallback = XANokiaVolumeExtItfImpl_RegisterVolumeCallback;
+       	self->itf.SetCallbackEventsMask = XANokiaVolumeExtItfImpl_SetCallbackEventsMask;
+       	self->itf.GetCallbackEventsMask = XANokiaVolumeExtItfImpl_GetCallbackEventsMask;
+
+        /* init variables */
+        self->volumeLevel = 0;
+        self->mute = XA_BOOLEAN_FALSE;
+        self->enableStereoPos = XA_BOOLEAN_FALSE;
+        self->stereoPosition = STEREO_POSITION_CENTER;
+
+        self->adapCtx = adapCtx;
+
+        XAAdaptationBase_AddEventHandler(adapCtx, &XANokiaVolumeExtItfImpl_AdaptCb, XA_NOKIAEXTVOLITFEVENTS, self );
+        
+        self->self = self;
+    }
+
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_Create");
+    return self;
+}
+
+/**
+ * void XANokiaVolumeExtItfImpl_Free(XANokiaVolumeExtItfImpl* self)
+ * Description: Free all resources reserved at XANokiaVolumeExtItfImpl_Create
+ **/
+void XANokiaVolumeExtItfImpl_Free(XANokiaVolumeExtItfImpl* self)
+{
+    DEBUG_API("->XANokiaVolumeExtItfImpl_Free");
+    assert(self==self->self);
+    free(self);
+    DEBUG_API("<-XANokiaVolumeExtItfImpl_Free");
+}
+
+/* void XANokiaVolumeExtItfimpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
+ * Description: Event handler for adaptation events
+ */
+void XANokiaVolumeExtItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
+{
+    XANokiaVolumeExtItfImpl* impl =(XANokiaVolumeExtItfImpl*)pHandlerCtx;
+    XAboolean eventBoolean = XA_BOOLEAN_FALSE;
+    
+    DEBUG_API("->XANokiaVolumeExtItfimpl_AdaptCb");
+
+    if(!impl)
+    {
+        DEBUG_ERR("XANokiaVolumeExtItfImpl_AdaptCb, invalid context pointer!");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_AdaptCb");
+        return;
+    }
+    assert(event);
+    
+    if( event->eventid == XA_ADAPT_VOLUME_MUTE_CHANGED && impl->callback )
+    {
+        if(impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_MUTE_CHANGED)
+            {
+            DEBUG_API("Mute Status  changed in adaptation");
+            eventBoolean = *(XAboolean*)event->data;    
+            impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIAVOLUMEEXT_EVENT_MUTE_CHANGED, eventBoolean  );
+            }
+    }
+       
+    else if (event->eventid == XA_ADAPT_VOLUME_VOLUME_CHANGED)
+    {
+        if(impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_VOLUME_CHANGED)
+            {
+            DEBUG_API("Volume Status  changed in adaptation");
+            eventBoolean = *(XAboolean*)event->data;    
+            impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIAVOLUMEEXT_EVENT_VOLUME_CHANGED, eventBoolean  );
+            }
+    }
+    else if (event->eventid == XA_ADAPT_VULOME_STEREOPOSITION_CHANGED)
+    {
+        if(impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_STEREO_POSITION_CHANGED)
+            {
+            DEBUG_API("StereoPosituin Status  changed in adaptation");
+            eventBoolean = *(XAboolean*)event->data;    
+            impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIAVOLUMEEXT_EVENT_STEREO_POSITION_CHANGED, eventBoolean  );
+            }
+    }
+    
+    DEBUG_API("<-XANokiaVolumeExtItfimpl_AdaptCb");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xanvolumeextitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XANVOLUMEEXTITF_H
+#define XANVOLUMEEXTITF_H
+
+#include "openmaxalwrapper.h"
+#include "xaglobals.h"
+#include "xaadptbasectx.h"
+
+/** MACROS **/
+
+/* Max volume level is implementation-dependent but must be at least 0mB
+ * now used max volume 10 mB
+ */
+#define MAX_VOLUME_LEVEL 10
+#define MAX_VOLUME_AT_LEAST 0
+
+/** TYPES **/
+
+/** ENUMERATIONS **/
+
+/** STRUCTURES **/
+/* Definition of XANokiaVolumeExtItf implementation */
+typedef struct XANokiaVolumeExtItfImpl_
+{
+    /* parent interface */
+    struct XANokiaVolumeExtItf_ itf;
+    /* pointer to self */
+    struct XANokiaVolumeExtItfImpl_* self;
+
+    XAmillibel volumeLevel;
+    XAboolean mute;
+    XAboolean enableStereoPos;
+    XApermille stereoPosition;
+    XAuint32   eventFlags;
+    XANokiaVolumeExtItf         cbPtrToSelf;
+    xaNokiaVolumeExtCallback    callback;
+    void               *context; 
+ 
+    /*Adaptation variables*/
+    XAAdaptationBaseCtx *adapCtx;
+
+} XANokiaVolumeExtItfImpl;
+
+/** METHODS **/
+
+/* Base interface XANokiaVolumeExtItf implementation */
+XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel level);
+
+XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pLevel);
+
+XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pMaxLevel);
+
+XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self, XAboolean mute);
+
+XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self, XAboolean *pMute);
+
+XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(XANokiaVolumeExtItf self, XAboolean enable);
+
+XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(XANokiaVolumeExtItf self, XAboolean *pEnable);
+
+XAresult XANokiaVolumeExtItfImpl_SetStereoPosition(XANokiaVolumeExtItf self, XApermille stereoPosition);
+
+XAresult XANokiaVolumeExtItfImpl_GetStereoPosition(XANokiaVolumeExtItf self, XApermille *pStereoPosition);
+
+XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(XANokiaVolumeExtItf self,
+                                              xaNokiaVolumeExtCallback callback,
+                                              void * pContext);
+XAresult XANokiaVolumeExtItfImpl_SetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 eventFlags );
+XAresult XANokiaVolumeExtItfImpl_GetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 * pEventFlags);
+
+/* XANokiaVolumeExtItfImpl -specific methods */
+XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
+void XANokiaVolumeExtItfImpl_Free(XANokiaVolumeExtItfImpl* self);
+void XANokiaVolumeExtItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+
+#endif /* XANVOLUMEEXTITF_H */
--- a/khronosfws/openmax_al/src/common/xaobjectitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaobjectitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -482,25 +482,6 @@
     return NULL;
 }
 
-void XAObjectItfImpl_AsyncCleanup(void* args)
-{
-    XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*(XAObjectItf)(args));
-    DEBUG_API("->XAObjectItfImpl_AsyncCleanup");
-
-    if( pObjImp &&
-       (pObjImp == pObjImp->self) &&
-        pObjImp->FreeResourcesImpl )
-    {
-        pObjImp->FreeResourcesImpl((XAObjectItf)(args));
-    }
-    else
-    {
-        DEBUG_API("XAObjectItfImpl_AsyncCleanup: INVALID args");
-    }
-
-    DEBUG_API("<-XAObjectItfImpl_AsyncCleanup");
-}
-
 XAObjItfMapEntry* XAObjectItfImpl_GetItfEntry(const XAObjectItf self,
                                               const XAInterfaceID iid)
 {
--- a/khronosfws/openmax_al/src/common/xaobjectitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaobjectitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -120,7 +120,6 @@
 /* methods for asynchronous service */
 void* XAObjectItfImpl_AsyncRealize(void* args);
 void* XAObjectItfImpl_AsyncResume(void* args);
-void XAObjectItfImpl_AsyncCleanup(void* args);
 
 XAObjItfMapEntry* XAObjectItfImpl_GetItfEntry(const XAObjectItf self,
                                               const XAInterfaceID iid);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xaobjects.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,178 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+/*All global definitions and declarations here */
+
+#ifndef XAOBJECTS_H
+#define XAOBJECTS_H
+
+#include "openmaxalwrapper.h"
+#include "xaframeworkmgr.h"
+#include "xaglobals.h"
+#include "xacapabilitiesmgr.h"
+
+/**
+ * GLOBAL METHODS
+ */
+
+
+/*
+ * Engine
+ */
+XAresult XAEngineImpl_Create(XAObjectItf *pEngine,
+                             XAuint32 numOptions,
+                             const XAEngineOption *pEngineOptions,
+                             XAuint32 numInterfaces,
+                             const XAInterfaceID *pInterfaceIds,
+                             const XAboolean *pInterfaceRequired);
+
+XAresult XAEngineImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XAEngineImpl_QuerySupportedInterfaces(XAuint32 index,
+                                               XAInterfaceID *pInterfaceId);
+
+/*
+ * Media Player
+ */
+XAresult XAMediaPlayerImpl_CreateMediaPlayer(   FrameworkMap* mapper,
+                                                XACapabilities* capabilities,
+                                                XAObjectItf *pPlayer,
+                                                XADataSource *pDataSrc,
+                                                XADataSource *pBankSrc,
+                                                XADataSink *pAudioSnk,
+                                                XADataSink *pImageVideoSnk,
+                                                XADataSink *pVibra,
+                                                XADataSink *pLEDArray,
+                                                XAuint32 numInterfaces,
+                                                const XAInterfaceID *pInterfaceIds,
+                                                const XAboolean *pInterfaceRequired);
+
+XAresult XAMediaPlayerImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XAMediaPlayerImpl_QuerySupportedInterfaces(XAuint32 index,
+                                                  XAInterfaceID *pInterfaceId);
+
+/*
+ * Metadata Extractor
+ */
+XAresult XAMetadataExtractorImpl_Create(    FrameworkMap* mapper,
+                                            XACapabilities* capabilities,
+                                            XAObjectItf *pMetadataExtractor,
+                                            XADataSource *pDataSource,
+                                            XAuint32 numInterfaces,
+                                            const XAInterfaceID *pInterfaceIds,
+                                            const XAboolean *pInterfaceRequired );
+
+XAresult XAMetadataExtractorImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XAMetadataExtractorImpl_QuerySupportedInterfaces(XAuint32 index,
+                                            XAInterfaceID *pInterfaceId);
+
+/*
+ * Output Mix
+ */
+XAresult XAOMixImpl_CreateOutputMix(    FrameworkMap* mapper,
+                                        XACapabilities* capabilities,
+                                        XAObjectItf *pMix,
+                                        XAuint32 numInterfaces,
+                                        const XAInterfaceID *pInterfaceIds,
+                                        const XAboolean *pInterfaceRequired );
+
+XAresult XAOMixImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XAOMixImpl_QuerySupportedInterfaces(XAuint32 index,
+                                             XAInterfaceID *pInterfaceId);
+
+/*
+ * Media Recorder
+ */
+XAresult XAMediaRecorderImpl_CreateMediaRecorder(FrameworkMap* mapper,
+                                                 XACapabilities* capabilities,
+                                                 XAObjectItf* pRecorder,
+                                                 XADataSource* pAudioSrc,
+                                                 XADataSource* pImageVideoSrc,
+                                                 XADataSink* pDataSnk,
+                                                 XAuint32 numInterfaces,
+                                                 const XAInterfaceID *pInterfaceIds,
+                                                 const XAboolean *pInterfaceRequired);
+
+XAresult XAMediaRecorderImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XAMediaRecorderImpl_QuerySupportedInterfaces(XAuint32 index,
+                                                      XAInterfaceID *pInterfaceId);
+
+/*
+ * Camera Device
+ */
+XAresult XACameraDeviceImpl_CreateCameraDevice( FrameworkMap* mapper,
+                                                XACapabilities* capabilities,
+                                                XAObjectItf* pDevice,
+                                                XAuint32 deviceID,
+                                                XAuint32 numInterfaces,
+                                                const XAInterfaceID * pInterfaceIds,
+                                                const XAboolean * pInterfaceRequired);
+
+XAresult XACameraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XACameraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
+                                                     XAInterfaceID *pInterfaceId);
+
+/*
+ * Radio Device
+ */
+XAresult XARadioDeviceImpl_CreateRadioDevice(   FrameworkMap* mapper,
+                                                XAObjectItf* pDevice,
+                                                XAuint32 numInterfaces,
+                                                const XAInterfaceID * pInterfaceIds,
+                                                const XAboolean * pInterfaceRequired);
+
+XAresult XARadioDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XARadioDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
+                                                    XAInterfaceID *pInterfaceId);
+
+/*
+ * Vibra Device
+ */
+XAresult XAVibraDeviceImpl_CreateVibraDevice(   FrameworkMap* mapper,
+                                                XAObjectItf* pDevice,
+                                                XAuint32 deviceID,
+                                                XAuint32 numInterfaces,
+                                                const XAInterfaceID * pInterfaceIds,
+                                                const XAboolean * pInterfaceRequired);
+
+XAresult XAVibraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XAVibraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
+                                                    XAInterfaceID *pInterfaceId);
+
+/*
+ * LED Array
+ */
+XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice( FrameworkMap* mapper,
+                                                    XAObjectItf* pDevice,
+                                                    XAuint32 deviceID,
+                                                    XAuint32 numInterfaces,
+                                                    const XAInterfaceID * pInterfaceIds,
+                                                    const XAboolean * pInterfaceRequired);
+
+XAresult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+
+XAresult XALEDArrayDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
+                                                    XAInterfaceID *pInterfaceId);
+
+
+#endif /*XAOBJECTS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xastreaminformationitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,429 @@
+/**
+ * src\common\XAStreamInformationItf.c
+ * Part of OpenMAX AL Implementation
+ * Copyright (c) 2009 Nokia Inc.
+ *
+ * This file contains implementation of XAStreamInformationItf
+ **/
+
+#include <assert.h>
+
+#include "xastreaminformationitf.h"
+#include "xastreaminformationitfadaptation.h"
+#include "xastreaminformationitfadaptationmmf.h"
+
+/* XAStreamInformationItfImpl* GetImpl
+ * Description: Validate interface pointer and cast it to implementation pointer.
+ */
+static XAStreamInformationItfImpl* GetImpl(XAStreamInformationItf self)
+{
+    if(self)
+    {
+        XAStreamInformationItfImpl* impl = (XAStreamInformationItfImpl*)(*self);
+        if(impl && impl == impl->self)
+        {
+            return impl;
+        }
+    }
+    return NULL;
+}
+
+/**
+ * Base interface XAPlayItf implementation
+ */
+
+
+XAresult XAStreamInformationItfImpl_QueryMediaContainerInformation(
+                XAStreamInformationItf self,
+                XAMediaContainerInformation * info)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAStreamInformationItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XAStreamInformationItfImpl_QueryMediaContainerInformation");
+    if(!impl || !info)
+    {
+        /* invalid parameter */
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfImpl_QueryMediaContainerInformation");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryMediaContainerInformation");
+            return ret;
+        }
+        ret = XAStreamInformationItfAdapt_QueryMediaContainerInformation(
+                    impl->adapCtx,
+                    &(info->containerType),
+                    &(info->mediaDuration),
+                    &(info->numStreams));
+        XAAdaptationBase_ThreadExit(impl->adapCtx);
+        }
+    else
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryMediaContainerInformation");
+            return ret;
+        }
+        ret = XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
+                    impl->adapCtx,
+                    &(info->containerType),
+                    &(info->mediaDuration),
+                    &(info->numStreams));
+        XAAdaptationBase_ThreadExit(impl->adapCtx);;
+        }
+
+    DEBUG_API("-<XAStreamInformationItfImpl_QueryMediaContainerInformation");
+    return ret;
+}
+
+XAresult XAStreamInformationItfImpl_QueryStreamType(
+                XAStreamInformationItf self,
+                XAuint32 streamIndex, 
+                XAuint32 *domain)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAStreamInformationItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XAStreamInformationItfImpl_QueryStreamType");
+    if(!impl || !domain || (streamIndex == 0))
+    {
+        /* invalid parameter */
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamType");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamType");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdapt_QueryStreamType(
+                    impl->adapCtx,
+                    streamIndex,
+                    domain);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);
+        }
+    else
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamType");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdaptMMF_QueryStreamType(
+                    impl->adapCtx,
+                    streamIndex,
+                    domain);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);;
+        }
+    DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamType");
+    return ret;
+}
+
+XAresult XAStreamInformationItfImpl_QueryStreamInformation(
+                XAStreamInformationItf self, 
+                XAuint32 streamIndex,
+                void * info)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAStreamInformationItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XAStreamInformationItfImpl_QueryStreamInformation");
+    if(!impl || !info || (streamIndex == 0))
+    {
+        /* invalid parameter */
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamInformation");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamInformation");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdapt_QueryStreamInformation(
+                    impl->adapCtx,
+                    streamIndex,
+                    info);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);
+        }
+    else
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamInformation");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdaptMMF_QueryStreamInformation(
+                    impl->adapCtx,
+                    streamIndex,
+                    info);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);;
+        }
+
+    DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamInformation");
+    return ret;
+}
+
+XAresult XAStreamInformationItfImpl_QueryStreamName(
+                XAStreamInformationItf self, 
+                XAuint32 streamIndex, 
+                XAuint16 * pNameSize,
+                XAchar * pName)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAStreamInformationItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XAStreamInformationItfImpl_QueryStreamName");
+    if(!impl || (streamIndex == 0) || !pNameSize)
+    {
+        /* invalid parameter */
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamName");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamName");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdapt_QueryStreamName(
+                    impl->adapCtx,
+                    streamIndex,
+                    pNameSize,
+                    pName);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);
+        }
+    else
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamName");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdaptMMF_QueryStreamName(
+                    impl->adapCtx,
+                    streamIndex,
+                    pNameSize,
+                    pName);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);;
+        }
+    DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamName");
+    return ret;
+}
+
+XAresult XAStreamInformationItfImpl_RegisterStreamChangeCallback(
+                XAStreamInformationItf self,
+                xaStreamEventChangeCallback callback,
+                void * pContext)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAStreamInformationItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XAStreamInformationItfImpl_RegisterStreamChangeCallback");
+    if(!impl)
+    {
+        /* invalid parameter */
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfImpl_RegisterStreamChangeCallback");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* callback may be NULL (to remove callback) */
+    impl->callback = callback;
+    impl->cbcontext = pContext;
+    impl->cbPtrToSelf = self;
+
+    DEBUG_API("-<XAStreamInformationItfImpl_RegisterStreamChangeCallback");
+    return ret;
+}
+
+XAresult XAStreamInformationItfImpl_QueryActiveStreams(
+                XAStreamInformationItf self,
+                XAuint32 *numStreams,
+                XAboolean *activeStreams)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAStreamInformationItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XAStreamInformationItfImpl_QueryActiveStreams");
+    if(!impl || !numStreams)
+    {
+        /* invalid parameter */
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfImpl_QueryActiveStreams");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {    
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryActiveStreams");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdapt_QueryActiveStreams(
+                    impl->adapCtx,
+                    numStreams,
+                    activeStreams);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);
+        }
+    else
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_QueryActiveStreams");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdaptMMF_QueryActiveStreams(
+                    impl->adapCtx,
+                    numStreams,
+                    activeStreams);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);;
+        }
+
+    DEBUG_API("-<XAStreamInformationItfImpl_QueryActiveStreams");
+    return ret;
+}
+
+XAresult XAStreamInformationItfImpl_SetActiveStream(
+                XAStreamInformationItf self, 
+                XAuint32 streamNum,
+                XAboolean active, 
+                XAboolean commitNow)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAStreamInformationItfImpl* impl = GetImpl(self);
+    DEBUG_API("->XAStreamInformationItfImpl_SetActiveStream");
+    if(!impl)
+    {
+        /* invalid parameter */
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfImpl_SetActiveStream");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {      
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_SetActiveStream");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdapt_SetActiveStream(
+                    impl->adapCtx,
+                    streamNum,
+                    active, 
+                    commitNow);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);
+        }
+    else
+        {
+        ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
+        if( ret == XA_RESULT_PARAMETER_INVALID )
+        {
+            DEBUG_API("<-XAStreamInformationItfImpl_SetActiveStream");
+            return ret;
+        }
+    
+        ret = XAStreamInformationItfAdaptMMF_SetActiveStream(
+                    impl->adapCtx,
+                    streamNum,
+                    active, 
+                    commitNow);
+    
+        XAAdaptationBase_ThreadExit(impl->adapCtx);;
+        }
+
+    DEBUG_API("-<XAStreamInformationItfImpl_SetActiveStream");
+    return ret;
+}
+
+/**
+ * XAStreamInformationItfImpl -specific methods
+ **/
+
+/**
+ * XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create()
+ * Description: Allocate and initialize PlayItfImpl
+ **/
+XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create( XAAdaptationBaseCtx *adapCtx )
+{
+    XAStreamInformationItfImpl *self;
+
+    DEBUG_API("->XAStreamInformationItfImpl_Create");
+    self = (XAStreamInformationItfImpl*)calloc(1,sizeof(XAStreamInformationItfImpl));
+    if(self)
+    {
+        /* init itf default implementation */
+        self->itf.QueryMediaContainerInformation = XAStreamInformationItfImpl_QueryMediaContainerInformation;
+        self->itf.QueryStreamType = XAStreamInformationItfImpl_QueryStreamType;
+        self->itf.QueryStreamInformation = XAStreamInformationItfImpl_QueryStreamInformation;
+        self->itf.QueryStreamName = XAStreamInformationItfImpl_QueryStreamName;
+        self->itf.RegisterStreamChangeCallback = XAStreamInformationItfImpl_RegisterStreamChangeCallback;
+        self->itf.QueryActiveStreams = XAStreamInformationItfImpl_QueryActiveStreams;
+        self->itf.SetActiveStream = XAStreamInformationItfImpl_SetActiveStream;
+
+        /* init variables */
+        self->cbPtrToSelf = NULL;
+        self->callback = NULL;
+        self->cbcontext = NULL;
+        self->adapCtx = adapCtx;
+
+        self->self = self;
+    }
+
+    DEBUG_API("<-XAStreamInformationItfImpl_Create");
+    return self;
+}
+
+/* void XAStreamInformationItfImpl_Free(XAStreamInformationItfImpl* self)
+ * Description: Free all resources reserved at XAStreamInformationItfImpl_Create
+ */
+void XAStreamInformationItfImpl_Free(XAStreamInformationItfImpl* self)
+{
+    DEBUG_API("->XAStreamInformationItfImpl_Free");
+    assert(self==self->self);
+    free(self);
+    DEBUG_API("<-XAStreamInformationItfImpl_Free");
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/common/xastreaminformationitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,83 @@
+/**
+ * src\common\XAStreamInformationItf.h
+ * Part of OpenMAX AL Implementation
+ * Copyright (c) 2009 Nokia Inc.
+ *
+ * This file contains specification of XAStreamInformationItf
+ *
+ **/
+
+#ifndef XASTREAMINFORMATIONITF_H
+#define XASTREAMINFORMATIONITF_H
+
+#include "openmaxalwrapper.h"
+#include "xaadptbasectx.h"
+
+/** MACROS **/
+
+/** TYPES **/
+
+/** ENUMERATIONS **/
+
+/** STRUCTURES **/
+/* Definition of XAStreamInformationItf implementation */
+typedef struct XAStreamInformationItfImpl_
+{
+    /* parent interface */
+    struct XAStreamInformationItf_ itf;
+    /* pointer to self */
+    struct XAStreamInformationItfImpl_* self;
+
+    /*Adaptation variables*/
+
+    XAStreamInformationItf cbPtrToSelf;
+    xaStreamEventChangeCallback  callback;
+    void *cbcontext;
+    XAAdaptationBaseCtx *adapCtx;
+
+} XAStreamInformationItfImpl;
+
+/** METHODS **/
+
+/* Base interface XAStreamInformationItf implementation */
+XAresult XAStreamInformationItfImpl_QueryMediaContainerInformation(
+                XAStreamInformationItf self,
+                XAMediaContainerInformation * info);
+
+XAresult XAStreamInformationItfImpl_QueryStreamType(
+                XAStreamInformationItf self,
+                XAuint32 streamIndex, 
+                XAuint32 *domain);
+
+XAresult XAStreamInformationItfImpl_QueryStreamInformation(
+                XAStreamInformationItf self, 
+                XAuint32 streamIndex,
+                void * info);
+
+XAresult XAStreamInformationItfImpl_QueryStreamName(
+                XAStreamInformationItf self, 
+                XAuint32 streamIndex, 
+                XAuint16 * pNameSize,
+                XAchar * pName);
+
+XAresult XAStreamInformationItfImpl_RegisterStreamChangeCallback(
+                XAStreamInformationItf self,
+                xaStreamEventChangeCallback callback,
+                void * pContext);
+
+XAresult XAStreamInformationItfImpl_QueryActiveStreams(
+                XAStreamInformationItf self,
+                XAuint32 *numStreams,
+                XAboolean *activeStreams);
+
+XAresult XAStreamInformationItfImpl_SetActiveStream(
+                XAStreamInformationItf self, 
+                XAuint32 streamNum,
+                XAboolean active, 
+                XAboolean commitNow);
+
+/* XAStreamInformationItfImpl -specific methods */
+XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
+void XAStreamInformationItfImpl_Free(XAStreamInformationItfImpl* self);
+
+#endif /* XASTREAMINFORMATIONITF_H */
--- a/khronosfws/openmax_al/src/common/xavideopostprocessingitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xavideopostprocessingitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xavideopostprocessingitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAVideoPostProsessingItfAdaptation.h"
-#endif
+ 
+#include "xavideopostprosessingitfadaptation.h"
+
 /**
  * XAVideoPostProcessingItfImpl* GetImpl(XAVideoPostProcessingItf self)
  * Description: Validated interface pointer and cast it to implementations pointer.
@@ -106,15 +106,15 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAVideoPostProcessingItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
     	DEBUG_API("<-XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported");
     	return ret;
     }
 
-    ret = XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported(impl->adapCtx,
+    ret = XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported((XAAdaptationGstCtx*)impl->adapCtx,
                                                                      pSupported);
 
     if(ret == XA_RESULT_SUCCESS)
@@ -122,8 +122,8 @@
         impl->supported = *pSupported;
     }
 
-    XAVideoPostProcessingItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported");
     return ret;
 }
@@ -264,15 +264,15 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAVideoPostProcessingItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
     	DEBUG_API("<-XAVideoPostProcessingItfImpl_Commit");
     	return ret;
     }
 
-    ret = XAVideoPostProcessingItfAdapt_Commit(impl->adapCtx,
+    ret = XAVideoPostProcessingItfAdapt_Commit((XAAdaptationGstCtx*)impl->adapCtx,
                                                impl->rotation,
                                                impl->scaleOptions,
                                                impl->backgroundColor,
@@ -295,8 +295,8 @@
 		impl->isScaleOptions = XA_BOOLEAN_FALSE;
     }
 
-    XAVideoPostProcessingItfAdapt_ThreadExit(impl->adapCtx);
-#endif    
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+  
     DEBUG_API("<-XAVideoPostProcessingItfImpl_Commit");
     return ret;
 }
@@ -304,8 +304,6 @@
 /**
  * XAVideoPostProcessingItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_  
-
 /**
  * XAVideoPostProcessingItfImpl* XAVideoPostProcessingItfImpl_Create()
  * @return  XAVideoPostProcessingItfImpl* - Pointer to  VideoPostProcessingItf interface implementation
@@ -347,7 +345,7 @@
     DEBUG_API("<-XAVideoPostProcessingItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XAVideoPostProcessingItfImpl_Free(XAVideoPostProcessingItfImpl* self);
  * @param  XAVideoPostProcessingItfImpl* self -
--- a/khronosfws/openmax_al/src/common/xavideopostprocessingitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xavideopostprocessingitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XAVIDEOPOSTPROCESSINGITF_H
 #define XAVIDEOPOSTPROCESSINGITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_   
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 
 /** TYPES **/
@@ -52,10 +49,10 @@
     XAboolean		isDestRect;
     XAboolean		isSrcRect;
     XAboolean		isScaleOptions;
-#ifdef _GSTREAMER_BACKEND_   
+
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
 } XAVideoPostProcessingItfImpl;
 
 /** METHODS **/
@@ -82,12 +79,9 @@
                                                 XAuint32 mirror);
 
 XAresult XAVideoPostProcessingItfImpl_Commit(XAVideoPostProcessingItf self);
-#ifdef _GSTREAMER_BACKEND_   
+ 
 /* XAVideoPostProcessingItfImpl -specific methods */
 XAVideoPostProcessingItfImpl* XAVideoPostProcessingItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-XAresult XAVideoPostProcessingItfImpl_ThreadEntry(XAAdaptationBaseCtx *adapCtx);
-XAresult XAVideoPostProcessingItfImpl_ThreadExit(XAVideoPostProcessingItfImpl* impl);
-#endif
 void XAVideoPostProcessingItfImpl_Free(XAVideoPostProcessingItfImpl* self);
 
 #endif /* XAVIDEOPOSTPROCESSINGITF_H */
--- a/khronosfws/openmax_al/src/common/xavolumeitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xavolumeitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,9 +20,9 @@
 #include <assert.h>
 
 #include "xavolumeitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAVolumeItfAdaptation.h"
-#endif
+ 
+#include "xavolumeitfadaptation.h"
+#include "xanokiavolumeextitfadaptationmmf.h"
 /**
  * XAVolumeItfImpl* GetImpl(XAVolumeItf self)
  * Description: Validated interface pointer and cast it to implementations pointer.
@@ -73,23 +73,29 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAVolumeItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAVolumeItfImpl_SetVolumeLevel");
         return ret;
     }
-
-    ret = XAVolumeItfAdapt_SetVolumeLevel(impl->adapCtx,  level);
-
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAVolumeItfAdapt_SetVolumeLevel((XAAdaptationGstCtx*)impl->adapCtx,  level);
+        }
+    else
+        {
+        impl->volumeLevel = level;
+        }
+    
     if(ret == XA_RESULT_SUCCESS)
     {
         impl->volumeLevel = level;
     }
 
-    XAVolumeItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAVolumeItfImpl_SetVolumeLevel");
     return ret ;
 }
@@ -136,18 +142,25 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAVolumeItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAVolumeItfImpl_GetMaxVolumeLevel");
         return ret;
     }
-    ret = XAVolumeItfAdapt_GetMaxVolumeLevel(impl->adapCtx,
-                                             pMaxLevel);
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAVolumeItfAdapt_GetMaxVolumeLevel((XAAdaptationGstCtx*)impl->adapCtx,
+                                                 pMaxLevel);
+        }
+    else
+        {
+        *pMaxLevel = MAX_SUPPORT_VOLUME_LEVEL;
+        }
 
-    XAVolumeItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAVolumeItfImpl_GetMaxVolumeLevel");
     return ret;
 }
@@ -170,8 +183,8 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAVolumeItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAVolumeItfImpl_SetMute");
@@ -180,7 +193,14 @@
     /* check is mute state changed */
     if(mute != impl->mute)
     {
-        ret = XAVolumeItfAdapt_SetMute(impl->adapCtx,  mute);
+        if(impl->adapCtx->fwtype == FWMgrFWMMF)
+            {
+            ret = XANokiaVolumeExtItfAdapt_SetMute((XAAdaptationMMFCtx*)impl->adapCtx,  mute);
+            }
+        else
+            {
+            ret = XAVolumeItfAdapt_SetMute((XAAdaptationGstCtx*)impl->adapCtx,  mute);
+            }
 
         if(ret == XA_RESULT_SUCCESS)
         {
@@ -188,8 +208,8 @@
         }
     }
 
-    XAVolumeItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAVolumeItfImpl_SetMute");
     return ret;
 }
@@ -236,8 +256,8 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAVolumeItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAVolumeItfImpl_EnableStereoPosition");
@@ -246,17 +266,24 @@
     /* Check is stereo position state changed */
     if(enable != impl->enableStereoPos)
     {
-        ret = XAVolumeItfAdapt_EnableStereoPosition(impl->adapCtx,
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAVolumeItfAdapt_EnableStereoPosition((XAAdaptationGstCtx*)impl->adapCtx,
                                                     enable);
-
+        }
+    else
+        {
+        ret = XANokiaVolumeExtItfAdapt_EnableStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
+                                                    enable);    
+        }
         if(ret == XA_RESULT_SUCCESS)
         {
             impl->enableStereoPos = enable;
         }
     }
 
-    XAVolumeItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAVolumeItfImpl_EnableStereoPosition");
     return ret;
 }
@@ -310,8 +337,8 @@
 
     impl->stereoPosition = stereoPosition;
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAVolumeItfAdapt_ThreadEntry(impl->adapCtx);
+ 
+    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
     if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
     {
         DEBUG_API("<-XAVolumeItfImpl_SetStereoPosition");
@@ -320,12 +347,20 @@
     /* check is stereo position effect enabled if is then handle effect */
     if(impl->enableStereoPos)
     {
-        ret = XAVolumeItfAdapt_SetStereoPosition(impl->adapCtx,
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        ret = XAVolumeItfAdapt_SetStereoPosition((XAAdaptationGstCtx*)impl->adapCtx,
                                                  stereoPosition);
+        }
+    else
+        {
+        ret = XANokiaVolumeExtItfAdapt_SetStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
+                                                 stereoPosition);    
+        }
     }
 
-    XAVolumeItfAdapt_ThreadExit(impl->adapCtx);
-#endif
+    XAAdaptationBase_ThreadExit(impl->adapCtx);
+
     DEBUG_API("<-XAVolumeItfImpl_SetStereoPosition");
     return ret;
 }
@@ -359,7 +394,7 @@
 /**
  * XAVolumeItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_  
+
 
 /**
  * XAVolumeItfImpl* XAVolumeItfImpl_Create()
@@ -398,7 +433,7 @@
     DEBUG_API("<-XAVolumeItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XAVolumeItfImpl_Free(XAVolumeItfImpl* self)
  * Description: Free all resources reserved at XAVolumeItfImpl_Create
--- a/khronosfws/openmax_al/src/common/xavolumeitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xavolumeitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,24 +18,9 @@
 #ifndef XAVOLUMEITF_H
 #define XAVOLUMEITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAAdaptationContextBase.h"
-#endif
-/** MACROS **/
+#include "xaadptbasectx.h"
 
-/* Max volume level is implementation-dependent but must be at least 0mB
- * now used max volume 10 mB
- */
-#define MAX_VOLUME_LEVEL 10
-#define MAX_VOLUME_AT_LEAST 0
-/* Stereo position range is -1000 to 1000 permille. -1000 permille is fully left
- * and 1000 permille is fully right. 0 permille is center.
- */
-#define STEREO_POSITION_RIGHT 1000
-#define STEREO_POSITION_LEFT -1000
-#define STEREO_POSITION_CENTER 0
+/** MACROS **/
 
 /** TYPES **/
 
@@ -54,10 +39,8 @@
     XAboolean mute;
     XAboolean enableStereoPos;
     XApermille stereoPosition;
-#ifdef _GSTREAMER_BACKEND_  
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
 } XAVolumeItfImpl;
 
 /** METHODS **/
@@ -81,10 +64,9 @@
 
 XAresult XAVolumeItfImpl_GetStereoPosition(XAVolumeItf self, XApermille *pStereoPosition);
 
-#ifdef _GSTREAMER_BACKEND_  
+ 
 /* XAVolumeItfImpl -specific methods */
 XAVolumeItfImpl* XAVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-#endif
 void XAVolumeItfImpl_Free(XAVolumeItfImpl* self);
 
 #endif /* XAVOLUMEITF_H */
--- a/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -21,10 +21,9 @@
 #include <string.h>
 
 #include "xaglobals.h"
+#include "xaadptbasectx.h"
 #include "xaaudiodecodercapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
+#include "xacapabilitiesmgr.h"
 /* XAAudioDecoderCapabilitiesItfImpl* GetImpl
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -74,16 +73,16 @@
             }
             else
             {
-#ifdef _GSTREAMER_BACKEND_  
+ 
             XAuint32 i = 0;
-            XAStaticCapsData temp;
+            XACapabilities temp;
                 for( i=0; i<impl->numCodecs; i++ )
                 {
                     /* query decoder id from adaptation using index value */
-                    XAStaticCapsAdapt_GetCapsByIdx(XACAP_DECODER|XACAP_AUDIO, i, &temp);
+                    XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_DECODER|XACAP_AUDIO), i, &temp);
                     pDecoderIds[i] = temp.xaid;
                 }
-#endif
+
             }
         }
         /* return number of decoders */
@@ -127,30 +126,31 @@
             }
             else
             {
-#ifdef _GSTREAMER_BACKEND_  
+ 
                 /* query capabilities from adaptation using codec id */
-                XAStaticCapsData temp;
+                XACapabilities temp;
                 memset(pDescriptor,0,sizeof(XAAudioCodecDescriptor));
-                res = XAStaticCapsAdapt_GetCapsById(XACAP_DECODER|XACAP_AUDIO, decoderId, &temp);
+                res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_DECODER|XACAP_AUDIO), decoderId, &temp);
                 if( res == XA_RESULT_SUCCESS )
                 {
+                    XAAudioCodecDescriptor* desc = ((XAAudioCodecDescriptor*)(temp.pEntry));
                     /* map applicable values to XAAudioCodecCapabilities */
-                    pDescriptor->maxChannels=temp.maxCh;
-                    pDescriptor->minSampleRate=temp.minSR*1000; /* milliHz */
-                    if (temp.maxSR < (0xFFFFFFFF / 1000))
+                    pDescriptor->maxChannels = desc->maxChannels;
+                    pDescriptor->minSampleRate= desc->minSampleRate*1000; /* milliHz */
+                    if (desc->maxSampleRate < (0xFFFFFFFF / 1000))
                     {
-                        pDescriptor->maxSampleRate = temp.maxSR*1000;
+                        pDescriptor->maxSampleRate = desc->maxSampleRate*1000;
                     }
                     else
                     {
                         pDescriptor->maxSampleRate = 0xFFFFFFFF;
                     }
-                    pDescriptor->minBitsPerSample=temp.minBPS;
-                    pDescriptor->maxBitsPerSample=temp.maxBPS;
+                    pDescriptor->minBitsPerSample=desc->minBitsPerSample;
+                    pDescriptor->maxBitsPerSample=desc->maxBitsPerSample;
                     pDescriptor->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
-                    pDescriptor->minBitRate=temp.minBR;
-                    pDescriptor->maxBitRate=temp.maxBR;
-                    pDescriptor->numBitratesSupported = temp.numBitrates;
+                    pDescriptor->minBitRate=desc->minBitRate;
+                    pDescriptor->maxBitRate=desc->maxBitRate;
+                    pDescriptor->numBitratesSupported = desc->numBitratesSupported;
                     pDescriptor->isBitrateRangeContinuous=XA_BOOLEAN_TRUE;
                     if (temp.xaid == XA_AUDIOCODEC_PCM )
                     {
@@ -159,7 +159,7 @@
                     }
                     else if (temp.xaid == XA_ADAPTID_VORBIS) /* for ogg */
                     {
-                        if (temp.maxCh == 1)
+                        if (desc->maxChannels == 1)
                         {
                             pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG1_L3;
                             pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_MONO;
@@ -176,7 +176,7 @@
                     }
                     /*other caps undefined*/
                 }
-#endif                
+                
             }
         }
     }
@@ -209,10 +209,10 @@
             XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities;
 
         /* init variables */
-#ifdef _GSTREAMER_BACKEND_  
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_DECODER|XACAP_AUDIO,
+ 
+        assert( XACapabilitiesMgr_GetCapsCount(NULL, (XACapsType)(XACAP_DECODER|XACAP_AUDIO),
                                   &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-#endif
+
         self->self = self;
     }
     DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_Create");
--- a/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -21,10 +21,10 @@
 #include <string.h>
 
 #include "xaglobals.h"
+#include "xaadptbasectx.h"
 #include "xaaudioencodercapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
+#include "xacapabilitiesmgr.h"
+
 /* XAAudioEncoderCapabilitiesItfImpl* GetImpl
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -73,16 +73,16 @@
             }
             else
             {
-#ifdef _GSTREAMER_BACKEND_  
+  
                 XAuint32 i = 0;
-                XAStaticCapsData temp;
+                XACapabilities temp;
                 for( i=0; i<impl->numCodecs; i++ )
                 {
                     /* query encoder id from adaptation using index value */
-                    XAStaticCapsAdapt_GetCapsByIdx(XACAP_ENCODER|XACAP_AUDIO, i, &temp);
+                    XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), i, &temp);
                     pEncoderIds[i] = temp.xaid;
                 }
-#endif
+
             pEncoderIds[0] = XA_AUDIOCODEC_AMR;
             pEncoderIds[1] = XA_AUDIOCODEC_AAC;
             pEncoderIds[2] = XA_AUDIOCODEC_PCM;
@@ -108,9 +108,9 @@
     XAAudioEncoderCapabilitiesItfImpl* impl = GetImpl(self);
     XAresult res = XA_RESULT_SUCCESS;
 
-#ifdef _GSTREAMER_BACKEND_  
-    XAStaticCapsData temp;
-#endif
+  
+    XACapabilities temp;
+
     DEBUG_API("->XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities");
 
     /*if( !impl || !pIndex || !pDescriptor )*/
@@ -236,53 +236,54 @@
         }
     
     
-#ifdef _GSTREAMER_BACKEND_  
-    res = XAStaticCapsAdapt_GetCapsById(XACAP_ENCODER|XACAP_AUDIO, encoderId, &temp);
+  
+    res = XACapabilitiesMgr_GetCapsById(impl->capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), encoderId, &temp);
    	if( res == XA_RESULT_SUCCESS )
     {
-   		/* map applicable values to XAAudioCodecCapabilities */
-      pDescriptor->maxChannels=temp.maxCh;
-      pDescriptor->minSampleRate=temp.minSR*1000; /* milliHz */
-      if (temp.maxSR < (0xFFFFFFFF / 1000))
+      XAAudioCodecDescriptor* desc = ((XAAudioCodecDescriptor*)(temp.pEntry));
+      /* map applicable values to XAAudioCodecCapabilities */
+      pDescriptor->maxChannels = desc->maxChannels;
+      pDescriptor->minSampleRate= desc->minSampleRate*1000; /* milliHz */
+      if (desc->maxSampleRate < (0xFFFFFFFF / 1000))
       {
-      	pDescriptor->maxSampleRate = temp.maxSR*1000;
+          pDescriptor->maxSampleRate = desc->maxSampleRate*1000;
       }
       else
       {
-    		pDescriptor->maxSampleRate = 0xFFFFFFFF;
-   		}
-      pDescriptor->minBitsPerSample=temp.minBPS;
-      pDescriptor->maxBitsPerSample=temp.maxBPS;
+          pDescriptor->maxSampleRate = 0xFFFFFFFF;
+      }
+      pDescriptor->minBitsPerSample=desc->minBitsPerSample;
+      pDescriptor->maxBitsPerSample=desc->maxBitsPerSample;
       pDescriptor->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
-      pDescriptor->minBitRate=temp.minBR;
-    	pDescriptor->maxBitRate=temp.maxBR;
-      pDescriptor->numBitratesSupported = temp.numBitrates;
+      pDescriptor->minBitRate=desc->minBitRate;
+      pDescriptor->maxBitRate=desc->maxBitRate;
+      pDescriptor->numBitratesSupported = desc->numBitratesSupported;
       pDescriptor->isBitrateRangeContinuous=XA_BOOLEAN_TRUE;
-      
       if (temp.xaid == XA_AUDIOCODEC_PCM )
       {
-     		pDescriptor->profileSetting=XA_AUDIOPROFILE_PCM;
-        pDescriptor->modeSetting=0;
+          pDescriptor->profileSetting=XA_AUDIOPROFILE_PCM;
+          pDescriptor->modeSetting=0; /* no chanmode for pcm defined */
       }
-    	else if (temp.xaid == XA_ADAPTID_VORBIS) /* for ogg */
+      else if (temp.xaid == XA_ADAPTID_VORBIS) /* for ogg */
       {
-      	if (temp.maxCh == 1)
-        {
-        	pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG1_L3;
-          pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_MONO;
-       	}
-        else
-        {
-       		pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG2_L3;
-          pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_STEREO;
-        }
+          if (desc->maxChannels == 1)
+          {
+              pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG1_L3;
+              pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_MONO;
+          }
+          else
+          {
+              pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG2_L3;
+              pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_STEREO;
+          }
       }
       else
       {
-     		/* Do nothing */
+          /* do nothing */
       }
+      
     }
-#endif   	
+   	
     DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities");
     return res;
 }
@@ -295,7 +296,7 @@
 /* XAAudioEncoderCapabilitiesItfImpl_Create
  * Description: Allocate and initialize XAAudioEncoderCapabilitiesItfImpl
  */
-XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create()
+XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create(XACapabilities* caps)
 {
     XAAudioEncoderCapabilitiesItfImpl* self = (XAAudioEncoderCapabilitiesItfImpl*)
         calloc(1,sizeof(XAAudioEncoderCapabilitiesItfImpl));
@@ -309,12 +310,12 @@
             XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders;
         self->itf.GetAudioEncoderCapabilities =
             XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities;
-
-#ifdef _GSTREAMER_BACKEND_  
+        self->capslist = caps;
+  
         /* init variables */
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_ENCODER|XACAP_AUDIO,
+        assert( XACapabilitiesMgr_GetCapsCount( caps, (XACapsType)((XACapsType)(XACAP_ENCODER|XACAP_AUDIO)),
                                   &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-#endif
+
         /*self->mmfEngine = (void*)mmf_capability_engine_init();*/
         self->numCodecs = 3;
         self->self = self;
--- a/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -20,7 +20,7 @@
 
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
-
+#include "xacapabilitiesmgr.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -40,6 +40,7 @@
     XAmilliHertz sampleRateArray[10];
     XAuint32 bitRateArray[10];
     void* mmfEngine;
+    XACapabilities* capslist;
 } XAAudioEncoderCapabilitiesItfImpl;
 
 /* Base interface XAAudioEncoderCapabilitiesItf implementation */
@@ -55,7 +56,7 @@
                             XAAudioCodecDescriptor* pCapabilities);
 
 /* XAAudioEncoderCapabilitiesItfImpl -specific methods */
-XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create(void);
+XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create(XACapabilities* caps);
 void XAAudioEncoderCapabilitiesItfImpl_Free(XAAudioEncoderCapabilitiesItfImpl* self);
 
 #endif /* XAAUDIOENCODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -22,9 +22,8 @@
 
 #include "xaglobals.h"
 #include "xaaudioiodevicecapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAStaticCapsAdaptation.h"
-#endif
+#include "xacapabilitiesmgr.h"
+
 
 static XAchar deviceName1[] = "Default Mic";
 
@@ -76,17 +75,15 @@
             }
             else
             {
-
-#ifdef _GSTREAMER_BACKEND_
                 XAuint32 i;
-                XAStaticCapsData temp;
+                XACapabilities temp;
                 for( i=0; i<impl->numInputDevices; i++ )
                 {
                     /* query device id from adaptation using index value */
-                    res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_DEVSRC|XACAP_AUDIO, i, &temp);
+                    res = XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_DEVSRC|XACAP_AUDIO), i, &temp);
                     pInputDeviceIDs[i] = temp.xaid;
                 }
-#endif
+
                 pInputDeviceIDs[0] = 0xAD7E5001;
             }
         }
@@ -105,6 +102,7 @@
                                             XAAudioInputDescriptor* pDescriptor)
 {
     XAAudIODevCapaItfImpl* impl = GetImpl(self);
+    XACapabilities temp;
     XAresult res = XA_RESULT_SUCCESS;
     DEBUG_API("->XAAudIODevCapaItfImpl_QueryAudioInputCapabilities");
 
@@ -116,19 +114,20 @@
     else
     {
         memset(pDescriptor,0,sizeof(XAAudioInputDescriptor));
-#ifdef _GSTREAMER_BACKEND_
+
         /* query capabilities from adaptation using device id */
-        XAStaticCapsData temp;
+        
 
-        res = XAStaticCapsAdapt_GetCapsById(XACAP_DEVSRC|XACAP_AUDIO, deviceId, &temp);
+        res = XACapabilitiesMgr_GetCapsById(impl->capslist, (XACapsType)(XACAP_DEVSRC|XACAP_AUDIO), deviceId, &temp);
         if( res == XA_RESULT_SUCCESS )
         {
+            XAAudioInputDescriptor* desc = ((XAAudioInputDescriptor*)(temp.pEntry));
             /* map applicable values to XAAudioCodecCapabilities */
-            pDescriptor->maxChannels=temp.maxCh;
-            pDescriptor->minSampleRate=temp.minSR*1000; /* milliHz */
-            if (temp.maxSR < (0xFFFFFFFF / 1000))
+            pDescriptor->maxChannels=desc->maxChannels;
+            pDescriptor->minSampleRate=desc->minSampleRate*1000; /* milliHz */
+            if (desc->maxSampleRate < (0xFFFFFFFF / 1000))
             {
-                pDescriptor->maxSampleRate = temp.maxSR*1000;
+                pDescriptor->maxSampleRate = desc->maxSampleRate*1000;
             }
             else
             {
@@ -141,7 +140,7 @@
             pDescriptor->deviceName = temp.adaptId;
             /* other caps undefined */
         }
-#endif
+
         switch (deviceId)
                 {
                 case 0xAD7E5001:
@@ -242,16 +241,16 @@
             else
             {
 
-#ifdef _GSTREAMER_BACKEND_
+
                 XAuint32 i = 0;
-                XAStaticCapsData temp;
+                XACapabilities temp;
                 for( i=0; i<impl->numOutputDevices; i++ )
                 {
                     /* query device id from adaptation using index value */
-                    res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_DEVSNK|XACAP_AUDIO, i, &temp);
+                    res = XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_DEVSNK|XACAP_AUDIO), i, &temp);
                     pOutputDeviceIDs[i] = temp.xaid;
                 }
-#endif
+
                 pOutputDeviceIDs[0] = 0xAD7E5002;
             }
         }
@@ -272,6 +271,7 @@
 
     XAAudIODevCapaItfImpl* impl = GetImpl(self);
     XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities temp;
     DEBUG_API("->XAAudIODevCapaItfImpl_QueryAudioOutputCapabilities");
 
     if( !impl || !pDescriptor )
@@ -283,18 +283,19 @@
     {
         memset(pDescriptor,0,sizeof(XAAudioOutputDescriptor));
         /* query capabilities from adaptation using device id */
-#ifdef _GSTREAMER_BACKEND_
-        XAStaticCapsData temp;
 
-        res = XAStaticCapsAdapt_GetCapsById(XACAP_DEVSNK|XACAP_AUDIO, deviceId, &temp);
+        
+
+        res = XACapabilitiesMgr_GetCapsById(impl->capslist, (XACapsType)(XACAP_DEVSNK|XACAP_AUDIO), deviceId, &temp);
         if( res == XA_RESULT_SUCCESS )
         {
+            XAAudioOutputDescriptor* desc = ((XAAudioOutputDescriptor*)(temp.pEntry));
             /* map applicable values to XAAudioCodecCapabilities */
-            pDescriptor->maxChannels=temp.maxCh;
-            pDescriptor->minSampleRate=temp.minSR*1000; /* milliHz */
-            if (temp.maxSR < (0xFFFFFFFF / 1000))
+            pDescriptor->maxChannels=desc->maxChannels;
+            pDescriptor->minSampleRate=desc->minSampleRate*1000; /* milliHz */
+            if (desc->maxSampleRate < (0xFFFFFFFF / 1000))
             {
-                pDescriptor->maxSampleRate = temp.maxSR*1000;
+                pDescriptor->maxSampleRate = desc->maxSampleRate*1000;
             }
             else
             {
@@ -307,7 +308,7 @@
             pDescriptor->pDeviceName = temp.adaptId;
             /* other caps undefined */
         }
-#endif
+
 
         switch (deviceId)
                 {
@@ -427,15 +428,15 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        XAStaticCapsData temp;
+
+        XACapabilities temp;
         XAuint32 associatedCount = 0;
 
         XAuint32 i = 0;
         for( i=0; i<impl->numInputDevices; i++ )
         {
             /* query device id from adaptation using index value */
-            res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_DEVSRC|XACAP_AUDIO, i, &temp);
+            res = XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_DEVSRC|XACAP_AUDIO), i, &temp);
             if (temp.xaid != deviceId)
             {
                 associatedCount++;
@@ -454,7 +455,7 @@
             for( i=0, associatedCount = 0; i<impl->numInputDevices; i++ )
             {
                 /* query device id from adaptation using index value */
-                res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_DEVSRC|XACAP_AUDIO, i, &temp);
+                res = XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_DEVSRC|XACAP_AUDIO), i, &temp);
                 if (temp.xaid != deviceId)
                 {
                     pAudioInputDeviceIDs[associatedCount++] = temp.xaid;
@@ -463,7 +464,7 @@
         }
 
         *pNumAudioInputs = associatedCount;
-#endif
+
 
     if(!pAudioInputDeviceIDs)
         {
@@ -523,15 +524,15 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        XAStaticCapsData temp;
+
+        XACapabilities temp;
         XAuint32 associatedCount = 0;
 
         XAuint32 i = 0;
         for( i=0; i<impl->numOutputDevices; i++ )
         {
             /* query device id from adaptation using index value */
-            res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_DEVSNK|XACAP_AUDIO, i, &temp);
+            res = XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_DEVSNK|XACAP_AUDIO), i, &temp);
             if (temp.xaid != deviceId)
             {
                 associatedCount++;
@@ -550,7 +551,7 @@
             for( i=0, associatedCount = 0; i<impl->numOutputDevices; i++ )
             {
                 /* query device id from adaptation using index value */
-                res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_DEVSNK|XACAP_AUDIO, i, &temp);
+                res = XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_DEVSNK|XACAP_AUDIO), i, &temp);
                 if (temp.xaid != deviceId)
                 {
                     pAudioOutputDeviceIDs[associatedCount++] = temp.xaid;
@@ -559,7 +560,7 @@
         }
 
         *pNumAudioOutputs = associatedCount;
-#endif
+
 
         if(!pAudioOutputDeviceIDs)
             {
@@ -674,18 +675,19 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        XAStaticCapsData temp;
-        res = XAStaticCapsAdapt_GetCapsById(XACAP_DEVSNK|XACAP_AUDIO,
+
+/*        XACapabilities temp;
+        res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_DEVSNK|XACAP_AUDIO),
                                             deviceId, &temp);
-        /* deviceid can be either input or output*/
+         deviceid can be either input or output
         if( res == XA_RESULT_FEATURE_UNSUPPORTED )
         {
-            res = XAStaticCapsAdapt_GetCapsById(XACAP_DEVSRC|XACAP_AUDIO,
+            res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_DEVSRC|XACAP_AUDIO),
                                                 deviceId, &temp);
         }
         if( res == XA_RESULT_SUCCESS )
         {
+            XAAudioOutputDescriptor* desc = ((XAAudioOutputDescriptor*)(temp.pEntry));
             XAuint32 count = 0, i = 0;
             for (i=0; i < sizeof(temp.pcmProfilesSupported)*8; i++)
                 count+=temp.pcmProfilesSupported>>i&0x1;
@@ -714,8 +716,8 @@
                 }
             }
             *pNumOfSampleFormats = count;
-        }
-#endif
+        }*/
+
 
     if(!pSampleFormats)
         {
@@ -739,7 +741,7 @@
 /* XAAudIODevCapaItfImpl_Create
  * Description: Allocate and initialize XAAudIODevCapaItfImpl
  */
-XAAudIODevCapaItfImpl* XAAudIODevCapaItfImpl_Create()
+XAAudIODevCapaItfImpl* XAAudIODevCapaItfImpl_Create(XACapabilities* caps)
 {
     XAAudIODevCapaItfImpl* self = (XAAudIODevCapaItfImpl*)
         calloc(1,sizeof(XAAudIODevCapaItfImpl));
@@ -770,13 +772,16 @@
             XAAudIODevCapaItfImpl_RegisterAvailableAudioOutputsChangedCallback;
         self->itf.RegisterDefaultDeviceIDMapChangedCallback =
             XAAudIODevCapaItfImpl_RegisterDefaultDeviceIDMapChangedCallback;
-#ifdef _GSTREAMER_BACKEND_
+        self->capslist = caps;
         /* init variables */
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_DEVSNK|XACAP_AUDIO,
-                                  &(self->numOutputDevices) ) == XA_RESULT_SUCCESS );
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_DEVSRC|XACAP_AUDIO,
-                                  &(self->numInputDevices) ) == XA_RESULT_SUCCESS );
-#endif
+        XACapabilitiesMgr_GetCapsCount( caps, (XACapsType)(XACAP_DEVSNK|XACAP_AUDIO),
+                                  &(self->numOutputDevices) );
+        XACapabilitiesMgr_GetCapsCount( caps, (XACapsType)(XACAP_DEVSRC|XACAP_AUDIO),
+                                  &(self->numInputDevices) );
+        
+        /*TODO: Remove this later*/
+        XACapabilitiesMgr_QueryColorFormats(caps, NULL, NULL);
+
         self->inputCbPtrToSelf = NULL;
         self->outputCbPtrToSelf = NULL;
         self->deviceMapCbPtrToSelf = NULL;
--- a/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -20,7 +20,7 @@
 
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
-
+#include "xacapabilitiesmgr.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -50,6 +50,7 @@
     XAuint32 numInputDevices;
     XAuint32 numOutputDevices;
     XAmilliHertz sampleRateArray[12];
+    XACapabilities* capslist;
     
 } XAAudIODevCapaItfImpl;
 
@@ -104,7 +105,7 @@
                                                            XAint32* pNumOfSampleFormats);
 
 /* XAAudIODevCapaItfImpl -specific methods */
-XAAudIODevCapaItfImpl* XAAudIODevCapaItfImpl_Create(void);
+XAAudIODevCapaItfImpl* XAAudIODevCapaItfImpl_Create(XACapabilities* caps);
 void XAAudIODevCapaItfImpl_Free(XAAudIODevCapaItfImpl* self);
 
 #endif /* XAAUDIOIODEVICECAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,10 +20,10 @@
 #include <assert.h>
 #include "xaglobals.h"
 #include "xacameracapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#include "XAStaticCameraCapsAdaptation.h"
-#endif
+  
+
+#include "xastaticcameracapsadaptation.h"
+
 
 static XACameraCapabilitiesItfImpl* GetImpl(XACameraCapabilitiesItf self)
 {
@@ -57,9 +57,9 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetCameraCapabilities");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetCameraCapabilities(pIndex,pCameraDeviceID,pDescriptor);
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetCameraCapabilities");
     return ret;
 }
@@ -83,10 +83,10 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_QueryFocusRegionPatterns(
             cameraDeviceID, pPatternID, pFocusPattern,pCustomPoints1,pCustomPoints2);
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns");
     return ret;
 }
@@ -108,10 +108,10 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedAutoLocks");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetSupportedAutoLocks(
                 cameraDeviceID, pNumCombinations, ppLocks);
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedAutoLocks");
     return ret;
 }
@@ -136,10 +136,10 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetSupportedFocusManualSettings(
             cameraDeviceID, macroEnabled,pMinValue, pMaxValue, pNumSettings, ppSettings);
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings");
     return ret;
 }
@@ -163,10 +163,10 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetSupportedISOSensitivitySettings(
                 cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings );
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings");
     return ret;
 }
@@ -190,10 +190,10 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetSupportedApertureManualSettings(
                 cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings );
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings");
     return ret;
 }
@@ -217,10 +217,10 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetSupportedShutterSpeedManualSettings(
                 cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings);
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings");
     return ret;
 }
@@ -244,10 +244,10 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetSupportedWhiteBalanceManualSettings(
                 cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings);
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings");
     return ret;
 }
@@ -273,20 +273,20 @@
         DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedZoomSettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_  
+  
     ret = XAStaticCameraCaps_GetSupportedZoomSettings(
                 cameraDeviceID, digitalEnabled, macroEnabled, pMaxValue,
                 pNumSettings, ppSettings, pSpeedSupported);
-#endif
+
     DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedZoomSettings");
     return ret;
 }
 
-#ifdef _GSTREAMER_BACKEND_  
+  
 /**
  * XACameraCapabilitiesItfImpl -specific methods
  **/
-XACameraCapabilitiesItfImpl* XACameraCapabilitiesItfImpl_Create()
+XACameraCapabilitiesItfImpl* XACameraCapabilitiesItfImpl_Create(void)
 {
     XACameraCapabilitiesItfImpl* self = (XACameraCapabilitiesItfImpl*)
         calloc(1,sizeof(XACameraCapabilitiesItfImpl));
@@ -327,4 +327,4 @@
     free(self);
     DEBUG_API("<-XACameraCapabilitiesItfImpl_Free");
 }
-#endif
+
--- a/khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -109,9 +109,9 @@
                         XAuint32* pNumSettings,
                         XApermille** ppSettings,
                         XAboolean* pSpeedSupported);
-#ifdef _GSTREAMER_BACKEND_  
+ 
 /* XACameraCapabilitiesItfImpl -specific methods */
-XACameraCapabilitiesItfImpl* XACameraCapabilitiesItfImpl_Create();
+XACameraCapabilitiesItfImpl* XACameraCapabilitiesItfImpl_Create(void);
 void XACameraCapabilitiesItfImpl_Free(XACameraCapabilitiesItfImpl* self);
-#endif
+
 #endif /* XACAMERACAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xadevicevolumeitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xadevicevolumeitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,9 +20,9 @@
 #include <assert.h>
 #include "xaglobals.h"
 #include "xadevicevolumeitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XADeviceVolumeItfAdaptation.h"
-#endif
+  
+#include "xadevicevolumeitfadaptation.h"
+
 
 static XADeviceVolumeItfImpl* GetImpl(XADeviceVolumeItf self)
 {
@@ -65,9 +65,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported(impl->adapCtx, deviceID, &supported);
-#endif
+  
+    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported((XAAdaptationGstCtx*)impl->adapCtx, deviceID, &supported);
+
     if( ret != XA_RESULT_SUCCESS || supported != XA_BOOLEAN_TRUE )
     {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
@@ -94,9 +94,9 @@
 {
     XADeviceVolumeItfImpl* impl = GetImpl(self);
     XAresult ret = XA_RESULT_SUCCESS;
-#ifdef _GSTREAMER_BACKEND_  
+  
     XAboolean supported = XA_BOOLEAN_FALSE;
-#endif
+
     DEBUG_API("->XADeviceVolumeItfImpl_SetVolume");
 
     if( !impl || volume < impl->minVolume || volume > impl->maxVolume )
@@ -106,8 +106,8 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported(impl->adapCtx, deviceID, &supported);
+  
+    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported((XAAdaptationGstCtx*)impl->adapCtx, deviceID, &supported);
     if( ret != XA_RESULT_SUCCESS || supported != XA_BOOLEAN_TRUE )
     {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
@@ -115,13 +115,13 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    ret = XADeviceVolumeItfAdapt_SetVolume(impl->adapCtx, deviceID, volume);
+    ret = XADeviceVolumeItfAdapt_SetVolume((XAAdaptationGstCtx*)impl->adapCtx, deviceID, volume);
 
     if( ret == XA_RESULT_SUCCESS )
     {
         impl->curVolume = volume;
     }
-#endif
+
     DEBUG_API("<-XADeviceVolumeItfImpl_SetVolume");
     return ret;
 }
@@ -147,9 +147,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported(impl->adapCtx, deviceID, &supported);
-#endif
+  
+    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported((XAAdaptationGstCtx*)impl->adapCtx, deviceID, &supported);
+
     if( ret != XA_RESULT_SUCCESS || supported != XA_BOOLEAN_TRUE )
     {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
@@ -164,7 +164,7 @@
 /**
  * XADeviceVolumeItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_  
+  
 /**
  * XADeviceVolumeItfImpl* XADeviceVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
  * Description: Allocate and initialize DeviceVolumeImpl
@@ -198,7 +198,7 @@
     DEBUG_API("<-XADeviceVolumeItfImpl_Create");
     return self;
 }
-#endif
+
 /* void XADeviceVolumeItfImpl_Free(XADeviceVolumeItfImpl* self)
  * Description: Free all resources reserved at XADeviceVolumeItfImpl_Create
  */
--- a/khronosfws/openmax_al/src/engine/xadevicevolumeitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xadevicevolumeitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XADEVICEVOLUMEITF_H
 #define XADEVICEVOLUMEITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 #define DEFAULTDEVICEVOLUME 5
 #define DEFAULTDEVICEMINVOLUME 0
@@ -47,10 +44,10 @@
     XAint32 minVolume;
     XAint32 maxVolume;
     XAboolean ismBscale;
-#ifdef _GSTREAMER_BACKEND_  
+ 
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
 } XADeviceVolumeItfImpl;
 
 /* Base interface XADeviceVolumeItf implementation */
@@ -68,10 +65,10 @@
                         XADeviceVolumeItf self,
                         XAuint32 deviceID,
                         XAint32 * pVolume);
-#ifdef _GSTREAMER_BACKEND_  
+  
 /* XADeviceVolumeItfImpl -specific methods */
 XADeviceVolumeItfImpl* XADeviceVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-#endif
+
 void XADeviceVolumeItfImpl_Free(XADeviceVolumeItfImpl* self);
 
 #endif /* XADEVICEVOLUMEITF_H */
--- a/khronosfws/openmax_al/src/engine/xaengine.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengine.c	Fri Apr 30 19:18:45 2010 -0500
@@ -35,25 +35,28 @@
 #include "xadevicevolumeitf.h"
 #include "xaconfigextensionsitf.h"
 #include "xathreadsafety.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCameraCapsAdaptation.h"
-#endif
+#include "xaframeworkmgr.h"  
+#include "xastaticcameracapsadaptation.h"
+
+
 /* Static mapping of enumeration XAEngineInterfaces to interface iids */
 static const XAInterfaceID* xaEngineItfIIDs[ENGINE_ITFCOUNT]={
     &XA_IID_OBJECT,
     &XA_IID_ENGINE,
     &XA_IID_DYNAMICINTERFACEMANAGEMENT,
     &XA_IID_THREADSYNC,
-    &XA_IID_CONFIGEXTENSION,
-    &XA_IID_DEVICEVOLUME,
+/*    &XA_IID_CONFIGEXTENSION,*/
+/*    &XA_IID_DEVICEVOLUME,*/
     &XA_IID_AUDIOIODEVICECAPABILITIES,
-    &XA_IID_AUDIODECODERCAPABILITIES,
-    &XA_IID_AUDIOENCODERCAPABILITIES,
+/*    &XA_IID_AUDIODECODERCAPABILITIES,*/
+    &XA_IID_AUDIOENCODERCAPABILITIES
+/*
     &XA_IID_CAMERACAPABILITIES,
     &XA_IID_IMAGEDECODERCAPABILITIES,
     &XA_IID_IMAGEENCODERCAPABILITIES,
     &XA_IID_VIDEODECODERCAPABILITIES,
     &XA_IID_VIDEOENCODERCAPABILITIES
+*/
 };
 
 /*****************************************************************************
@@ -173,9 +176,11 @@
         }
     }
 
-#ifdef _GSTREAMER_BACKEND_  
+/*
+  
     pImpl->adaptationCtx = XAEngineAdapt_Create();
-#endif
+
+*/
     /* Set ObjectItf to point to newly created object */
     *pEngine = ((XAObjectItf)&(pBaseObj->self));
 
@@ -257,23 +262,26 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_  
-    ret = XAEngineAdapt_PostInit( pObjImpl->adaptationCtx );
-#endif
-    if( ret != XA_RESULT_SUCCESS )
+   
+    /* Table containing use-case framework map */
+    pObjImpl->frameworkMap = XAFrameworkMgr_CreateFrameworkMap();
+    if (pObjImpl->frameworkMap == NULL)
     {
-        DEBUG_ERR_A1("Engine postinit failed - %d", ret);
+        DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
         DEBUG_API("<-XAEngineImpl_DoRealize");
-        return ret;
+        /* memory allocation failed */
+        return XA_RESULT_MEMORY_FAILURE;
     }
 
-    ret = XAEngineAdaptMMF_PostInit( pObjImpl->adaptationMmfCtx );
-    if( ret != XA_RESULT_SUCCESS )
-    {
-        DEBUG_ERR_A1("Engine postinit failed (MMF) - %d", ret);
-        DEBUG_API("<-XAEngineImpl_DoRealize");
+
+    /* Create capabilities list */
+    ret = XACapabilitiesMgr_CreateCapabilitieList(pObjImpl->frameworkMap, &(pObjImpl->capabilities));
+    if (ret != XA_RESULT_SUCCESS)
+        {
         return ret;
-    }
+        }
+
+
     /* Realize all implicit and explicitly wanted interfaces */
     for(itfIdx=0; itfIdx<ENGINE_ITFCOUNT; itfIdx++)
     {
@@ -284,7 +292,7 @@
             switch(itfIdx)
             {
                 case ENGINE_ENGINEITF:
-                    pItf = XAEngineItfImpl_Create();
+                    pItf = XAEngineItfImpl_Create(pObjImpl->frameworkMap, pObjImpl->capabilities);
                     break;
                 case ENGINE_THREADSYNCITF:
                     pItf = XAThreadSyncItfImpl_Create();
@@ -293,11 +301,12 @@
                     pItf = XADIMItfImpl_Create();
                     break;
                 case ENGINE_AUDIOIODEVICECAPAITF:
-                    pItf = XAAudIODevCapaItfImpl_Create();
+                    pItf = XAAudIODevCapaItfImpl_Create(pObjImpl->capabilities);
                     break;
                 case ENGINE_AUDIOENCODERCAPAITF:
-                    pItf = XAAudioEncoderCapabilitiesItfImpl_Create();
+                    pItf = XAAudioEncoderCapabilitiesItfImpl_Create(pObjImpl->capabilities);
                     break;
+/*
                 case ENGINE_AUDIODECODERCAPAITF:
                     pItf = XAAudioDecoderCapabilitiesItfImpl_Create();
                     break;
@@ -305,15 +314,13 @@
                     pItf = XAConfigExtensionsItfImpl_Create();
                     break;
                 case ENGINE_DEVICEVOLUMEITF:
-#ifdef _GSTREAMER_BACKEND_  
                     pItf = XADeviceVolumeItfImpl_Create(pObjImpl->adaptationCtx);
-#endif
                     break;
                 case ENGINE_CAMERACAPAITF:
-#ifdef _GSTREAMER_BACKEND_
+
                     XAStaticCameraCaps_Init();
                     pItf = XACameraCapabilitiesItfImpl_Create();
-#endif                    
+                    
                     break;
                 case ENGINE_IMAGEDECODERCAPAITF:
                     pItf = XAImageDecoderCapabilitiesItfImpl_Create();
@@ -327,6 +334,7 @@
                 case ENGINE_VIDEOENCODERCAPAITF:
                     pItf = XAVideoEncoderCapabilitiesItfImpl_Create();
                     break;
+*/
                 default:
                     break;
             }
@@ -394,6 +402,7 @@
                 case ENGINE_AUDIOENCODERCAPAITF:
                     XAAudioEncoderCapabilitiesItfImpl_Free(pItf);
                     break;
+/*
                 case ENGINE_AUDIODECODERCAPAITF:
                     XAAudioDecoderCapabilitiesItfImpl_Free(pItf);
                     break;
@@ -404,9 +413,9 @@
                     XADeviceVolumeItfImpl_Free(pItf);
                     break;
                 case ENGINE_CAMERACAPAITF:
-#ifdef _GSTREAMER_BACKEND_
+
                     XACameraCapabilitiesItfImpl_Free(pItf);
-#endif                    
+                    
                     break;
                 case ENGINE_IMAGEDECODERCAPAITF:
                     XAImageDecoderCapabilitiesItfImpl_Free(pItf);
@@ -420,6 +429,7 @@
                 case ENGINE_VIDEOENCODERCAPAITF:
                     XAVideoEncoderCapabilitiesItfImpl_Free(pItf);
                     break;
+*/
                 default:
                     break;
             }
@@ -428,20 +438,25 @@
     }
 
     /* free all other allocated resources*/
-#ifdef _GSTREAMER_BACKEND_  
+/*  
     if ( pImpl->adaptationCtx != NULL )
     {
         XAEngineAdapt_Destroy( pImpl->adaptationCtx );
         pImpl->adaptationCtx = NULL;
     }
-#endif    
+    
     if ( pImpl->adaptationMmfCtx != NULL )
     {
         XAEngineAdaptMMF_Destroy( pImpl->adaptationMmfCtx );
         pImpl->adaptationMmfCtx = NULL;
-    }
-
-    XAThreadSafety_Destroy();
+    }*/
+    /* free framework map */
+    XAFrameworkMgr_DeleteFrameworkMap(&pImpl->frameworkMap);
+    
+    /* TODO free capabilities list */
+    XACapabilitiesMgr_DeleteCapabilitieList(&pImpl->capabilities);
+    
+     XAThreadSafety_Destroy();
 
     DEBUG_API("<-XAEngineImpl_FreeResources");
     return;
--- a/khronosfws/openmax_al/src/engine/xaengine.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengine.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,10 +21,11 @@
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
 #include "xaobjectitf.h"
-#ifdef _GSTREAMER_BACKEND_   
-#include "XAEngineAdaptCtx.h"
-#endif
+#include "xaengineadaptctx.h"
+
 #include "xaengineadaptctxmmf.h"
+#include "xaframeworkmgr.h"
+#include "xacapabilitiesmgr.h"
 
 /** MACROS **/
 
@@ -40,16 +41,20 @@
     ENGINE_ENGINEITF,
     ENGINE_DIMITF,
     ENGINE_THREADSYNCITF,
+/*
     ENGINE_CONFIGEXTENSIONSITF,
     ENGINE_DEVICEVOLUMEITF,
+*/
     ENGINE_AUDIOIODEVICECAPAITF,
-    ENGINE_AUDIODECODERCAPAITF,
+/*    ENGINE_AUDIODECODERCAPAITF,*/
     ENGINE_AUDIOENCODERCAPAITF,
+/*
     ENGINE_CAMERACAPAITF,
     ENGINE_IMAGEDECODERCAPAITF,
     ENGINE_IMAGEENCODERCAPAITF,
     ENGINE_VIDEODECODERCAPAITF,
     ENGINE_VIDEOENCODERCAPAITF,
+*/
     ENGINE_ITFCOUNT
 } XAEngineInterfaces;
 
@@ -65,8 +70,11 @@
     XAboolean isThreadSafe;
 
     //actual adpatation context can point to either MMF or GST implementations
-    void* adaptationGstCtx;
-    void* adaptationMmfCtx;
+    FrameworkMap *frameworkMap;
+    XACapabilities* capabilities;
+   
+/*    void* adaptationGstCtx;
+    void* adaptationMmfCtx;*/
 } XAEngineImpl;
 
 /** METHODS **/
--- a/khronosfws/openmax_al/src/engine/xaengineitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengineitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -21,13 +21,26 @@
 #include "xaengineitf.h"
 #include "xavibraitf.h"
 #include "xaledarrayitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
-
+#include "xaobjects.h"
+#include "xacapabilitiesmgr.h"
 /*static XAchar implementationText[] = "Implementation does not conform to AL Spec";*/
 
-
+/**
+ * XAEngineItfImpl* GetImpl(XAEngineItf self)
+ * Description: Validate interface pointer and cast it to implementation pointer.
+ **/
+static XAEngineItfImpl* GetImpl(XAEngineItf self)
+{
+    if( self )
+    {
+        XAEngineItfImpl* impl = (XAEngineItfImpl*)(*self);
+        if( impl && (impl == impl->self) )
+        {
+            return impl;
+        }
+    }
+    return NULL;
+}
 /**
  * Base interface XAEngineItf implementation
  */
@@ -38,8 +51,10 @@
                                             const XAInterfaceID *pInterfaceIds,
                                             const XAboolean *pInterfaceRequired)
 {
-    return XACameraDeviceImpl_CreateCameraDevice( pDevice, deviceID,numInterfaces,
-                                                  pInterfaceIds, pInterfaceRequired );
+    XAEngineItfImpl* impl = GetImpl(self);
+    return XACameraDeviceImpl_CreateCameraDevice( impl->mapper,impl->capabilities,
+                                                    pDevice, deviceID,numInterfaces,
+                                                    pInterfaceIds, pInterfaceRequired );
 }
 
 XAresult XAEngineItfImpl_CreateRadioDevice(XAEngineItf self,
@@ -48,7 +63,8 @@
                                             const XAInterfaceID *pInterfaceIds,
                                             const XAboolean *pInterfaceRequired)
 {
-    return XARadioDeviceImpl_CreateRadioDevice( pDevice, numInterfaces,
+    return XARadioDeviceImpl_CreateRadioDevice( ((XAEngineItfImpl*)self)->mapper,
+                                                pDevice, numInterfaces,
                                                 pInterfaceIds, pInterfaceRequired );
 }
 
@@ -59,8 +75,9 @@
                                          const XAInterfaceID *pInterfaceIds,
                                          const XAboolean *pInterfaceRequired)
 {
-    return XALEDArrayDeviceImpl_CreateLEDArrayDevice( pDevice, deviceID, numInterfaces,
-                                                      pInterfaceIds, pInterfaceRequired );
+    return XALEDArrayDeviceImpl_CreateLEDArrayDevice( ((XAEngineItfImpl*)self)->mapper,
+                                                        pDevice, deviceID, numInterfaces,
+                                                        pInterfaceIds, pInterfaceRequired );
 }
 
 XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self,
@@ -70,7 +87,8 @@
                                            const XAInterfaceID *pInterfaceIds,
                                            const XAboolean *pInterfaceRequired)
 {
-    return XAVibraDeviceImpl_CreateVibraDevice( pDevice, deviceID, numInterfaces,
+    return XAVibraDeviceImpl_CreateVibraDevice( ((XAEngineItfImpl*)self)->mapper,
+                                                pDevice, deviceID, numInterfaces,
                                                 pInterfaceIds, pInterfaceRequired);
 }
 
@@ -86,7 +104,9 @@
                                            const XAInterfaceID *pInterfaceIds,
                                            const XAboolean *pInterfaceRequired)
 {
-    return XAMediaPlayerImpl_CreateMediaPlayer(pPlayer, pDataSrc, pBankSrc, pAudioSnk,
+    XAEngineItfImpl* impl = GetImpl(self);
+    return XAMediaPlayerImpl_CreateMediaPlayer(impl->mapper,impl->capabilities, pPlayer, 
+                                             pDataSrc, pBankSrc, pAudioSnk,
                                              pImageVideoSnk, pVibra, pLEDArray,
                                              numInterfaces, pInterfaceIds, pInterfaceRequired);
 }
@@ -99,9 +119,17 @@
                                              XAuint32 numInterfaces,
                                              const XAInterfaceID * pInterfaceIds,
                                              const XAboolean * pInterfaceRequired)
-{
-    return XAMediaRecorderImpl_CreateMediaRecorder(pRecorder, pAudioSrc, pImageVideoSrc, pDataSnk,
-                                                   numInterfaces, pInterfaceIds, pInterfaceRequired);
+{    
+    XAEngineItfImpl* impl = GetImpl(self);
+    return XAMediaRecorderImpl_CreateMediaRecorder(impl->mapper,
+                                                   impl->capabilities,
+                                                   pRecorder,
+                                                   pAudioSrc,
+                                                   pImageVideoSrc,
+                                                   pDataSnk,
+                                                   numInterfaces,
+                                                   pInterfaceIds,
+                                                   pInterfaceRequired);
 }
 
 XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self,
@@ -110,8 +138,10 @@
                                          const XAInterfaceID *pInterfaceIds,
                                          const XAboolean *pInterfaceRequired)
 {
-    return XAOMixImpl_CreateOutputMix(pMix, numInterfaces,
-                                      pInterfaceIds, pInterfaceRequired);
+    XAEngineItfImpl* impl = GetImpl(self);
+    return XAOMixImpl_CreateOutputMix(impl->mapper,impl->capabilities,
+                                        pMix, numInterfaces,
+                                        pInterfaceIds, pInterfaceRequired);
 }
 
 XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self,
@@ -121,8 +151,10 @@
                                                  const XAInterfaceID *pInterfaceIds,
                                                  const XAboolean *pInterfaceRequired)
 {
-    return XAMetadataExtractorImpl_Create(pMetadataExtractor, pDataSource,
-                                          numInterfaces, pInterfaceIds, pInterfaceRequired);
+    XAEngineItfImpl* impl = GetImpl(self);
+    return XAMetadataExtractorImpl_Create(impl->mapper, impl->capabilities,
+                                            pMetadataExtractor, pDataSource,
+                                            numInterfaces, pInterfaceIds, pInterfaceRequired);
 }
 
 XAresult XAEngineItfImpl_CreateExtensionObject(XAEngineItf self,
@@ -312,9 +344,9 @@
                                               XAuint32 *pLEDDeviceID,
                                               XALEDDescriptor *pDescriptor)
 {
-#ifdef _GSTREAMER_BACKEND_  
+  
     XALEDDescriptor descriptor;
-#endif    
+    
     DEBUG_API("->XAEngineItfImpl_QueryLEDCapabilities");
 
     if( !pDescriptor )
@@ -330,7 +362,7 @@
     }
     else
     {   
-#ifdef _GSTREAMER_BACKEND_  
+  
         /* query device capabilities */
         if( pIndex )
         {
@@ -359,7 +391,7 @@
             descriptor.primaryLED = PRIMARY_LED;
             *pDescriptor = descriptor;
         }
-#endif        
+        
     }
     DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
     return XA_RESULT_SUCCESS;
@@ -370,9 +402,9 @@
                                                 XAuint32 *pVibraDeviceID,
                                                 XAVibraDescriptor *pDescriptor)
 {
-#ifdef _GSTREAMER_BACKEND_  
+  
     XAVibraDescriptor descriptor;
-#endif
+
     DEBUG_API("->XAEngineItfImpl_QueryVibraCapabilities");
 
     if( !pDescriptor  )
@@ -388,7 +420,7 @@
     }
     else
     {   
-#ifdef _GSTREAMER_BACKEND_  
+  
         /* query device capabilities */
         if( pIndex )
         {
@@ -419,7 +451,7 @@
             descriptor.supportsIntensity = XA_BOOLEAN_TRUE;
             *pDescriptor = descriptor;
         }
-#endif        
+        
     }
 
     DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
@@ -474,7 +506,7 @@
 /**
  * XAEngineItfImpl -specific methods
  **/
-XAEngineItfImpl* XAEngineItfImpl_Create()
+XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper, XACapabilities* capabilities)
 {
     XAEngineItfImpl* self = (XAEngineItfImpl*)
         calloc(1,sizeof(XAEngineItfImpl));
@@ -501,6 +533,9 @@
         self->itf.QueryNumSupportedExtensions = XAEngineItfImpl_QueryNumSupportedExtensions;
         self->itf.QuerySupportedExtension = XAEngineItfImpl_QuerySupportedExtension;
         self->itf.IsExtensionSupported = XAEngineItfImpl_IsExtensionSupported;
+        self->mapper = fwkmapper;
+        self->capabilities = capabilities;
+        self->xyz = 50;
         self->self = self;
     }
     DEBUG_API("<-XAEngineItfImpl_Create");
--- a/khronosfws/openmax_al/src/engine/xaengineitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengineitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -20,7 +20,8 @@
 
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
-
+#include "xaframeworkmgr.h"
+#include "xacapabilitiesmgr.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -36,6 +37,13 @@
     /* pointer to self */
     struct XAEngineItfImpl_* self;
     /* variables */
+    /*Not Owned*/
+    struct FrameworkMap_* mapper;
+    /*Not Owned*/
+    struct XACapabilities_* capabilities;
+    
+    int xyz;
+    
 } XAEngineItfImpl;
 
 /** METHODS **/
@@ -152,7 +160,7 @@
                                               XAboolean *pSupported);
 
 /* XAEngineItfImpl -specific methods */
-XAEngineItfImpl* XAEngineItfImpl_Create(void);
+XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper, XACapabilities* capabilities);
 void XAEngineItfImpl_Free(XAEngineItfImpl *self);
 
 #endif /* XAENGINEITF_H */
--- a/khronosfws/openmax_al/src/engine/xaimagedecodercapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaimagedecodercapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -22,9 +22,9 @@
 
 #include "xaglobals.h"
 #include "xaimagedecodercapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
+  
+#include "xacapabilitiesmgr.h"
+
 /* XAImageDecoderCapabilitiesItfImpl* GetImpl
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -72,19 +72,20 @@
         else
         {
             /* query capabilities from adaptation using codec id */
-#ifdef _GSTREAMER_BACKEND_  
-            XAStaticCapsData temp;
+  
+            XACapabilities temp;
             memset(pDescriptor,0,sizeof(XAImageCodecDescriptor));
             /* here pEncoderId refers to index rather than codec id */
-            res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_DECODER|XACAP_IMAGE, *pDecoderId, &temp);
+            res = XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_DECODER|XACAP_IMAGE), *pDecoderId, &temp);
             if( res == XA_RESULT_SUCCESS )
             {
+                XAImageCodecDescriptor* desc = (XAImageCodecDescriptor*)(&temp.pEntry);
                 /* map applicable values to XAAudioCodecCapabilities */
                 pDescriptor->codecId = temp.xaid;
-                pDescriptor->maxWidth = temp.maxW;
-                pDescriptor->maxHeight = temp.maxH;
+                pDescriptor->maxWidth = desc->maxWidth;
+                pDescriptor->maxHeight = desc->maxHeight;
             }
-#endif
+
         }
     }
 
@@ -112,9 +113,9 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        res = XAStaticCapsAdapt_QueryColorFormats(pIndex, pColorFormats);
-#endif        
+
+        res = XACapabilitiesMgr_QueryColorFormats(NULL, pIndex, pColorFormats);
+        
     }
     DEBUG_API("<-XAImageDecoderCapabilitiesItfImpl_QueryColorFormats");
     return res;
@@ -141,11 +142,11 @@
         self->itf.QueryColorFormats =
             XAImageDecoderCapabilitiesItfImpl_QueryColorFormats;
 
-#ifdef _GSTREAMER_BACKEND_  
+  
         /* init variables */
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_DECODER|XACAP_IMAGE,
+        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_DECODER|XACAP_IMAGE),
                                   &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-#endif
+
         self->self = self;
     }
     DEBUG_API("<-XAImageDecoderCapabilitiesItfImpl_Create");
--- a/khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -21,9 +21,7 @@
 #include <string.h>
 #include "xaglobals.h"
 #include "xaimageencodercapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
+#include "xacapabilitiesmgr.h"  
 /* XAImageEncoderCapabilitiesItfImpl* GetImpl
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -72,19 +70,20 @@
         else
         {
             /* query capabilities from adaptation using codec id */
-#ifdef _GSTREAMER_BACKEND_  
-            XAStaticCapsData temp;
+  
+            XACapabilities temp;
             memset(pDescriptor,0,sizeof(XAImageCodecDescriptor));
             /* here pEncoderId refers to index rather than codec id */
-            res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_ENCODER|XACAP_IMAGE, *pEncoderId, &temp);
+            res = XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE), *pEncoderId, &temp);
             if( res == XA_RESULT_SUCCESS )
             {
+                XAImageCodecDescriptor* desc = (XAImageCodecDescriptor*)(&temp.pEntry);
                 /* map applicable values to XAAudioCodecCapabilities */
                 pDescriptor->codecId = temp.xaid;
-                pDescriptor->maxWidth = temp.maxW;
-                pDescriptor->maxHeight = temp.maxH;
+                pDescriptor->maxWidth = desc->maxWidth;
+                pDescriptor->maxHeight = desc->maxHeight;
             }
-#endif
+
         }
     }
 
@@ -113,9 +112,9 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        res = XAStaticCapsAdapt_QueryColorFormats(pIndex, pColorFormats);
-#endif        
+
+        res = XACapabilitiesMgr_QueryColorFormats(NULL, pIndex, pColorFormats);
+        
     }
     DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_QueryColorFormats");
     return res;
@@ -142,11 +141,11 @@
         self->itf.QueryColorFormats =
             XAImageEncoderCapabilitiesItfImpl_QueryColorFormats;
 
-#ifdef _GSTREAMER_BACKEND_  
+  
         /* init variables */
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_ENCODER|XACAP_IMAGE,
+        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE),
                                   &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-#endif
+
         self->self = self;
     }
     DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_Create");
--- a/khronosfws/openmax_al/src/engine/xavideodecodercapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xavideodecodercapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -23,9 +23,9 @@
 
 #include "xaglobals.h"
 #include "xavideodecodercapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
+#include "xacapabilitiesmgr.h"   
+
+
 /* XAVideoDecoderCapabilitiesItfImpl* GetImpl
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -77,16 +77,16 @@
             else
             {
                 
-#ifdef _GSTREAMER_BACKEND_  
+  
                 XAuint32 i = 0;
-                XAStaticCapsData temp;
+                XACapabilities temp;
                 for( i=0; i<impl->numCodecs; i++ )
                 {
                     /* query decoder id from adaptation using index value */
-                    XAStaticCapsAdapt_GetCapsByIdx(XACAP_DECODER|XACAP_VIDEO, i, &temp);
+                    XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_DECODER|XACAP_VIDEO), i, &temp);
                     pDecoderIds[i] = temp.xaid;
                 }
-#endif
+
             }
         }
         /* return number of decoders */
@@ -132,24 +132,25 @@
             else
             {
                 /* query capabilities from adaptation using codec id */
-#ifdef _GSTREAMER_BACKEND_  
-                XAStaticCapsData temp;
+  
+                XACapabilities temp;
                 memset(pDescriptor,0,sizeof(XAVideoCodecDescriptor));
-                res = XAStaticCapsAdapt_GetCapsById(XACAP_DECODER|XACAP_VIDEO, decoderId, &temp);
+                res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_DECODER|XACAP_VIDEO), decoderId, &temp);
                 if( res == XA_RESULT_SUCCESS )
                 {
+                    XAVideoCodecDescriptor* desc = (XAVideoCodecDescriptor*)(&temp.pEntry);
                     /* map applicable values to XAVideoCodecCapabilities */
                     pDescriptor->codecId = temp.xaid;
-                    pDescriptor->maxWidth = temp.maxW;
-                    pDescriptor->maxHeight = temp.maxH;
-                    pDescriptor->maxFrameRate = (temp.maxFR & 0xffff)<<16;
-                    pDescriptor->maxBitRate = temp.maxBR;
+                    pDescriptor->maxWidth = desc->maxWidth;
+                    pDescriptor->maxHeight = desc->maxHeight;
+                    pDescriptor->maxFrameRate = (desc->maxFrameRate & 0xffff)<<16;
+                    pDescriptor->maxBitRate = desc->maxBitRate;
                     /*other caps undefined*/
                     pDescriptor->rateControlSupported = 0; /* reserved in decoders */
                     pDescriptor->profileSetting = 0; /* unknown for theora or motionjpeg */
                     pDescriptor->levelSetting = 0; /* unknown for theora or motionjpeg */
                 }
-#endif
+
             }
         }
     }
@@ -179,11 +180,11 @@
         self->itf.GetVideoDecoderCapabilities =
             XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoderCapabilities;
 
-#ifdef _GSTREAMER_BACKEND_  
+  
         /* init variables */
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_DECODER|XACAP_VIDEO,
+        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_DECODER|XACAP_VIDEO),
                                   &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-#endif
+
         self->self = self;
     }
     DEBUG_API("<-XAVideoDecoderCapabilitiesItfImpl_Create");
--- a/khronosfws/openmax_al/src/engine/xavideoencodercapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xavideoencodercapabilitiesitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -22,9 +22,9 @@
 
 #include "xaglobals.h"
 #include "xavideoencodercapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
+
+#include "xacapabilitiesmgr.h"
+
 /* XAVideoEncoderCapabilitiesItfImpl* GetImpl
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -74,16 +74,16 @@
             else
             {
                 
-#ifdef _GSTREAMER_BACKEND_  
+  
                 XAuint32 i = 0;
-                XAStaticCapsData temp;
+                XACapabilities temp;
                 for( i=0; i<impl->numCodecs; i++ )
                 {
                     /* query encoder id from adaptation using index value */
-                    XAStaticCapsAdapt_GetCapsByIdx(XACAP_ENCODER|XACAP_VIDEO, i, &temp);
+                    XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), i, &temp);
                     pEncoderIds[i] = temp.xaid;
                 }
-#endif
+
             }
         }
         /* return number of encoders */
@@ -128,25 +128,26 @@
             }
             else
             {
-#ifdef _GSTREAMER_BACKEND_  
+  
                 /* query capabilities from adaptation using codec id */
-                XAStaticCapsData temp;
+                XACapabilities temp;
                 memset(pDescriptor,0,sizeof(XAVideoCodecDescriptor));
-                res = XAStaticCapsAdapt_GetCapsById(XACAP_ENCODER|XACAP_VIDEO, encoderId, &temp);
+                res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), encoderId, &temp);
                 if( res == XA_RESULT_SUCCESS )
                 {
-                    /* map applicable values to XAAudioCodecCapabilities */
+                    XAVideoCodecDescriptor* desc = (XAVideoCodecDescriptor*)(&temp.pEntry);
+                    /* map applicable values to XAVideoCodecCapabilities */
                     pDescriptor->codecId = temp.xaid;
-                    pDescriptor->maxWidth = temp.maxW;
-                    pDescriptor->maxHeight = temp.maxH;
-                    pDescriptor->maxFrameRate = (temp.maxFR & 0xffff)<<16;
-                    pDescriptor->maxBitRate = temp.maxBR;
+                    pDescriptor->maxWidth = desc->maxWidth;
+                    pDescriptor->maxHeight = desc->maxHeight;
+                    pDescriptor->maxFrameRate = (desc->maxFrameRate & 0xffff)<<16;
+                    pDescriptor->maxBitRate = desc->maxBitRate;
                     /*other caps undefined*/
                     pDescriptor->rateControlSupported = XA_RATECONTROLMODE_CONSTANTBITRATE;
                     pDescriptor->profileSetting = 0; /* unknown for theora or motionjpeg */
                     pDescriptor->levelSetting = 0; /* unknown for theora or motionjpeg */
                 }
-#endif            
+            
             }
         }
     }
@@ -176,11 +177,11 @@
         self->itf.GetVideoEncoderCapabilities =
             XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoderCapabilities;
 
-#ifdef _GSTREAMER_BACKEND_  
+  
         /* init variables */
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_ENCODER|XACAP_VIDEO,
+        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO),
                                   &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-#endif
+
         self->self = self;
     }
     DEBUG_API("<-XAVideoEncoderCapabilitiesItfImpl_Create");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,1470 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <assert.h>
+#include <string.h>
+#include "gst/gst.h"
+#include "gst/gstbuffer.h"
+#include "gst/app/gstappsrc.h"
+#include "xaobjectitf.h"
+#include "xacameradevice.h"
+#include "xaradiodevice.h"
+#include "xaoutputmix.h"
+#include "xamediaplayeradaptctx.h"
+#include "xacameraadaptctx.h"
+#include <stdlib.h>
+extern XAboolean cameraRealized;
+extern XACameraAdaptationCtx_* cameraCtx;
+/*
+ * XAAdaptationGstCtx* XAAdaptationGst_Create()
+ * 1st phase initialization function for Adaptation Base context structure.
+ * Reserves memory for base context and initializes GStreamer FW.
+ */
+XAresult XAAdaptationGst_Init( XAAdaptationGstCtx* pSelf, XAuint32 ctxId )
+{
+    DEBUG_API("->XAAdaptationGst_Init");
+
+    if ( pSelf )
+    {
+        if(XAAdaptationBase_Init(&(pSelf->baseObj), ctxId) != XA_RESULT_SUCCESS)
+            {
+            DEBUG_ERR("Failed to init base context!!!");
+            free(pSelf);
+            pSelf = NULL;
+            }
+        else
+            {
+            GError* gerror = 0;
+    
+    /*         Add default handler for Gst-bus messages */
+            pSelf->busCb = XAAdaptationGst_GstBusCb;
+    
+            // VASU MOD BEGINS
+            pSelf->cond_mutx_inited = XA_BOOLEAN_FALSE;
+            // VASU MOD ENDS
+    
+            sem_init(&(pSelf->semAsyncWait),0,0);
+    
+    
+            if ( !gst_init_check( NULL, NULL, &gerror ) )
+                {
+                    DEBUG_ERR("Gst Initalization failure.");
+                    return XA_RESULT_INTERNAL_ERROR;
+                }
+        
+            }
+    }
+    else
+    {
+        DEBUG_ERR("Invalid Gst Base Context.")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_API("<-XAAdaptationGst_Init");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAAdaptationGst_PostInit()
+ * 2nd phase initialization for Adaptation Base.
+ */
+XAresult XAAdaptationGst_PostInit( XAAdaptationGstCtx* ctx )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAAdaptationGst_PostInit");
+    // VASU MOD BEGINS
+    XAAdaptationBase_PostInit(&ctx->baseObj);
+    
+    ctx->thread_launched = XA_BOOLEAN_FALSE;
+    pthread_mutex_init(&(ctx->ds_mutex), NULL);
+    pthread_cond_init(&(ctx->ds_condition), NULL);
+    ctx->cond_mutx_inited = XA_BOOLEAN_TRUE;
+    
+    
+    // VASU MOD ENDS
+    DEBUG_API("<-XAAdaptationGst_PostInit");
+    return ret;
+}
+
+/*
+ * void XAAdaptationGst_Free( XAAdaptationGstCtx* ctx )
+ * Frees all Base context variables .
+ */
+void XAAdaptationGst_Free( XAAdaptationGstCtx* ctx )
+{
+	GstElement* fakesink = NULL;
+    DEBUG_API("->XAAdaptationGst_Free");
+
+    if ( ctx->bin )
+    {
+    	fakesink = gst_bin_get_by_name(GST_BIN(ctx->bin), "fakesink");
+		if ( fakesink )
+		{
+			gst_element_set_state( GST_ELEMENT(fakesink), GST_STATE_NULL);
+			gst_object_unref(fakesink);
+		}
+
+        if ( gst_element_set_state(GST_ELEMENT(ctx->bin), GST_STATE_NULL )!=GST_STATE_CHANGE_SUCCESS )
+        {   /*not much we can do*/
+            DEBUG_ERR("WARNING: Failed to change to NULL state before deletion!!")
+        }
+    }
+
+    if(ctx->asynctimer)
+    {   /*cancel timer*/
+        g_source_remove(ctx->asynctimer);
+    }
+    sem_post(&(ctx->semAsyncWait));
+    sem_destroy(&(ctx->semAsyncWait));
+
+    XAAdaptationGst_StopGstListener(ctx);
+
+    if ( ctx->bin )
+    {
+        gst_object_unref(ctx->bin);
+    }
+
+    //g_array_free(ctx->evtHdlrs, TRUE);
+    // VASU MOD BEGINS
+    if (ctx->cond_mutx_inited == XA_BOOLEAN_TRUE)
+        {
+        ctx->thread_launched = XA_BOOLEAN_FALSE;
+        pthread_mutex_destroy(&(ctx->ds_mutex));
+        pthread_cond_destroy(&(ctx->ds_condition));
+        ctx->cond_mutx_inited = XA_BOOLEAN_FALSE;
+        }
+    // VASU MOD ENDS
+    XAAdaptationBase_Free(&ctx->baseObj);
+    
+    DEBUG_API("<-XAAdaptationGst_Free");
+}
+
+
+/*
+ * gboolean XAAdaptationBase_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+ * Default Gst-bus message handler (Callback)
+ */
+gboolean XAAdaptationGst_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+{
+    GError *error;
+    gchar *debug;
+    DEBUG_API("->XAAdaptationGst_GstBusCb");
+    DEBUG_INFO_A2("Received Gst callback \"%s\" from \"%s\"",
+                    GST_MESSAGE_TYPE_NAME(message),
+                    GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+
+    switch( GST_MESSAGE_TYPE(message))
+    {
+        case GST_MESSAGE_ERROR:
+            gst_message_parse_error( message, &error, &debug );
+            DEBUG_INFO_A1("%s", debug);
+            break;
+        case GST_MESSAGE_EOS:
+            break;
+        case GST_MESSAGE_UNKNOWN:
+            break;
+        case GST_MESSAGE_WARNING:
+            break;
+        case GST_MESSAGE_INFO:
+            break;
+        case GST_MESSAGE_TAG:
+            break;
+        case GST_MESSAGE_BUFFERING:
+            break;
+        case GST_MESSAGE_STATE_CHANGED:
+            break;
+        case GST_MESSAGE_STATE_DIRTY:
+            break;
+        case GST_MESSAGE_STEP_DONE:
+            break;
+        case GST_MESSAGE_CLOCK_PROVIDE:
+            break;
+        case GST_MESSAGE_CLOCK_LOST:
+            break;
+        case GST_MESSAGE_NEW_CLOCK:
+            break;
+        case GST_MESSAGE_STRUCTURE_CHANGE:
+            break;
+        case GST_MESSAGE_STREAM_STATUS:
+            break;
+        case GST_MESSAGE_APPLICATION:
+            break;
+        case GST_MESSAGE_ELEMENT:
+            break;
+        case GST_MESSAGE_SEGMENT_START:
+            break;
+        case GST_MESSAGE_SEGMENT_DONE:
+            break;
+        case GST_MESSAGE_DURATION:
+            break;
+        case GST_MESSAGE_LATENCY:
+            break;
+        case GST_MESSAGE_ASYNC_START:
+            break;
+        case GST_MESSAGE_ASYNC_DONE:
+            break;
+        case GST_MESSAGE_ANY:
+            break;
+        default:
+            DEBUG_INFO("Unhandled Gst-Bus message");
+            break;
+    }
+    DEBUG_API("<-XAAdaptationGst_GstBusCb");
+    return TRUE;
+}
+
+XAresult XAAdaptationGst_InitGstListener(XAAdaptationGstCtx* ctx)
+{
+    int ret;
+    DEBUG_API("->XAAdaptationGst_InitGstListener");
+    if ( ctx->bin )
+    {
+        ctx->bus = gst_pipeline_get_bus( GST_PIPELINE( ctx->bin ));
+    }
+    if( !ctx->bus )
+    {
+        DEBUG_ERR("could not get gst bus!")
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    ret = pthread_create(&(ctx->busloopThr), NULL, (XAAdaptationGst_LaunchGstListener),(void*)ctx);
+    // VASU MOD BEGINS
+    if ( ctx->thread_launched == XA_BOOLEAN_FALSE )
+    {
+        // Wait until the thread is created
+        pthread_mutex_lock(&(ctx->ds_mutex));
+        pthread_cond_wait(&(ctx->ds_condition), &(ctx->ds_mutex));
+        pthread_mutex_unlock(&(ctx->ds_mutex));
+        // VASU MOD ENDS
+    }
+    if(ret)
+    {
+        DEBUG_ERR_A1("could not create thread!! (%d)",ret)
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_API("<-XAAdaptationGst_InitGstListener");
+    return XA_RESULT_SUCCESS;
+}
+
+void * XAAdaptationGst_LaunchGstListener(void* args)
+{
+    XAAdaptationGstCtx* ctx = (XAAdaptationGstCtx*)args;
+    DEBUG_API("->XAAdaptationGst_LaunchGstListener");
+    // VASU MOD BEGINS
+    // Signal calling thread that this thread creation is completed
+    ctx->thread_launched = XA_BOOLEAN_TRUE;
+    pthread_mutex_lock(&(ctx->ds_mutex));
+    pthread_cond_signal(&(ctx->ds_condition));
+    pthread_mutex_unlock(&(ctx->ds_mutex));
+    // VASU MOD ENDS
+
+    ctx->busloop = g_main_loop_new( NULL, FALSE );
+    if ( !ctx->busloop )
+    {
+        DEBUG_ERR("Glib main loop failure.")
+        DEBUG_API("<-XAAdaptationGst_LaunchGstListener");
+        assert(0);
+    }
+    else
+    {
+        DEBUG_INFO("Start Glib main loop")
+        g_main_loop_run(ctx->busloop);
+        DEBUG_INFO("Glib main loop stopped - exiting thread")
+        DEBUG_API("<-XAAdaptationGst_LaunchGstListener");
+        pthread_exit(NULL);
+    }
+   return NULL;
+}
+
+void XAAdaptationGst_StopGstListener(XAAdaptationGstCtx* ctx)
+{
+    DEBUG_API("->XAAdaptationGst_StopGstListener");
+    if(ctx->busloop)
+    {
+        g_main_loop_quit (ctx->busloop);
+        g_main_loop_unref(ctx->busloop);
+    }
+    if(ctx->bus)
+    {
+        gst_object_unref(ctx->bus);
+        ctx->bus = NULL;
+    }
+    DEBUG_API("<-XAAdaptationGst_StopGstListener");
+}
+
+/*
+ * ASynchronous operation managing
+ **/
+
+/* NOTE: This should NOT be called from gst callbacks - danger of deadlock!!
+ */
+void XAAdaptationGst_PrepareAsyncWait(XAAdaptationGstCtx* ctx)
+{
+    DEBUG_API("->XAAdaptationGst_PrepareAsyncWait");
+
+    if( ctx->waitingasyncop )
+    {   /*wait previous async op*/
+        DEBUG_INFO("::WARNING:: previous asynch still ongoing!!!");
+        DEBUG_INFO(">>>>  WAIT PREVIOUS");
+        sem_wait(&(ctx->semAsyncWait));
+        DEBUG_INFO("<<<<  PREVIOUS COMPLETED");
+    }
+    sem_init(&(ctx->semAsyncWait),0,0);
+
+    ctx->waitingasyncop = XA_BOOLEAN_TRUE;
+    DEBUG_API("<-XAAdaptationGst_PrepareAsyncWait");
+}
+
+void XAAdaptationGst_StartAsyncWait(XAAdaptationGstCtx* ctx)
+{
+    DEBUG_API("->XAAdaptationGst_StartAsyncWait");
+
+    /* timeout to try to avoid gst freeze in rollup */
+    ctx->asynctimer = g_timeout_add(XA_ADAPT_ASYNC_TIMEOUT,
+                                    XAAdaptationGst_CancelAsyncWait, ctx);
+    /* check flag once again if callback already happened before wait */
+    if(ctx->waitingasyncop)
+    {
+        DEBUG_INFO(">>>>  ASYNC STARTS");
+        sem_wait(&(ctx->semAsyncWait));
+        DEBUG_INFO("<<<<  ASYNC COMPLETED");
+    }
+    else
+    {
+        DEBUG_INFO("<> async completed already");
+    }
+    /*cancel timer*/
+    if(ctx->asynctimer)
+    {
+        g_source_remove(ctx->asynctimer);
+    }
+    ctx->waitingasyncop = XA_BOOLEAN_FALSE;
+
+    DEBUG_API("<-XAAdaptationGst_StartAsyncWait");
+}
+
+/* async operation timeout callback*/
+gboolean XAAdaptationGst_CancelAsyncWait(gpointer ctx)
+{
+    XAAdaptationGstCtx* bCtx = (XAAdaptationGstCtx*)ctx;
+    DEBUG_API("->XAAdaptationGst_CancelAsyncWait");
+    if( bCtx->waitingasyncop )
+    {
+        DEBUG_ERR_A3("ASYNC TIMED OUT : current %d, gsttarget %d, wanted %d",
+                      GST_STATE(bCtx->bin), GST_STATE_TARGET(bCtx->bin), bCtx->binWantedState);
+        bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+        sem_post(&(bCtx->semAsyncWait));
+    }
+    DEBUG_API("<-XAAdaptationGst_CancelAsyncWait");
+    /* return false to remove timer */
+    return FALSE;
+}
+
+void XAAdaptationGst_CompleteAsyncWait(XAAdaptationGstCtx* ctx)
+{
+    DEBUG_API("->XAAdaptationGst_CompleteAsyncWait");
+    if( ctx->waitingasyncop )
+    {
+        int i;
+        ctx->waitingasyncop = XA_BOOLEAN_FALSE;
+        sem_getvalue(&(ctx->semAsyncWait),&i);
+        DEBUG_INFO_A1("Asynch operation succeeded, sem value %d",i);
+        if(i<=0)
+        {   /* only post if locked */
+            sem_post(&(ctx->semAsyncWait));
+        }
+        else if(i>0)
+        {   /* should not be, reset semaphore */
+            sem_init(&(ctx->semAsyncWait),0,0);
+        }
+    }
+    DEBUG_API("<-XAAdaptationGst_CompleteAsyncWait");
+}
+
+/**
+ * GstElement* XAAdaptationGst_CreateGstSource( XADataSource* xaSrc, const XAchar *name )
+ * @param XADataSource* xaSnk - XADataSource defining gst source to create
+ * @param const XAchar *name - string for naming the gst element
+ * @param XAboolean *isobj - (out param) is source another XA object?
+ * @return GstElement* - return newly created gst source element
+ * Description: Create gst source element corresponding to XA source structure
+ */
+GstElement* XAAdaptationGst_CreateGstSource( XADataSource* xaSrc, const char *name, XAboolean *isobj, XAboolean *isPCM, XAboolean *isRawImage  )
+{
+    XAuint32 locType = 0;
+    GstElement* gstSrc = NULL;
+    char* fname=NULL;
+    XADataLocator_URI* uri = NULL;
+    XADataLocator_IODevice* ioDevice = NULL;
+    XACameraDeviceImpl* cameraDevice = NULL;
+    XARadioDeviceImpl* radioDevice = NULL;
+    XAObjectItfImpl* pObj = NULL;
+
+    DEBUG_API("->XAAdaptationGst_CreateGstSource");
+    if( !xaSrc || !xaSrc->pLocator || !isobj )
+    {
+        return NULL;
+    }
+    *isobj = XA_BOOLEAN_FALSE;
+    if( xaSrc && xaSrc->pFormat && *((XAuint32*)(xaSrc->pFormat))==XA_DATAFORMAT_PCM && isPCM )
+    {
+        *isPCM = XA_BOOLEAN_TRUE;
+    }
+    if( xaSrc && xaSrc->pFormat && *((XAuint32*)(xaSrc->pFormat))==XA_DATAFORMAT_RAWIMAGE && isRawImage )
+    {
+        *isRawImage = XA_BOOLEAN_TRUE;
+    }
+    locType = *((XAuint32*)(xaSrc->pLocator));
+    switch ( locType )
+    {
+        case XA_DATALOCATOR_URI:
+            DEBUG_INFO("XA_DATALOCATOR_URI");
+            uri = (XADataLocator_URI*)xaSrc->pLocator;
+            gstSrc = gst_element_factory_make("filesrc",name);
+            if ( uri->URI != NULL )
+            {
+                DEBUG_INFO_A1("URI: %s", uri->URI);
+                if(strncmp((char *)uri->URI, "file:///", 8) == 0)
+                    {
+                    fname = (char *)&((uri->URI)[8]);
+                    }
+                else
+                    {
+                    fname = (char *)uri->URI;
+                    }
+                DEBUG_INFO_A1("->filesystem path %s", fname);
+                g_object_set( G_OBJECT(gstSrc), "location", fname, NULL );
+                /*check for pcm - decodebin does not know how to handle raw PCM files */
+                if( isPCM && strstr(fname, ".pcm") )
+                {
+                    DEBUG_INFO("PCM file detected");
+                    *isPCM=XA_BOOLEAN_TRUE;
+                }
+            }
+            else
+            {
+                DEBUG_ERR("No uri specified.");
+                return NULL;
+            }
+            break; /* XA_DATALOCATOR_URI */
+
+
+        case XA_DATALOCATOR_IODEVICE:
+            DEBUG_INFO("XA_DATALOCATOR_IODEVICE");
+            ioDevice = (XADataLocator_IODevice*)(xaSrc->pLocator);
+            switch ( ioDevice->deviceType )
+            {
+                case XA_IODEVICE_AUDIOINPUT:
+                {
+                    DEBUG_INFO("XA_IODEVICE_AUDIOINPUT");
+                    DEBUG_INFO_A1("ioDevice->deviceID: %x", ioDevice->deviceID);
+                    switch (ioDevice->deviceID )
+                    {
+                    //case XA_ADAPTID_ALSASRC: //Krishna
+                    case XA_ADAPTID_DEVSOUNDSRC:
+                        //DEBUG_INFO("alsasrc"); //Krishna
+                        DEBUG_INFO("devsoundsrc");
+                        gstSrc = gst_element_factory_make("devsoundsrc",name); //Krishna - changed to devsoundsrc
+                        g_object_set (G_OBJECT (gstSrc), "num-buffers", 80, NULL);
+                        break;
+                    case XA_ADAPTID_AUDIOTESTSRC:
+                        /*fall through*/
+                    default:
+                        DEBUG_INFO("audiotestsrc");
+                        gstSrc = gst_element_factory_make("audiotestsrc",name);
+                        break;
+                    }
+                    break;
+                }
+                case XA_IODEVICE_CAMERA:
+                {
+                    DEBUG_INFO("XA_IODEVICE_CAMERA");
+                    if ( ioDevice->device )
+                    {   /*source is camera object*/
+                        DEBUG_INFO("Use camerabin as source.");
+                        /* Get camerabin from source object */
+                        pObj = (XAObjectItfImpl*)(*ioDevice->device);
+                        cameraDevice = (XACameraDeviceImpl*)(pObj);
+                        /*TODO we had to remove this line below since adaptationCtx
+                         * was  not a member of structure*/
+
+                        gstSrc = GST_ELEMENT(((XAAdaptationGstCtx*)(cameraDevice->adaptationCtx))->bin);
+                        /* refcount increase is needed to keep this not being deleted after use */
+                        gst_object_ref(GST_OBJECT(gstSrc));
+                        *isobj = XA_BOOLEAN_TRUE;
+                    }
+                    else
+                    {
+                        DEBUG_INFO_A1("ioDevice->deviceID: %x", ioDevice->deviceID);
+                        switch (ioDevice->deviceID )
+                        {
+                        case XA_ADAPTID_V4L2SRC:
+                            DEBUG_INFO("Camera deviceID: v4l2src ");
+ 
+                            break;
+                        case XA_ADAPTID_VIDEOTESTSRC:
+                            DEBUG_INFO("Camera deviceID: videotestsrc");
+ 
+                            break;
+                        default:
+                        case XA_DEFAULTDEVICEID_CAMERA:
+                            DEBUG_INFO("Camera deviceID:Default");
+                           
+                            break;
+                        }
+                        if ( cameraCtx )
+						{
+							gstSrc = GST_ELEMENT(cameraCtx->baseObj.bin);
+							gst_object_ref(GST_OBJECT(gstSrc));
+							*isobj = XA_BOOLEAN_TRUE;
+						}
+						else
+						{
+							DEBUG_ERR("No camera object created!");
+							return NULL;
+						}
+                    }
+                    break;
+                }
+                case XA_IODEVICE_RADIO:
+                    DEBUG_INFO("XA_IODEVICE_RADIO");
+                    if ( ioDevice->device )
+                    {
+                        DEBUG_INFO("Use radio pipeline as source.");
+                        /* Get radio_pipeline and set it to base context */
+                        radioDevice = (XARadioDeviceImpl*)(*ioDevice->device);
+                        /* radio does not have actual bin, only source element*/
+                        gstSrc = GST_ELEMENT(((XAAdaptationGstCtx*)radioDevice->adaptationCtx)->bin);
+                        /* refcount increase is needed to keep this not being deleted after use */
+                        gst_object_ref(GST_OBJECT(gstSrc));
+                        /**isobj = XA_BOOLEAN_TRUE;*/
+                    }
+                    break;
+                default:
+                {
+                    DEBUG_ERR("Unsupported IODevice.");
+                    break;
+                }
+            }
+            break; /* XA_DATALOCATOR_IODEVICE */
+
+/*        case XA_DATALOCATOR_CONTENTPIPE:
+        {
+        	DEBUG_INFO("XA_DATALOCATOR_CONTENTPIPE");
+        	gstSrc = gst_element_factory_make("appsrc",name);
+            break;
+        }*/
+        case XA_DATALOCATOR_ADDRESS:
+            {
+                XADataLocator_Address* address = (XADataLocator_Address*)(xaSrc->pLocator);
+                gstSrc = gst_element_factory_make("appsrc", name);
+                /* init gst buffer from datalocator */
+                if( gstSrc )
+                {
+                    /* init GST buffer from XADataLocator*/
+                    GstBuffer* userBuf = gst_buffer_new();
+                    if( userBuf )
+                    {
+                        userBuf->size = address->length;
+                        userBuf->data = address->pAddress;
+                        /* push the whole buffer to appsrc so it is ready for preroll */
+                        DEBUG_INFO("Pushing buffer");
+                        gst_app_src_push_buffer( GST_APP_SRC(gstSrc), userBuf );
+                        DEBUG_INFO_A1("Sent buffer at 0x%x to appsrc", userBuf );
+                        gst_app_src_end_of_stream( GST_APP_SRC(gstSrc) );
+                    }
+                    else
+                    {
+                        DEBUG_ERR("Failure allocating buffer!");
+                    }
+                }
+                else
+                {
+                    DEBUG_ERR("Failure creating appsrc!");
+                }
+            }
+            break;
+
+        default:
+            DEBUG_ERR("Incorrect data locator for source.")
+            break;
+    }
+
+    if ( gstSrc )
+    {
+        DEBUG_INFO_A1("Created gstreamer source element at %x", gstSrc);
+    }
+
+    DEBUG_API("<-XAAdaptationGst_CreateGstSource");
+    return gstSrc;
+}
+
+
+/**
+ * GstElement* XAAdaptationGst_CreateGstSink( XADataSink* xaSnk, const XAchar *name )
+ * @param XADataSink* xaSnk - XADataSink defining gst sink to create
+ * @param const XAchar *name - string for naming the gst element
+ * @return GstElement* - return newly created gst sink element
+ * Description: Create gst sink element corresponding to XA sink structure
+ */
+GstElement* XAAdaptationGst_CreateGstSink( XADataSink* xaSnk, const char *name, XAboolean *isobj )
+{
+    XAuint32 locType = 0;
+    GstElement* gstSnk = NULL;
+    XADataLocator_URI* uri = NULL;
+    DEBUG_API("->XAAdaptationGst_CreateGstSink");
+    if(!xaSnk || !xaSnk->pLocator)
+    {
+        DEBUG_INFO("Warning! No sink specified, use fakesink");
+        gstSnk = gst_element_factory_make("fakesink",name);
+        if(!gstSnk)
+        {
+            DEBUG_ERR("Cannot create sink!");
+            return NULL;
+        }
+        g_object_set( G_OBJECT(gstSnk),"async", FALSE, NULL);
+    }
+    else
+    {
+        locType = *((XAuint32*)(xaSnk->pLocator));
+        switch ( locType )
+        {
+            case XA_DATALOCATOR_URI:
+                DEBUG_INFO("XA_DATALOCATOR_URI");
+                uri = (XADataLocator_URI*)xaSnk->pLocator;
+                gstSnk = gst_element_factory_make("filesink",name);
+                if(!gstSnk)
+                {
+                    DEBUG_ERR("Cannot create sink!");
+                    return NULL;
+                }
+                if ( uri->URI != NULL )
+                {
+                    XAchar *fname;
+                    DEBUG_INFO_A1("URI: %s", uri->URI);
+                    if(strncmp((char *)uri->URI, "file:///", 8) == 0)
+                    {
+                        fname = &((uri->URI)[8]);
+                    }
+                    else
+                    {
+                        fname = uri->URI;
+                    }
+                    DEBUG_INFO_A1("->filesystem path %s", fname);
+                    g_object_set( G_OBJECT(gstSnk),"location", fname,
+                                                   "async", FALSE,
+                                                   "qos", FALSE,
+                                                   "max-lateness", (gint64)(-1),
+                                                   NULL);
+                }
+                else
+                {
+                    DEBUG_ERR("No recording output uri specified.");
+                    return NULL;
+                }
+                break;
+            case XA_DATALOCATOR_NATIVEDISPLAY:
+                DEBUG_INFO("Sink locator type - XA_DATALOCATOR_NATIVEDISPLAY");
+#ifdef USE_NGA_SURFACES
+                gstSnk = gst_element_factory_make("devvideosink","devvideosink");
+#else
+                gstSnk = gst_element_factory_make("ximagesink",name);
+#endif /*USE_NGA_SURFACES*/
+                if(!gstSnk)
+                {
+                    DEBUG_ERR("Cannot create sink!");
+                    return NULL;
+                }
+                g_object_set( G_OBJECT(gstSnk), "force-aspect-ratio", TRUE,
+												"async", FALSE,
+                                               "qos", FALSE,
+												"handle-events", TRUE,
+												"handle-expose", TRUE,
+                                               "max-lateness", (gint64)(-1),
+                                               NULL);
+                break;
+            case XA_DATALOCATOR_OUTPUTMIX:
+                DEBUG_INFO("Sink locator type - XA_DATALOCATOR_OUTPUTMIX");
+                {
+                    /* Get OutputMix adaptation from data locator */
+                    XADataLocator_OutputMix* omix = (XADataLocator_OutputMix*)(xaSnk->pLocator);
+                    if ( omix->outputMix )
+                    {
+                        XAOMixImpl* omixDevice = (XAOMixImpl*)(*omix->outputMix);
+
+                        if(omixDevice)
+                        {
+                            /*TODO we had to remove this line below since adaptationCtx
+                             * was  not a member of structure*/
+                        
+                            /*gstSnk = XAOutputMixAdapt_GetSink(omixDevice->adaptationCtx);*/
+                            if(!gstSnk)
+                            {
+                                DEBUG_ERR("Cannot create sink!");
+                                return NULL;
+                            }
+                            *isobj = XA_BOOLEAN_TRUE;
+                        }
+                        else
+                        {
+                            DEBUG_ERR("Warning - NULL outputmix object - default audio output used");
+                            gstSnk = gst_element_factory_make("alsasink",name);
+                        }
+                    }
+                    else
+                    {
+                        DEBUG_ERR("Warning - NULL outputmix object - default audio output used");
+                        gstSnk = gst_element_factory_make("alsasink",name);
+                    }
+
+                }
+                break;
+/*		 	case XA_DATALOCATOR_CONTENTPIPE:
+				DEBUG_INFO("XA_DATALOCATOR_CONTENTPIPE");
+				gstSnk = gst_element_factory_make("appsink",name);
+				break;*/
+            case XA_DATALOCATOR_ADDRESS:
+                {
+                    gstSnk = gst_element_factory_make("appsink", name);
+                    /* Not actually object sink, but attribute used to notify recorder
+                     * about appsink (no object sinks applicable in this use case)
+                     **/
+                    *isobj=TRUE;
+                }
+                break;
+            case XA_DATALOCATOR_IODEVICE:
+                /* when only valid IOdevice sinks vibra and LED sinks implemented
+                 * at adaptation level, add handling here (in this implementation,
+                 * no handling needed as only dummy implementations for those)
+                 **/
+            default:
+                DEBUG_ERR("Incorrect data locator for sink.")
+                break;
+        }
+    }
+    if (gstSnk )
+    {
+        DEBUG_INFO_A1("Created gstreamer sink element at %x", gstSnk);
+    }
+    DEBUG_API("<-XAAdaptationGst_CreateGstSink");
+    return gstSnk;
+}
+
+/**
+ * GstElement* XAAdaptationGst_CreateVideoPP( )
+ * @return GstElement* - return newly created gst pipeline element
+ * Description: Create video processing pipeline
+ */
+GstElement* XAAdaptationGst_CreateVideoPP( )
+{
+    GstElement *vpp;
+    DEBUG_API("->XAAdaptationGst_CreateVideoPP");
+    vpp = gst_pipeline_new("videopp");
+    if( vpp )
+    {
+        GstPad *ghostsink, *ghostsrc;
+        GstElement 	*col1,
+					*col2,
+					*rotate,
+					*mirror,
+					*box,
+					*crop,
+					*gamma,
+					*balance,
+					*scale,
+					*scale2,
+#ifdef USE_NGA_SURFACES
+					*identity,
+#endif /*USE_NGA_SURFACES*/
+					*queue;
+
+
+        /* Crete ffmpegcolorspace to convert stream to correct format */
+        col1 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp1");
+        if(col1)
+        {
+            DEBUG_INFO("Created ffmpegcolorspace element");
+            gst_bin_add(GST_BIN(vpp), col1);
+           /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(col1,"sink");
+            if(ghostsink)
+            {
+                gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",ghostsink));
+                gst_object_unref(GST_OBJECT(ghostsink));
+            }
+        }
+
+        /* create video crop, this will be sink for videoPP pipeline */
+        crop = gst_element_factory_make( "videocrop", "pp_crop");
+        if(crop)
+        {
+            DEBUG_INFO("Created crop element");
+            gst_bin_add(GST_BIN(vpp), crop);
+        }
+
+        /* create video rotate */
+        rotate = gst_element_factory_make( "videoflip", "pp_rotate");
+        if(rotate)
+        {
+            DEBUG_INFO("Created rotate element");
+            g_object_set(G_OBJECT(rotate), "method", FLIP_NONE, NULL);
+            gst_bin_add(GST_BIN(vpp), rotate);
+        }
+
+        /* create video mirror */
+        mirror = gst_element_factory_make( "videoflip", "pp_mirror");
+        if(mirror)
+        {
+            DEBUG_INFO("Created mirror element");
+            g_object_set(G_OBJECT(mirror), "method", FLIP_NONE, NULL);
+            gst_bin_add(GST_BIN(vpp), mirror);
+        }
+
+        /* create video box */
+        box = gst_element_factory_make( "videobox", "pp_box");
+        if(box)
+        {
+            DEBUG_INFO("Created videobox element");
+            gst_bin_add(GST_BIN(vpp), box);
+        }
+
+        /* create video balance */
+        balance = gst_element_factory_make( "videobalance", "pp_balance");
+        if(balance)
+        {
+            DEBUG_INFO("Created balance element");
+            gst_bin_add(GST_BIN(vpp), balance);
+        }
+
+        /* create video gamma */
+        gamma = gst_element_factory_make( "gamma", "pp_gamma");
+        if(gamma)
+        {
+            DEBUG_INFO("Created gamma element");
+            gst_bin_add(GST_BIN(vpp), gamma);
+        }
+
+        /* Create videoscale element to scale postprocessed output to correct size */
+        scale = gst_element_factory_make("videoscale", "pp_scale");
+        if ( scale )
+        {
+            DEBUG_INFO("Created videoscale element");
+            gst_bin_add(GST_BIN(vpp), scale);
+        }
+        scale2 = gst_element_factory_make("videoscale", "pp_scale2");
+		if ( scale2 )
+		{
+			GstPad *pad = NULL;
+			GstCaps *caps = NULL;
+			DEBUG_INFO("Created videoscale element");
+			pad = gst_element_get_static_pad(scale2,"src");
+			caps = gst_caps_new_simple("video/x-raw-yuv",
+					 "width", G_TYPE_INT,0,
+					 "height", G_TYPE_INT,0,
+					 NULL);
+			gst_pad_set_caps(pad, caps);
+			gst_bin_add(GST_BIN(vpp), scale2);
+		}
+
+        /* create video queue */
+        queue = gst_element_factory_make( "queue", "vpp_queue");
+        if(queue)
+        {
+            DEBUG_INFO("Created queue element");
+            gst_bin_add(GST_BIN(vpp), queue);
+#ifdef USE_NGA_SURFACES
+            /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(queue,"sink");
+            if(ghostsink)
+            {
+                gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",ghostsink));
+                gst_object_unref(GST_OBJECT(ghostsink));
+            }            
+#endif /*USE_NGA_SURFACES*/
+        }
+
+
+        /* Crete ffmpegcolorspace to convert stream to correct format */
+        col2 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp2");
+        if(col2)
+        {
+            DEBUG_INFO("Created ffmpegcolorspace element");
+            gst_bin_add(GST_BIN(vpp), col2);
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(col2,"src");
+            if(ghostsrc)
+            {
+                gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",ghostsrc));
+                gst_object_unref(GST_OBJECT(ghostsrc));
+            }
+        }
+
+#ifdef USE_NGA_SURFACES
+        //shyward
+        /* create identity element */
+        identity  = gst_element_factory_make( "identity", "identity" );
+        if(identity)
+        {
+           DEBUG_INFO("Created identity element");
+           gst_bin_add(GST_BIN(vpp), identity);   
+           /* make this bin link point*/
+           ghostsrc = gst_element_get_static_pad(identity,"src");
+           if(ghostsrc)
+           {
+               gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",ghostsrc));
+               gst_object_unref(GST_OBJECT(ghostsrc));
+           }                
+        }        
+        if( !(gst_element_link_many(queue,identity,NULL)) )
+#else
+        //shyward - thins code assumes all the elements will have been created, which is not true
+        if( !(gst_element_link_many(col1,
+									scale,
+									crop,
+									rotate,
+									mirror,
+									box,
+									balance,
+									gamma,
+									queue,
+									scale2,
+#ifdef USE_NGA_SURFACES
+                					identity,
+#endif /*USE_NGA_SURFACES*/
+									col2,
+									NULL)
+									) )
+#endif /*USE_NGA_SURFACES*/
+        {
+            DEBUG_ERR("Could not link videopp elements!!");
+            gst_object_unref(vpp);
+            vpp = NULL;
+        }
+    }
+    DEBUG_API("<-XAAdaptationGst_CreateVideoPP");
+    return vpp;
+}
+
+/**
+ * GstElement* XAAdaptationGst_CreateFixedSizeRecordVideoPP( )
+ * @return GstElement* - return newly created gst pipeline element
+ * Description: Create video processing pipeline with fixed output size to TEST_VIDEO_WIDTH x TEST_VIDEO_HEIGHT
+ *              experimental implementation for changing recorder output size
+ */
+GstElement* XAAdaptationGst_CreateFixedSizeVideoPP( )
+{
+    GstElement *vpp;
+    DEBUG_API("->XAAdaptationGst_CreateFixedSizeVideoPP");
+    vpp = gst_pipeline_new("videopp");
+    if( vpp )
+    {
+        GstPad *ghostsink, *ghostsrc;
+        GstElement  *col1,
+                    *col2,
+                    *rotate,
+                    *mirror,
+                    *box,
+                    *crop,
+                    *gamma,
+                    *balance,
+                    *scale,
+                    *scale2,
+                    *filter,
+                    *queue;
+
+
+        /* Crete ffmpegcolorspace to convert stream to correct format */
+        col1 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp1");
+        if(col1)
+        {
+            DEBUG_INFO("Created ffmpegcolorspace element");
+            gst_bin_add(GST_BIN(vpp), col1);
+           /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(col1,"sink");
+            if(ghostsink)
+            {
+                gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",ghostsink));
+                gst_object_unref(GST_OBJECT(ghostsink));
+            }
+        }
+
+        /* create video crop, this will be sink for videoPP pipeline */
+        crop = gst_element_factory_make( "videocrop", "pp_crop");
+        if(crop)
+        {
+            DEBUG_INFO("Created crop element");
+            gst_bin_add(GST_BIN(vpp), crop);
+        }
+
+        /* create video rotate */
+        rotate = gst_element_factory_make( "videoflip", "pp_rotate");
+        if(rotate)
+        {
+            DEBUG_INFO("Created rotate element");
+            g_object_set(G_OBJECT(rotate), "method", FLIP_NONE, NULL);
+            gst_bin_add(GST_BIN(vpp), rotate);
+        }
+
+        /* create video mirror */
+        mirror = gst_element_factory_make( "videoflip", "pp_mirror");
+        if(mirror)
+        {
+            DEBUG_INFO("Created mirror element");
+            g_object_set(G_OBJECT(mirror), "method", FLIP_NONE, NULL);
+            gst_bin_add(GST_BIN(vpp), mirror);
+        }
+
+        /* create video box */
+        box = gst_element_factory_make( "videobox", "pp_box");
+        if(box)
+        {
+            DEBUG_INFO("Created videobox element");
+            gst_bin_add(GST_BIN(vpp), box);
+        }
+
+        /* create video balance */
+        balance = gst_element_factory_make( "videobalance", "pp_balance");
+        if(balance)
+        {
+            DEBUG_INFO("Created balance element");
+            gst_bin_add(GST_BIN(vpp), balance);
+        }
+
+        /* create video gamma */
+        gamma = gst_element_factory_make( "gamma", "pp_gamma");
+        if(gamma)
+        {
+            DEBUG_INFO("Created gamma element");
+            gst_bin_add(GST_BIN(vpp), gamma);
+        }
+
+        /* Create videoscale element to scale postprocessed output to correct size */
+        scale = gst_element_factory_make("videoscale", "pp_scale");
+        if ( scale )
+        {
+            DEBUG_INFO("Created videoscale element");
+            gst_bin_add(GST_BIN(vpp), scale);
+        }
+        scale2 = gst_element_factory_make("videoscale", "pp_scale2");
+        if ( scale2 )
+        {
+            GstPad *pad = NULL;
+            GstCaps *caps = NULL;
+            DEBUG_INFO("Created videoscale element");
+            pad = gst_element_get_static_pad(scale2,"src");
+            caps = gst_caps_new_simple("video/x-raw-yuv",
+                     "width", G_TYPE_INT,0,
+                     "height", G_TYPE_INT,0,
+                     NULL);
+            gst_pad_set_caps(pad, caps);
+            gst_bin_add(GST_BIN(vpp), scale2);
+        }
+
+        /* create capsfilter for fixed video size */
+        filter = gst_element_factory_make("capsfilter", "pp_filter");
+        if ( filter )
+        {
+
+            g_object_set( G_OBJECT(filter), "caps",
+                            gst_caps_new_simple("video/x-raw-yuv",
+                                                "width", G_TYPE_INT, TEST_VIDEO_WIDTH,
+                                                "height", G_TYPE_INT, TEST_VIDEO_HEIGHT, NULL)
+                                                ,NULL );
+            gst_bin_add(GST_BIN(vpp), filter);
+        }
+
+        /* create video queue */
+        queue = gst_element_factory_make( "queue", "vpp_queue");
+        if(queue)
+        {
+            gst_bin_add(GST_BIN(vpp), queue);
+        }
+
+
+        /* Crete ffmpegcolorspace to convert stream to correct format */
+        col2 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp2");
+        if(col2)
+        {
+            DEBUG_INFO("Created ffmpegcolorspace element");
+            gst_bin_add(GST_BIN(vpp), col2);
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(col2,"src");
+            if(ghostsrc)
+            {
+                gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",ghostsrc));
+                gst_object_unref(GST_OBJECT(ghostsrc));
+            }
+        }
+        if( !(gst_element_link_many(col1,
+                                    scale,
+                                    crop,
+                                    rotate,
+                                    mirror,
+                                    box,
+                                    balance,
+                                    gamma,
+                                    queue,
+                                    scale2,
+                                    filter,
+                                    col2,
+                                    NULL)
+                                    ) )
+        {
+            DEBUG_ERR("Could not link videopp elements!!");
+            gst_object_unref(vpp);
+            vpp = NULL;
+        }
+    }
+    DEBUG_API("<-XAAdaptationGst_CreateFixedSizeVideoPP");
+    return vpp;
+}
+
+
+
+/**
+ * GstElement* XAAdaptationGst_CreateVideoPPBlackScr( )
+ * @return GstElement* - return newly created gst pipeline element
+ * Description: Create video processing pipeline for black screen
+ */
+GstElement* XAAdaptationGst_CreateVideoPPBlackScr( )
+{
+    GstElement *vppBScr;
+    DEBUG_API("->XAAdaptationGst_CreateVideoPPBlackScr");
+    vppBScr = gst_pipeline_new("videoppBScr");
+    if( vppBScr )
+    {
+        GstPad *ghostsrc=NULL;
+        GstElement *testVideo=NULL, *scale=NULL;
+        GstElement *ffmpegcolorspace=NULL;
+
+        testVideo = gst_element_factory_make( "videotestsrc", "videotest");
+        if(testVideo)
+        {
+            DEBUG_INFO("Created videotestsrc element");
+
+            g_object_set(G_OBJECT(testVideo), "pattern", (gint)2, "num-buffers", (gint)1, NULL);
+            gst_bin_add(GST_BIN(vppBScr), testVideo);
+        }
+
+        scale = gst_element_factory_make("videoscale", "BSrc_scale");
+        if(scale)
+        {
+            DEBUG_INFO("Created videoscale element");
+            gst_bin_add(GST_BIN(vppBScr), scale);
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(scale,"src");
+            if(ghostsrc)
+            {
+                gst_element_add_pad(vppBScr, gst_ghost_pad_new("videoppBSrc_src",ghostsrc));
+                gst_object_unref(GST_OBJECT(ghostsrc));
+            }
+        }
+        ffmpegcolorspace = gst_element_factory_make("ffmpegcolorspace", "BlackScrFfmpeg");
+        gst_bin_add(GST_BIN(vppBScr), ffmpegcolorspace);
+        if( !(gst_element_link_many(testVideo, ffmpegcolorspace, scale, NULL)) )
+        {
+            DEBUG_ERR("Could not link videoppBSrc elements!!");
+            gst_object_unref(vppBScr);
+            vppBScr = NULL;
+        }
+    }
+    DEBUG_API("<-XAAdaptationGst_CreateVideoPPBlackScr");
+    return vppBScr;
+}
+
+/**
+ * GstElement* XAAdaptationGst_CreateInputSelector( )
+ * @return GstElement* - return newly created input selector
+ * Description: Create input selector to processing between black screen and video screen
+ */
+GstElement* XAAdaptationGst_CreateInputSelector( )
+{
+    GstElement *inputSelector;
+    DEBUG_API("->XAAdaptationGst_CreateInputSelector");
+    inputSelector = gst_element_factory_make("input-selector", "input-selector");
+    if( inputSelector )
+    {
+        g_object_set(G_OBJECT(inputSelector), "select-all", TRUE, NULL);
+    }
+    DEBUG_API("<-XAAdaptationGst_CreateInputSelector");
+    return inputSelector;
+}
+
+/**
+ * GstElement* XAAdaptationGst_CreateAudioPP( )
+ * @return GstElement* - return newly created gst pipeline element
+ * Description: Create video processing pipeline
+ */
+GstElement* XAAdaptationGst_CreateAudioPP( )
+{
+    GstElement *app;
+    gboolean ok = TRUE;
+    DEBUG_API("->XAAdaptationGst_CreateAudioPP");
+    app = gst_pipeline_new("audiopp");
+    if( app )
+    {
+        GstPad *ghostsink, *ghostsrc;
+        GstElement *ac,*vol,*eq,*queue,*pan, *ac2;
+
+        /* first and last elements should be audioconverts to match sink and encoder formats */
+        ac = gst_element_factory_make( "audioconvert", "pp_ac");
+        if (ac)
+        {
+            ok = gst_bin_add(GST_BIN(app), ac);
+            /* make this bin link point*/
+            if (ok)
+            {
+                ghostsink = gst_element_get_static_pad(ac,"sink");
+                ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
+                gst_object_unref(GST_OBJECT(ghostsink));
+            }
+        }
+        ac2 = gst_element_factory_make( "audioconvert", "pp_ac2");
+        if (ac2 && ok)
+        {
+            ok = gst_bin_add(GST_BIN(app), ac2);
+            /* make this bin link point*/
+            if (ok)
+            {
+                ghostsrc = gst_element_get_static_pad(ac2,"src");
+                ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
+                gst_object_unref(GST_OBJECT(ghostsrc));
+            }
+        }
+
+        vol = gst_element_factory_make( "volume", "pp_vol");
+        /* create volume controller */
+        if (vol && ok)
+        {
+            ok = gst_bin_add(GST_BIN(app), vol);
+            g_object_set( G_OBJECT(vol), "volume", (gdouble)1, NULL );
+        }
+        /* create 10-band equalizer */
+        eq = gst_element_factory_make( "equalizer-10bands", "pp_equ");
+        if (eq && ok)
+        {
+            ok = gst_bin_add(GST_BIN(app), eq);
+        }
+        /* create audio queue */
+        queue = gst_element_factory_make( "queue", "app_queue");
+        if(queue && ok)
+        {
+            ok = gst_bin_add(GST_BIN(app), queue);
+            g_object_set (G_OBJECT (queue), "max-size-buffers", 2, NULL);
+        }
+        /* create audio pan effect */
+        pan = gst_element_factory_make( "audiopanorama", "pp_pan");
+        if (pan && ok)
+        {
+            ok = gst_bin_add(GST_BIN(app), pan);
+        }
+
+        if (ac && ok)
+        {
+            if (queue)
+            {
+                ok = gst_element_link(ac, queue);
+            }
+            else if (vol)
+            {
+                ok = gst_element_link(ac, vol);
+            }
+            else if (pan)
+            {
+                ok = gst_element_link(ac, pan);
+            }
+            else if (eq)
+            {
+                ok = gst_element_link(ac, eq);
+            }
+            else if (ac2)
+            {
+                ok = gst_element_link(ac, ac2);
+            }
+        }
+        if (queue && ok)
+        {
+            if (vol)
+            {
+                ok = gst_element_link(queue, vol);
+            }
+            else if (pan)
+            {
+                ok = gst_element_link(queue, pan);
+            }
+            else if (eq)
+            {
+                ok = gst_element_link(queue, eq);
+            }
+            else if (ac2)
+            {
+                ok = gst_element_link(queue, ac2);
+            }
+        }
+        if (vol && ok)
+        {
+            if (pan)
+            {
+                ok = gst_element_link(vol, pan);
+            }
+            else if (eq)
+            {
+                ok = gst_element_link(vol, eq);
+            }
+            else if (ac2)
+            {
+                ok = gst_element_link(vol, ac2);
+            }
+        }
+        if (pan && ok)
+        {
+            if (eq)
+            {
+                ok = gst_element_link(pan, eq);
+            }
+            else if (ac2)
+            {
+                ok = gst_element_link(pan, ac2);
+            }
+        }
+        if (eq && ok)
+        {
+            if (ac2)
+            {
+                ok = gst_element_link(eq, ac2);
+            }
+        }
+        
+        if (ac)
+        {
+            // ghost sink above
+        }
+        else if (queue && ok)
+        {
+            /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(queue,"sink");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
+            gst_object_unref(GST_OBJECT(ghostsink));
+        }
+        else if (vol && ok)
+        {
+            /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(vol,"sink");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
+            gst_object_unref(GST_OBJECT(ghostsink));
+        }
+        else if (pan && ok)
+        {
+            /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(pan,"sink");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
+            gst_object_unref(GST_OBJECT(ghostsink));
+        }
+        else if (eq && ok)
+        {
+            /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(eq,"sink");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
+            gst_object_unref(GST_OBJECT(ghostsink));
+        }
+        else if (ac2 && ok)
+        {
+            /* make this bin link point*/
+            ghostsink = gst_element_get_static_pad(ac2,"sink");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
+            gst_object_unref(GST_OBJECT(ghostsink));
+        }
+        
+        if (ac2)
+        {
+            // ghost src above
+        }
+        else if (eq && ok)
+        {
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(eq,"src");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
+            gst_object_unref(GST_OBJECT(ghostsrc));
+        }
+        else if (pan && ok)
+        {
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(pan,"src");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
+            gst_object_unref(GST_OBJECT(ghostsrc));
+        }
+        else if (vol && ok)
+        {
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(vol,"src");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
+            gst_object_unref(GST_OBJECT(ghostsrc));
+        }
+        else if (queue && ok)
+        {
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(queue,"src");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
+            gst_object_unref(GST_OBJECT(ghostsrc));
+        }
+        else if (ac && ok)
+        {
+            /* make this bin link point*/
+            ghostsrc = gst_element_get_static_pad(ac,"src");
+            ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
+            gst_object_unref(GST_OBJECT(ghostsrc));
+        }
+            
+//        if( !(gst_element_link_many(ac, queue, vol, ac2, NULL)) )
+//        if( !(gst_element_link_many(ac, queue, vol, pan, eq, ac2, NULL)) )
+        if (!ok)
+        {
+            DEBUG_ERR("Could not link audiopp elements!!");
+            gst_object_unref(app);
+            app = NULL;
+        }
+    }
+
+    DEBUG_API("<-XAAdaptationGst_CreateAudioPP");
+    return app;
+}
+
+/* called when pad is actually blocking/ gets unblocked*/
+void XAAdaptationGst_PadBlockCb(GstPad *pad, gboolean blocked, gpointer user_data)
+{
+    DEBUG_API_A2("->XAAdaptationGst_PadBlockCb   pad \"%s\" of \"%s\" ",
+                        GST_OBJECT_NAME(pad),
+                        GST_OBJECT_NAME(gst_pad_get_parent_element(pad)) );
+    DEBUG_API_A1("<-XAAdaptationGst_PadBlockCb   blocked:%d",blocked);
+}
+
+/* utility to set same fields for all media types in caps */
+void XAAdaptationGst_SetAllCaps (GstCaps * caps, char *field, ...)
+{
+    GstStructure *structure;
+    va_list var_args;
+    int i;
+
+    for (i = 0; i < gst_caps_get_size (caps); i++)
+    {
+        structure = gst_caps_get_structure (caps, i);
+        va_start (var_args, field);
+        gst_structure_set_valist (structure, field, var_args);
+        va_end (var_args);
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAADAPTATIONGST_H_
+#define XAADAPTATIONGST_H_
+
+#include <pthread.h>
+#include <semaphore.h>
+#include <string.h>
+#include <unistd.h>
+#include "openmaxalwrapper.h"
+#include "xaglobals.h"
+#include <gst.h>
+#include <gstappsrc.h>
+#include <gstappsink.h>
+#include <gstappbuffer.h>
+#include "xaplatform.h"
+#include "xaadptbasectx.h"
+#include <stdlib.h>
+
+#ifdef XA_IMPL_MEASURE_GST_DELAY
+#include <time.h>
+#endif /* XA_IMPL_MEASURE_GST_DELAY */
+
+/* MACROS */
+#define FLIP_NONE               0
+#define FLIP_CLOCKWISE          1 /* Rotate clockwise 90 degrees */
+#define FLIP_ROTATE_180         2 /* Rotate 180 degrees */
+#define FLIP_COUNTERCLOCKWISE   3 /* Rotate counter-clockwise 90 degrees */
+#define FLIP_HORIZONTAL         4 /* Flip image horizontally */
+#define FLIP_VERTICAL           5 /* Flip image vertically */
+
+/* TYPEDEFS */
+typedef gboolean (*GstBusCb)( GstBus *bus, GstMessage *message, gpointer data );
+
+#define CONTENT_PIPE_BUFFER_SIZE 1000
+#define TEST_VIDEO_WIDTH     640
+#define TEST_VIDEO_HEIGHT    480
+
+/*typedef enum
+{
+    XA_AUDIO_WAVENC = 0,
+    XA_AUDIO_VORBISENC,
+    XA_AUDIO_PCM,
+    XA_NUM_OF_AUDIOENCODERS  Do not move this line 
+} XAAudioEnc;*/
+
+/*typedef enum
+{
+    XA_VIDEO_JPEGENC = 0,
+    XA_VIDEO_THEORAENC,
+    XA_NUM_OF_VIDEOENCODERS  Do not move this line 
+} XAVideoEnc;*/
+
+/*typedef enum CP_STATE
+{
+	CPStateNull =0,
+	CPStateInitialized,
+	CPStatePrerolling,
+	CPStateStarted,
+	CPStateRunning,
+	CPStatePaused,
+	CPStateStopped,
+	CPStateWaitForData,
+	CPStateEOS,
+	CPStateError
+}CP_STATE;*/
+
+/*typedef enum
+{
+    XA_IMAGE_JPEGENC = 0,
+    XA_IMAGE_RAW,
+    XA_NUM_OF_IMAGEENCODERS  Do not move this line 
+} XAImageEnc;*/
+
+
+/* STRUCTURES */
+
+/* Forward declaration of adaptation basecontext */
+typedef struct XAAdaptationGstCtx_ XAAdaptationGstCtx;
+
+/*
+ * Structure that holds all common variables for every
+ * Gst-Adaptation context structures.
+ */
+typedef struct XAAdaptationGstCtx_
+{
+    /* Common Variables for all adaptation elements */
+    XAAdaptationBaseCtx baseObj;
+
+    GstState        binWantedState;   /** requested gst-bin target state **/
+    GstElement      *bin;       /** Container for all gst elements **/
+
+    GstBus          *bus;       /** Gst-bus where gst sends messages **/
+    GMainLoop       *busloop;       /** Gst-bus listener loop **/
+    pthread_t       busloopThr;
+    GstBusCb        busCb;      /** Gst-Bus callback funtion*/
+
+    XAboolean       waitingasyncop;
+    sem_t           semAsyncWait;
+    guint           asynctimer;
+
+#ifdef XA_IMPL_MEASURE_GST_DELAY
+    clock_t     startTime;
+    clock_t     endTime;
+    double      diff;
+#endif /*XA_IMPL_MEASURE_GST_DELAY*/
+
+    XAboolean thread_launched;
+    pthread_mutex_t ds_mutex;
+    pthread_cond_t ds_condition;
+    XAboolean cond_mutx_inited;
+    /* FUNCTIONS*/
+
+} XAAdaptationGstCtx_;
+
+/* FUNCTIONS */
+/*
+ * gboolean XAAdaptationBase_GstBusCb( GstBus *bus, GstMessage *message, gpointer data );
+ * Default CallBack handler for gst-bus messages. This will be called if object specific callback is
+ * not implemented.
+ */
+ 
+XAresult XAAdaptationGst_Init( XAAdaptationGstCtx* pSelf, XAuint32 ctxId );
+XAresult XAAdaptationGst_PostInit( XAAdaptationGstCtx* ctx );
+void XAAdaptationGst_Free( XAAdaptationGstCtx* ctx );
+
+ 
+gboolean XAAdaptationGst_GstBusCb( GstBus *bus, GstMessage *message, gpointer data );
+
+XAresult XAAdaptationGst_InitGstListener(XAAdaptationGstCtx* ctx);
+void* XAAdaptationGst_LaunchGstListener(void* args);
+void XAAdaptationGst_StopGstListener(XAAdaptationGstCtx* ctx);
+
+void XAAdaptationGst_PrepareAsyncWait(XAAdaptationGstCtx* ctx);
+void XAAdaptationGst_StartAsyncWait(XAAdaptationGstCtx* ctx);
+gboolean XAAdaptationGst_CancelAsyncWait(gpointer ctx);
+void XAAdaptationGst_CompleteAsyncWait(XAAdaptationGstCtx* ctx);
+
+GstElement* XAAdaptationGst_CreateGstSource( XADataSource* xaSrc, const char *name, XAboolean *isobj, XAboolean *isPCM, XAboolean *isRawImage );
+GstElement* XAAdaptationGst_CreateGstSink( XADataSink* xaSrc, const char *name, XAboolean *isobj );
+GstElement* XAAdaptationGst_CreateVideoPP(void);
+
+GstElement* XAAdaptationGst_CreateVideoPPBlackScr(void);
+GstElement* XAAdaptationGst_CreateInputSelector(void);
+GstElement* XAAdaptationGst_CreateAudioPP(void);
+void XAAdaptationGst_PadBlockCb(GstPad *pad, gboolean blocked, gpointer user_data);
+void XAAdaptationGst_SetAllCaps (GstCaps * caps, char *field, ...);
+
+
+
+/*XAresult XAMetadataAdapt_TryWriteTags(XAAdaptationGstCtx* mCtx, GstBin* binToWriteTo);*/
+
+#endif /* XAADAPTATIONGST_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xamediarecorderadaptctx.h"
+#include "xaaudioencoderitfadaptation.h"
+#include "xaadaptationgst.h"
+//#include "XAStaticCapsAdaptation.h"
+
+/*
+ * XAresult XAAudioEncoderItfAdapt_SetEncoderSettings( XAAdaptationGstCtx *ctx,
+ *                                                     XAAudioEncoderSettings *pSettings )
+ * @param XAAdaptationGstCtx *ctx - pointer to Media Recorer adaptation contex
+ * @param XAAudioEncoderSettings *pSettings - Settings to be setted for encoder
+ * @return XAresult ret - return success value
+ * Description: Sets preferred encoder settings for pipeline.
+ */
+XAresult XAAudioEncoderItfAdapt_SetEncoderSettings( XAAdaptationBaseCtx *ctx,
+                                                    XAAudioEncoderSettings *pSettings )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+
+    DEBUG_API("->XAAudioEncoderItfAdapt_SetEncoderSettings");
+    if( !ctx || (ctx->ctxId != XAMediaRecorderAdaptation) || !pSettings )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*) ctx;
+
+    ret = XAMediaRecorderAdapt_CheckCodec(mCtx,XACAP_AUDIO,pSettings->encoderId);
+    if(ret==XA_RESULT_SUCCESS)
+    {
+        /*change of settings - pipeline must be regenerated**/
+        mCtx->encodingchanged = XA_BOOLEAN_TRUE;
+        memcpy(&mCtx->audioEncSettings, pSettings, sizeof(XAAudioEncoderSettings));
+    }
+    DEBUG_API("<-XAAudioEncoderItfAdapt_SetEncoderSettings");
+    return ret;
+}
+
+XAresult XAAudioEncoderItfAdapt_GetEncoderSettings( XAAdaptationBaseCtx *bCtx,
+                                                 XAAudioEncoderSettings *pSettings )
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("->XAAudioEncoderItfAdapt_GetEncoderSettings");
+    if( !bCtx || (bCtx->ctxId != XAMediaRecorderAdaptation) || !pSettings )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+    memcpy(pSettings, &(mCtx->audioEncSettings), sizeof(XAAudioEncoderSettings));
+    DEBUG_API("<-XAAudioEncoderItfAdapt_GetEncoderSettings");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAAUDIOENCODERITFADAPTATION_H
+#define XAAUDIOENCODERITFADAPTATION_H
+
+#include "xaadptbasectx.h"
+/* FUNCTIONS */
+XAresult XAAudioEncoderItfAdapt_SetEncoderSettings(XAAdaptationBaseCtx *ctx,
+                                                   XAAudioEncoderSettings *pSettings );
+XAresult XAAudioEncoderItfAdapt_GetEncoderSettings(XAAdaptationBaseCtx *ctx,
+                                                   XAAudioEncoderSettings *pSettings );
+
+#endif /* XAAUDIOENCODERITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,294 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include <gst.h>
+#include "xacameraadaptctx.h"
+#include "xaadaptationgst.h"
+#include <photography.h>
+//#include "XAStaticCapsAdaptation.h"
+
+
+XAboolean cameraRealized = XA_BOOLEAN_FALSE;
+XACameraAdaptationCtx_* cameraCtx = NULL;
+
+/*
+ * gboolean XACameraAdapt_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+ * MediaPlayer Gst-bus message handler (Callback)
+ */
+gboolean XACameraAdapt_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+{
+    XACameraAdaptationCtx* mCtx = (XACameraAdaptationCtx*)data;
+    XAAdaptEvent event = {XA_CAMERAITFEVENTS,XA_CAMERACBEVENT_FOCUSSTATUS,1,NULL};
+    XAuint32 status;
+
+    /* only listen to pipeline messages */
+    if(GST_MESSAGE_SRC(message)==(GstObject*)(mCtx->baseObj.bin) )
+    {
+        DEBUG_API_A2("->XACameraAdapt_GstBusCb:\"%s\" from object \"%s\"",
+                        GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+
+        if ( GST_MESSAGE_TYPE(message)== GST_MESSAGE_ASYNC_DONE )
+        {
+            /* some async sequence ended */
+            XAAdaptationGst_CompleteAsyncWait((&mCtx->baseObj));
+        }
+        else if (strncmp(GST_MESSAGE_TYPE_NAME(message), GST_PHOTOGRAPHY_AUTOFOCUS_DONE,
+                            strlen(GST_PHOTOGRAPHY_AUTOFOCUS_DONE))==0 )
+        {
+            DEBUG_INFO("Autofocus done!.")
+            status = XA_CAMERA_FOCUSMODESTATUS_REACHED;
+            event.data = &status;
+            XAAdaptationBase_SendAdaptEvents(&(mCtx->baseObj.baseObj), &event );
+        }
+        else if ( strncmp(GST_MESSAGE_TYPE_NAME(message), GST_PHOTOGRAPHY_SHAKE_RISK,
+                            strlen(GST_PHOTOGRAPHY_SHAKE_RISK)) ==0 )
+        {
+            DEBUG_INFO("Camera shake risk!")
+        }
+        DEBUG_API("<-XACameraAdapt_GstBusCb");
+    }
+    return TRUE;
+}
+
+/*
+ * XAAdaptationGstCtx* XACameraAdapt_Create()
+ * Allocates memory for Camera Adaptation Context and makes 1st phase initialization
+ * @returns XACameraAdaptationCtx* - Pointer to created context
+ */
+XAAdaptationBaseCtx* XACameraAdapt_Create(XAuint32 deviceID)
+{
+    XACameraAdaptationCtx *pSelf = (XACameraAdaptationCtx*) calloc(1, sizeof(XACameraAdaptationCtx));
+    DEBUG_API("->XACameraAdapt_Create");
+    if ( pSelf)
+    {
+        if( XAAdaptationGst_Init(&(pSelf->baseObj),XACameraAdaptation)
+                    != XA_RESULT_SUCCESS )
+        {
+            DEBUG_ERR("Failed to init base context!!!");
+            free(pSelf);
+            pSelf = NULL;
+        }
+        else
+        {
+            pSelf->deviceID = deviceID;
+            pSelf->curMirror = XA_VIDEOMIRROR_NONE;
+            pSelf->curRotation = 0;
+            pSelf->recording = XA_BOOLEAN_FALSE;
+            pSelf->playing = XA_BOOLEAN_FALSE;
+            pSelf->snapshotting = XA_BOOLEAN_FALSE;
+            cameraCtx = pSelf; /* Store global pointer */
+            DEBUG_INFO_A1("Stored global camera ponter to %x", cameraCtx);
+            cameraRealized = XA_BOOLEAN_FALSE;
+        }
+    }
+
+    DEBUG_API("<-XACameraAdapt_Create");
+    return (XAAdaptationBaseCtx*)&pSelf->baseObj;
+}
+
+/*
+ * XAresult XACameraAdapt_PostInit()
+ * 2nd phase initialization of Camera Adaptation Context
+ */
+XAresult XACameraAdapt_PostInit(XAAdaptationBaseCtx* bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    XACameraAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XACameraAdapt_PostInit");
+    if(bCtx == NULL || bCtx->ctxId != XACameraAdaptation)
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XACameraAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    ctx = (XACameraAdaptationCtx*)bCtx;
+
+    if ( !ctx )
+    {
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    XAAdaptationGst_PostInit( &(ctx->baseObj) );
+
+    ctx->baseObj.bin = gst_element_factory_make( "camerabin", "camera");
+    if ( !ctx->baseObj.bin )
+    {
+        DEBUG_ERR("Failed to create CameraBin");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    /* Create Gst bus listener. */
+    ret = XAAdaptationGst_InitGstListener(&(ctx->baseObj));
+    if( ret!=XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Bus listener creation failed!!");
+        return ret;
+    }
+    /* Add Camera specific handler */
+    if(ctx->baseObj.bus)
+    {
+        ctx->baseObj.busCb = XACameraAdapt_GstBusCb;
+        gst_bus_add_signal_watch( ctx->baseObj.bus);
+        g_signal_connect(ctx->baseObj.bus, "message::autofocus-done", G_CALLBACK(ctx->baseObj.busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::shake-risk", G_CALLBACK(ctx->baseObj.busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::async-done", G_CALLBACK(ctx->baseObj.busCb), ctx );
+    }
+    else
+    {
+        DEBUG_ERR("Failed to create message bus");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+
+    /* SET UP CAMERABIN */
+
+    /* use test video source if set, camerabin default (v4l2src) otherwise */
+#ifdef XA_USE_TEST_PLUGINS
+    if(ctx->deviceID == XA_ADAPTID_VIDEOTESTSRC || ctx->deviceID == XA_DEFAULTDEVICEID_CAMERA )
+#else
+    if(ctx->deviceID == XA_ADAPTID_VIDEOTESTSRC )
+#endif
+    {
+        g_object_set( G_OBJECT(ctx->baseObj.bin), "videosrc", gst_element_factory_make("videotestsrc", "videotestsrc"), NULL );
+    }
+
+    /* set viewfinder element to be fake for the time of preroll.. if ghost pad added now,
+     * stupid camerabin makes circular linking...
+     */
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "vfsink" ,gst_element_factory_make("fakesink", "fakevfsink"), NULL );
+
+    /* Setup camerabin to produce raw video */
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "videomux",NULL, NULL );
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "videoenc",NULL, NULL );
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "mute", TRUE, NULL );
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "async-handling", FALSE, NULL);
+	g_object_set( G_OBJECT(ctx->baseObj.bin), "mode",(gint)1, NULL);
+
+
+    /* drive camerabin to READY to create the elements inside bin */
+    gst_element_set_state( GST_ELEMENT(ctx->baseObj.bin), GST_STATE_READY);
+
+    if(ctx->deviceID == XA_ADAPTID_VIDEOTESTSRC)
+    {   /* set properties for videotestsrc */
+        GstElement *testsrc = gst_bin_get_by_name(GST_BIN(ctx->baseObj.bin), "videotestsrc");
+        g_object_set( G_OBJECT(testsrc),"is-live", TRUE, NULL);
+        g_object_set( G_OBJECT(testsrc),"do-timestamp", TRUE, NULL);
+        gst_object_unref(G_OBJECT(testsrc));
+    }
+
+    /* do some filter optimization */
+#ifdef XA_USE_TEST_PLUGINS
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "filter-caps",
+                    gst_caps_new_simple("video/x-raw-yuv",
+                                        "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'),
+                                        "framerate",GST_TYPE_FRACTION_RANGE,0,1,30,1, NULL)
+                ,NULL );
+#else
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "filter-caps",
+                    gst_caps_new_simple("video/x-raw-yuv",
+                                        "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('Y','U','Y','2'),
+                                        "framerate",GST_TYPE_FRACTION_RANGE,0,1,30,1, NULL)
+                ,NULL );
+
+#endif
+
+    /* now, unlink fake sink, create camera post processing pipeline and create ghost pad from it */
+    {
+        GstElement *fakesink = gst_bin_get_by_name(GST_BIN(ctx->baseObj.bin),"fakevfsink");
+        GstPad *fakepad = gst_element_get_static_pad(fakesink,"sink");
+        GstPad *linkedpad = gst_pad_get_peer(fakepad);
+        GstElement *linkedelement = gst_pad_get_parent_element(linkedpad);
+        GstElement * cameraPP = NULL;
+        GstElement * camfilter = NULL;
+        GstElement *tee = NULL;
+
+        /* Unlink fakesink */
+        gst_element_unlink(linkedelement,fakesink);
+        /* Create VideoPP pipeline for Camera object */
+        cameraPP = XAAdaptationGst_CreateVideoPP();
+        g_object_set( G_OBJECT(cameraPP),"name", "videopp_camera", NULL);
+        gst_bin_add( GST_BIN(ctx->baseObj.bin), cameraPP );
+        /*Link videoPP into camera bin last element */
+        if (! gst_element_link( linkedelement, cameraPP ))
+            {
+                 DEBUG_ERR("Could not link VideoPP to Camera bin!!");
+                 return XA_RESULT_INTERNAL_ERROR;
+            }
+
+        /* Add extra filter for caps negotiable after post processing*/
+        camfilter = gst_element_factory_make("capsfilter", "camfilter");
+        gst_bin_add( GST_BIN(ctx->baseObj.bin), camfilter );
+        if(! gst_element_link( cameraPP, camfilter ))
+            {
+                 DEBUG_ERR("Could not link camera bin  to camerafilter!!");
+                 return XA_RESULT_INTERNAL_ERROR;
+            }
+
+        /* Add tee element into camerabin */
+        tee = gst_element_factory_make( "tee", "CamTee");
+        gst_bin_add( GST_BIN(ctx->baseObj.bin), tee);
+        if (! gst_element_link( camfilter, tee ))
+            {
+                 DEBUG_ERR("Could not link camera filter  to tee element!!");
+                 return XA_RESULT_INTERNAL_ERROR;
+            }
+		/* Unref */
+        gst_object_unref(linkedelement);
+        gst_object_unref(linkedpad);
+        gst_object_unref(fakepad);
+        gst_bin_remove(GST_BIN(ctx->baseObj.bin),fakesink);
+        gst_object_unparent(GST_OBJECT(fakesink));
+    }
+
+    if ( ret == XA_RESULT_SUCCESS )
+    {
+    	cameraRealized = XA_BOOLEAN_TRUE;
+    }
+
+    DEBUG_API("<-XACameraAdapt_PostInit");
+    return ret;
+}
+
+/*
+ * void XACameraAdapt_Destroy(XACameraAdaptationCtx* ctx)
+ * Destroys Camera Adaptation Context
+ * @param ctx - Camera Adaptation context to be destroyed
+ */
+void XACameraAdapt_Destroy(XAAdaptationBaseCtx* bCtx)
+{
+	XACameraAdaptationCtx* ctx = NULL;
+
+	DEBUG_API("->XACameraAdapt_Destroy");
+	if(bCtx == NULL || bCtx->ctxId != XACameraAdaptation )
+	{
+		DEBUG_ERR("Invalid parameter!!");
+		DEBUG_API("<-XACameraAdapt_Destroy");
+		return;
+	}
+	ctx = (XACameraAdaptationCtx*)bCtx;
+
+    XAAdaptationGst_Free(&(ctx->baseObj));
+
+    free(ctx);
+    ctx = NULL;
+    cameraCtx = NULL;
+    cameraRealized = XA_BOOLEAN_FALSE;
+    DEBUG_API("<-XACameraAdapt_Destroy");
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XACAMERAADAPTCTX_H
+#define XACAMERAADAPTCTX_H
+
+#include "xaadaptationgst.h"
+#include <photography.h>
+/* TYPEDEFS */
+
+typedef struct XACameraAdaptationCtx_ XACameraAdaptationCtx;
+
+/*
+ * Structure for Camera specific gst-adaptation variables
+ */
+typedef struct XACameraAdaptationCtx_ {
+
+    /* Parent*/
+    XAAdaptationGstCtx_ baseObj;
+
+    /* OMX-AL Variables */
+    XAuint32        deviceID;
+    XAuint32        imageEffectID;
+    XAmillidegree   curRotation;
+    XAuint32        curMirror;
+
+    /* GST Variables */
+    GstFocusStatus focusStatus;
+
+    /* Internals */
+    XAboolean       recording;
+    XAboolean       playing;
+    XAboolean       snapshotting;
+} XACameraAdaptationCtx_;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XACameraAdapt_Create(XAuint32 deviceID);
+XAresult XACameraAdapt_PostInit(XAAdaptationBaseCtx* bCtx);
+void XACameraAdapt_Destroy(XAAdaptationBaseCtx* bCtx);
+
+#endif /* XACAMERAADAPTCTX_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xacameraitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,429 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include <photography.h>
+#include "xacameraadaptctx.h"
+#include "xacameraitfadaptation.h"
+#include "xaadaptationgst.h"
+
+
+/*
+ * XAresult XACameraItfAdapt_SetFlashMode( XAAdaptationGstCtx *bCtx, XAuint32 flashMode );
+ */
+XAresult XACameraItfAdapt_SetFlashMode( XAAdaptationGstCtx *bCtx, XAuint32 flashMode )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAAdaptEvent event = {XA_CAMERAITFEVENTS,XA_CAMERACBEVENT_FLASHREADY,0,0};
+    GstFlashMode gstFlashmode;
+
+    DEBUG_API_A1("->XACameraItfAdapt_SetFlashMode 0x%x",(int)flashMode);
+    if(!bCtx || bCtx->baseObj.ctxId != XACameraAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    switch( flashMode )
+    {
+         case XA_CAMERA_FLASHMODE_OFF:
+             gstFlashmode = GST_PHOTOGRAPHY_FLASH_MODE_OFF;
+             break;
+         case XA_CAMERA_FLASHMODE_ON:
+             gstFlashmode = GST_PHOTOGRAPHY_FLASH_MODE_ON;
+             break;
+         case XA_CAMERA_FLASHMODE_AUTO:
+             gstFlashmode = GST_PHOTOGRAPHY_FLASH_MODE_AUTO;
+             break;
+         case XA_CAMERA_FLASHMODE_REDEYEREDUCTION:
+             gstFlashmode = GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE;
+             break;
+         case XA_CAMERA_FLASHMODE_FILLIN:
+             gstFlashmode = GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN;
+             break;
+         case XA_CAMERA_FLASHMODE_TORCH:
+         case XA_CAMERA_FLASHMODE_REDEYEREDUCTION_AUTO:
+         default:
+             DEBUG_INFO("Mode not supported in GstPhotography!");
+             ret = XA_RESULT_PARAMETER_INVALID;
+             break;
+    }
+
+    if(ret == XA_RESULT_SUCCESS && GST_IS_PHOTOGRAPHY(bCtx->bin))
+    {
+        if ( !gst_photography_set_flash_mode( GST_PHOTOGRAPHY(bCtx->bin), gstFlashmode ) )
+        {
+            ret = XA_RESULT_INTERNAL_ERROR;
+        }
+    }
+    if(ret == XA_RESULT_SUCCESS)
+    {
+        /* no gst event, senc cb now */
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+
+    DEBUG_API("<-XACameraItfAdapt_SetFlashMode");
+    return ret;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetFocusMode( XAAdaptationGstCtx *bCtx, XAuint32 focusMode,
+ *                                              XAmillimeter manualSetting,
+ *                                              XAboolean macroEnabled )
+ */
+XAresult XACameraItfAdapt_SetFocusMode( XAAdaptationGstCtx *bCtx, XAuint32 focusMode,
+                                        XAmillimeter manualSetting, XAboolean macroEnabled )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAAdaptEvent event = {XA_CAMERAITFEVENTS,XA_CAMERACBEVENT_FOCUSSTATUS,1,NULL};
+    XAuint32 status;
+
+    DEBUG_API_A3("->XACameraItfAdapt_SetFocusMode - focusMode:%d, manualSetting:%d, macroEnabled:%d",
+                (int)focusMode, (int)manualSetting, (int)macroEnabled);
+    if(!bCtx || bCtx->baseObj.ctxId != XACameraAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(GST_IS_PHOTOGRAPHY(bCtx->bin))
+    {
+        if ( focusMode == XA_CAMERA_FOCUSMODE_AUTO )
+        {
+            gst_photography_set_autofocus( GST_PHOTOGRAPHY(bCtx->bin), TRUE );
+            status = XA_CAMERA_FOCUSMODESTATUS_REQUEST;
+            event.data = &status;
+        }
+        else
+        {
+            /* Only auto focus supported in GstPhotography, other modes sets auto focus off */
+            DEBUG_INFO("No support in GstPhotography");
+            gst_photography_set_autofocus( GST_PHOTOGRAPHY(bCtx->bin), FALSE );
+            status = XA_CAMERA_FOCUSMODESTATUS_OFF;
+            event.data = &status;
+            ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    }
+    else
+    {
+        status = XA_CAMERA_FOCUSMODESTATUS_OFF;
+        event.data = &status;
+    }
+
+    if(event.data)
+    {
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+
+    DEBUG_API("<-XACameraItfAdapt_SetFocusMode");
+    return ret;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetFocusRegionPattern( XAAdaptationGstCtx *bCtx,
+ *                                                  XAuint32 focusPattern,
+ *                                                  XAuint32 activePoints1,
+ *                                                  XAuint32 activePoints2 )
+ */
+XAresult XACameraItfAdapt_SetFocusRegionPattern( XAAdaptationGstCtx *bCtx, XAuint32 focusPattern,
+                                                    XAuint32 activePoints1, XAuint32 activePoints2 )
+{
+    DEBUG_API_A3("->XACameraItfAdapt_SetFocusRegionPattern - focusPattern:%d, activePoints1:%d, activePoints2:%d",
+                (int)focusPattern,(int)activePoints1,(int)activePoints2);
+    DEBUG_INFO("No support for focus region pattern in GstPhotography ");
+    DEBUG_API("<-XACameraItfAdapt_SetFocusRegionPattern");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/* XAresult XACameraItfAdapt_GetFocusRegionPositions( XAAdaptationGstCtx *bCtx, XAuint32 *pNumPositionEntries,
+ *                                                    XAFocusPointPosition *pFocusPosition )
+ */
+XAresult XACameraItfAdapt_GetFocusRegionPositions( XAAdaptationGstCtx *bCtx, XAuint32 *pNumPositionEntries,
+                                                   XAFocusPointPosition *pFocusPosition )
+{
+    DEBUG_API("->XACameraItfAdapt_GetFocusRegionPositions");
+    DEBUG_INFO("No focus region support in GstPhotography");
+    DEBUG_API("<-XACameraItfAdapt_GetFocusRegionPositions");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetMeteringMode( XAAdaptationGstCtx *bCtx, XAuint32 meteringMode )
+ */
+XAresult XACameraItfAdapt_SetMeteringMode( XAAdaptationGstCtx *bCtx, XAuint32 meteringMode )
+{
+    DEBUG_API_A1("->XACameraItfAdapt_SetMeteringMode - meteringMode:%d",(int)meteringMode);
+    DEBUG_INFO("No metering modes support in GstPhotography");
+    DEBUG_API("<-XACameraItfAdapt_SetMeteringMode");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetExposureMode( XAAdaptationGstCtx *bCtx, XAuint32 exposure, XAuint32 compensation )
+ */
+XAresult XACameraItfAdapt_SetExposureMode( XAAdaptationGstCtx *bCtx, XAuint32 exposure, XAuint32 compensation )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAAdaptEvent event = {XA_CAMERAITFEVENTS,XA_CAMERACBEVENT_EXPOSURESTATUS,1,NULL};
+    GstSceneMode expmode = GST_PHOTOGRAPHY_SCENE_MODE_AUTO;
+
+    DEBUG_API_A2("->XACameraItfAdapt_SetExposureMode - exposure:%d, compensation:%d",
+                (int)exposure, (int)compensation);
+    if(!bCtx || bCtx->baseObj.ctxId != XACameraAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    switch(exposure)
+    {
+        case XA_CAMERA_EXPOSUREMODE_AUTO:
+            expmode = GST_PHOTOGRAPHY_SCENE_MODE_AUTO;
+            break;
+        case XA_CAMERA_EXPOSUREMODE_SPORTS:
+            expmode = GST_PHOTOGRAPHY_SCENE_MODE_SPORT;
+            break;
+        case XA_CAMERA_EXPOSUREMODE_PORTRAIT:
+            expmode = GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT;
+            break;
+        case XA_CAMERA_EXPOSUREMODE_NIGHT:
+            expmode = GST_PHOTOGRAPHY_SCENE_MODE_NIGHT;
+            break;
+        default:
+            DEBUG_INFO("GstPhotography doesn't support other than manual settings");
+            ret = XA_RESULT_FEATURE_UNSUPPORTED;
+            break;
+    }
+
+    if(GST_IS_PHOTOGRAPHY(bCtx->bin)&&ret==XA_RESULT_SUCCESS)
+    {
+        if (!gst_photography_set_scene_mode( GST_PHOTOGRAPHY(bCtx->bin), expmode) )
+        {
+            ret = XA_RESULT_INTERNAL_ERROR;
+        }
+        else if (exposure == XA_CAMERA_EXPOSUREMODE_AUTO)
+        {
+            if (!gst_photography_set_ev_compensation( GST_PHOTOGRAPHY(bCtx->bin), compensation) )
+            {
+                ret = XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+    }
+    if(ret == XA_RESULT_SUCCESS)
+    {
+        event.data = &exposure;
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+
+    DEBUG_API("<-XACameraItfAdapt_SetExposureMode");
+    return ret;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetISOSensitivity( XAAdaptationGstCtx *bCtx, XAuint32 isoSensitivity, XAuint32 manualSetting )
+ */
+XAresult XACameraItfAdapt_SetISOSensitivity( XAAdaptationGstCtx *bCtx, XAuint32 isoSensitivity, XAuint32 manualSetting )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API_A2("->XACameraItfAdapt_SetISOSensitivity - isoSensitivity:%d, manualSetting:%d",
+                (int)isoSensitivity, (int)manualSetting);
+    if(!bCtx || bCtx->baseObj.ctxId != XACameraAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( isoSensitivity ==  XA_CAMERA_ISOSENSITIVITYMODE_MANUAL)
+    {
+        if(GST_IS_PHOTOGRAPHY(bCtx->bin))
+        {
+            if ( !gst_photography_set_iso_speed (GST_PHOTOGRAPHY(bCtx->bin), manualSetting ) )
+            {
+                ret = XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+    }
+    else
+    {
+        DEBUG_INFO("Iso sensitivity auto not supported in GstPhotography, stubbed value");
+        ret = XA_RESULT_SUCCESS;
+    }
+
+    DEBUG_API("<-XACameraItfAdapt_SetISOSensitivity");
+    return ret;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetAperture( XAAdaptationGstCtx *bCtx, XAuint32 aperture, XAuint32 manualSetting )
+ */
+XAresult XACameraItfAdapt_SetAperture( XAAdaptationGstCtx *bCtx, XAuint32 aperture, XAuint32 manualSetting )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API_A2("->XACameraItfAdapt_SetAperture - aperture:%d, manualSetting:%d",
+                (int)aperture, (int)manualSetting);
+    if(!bCtx || bCtx->baseObj.ctxId != XACameraAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( aperture == XA_CAMERA_APERTUREMODE_MANUAL )
+    {
+        if(GST_IS_PHOTOGRAPHY(bCtx->bin))
+        {
+            if (!gst_photography_set_aperture ( GST_PHOTOGRAPHY(bCtx->bin), manualSetting) )
+            {
+                ret = XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+    }
+    else
+    {
+        DEBUG_INFO("GstPhotography doesn't support auto aperture settings");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+    }
+
+    DEBUG_API("<-XACameraItfAdapt_SetAperture");
+    return ret;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetShutterSpeed( XAAdaptationGstCtx *bCtx, XAuint32 shutterSpeed, XAmicrosecond manualSetting )
+ */
+XAresult XACameraItfAdapt_SetShutterSpeed( XAAdaptationGstCtx *bCtx, XAuint32 shutterSpeed, XAmicrosecond manualSetting )
+{
+    DEBUG_API_A2("->XACameraItfAdapt_SetShutterSpeed - shutterSpeed:%d, manualSetting:%d",
+                (int)shutterSpeed, (int)manualSetting);
+    DEBUG_INFO("Shutter speed setting not supported in GstPhotography");
+    DEBUG_API("<-XACameraItfAdapt_SetShutterSpeed");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetWhiteBalance( XAAdaptationGstCtx *bCtx, XAuint32 whiteBalance, XAuint32 manualSetting )
+ */
+XAresult XACameraItfAdapt_SetWhiteBalance( XAAdaptationGstCtx *bCtx, XAuint32 whiteBalance, XAuint32 manualSetting )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    GstWhiteBalanceMode gstWbMode = GST_PHOTOGRAPHY_WB_MODE_AUTO;
+
+    DEBUG_API_A2("->XACameraItfAdapt_SetWhiteBalance - whiteBalance:%d, manualSetting:%d",
+                (int)whiteBalance, (int)manualSetting);
+    if(!bCtx || bCtx->baseObj.ctxId != XACameraAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    switch ( whiteBalance )
+    {
+    case XA_CAMERA_WHITEBALANCEMODE_AUTO:
+        gstWbMode = GST_PHOTOGRAPHY_WB_MODE_AUTO;
+        break;
+    case XA_CAMERA_WHITEBALANCEMODE_SUNLIGHT:
+        gstWbMode = GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT;
+        break;
+    case XA_CAMERA_WHITEBALANCEMODE_CLOUDY:
+        gstWbMode = GST_PHOTOGRAPHY_WB_MODE_CLOUDY;
+        break;
+    case XA_CAMERA_WHITEBALANCEMODE_TUNGSTEN:
+        gstWbMode = GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN;
+        break;
+    case XA_CAMERA_WHITEBALANCEMODE_FLUORESCENT:
+        gstWbMode = GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT;
+        break;
+    case XA_CAMERA_WHITEBALANCEMODE_SUNSET:
+        gstWbMode = GST_PHOTOGRAPHY_WB_MODE_SUNSET;
+        break;
+    case XA_CAMERA_WHITEBALANCEMODE_INCANDESCENT:
+    case XA_CAMERA_WHITEBALANCEMODE_FLASH:
+    case XA_CAMERA_WHITEBALANCEMODE_MANUAL:
+    case XA_CAMERA_WHITEBALANCEMODE_SHADE:
+        DEBUG_INFO("Wanted white balance mode not supported!");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+        break;
+    default:
+        break;
+    }
+
+    if(ret == XA_RESULT_SUCCESS && GST_IS_PHOTOGRAPHY(bCtx->bin))
+    {
+        if ( !gst_photography_set_white_balance_mode( GST_PHOTOGRAPHY(bCtx->bin), gstWbMode ) )
+        {
+            ret = XA_RESULT_INTERNAL_ERROR;
+        }
+    }
+
+    DEBUG_API("<-XACameraItfAdapt_SetWhiteBalance");
+    return ret;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetAutoLocks( XAAdaptationGstCtx *bCtx, XAuint32 locks )
+ */
+XAresult XACameraItfAdapt_SetAutoLocks( XAAdaptationGstCtx *bCtx, XAuint32 locks )
+{
+    DEBUG_API_A1("->XACameraItfAdapt_SetAutoLocks - locks:%d", (int)locks);
+    DEBUG_INFO("No autolocks support in GstPhotography")
+    DEBUG_API("<-XACameraItfAdapt_SetAutoLocks");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XACameraItfAdapt_SetZoom( XAAdaptationGstCtx *bCtx, XAuint32 zoom, XAboolean digitalEnabled, XAuint32 speed, XAboolean async )
+ */
+XAresult XACameraItfAdapt_SetZoom( XAAdaptationGstCtx *bCtx, XAuint32 zoom, XAboolean digitalEnabled, XAuint32 speed, XAboolean async )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAAdaptEvent event = {XA_CAMERAITFEVENTS,XA_CAMERACBEVENT_ZOOMSTATUS,1,NULL};
+    gint gstZoom;
+
+    DEBUG_API_A4("->XACameraItfAdapt_SetZoom - zoom:%d,digitalEnabled:%d,speed:%d,async:%d ",
+                    (int)zoom,(int)digitalEnabled,(int)speed,(int)async);
+    if(!bCtx || bCtx->baseObj.ctxId != XACameraAdaptation || zoom < 1 )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( zoom > 10 )
+    {
+        gstZoom = MAX_ZOOM;
+    }
+    else
+    {
+        /* Gst Zoom range 100 - 1000, 100 = 1x, 200 = 2x, ...*/
+        gstZoom = zoom * 100;
+    }
+    if(GST_IS_PHOTOGRAPHY(bCtx->bin))
+    {
+        if ( !gst_photography_set_zoom( GST_PHOTOGRAPHY(bCtx->bin), gstZoom ) )
+        {
+            ret = XA_RESULT_INTERNAL_ERROR;
+        }
+    }
+    if( ret == XA_RESULT_SUCCESS && async )
+    {
+        /* no gst event, send cb now*/
+        event.data = &zoom;
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+
+    DEBUG_API("<-XACameraItfAdapt_SetZoom");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xacameraitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XACAMERAITFADAPTATION_H_
+#define XACAMERAITFADAPTATION_H_
+
+#include "xaadaptationgst.h"
+
+#define MAX_ZOOM 1000;
+
+/* FUNCTIONS */
+
+XAresult XACameraItfAdapt_SetFlashMode( XAAdaptationGstCtx *bCtx, XAuint32 flashMode );
+XAresult XACameraItfAdapt_SetFocusMode( XAAdaptationGstCtx *bCtx, XAuint32 focusMode, XAmillimeter manualSetting, XAboolean macroEnabled );
+XAresult XACameraItfAdapt_SetFocusRegionPattern( XAAdaptationGstCtx *bCtx, XAuint32 focusPattern, XAuint32 activePoints1, XAuint32 activePoints2 );
+XAresult XACameraItfAdapt_GetFocusRegionPositions( XAAdaptationGstCtx *bCtx, XAuint32 *pNumPositionEntries, XAFocusPointPosition *pFocusPosition );
+XAresult XACameraItfAdapt_SetMeteringMode( XAAdaptationGstCtx *bCtx, XAuint32 meteringMode );
+XAresult XACameraItfAdapt_SetExposureMode( XAAdaptationGstCtx *bCtx, XAuint32 exposure, XAuint32 compensation );
+XAresult XACameraItfAdapt_SetISOSensitivity( XAAdaptationGstCtx *bCtx, XAuint32 isoSensitivity, XAuint32 manualSetting );
+XAresult XACameraItfAdapt_SetAperture( XAAdaptationGstCtx *bCtx, XAuint32 aperture, XAuint32 manualSetting );
+XAresult XACameraItfAdapt_SetShutterSpeed( XAAdaptationGstCtx *bCtx, XAuint32 shutterSpeed, XAmicrosecond manualSetting );
+XAresult XACameraItfAdapt_SetWhiteBalance( XAAdaptationGstCtx *bCtx, XAuint32 whiteBalance, XAuint32 manualSetting );
+XAresult XACameraItfAdapt_SetAutoLocks( XAAdaptationGstCtx *bCtx, XAuint32 locks );
+XAresult XACameraItfAdapt_SetZoom( XAAdaptationGstCtx *bCtx, XAuint32 zoom, XAboolean digitalEnabled, XAuint32 speed, XAboolean async );
+
+#endif /* XACAMERAITFADAPTATION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xadevicevolumeitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,144 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include <mixer.h>
+#include "xadevicevolumeitfadaptation.h"
+#include "xaengineadaptctx.h"
+#include "xaadaptationgst.h"
+//#include "XAStaticCapsAdaptation.h"
+
+
+/* XAresult XADeviceVolumeItfAdapt_SetVolume
+ * Description: Sets the device's volume.
+ */
+XAresult XADeviceVolumeItfAdapt_SetVolume(XAAdaptationGstCtx *bCtx, XAuint32 deviceID, XAint32 volume)
+{
+    XAEngineAdaptationCtx* ctx = NULL;
+    GstElement* amixer = NULL;
+    GstMixerTrack *mixerTrack = NULL;
+    const GList *gList = NULL;
+    gint volumeIdx = 0;
+
+    DEBUG_API("->XADeviceVolumeItfAdapt_SetVolume");
+
+    if(!bCtx )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XADeviceVolumeItfAdapt_SetVolume");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ctx = (XAEngineAdaptationCtx*) bCtx;
+
+    amixer = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "alsamixer");
+    if( !amixer )
+    {
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XADeviceVolumeItfAdapt_SetVolume");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    gList = gst_mixer_list_tracks( GST_MIXER(amixer) );
+    if( !gList )
+    {
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XADeviceVolumeItfAdapt_SetVolume");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    while( gList )
+    {
+        mixerTrack = (GstMixerTrack*)gList->data;
+        if( !mixerTrack )
+        {
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            DEBUG_API("<-XADeviceVolumeItfAdapt_SetVolume");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        if( ((mixerTrack->flags & GST_MIXER_TRACK_INPUT ) && deviceID == XA_DEFAULTDEVICEID_AUDIOINPUT) ||
+//            ((mixerTrack->flags & GST_MIXER_TRACK_INPUT ) && deviceID == XA_ADAPTID_ALSASRC) || //krishna
+                ((mixerTrack->flags & GST_MIXER_TRACK_INPUT ) && deviceID == XA_ADAPTID_DEVSOUNDSRC) ||
+            ((mixerTrack->flags & GST_MIXER_TRACK_INPUT ) && deviceID == XA_ADAPTID_AUDIOTESTSRC) ||
+            ((mixerTrack->flags & GST_MIXER_TRACK_OUTPUT ) && deviceID == XA_DEFAULTDEVICEID_AUDIOOUTPUT) ||
+            ((mixerTrack->flags & GST_MIXER_TRACK_OUTPUT ) && deviceID == XA_ADAPTID_JACKSINK) ||
+//            ((mixerTrack->flags & GST_MIXER_TRACK_OUTPUT ) && deviceID == XA_ADAPTID_ALSASINK) )
+            ((mixerTrack->flags & GST_MIXER_TRACK_OUTPUT ) && deviceID == XA_ADAPTID_DEVSOUNDSINK) )
+        {
+            gint *gVolume = (gint*) calloc(mixerTrack->num_channels, sizeof(gint) );
+            if( !gVolume )
+            {
+                DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
+                DEBUG_API("<-XADeviceVolumeItfAdapt_SetVolume");
+                return XA_RESULT_MEMORY_FAILURE;
+            }
+
+            for( volumeIdx = 0; volumeIdx < mixerTrack->num_channels; volumeIdx++ )
+            {
+                /* Set same volume level for all channels */
+                gVolume[volumeIdx] = (gint)volume;
+            }
+
+            /* found master track */
+            gst_mixer_set_volume( GST_MIXER(amixer), mixerTrack, gVolume );
+            free( gVolume );
+            gVolume = NULL;
+            break;
+        }
+        gList = g_list_next(gList);
+    }
+    if ( amixer )
+    {
+        gst_object_unref( GST_OBJECT(amixer));
+    }
+
+    DEBUG_API("<-XADeviceVolumeItfAdapt_SetVolume");
+    return XA_RESULT_SUCCESS;
+}
+
+/* XAresult XADeviceVolumeItfAdapt_IsDeviceIDSupported
+ * Description: Check is request device ID supported.
+ */
+XAresult XADeviceVolumeItfAdapt_IsDeviceIDSupported(XAAdaptationGstCtx *bCtx, XAuint32 deviceID, XAboolean *isSupported)
+{
+    DEBUG_API("->XADeviceVolumeItfAdapt_IsDeviceIDSupported");
+
+    if(!bCtx || !isSupported )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XADeviceVolumeItfAdapt_IsDeviceIDSupported");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* check is device ID supported or not supported */
+//    if( deviceID == XA_DEFAULTDEVICEID_AUDIOINPUT || deviceID == XA_ADAPTID_ALSASRC ||
+    if( deviceID == XA_DEFAULTDEVICEID_AUDIOINPUT || deviceID == XA_ADAPTID_DEVSOUNDSRC ||
+        deviceID == XA_ADAPTID_AUDIOTESTSRC || deviceID == XA_DEFAULTDEVICEID_AUDIOOUTPUT ||
+//        deviceID == XA_ADAPTID_JACKSINK || deviceID == XA_ADAPTID_ALSASINK )
+        deviceID == XA_ADAPTID_JACKSINK || deviceID == XA_ADAPTID_DEVSOUNDSINK )
+    {
+        *isSupported = XA_BOOLEAN_TRUE;
+    }
+    else
+    {
+        *isSupported = XA_BOOLEAN_FALSE;
+    }
+
+    DEBUG_API("<-XADeviceVolumeItfAdapt_IsDeviceIDSupported");
+    return XA_RESULT_SUCCESS;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xadevicevolumeitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XADEVICEVOLUMEITFADAPTATION_H_
+#define XADEVICEVOLUMEITFADAPTATION_H_
+
+#include "xaadaptationgst.h"
+
+
+/* FUNCTIONS */
+XAresult XADeviceVolumeItfAdapt_SetVolume( XAAdaptationGstCtx *bCtx, XAuint32 deviceID, XAint32 volume);
+XAresult XADeviceVolumeItfAdapt_IsDeviceIDSupported(XAAdaptationGstCtx *bCtx, XAuint32 deviceID, XAboolean *isSupported);
+#endif /* XADEVICEVOLUMEITFADAPTATION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xadynamicsourceitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xadynamicsourceitfadaptation.h"
+
+/*
+ * XAresult XADynamicSourceItfAdapt_SetSource(XAAdaptationGstCtx *bCtx, XADataSource *pDataSource)
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value
+ * @param XADataSource *pDataSource - new data source
+ * @return XAresult ret - Success value
+ */
+XAresult XADynamicSourceItfAdapt_SetSource(XAAdaptationGstCtx *bCtx, XADataSource *pDataSource)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XADynamicSourceItfAdapt_SetSource");
+    if( !bCtx || !pDataSource || !pDataSource->pLocator )
+    {
+        DEBUG_ERR("Invalid NULL parameter");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    else if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation || bCtx->baseObj.ctxId == XAMDAdaptation )
+    {
+        XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+        GstStateChangeReturn gret;
+        GstState origState;
+        GstElement* newSource = XAAdaptationGst_CreateGstSource( pDataSource, "datasrc", &(mCtx->isobjsrc), NULL, NULL);
+        if(!newSource)
+        {
+            DEBUG_ERR("Could not create data source!!!");
+            return XA_RESULT_CONTENT_NOT_FOUND;
+        }
+        DEBUG_INFO("Changing Playback Source");
+        /* store current state */
+        origState = GST_STATE(bCtx->bin);
+        /* unroll pipeline */
+        bCtx->binWantedState = GST_STATE_NULL;
+        XAAdaptationGst_PrepareAsyncWait(bCtx);
+        gret = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+        if( gret == GST_STATE_CHANGE_ASYNC )
+        {
+            DEBUG_INFO("Wait for unroll");
+            XAAdaptationGst_StartAsyncWait(bCtx);
+            DEBUG_INFO("Unroll ready");
+        }
+        else if( gret == GST_STATE_CHANGE_FAILURE )
+        {   /*not much we can do*/
+             DEBUG_ERR("WARNING: Failed to unroll pipeline!!")
+             return XA_RESULT_INTERNAL_ERROR;
+        }
+        bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+
+        /* set new source */
+        gst_element_unlink(mCtx->source,mCtx->codecbin);
+        gst_bin_remove(GST_BIN(bCtx->bin), mCtx->source);
+        mCtx->source = newSource;
+        gst_bin_add(GST_BIN(bCtx->bin), mCtx->source);
+        if(! gst_element_link(mCtx->source, mCtx->codecbin))
+            {
+                DEBUG_ERR("Could not link source to codecbin!!");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+        mCtx->xaSource = pDataSource;
+
+        /* restore pipeline state */
+        bCtx->binWantedState = origState;
+        DEBUG_INFO_A1("Changing pipeline back to state %s",gst_element_state_get_name(origState));
+        XAAdaptationGst_PrepareAsyncWait(bCtx);
+        gret = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+        if( gret == GST_STATE_CHANGE_ASYNC )
+        {
+            DEBUG_INFO("Wait for state change");
+            XAAdaptationGst_StartAsyncWait(bCtx);
+        }
+        else if( gret == GST_STATE_CHANGE_FAILURE )
+        {
+            DEBUG_ERR("State change FAILED");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+        DEBUG_INFO_A1("Pipeline in state %s",gst_element_state_get_name(GST_STATE(bCtx->bin)));
+
+        if( GST_STATE(bCtx->bin) > GST_STATE_READY )
+        {   /* let (possible) extraction itf to know new tags  */
+            XAAdaptEvent event = {XA_METADATAEVENTS, XA_ADAPT_MDE_TAGS_AVAILABLE, 0, NULL };
+            XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+        }
+    }
+    DEBUG_API("<-XADynamicSourceItfAdapt_SetSource");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xadynamicsourceitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XADYNAMICSOURCEITFADAPTATION_H
+#define XADYNAMICSOURCEITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+
+/* FUNCTIONS */
+
+XAresult XADynamicSourceItfAdapt_SetSource(XAAdaptationGstCtx *bCtx, XADataSource *pDataSource);
+
+#endif /* XADYNAMICSOURCEITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaengineadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,178 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include <gst.h>
+#include "xaengineadaptctx.h"
+#include "xaadaptationgst.h"
+
+/*
+ * gboolean XAEngineAdapt_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+ * MediaPlayer Gst-bus message handler (Callback)
+ */
+gboolean XAEngineAdapt_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+{
+    XAEngineAdaptationCtx* mCtx = (XAEngineAdaptationCtx*)data;
+    DEBUG_API("->XAEngineAdapt_GstBusCb");
+
+    /* only listen to pipeline messages */
+    if(GST_MESSAGE_SRC(message)==(GstObject*)(mCtx->baseObj.bin) )
+    {
+        DEBUG_API_A2("->XAEngineAdapt_GstBusCb:\"%s\" from object \"%s\"",
+                        GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+    }
+
+    DEBUG_API("<-XAEngineAdapt_GstBusCb");
+    return TRUE;
+}
+
+/*
+ * XAAdaptationGstCtx* XAEngineAdapt_Create()
+ * Allocates memory for Engine Adaptation Context and makes 1st phase initialization
+ * @returns XAEngineAdaptationCtx* - Pointer to created context
+ */
+XAAdaptationGstCtx* XAEngineAdapt_Create()
+{
+    XAEngineAdaptationCtx *pSelf = NULL;
+    DEBUG_API("->XAEngineAdapt_Create");
+
+    pSelf = (XAEngineAdaptationCtx*)calloc(1, sizeof(XAEngineAdaptationCtx));
+    if ( pSelf)
+    {
+        if( XAAdaptationBase_Init(&(pSelf->baseObj.baseObj),XAEngineAdaptation)
+                    != XA_RESULT_SUCCESS )
+            {
+                DEBUG_ERR("Failed to init base context!!!");
+                free(pSelf);
+                pSelf = NULL;
+            }
+            else
+            {
+                /* Init internal variables */
+            }
+    }
+
+    DEBUG_API("<-XAEngineAdapt_Create");
+    return (XAAdaptationGstCtx*)pSelf;
+}
+
+/*
+ * XAresult XAEngineAdapt_PostInit()
+ * 2nd phase initialization of engine Adaptation Context
+ */
+XAresult XAEngineAdapt_PostInit(XAAdaptationGstCtx* bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    GstStateChangeReturn gret = GST_STATE_CHANGE_SUCCESS;
+    XAEngineAdaptationCtx* ctx = NULL;
+
+    DEBUG_API("->XAEngineAdapt_PostInit");
+    if( !bCtx || bCtx->baseObj.ctxId != XAEngineAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAEngineAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    ctx = (XAEngineAdaptationCtx*)bCtx;
+
+    if ( !ctx )
+    {
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XAEngineAdapt_PostInit");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    XAAdaptationBase_PostInit( &(ctx->baseObj.baseObj) );
+
+    ctx->baseObj.bin = gst_pipeline_new("engine");
+   // gst_bin_add(GST_BIN(ctx->baseObj.bin), gst_element_factory_make( "alsamixer", "alsamixer"));
+
+    if ( !ctx->baseObj.bin )
+    {
+        DEBUG_ERR("Failed to create alsamixer");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XAEngineAdapt_PostInit");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    /* Create Gst bus listener. */
+    ret = XAAdaptationGst_InitGstListener(&(ctx->baseObj));
+    if( ret!=XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR_A1("Bus listener creation failed!! - (%d)", ret);
+        DEBUG_API("<-XAEngineAdapt_PostInit");
+        return ret;
+    }
+
+    /* Add Engine specific handler */
+    if(ctx->baseObj.bus)
+    {
+        ctx->baseObj.busCb = XAEngineAdapt_GstBusCb;
+    }
+    else
+    {
+        DEBUG_ERR("Failed to create message bus");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XAEngineAdapt_PostInit");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    /* roll up bin */
+    ctx->baseObj.binWantedState = GST_STATE_PAUSED;
+    XAAdaptationGst_PrepareAsyncWait(&(ctx->baseObj));
+    gret = gst_element_set_state( GST_ELEMENT(ctx->baseObj.bin), ctx->baseObj.binWantedState);
+    if( gret == GST_STATE_CHANGE_ASYNC )
+    {
+        DEBUG_INFO("Wait for preroll");
+        XAAdaptationGst_StartAsyncWait(&(ctx->baseObj));
+        DEBUG_INFO("Preroll ready");
+    }
+    ctx->baseObj.waitingasyncop = XA_BOOLEAN_FALSE;
+
+    //ret = XAStaticCapsAdapt_InitCaps();
+
+    DEBUG_API("<-XAEngineAdapt_PostInit");
+    return ret;
+}
+
+/*
+ * void XAEngineAdapt_Destroy(XAEngineAdaptationCtx* ctx)
+ * Destroys Engine Adaptation Context
+ * @param ctx - Engine Adaptation context to be destroyed
+ */
+void XAEngineAdapt_Destroy(XAAdaptationGstCtx* bCtx)
+{
+	XAEngineAdaptationCtx* ctx = NULL;
+
+	DEBUG_API("->XAEngineAdapt_Destroy");
+	if( !bCtx || bCtx->baseObj.ctxId != XAEngineAdaptation )
+	{
+		DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+		DEBUG_API("<-XAEngineAdapt_Destroy");
+		return;
+	}
+	ctx = (XAEngineAdaptationCtx*)bCtx;
+
+    XAAdaptationBase_Free(&(ctx->baseObj.baseObj));
+
+/*    gst_deinit(); */
+
+    free(ctx);
+    ctx = NULL;
+
+    DEBUG_API("<-XAEngineAdapt_Destroy");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaengineadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAENGINEADAPTCTX_H_
+#define XAENGINEADAPTCTX_H_
+
+#include "xaadaptationgst.h"
+//#include "XAStaticCapsAdaptation.h"
+
+/* TYPEDEFS */
+
+typedef struct XAEngineAdaptationCtx_ XAEngineAdaptationCtx;
+
+typedef struct XAEngineAdaptationCtx_
+{
+    /* Parent*/
+    XAAdaptationGstCtx_    baseObj;
+
+} XAEngineAdaptationCtx_;
+
+/* FUNCTIONS */
+XAAdaptationGstCtx* XAEngineAdapt_Create(void);
+XAresult XAEngineAdapt_PostInit(XAAdaptationGstCtx* bCtx);
+void XAEngineAdapt_Destroy(XAAdaptationGstCtx* bCtx);
+
+#endif /* XAENGINEADAPTCTX_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaequalizeritfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xamediarecorderadaptctx.h"
+#include "xaoutputmixadaptctx.h"
+#include "xaequalizeritfadaptation.h"
+//#include "XAStaticCapsAdaptation.h"
+
+static const XAmilliHertz centerFrequencies[EQUALIZER_NUM_OF_BANDS] = {
+        29000, 59000, 119000, 227000, 474000,
+        947000, 1889000, 3770000, 7523000, 15011000 };
+
+static const char* band_names[EQUALIZER_NUM_OF_BANDS] = {
+        "band0", "band1", "band2", "band3", "band4",
+        "band5", "band6", "band7", "band8", "band9" };
+
+/*static const XAmilliHertz bandFreqRangeMin = 0;
+static const XAmilliHertz bandFreqRangeMax = 0;*/
+static const XAmillibel bandLevelRangeMin = -2400;
+static const XAmillibel bandLevelRangeMax = 1200;
+
+
+/*
+ * XAresult XAEqualizerItfAdapt_GetBandLevelRange(XAAdaptationGstCtx *bCtx,
+ *                                                XAmillibel *pMin,
+ *                                                XAmillibel *pMax)
+ */
+XAresult XAEqualizerItfAdapt_GetBandLevelRange(XAAdaptationGstCtx *bCtx,
+                                               XAmillibel *pMin,
+                                               XAmillibel *pMax)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAEqualizerItfAdapt_GetBandLevelRange");
+
+    if( (!pMin && !pMax) ) /* other may be NULL */
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if (pMin)
+    {
+        *pMin = bandLevelRangeMin;
+    }
+    if (pMax)
+    {
+        *pMax = bandLevelRangeMax;
+    }
+
+    DEBUG_API("<-XAEqualizerItfAdapt_GetBandLevelRange");
+    return ret;
+}
+
+/*
+ * XAresult XAEqualizerItfAdapt_SetBandLevel(XAAdaptationGstCtx *bCtx,
+ *                                           XAuint16 band,
+ *                                           XAmillibel level)
+ */
+XAresult XAEqualizerItfAdapt_SetBandLevel(XAAdaptationGstCtx *bCtx,
+                                          XAuint16 band,
+                                          XAmillibel level)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    GstElement *equ=NULL, *audiopp=NULL;
+    DEBUG_API("->XAEqualizerItfAdapt_SetBandLevel");
+
+    if(!bCtx ||
+        band >= EQUALIZER_NUM_OF_BANDS  ||
+        level < bandLevelRangeMin ||
+        level > bandLevelRangeMax)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    else
+    {
+        if( bCtx->baseObj.ctxId == XAMediaPlayerAdaptation || bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+        {
+            audiopp = gst_bin_get_by_name( GST_BIN(bCtx->bin), "audiopp" );
+            equ = gst_bin_get_by_name( GST_BIN(audiopp), "pp_equ" );
+            if(equ)
+            {
+                g_object_set( G_OBJECT(equ), band_names[band], (gdouble)(level/1000), NULL );
+            }
+            else
+            {
+                DEBUG_ERR("Media object equalizer element not found!!");
+            }
+        }
+        else if( bCtx->baseObj.ctxId == XAOutputMixAdaptation )
+        {
+    	    XAOutputMixAdaptationCtx* context = (XAOutputMixAdaptationCtx*) bCtx;
+    	    guint iterator;
+    	    for ( iterator = 0; iterator < context->connectedObjects->len; iterator++ )
+            {
+                GstBin* basebin = GST_BIN(g_array_index(context->connectedObjects,XAOMixAdaptConnObj,iterator).ctx->bin);
+                equ=NULL;
+                audiopp=NULL;
+                audiopp = gst_bin_get_by_name( basebin, "audiopp" );
+                if(audiopp)
+                {
+                    equ = gst_bin_get_by_name( GST_BIN(audiopp), "pp_equ" );
+                }
+                if(equ)
+                {
+                    g_object_set( G_OBJECT(equ), band_names[band], (gdouble)(level/1000), NULL );
+                }
+                else
+                {
+                    DEBUG_ERR_A1("Could not find equalizer for player %u!!", iterator);
+                }
+            }
+        }
+        else
+        {
+            DEBUG_ERR_A1("Not supported adaptation element: %d", bCtx->baseObj.ctxId);
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+    }
+    if(equ)
+    {
+        gst_object_unref(equ);
+    }
+	if(audiopp)
+    {
+        gst_object_unref(audiopp);
+    }
+	
+    DEBUG_API("<-XAEqualizerItfAdapt_SetBandLevel");
+    return ret;
+}
+
+/*
+ * XAresult XAEqualizerItfAdapt_GetCenterFreq(XAAdaptationGstCtx *bCtx,
+ *                                            XAuint16 band,
+ *                                            XAmilliHertz *pCenter)
+ */
+
+XAresult XAEqualizerItfAdapt_GetCenterFreq(XAAdaptationGstCtx *bCtx,
+                                           XAuint16 band,
+                                           XAmilliHertz *pCenter)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAEqualizerItfAdapt_GetCenterFreq");
+
+    if(!pCenter || band >= EQUALIZER_NUM_OF_BANDS)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pCenter = centerFrequencies[band];
+
+    DEBUG_API("<-XAEqualizerItfAdapt_GetCenterFreq");
+    return ret;
+}
+
+/*
+ * XAresult XAEqualizerItfAdapt_GetBandFreqRange(XAAdaptationGstCtx *bCtx,
+ *                                               XAuint16 band,
+ *                                               XAmilliHertz *pMin,
+ *                                               XAmilliHerts *pMax)
+ */
+XAresult XAEqualizerItfAdapt_GetBandFreqRange(XAAdaptationGstCtx *bCtx,
+                                              XAuint16 band,
+                                              XAmilliHertz *pMin,
+                                              XAmilliHertz *pMax)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAEqualizerItfAdapt_GetBandFreqRange");
+
+    /* pMin or pMax may be NULL */
+    if((!pMin && !pMax)  || band >= EQUALIZER_NUM_OF_BANDS)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* in this implementation there are no ranges */
+    if (pMin)
+    {
+        *pMin = centerFrequencies[band];
+    }
+    if (pMax)
+    {
+        *pMax = centerFrequencies[band];
+    }
+
+    DEBUG_API("<-XAEqualizerItfAdapt_GetBandFreqRange");
+    return ret;
+}
+
+/*
+ * XAresult XAEqualizerItfAdapt_GetBand(XAAdaptationGstCtx *bCtx,
+ *                                      XAmilliHertz frequency,
+ *                                      XAuint16 *pBand)
+ */
+XAresult XAEqualizerItfAdapt_GetBand(XAAdaptationGstCtx *bCtx,
+                                     XAmilliHertz frequency,
+                                     XAuint16 *pBand)
+{
+    XAuint16 index=0;
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAEqualizerItfAdapt_GetBand");
+
+    if(!pBand)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pBand = XA_EQUALIZER_UNDEFINED;
+
+    /* as there are no ranges, it must match exactly */
+    for (index = 0; index < EQUALIZER_NUM_OF_BANDS; index++)
+    {
+        if (frequency == centerFrequencies[index])
+        {
+            *pBand = index;
+            break;
+        }
+    }
+
+    DEBUG_API("<-XAEqualizerItfAdapt_GetBand");
+    return ret;
+}
+
+/*
+ * XAresult XAEqualizerItfAdapt_GetDefaultBandLevel(XAAdaptationGstCtx *bCtx,
+ *                                           XAuint16 band,
+ *                                           XAmillibel *pLevel)
+ */
+XAresult XAEqualizerItfAdapt_GetDefaultBandLevel(XAAdaptationGstCtx *bCtx,
+                                                 XAuint16 band,
+                                                 XAmillibel *pLevel)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAEqualizerItfAdapt_GetDefaultBandLevel");
+
+    if(!pLevel)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    pLevel = EQUALIZER_DEFAULT_BAND_LEVEL;
+
+    DEBUG_API("<-XAEqualizerItfAdapt_GetDefaultBandLevel");
+    return ret;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaequalizeritfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAEQUALIZERITFADAPTATION_H
+#define XAEQUALIZERITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xathreadsafety.h"
+
+/* MACROS */
+#define EQUALIZER_NUM_OF_BANDS 10
+#define EQUALIZER_DEFAULT_BAND_LEVEL 0
+
+/* FUNCTIONS */
+XAresult XAEqualizerItfAdapt_GetBandLevelRange(XAAdaptationGstCtx *bCtx,
+                                               XAmillibel *pMin,
+                                               XAmillibel *pMax);
+
+XAresult XAEqualizerItfAdapt_SetBandLevel(XAAdaptationGstCtx *bCtx,
+                                          XAuint16 band,
+                                          XAmillibel level);
+
+XAresult XAEqualizerItfAdapt_GetCenterFreq(XAAdaptationGstCtx *bCtx,
+                                           XAuint16 band,
+                                           XAmilliHertz *pCenter);
+
+XAresult XAEqualizerItfAdapt_GetBandFreqRange(XAAdaptationGstCtx *bCtx,
+                                              XAuint16 band,
+                                              XAmilliHertz *pMin,
+                                              XAmilliHertz *pMax);
+
+XAresult XAEqualizerItfAdapt_GetBand(XAAdaptationGstCtx *bCtx,
+                                     XAmilliHertz frequency,
+                                     XAuint16 *pBand);
+
+XAresult XAEqualizerItfAdapt_GetDefaultBandLevel(XAAdaptationGstCtx *bCtx,
+                                                 XAuint16 index,
+                                                 XAint16 *pLevel);
+
+#endif /* XAEQUALIZERITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,370 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "xagstcapabilitiesmgr.h"
+#include <stdio.h>
+#include <string.h>
+
+static XAresult XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode);
+static XAresult XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode);
+static XAresult XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode);
+
+/* XAresult XAGSTCapabilitiesMgr_UpdateCapabilitieList
+ * Description: Update the capabilities list supported by GStreamer framework.
+ */
+XAresult XAGSTCapabilitiesMgr_UpdateCapabilitieList(
+                FrameworkMap *frameworkMap,
+                XACapabilities **ppListHead)
+
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    FWMgrFwType fwtype = FWMgrFWUknown;
+    char *uri = NULL;
+    XACapabilities *lastNode;
+    XACapabilities *firstNode;
+
+    DEBUG_API("->XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+
+    if(!frameworkMap || !ppListHead)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+    
+    lastNode = firstNode = *ppListHead;
+    
+    /* traverse and point to the last node in the list */
+    while(lastNode && lastNode->next)
+    {
+        lastNode = lastNode->next;
+    }
+
+
+    uri = "file:///c:/test.mp4";
+    fwtype = XAFrameworkMgr_GetFramework(
+            frameworkMap,
+            uri,
+            FWMgrMORecorder);
+    
+    if(fwtype == FWMgrFWGST)
+    {
+	    /* Add codec capabilities */
+	    newNode = NULL;
+	    res = XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(&newNode);
+	    if (res != XA_RESULT_SUCCESS)
+	        {
+	        return res;
+	        }
+	    if (lastNode)
+	    {
+	        lastNode->next = newNode;
+	    }
+	    if (newNode)
+	    { /* if a new node is created move lastNode to the new item */
+	        if (!firstNode)
+	            firstNode = newNode;
+	        lastNode = newNode;
+	    }
+    }
+    
+
+    uri = "file:///c:/test.amr";
+    fwtype = XAFrameworkMgr_GetFramework(
+            frameworkMap,
+            uri,
+            FWMgrMORecorder);
+    
+    if(fwtype == FWMgrFWGST)
+    {
+	    newNode = NULL;
+	    res = XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(&newNode);
+	    if (res != XA_RESULT_SUCCESS)
+	        {
+	        return res;
+	        }
+	    if (lastNode)
+	    {
+	        lastNode->next = newNode;
+	    }
+	    if (newNode)
+	    { /* if a new node is created move lastNode to the new item */
+	        if (!firstNode)
+	            firstNode = newNode;
+	        lastNode = newNode;
+	    }
+    }
+
+    uri = "file:///c:/test.wav";
+    fwtype = XAFrameworkMgr_GetFramework(
+            frameworkMap,
+            uri,
+            FWMgrMORecorder);
+    
+    if(fwtype == FWMgrFWGST)
+    {
+	    newNode = NULL;
+	    res = XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(&newNode);
+	    if (res != XA_RESULT_SUCCESS)
+	        {
+	        return res;
+	        }
+	    if (lastNode)
+	    {
+	        lastNode->next = newNode;
+	    }
+	    if (newNode)
+	    { /* if a new node is created move lastNode to the new item */
+	        if (!firstNode)
+	            firstNode = newNode;
+	        lastNode = newNode;
+	    }
+    }
+    /* if empty list, then append first node as the head */
+    if (!(*ppListHead))
+        {
+        *ppListHead = firstNode;
+        }
+    DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+    return res;
+}
+
+XAresult XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioCodecDescriptor *entries = NULL;
+    XAchar aacencelement[] = "nokiaaacenc";
+    int strLen = 0;
+    
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_E;
+    newNode->xaid = XA_AUDIOCODEC_AAC;
+    newNode->noOfEntries = 1;
+    
+    
+    strLen = strlen((char*)aacencelement);
+    newNode->adaptId = (XAchar *)calloc(strLen + 1, sizeof(XAchar));    
+    if (!newNode->adaptId)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    strncpy((char*)newNode->adaptId, (char*)aacencelement, strLen);
+    newNode->adaptId[strLen] = '\0'; /*Null terminate it*/
+    
+    /* Allocate array */
+    entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+ 
+    entries->maxChannels = 2;
+    entries->minBitsPerSample = 16;
+    entries->maxBitsPerSample = 16;
+    entries->minSampleRate = 8000000;  /*milliHz*/
+    entries->maxSampleRate = 48000000;
+    entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+    entries->numSampleRatesSupported = 7;
+    entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+    if (!entries->pSampleRatesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    /* entries in milliHz */
+    entries->pSampleRatesSupported[0] = 8000000;
+    entries->pSampleRatesSupported[1] = 11025000;
+    entries->pSampleRatesSupported[2] = 16000000;
+    entries->pSampleRatesSupported[3] = 22050000;
+    entries->pSampleRatesSupported[4] = 32000000;
+    entries->pSampleRatesSupported[5] = 44100000;
+    entries->pSampleRatesSupported[6] = 48000000;
+
+    entries->minBitRate = 32000;
+    entries->maxBitRate = 256000;
+    entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
+    entries->numBitratesSupported = 8;
+    entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+    if (!entries->pBitratesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    (entries->pBitratesSupported)[0] = 32000;
+    (entries->pBitratesSupported)[1] = 64000;
+    (entries->pBitratesSupported)[2] = 96000;
+    (entries->pBitratesSupported)[3] = 128000;
+    (entries->pBitratesSupported)[4] = 160000;
+    (entries->pBitratesSupported)[5] = 192000;
+    (entries->pBitratesSupported)[6] = 224000;
+    (entries->pBitratesSupported)[7] = 256000;
+
+    entries->profileSetting = XA_AUDIOPROFILE_AAC_AAC;
+    entries->modeSetting = XA_AUDIOMODE_AAC_LC;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
+
+XAresult XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioCodecDescriptor *entries = NULL;
+ 
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_E;
+    newNode->xaid = XA_AUDIOCODEC_AMR;
+    newNode->noOfEntries = 1;
+
+    /* Allocate array */
+    entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+ 
+    entries->maxChannels = 1;
+    entries->minBitsPerSample = 8;
+    entries->maxBitsPerSample = 8;
+    entries->minSampleRate = 8000000;  /*milliHz*/
+    entries->maxSampleRate = 8000000;
+    entries->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
+    entries->numSampleRatesSupported = 1;
+    entries->minBitRate=4750;
+    entries->maxBitRate=12200;
+    entries->isBitrateRangeContinuous=XA_BOOLEAN_FALSE;
+    entries->numBitratesSupported = 8;
+    entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+    if (!entries->pBitratesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    (entries->pBitratesSupported)[0] = 4750;
+    (entries->pBitratesSupported)[1] = 5150;
+    (entries->pBitratesSupported)[2] = 5900;
+    (entries->pBitratesSupported)[3] = 6700;
+    (entries->pBitratesSupported)[4] = 7400;
+    (entries->pBitratesSupported)[5] = 7950;
+    (entries->pBitratesSupported)[6] = 10200;
+    (entries->pBitratesSupported)[7] = 12200;
+
+    entries->profileSetting = XA_AUDIOPROFILE_AMR;
+    entries->modeSetting = 0;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
+
+XAresult XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioCodecDescriptor *entries = NULL;
+
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_E;
+    newNode->xaid = XA_AUDIOCODEC_PCM;
+    newNode->noOfEntries = 1;
+
+    /* Allocate array */
+    entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+
+    entries->maxChannels = 2;
+    entries->minBitsPerSample = 16;
+    entries->maxBitsPerSample = 16;
+    entries->minSampleRate = 8000000;  /*milliHz*/
+    entries->maxSampleRate = 96000000;
+    entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+    entries->numSampleRatesSupported = 10;
+    entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+    if (!entries->pSampleRatesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    /* entries in milliHz */
+    entries->pSampleRatesSupported[0] = 12000000;
+    entries->pSampleRatesSupported[1] = 16000000;
+    entries->pSampleRatesSupported[2] = 22050000;
+    entries->pSampleRatesSupported[3] = 24000000;
+    entries->pSampleRatesSupported[4] = 32000000;
+    entries->pSampleRatesSupported[5] = 44100000;
+    entries->pSampleRatesSupported[6] = 48000000;
+    entries->pSampleRatesSupported[7] = 64000000;
+    entries->pSampleRatesSupported[8] = 88200000;
+    entries->pSampleRatesSupported[9] = 96000000;
+
+    entries->minBitRate = 0;
+    entries->maxBitRate = 0;
+    entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
+    entries->pBitratesSupported = NULL;
+    entries->numBitratesSupported = 0;
+    entries->profileSetting = XA_AUDIOPROFILE_PCM;
+    entries->modeSetting = 0;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef XAGSTCAPABILITIESMGR_H
+#define XAGSTCAPABILITIESMGR_H
+
+#include "openmaxalwrapper.h"
+#include "xaframeworkmgr.h"
+#include "xacapabilitiesmgr.h"
+
+XAresult XAGSTCapabilitiesMgr_UpdateCapabilitieList(
+                FrameworkMap *frameworkMap,
+                XACapabilities** ppListHead);
+
+#endif /* XAGSTCAPABILITIESMGR_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaimagecontrolsitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,325 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xamediarecorderadaptctx.h"
+#include "xacameraadaptctx.h"
+#include "xaimagecontrolsitfadaptation.h"
+
+/*
+ * XAresult XAImageControlsItfAdapt_SetBrightness(XAAdaptationGstCtx *bCtx,
+ *                                                XAuint32 brightness)
+ */
+XAresult XAImageControlsItfAdapt_SetBrightness(XAAdaptationGstCtx *bCtx,
+                                               XAuint32 brightness)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    gdouble gstBrightness = 0;
+    XAint32 tempBrightness = 0;
+    GstElement *balanceElement = NULL;
+    DEBUG_API("->XAImageControlsItfAdapt_SetBrightness")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageControlsItfAdapt_SetBrightness")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        XAMediaRecorderAdaptationCtx* ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+        balanceElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_balance");
+    }
+    if( bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        XAMediaPlayerAdaptationCtx* ctx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+        balanceElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_balance");
+    }
+    if( bCtx->baseObj.ctxId == XACameraAdaptation )
+    {
+        XACameraAdaptationCtx* ctx = (XACameraAdaptationCtx*) bCtx;
+
+        GstElement *videoPP = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "videopp_camera");
+        if ( !videoPP )
+        {
+            DEBUG_ERR("Could not receive videopp from camerabin!");
+        }
+        else
+        {
+            /* Get camera balance element */
+            balanceElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_balance");
+        }
+    }
+
+    /* count gstBrightness from XA contrast. Allowed values for gst is -1 to 1
+     * and allowed value for XA is 0 to 100 */
+    tempBrightness = brightness;
+
+    gstBrightness = ( ((gdouble)tempBrightness - SCALE_VALUE_BRIGHTNESS) / SCALE_VALUE_BRIGHTNESS );
+
+    if(balanceElement)
+    {
+        g_object_set(G_OBJECT(balanceElement), "brightness", gstBrightness, NULL);
+
+        if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+        {
+            ret = XAImageControlsItfAdapt_HandleImageType(bCtx);
+        }
+    }
+
+	if ( balanceElement )
+	{
+        gst_object_unref(balanceElement);
+	}
+
+    DEBUG_API("<-XAImageControlsItfAdapt_SetBrightness")
+    return ret;
+}
+
+/*
+ * XAresult XAImageControlsItfAdapt_SetContrast(XAAdaptationGstCtx *bCtx,
+ *                                              XAuint32 contrast)
+ */
+XAresult XAImageControlsItfAdapt_SetContrast(XAAdaptationGstCtx *bCtx,
+                                             XAint32 contrast)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    gdouble gstContrast = 1;
+    GstElement *balanceElement = NULL;
+    DEBUG_API("->XAImageControlsItfAdapt_SetContrast")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageControlsItfAdapt_SetContrast")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        XAMediaPlayerAdaptationCtx* ctx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+        balanceElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_balance");
+    }
+    if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        XAMediaRecorderAdaptationCtx* ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+        balanceElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_balance");
+    }
+    if( bCtx->baseObj.ctxId == XACameraAdaptation )
+    {
+        XACameraAdaptationCtx* ctx = (XACameraAdaptationCtx*) bCtx;
+
+        GstElement *videoPP = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "videopp_camera");
+        if( !videoPP )
+        {
+            DEBUG_ERR("Could not receive videopp from camerabin!");
+        }
+        else
+        {
+            /* Get camera balance element */
+            balanceElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_balance");
+        }
+    }
+
+    /* count gstContrast from XA contrast. Allowed values for gst is 0 to 2
+     * and allowed value for XA is -100 to 100 */
+    gstContrast = (( (gdouble)contrast + SCALE_VALUE_CONTRAST ) / SCALE_VALUE_CONTRAST );
+
+    if(balanceElement)
+    {
+        g_object_set(G_OBJECT(balanceElement), "contrast", gstContrast, NULL);
+
+        if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+        {
+            ret = XAImageControlsItfAdapt_HandleImageType(bCtx);
+        }
+    }
+
+	if ( balanceElement )
+	{
+        gst_object_unref(balanceElement);
+	}
+
+    DEBUG_API("<-XAImageControlsItfAdapt_SetContrast")
+    return ret;
+}
+
+/*
+ * XAresult XAImageControlsItfAdapt_SetGamma(XAAdaptationGstCtx *bCtx,
+ *                                           XApermille gamma)
+ */
+XAresult XAImageControlsItfAdapt_SetGamma(XAAdaptationGstCtx *bCtx,
+                                          XApermille gamma)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    gdouble gstGamma=0;
+    GstElement *gammaElement = NULL;
+    DEBUG_API("->XAImageControlsItfAdapt_SetGamma")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageControlsItfAdapt_SetGamma")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        XAMediaPlayerAdaptationCtx* ctx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+        gammaElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_gamma");
+    }
+
+    if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        XAMediaRecorderAdaptationCtx* ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+        gammaElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_gamma");
+    }
+
+    if( bCtx->baseObj.ctxId == XACameraAdaptation )
+    {
+        XACameraAdaptationCtx* ctx = (XACameraAdaptationCtx*) bCtx;
+
+        GstElement *videoPP = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "videopp_camera");
+        if( !videoPP )
+        {
+            DEBUG_ERR("Could not receive videopp from camerabin!");
+        }
+        else
+        {
+            /* Get camera gamma element */
+            gammaElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_gamma");
+        }
+    }
+
+    /* count gstGamma from XA gamma */
+    gstGamma = ( (gdouble)gamma / SCALE_VALUE_GAMMA );
+
+    if(gammaElement)
+    {
+        g_object_set(G_OBJECT(gammaElement), "gamma", gstGamma, NULL);
+
+        if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+        {
+            ret = XAImageControlsItfAdapt_HandleImageType(bCtx);
+        }
+    }
+
+	if ( gammaElement )
+	{
+        gst_object_unref(gammaElement);
+	}
+
+    DEBUG_API("<-XAImageControlsItfAdapt_SetGamma")
+    return ret;
+}
+
+/*
+ * XAresult XAImageControlsItfAdapt_GetSupportedGammaSettings(XAAdaptationGstCtx *bCtx,
+ *                                                            XApermille *pMinValue,
+ *                                                            XApermille *pMaxValue,
+ *                                                            XAuint32 *pNumSettings,
+ *                                                            XApermille **ppSettings)
+ */
+XAresult XAImageControlsItfAdapt_GetSupportedGammaSettings(XAAdaptationGstCtx *bCtx,
+                                                           XApermille *pMinValue,
+                                                           XApermille *pMaxValue,
+                                                           XAuint32 *pNumSettings,
+                                                           XApermille **ppSettings)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAImageControlsItfAdapt_GetSupportedGammaSettings")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation) || !pMinValue || !pMaxValue || !pNumSettings)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        DEBUG_API("<-XAImageControlsItfAdapt_GetSupportedGammaSettings")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pMinValue = MIN_GAMMA_VALUE;
+    *pMaxValue = MAX_GAMMA_VALUE;
+
+    /* manual settings is continuous from min to max then pNumSetting return 0. */
+    *pNumSettings = 0;
+
+    DEBUG_API("<-XAImageControlsItfAdapt_GetSupportedGammaSettings")
+    return ret;
+}
+/*
+ * XAresult XAImageControlsItfAdapt_HandleImageType(XAAdaptationGstCtx *bCtx)
+ * Description: this run gstreamer for image type
+ *
+ */
+XAresult XAImageControlsItfAdapt_HandleImageType(XAAdaptationGstCtx *bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XADataSource *dataSrc = NULL;
+    GstStateChangeReturn gstRet = GST_STATE_CHANGE_SUCCESS;
+    GstState gstOrigState = GST_STATE_PLAYING;
+    GstState gstTmpState = GST_STATE_PLAYING;
+    XAMediaPlayerAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XAImageControlsItfAdapt_HandleImageType");
+
+    if( !bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageControlsItfAdapt_HandleImageType")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+    dataSrc = mCtx->xaSource;
+
+    if( dataSrc )
+    {
+        XAMediaType mediaType;
+        ret = XACommon_CheckDataSource(dataSrc, &mediaType);
+        if( ret == XA_RESULT_SUCCESS && mediaType == XA_MEDIATYPE_IMAGE )
+        {
+            gstOrigState = GST_STATE(bCtx->bin);
+
+            DEBUG_INFO_A1("Sending change state request to state %d", GST_STATE_READY);
+            gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), GST_STATE_READY);
+            gstTmpState = GST_STATE(bCtx->bin);
+            if(gstRet == GST_STATE_CHANGE_SUCCESS && gstTmpState == GST_STATE_READY)
+                {
+                DEBUG_INFO_A1("Sending change state request to state %d", gstOrigState);
+                gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), gstOrigState);
+                }
+        }
+    }
+    DEBUG_API("<-XAImageControlsItfAdapt_HandleImageType");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaimagecontrolsitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAIMAGECONTROLSITFADAPTATION_H
+#define XAIMAGECONTROLSITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xathreadsafety.h"
+
+/* MACROS */
+#define MIN_GAMMA_VALUE         10
+#define MAX_GAMMA_VALUE         10000
+#define SCALE_VALUE_BRIGHTNESS  50
+#define SCALE_VALUE_CONTRAST    100
+#define SCALE_VALUE_GAMMA       1000
+
+/* FUNCTIONS */
+XAresult XAImageControlsItfAdapt_SetBrightness(XAAdaptationGstCtx *bCtx,
+                                               XAuint32 brightness);
+
+XAresult XAImageControlsItfAdapt_SetContrast(XAAdaptationGstCtx *bCtx,
+                                             XAint32 contrast);
+
+XAresult XAImageControlsItfAdapt_SetGamma(XAAdaptationGstCtx *bCtx,
+                                          XApermille gamma);
+
+XAresult XAImageControlsItfAdapt_GetSupportedGammaSettings(XAAdaptationGstCtx *bCtx,
+                                                           XApermille *pMinValue,
+                                                           XApermille *pMaxValue,
+                                                           XAuint32 *pNumSettings,
+                                                           XApermille **ppSettings);
+
+XAresult XAImageControlsItfAdapt_HandleImageType(XAAdaptationGstCtx *bCtx);
+#endif /* XAIMAGECONTROLSITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaimageeffectsitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,661 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <gst.h>
+#include <photography.h>
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xamediarecorderadaptctx.h"
+#include "xacameraadaptctx.h"
+#include "xaimageeffectsitfadaptation.h"
+
+/*
+ * XAresult XAImageEffectsItfAdapt_QuerySupportedImageEffects(XAAdaptationGstCtx *bCtx,
+ *                                                            XAuint32 index,
+ *                                                            XAuint32 *pImageEffectId)
+ */
+XAresult XAImageEffectsItfAdapt_QuerySupportedImageEffects(XAAdaptationGstCtx *bCtx,
+                                                           XAuint32 index,
+                                                           XAuint32 *pImageEffectId)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAImageEffectsItfAdapt_QuerySupportedImageEffects")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation) || index > NUM_SUPPORTED_EFFECTS - 1 || !pImageEffectId)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageEffectsItfAdapt_QuerySupportedImageEffects")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* check which effect is supported */
+    if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation || bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        switch( index )
+        {
+            case 0:
+                *pImageEffectId = XA_IMAGEEFFECT_MONOCHROME;
+                break;
+            case 1:
+                *pImageEffectId = XA_IMAGEEFFECT_NEGATIVE;
+                break;
+            case 2:
+                *pImageEffectId = XA_IMAGEEFFECT_SEPIA;
+                break;
+            case 3:
+                *pImageEffectId = XA_IMAGEEFFECT_EMBOSS;
+                break;
+            case 4:
+                *pImageEffectId = XA_IMAGEEFFECT_PAINTBRUSH;
+                break;
+            case 5:
+                *pImageEffectId = XA_IMAGEEFFECT_SOLARIZE;
+                break;
+            case 6:
+                *pImageEffectId = XA_IMAGEEFFECT_CARTOON;
+                break;
+            default:
+                ret = XA_RESULT_PARAMETER_INVALID;
+                break;
+        }
+    }
+    if(bCtx->baseObj.ctxId == XACameraAdaptation)
+    {
+        XACameraAdaptationCtx* mCtx = (XACameraAdaptationCtx*) bCtx;
+
+        if(GST_IS_PHOTOGRAPHY(mCtx->baseObj.bin))
+        {
+            /* real image effects for camera  */
+            switch( index )
+            {
+                case 0:
+                    *pImageEffectId = XA_IMAGEEFFECT_NEGATIVE;
+                    break;
+                case 1:
+                    *pImageEffectId = XA_IMAGEEFFECT_SEPIA;
+                    break;
+                case 3:
+                    *pImageEffectId = XA_IMAGEEFFECT_SOLARIZE;
+                    break;
+                default:
+                    ret = XA_RESULT_PARAMETER_INVALID;
+                    break;
+            }
+        }
+        else
+        {
+            /* Stubbed image effects for camera */
+            switch( index )
+            {
+                case 0:
+                    *pImageEffectId = XA_IMAGEEFFECT_MONOCHROME;
+                    break;
+                case 1:
+                    *pImageEffectId = XA_IMAGEEFFECT_NEGATIVE;
+                    break;
+                case 2:
+                    *pImageEffectId = XA_IMAGEEFFECT_SEPIA;
+                    break;
+                case 3:
+                    *pImageEffectId = XA_IMAGEEFFECT_EMBOSS;
+                    break;
+                case 4:
+                    *pImageEffectId = XA_IMAGEEFFECT_PAINTBRUSH;
+                    break;
+                case 5:
+                    *pImageEffectId = XA_IMAGEEFFECT_SOLARIZE;
+                    break;
+                case 6:
+                    *pImageEffectId = XA_IMAGEEFFECT_CARTOON;
+                    break;
+                default:
+                    ret = XA_RESULT_PARAMETER_INVALID;
+                    break;
+            }
+        }
+    }
+
+    DEBUG_API("<-XAImageEffectsItfAdapt_QuerySupportedImageEffects")
+    return ret;
+}
+
+/*
+ * XAresult XAImageEffectsItfAdapt_EnableImageEffect(XAAdaptationGstCtx *bCtx,
+ *                                                   XAuint32 imageEffectID)
+ */
+XAresult XAImageEffectsItfAdapt_EnableImageEffect(XAAdaptationGstCtx *bCtx,
+                                                  XAuint32 imageEffectID)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    gdouble tempImageEffect = 0;
+    GstElement *balanceElement = NULL;
+    DEBUG_API("->XAImageEffectsItfAdapt_EnableImageEffect")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageEffectsItfAdapt_EnableImageEffect")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* check which effect is enabled (STUB for player and recorder - all effect are done
+     * via videobalance plugin. Used different saturations values). */
+    if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation || bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        switch( imageEffectID )
+        {
+            case XA_IMAGEEFFECT_MONOCHROME:
+                tempImageEffect = IMAGEEFFECT_MONOCHROME;
+                break;
+            case XA_IMAGEEFFECT_NEGATIVE:
+                tempImageEffect = IMAGEEFFECT_NEGATIVE;
+                break;
+            case XA_IMAGEEFFECT_SEPIA:
+                tempImageEffect = IMAGEEFFECT_SEPIA;
+                break;
+            case XA_IMAGEEFFECT_EMBOSS:
+                tempImageEffect = IMAGEEFFECT_EMBOSS;
+                break;
+            case XA_IMAGEEFFECT_PAINTBRUSH:
+                tempImageEffect = IMAGEEFFECT_PAINTBRUSH;
+                break;
+            case XA_IMAGEEFFECT_SOLARIZE:
+                tempImageEffect = IMAGEEFFECT_SOLARIZE;
+                break;
+            case XA_IMAGEEFFECT_CARTOON:
+                tempImageEffect = IMAGEEFFECT_CARTOON;
+                break;
+            default:
+            {
+                DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+                DEBUG_API("<-XAImageEffectsItfAdapt_EnableImageEffect")
+                return XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+        }
+
+        if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+        {
+            XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+            balanceElement = gst_bin_get_by_name( GST_BIN(mCtx->baseObj.bin), "pp_balance");
+
+            if( balanceElement && (imageEffectID != mCtx->imageEffectID) )
+            {
+                g_object_set(G_OBJECT(balanceElement), "saturation", (gdouble)tempImageEffect, NULL);
+                mCtx->imageEffectID  = imageEffectID;
+                ret = XAImageEffectsItfAdapt_HandleImageType(bCtx);
+            }
+        }
+
+        if(bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+        {
+            XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+            balanceElement = gst_bin_get_by_name( GST_BIN(mCtx->baseObj.bin), "pp_balance");
+
+            if( balanceElement && (imageEffectID != mCtx->imageEffectID) )
+            {
+                g_object_set(G_OBJECT(balanceElement), "saturation", (gdouble)tempImageEffect, NULL);
+                mCtx->imageEffectID  = imageEffectID;
+            }
+        }
+    }
+
+    if(bCtx->baseObj.ctxId == XACameraAdaptation )
+    {
+        XACameraAdaptationCtx* mCtx = (XACameraAdaptationCtx*) bCtx;
+        GstColourToneMode gstColorToneMode = GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL;
+
+        if(GST_IS_PHOTOGRAPHY(mCtx->baseObj.bin))
+        {
+            switch( imageEffectID )
+            {
+                case XA_IMAGEEFFECT_NEGATIVE:
+                {
+                    gstColorToneMode = GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NEGATIVE;
+                    break;
+                }
+                case XA_IMAGEEFFECT_SEPIA:
+                {
+                    gstColorToneMode = GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SEPIA;
+                    break;
+                }
+                case XA_IMAGEEFFECT_SOLARIZE:
+                {
+                    gstColorToneMode = GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SOLARIZE;
+                    break;
+                }
+                default:
+                {
+                    mCtx->imageEffectID = 0;
+                    DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+                    DEBUG_API("<-XAImageEffectsItfAdapt_EnableImageEffect")
+                    return XA_RESULT_FEATURE_UNSUPPORTED;
+                }
+            }
+
+            if( imageEffectID != mCtx->imageEffectID )
+            {
+                if( !gst_photography_set_colour_tone_mode( GST_PHOTOGRAPHY(mCtx->baseObj.bin), gstColorToneMode ) )
+                {
+                    DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+                    DEBUG_API("<-XAImageEffectsItfAdapt_EnableImageEffect")
+                    return XA_RESULT_INTERNAL_ERROR;
+                }
+                mCtx->imageEffectID = imageEffectID;
+            }
+        }
+        else
+        {
+            GstElement *videoPP = NULL;
+            /* Stubbed image effects for camera */
+            switch( imageEffectID )
+            {
+                case XA_IMAGEEFFECT_MONOCHROME:
+                    tempImageEffect = IMAGEEFFECT_MONOCHROME;
+                    break;
+                case XA_IMAGEEFFECT_NEGATIVE:
+                    tempImageEffect = IMAGEEFFECT_NEGATIVE;
+                    break;
+                case XA_IMAGEEFFECT_SEPIA:
+                    tempImageEffect = IMAGEEFFECT_SEPIA;
+                    break;
+                case XA_IMAGEEFFECT_EMBOSS:
+                    tempImageEffect = IMAGEEFFECT_EMBOSS;
+                    break;
+                case XA_IMAGEEFFECT_PAINTBRUSH:
+                    tempImageEffect = IMAGEEFFECT_PAINTBRUSH;
+                    break;
+                case XA_IMAGEEFFECT_SOLARIZE:
+                    tempImageEffect = IMAGEEFFECT_SOLARIZE;
+                    break;
+                case XA_IMAGEEFFECT_CARTOON:
+                    tempImageEffect = IMAGEEFFECT_CARTOON;
+                    break;
+                default:
+                {
+                    DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+                    DEBUG_API("<-XAImageEffectsItfAdapt_EnableImageEffect")
+                    return XA_RESULT_FEATURE_UNSUPPORTED;
+                }
+            }
+
+            videoPP = gst_bin_get_by_name( GST_BIN(mCtx->baseObj.bin), "videopp_camera");
+            if ( !videoPP )
+            {
+                DEBUG_ERR("Could not receive videopp from camerabin!");
+            }
+            else
+            {
+               /* Get camera balance element */
+               balanceElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_balance");
+
+               if( balanceElement && (imageEffectID != mCtx->imageEffectID) )
+               {
+                   g_object_set(G_OBJECT(balanceElement), "saturation", (gdouble)tempImageEffect, NULL);
+                   mCtx->imageEffectID  = imageEffectID;
+               }
+            }
+
+            if ( videoPP )
+            {
+            	gst_object_unref( videoPP );
+            }
+        }
+    }
+
+    if ( balanceElement )
+    {
+        gst_object_unref(balanceElement);
+    }
+
+    DEBUG_API("<-XAImageEffectsItfAdapt_EnableImageEffect")
+    return ret;
+}
+
+/*
+ * XAresult XAImageEffectsItfAdapt_DisableImageEffect(XAAdaptationGstCtx *bCtx,
+ *                                                    XAuint32 imageEffectID)
+ */
+XAresult XAImageEffectsItfAdapt_DisableImageEffect(XAAdaptationGstCtx *bCtx,
+                                                   XAuint32 imageEffectID)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 tempImageEffect = 0;
+    GstElement *balanceElement = NULL;
+    DEBUG_API("->XAImageEffectsItfAdapt_DisableImageEffect")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageEffectsItfAdapt_DisableImageEffect")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* check which effect is disabled (STUB for player and recorder - all effect are done
+     * via videobalance plugin. Used saturation default value to disabling effects). */
+    if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation || bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        switch( imageEffectID )
+        {
+            case XA_IMAGEEFFECT_MONOCHROME:
+            case XA_IMAGEEFFECT_NEGATIVE:
+            case XA_IMAGEEFFECT_SEPIA:
+            case XA_IMAGEEFFECT_EMBOSS:
+            case XA_IMAGEEFFECT_PAINTBRUSH:
+            case XA_IMAGEEFFECT_SOLARIZE:
+            case XA_IMAGEEFFECT_CARTOON:
+                tempImageEffect = NO_IMAGEEFFECT;
+                break;
+            default:
+            {
+                DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED")
+                DEBUG_API("<-XAImageEffectsItfAdapt_DisableImageEffect")
+                return XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+        }
+
+        if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+        {
+            XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+            balanceElement = gst_bin_get_by_name( GST_BIN(mCtx->baseObj.bin), "pp_balance");
+
+            if( balanceElement )
+            {
+                g_object_set(G_OBJECT(balanceElement), "saturation", (gdouble)GST_NO_IMAGEEFFECT, NULL);
+                mCtx->imageEffectID = tempImageEffect;
+                ret = XAImageEffectsItfAdapt_HandleImageType(bCtx);
+            }
+        }
+
+        if(bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+        {
+            XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+            balanceElement = gst_bin_get_by_name( GST_BIN(mCtx->baseObj.bin), "pp_balance");
+
+            if( balanceElement )
+            {
+                g_object_set(G_OBJECT(balanceElement), "saturation", (gdouble)GST_NO_IMAGEEFFECT, NULL);
+                mCtx->imageEffectID = tempImageEffect;
+            }
+        }
+    }
+
+    if(bCtx->baseObj.ctxId == XACameraAdaptation)
+    {
+        XACameraAdaptationCtx* mCtx = (XACameraAdaptationCtx*) bCtx;
+
+        if(GST_IS_PHOTOGRAPHY(mCtx->baseObj.bin))
+        {
+            switch( imageEffectID )
+            {
+                case XA_IMAGEEFFECT_NEGATIVE:
+                case XA_IMAGEEFFECT_SEPIA:
+                case XA_IMAGEEFFECT_SOLARIZE:
+                {
+                    /* Set color tone to normal */
+                    if( !gst_photography_set_colour_tone_mode( GST_PHOTOGRAPHY(mCtx->baseObj.bin),
+                        GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL ) )
+                    {
+                        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+                        DEBUG_API("<-XAImageEffectsItfAdapt_EnableImageEffect")
+                        return XA_RESULT_INTERNAL_ERROR;
+                    }
+                    mCtx->imageEffectID = NO_IMAGEEFFECT;
+                    break;
+                }
+                default:
+                {
+                    DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED")
+                    DEBUG_API("<-XAImageEffectsItfAdapt_DisableImageEffect")
+                    return XA_RESULT_FEATURE_UNSUPPORTED;
+                }
+            }
+        }
+        else
+        {
+            GstElement *videoPP = NULL;
+            /* stubbed camera values */
+            switch( imageEffectID )
+            {
+                case XA_IMAGEEFFECT_MONOCHROME:
+                case XA_IMAGEEFFECT_NEGATIVE:
+                case XA_IMAGEEFFECT_SEPIA:
+                case XA_IMAGEEFFECT_EMBOSS:
+                case XA_IMAGEEFFECT_PAINTBRUSH:
+                case XA_IMAGEEFFECT_SOLARIZE:
+                case XA_IMAGEEFFECT_CARTOON:
+                    mCtx->imageEffectID = NO_IMAGEEFFECT;
+                    break;
+                default:
+                {
+                    DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED")
+                    DEBUG_API("<-XAImageEffectsItfAdapt_DisableImageEffect")
+                    return XA_RESULT_FEATURE_UNSUPPORTED;
+                }
+            }
+
+            videoPP = gst_bin_get_by_name( GST_BIN(mCtx->baseObj.bin), "videopp_camera");
+            if ( !videoPP )
+            {
+                DEBUG_ERR("Could not receive videopp from camerabin!");
+            }
+            else
+            {
+               /* Get camera balance element */
+               balanceElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_balance");
+
+               if( balanceElement && (imageEffectID != mCtx->imageEffectID) )
+               {
+                   g_object_set(G_OBJECT(balanceElement), "saturation", (gdouble)GST_NO_IMAGEEFFECT, NULL);
+                   mCtx->imageEffectID = tempImageEffect;
+               }
+            }
+            if ( videoPP )
+            {
+                gst_object_unref(videoPP);
+            }
+        }
+    }
+
+    if ( balanceElement )
+    {
+        gst_object_unref(balanceElement);
+    }
+
+    DEBUG_API("<-XAImageEffectsItfAdapt_DisableImageEffect")
+    return ret;
+}
+
+/*
+ * XAresult XAImageEffectsItfAdapt_IsImageEffectEnabled(XAAdaptationGstCtx *bCtx,
+ *                                                      XAuint32 imageEffectID,
+ *                                                      XAboolean *pEnabled)
+ */
+XAresult XAImageEffectsItfAdapt_IsImageEffectEnabled(XAAdaptationGstCtx *bCtx,
+                                                     XAuint32 imageEffectID,
+                                                     XAboolean *pEnabled)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 tempImageEffect = 0;
+    DEBUG_API("->XAImageEffectsItfAdapt_IsImageEffectEnabled")
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+       && bCtx->baseObj.ctxId != XACameraAdaptation) || !pEnabled)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageEffectsItfAdapt_IsImageEffectEnabled")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+    {
+        XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+        tempImageEffect = mCtx->imageEffectID;
+    }
+
+    if(bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+        tempImageEffect = mCtx->imageEffectID;
+    }
+
+    /* check is effect enabled for player and recorder */
+    if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation || bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        switch( imageEffectID )
+        {
+            case XA_IMAGEEFFECT_MONOCHROME:
+            case XA_IMAGEEFFECT_NEGATIVE:
+            case XA_IMAGEEFFECT_SEPIA:
+            case XA_IMAGEEFFECT_EMBOSS:
+            case XA_IMAGEEFFECT_PAINTBRUSH:
+            case XA_IMAGEEFFECT_SOLARIZE:
+            case XA_IMAGEEFFECT_CARTOON:
+            {
+                /* Check is wanted effect currently enabled */
+                if( tempImageEffect == imageEffectID )
+                {
+                    *pEnabled = XA_BOOLEAN_TRUE;
+                }
+                else
+                {
+                    *pEnabled = XA_BOOLEAN_FALSE;
+                }
+                break;
+            }
+            default:
+                ret = XA_RESULT_FEATURE_UNSUPPORTED;
+                break;
+        }
+    }
+
+    if(bCtx->baseObj.ctxId == XACameraAdaptation)
+    {
+        XACameraAdaptationCtx* mCtx = (XACameraAdaptationCtx*) bCtx;
+
+        if(GST_IS_PHOTOGRAPHY(mCtx->baseObj.bin))
+        {
+            switch( imageEffectID )
+            {
+                case XA_IMAGEEFFECT_NEGATIVE:
+                case XA_IMAGEEFFECT_SEPIA:
+                case XA_IMAGEEFFECT_SOLARIZE:
+                {
+                    /* Check is wanted effect currently enabled */
+                    if( mCtx->imageEffectID == imageEffectID )
+                    {
+                        *pEnabled = XA_BOOLEAN_TRUE;
+                    }
+                    else
+                    {
+                        *pEnabled = XA_BOOLEAN_FALSE;
+                    }
+                    break;
+                }
+                default:
+                    ret = XA_RESULT_FEATURE_UNSUPPORTED;
+                    break;
+            }
+        }
+        else
+        {
+            /* stubbed camera values */
+            switch( imageEffectID )
+            {
+                case XA_IMAGEEFFECT_MONOCHROME:
+                case XA_IMAGEEFFECT_NEGATIVE:
+                case XA_IMAGEEFFECT_SEPIA:
+                case XA_IMAGEEFFECT_EMBOSS:
+                case XA_IMAGEEFFECT_PAINTBRUSH:
+                case XA_IMAGEEFFECT_SOLARIZE:
+                case XA_IMAGEEFFECT_CARTOON:
+                {
+                    /* Check is wanted effect currently enabled */
+                    if( mCtx->imageEffectID == imageEffectID )
+                    {
+                        *pEnabled = XA_BOOLEAN_TRUE;
+                    }
+                    else
+                    {
+                        *pEnabled = XA_BOOLEAN_FALSE;
+                    }
+                    break;
+                }
+                default:
+                    ret = XA_RESULT_FEATURE_UNSUPPORTED;
+                    break;
+            }
+        }
+    }
+
+    DEBUG_API("<-XAImageEffectsItfAdapt_IsImageEffectEnabled");
+    return ret;
+}
+/*
+ * XAresult XAImageEffectsItfAdapt_HandleImageType(XAAdaptationGstCtx *bCtx)
+ * Description: this run gstreamer for image type
+ *
+ */
+XAresult XAImageEffectsItfAdapt_HandleImageType(XAAdaptationGstCtx *bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XADataSource *dataSrc = NULL;
+    GstStateChangeReturn gstRet = GST_STATE_CHANGE_SUCCESS;
+    GstState gstOrigState = GST_STATE_PLAYING;
+    GstState gstTmpState = GST_STATE_PLAYING;
+    XAMediaPlayerAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XAImageEffectsItfAdapt_HandleImageType");
+
+    if( !bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAImageEffectsItfAdapt_HandleImageType")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+    dataSrc = mCtx->xaSource;
+
+    if( dataSrc )
+    {
+        XAMediaType mediaType;
+        ret = XACommon_CheckDataSource(dataSrc, &mediaType);
+        if( ret == XA_RESULT_SUCCESS && mediaType == XA_MEDIATYPE_IMAGE )
+        {
+            gstOrigState = GST_STATE(bCtx->bin);
+
+            DEBUG_INFO_A1("Sending change state request to state %d", GST_STATE_READY);
+            gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), GST_STATE_READY);
+            gstTmpState = GST_STATE(bCtx->bin);
+            if(gstRet == GST_STATE_CHANGE_SUCCESS && gstTmpState == GST_STATE_READY)
+                {
+                DEBUG_INFO_A1("Sending change state request to state %d", gstOrigState);
+                gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), gstOrigState);
+                }
+        }
+    }
+    DEBUG_API("<-XAImageEffectsItfAdapt_HandleImageType");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaimageeffectsitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAIMAGEEFFECTSITFADAPTATION_H
+#define XAIMAGEEFFECTSITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xathreadsafety.h"
+
+/* MACROS */
+#define NUM_SUPPORTED_EFFECTS   7
+#define NO_IMAGEEFFECT          0
+#define GST_NO_IMAGEEFFECT      1
+#define IMAGEEFFECT_MONOCHROME  0
+#define IMAGEEFFECT_NEGATIVE    0.2
+#define IMAGEEFFECT_SEPIA       0.3
+#define IMAGEEFFECT_EMBOSS      1.4
+#define IMAGEEFFECT_PAINTBRUSH  1.5
+#define IMAGEEFFECT_SOLARIZE    1.6
+#define IMAGEEFFECT_CARTOON     2
+
+/* FUNCTIONS */
+XAresult XAImageEffectsItfAdapt_QuerySupportedImageEffects(XAAdaptationGstCtx *bCtx,
+                                                           XAuint32 index,
+                                                           XAuint32 *pImageEffectId);
+
+XAresult XAImageEffectsItfAdapt_EnableImageEffect(XAAdaptationGstCtx *bCtx,
+                                                  XAuint32 imageEffectID);
+
+XAresult XAImageEffectsItfAdapt_DisableImageEffect(XAAdaptationGstCtx *bCtx,
+                                                   XAuint32 imageEffectID);
+
+XAresult XAImageEffectsItfAdapt_IsImageEffectEnabled(XAAdaptationGstCtx *bCtx,
+                                                     XAuint32 imageEffectID,
+                                                     XAboolean *pEnabled);
+
+XAresult XAImageEffectsItfAdapt_HandleImageType(XAAdaptationGstCtx *bCtx);
+#endif /* XAIMAGEEFFECTSITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaimageencoderitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "xamediarecorderadaptctx.h"
+#include "xaimageencoderitfadaptation.h"
+#include "xacapabilitiesmgr.h"
+
+
+/*
+ * XAresult XAImageEncoderItfAdapt_SetImageSettings( XAAdaptationGstCtx *bCtx,
+ *                                                   XAImageSettings *pSettings )
+ * @param XAAdaptationGstCtx *ctx - pointer to Media Recorer adaptation context
+ * @param XAImageSettings *pSettings - Settings for encoder
+ * @return XAresult ret - return success value
+ * Description: Sets preferred encoder settings for pipeline.
+ */
+XAresult XAImageEncoderItfAdapt_SetImageSettings( XAAdaptationGstCtx *bCtx,
+                                                  const XAImageSettings *pSettings )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    XACapabilities temp;
+
+    DEBUG_API("->XAImageEncoderAdapt_SetImageSettings");
+
+    if( !bCtx || (bCtx->baseObj.ctxId != XAMediaRecorderAdaptation) || !pSettings )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+    if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE), mCtx->imageEncSettings.encoderId, &temp) != XA_RESULT_SUCCESS)
+    {   /* no such codec */
+        return XA_RESULT_FEATURE_UNSUPPORTED;
+    }
+    /*Just copy - image settings are applied in InitiateSnapshot*/
+    memcpy(&mCtx->imageEncSettings, pSettings, sizeof(XAImageSettings));
+
+    DEBUG_API("<-XAImageEncoderAdapt_SetImageSettings");
+    return ret;
+}
+
+XAresult XAImageEncoderItfAdapt_GetImageSettings( XAAdaptationGstCtx *bCtx,
+                                                  XAImageSettings *pSettings )
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("->XAImageEncoderItfAdapt_GetImageSettings");
+    if( !bCtx || (bCtx->baseObj.ctxId != XAMediaRecorderAdaptation) || !pSettings )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+    memcpy(pSettings, &(mCtx->imageEncSettings), sizeof(XAImageSettings));
+    DEBUG_API("<-XAImageEncoderItfAdapt_GetImageSettings");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaimageencoderitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAIMAGEENCODERITFADAPTATION_H
+#define XAIMAGEENCODERITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+/* FUNCTIONS */
+XAresult XAImageEncoderItfAdapt_SetImageSettings(XAAdaptationGstCtx *bCtx,
+                                                 const XAImageSettings *pSettings);
+XAresult XAImageEncoderItfAdapt_GetImageSettings(XAAdaptationGstCtx *bCtx,
+                                                 XAImageSettings *pSettings);
+#endif /* XAIMAGEENCODERITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaledarrayadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include "xaledarrayadaptctx.h"
+#include "xaadaptationgst.h"
+
+/*
+ * XALEDArrayAdaptationCtx* XALEDArrayAdapt_Create()
+ * Allocates memory for LEDArray Adaptation Context and makes 1st phase initialization
+ * @returns XALEDArrayAdaptationCtx* - Pointer to created context
+ */
+XAAdaptationBaseCtx* XALEDArrayAdapt_Create(XAuint32 deviceID)
+{
+    XALEDArrayAdaptationCtx *pSelf = (XALEDArrayAdaptationCtx *)calloc(1, sizeof(XALEDArrayAdaptationCtx));
+    DEBUG_API("->XALEDArrayAdapt_Create");
+
+    if ( pSelf)
+    {
+        if( XAAdaptationBase_Init(&(pSelf->baseObj.baseObj),XALedArrayAdaptation)
+                    != XA_RESULT_SUCCESS )
+        {
+            DEBUG_ERR("Failed to init base context!!!");
+            free(pSelf);
+            pSelf = NULL;
+        }
+        else
+        {
+            pSelf->deviceID = deviceID;
+
+        }
+    }
+
+    DEBUG_API("<-XALEDArrayAdapt_Create");
+    return (XAAdaptationBaseCtx*)&pSelf->baseObj;
+}
+
+/*
+ * XAresult XALEDArrayAdapt_PostInit()
+ * 2nd phase initialization of LEDArray Adaptation Context
+ */
+XAresult XALEDArrayAdapt_PostInit(XAAdaptationGstCtx* bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XALEDArrayAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XALEDArrayAdapt_PostInit");
+    if(bCtx == NULL || bCtx->baseObj.ctxId != XALedArrayAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XALEDArrayAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    ctx = (XALEDArrayAdaptationCtx*)bCtx;
+    if ( !ctx )
+    {
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    XAAdaptationBase_PostInit( &(ctx->baseObj.baseObj) );
+
+    DEBUG_API("<-XALEDArrayAdapt_PostInit");
+    return ret;
+}
+
+/*
+ * void XALEDArrayAdapt_Destroy(XALEDArrayAdaptationCtx* ctx)
+ * Destroys LEDArray Adaptation Context
+ * @param ctx - LEDArray Adaptation context to be destroyed
+ */
+void XALEDArrayAdapt_Destroy(XAAdaptationGstCtx* bCtx)
+{
+    XALEDArrayAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XALEDArrayAdapt_Destroy");
+    if(bCtx == NULL || bCtx->baseObj.ctxId != XALedArrayAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XALEDArrayAdapt_Destroy");
+        return;
+    }
+    ctx = (XALEDArrayAdaptationCtx*)bCtx;
+    DEBUG_API("->XALEDArrayAdapt_Destroy");
+
+    XAAdaptationBase_Free(&(ctx->baseObj.baseObj));
+
+
+    free(ctx);
+    ctx = NULL;
+
+    DEBUG_API("<-XALEDArrayAdapt_Destroy");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaledarrayadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XALEDARRAYADAPTCTX_H
+#define XALEDARRAYADAPTCTX_H
+
+#include "xaadaptationgst.h"
+
+/* TYPEDEFS */
+
+typedef struct XALEDArrayAdaptationCtx_ XALEDArrayAdaptationCtx;
+
+/*
+ * Structure for Ledarray specific gst-adaptation variables
+ */
+typedef struct XALEDArrayAdaptationCtx_ {
+
+    /* Parent*/
+    XAAdaptationGstCtx_ baseObj;
+
+    /* OMX-AL Variables */
+    XAuint32    deviceID;
+
+    /* GST Variables */
+
+} XALedarrayAdaptationCtx_;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XALEDArrayAdapt_Create(XAuint32 deviceID);
+XAresult XALEDArrayAdapt_PostInit(XAAdaptationGstCtx* bCtx);
+void XALEDArrayAdapt_Destroy(XAAdaptationGstCtx* bCtx);
+
+#endif /* XALEDARRAYADAPTCTX_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaledarrayitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "xaledarrayadaptctx.h"
+#include "xaledarrayitfadaptation.h"
+#include "xaadaptationgst.h"
+
+/*
+ * XAresult XALEDArrayItfAdapt_ActivateLEDArray ( XAAdaptationGstCtx *bCtx, XAuint32 lightMask )
+ */
+XAresult XALEDArrayItfAdapt_ActivateLEDArray ( XAAdaptationGstCtx *bCtx, XAuint32 lightMask )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API_A1("->XALEDArrayItfAdapt_ActivateLEDArray %ld", lightMask);
+
+    if(!bCtx || bCtx->baseObj.ctxId != XALedArrayAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_INFO("No support > stubbed.");
+    DEBUG_API("<-XALEDArrayItfAdapt_ActivateLEDArray");
+    return ret;
+}
+/*
+ * XAresult XALEDArrayItfAdapt_SetColor ( XAAdaptationGstCtx *bCtx, XAuint8 index, const XAHSL * pColor )
+ */
+XAresult XALEDArrayItfAdapt_SetColor ( XAAdaptationGstCtx *bCtx, XAuint8 index, const XAHSL * pColor )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XALEDArrayItfAdapt_SetColor");
+
+    if(!bCtx || bCtx->baseObj.ctxId != XALedArrayAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_INFO("No support > stubbed.");
+    DEBUG_API("<-XALEDArrayItfAdapt_SetColor");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaledarrayitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XALEDARRAYITFADAPTATION_H_
+#define XALEDARRAYITFADAPTATION_H_
+
+#include "xaadaptationgst.h"
+
+
+/* FUNCTIONS */
+XAresult XALEDArrayItfAdapt_ActivateLEDArray ( XAAdaptationGstCtx *bCtx, XAuint32 lightMask );
+XAresult XALEDArrayItfAdapt_SetColor ( XAAdaptationGstCtx *bCtx, XAuint8 index, const XAHSL * pColor );
+#endif /* XALEDARRAYITFADAPTATION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediaplayeradaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,1114 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <assert.h>
+#include <stdlib.h>
+#include <gstappsrc.h>
+#include <gst.h>
+#include "xamediaplayeradaptctx.h"
+#include "xamediaplayeradaptctxmmf.h"
+#include "xaadaptationgst.h"
+#include "xaobjectitf.h"
+#include "xacameradevice.h"
+#include "xaoutputmix.h"
+#include "xametadataadaptation.h"
+/*#include "xangavideosink.h"*/
+#include "xacameraadaptctx.h"
+#include "xaoutputmixadaptctx.h"
+
+/* forward declarations */
+XAresult XAMediaPlayerAdapt_CreatePipeline( XAMediaPlayerAdaptationCtx* ctx );
+
+void* ngaVideoSinkPtr = NULL;
+
+
+extern XAboolean cameraRealized;
+extern XACameraAdaptationCtx_* cameraCtx;
+
+/*
+ * static void XAMediaPlayerAdapt_NewPadCb (GstElement *element, GstPad *pad,  gpointer data)
+ * Listen to codec bin dynamic pads
+ */
+static void XAMediaPlayerAdapt_NewPadCb (GstElement *element, GstPad *pad,  gpointer data)
+{
+  XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*)data;
+  gchar *name = gst_pad_get_name (pad);
+  DEBUG_API_A1("->XAMediaPlayerAdapt_NewPadCb: A new pad %s was created", name);
+  /*try first newly created pad to video pipe*/
+  if( mCtx->videoppbin && !(gst_pad_is_linked(gst_element_get_static_pad(mCtx->videoppbin, "videopp_sink"))) )
+  {
+      if(gst_element_link_pads (mCtx->codecbin, name, mCtx->videoppbin, "videopp_sink"))
+      {
+          DEBUG_INFO_A1("Pads linked, codecbin:%s to videopp:sink", name);
+          g_free (name);
+          DEBUG_API("<-XAMediaPlayerAdapt_NewPadCb");
+          return;
+      }
+  }
+  /*..and then to audio pipe*/
+  if( mCtx->audioppbin && !(gst_pad_is_linked(gst_element_get_static_pad(mCtx->audioppbin, "sink"))) )
+  {
+      if(gst_element_link_pads (mCtx->codecbin, name, mCtx->audioppbin, "sink"))
+      {
+          DEBUG_INFO_A1("Pads linked, codecbin:%s to audiopp:sink", name);
+          g_free (name);
+          DEBUG_API("<-XAMediaPlayerAdapt_NewPadCb");
+          return;
+      }
+  }
+
+  g_free (name);
+  DEBUG_INFO("Warning: Could not find anything to link to new pad.");
+  DEBUG_API("<-XAMediaPlayerAdapt_NewPadCb");
+}
+
+/*
+ * void  push_data_for_prerolling (GstElement * pipeline, GstBuffer *buffer, XAMediaPlayerAdaptationCtx* ctx)
+ * Called when "push-buffer" signal is emitted
+ */
+void  push_data_for_prerolling (GstElement * pipeline, GstBuffer *buffer, XAMediaPlayerAdaptationCtx* ctx)
+{
+	DEBUG_API("->push_data_for_prerolling");
+	gst_app_src_push_buffer( GST_APP_SRC(ctx->source), GST_BUFFER(buffer) );
+	/*GstPad* prerollPad = NULL;
+	prerollPad = gst_element_get_static_pad(GST_ELEMENT(ctx->source),"src");
+	gst_pad_push (prerollPad, buffer);
+	gst_element_send_event(GST_ELEMENT(ctx->source),gst_event_new_flush_start());
+	gst_element_send_event(GST_ELEMENT(ctx->source),gst_event_new_flush_stop());*/
+	DEBUG_API("<-push_data_for_prerolling");
+}
+
+
+/*
+ * gboolean XAMediaPlayerAdapt_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+ * MediaPlayer Gst-bus message handler (Callback)
+ */
+gboolean XAMediaPlayerAdapt_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+{
+    XAAdaptationGstCtx* bCtx = (XAAdaptationGstCtx*)data;
+    /* only listen to bin messages */
+    if(GST_MESSAGE_SRC(message)==(GstObject*)(bCtx->bin))
+    {
+        XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*)data;
+        DEBUG_API_A2("->XAMediaPlayerAdapt_GstBusCb:\"%s\" from object \"%s\"",
+                        GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+
+        switch( GST_MESSAGE_TYPE(message))
+        {
+            case GST_MESSAGE_EOS:
+            {
+                if( mCtx && mCtx->loopingenabled && mCtx->loopend == GST_CLOCK_TIME_NONE)
+                {
+                    DEBUG_INFO_A2("Restart loop from %"GST_TIME_FORMAT" to %"GST_TIME_FORMAT,
+                                  GST_TIME_ARGS(mCtx->loopstart), GST_TIME_ARGS(mCtx->loopend));
+                    gst_element_seek( bCtx->bin, mCtx->playrate, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE),
+                                      GST_SEEK_TYPE_SET, mCtx->loopstart,
+                                      GST_SEEK_TYPE_NONE, (gint64)GST_CLOCK_TIME_NONE );
+                    gst_element_get_state(bCtx->bin,NULL,NULL,XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+                    mCtx->lastpos = mCtx->loopstart;
+                    if( mCtx && mCtx->trackpositionenabled )
+                    {
+                        XAmillisecond posMsec = GST_TIME_AS_MSECONDS(mCtx->lastpos);/*Warning ok due to used API specification*/
+                        XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
+                        event.data = &posMsec;
+                        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+                    }
+                }
+                else
+                {
+                /* stop position tracking */
+                if(mCtx->runpositiontimer > 0)
+                {
+                    g_source_remove(mCtx->runpositiontimer);
+                    mCtx->runpositiontimer=0;
+                }
+
+                /* complete any ongoing client async operations */
+                XAAdaptationGst_CompleteAsyncWait(bCtx);
+
+                /* send needed events */
+                {
+					XAMediaType mediatype;
+/*
+					if( mCtx->baseObj.pipeSrcThrCtx.pipe )
+					{
+						XACommon_CheckDataSource((XADataSource*)mCtx->xaAudioSink, &mediatype);
+					}
+					else
+*/
+					{
+						XACommon_CheckDataSource(mCtx->xaSource, &mediatype);
+					}
+					if(mediatype!=XA_MEDIATYPE_IMAGE)
+					{
+						XAAdaptEvent event = { XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADATEND, 0, NULL };
+						XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+					}
+                }
+                if(mCtx->positionCb)
+                {
+                    mCtx->positionCb(bCtx);
+                }
+                bCtx->binWantedState = GST_STATE_PAUSED;
+                }
+                break;
+            }
+
+            case GST_MESSAGE_STATE_CHANGED:
+            {
+                GstState oldstate, newstate, pendingstate, gsttargetstate;
+                gst_message_parse_state_changed(message, &oldstate, &newstate, &pendingstate);
+                gsttargetstate = GST_STATE_TARGET(bCtx->bin);
+                DEBUG_INFO_A4("old %s -> new %s ( pending %s, gsttarget %s )",
+                               gst_element_state_get_name(oldstate),
+                               gst_element_state_get_name(newstate),
+                               gst_element_state_get_name(pendingstate),
+                               gst_element_state_get_name(gsttargetstate) );
+                if(gsttargetstate!=bCtx->binWantedState)
+                {
+                    DEBUG_ERR_A1("WARNING: Gst target is not wanted target [%s]!!!",
+                                    gst_element_state_get_name(bCtx->binWantedState));
+                }
+                /* print out some more info */
+                if( pendingstate == GST_STATE_VOID_PENDING )
+                {
+                    if( newstate != bCtx->binWantedState )
+                    {
+                        DEBUG_INFO_A2("Gst in intermediate state transition (curr %s, target %s)",
+                                        gst_element_state_get_name(newstate),
+                                        gst_element_state_get_name(bCtx->binWantedState));
+                       break; // TL: add to avoid extra event sent below in this case...                
+                    }
+                    else
+                    {
+                        DEBUG_INFO_A1("Gst in wanted target state (%s)",
+                                        gst_element_state_get_name(newstate));
+                    }
+                }
+                if( oldstate!=GST_STATE_PLAYING && newstate==GST_STATE_PLAYING )
+                {
+                    /* send needed events */
+                    XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADMOVING, 0, NULL };
+                    XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+                    /* enable position tracking if needed */
+                    XAMediaPlayerAdapt_UpdatePositionCbTimer(mCtx);
+                }
+                if ( oldstate== GST_STATE_READY && newstate==GST_STATE_PAUSED)
+                {
+/*                    if ( mCtx->baseObj.pipeSinkThrCtx.dataHandle )
+                    {
+                        mCtx->baseObj.pipeSrcThrCtx.state = CPStateInitialized;
+                    }*/
+                }
+                break;
+            }
+
+            case GST_MESSAGE_ASYNC_DONE:
+            {
+                /* some async sequence ended */
+                XAAdaptationGst_CompleteAsyncWait(bCtx);
+                break;
+            }
+
+            case GST_MESSAGE_ERROR:
+            {
+                GError* error;
+                gchar* debug;
+                gst_message_parse_error(message, &error, &debug);
+                DEBUG_ERR_A1("Gst reports error \"%s\"", debug);
+                /* stop waiting any ongoing async operations */
+                XAAdaptationGst_CompleteAsyncWait(bCtx);
+                break;
+            }
+            case GST_MESSAGE_BUFFERING:
+            {
+                gint percent;
+                gst_message_parse_buffering(message, &percent);
+                DEBUG_INFO_A1("Gst message buffering %d", percent);
+                mCtx->buffering = percent;
+                {
+                    XAAdaptEvent event = {XA_PREFETCHITFEVENTS, XA_ADAPT_BUFFERING, 1, NULL };
+                    event.data = &mCtx->buffering;
+                XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+                }
+                break;
+            }
+            case GST_MESSAGE_ELEMENT:
+            {
+                DEBUG_INFO("GST_MESSAGE_ELEMENT");
+                if ((gst_structure_has_name(message->structure, "graphics-surface-created")) || 
+                    (gst_structure_has_name(message->structure, "graphics-surface-updated")))
+                {
+                     DEBUG_INFO("graphics-surface-created message recived");
+                }
+                break;
+            }
+            default:
+                break;
+        }
+    }
+    else //if (GST_MESSAGE_SRC(message)==(GstObject*)(bCtx->videosink))
+    {
+        switch( GST_MESSAGE_TYPE(message))
+        {
+            case GST_MESSAGE_ELEMENT:
+            {
+                DEBUG_INFO("GST_MESSAGE_ELEMENT");
+                if ((gst_structure_has_name(message->structure, "graphics-surface-created")) || 
+                    (gst_structure_has_name(message->structure, "graphics-surface-updated")))
+                {
+                     guint32 surfaceid0, surfaceid1, surfaceid2, surfaceid3;
+                     gint crop_rect_tl_x, crop_rect_tl_y, crop_rect_br_x, crop_rect_br_y;
+                     gint aspect_ratio_num, aspect_ratio_denom;
+                     
+                     GstObject *sink= GST_MESSAGE_SRC(message);
+     
+                     g_object_get(sink, "surfaceid0", &surfaceid0, NULL);
+                     g_object_get(sink, "surfaceid1", &surfaceid1,NULL);
+                     g_object_get(sink, "surfaceid2", &surfaceid2,NULL);
+                     g_object_get(sink, "surfaceid3", &surfaceid3,NULL);
+                     g_object_get(sink, "croprect_tl_x", &crop_rect_tl_x, NULL);
+                     g_object_get(sink, "croprect_tl_y", &crop_rect_tl_y, NULL);
+                     g_object_get(sink, "croprect_br_x", &crop_rect_br_x, NULL);
+                     g_object_get(sink, "croprect_br_y", &crop_rect_br_y, NULL);                
+                     g_object_get(sink, "aspectratio_num", &aspect_ratio_num, NULL);
+                     g_object_get(sink, "aspectratio_denom", &aspect_ratio_denom, NULL);                     
+/*
+                     surface_created(ngaVideoSinkPtr, surfaceid0,surfaceid1,surfaceid2,surfaceid3,crop_rect_tl_x,
+                     									crop_rect_tl_y,crop_rect_br_x,crop_rect_br_y,aspect_ratio_num,aspect_ratio_denom);                     
+*/
+                }
+                break;
+            }
+            default:
+                break;
+        }   
+    }
+    DEBUG_API("<-XAMediaPlayerAdapt_GstBusCb");    
+    return TRUE;
+}
+
+/*
+ * XAMediaPlayerAdaptationCtx* XAMediaPlayerAdapt_Create()
+ * Allocates memory for Media Player Adaptation Context and makes 1st phase initialization
+ * @param XADataSource *pDataSrc - pointer to OMX-AL data source
+ * @param XADataSource *pBankSrc - pointer to instrument bank structure in Mobile DLS, if NULL default will be used.
+ * @param XADataSink *pAudioSnk - pointer to OMX-AL audio sink definition
+ * @param XADataSink *pImageVideoSnk - pointer to OMX-AL image and video sink definition
+ * @returns XAMediaPlayerAdaptationCtx* - Pointer to created context, NULL if error occurs.
+ */
+XAAdaptationBaseCtx* XAMediaPlayerAdapt_Create(XADataSource *pDataSrc, XADataSource *pBankSrc,
+                                                      XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
+                                                      XADataSink *pVibra, XADataSink *pLEDArray)
+{
+    XAMediaPlayerAdaptationCtx *pSelf = NULL;
+    XAuint32 locType = 0;
+    XADataLocator_IODevice *ioDevice;
+    
+    DEBUG_API("->XAMediaPlayerAdapt_Create");
+    
+    //Create NGA Video Sink class
+/*    if(pImageVideoSnk)
+    {
+       ngaVideoSinkPtr = nga_video_sink_init();
+    }*/
+
+    pSelf = calloc(1, sizeof(XAMediaPlayerAdaptationCtx));
+    if ( pSelf)
+    {
+        if( XAAdaptationBase_Init(&(pSelf->baseObj.baseObj),XAMediaPlayerAdaptation)
+            != XA_RESULT_SUCCESS )
+        {
+            DEBUG_ERR("Failed to init base context!!!");
+            free(pSelf);
+            pSelf = NULL;
+            return NULL;
+        }
+        else
+        {
+            pSelf->xaSource = pDataSrc;
+            pSelf->xaBankSrc = pBankSrc;
+            pSelf->xaAudioSink = pAudioSnk;
+            pSelf->xaVideoSink = pImageVideoSnk;
+            pSelf->xaLEDArray = pLEDArray;
+            pSelf->xaVibra = pVibra;
+            pSelf->loopstart = 0;
+            pSelf->loopend = (gint64)GST_CLOCK_TIME_NONE;
+            pSelf->playrate = 1.0;
+            pSelf->rateprops = (XA_RATEPROP_SMOOTHVIDEO | XA_RATEPROP_SILENTAUDIO);
+            pSelf->curMirror = XA_VIDEOMIRROR_NONE;
+            pSelf->curRotation = 0;
+            pSelf->isobjsrc = XA_BOOLEAN_FALSE;
+            pSelf->cameraSinkSynced = XA_BOOLEAN_FALSE;
+/*            if(pImageVideoSnk && ngaVideoSinkPtr)
+            {
+               setup_native_display(ngaVideoSinkPtr, pImageVideoSnk);
+            }*/
+        }
+
+        if ( pDataSrc )
+		{
+			locType = *((XAuint32*)(pDataSrc->pLocator));
+			if ( locType == XA_DATALOCATOR_IODEVICE  )
+			{
+				ioDevice = (XADataLocator_IODevice*)(pDataSrc->pLocator);
+				if ( ioDevice->deviceType == XA_IODEVICE_CAMERA && !cameraRealized )
+				{
+					DEBUG_ERR("Preconditions violated - Camera object not realized");
+					XAAdaptationBase_Free(&pSelf->baseObj.baseObj);
+					free(pSelf);
+					pSelf = NULL;
+				}
+			}
+		}
+    }
+
+    DEBUG_API("<-XAMediaPlayerAdapt_Create");
+    return (XAAdaptationBaseCtx*)(&pSelf->baseObj);
+}
+
+
+
+/*
+ * XAresult XAMediaPlayerAdapt_PostInit()
+ * 2nd phase initialization of Media Player Adaptation Context
+ * @param XAMediaPlayerAdaptationCtx* ctx - pointer to Media Player adaptation context
+ * @return XAresult - Success value
+ */
+XAresult XAMediaPlayerAdapt_PostInit( XAAdaptationGstCtx* bCtx )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    GstStateChangeReturn gret;
+
+	XAMediaPlayerAdaptationCtx* ctx = NULL;
+	GstElement *videotest=NULL;
+
+    DEBUG_API("->XAMediaPlayerAdapt_PostInit");
+    if(bCtx == NULL || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAMediaPlayerAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    ctx = (XAMediaPlayerAdaptationCtx*)bCtx;
+    assert(ctx);
+    ret = XAAdaptationBase_PostInit( &bCtx->baseObj );
+    if( ret!=XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Base context postinit failed!!");
+        return ret;
+    }
+
+    /* top level bin for media player */
+    ctx->baseObj.bin = gst_pipeline_new("media_player");
+    /* Create Gst bus listener. */
+    ret = XAAdaptationGst_InitGstListener(bCtx);
+    if( ret!=XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Bus listener creation failed!!");
+        return ret;
+    }
+    /* Add Media Player specific handler */
+    if(ctx->baseObj.bus)
+    {
+        ctx->baseObj.busCb = XAMediaPlayerAdapt_GstBusCb;
+        gst_bus_add_signal_watch( ctx->baseObj.bus );
+        gst_bus_enable_sync_message_emission( ctx->baseObj.bus );
+        g_signal_connect(ctx->baseObj.bus, "message::eos", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::error", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::warning", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::state-changed", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::segment-done", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::async-done", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(ctx->baseObj.bus, "message::element", G_CALLBACK(bCtx->busCb), ctx );
+    }
+    else
+    {
+        DEBUG_ERR("Failed to create message bus");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    XAMetadataAdapt_PreInit(bCtx);
+
+    /* create pipeline */
+    ret = XAMediaPlayerAdapt_CreatePipeline(ctx);
+    if ( ret != XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Failed to create Media Player pipeline");
+        return ret;
+    }
+
+#ifdef XA_IMPL_MEASURE_GST_DELAY
+    ctx->baseObj.startTime = clock();
+#endif /* XA_IMPL_MEASURE_GST_DELAY */
+    /* roll up bin */
+    ctx->baseObj.binWantedState = GST_STATE_PAUSED;
+
+    XAAdaptationGst_PrepareAsyncWait(bCtx);
+    gret = gst_element_set_state( GST_ELEMENT(ctx->baseObj.bin), bCtx->binWantedState);
+    if( gret == GST_STATE_CHANGE_ASYNC )
+    {
+        DEBUG_INFO("Wait for preroll");
+        XAAdaptationGst_StartAsyncWait(bCtx);
+        DEBUG_INFO("Preroll ready");
+    }
+    else if( gret == GST_STATE_CHANGE_FAILURE )
+    {
+        DEBUG_ERR("Preroll FAILED");
+        ret = XA_RESULT_INTERNAL_ERROR;
+    }
+
+    bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+
+    gret = gst_element_get_state( GST_ELEMENT(bCtx->bin), NULL, NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+    if(GST_STATE(bCtx->bin)<GST_STATE_PAUSED)
+    {
+        DEBUG_INFO("Warning! Preroll not ready");
+        if( ctx->audioppbin && !(gst_pad_is_linked(gst_element_get_static_pad(ctx->audioppbin, "sink"))) )
+        {/*could not find suitable pad for audiopipeline - remove it*/
+            DEBUG_INFO("Warning! No suitable decodebin pad for audio pipeline!");
+            gst_element_set_state( GST_ELEMENT(ctx->audioppbin), GST_STATE_NULL);
+            gst_bin_remove(GST_BIN(bCtx->bin), ctx->audioppbin);
+            gst_element_set_state( GST_ELEMENT(ctx->audiosink), GST_STATE_NULL);
+            gst_bin_remove(GST_BIN(bCtx->bin), ctx->audiosink);
+        }
+        else if( ctx->videoppbin && !(gst_pad_is_linked(gst_element_get_static_pad(ctx->videoppbin, "videopp_sink"))) )
+        {/*could not find suitable pad for videopipeline - remove it*/
+            DEBUG_INFO("Warning! No suitable decodebin pad for video pipeline!");
+            gst_element_set_state( GST_ELEMENT(ctx->videoppbin), GST_STATE_NULL);
+            gst_bin_remove(GST_BIN(bCtx->bin), ctx->videoppbin);
+            gst_element_set_state( GST_ELEMENT(ctx->videosink), GST_STATE_NULL);
+            gst_bin_remove(GST_BIN(bCtx->bin), ctx->videosink);
+        }
+		gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+		gst_element_get_state( GST_ELEMENT(bCtx->bin), NULL, NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+		if(GST_STATE(bCtx->bin)==GST_STATE_PAUSED)
+		{
+			DEBUG_INFO("Retry preroll successful!")
+			ret = XA_RESULT_SUCCESS;
+		}
+    }
+    else
+    {
+        DEBUG_INFO("Preroll ready");
+    }
+
+#ifdef XA_IMPL_MEASURE_GST_DELAY
+    bCtx->endTime = clock();
+    double diff = bCtx->endTime - bCtx->startTime ;
+    diff = diff / CLOCKS_PER_SEC;
+    DEBUG_API_A1( "Starting up bin took %.4lf secs",diff);
+#endif /* XA_IMPL_MEASURE_GST_DELAY */
+    videotest = gst_bin_get_by_name(GST_BIN(bCtx->bin), "videotest");
+    if ( videotest && !ctx->isobjsrc )
+    {
+    	gst_element_set_state( GST_ELEMENT(videotest),GST_STATE_PLAYING);
+    }
+
+    XAMetadataAdapt_PostInit(bCtx);
+
+    if ( videotest )
+    {
+        gst_object_unref(videotest);
+    }
+
+    DEBUG_API("<-XAMediaPlayerAdapt_PostInit");
+    return ret;
+}
+
+/*
+ * void XAMediaPlayerAdapt_Destroy( XAMediaPlayerAdaptationCtx* ctx )
+ * Destroys Media Player Adaptation Context
+ * @param ctx - Media Player Adaptation context to be destroyed
+ */
+void XAMediaPlayerAdapt_Destroy( XAAdaptationGstCtx* bCtx )
+{
+    XAMediaPlayerAdaptationCtx* ctx = NULL;
+
+    DEBUG_API("->XAMediaPlayerAdapt_Destroy");
+    if(bCtx == NULL || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAMediaPlayerAdapt_Destroy");
+        return;
+    }
+    ctx = (XAMediaPlayerAdaptationCtx*)bCtx;
+
+    if( ctx->isobjsrc )
+    {   /* external source, unlink and remove now */
+        /*gst_object_unparent( GST_OBJECT(ctx->source) );*/
+        gst_element_unlink( ctx->source, ctx->codecbin );
+        /*gst_bin_remove( GST_BIN(bCtx->bin), ctx->source );*/
+        GST_OBJECT_FLAG_SET(GST_OBJECT(ctx->source),GST_OBJECT_FLOATING);
+    }
+#if 0
+    if ( ctx->xaSource )
+    {
+    	XAuint32 locType = *(XAuint32*)(ctx->xaSource->pLocator);
+    	switch (locType )
+    	{
+		case XA_DATALOCATOR_IODEVICE:
+		{
+			XADataLocator_IODevice* ioDevice = (XADataLocator_IODevice*)(ctx->xaSource->pLocator);
+			if ( ioDevice->deviceType == XA_IODEVICE_RADIO )
+			{
+				gst_object_unparent( GST_OBJECT(ctx->source) );
+				gst_element_unlink( ctx->source, ctx->codecbin );
+				gst_bin_remove( GST_BIN(bCtx->bin), ctx->source );
+				GST_OBJECT_FLAG_SET(GST_OBJECT(ctx->source),GST_OBJECT_FLOATING);
+			}
+		}
+		default:
+			break;
+    	}
+    }
+#endif
+
+    if( ctx->isobjasink && ctx->xaAudioSink && ctx->xaAudioSink->pLocator )
+    {
+        XAuint32 locType = *(XAuint32*)(ctx->xaAudioSink->pLocator);
+        switch ( locType )
+        {
+            case XA_DATALOCATOR_OUTPUTMIX:
+            {
+                XADataLocator_OutputMix* omix = (XADataLocator_OutputMix*)(ctx->xaAudioSink->pLocator);
+                XAOMixImpl* omixDevice = (XAOMixImpl*)(*omix->outputMix);
+                if(omixDevice)
+                {
+                    XAOutputMixAdapt_DisconnectObject((XAAdaptationGstCtx*)omixDevice->adaptationCtx, bCtx);
+                }
+                break;
+            }
+            default:
+                /* Vibra and LED need no handling */
+                break;
+        }
+
+    }
+
+    if( bCtx->bus )
+    {
+        gst_bus_remove_signal_watch( bCtx->bus );
+        gst_bus_disable_sync_message_emission ( bCtx->bus );
+    }
+    XAAdaptationGst_CancelAsyncWait(bCtx);
+
+    if( ctx->runpositiontimer )
+    {
+        g_source_remove(ctx->runpositiontimer);
+    }
+    XAMetadataAdapt_FreeVars(ctx->metadatavars);
+    XAAdaptationBase_Free( &bCtx->baseObj );
+    free(ctx);
+    ctx = NULL;
+
+    DEBUG_API("<-XAMediaPlayerAdapt_Destroy");
+}
+
+
+/*
+ * void XAMediaPlayerAdapt_CreatePipeline( XAMediaPlayerAdaptationCtx* ctx );
+ */
+XAresult XAMediaPlayerAdapt_CreatePipeline( XAMediaPlayerAdaptationCtx* ctx )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAboolean delayedlink = XA_BOOLEAN_FALSE;
+    XAboolean isPCM = XA_BOOLEAN_FALSE;
+    XAboolean isRawImage = XA_BOOLEAN_FALSE;
+    XAMediaType mediatype;
+    XAuint32 locType = 0;
+    GstCaps* encSrcCaps = NULL;
+    DEBUG_API("->XAMediaPlayerAdapt_CreatePipeline");
+
+    /* create and add data source */
+    XACommon_CheckDataSource(ctx->xaSource, &mediatype);
+    ctx->source = XAAdaptationGst_CreateGstSource( ctx->xaSource, "datasrc", &(ctx->isobjsrc), &isPCM, &isRawImage);
+    if( !(ctx->source) )
+    {
+        DEBUG_ERR("Could not create data source!!!");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    else
+    {
+        if(mediatype != XA_MEDIATYPE_AUDIO)
+        {
+          //temporary work around for video
+    	  encSrcCaps = gst_caps_new_simple ("video/h263-2000",
+                "framerate", GST_TYPE_FRACTION, 25, 1,
+                "pixel-aspect-ratio", GST_TYPE_FRACTION, 16, 9,
+                "width", G_TYPE_INT, 176,
+                "height", G_TYPE_INT, 144,
+                NULL);
+          g_object_set(G_OBJECT(ctx->source), "caps", encSrcCaps, NULL);
+        }
+
+        //boolRetVal = gst_bin_add(GST_BIN(pipeline), appsrc);
+    	
+    	
+    }
+
+    if ( !ctx->isobjsrc )
+    { /* Add other than camera source to media player bin */
+    	DEBUG_INFO("No camera source");
+    	gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->source);
+    }
+    else
+    {
+       GstCaps* encSrcCaps;
+       encSrcCaps = gst_caps_new_simple("video/x-raw-yuv",
+                   "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'),
+                   "framerate", GST_TYPE_FRACTION, 30, 1,
+                   NULL);
+       DEBUG_INFO_A1("new camera encoding filter: %s",gst_caps_to_string(encSrcCaps));
+       g_object_set( G_OBJECT(ctx->source), "filter-caps",encSrcCaps,NULL);
+       gst_caps_unref(encSrcCaps);
+    }
+
+    /* create and add codec bin */
+    if( !(ctx->isobjsrc || isPCM) )
+    {
+    	DEBUG_INFO("Create decodebin");
+        if(mediatype == XA_MEDIATYPE_AUDIO)
+        {
+           ctx->codecbin = gst_element_factory_make( "decodebin" , "mpcodecbin" );
+        }
+        else
+        {
+           ctx->codecbin = gst_element_factory_make( "identity" , "mpcodecbin" );
+        }
+    }
+    else if(ctx->isobjsrc )
+    { /* object sources produce framed raw data, decodebin only causes trouble */ //shyward
+    	DEBUG_INFO("Create identity")
+        ctx->codecbin = gst_element_factory_make( "identity" , "mpcodecbin" );
+    }
+    else if(isPCM)
+    { /* decodebin does not know how to handle PCM files */
+    	DEBUG_INFO("Create audioparse")
+        ctx->codecbin = gst_element_factory_make( "audioparse" , "mpcodecbin" );
+    }
+    else if ( isRawImage)
+    { /* decodebin does not know how to handle raw unframed video data */
+    	DEBUG_INFO("Create videoparse")
+        ctx->codecbin = gst_element_factory_make( "videoparse", "mpcodecbin" );
+    }
+
+    if( ctx->codecbin )
+    {
+        gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->codecbin);
+        if ( !ctx->isobjsrc )
+        {
+            if(mediatype == XA_MEDIATYPE_AUDIO)
+            {
+               if( !gst_element_link(ctx->source, ctx->codecbin) )
+               {
+                    DEBUG_ERR("Could not link source to decodebin!!");
+                    return XA_RESULT_INTERNAL_ERROR;
+               }
+            }
+            else
+            {
+			   if( !gst_element_link_filtered(ctx->source, ctx->codecbin, encSrcCaps ) )
+			   {
+			    	DEBUG_ERR("Could not link source to decodebin!!");
+				    return XA_RESULT_INTERNAL_ERROR;
+			   }
+            }
+        }
+        else
+        { /* Link camera source by using ghost-pads, because elements are in different bins */
+
+        	GstPad *cameraBinGhostPad=NULL;
+        	GstPad* ghost=NULL;
+        	GstElement *camTee=NULL;
+        	GstStateChangeReturn gret;
+        	GstPad *mpGhostSink=NULL;
+
+        	/* Set external camera source to ready for pipeline manipulation */
+        	DEBUG_INFO("Set ext-source PAUSED for pipeline manipulation");
+			gret = gst_element_set_state( GST_ELEMENT(ctx->source), GST_STATE_READY);
+			if(gret == GST_STATE_CHANGE_SUCCESS)
+			    {
+                gret = gst_element_get_state( GST_ELEMENT(ctx->source), NULL,NULL,XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+			    }
+
+			/* Add new ghost-pad to external camera source */
+        	camTee = gst_bin_get_by_name( GST_BIN(ctx->source), "CamTee");
+        	if ( !camTee )
+        	{
+        		DEBUG_ERR("Could not get tee-element from camera");
+        	}
+        	cameraBinGhostPad = gst_element_get_request_pad( camTee, "src%d" );
+        	if ( !cameraBinGhostPad )
+        	{
+        		DEBUG_ERR("Could not get new src-pad from CamTee element");
+        	}
+			gst_element_add_pad(ctx->source, gst_ghost_pad_new("MPObjSrc",cameraBinGhostPad));
+			ghost = gst_element_get_static_pad( GST_ELEMENT(ctx->source), "MPObjSrc" );
+			DEBUG_INFO_A2("Setting element:%s pad:%s to blocking.",
+							gst_element_get_name(ctx->baseObj.bin),
+							gst_pad_get_name(ghost));
+			/* Set newly created pad to blocking */
+			gst_pad_set_blocked_async(ghost, TRUE, XAAdaptationGst_PadBlockCb, NULL);
+
+
+			/* Create new ghost-pad to media player pipeline where external camera is connected */
+        	mpGhostSink = gst_element_get_static_pad( GST_ELEMENT(ctx->codecbin), "sink");
+			gst_element_add_pad(ctx->baseObj.bin, gst_ghost_pad_new("MPObjSink",mpGhostSink));
+
+			if ( !gst_element_link_pads( GST_ELEMENT(ctx->source), "MPObjSrc",
+										GST_ELEMENT(ctx->baseObj.bin), "MPObjSink") )
+			{
+				DEBUG_ERR("Could not link camera:MPObjSrc to videofilter:MPObjSink");
+				return XA_RESULT_INTERNAL_ERROR;
+			}
+
+			if ( cameraBinGhostPad )
+			{
+				gst_object_unref( cameraBinGhostPad );
+			}
+			if ( ghost )
+			{
+				gst_object_unref( ghost );
+			}
+			if ( mpGhostSink )
+			{
+				gst_object_unref( mpGhostSink );
+			}
+			if ( camTee )
+			{
+				gst_object_unref( camTee );
+			}
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Could not create decoder bin!!!");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    /* create and add video stream pipeline */
+    if(!ctx->xaLEDArray && !ctx->xaVibra && mediatype!=XA_MEDIATYPE_AUDIO) /*no video for these*/
+    {
+        /* create video processing pipeline */
+        ctx->videoppbin = XAAdaptationGst_CreateVideoPP( );
+        if( ctx->videoppbin )
+        {
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videoppbin);
+            //shyward ---link filtered???
+            // boolRetVal = gst_element_link_filtered(appsrc, videosink, caps);
+			      //if(!gst_element_link(ctx->codecbin, ctx->videoppbin))
+            if(!gst_element_link_filtered(ctx->codecbin, ctx->videoppbin,encSrcCaps))
+            {
+                /* probably dynamic pads in codecbin */
+                DEBUG_INFO("Could not link codec to videopp, trying delayed link");
+                delayedlink = XA_BOOLEAN_TRUE;
+            }
+            ctx->videoScrSrcPad = gst_element_get_static_pad(ctx->videoppbin, "videopp_src");
+        }
+        else
+        {
+            DEBUG_ERR("Could not create video pp bin!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        //shyward
+        /* Black screen pipeline not needed under Symbian. May need to revist for acceptance testing
+        ctx->videoppBScrbin = XAAdaptationBase_CreateVideoPPBlackScr( );
+        if( ctx->videoppBScrbin )
+        {
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videoppBScrbin);
+            ctx->blackScrSrcPad = gst_element_get_static_pad(ctx->videoppBScrbin, "videoppBSrc_src");
+        }
+        else
+        {
+            DEBUG_ERR("Could not create video pp bin for black screen!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        */
+        ctx->inputSelector = XAAdaptationGst_CreateInputSelector( );
+        if( ctx->inputSelector )
+        {
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->inputSelector);
+            ctx->videoScrSinkPad = gst_element_get_request_pad(ctx->inputSelector, "sink%d");
+            ctx->blackScrSinkPad = gst_element_get_request_pad(ctx->inputSelector, "sink%d");
+            gst_pad_link(ctx->blackScrSrcPad, ctx->blackScrSinkPad);
+            gst_pad_link(ctx->videoScrSrcPad, ctx->videoScrSinkPad);
+        }
+
+        //shyward - We have no video filter at this time
+        /*
+        ctx->filter = gst_element_factory_make("ffmpegcolorspace", "videofilter");
+        gst_bin_add( GST_BIN(ctx->baseObj.bin), ctx->filter);
+        if ( !gst_element_link( ctx->inputSelector, ctx->filter ) )
+        {
+		   DEBUG_ERR("Could not link ctx->filter <-> ctx->inputSelector");
+		   return XA_RESULT_INTERNAL_ERROR;
+	   }
+	   */
+        /* create video pipe sink */
+        ctx->videosink = XAAdaptationGst_CreateGstSink( ctx->xaVideoSink, "videosink", &(ctx->isobjvsink) );
+        /* NOTE: no valid object sinks for video output available */
+        if( ctx->videosink )
+        {
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videosink);
+
+            //shyward
+            //if(!gst_element_link(ctx->filter, ctx->videosink))
+            if(!gst_element_link_filtered(ctx->videoppbin, ctx->videosink,encSrcCaps))
+            {
+                DEBUG_ERR("Could not link videopp to videosink!!");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+            else
+            {
+            	gst_caps_unref(encSrcCaps);
+            }
+        }
+        else
+        {
+            DEBUG_ERR("Could not create video sink!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+    }
+    else
+    {
+        DEBUG_INFO("Media does not contain video!");
+    }
+
+    /* create and add audio stream pipeline */
+
+    if(!ctx->xaLEDArray && !ctx->xaVibra && mediatype!=XA_MEDIATYPE_IMAGE) /*no audio for these*/
+    {
+    /* create audio post processing pipeline */
+    ctx->audioppbin = XAAdaptationGst_CreateAudioPP( );
+    if( ctx->audioppbin )
+    {
+        gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->audioppbin);
+        if(!gst_element_link(ctx->codecbin, ctx->audioppbin))
+        {
+            DEBUG_INFO("Could not link codec to audiopp, trying delayed link");
+            delayedlink = XA_BOOLEAN_TRUE;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Could not create audio pp bin!!!!");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    /* create audio pipe sink */
+    ctx->audiosink = XAAdaptationGst_CreateGstSink( ctx->xaAudioSink, "audiosink", &(ctx->isobjasink) );
+    if( ctx->audiosink )
+    {
+        if( ctx->isobjasink && ctx->xaAudioSink && ctx->xaAudioSink->pLocator )
+        {
+            locType = *(XAuint32*)(ctx->xaAudioSink->pLocator);
+            switch ( locType )
+            {
+                case XA_DATALOCATOR_OUTPUTMIX:
+                {
+                    XADataLocator_OutputMix* omix = (XADataLocator_OutputMix*)(ctx->xaAudioSink->pLocator);
+                    XAOMixImpl* omixDevice = (XAOMixImpl*)(*omix->outputMix);
+                    if(omixDevice)
+                    {
+                        XAOutputMixAdapt_ConnectObject((XAAdaptationGstCtx*)omixDevice->adaptationCtx, &(ctx->baseObj), ctx->audiosink);
+                    }
+                    break;
+                }
+                default:
+                    /* Vibra and LED need no handling */
+                    break;
+            }
+        }
+        gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->audiosink);
+        if(!gst_element_link(ctx->audioppbin, ctx->audiosink))
+        {
+            DEBUG_ERR("Could not link audiopp to audiosink!!");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Could not create audio sink!!!!");
+        return XA_RESULT_INTERNAL_ERROR;
+        }
+    }
+    else
+    {
+        DEBUG_INFO("Media does not contain audio!");
+    }
+
+    if(delayedlink)
+    {
+        /* listen for dynamically created pads */
+        g_signal_connect (ctx->codecbin, "pad-added", G_CALLBACK (XAMediaPlayerAdapt_NewPadCb), ctx);
+    }
+    locType = *((XAuint32*)(ctx->xaSource->pLocator));
+
+    DEBUG_API("<-XAMediaPlayerAdapt_CreatePipeline");
+    return ret;
+}
+
+/*
+ * gboolean XAMediaPlayerAdapt_PositionUpdate(gpointer ctx)
+ * callback.
+ * If position tracking enabled, periodic timer calls this method every XA_ADAPT_PU_INTERVAL msecs
+ * @return false to stop periodic calls
+ */
+gboolean XAMediaPlayerAdapt_PositionUpdate(gpointer ctx)
+{
+    XAAdaptationGstCtx *bCtx = (XAAdaptationGstCtx*) ctx;
+    XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) ctx;
+    gint64 position;
+    XAmillisecond posMsec;
+    GstFormat format = GST_FORMAT_TIME;
+    XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
+
+    DEBUG_API("->XAMediaPlayerAdapt_PositionUpdate");
+    if ( !gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &position ) )
+    {
+        DEBUG_ERR("Gst: Failed to get position");
+        return( mCtx->runpositiontimer );
+    }
+    DEBUG_INFO_A1("Current position %"GST_TIME_FORMAT, GST_TIME_ARGS(position));
+    if( mCtx && mCtx->trackpositionenabled )
+    {
+        posMsec = GST_TIME_AS_MSECONDS(position);/*Warning ok due to used API specification*/
+        DEBUG_INFO_A1("mCtx->trackpositionenabled sending update, position:&ld ", posMsec);
+        /* send needed events */
+        event.data=&posMsec;
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+    if( mCtx && mCtx->loopingenabled)
+    {
+    	DEBUG_INFO_A2("mCtx->loopingenabled, current position:%lu, loopend:%lu ", position, mCtx->loopend);
+        if( (position >= mCtx->loopend) &&
+            (mCtx->lastpos < mCtx->loopend) )
+        {
+            DEBUG_INFO_A2("Restart loop from %"GST_TIME_FORMAT" to %"GST_TIME_FORMAT,
+                          GST_TIME_ARGS(mCtx->loopstart), GST_TIME_ARGS(mCtx->loopend));
+            gst_element_seek( bCtx->bin, mCtx->playrate, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE),
+                              GST_SEEK_TYPE_SET, mCtx->loopstart,
+                              GST_SEEK_TYPE_NONE, (gint64)GST_CLOCK_TIME_NONE );
+            mCtx->lastpos = mCtx->loopstart;
+            if( mCtx && mCtx->trackpositionenabled )
+            {
+            	DEBUG_INFO_A1("mCtx->trackpositionenabled sending looping update, position:%&u ", posMsec);
+                posMsec = GST_TIME_AS_MSECONDS(mCtx->lastpos);/*Warning ok due to used API specification*/
+                /* send needed events */
+                event.data=&posMsec;
+                XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+            }
+        }
+        else
+        {
+            mCtx->lastpos = position;
+        }
+    }
+    DEBUG_API("<-XAMediaPlayerAdapt_PositionUpdate");
+    /* return false to stop timer */
+    return( mCtx->runpositiontimer );
+}
+
+/*
+ * XAresult XAMediaPlayerAdapt_UpdatePositionCbTimer
+ * Enable/disable periodic position tracking callback timer
+ */
+XAresult XAMediaPlayerAdapt_UpdatePositionCbTimer(XAMediaPlayerAdaptationCtx* mCtx)
+{
+    DEBUG_API_A2("->XAMediaPlayerAdapt_UpdatePositionCbTimer: trackposition %u, tracklooping %u",
+                mCtx->trackpositionenabled, mCtx->loopingenabled);
+
+    if(mCtx->runpositiontimer==0 && (mCtx->trackpositionenabled || mCtx->loopingenabled))
+    {
+        DEBUG_INFO("Start position tracking timer");
+        mCtx->positionCb = &XAMediaPlayerAdapt_PositionUpdate;
+        /* if play is already on, create a timer to track position of playback */
+        if( GST_STATE(mCtx->baseObj.bin) == GST_STATE_PLAYING )
+        {
+            mCtx->runpositiontimer = g_timeout_add(XA_ADAPT_PU_INTERVAL, mCtx->positionCb, mCtx);
+        }
+    }
+    else if (mCtx->runpositiontimer!=0 && !(mCtx->trackpositionenabled || mCtx->loopingenabled))
+    {
+        DEBUG_INFO("Stop position tracking timer");
+        mCtx->trackpositionenabled = XA_BOOLEAN_FALSE;
+        if(mCtx->runpositiontimer > 0)
+        {
+            g_source_remove(mCtx->runpositiontimer);
+            mCtx->runpositiontimer=0;
+        }
+    }
+    DEBUG_API("<-XAMediaPlayerAdapt_UpdatePositionCbTimer");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAMediaPlayerAdapt_InitContentPipeSrc(ctx)
+ * CP code: can be moved to context base
+ */
+/*XAresult XAMediaPlayerAdapt_InitContentPipeSrc(XAMediaPlayerAdaptationCtx* ctx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    CPresult res;
+    GstStateChangeReturn gstRet = GST_STATE_CHANGE_SUCCESS;
+    DEBUG_API("->XAMediaPlayerAdapt_InitContentPipeSrc");
+    ctx->baseObj.pipeSrcThrCtx.appSrc = GST_APP_SRC(ctx->source);
+    ctx->baseObj.pipeSrcThrCtx.pipe = (XADataLocator_ContentPipe*)(ctx->xaSource->pLocator);
+
+     Create thread for content pipe source
+    ret = XAImpl_CreateThreadHandle( &(ctx->baseObj.pipeSrcThr) );
+    if ( ret != XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Could not create thread for content pipe source!");
+        DEBUG_API("<-XAMediaPlayerAdapt_InitContentPipeSrc");
+        return ret;
+    }
+
+     Create semaphore for content pipe source 
+    ret = XAImpl_CreateSemaphore( &(ctx->baseObj.pipeSrcThrCtx.stateSem));
+    if ( ret != XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Could not create semaphore for content pipe source!");
+        DEBUG_API("<-XAMediaPlayerAdapt_InitContentPipeSrc");
+        return ret;
+    }
+
+     Open content pipe 
+    res = ctx->baseObj.pipeSrcThrCtx.pipe->pContentPipe->Open(&(ctx->baseObj.pipeSrcThrCtx.dataHandle),
+                                                (CPstring)(ctx->baseObj.pipeSrcThrCtx.pipe->URI),
+                                                CP_AccessRead );
+    if ( res ==  EXIT_FAILURE )
+    {
+        DEBUG_ERR("Could not open Content Pipe!")
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    res = ctx->baseObj.pipeSrcThrCtx.pipe->pContentPipe->RegisterCallback( &(ctx->baseObj.pipeSrcThrCtx.dataHandle), &XAAdaptationBase_ContentPipeSrcCb);
+    if ( res == EXIT_FAILURE )
+    {
+        DEBUG_ERR("Could not register content pipe callbacks!")
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    gstRet = gst_element_set_state( GST_ELEMENT(ctx->source), GST_STATE_PAUSED);
+    gst_element_sync_state_with_parent( GST_ELEMENT( ctx->source));
+
+    XAImpl_StartThread( &(ctx->baseObj.pipeSrcThr), NULL, &XAAdaptationBase_ContentPipeScrThrFunc, &(ctx->baseObj.pipeSrcThrCtx) );
+
+    DEBUG_API("<-XAMediaPlayerAdapt_InitContentPipeSrc");
+    return ret;
+}*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediaplayeradaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAMEDIAPLAYERADAPTCTX_H
+#define XAMEDIAPLAYERADAPTCTX_H
+
+#include "xaadaptationgst.h"
+#include "xametadataadaptation.h"
+/* TYPEDEFS */
+
+typedef struct XAMediaPlayerAdaptationCtx_ XAMediaPlayerAdaptationCtx;
+
+/*
+ * Structure for Media Player specific gst-adaptation.
+ */
+typedef struct XAMediaPlayerAdaptationCtx_
+{
+    /* Parent*/
+    XAAdaptationGstCtx_    baseObj;
+
+    /* OMX-AL Variables */
+    XADataSource            *xaSource, *xaBankSrc;
+    XADataSink              *xaAudioSink, *xaVideoSink, *xaLEDArray, *xaVibra;
+
+    /* GST elements */
+    GstElement              *source;
+    XAboolean               isobjsrc;    /*is source another XA object?*/
+    GstElement              *codecbin;
+    GstElement              *audioppbin;
+    GstElement              *videoppbin;
+    GstElement              *filter;
+    GstElement              *videoppBScrbin;
+    GstElement              *inputSelector;
+    GstPad                  *blackScrSrcPad;
+    GstPad                  *videoScrSrcPad;
+    GstPad                  *blackScrSinkPad;
+    GstPad                  *videoScrSinkPad;
+    GstElement              *audiosink;
+    XAboolean               isobjasink;   /*is audio sink another XA object?*/
+    GstElement              *videosink;
+    XAboolean               isobjvsink;   /*is video sink another XA object?*/
+
+    XAboolean               mute;
+    XAuint32                imageEffectID;
+    XAboolean               isStereoPosition;
+    XAmillidegree           curRotation;
+    XAuint32                curMirror;
+
+    XAint32                 buffering;
+
+    /* internals */
+    XAboolean               trackpositionenabled;
+    guint                   runpositiontimer;
+    GSourceFunc             positionCb;
+    gint64                  lastpos;
+
+    XAboolean               loopingenabled;
+    gint64                  loopstart;
+    gint64                  loopend;
+
+    gdouble                 playrate;
+    guint32                 rateprops;
+
+    XAboolean               cameraSinkSynced;
+
+    XAMetadataAdaptVars     *metadatavars;
+
+} XAMediaPlayerAdaptationCtx_;
+
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XAMediaPlayerAdapt_Create( XADataSource *pDataSrc, XADataSource *pBankSrc,
+                                                       XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
+                                                       XADataSink *pVibra, XADataSink *pLEDArray);
+XAresult XAMediaPlayerAdapt_PostInit( XAAdaptationGstCtx* bCtx );
+void XAMediaPlayerAdapt_Destroy( XAAdaptationGstCtx* bCtx );
+XAresult XAMediaPlayerAdapt_UpdatePositionCbTimer(XAMediaPlayerAdaptationCtx_* mCtx);
+
+XAresult XAMediaPlayerAdapt_InitContentPipeSrc(XAMediaPlayerAdaptationCtx* ctx);
+#endif /*XAMEDIAPLAYERADAPTCTX_H*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,1807 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include <assert.h>
+#include <gst.h>
+#include <gstappsink.h>
+#include "xacapabilitiesmgr.h"
+#include "xamediarecorderadaptctx.h"
+#include "xacameraadaptctx.h"
+
+
+extern XAboolean cameraRealized;
+extern XACameraAdaptationCtx_* cameraCtx;
+
+/*forward declarations*/
+GstElement* XAMediaRecorderAdapt_CreateEncodeBin(
+        XAMediaRecorderAdaptationCtx* ctx);
+XAresult XAMediaRecorderAdapt_CreatePipeline(
+        XAMediaRecorderAdaptationCtx* ctx);
+void XAMediaRecorderAdapt_BufferAvailable(GstElement* sink,
+        gpointer user_data);
+/** Creates the caps gst element */
+static XAresult XAMediaRecorderAdapt_CreateCapsFilter( XAMediaRecorderAdaptationCtx* ctx );
+
+/*
+ * gboolean XAMediaRecorderAdapt_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
+ * MediaPlayer Gst-bus message handler (Callback)
+ */
+gboolean XAMediaRecorderAdapt_GstBusCb(GstBus *bus, GstMessage *message,
+        gpointer data)
+    {
+    XAAdaptationGstCtx* bCtx = (XAAdaptationGstCtx*) data;
+    /* only listen to pipeline messages */
+    if (GST_MESSAGE_SRC(message)==GST_OBJECT(bCtx->bin))
+        {
+        XAMediaRecorderAdaptationCtx* mCtx = NULL;
+        DEBUG_API_A2("->XAMediaRecorderAdapt_GstBusCb:\"%s\" from object \"%s\"",
+                        GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+        mCtx = (XAMediaRecorderAdaptationCtx*)data;
+
+        switch( GST_MESSAGE_TYPE(message))
+        {
+            case GST_MESSAGE_EOS:
+            {
+                /* stop position tracking */
+                if(mCtx->runpositiontimer > 0)
+                {
+                    g_source_remove(mCtx->runpositiontimer);
+                    mCtx->runpositiontimer=0;
+                }
+
+                /* complete any ongoing client async operations */
+                XAAdaptationGst_CompleteAsyncWait(bCtx);
+
+                /* send needed events */
+                {
+                    XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADATLIMIT, 0, NULL };
+                    XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+                }
+                if(mCtx->positionCb)
+                {
+                    mCtx->positionCb(bCtx);
+                }
+                bCtx->binWantedState = GST_STATE_PAUSED;
+                break;
+            }
+            case GST_MESSAGE_STATE_CHANGED:
+            {
+                GstState oldstate, newstate, pendingstate, gsttargetstate;
+                gst_message_parse_state_changed(message, &oldstate, &newstate, &pendingstate);
+                gsttargetstate = GST_STATE_TARGET(bCtx->bin);
+                DEBUG_INFO_A4("old %d -> new %d (-> pending %d -> gsttarget %d)",
+                               oldstate, newstate, pendingstate, gsttargetstate);
+                if(gsttargetstate!=bCtx->binWantedState)
+                {
+                    DEBUG_ERR_A1("WARNING: Gst target is not wanted target [%d]!!!", bCtx->binWantedState);
+                }
+                /* print out some more info */
+                if( pendingstate == GST_STATE_VOID_PENDING )
+                {
+                    if( newstate != bCtx->binWantedState )
+                    {
+                        DEBUG_INFO_A2("Gst in intermediate state transition (curr %d, target %d)",
+                                    newstate,bCtx->binWantedState);
+                    }
+                    else
+                    {
+                        DEBUG_INFO_A1("Gst in wanted target state (%d)",newstate);
+                    }
+                }
+                if( oldstate!=GST_STATE_PLAYING && newstate==GST_STATE_PLAYING )
+                {
+                    XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADMOVING, 0, NULL };
+                    /* send needed events */
+                    XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+                    /* enable position tracking if needed */
+                    if( mCtx->runpositiontimer==0 && mCtx->trackpositionenabled && mCtx->positionCb )
+                    {
+                        mCtx->runpositiontimer = g_timeout_add(XA_ADAPT_PU_INTERVAL, mCtx->positionCb, mCtx);
+                    }
+                }
+                break;
+            }
+
+            case GST_MESSAGE_ASYNC_DONE:
+            {
+                /* some async sequence ended */
+                XAAdaptationGst_CompleteAsyncWait(bCtx);
+                break;
+            }
+
+            case GST_MESSAGE_ERROR:
+            {
+                GError* error;
+                gchar* debug;
+                gst_message_parse_error(message, &error, &debug);
+                DEBUG_ERR_A1("Gst reports error \"%s\"", debug);
+                /* stop waiting any ongoing async operations */
+                XAAdaptationGst_CompleteAsyncWait(bCtx);
+                break;
+            }
+            case GST_MESSAGE_WARNING:
+            {
+                GError* error;
+                gchar* debug;
+                gst_message_parse_warning(message, &error, &debug);
+                DEBUG_ERR_A1("Gst reports warning \"%s\"", debug);
+                /* stop waiting any ongoing async operations */
+                XAAdaptationGst_CompleteAsyncWait(bCtx);
+                break;
+            }
+            default:
+                break;
+        }
+    DEBUG_API("<-XAMediaRecorderAdapt_GstBusCb");
+    }
+    return TRUE;
+    }
+
+/*
+ * XAAdaptationGstCtx* XAMediaRecorderAdapt_Create()
+ * Allocates memory for Media Recorder Adaptation Context and makes 1st phase initialization
+ * @param XADataSource *pAudioSrc - pointer to OMX-AL audio source
+ * @param XADataSource *pImageVideoSrc - pointer image/video source
+ * @param XADataSink *pDataSnk - pointer to OMX-AL sink
+ * @returns XAMediaRecorderAdaptationCtx* - Pointer to created context, NULL if error occurs.
+ */
+XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create(XADataSource* pAudioSrc,
+        XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes)
+    {
+    XAMediaRecorderAdaptationCtx *pSelf = NULL;
+    XAuint32 locType = 0;
+    XADataLocator_IODevice *ioDevice;
+    DEBUG_API("->XAMediaRecorderAdapt_Create");
+
+    pSelf = (XAMediaRecorderAdaptationCtx*)calloc(1, sizeof(XAMediaRecorderAdaptationCtx));
+    if (pSelf)
+        {
+        if (XAAdaptationGst_Init(&(pSelf->baseObj),
+                XAMediaRecorderAdaptation) != XA_RESULT_SUCCESS)
+            {
+            DEBUG_ERR("Failed to init base context!!!");
+            free(pSelf);
+            pSelf = NULL;
+            DEBUG_API("<-XAMediaRecorderAdapt_Create");
+            return NULL;
+            }
+        else
+            {
+            pSelf->baseObj.baseObj.fwtype = FWMgrFWGST;
+            pSelf->xaAudioSource = pAudioSrc;
+            pSelf->xaVideoSource = pImageVideoSrc;
+            pSelf->xaSink = pDataSnk;
+/*            pSelf->baseObj.pipeSinkThrCtx.state = CPStateNull;*/
+            pSelf->xaRecordState = XA_RECORDSTATE_STOPPED;
+            pSelf->curMirror = XA_VIDEOMIRROR_NONE;
+            pSelf->curRotation = 0;
+            pSelf->recModes = recModes;
+            pSelf->isRecord = XA_BOOLEAN_FALSE;
+
+            /* defaults from API spec */
+            pSelf->imageEncSettings.width = 640;
+            pSelf->imageEncSettings.height = 480;
+            pSelf->imageEncSettings.compressionLevel = 0;
+            pSelf->imageEncSettings.encoderId = XA_IMAGECODEC_JPEG;
+            pSelf->imageEncSettings.colorFormat = XA_COLORFORMAT_UNUSED;
+            /* no specified defaults for rest, determined later from container type */
+            pSelf->videoEncSettings.encoderId = XA_ADAPTID_UNINITED;
+            pSelf->videoEncSettings.width = 640;
+            pSelf->videoEncSettings.height = 480;
+            pSelf->videoEncSettings.frameRate = 15;
+            pSelf->audioEncSettings.encoderId = XA_ADAPTID_UNINITED;
+            pSelf->audioEncSettings.channelsIn = 2;
+            pSelf->audioEncSettings.channelsOut = 2;
+            pSelf->audioEncSettings.bitsPerSample = 8;
+            pSelf->audioEncSettings.bitRate = 128;
+            pSelf->audioEncSettings.sampleRate = 44100;
+            }
+
+        if (pImageVideoSrc)
+            {
+            locType = *((XAuint32*) (pImageVideoSrc->pLocator));
+            if (locType == XA_DATALOCATOR_IODEVICE)
+                {
+                ioDevice
+                        = (XADataLocator_IODevice*) (pImageVideoSrc->pLocator);
+                if (ioDevice->deviceType == XA_IODEVICE_CAMERA
+                        && !cameraRealized)
+                    {
+                    DEBUG_ERR("Preconditions violated - Camera object not realized");
+                    XAAdaptationBase_Free(&pSelf->baseObj.baseObj);
+                    free(pSelf);
+                    pSelf = NULL;
+                    DEBUG_API("<-XAMediaRecorderAdapt_Create");
+                    return NULL;
+                    }
+                }
+            }
+        }
+
+    DEBUG_API("<-XAMediaRecorderAdapt_Create");
+    return (XAAdaptationBaseCtx*) &pSelf->baseObj;
+    }
+
+/*
+ * XAresult XAMediaRecorderAdapt_PostInit()
+ * 2nd phase initialization of Media Recorder Adaptation Context
+ * @param XAAdaptationGstCtx* ctx - pointer to Media Recorder adaptation context
+ * @return XAresult - Success value
+ */
+XAresult XAMediaRecorderAdapt_PostInit(XAAdaptationGstCtx* bCtx)
+    {
+    GstStateChangeReturn gret;
+
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaRecorderAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XAMediaRecorderAdapt_PostInit");
+    if (bCtx == NULL || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+        {
+        DEBUG_ERR("Invalid parameter!!");DEBUG_API("<-XAMediaRecorderAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+        }
+    ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+    ret = XAAdaptationGst_PostInit(bCtx);
+    if (ret != XA_RESULT_SUCCESS)
+        {
+        DEBUG_ERR("Gst context postinit failed!!");
+        return ret;
+        }
+
+    /* top level bin for media recorder */
+    bCtx->bin = gst_pipeline_new("media_recorder");
+
+    /* Create Gst bus listener. */
+    ret = XAAdaptationGst_InitGstListener(bCtx);
+    if (ret != XA_RESULT_SUCCESS)
+        {
+        DEBUG_ERR("Bus listener creation failed!!");
+        return ret;
+        }
+    /* Add Media Recorder specific handler */
+    if (bCtx->bus)
+        {
+        bCtx->busCb = XAMediaRecorderAdapt_GstBusCb;
+        gst_bus_add_signal_watch(bCtx->bus);
+        g_signal_connect(bCtx->bus, "message::eos", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(bCtx->bus, "message::error", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(bCtx->bus, "message::warning", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(bCtx->bus, "message::state-changed", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(bCtx->bus, "message::segment-done", G_CALLBACK(bCtx->busCb), ctx );
+        g_signal_connect(bCtx->bus, "message::async-done", G_CALLBACK(bCtx->busCb), ctx );
+        }
+    else
+        {
+        DEBUG_ERR("Failed to create message bus");
+        return XA_RESULT_INTERNAL_ERROR;
+        }
+
+    XAMetadataAdapt_PreInit(bCtx);
+
+    /* create pipeline */
+    ret = XAMediaRecorderAdapt_CreatePipeline(ctx);
+    if (ret != XA_RESULT_SUCCESS)
+        {
+        DEBUG_ERR("Failed to create recorder pipeline");
+        return XA_RESULT_INTERNAL_ERROR;
+        }
+
+#ifdef XA_IMPL_MEASURE_GST_DELAY
+    bCtx->startTime = clock();
+#endif /* XA_IMPL_MEASURE_GST_DELAY */
+    /* roll up bin */
+    bCtx->binWantedState = GST_STATE_PAUSED;
+    XAAdaptationGst_PrepareAsyncWait(bCtx);
+    gret = gst_element_set_state(GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+    if (gret == GST_STATE_CHANGE_ASYNC)
+        {
+        DEBUG_INFO("Wait for preroll");
+        XAAdaptationGst_StartAsyncWait(bCtx);DEBUG_INFO("Preroll ready");
+        }
+    else if (gret == GST_STATE_CHANGE_FAILURE)
+        {
+        DEBUG_ERR("Preroll FAILED");
+        /*ret = XA_RESULT_INTERNAL_ERROR;*/
+        }
+#ifdef XA_IMPL_MEASURE_GST_DELAY
+    bCtx->endTime = clock();
+    double diff = bCtx->endTime - bCtx->startTime;
+    diff = diff / CLOCKS_PER_SEC;
+    DEBUG_API_A1( "Starting up bin took %.4lf secs",diff);
+#endif /* XA_IMPL_MEASURE_GST_DELAY */
+    XAMetadataAdapt_PostInit(bCtx);
+
+    bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+
+    DEBUG_API("<-XAMediaRecorderAdapt_PostInit");
+    return ret;
+    }
+
+/*
+ * void XAMediaRecorderAdapt_Destroy( XAAdaptationGstCtx* bCtx )
+ * Destroys Media Recorder Adaptation Context
+ * @param ctx - Media Recorder Adaptation context to be destroyed
+ */
+void XAMediaRecorderAdapt_Destroy(XAAdaptationGstCtx* bCtx)
+    {
+    XAMediaRecorderAdaptationCtx* ctx = NULL;
+    char* fname = NULL;
+    DEBUG_API("->XAMediaRecorderAdapt_Destroy");
+
+    if (bCtx == NULL || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+        {
+        DEBUG_ERR("Invalid parameter!!");DEBUG_API("<-XAMediaRecorderAdapt_Destroy");
+        return;
+        }
+    ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+    if (ctx->isRecord == XA_BOOLEAN_FALSE)
+        {
+        DEBUG_INFO("Removing unnecessary file.");
+
+        if (ctx->xaSink && *((XAuint32*) (ctx->xaSink->pLocator))
+                == XA_DATALOCATOR_URI)
+            {
+            if (strncmp(
+                    (char *) ((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI,
+                    "file:///", 8) == 0)
+                {
+                fname
+                        = (char *) &(((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI[8]);
+                }
+            else
+                {
+                fname
+                        = (char *) ((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI;
+                }
+
+            if (remove(fname) != 0)
+                {
+                DEBUG_ERR_A1("Cannot remove file %s", fname);
+                }
+            }
+        }
+
+    if (ctx->isobjvsrc && ctx->videosource)
+        { /* external source, unlink now */
+        gst_element_unlink(ctx->videosource, ctx->codecbin);
+        GST_OBJECT_FLAG_SET(GST_OBJECT(ctx->videosource),GST_OBJECT_FLOATING);
+        }
+    if (bCtx->bus)
+        {
+        gst_bus_remove_signal_watch(bCtx->bus);
+        }
+    XAAdaptationGst_CancelAsyncWait(bCtx);
+
+    if (ctx->runpositiontimer)
+        {
+        g_source_remove(ctx->runpositiontimer);
+        }
+    
+    XAAdaptationGst_Free(bCtx);
+
+    free(ctx);
+    ctx = NULL;
+
+    DEBUG_API("<-XAMediaRecorderAdapt_Destroy");
+    }
+
+/***************** INTERNAL FUNCTIONS *******************************/
+
+    /*
+     * void XAMediaRecorderAdapt_CreatePipeline( XAMediaRecorderAdaptationCtx* ctx );
+     */
+XAresult XAMediaRecorderAdapt_CreatePipeline(
+        XAMediaRecorderAdaptationCtx* ctx)
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAMediaRecorderAdapt_CreatePipeline");
+
+    /* Create the audio src */
+    if ( ctx->xaAudioSource )
+        {
+        /* create audio pipe source */
+        ctx->audiosource = XAAdaptationGst_CreateGstSource( ctx->xaAudioSource, "audiosource",
+                &(ctx->isobjasrc), NULL, NULL );
+    
+        if( ctx->audiosource )
+            {
+            if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->audiosource))
+                {
+                DEBUG_API("Added audiosource to bin");
+                }
+            else
+                {
+                DEBUG_API("Could not add audiosource to bin");
+                return XA_RESULT_INTERNAL_ERROR;
+                }
+            }
+        else
+            {
+            DEBUG_ERR("Could not create audio source!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+
+    /* create and add video pipeline */
+    ctx->codecbin = XAMediaRecorderAdapt_CreateEncodeBin(ctx);
+    if (ctx->codecbin)
+        {
+        if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->codecbin))
+            {
+            DEBUG_API("->XAMediaRecorderAdapt_CreatePipeline: gst_bin_add success");
+            }
+        else
+            {
+            DEBUG_ERR("Could not add codec bin");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+    else
+        {
+        DEBUG_ERR("Could not create encoding bin!!!");
+        return XA_RESULT_INTERNAL_ERROR;
+        }
+
+    /* create and add video pipeline if video source available and codec supports video */
+    if (ctx->xaVideoSource
+            && gst_element_get_pad(ctx->codecbin, "v_sink"))
+        {
+        /* create video pipe source */
+        ctx->videosource = XAAdaptationGst_CreateGstSource(
+                ctx->xaVideoSource, "videosource", &(ctx->isobjvsrc),
+                NULL, NULL );
+        if (!ctx->videosource)
+            {
+            DEBUG_ERR("Could not create video source!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+
+        if (!ctx->isobjvsrc)
+            { /* Add other than camera sources to media recorder bin */
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videosource);
+            }
+        else
+            { /* Don't add camera source to media recorder bin */
+            GstCaps * encSrcCaps;
+            encSrcCaps = gst_caps_new_simple( "video/x-raw-yuv", 
+            "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'),
+            "framerate", GST_TYPE_FRACTION, ctx->videoEncSettings.frameRate, 1,
+                    NULL);
+            DEBUG_INFO_A1("new camera encoding filter: %s",gst_caps_to_string(encSrcCaps));
+            g_object_set( G_OBJECT(ctx->videosource), "filter-caps",encSrcCaps,NULL);
+            gst_caps_unref(encSrcCaps);
+            }
+        /* create video filter for video encoder settings */
+        ctx->videofilter = gst_element_factory_make("capsfilter", "videofilter");
+        if( ctx->videofilter )
+            {
+            GstCaps* encSrcCaps;
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videofilter);
+            encSrcCaps = gst_caps_new_simple("video/x-raw-yuv",
+                    "width", G_TYPE_INT, ctx->videoEncSettings.width,
+                    "height", G_TYPE_INT, ctx->videoEncSettings.height,
+                    "framerate", GST_TYPE_FRACTION, ctx->videoEncSettings.frameRate, 1,
+                    NULL);
+            DEBUG_INFO_A1("video encoder config from settings: %s",gst_caps_to_string(encSrcCaps));
+            g_object_set( G_OBJECT(ctx->videofilter), "caps",encSrcCaps,NULL);
+            gst_caps_unref(encSrcCaps);
+            if ( ! ctx->isobjvsrc )
+                {
+                if(!gst_element_link(ctx->videosource, ctx->videofilter))
+                    {
+                    DEBUG_ERR("Could not link videopp to videofilter!!");
+                    return XA_RESULT_INTERNAL_ERROR;
+                    }
+                }
+            else
+                { /* For camera source used ghost-pads for linking, because elements are in different bins */
+                GstStateChangeReturn gret;
+                GstElement *camTee=NULL;
+                GstPad *cameraBinGhostPad=NULL;
+                GstPad *ghost=NULL;
+                GstPad *mrGhostSink=NULL;
+
+                DEBUG_INFO("Set ext-source PAUSED for pipeline manipulation");
+                gret = gst_element_set_state( GST_ELEMENT(ctx->videosource), GST_STATE_READY);
+                if(gret == GST_STATE_CHANGE_SUCCESS)
+                    {
+                    gret = gst_element_get_state( GST_ELEMENT(ctx->videosource), NULL,NULL,XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+                    }
+
+                /* Add new ghost-pad to external camera source */
+                camTee = gst_bin_get_by_name( GST_BIN(ctx->videosource), "CamTee");
+                if ( !camTee )
+                    {
+                    DEBUG_ERR("Could not get tee-element from camera");
+                    }
+                cameraBinGhostPad = gst_element_get_request_pad( camTee, "src%d" );
+                if ( !cameraBinGhostPad )
+                    {
+                    DEBUG_ERR("Could not get new src-pad from CamTee element");
+                    }
+                gst_element_add_pad(ctx->videosource, gst_ghost_pad_new("MRObjSrc",cameraBinGhostPad));
+                ghost = gst_element_get_static_pad( GST_ELEMENT(ctx->videosource), "MRObjSrc" );
+                DEBUG_INFO_A2("Setting element:%s pad:%s to blocking.",
+                        gst_element_get_name(ctx->baseObj.bin),
+                        gst_pad_get_name(ghost));
+                /* Set newly created pad to blocking */
+                gst_pad_set_blocked_async(ghost, TRUE, XAAdaptationGst_PadBlockCb, NULL);
+
+                mrGhostSink = gst_element_get_static_pad( GST_ELEMENT(ctx->videofilter), "sink");
+                gst_element_add_pad(ctx->baseObj.bin, gst_ghost_pad_new("MRObjSink",mrGhostSink));
+                if ( !gst_element_link_pads( GST_ELEMENT(ctx->videosource), "MRObjSrc",
+                                GST_ELEMENT(ctx->baseObj.bin), "MRObjSink") )
+                    {
+                    DEBUG_ERR("Could not link camera:MRObjSrc to videofilter:MRObjSink");
+                    return XA_RESULT_INTERNAL_ERROR;
+                    }
+
+                if ( cameraBinGhostPad )
+                    {
+                    gst_object_unref( cameraBinGhostPad );
+                    }
+                if ( ghost )
+                    {
+                    gst_object_unref( ghost );
+                    }
+                if ( mrGhostSink )
+                    {
+                    gst_object_unref( mrGhostSink );
+                    }
+                if ( camTee )
+                    {
+                    gst_object_unref( camTee );
+                    }
+                }
+            }
+        /* create video processing pipeline */
+#ifdef XA_IMPL_FIXED_VIDEO_SIZE
+        ctx->videoppbin = XAAdaptationGst_CreateFixedSizeVideoPP( );
+#else
+        ctx->videoppbin = XAAdaptationGst_CreateVideoPP( );
+#endif
+        if( ctx->videoppbin )
+            {
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videoppbin);
+            if(!gst_element_link(ctx->videofilter, ctx->videoppbin))
+                {
+                DEBUG_ERR("Could not link videofilter to videopp!!");
+                return XA_RESULT_INTERNAL_ERROR;
+                }
+            }
+        else
+            {
+            DEBUG_ERR("Could not create video pp bin!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        /* create identity to extract buffers from */
+        ctx->videoextract = gst_element_factory_make("identity", "videoextract");
+        if( ctx->videoextract )
+            {
+            gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videoextract);
+            if(!gst_element_link(ctx->videoppbin, ctx->videoextract))
+                {
+                DEBUG_ERR("Could not link videopp to videoextract!!");
+                return XA_RESULT_INTERNAL_ERROR;
+                }
+            }
+        else
+            {
+            DEBUG_ERR("Could not create videoextract!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        if( ctx->videoextract )
+            {
+            if( !gst_element_link_pads(ctx->videoextract, "src", ctx->codecbin, "v_sink") )
+                {
+                DEBUG_INFO("Warning: could not link videoextract to codec!!");
+                }
+            }
+        }
+    else
+        {
+        DEBUG_INFO("No video input");
+        }
+
+    /* create and add audio pipeline */
+    if ( ctx->audiosource )
+        {
+#ifdef USE_AUDIO_PP
+        /* create audio processing pipeline */
+        ctx->audioppbin = XAAdaptationGst_CreateAudioPP( );
+        if( ctx->audioppbin )
+            {
+            if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->audioppbin))
+                {
+                DEBUG_INFO("Added audioppbin to bin");
+                }
+            else
+                {
+                DEBUG_ERR("Could not add audioppbin to bin");
+                return XA_RESULT_INTERNAL_ERROR;
+                }
+            if(!gst_element_link(ctx->audiosource, ctx->audioppbin))
+                {
+                DEBUG_ERR("Could not link audiofilter to audiopp!!");
+                return XA_RESULT_INTERNAL_ERROR;
+                }
+                
+                
+            }
+        else
+            {
+            DEBUG_ERR("Could not create audio pp bin!!!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+#endif //USE_AUDIO_PP
+        
+        /* create audio filter for audio encoder settings */
+        ret = XAMediaRecorderAdapt_CreateCapsFilter(ctx);
+        if ( XA_RESULT_SUCCESS != ret )
+        {
+            DEBUG_ERR("cannot create caps filter");
+            return ret;
+        }
+        
+        /*LINK : audiosource -> audiofilter */
+        if(!gst_element_link(ctx->audiosource, ctx->audiofilter))
+            {
+            DEBUG_ERR("Could not link audiosource to audiofilter!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+       
+/*            if( !gst_element_link_pads_filtered(ctx->audiofilter, "src", ctx->codecbin, "sink", encSrcCaps) )
+            {
+            DEBUG_INFO("Warning: could not link audiopp to codec!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+*/
+#ifdef USE_AUDIO_PP
+            if (!gst_element_link_filtered( ctx->audiofilter , ctx->audioppbin ,encSrcCaps))
+                {
+                DEBUG_INFO("Warning: could not link audiosource to audiopp!!");
+                return XA_RESULT_INTERNAL_ERROR;
+                }
+            if(!gst_element_link(ctx->audioppbin, ctx->codecbin))
+                {
+                DEBUG_INFO("Warning: could not link audioppbin to codecbin!!");
+                return XA_RESULT_INTERNAL_ERROR;
+                }
+#else
+        if(!gst_element_link(ctx->audiofilter, ctx->codecbin ))
+            {
+            DEBUG_ERR("Could not link audiosource to codecbin!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        else
+            {
+            DEBUG_INFO("Warning: link audiosource to codecbin is successfull with muxcaps!!");
+            }
+#endif // USE_AUDIO_PP
+        }
+    else
+        {
+        DEBUG_INFO("No audio input");
+        }
+
+    /* create and add data sink */
+    ctx->datasink = XAAdaptationGst_CreateGstSink( ctx->xaSink, "datasink", &(ctx->isobjsink) );
+    if( ctx->datasink )
+        {
+        if ( GST_IS_APP_SINK(ctx->datasink) )
+            {
+            gst_app_sink_set_emit_signals( GST_APP_SINK(ctx->datasink), TRUE );
+            }
+        if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->datasink))
+            {
+            DEBUG_INFO("Added datasink to bin");
+            }
+        else
+            {
+            DEBUG_ERR("Could not add datasink to bin");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        if(!gst_element_link(ctx->codecbin, ctx->datasink))
+            {
+            DEBUG_ERR("Could not link codec to sink!!");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        /* NOTE: no actual object sinks applicable, variable used to imply appsrc (recording to memory)*/
+        if(ctx->isobjsink)
+            {
+            g_signal_connect(ctx->datasink, "new-buffer",
+                    G_CALLBACK (XAMediaRecorderAdapt_BufferAvailable),ctx);
+
+            ret = XAImpl_CreateSemaphore( &(ctx->recThrCtx.bufInsufficientSem));
+            if ( ret != XA_RESULT_SUCCESS )
+                {
+                DEBUG_ERR("WARN: Could not create semaphore for recorder event handler!");
+                }
+            XAImpl_CreateThreadHandle( &(ctx->recordingEventThr) );
+            }
+        }
+    else
+        {
+        DEBUG_ERR("Could not create data sink!!!");
+        return XA_RESULT_INTERNAL_ERROR;
+        }
+    DEBUG_API("<-XAMediaRecorderAdapt_CreatePipeline");
+    return ret;
+    }
+
+    /*
+     * XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx );
+     * Check codec compatibility and support with initiated datasink content
+     */
+    XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx, XACapsType encType, XAuint32 encoderId )
+        {
+        XAresult ret = XA_RESULT_SUCCESS;
+        XAuint32 format;
+        XACapabilities temp;
+
+        DEBUG_API("->XAMediaRecorderAdapt_CheckCodec");
+
+        /*first, check if codec supported at all*/
+        ret = XACapabilitiesMgr_GetCapsById(mCtx->baseObj.baseObj.capslist,(XACapsType)(XACAP_ENCODER|encType), encoderId, &temp);
+
+        if( ret==XA_RESULT_SUCCESS )
+            {
+            if(encType & (XACAP_VIDEO|XACAP_AUDIO))
+                {
+                if(mCtx->xaSink && mCtx->xaSink->pFormat)
+                    {
+                    format = *(XAuint32*)(mCtx->xaSink->pFormat);
+                    }
+                else
+                    {
+                    ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                    }
+                }
+            else
+                {
+                if(mCtx->snapshotVars.xaSink && mCtx->snapshotVars.xaSink->pFormat)
+                    {
+                    format = *(XAuint32*)(mCtx->snapshotVars.xaSink->pFormat);
+                    }
+                else
+                    {
+                    ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                    }
+                }
+            if(ret==XA_RESULT_SUCCESS) switch ( format )
+                {
+                case XA_DATAFORMAT_PCM:
+                if ( (encType == XACAP_AUDIO) && (encoderId == XA_AUDIOCODEC_PCM) )
+                    {
+                    ret=XA_RESULT_SUCCESS;
+                    }
+                else
+                    {
+                    ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                    }
+                break;
+
+                case XA_DATAFORMAT_RAWIMAGE:
+                if ( (encType == XACAP_IMAGE) && (encoderId == XA_IMAGECODEC_RAW) )
+                    {
+                    ret=XA_RESULT_SUCCESS;
+                    }
+                else
+                    {
+                    ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                    }
+                break;
+
+                case XA_DATAFORMAT_MIME:
+                DEBUG_INFO("XA_DATAFORMAT_MIME ");
+                    {
+                    XADataFormat_MIME* mime = ((XADataFormat_MIME*)mCtx->xaSink->pFormat);
+                    DEBUG_INFO_A1("mime->containerType:%u",(int)mime->containerType);
+                    DEBUG_INFO_A1("mime->mimeType:%s",mime->mimeType);
+                    switch ( mime->containerType )
+                        {
+                        case XA_CONTAINERTYPE_RAW:
+                        if( ((encType == XACAP_AUDIO) && (encoderId == XA_AUDIOCODEC_PCM)) ||
+                                ((encType == XACAP_VIDEO) && (encoderId == XA_ADAPTID_RAWVIDEO)) ||
+                                ((encType == XACAP_IMAGE) && (encoderId == XA_IMAGECODEC_RAW)) )
+                            {
+                            ret=XA_RESULT_SUCCESS;
+                            }
+                        else
+                            {
+                            ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                            }
+                        break;
+
+                        case XA_CONTAINERTYPE_AVI:
+                        if(encType == XACAP_VIDEO)
+                            {
+                            switch(encoderId)
+                                {
+                                case XA_ADAPTID_MOTIONJPEG:
+                                case XA_ADAPTID_RAWVIDEO:
+                                ret=XA_RESULT_SUCCESS;
+                                break;
+                                default:
+                                ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                break;
+                                }
+                            }
+                        else if(encType == XACAP_AUDIO)
+                            {
+                            switch(encoderId)
+                                {
+                                case XA_AUDIOCODEC_PCM:
+                                ret=XA_RESULT_SUCCESS;
+                                break;
+                                default:
+                                ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                break;
+                                }
+                            }
+                        else
+                            {
+                            ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                            }
+                        break;
+
+                        case XA_CONTAINERTYPE_WAV:
+                        if(encType == XACAP_AUDIO)
+                            {
+                            switch(encoderId)
+                                {
+                                case XA_AUDIOCODEC_PCM:
+                                ret=XA_RESULT_SUCCESS;
+                                break;
+                                default:
+                                ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                break;
+                                }
+                            }
+                        else
+                            {
+                            ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                            }
+                        break;
+
+                        case XA_CONTAINERTYPE_JPG:
+                        if(encType == XACAP_VIDEO)
+                            {
+                            switch(encoderId)
+                                {
+                                case XA_ADAPTID_MOTIONJPEG:
+                                ret=XA_RESULT_SUCCESS;
+                                break;
+                                default:
+                                ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                break;
+                                }
+                            }
+                        else if(encType == XACAP_IMAGE)
+                            {
+                            switch(encoderId)
+                                {
+                                case XA_IMAGECODEC_JPEG:
+                                ret=XA_RESULT_SUCCESS;
+                                break;
+                                default:
+                                ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                break;
+                                }
+                            }
+                        else
+                            {
+                            ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                            }
+                        break;
+
+                        case XA_CONTAINERTYPE_UNSPECIFIED:
+                        if(strstr( (char *) mime->mimeType, "/ogg") != 0)
+                            {
+                            if(encType == XACAP_VIDEO)
+                                {
+                                switch(encoderId)
+                                    {
+                                    case XA_ADAPTID_THEORA:
+                                    ret=XA_RESULT_SUCCESS;
+                                    break;
+                                    default:
+                                    ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                    break;
+                                    }
+                                }
+                            else if(encType == XACAP_AUDIO)
+                                {
+                                switch(encoderId)
+                                    {
+                                    case XA_ADAPTID_VORBIS:
+                                    ret=XA_RESULT_SUCCESS;
+                                    break;
+                                    default:
+                                    ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                    break;
+                                    }
+                                }
+                            else
+                                {
+                                ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                                }
+                            }
+                        else
+                            {
+                            ret=XA_RESULT_FEATURE_UNSUPPORTED;
+                            }
+                        break;
+
+                        default: /*switch (containertype)*/
+                        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+                        break;
+                        }
+                    break;
+                    }
+                default: /*switch (format)*/
+                ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                break;
+                }
+            }
+        if( ret!=XA_RESULT_SUCCESS )
+            {
+            DEBUG_ERR("cannot accommodate given codec & datasink pair!!!");
+            }
+        DEBUG_API("<-XAMediaRecorderAdapt_CheckCodec");
+        return ret;
+        }
+/*
+ * XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx* mCtx );
+ * re-create encodebin based on new encoder settings
+ */
+XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx* mCtx )
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAAdaptationGstCtx* bCtx = &(mCtx->baseObj);
+
+    DEBUG_API("->XAMediaRecorderAdapt_ChangeEncoders");
+    /* check state */
+    if(GST_STATE(mCtx->baseObj.bin)<GST_STATE_PLAYING)
+        {
+        GstElement* newBin = XAMediaRecorderAdapt_CreateEncodeBin(mCtx);
+        if(newBin)
+            { /* replace old bin with new */
+            GstStateChangeReturn gret;
+            GstPad *asink=NULL, *linkedasrc=NULL;
+            GstPad *vsink=NULL, *linkedvsrc=NULL;
+            GstPad *src=NULL, *linkedsink=NULL;
+            GstPad *moSrc=NULL, *moSink=NULL;
+            GstCaps* encSrcCaps = NULL;
+
+            /* pipeline must be unrolled for renegotiation */
+            DEBUG_INFO("Unroll pipeline");
+            bCtx->binWantedState = GST_STATE_READY;
+            gret = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+            gret = gst_element_get_state( GST_ELEMENT(bCtx->bin), NULL, NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+
+            /*set new stream settings*/
+            if( mCtx->videofilter )
+                {
+                encSrcCaps = gst_caps_new_simple("video/x-raw-yuv",
+                        "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'),
+                        "width", G_TYPE_INT, mCtx->videoEncSettings.width,
+                        "height", G_TYPE_INT, mCtx->videoEncSettings.height,
+                        "framerate", GST_TYPE_FRACTION, mCtx->videoEncSettings.frameRate, 1,
+                        NULL);
+                DEBUG_INFO_A1("new video encoder config from settings: %s",gst_caps_to_string(encSrcCaps));
+                g_object_set( G_OBJECT(mCtx->videofilter), "caps",encSrcCaps,NULL);
+                gst_caps_unref(encSrcCaps);
+                }
+            if( mCtx->audiofilter )
+                {
+                encSrcCaps = gst_caps_new_full(
+                        gst_structure_new("audio/x-raw-int",
+                                "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut,
+                                "rate", G_TYPE_INT, mCtx->audioEncSettings.sampleRate,
+                                "bitrate", G_TYPE_INT, mCtx->audioEncSettings.bitRate,
+                                NULL),
+                        gst_structure_new("audio/x-raw-float",
+                                "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut,
+                                "width", G_TYPE_INT, mCtx->audioEncSettings.bitsPerSample,
+                                "rate", G_TYPE_INT, mCtx->audioEncSettings.sampleRate,
+                                "bitrate", G_TYPE_INT, mCtx->audioEncSettings.bitRate,
+                                NULL),
+                        NULL);
+                DEBUG_INFO_A1("new audio encoder config from settings: %s",gst_caps_to_string(encSrcCaps));
+                g_object_set( G_OBJECT(mCtx->audiofilter), "caps",encSrcCaps,NULL);
+                gst_caps_unref(encSrcCaps);
+                }
+
+            if(mCtx->isobjvsrc)
+                {
+                moSrc = gst_element_get_static_pad(mCtx->videosource,"MRObjSrc");
+                moSink = gst_pad_get_peer(moSrc);
+                if(moSink)
+                    {
+                    gst_pad_unlink(moSrc,moSink);
+                    }
+                moSrc = gst_element_get_static_pad(mCtx->videosource,"mediaobjectsrc");
+                encSrcCaps = gst_caps_new_simple("video/x-raw-yuv",
+                        "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'),
+                        "framerate", GST_TYPE_FRACTION, mCtx->videoEncSettings.frameRate, 1,
+                        NULL);
+                DEBUG_INFO_A1("new camera encoding filter: %s",gst_caps_to_string(encSrcCaps));
+                g_object_set( G_OBJECT(mCtx->videosource), "filter-caps",encSrcCaps,NULL);
+                gst_caps_unref(encSrcCaps);
+                }
+
+            DEBUG_INFO("Unlink and remove old encodebin");
+            asink = gst_element_get_static_pad(mCtx->codecbin,"sink");
+            if(asink)
+                {
+                linkedasrc = gst_pad_get_peer(asink);
+                if(linkedasrc)
+                    {
+                    gst_pad_unlink(linkedasrc,asink);
+                    }
+                }
+            vsink = gst_element_get_static_pad(mCtx->codecbin,"v_sink");
+            if(vsink)
+                {
+                linkedvsrc = gst_pad_get_peer(vsink);
+                if(linkedvsrc)
+                    {
+                    gst_pad_unlink(linkedvsrc,vsink);
+                    }
+                }
+            src = gst_element_get_static_pad(mCtx->codecbin,"src");
+            if(src)
+                {
+                linkedsink = gst_pad_get_peer(src);
+                if(linkedsink)
+                    {
+                    gst_pad_unlink(src,linkedsink);
+                    }
+                }
+
+            gst_element_set_state( GST_ELEMENT(mCtx->codecbin), GST_STATE_NULL );
+            gst_element_get_state( GST_ELEMENT(mCtx->codecbin),NULL,NULL,1000 );
+            gst_bin_remove( GST_BIN(bCtx->bin), mCtx->codecbin );
+            /*reset filesink too*/
+            gst_element_set_state(GST_ELEMENT(mCtx->datasink),GST_STATE_NULL);
+            gst_element_sync_state_with_parent(mCtx->datasink);
+            gst_element_get_state(mCtx->datasink,NULL,NULL,XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+
+            DEBUG_INFO("Link new encodebin");
+            mCtx->codecbin = newBin;
+            gst_bin_add(GST_BIN(bCtx->bin), mCtx->codecbin);
+            asink = gst_element_get_static_pad(mCtx->codecbin,"sink");
+            if(asink && linkedasrc)
+                {
+                gst_pad_link(linkedasrc,asink);
+                }
+            vsink = gst_element_get_static_pad(mCtx->codecbin,"v_sink");
+            if(vsink && linkedvsrc)
+                {
+                gst_pad_link(linkedvsrc,vsink);
+                }
+            src = gst_element_get_static_pad(mCtx->codecbin,"src");
+            if(src && linkedsink)
+                {
+                gst_pad_link(src,linkedsink);
+                }
+
+            if(mCtx->isobjvsrc)
+                {
+                moSrc = gst_element_get_static_pad(mCtx->videosource,"MRObjSrc");
+                if(moSink&&moSrc)
+                    {
+                    gst_pad_link(moSrc,moSink);
+                    }
+                }
+
+            /*re-roll*/
+            DEBUG_INFO("Reroll pipeline");
+            bCtx->binWantedState = GST_STATE_PAUSED;
+            gret = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+            if( gret == GST_STATE_CHANGE_ASYNC )
+                {
+                DEBUG_INFO("Wait for reroll");
+                XAAdaptationGst_StartAsyncWait(bCtx);
+                }
+            else if( gret == GST_STATE_CHANGE_FAILURE )
+                {
+                DEBUG_ERR("reroll FAILED");
+                ret = XA_RESULT_INTERNAL_ERROR;
+                }
+            bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+            DEBUG_INFO_A1("Pipeline in state %s",gst_element_state_get_name(GST_STATE(bCtx->bin)));
+            }
+        else
+            {
+            /* could not support wanted encoders */
+            DEBUG_ERR("Failed to create encodebin with new settings, using old one!");
+            ret = XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+        }
+    else
+        { /* n/a while playing */
+        DEBUG_ERR("Cannot change encoder when recording ongoing!");
+        ret = XA_RESULT_PRECONDITIONS_VIOLATED;
+        }
+    DEBUG_API("<-XAMediaRecorderAdapt_ChangeEncoders");
+    return ret;
+    }
+
+/**
+ * GstElement* XAMediaRecorderAdapt_CreateEncodeBin( XAMediaRecorderAdaptationCtx* ctx )
+ * @return GstElement* - pointer to created bin element
+ * Decription: Create encoder/muxer element based on given format and encoder settings
+ */
+GstElement* XAMediaRecorderAdapt_CreateEncodeBin( XAMediaRecorderAdaptationCtx* ctx )
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    GstElement *audioenc = NULL, *videoenc=NULL, *mux=NULL;
+    GstElement *codecbin = gst_bin_new( "mrcodecbin" );
+    GstPad *ghostsrc = NULL, *ghostaudiosink = NULL, *ghostvideosink = NULL;
+    XAuint32 format;
+    XACapabilities temp;
+
+    DEBUG_API("->XAMediaRecorderAdapt_CreateEncodeBin");
+    if(ctx->recModes & XA_RECMODE_STREAM)
+        {
+        if(ctx->xaSink && ctx->xaSink->pFormat)
+            {
+            format = *(XAuint32*)(ctx->xaSink->pFormat);
+            switch ( format )
+                {
+                case XA_DATAFORMAT_PCM:
+                DEBUG_INFO("XA_DATAFORMAT_PCM");
+                    {
+                    XADataFormat_PCM* pcm = ((XADataFormat_PCM*)ctx->xaSink->pFormat);
+                    if(!ctx->xaAudioSource)
+                        {
+                        DEBUG_ERR("Unsupported dataformat for given data sources");
+                        return NULL;
+                        }
+                    /* no need for codec, just pass data on */
+                    mux = gst_element_factory_make("identity", "mux");
+                    gst_bin_add(GST_BIN(codecbin), mux);
+                    ghostsrc = gst_element_get_static_pad(mux,"src");
+                    ghostaudiosink = gst_element_get_static_pad(mux,"sink");
+                    /*set usable audio settings from the sink structure*/
+                    ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_PCM;
+                    ctx->audioEncSettings.channelsOut = pcm->numChannels;
+                    ctx->audioEncSettings.bitsPerSample = pcm->bitsPerSample;
+                    }
+                break;
+
+                case XA_DATAFORMAT_RAWIMAGE:
+                DEBUG_INFO("XA_DATAFORMAT_RAWIMAGE");
+                    {
+                    XADataFormat_RawImage* img = ((XADataFormat_RawImage*)ctx->xaSink->pFormat);
+                    if(!ctx->xaVideoSource)
+                        {
+                        DEBUG_ERR("Unsupported dataformat for given data sources");
+                        return NULL;
+                        }
+                    /* no need for codec, just pass data on */
+                    mux = gst_element_factory_make("identity", "mux");
+                    gst_bin_add(GST_BIN(codecbin), mux);
+                    ghostsrc = gst_element_get_static_pad(mux,"src");
+                    ghostvideosink = gst_element_get_static_pad(mux,"sink");
+                    /*set needed image settings from the sink structure*/
+                    ctx->imageEncSettings.encoderId = XA_IMAGECODEC_RAW;
+                    ctx->imageEncSettings.width = img->width;
+                    ctx->imageEncSettings.height = img->height;
+                    ctx->imageEncSettings.colorFormat = img->colorFormat;
+                    }
+                break;
+
+                case XA_DATAFORMAT_MIME:
+                DEBUG_INFO("XA_DATAFORMAT_MIME ");
+                    {
+                    XADataFormat_MIME* mime = ((XADataFormat_MIME*)ctx->xaSink->pFormat);
+                    DEBUG_INFO_A1("mime->containerType:%u",(int)mime->containerType);
+                    DEBUG_INFO_A1("mime->mimeType:%s",mime->mimeType);
+                    switch ( mime->containerType )
+                        {
+                        case XA_CONTAINERTYPE_AVI:
+                        DEBUG_INFO("XA_CONTAINERTYPE_AVI");
+                        mux = gst_element_factory_make("avimux", "mux");
+                        if(mux)
+                            {
+                            if (gst_bin_add(GST_BIN(codecbin), mux))
+                                {
+                                DEBUG_INFO("Added mux to codecbin");
+                                }
+                            else
+                                {
+                                DEBUG_ERR("Could not add mux to codecbin");
+                                return NULL;
+                                }
+                            /*use this as linkpoint*/
+                            ghostsrc = gst_element_get_static_pad(mux,"src");
+                            }
+                        /* Add and link audio/video codecs */
+                        /*set video defaults*/
+                        if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                        ctx->videoEncSettings.encoderId = XA_ADAPTID_MOTIONJPEG;
+                        if(ctx->xaVideoSource)
+                            {
+                            if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+                                {
+                                if(temp.adaptId)
+                                    {
+                                    videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc");
+                                    }
+                                }
+                            if(videoenc)
+                                {
+                                gst_bin_add(GST_BIN(codecbin), videoenc);
+                                if(!gst_element_link(videoenc, mux))
+                                    {
+                                    DEBUG_ERR("Could not link videoenc to mux!!");
+                                    DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin");
+                                    return NULL;
+                                    }
+                                ghostvideosink = gst_element_get_static_pad(videoenc,"sink");
+                                }
+                            else
+                                {
+                                /*no video codec but video source = raw video case, request video pad directly from mux*/
+                                ghostvideosink = gst_element_get_request_pad(mux,"video_%d");
+                                }
+                            }
+                        /*set audio defaults*/
+                        if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                        ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_PCM;
+                        if(ctx->xaAudioSource)
+                            {
+                            if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), ctx->audioEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+                                {
+                                if(temp.adaptId)
+                                    {
+                                    audioenc = gst_element_factory_make((char*)temp.adaptId, "audioenc");
+                                    }
+                                }
+                            if(audioenc)
+                                {
+                                gst_bin_add(GST_BIN(codecbin), audioenc);
+                                if(!gst_element_link(audioenc, mux))
+                                    {
+                                    DEBUG_ERR("Could not link audioenc to mux!!");
+                                    DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin");
+                                    return NULL;
+                                    }
+                                ghostaudiosink = gst_element_get_static_pad(audioenc,"sink");
+                                }
+                            else
+                                {
+                                /*no audio codec but audio source = PCM case, explicity request audio pad*/
+                                ghostaudiosink = gst_element_get_request_pad(mux,"audio_%d");
+                                }
+                            }
+                        break;
+
+                        case XA_CONTAINERTYPE_WAV:
+                        DEBUG_INFO("XA_CONTAINERTYPE_WAV");
+                        audioenc = gst_element_factory_make("wavenc", "audioenc");
+                        if(audioenc)
+                            {
+                            if (gst_bin_add(GST_BIN(codecbin), audioenc))
+                                {
+                                DEBUG_INFO("added audioenc to codecbin");
+                                }
+                            else
+                                {
+                                DEBUG_ERR("Could not add audioenc to codecbin");
+                                return NULL;
+                                }
+                            /*use this as linkpoint*/
+                            ghostsrc = gst_element_get_static_pad(audioenc,"src");
+                            ghostaudiosink = gst_element_get_static_pad(audioenc,"sink");
+                            if ( ghostsrc == NULL || ghostaudiosink == NULL)
+                                {
+                                DEBUG_ERR("Could not get src or sink ghoset element(s)");
+                                return NULL;
+                                }
+                            }
+                        /* no other codecs needed */
+                        break;
+                        case XA_CONTAINERTYPE_JPG:
+                        /*motion jpeg*/
+                        DEBUG_INFO("XA_CONTAINERTYPE_JPG");
+                        /*set defaults*/
+                        if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                        ctx->videoEncSettings.encoderId = XA_ADAPTID_MOTIONJPEG;
+                        if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+                            {
+                            videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc");
+                            }
+                        if(videoenc)
+                            {
+                            gst_bin_add(GST_BIN(codecbin), videoenc);
+                            /*use this as linkpoint*/
+                            ghostsrc = gst_element_get_static_pad(videoenc,"src");
+                            ghostvideosink = gst_element_get_static_pad(videoenc,"sink");
+                            }
+                        /* no other codecs needed */
+                        break;
+                        case XA_CONTAINERTYPE_RAW:
+                        DEBUG_INFO("XA_CONTAINERTYPE_RAW");
+                        /* no need for codec, just pass data on */
+                        if(strncmp((char *)mime->mimeType, "video", 5) == 0 && ctx->xaVideoSource)
+                            {
+                            mux = gst_element_factory_make("identity", "mux");
+                            gst_bin_add(GST_BIN(codecbin), mux);
+                            ghostvideosink = gst_element_get_static_pad(mux,"sink");
+                            }
+                        else if (strncmp((char *)mime->mimeType, "audio", 5) == 0 && ctx->xaAudioSource)
+                            {
+                            mux = gst_element_factory_make("identity", "mux");
+                            gst_bin_add(GST_BIN(codecbin), mux);
+                            ghostaudiosink = gst_element_get_static_pad(mux,"sink");
+                            }
+                        else
+                            {
+                            ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                            DEBUG_ERR("Content mismatch with given sources!!!")
+                            }
+                        ghostsrc = gst_element_get_static_pad(mux,"src");
+                        break;
+                        case XA_CONTAINERTYPE_UNSPECIFIED:
+                        DEBUG_INFO("No support for requested encoder...try to select encoder from mime string");
+                        if(strstr( (char *) mime->mimeType, "/ogg") != 0)
+                            {
+                            DEBUG_INFO("XA_CONTAINERTYPE_UNSPECIFIED - mimetype ogg detected");
+                            mux = gst_element_factory_make("oggmux", "mux");
+                            if(mux)
+                                {
+                                gst_bin_add(GST_BIN(codecbin), mux);
+                                /*use this as linkpoint*/
+                                ghostsrc = gst_element_get_static_pad(mux,"src");
+                                /*set defaults*/
+                                if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                                    {
+                                    ctx->audioEncSettings.encoderId = XA_ADAPTID_VORBIS;
+                                    ctx->audioEncSettings.bitsPerSample=32;
+                                    }
+                                if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                                    {
+                                    ctx->videoEncSettings.encoderId = XA_ADAPTID_THEORA;
+                                    }
+                                if(ctx->xaAudioSource)
+                                    {
+                                    if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), ctx->audioEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+                                        {
+                                        audioenc = gst_element_factory_make((char*)temp.adaptId, "audioenc");
+                                        }
+                                    if(audioenc)
+                                        {
+                                        gst_bin_add(GST_BIN(codecbin), audioenc);
+                                        if(!gst_element_link(audioenc, mux))
+                                            {
+                                            DEBUG_ERR("Could not link audioenc to mux!!");
+                                            DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin");
+                                            return NULL;
+                                            }                                            
+                                        ghostaudiosink = gst_element_get_static_pad(audioenc,"sink");
+                                        }
+                                    }
+                                if(strncmp((char *)mime->mimeType, "video", 5) == 0 && ctx->xaVideoSource)
+                                    {
+                                    if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+                                        {
+                                        videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc");
+                                        }
+                                    if(videoenc)
+                                        {
+                                        gst_bin_add(GST_BIN(codecbin), videoenc);
+                                        if(!gst_element_link(videoenc, mux))
+                                            {
+                                            DEBUG_ERR("Could not link videoenc to mux!!");
+                                            DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin");
+                                            return NULL;
+                                            }                                            
+                                        ghostvideosink = gst_element_get_static_pad(videoenc,"sink");
+                                        }
+                                    }
+                                }
+                            }
+                        else
+                            {
+                            DEBUG_INFO("No support for requested mime/container type.");
+                            ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                            }
+                        break;
+                        case XA_CONTAINERTYPE_MOBILE_DLS:
+                        case XA_CONTAINERTYPE_MP4:
+                        DEBUG_INFO("XA_CONTAINERTYPE_MP4");
+                        mux = gst_element_factory_make("mp4mux", "mp4mux");
+                        if(mux)
+                            {
+                            if (gst_bin_add(GST_BIN(codecbin), mux))
+                                {
+                                DEBUG_INFO("Added mux to codecbin");
+                                }
+                            else
+                                {
+                                DEBUG_ERR("Could not add mux to codecbin");
+                                return NULL;
+                                }
+                            /*use this as linkpoint*/
+                            ghostsrc = gst_element_get_static_pad(mux,"src");
+                            }
+                        /* Add and link audio/video codecs */
+                        /*set video defaults*/
+                        if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                            ctx->videoEncSettings.encoderId = XA_ADAPTID_MOTIONJPEG;
+                        if(ctx->xaVideoSource)
+                            {
+                            if(XACapabilitiesMgr_GetCapsById(ctx->baseObj.baseObj.capslist, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+                                {
+                                if(temp.adaptId)
+                                    {
+                                    videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc");
+                                    }
+                                }
+                            if(videoenc)
+                                {
+                                gst_bin_add(GST_BIN(codecbin), videoenc);
+                                if(!gst_element_link(videoenc, mux))
+                                    {
+                                    DEBUG_ERR("Could not link videoenc to mux!!");
+                                    DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin");
+                                    return NULL;
+                                    }
+                                ghostvideosink = gst_element_get_static_pad(videoenc,"sink");
+                                }
+                            else
+                                {
+                                /*no video codec but video source = raw video case, request video pad directly from mux*/
+                                ghostvideosink = gst_element_get_request_pad(mux,"video_%d");
+                                }
+                            }
+                        /*set audio defaults*/
+                        if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                            ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_AAC;
+                        if(ctx->xaAudioSource)
+                            {
+                            if(XACapabilitiesMgr_GetCapsById(ctx->baseObj.baseObj.capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), ctx->audioEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+                                {
+                                if(temp.adaptId)
+                                    {
+                                    audioenc = gst_element_factory_make((char*)temp.adaptId, "nokiaaacenc");
+                                    }
+                                }
+                            if(audioenc)
+                                {
+                                GstCaps* caps = gst_caps_new_simple((const char*)mime->mimeType,
+                                        "mpegversion", G_TYPE_INT, 4,
+                                        "channels", G_TYPE_INT, 1,
+                                        "rate", G_TYPE_INT, 16000,
+                                        NULL);
+                                gst_bin_add(GST_BIN(codecbin), audioenc);
+                                if(!gst_element_link_filtered(audioenc, mux,caps))
+                                    {
+                                    DEBUG_ERR("Could not link audioenc to mux!!");
+                                    DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin");
+                                    return NULL;
+                                    }
+                                ghostaudiosink = gst_element_get_static_pad(audioenc,"sink");
+                                }
+                            else
+                                {
+                                /*no audio codec but audio source = PCM case, explicity request audio pad*/
+                                ghostaudiosink = gst_element_get_request_pad(mux,"audio_%d");
+                                }
+                            }
+                        break;							
+                        case XA_CONTAINERTYPE_AMR:
+                            DEBUG_INFO("XA_CONTAINERTYPE_AMR");
+                            if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED)
+                                ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_AMR;
+                             mux = gst_element_factory_make("amrmux", "mux");
+                             if(mux)
+                                 {
+                                 if (gst_bin_add(GST_BIN(codecbin), mux))
+                                     {
+                                     DEBUG_INFO("Added mux to codecbin");
+                                     /*Setting the buffer size on src since amr generates 
+                                      * small amounts of data */
+                                     g_object_set (G_OBJECT (ctx->audiosource),
+                                               "blocksize", 1280,
+                                                NULL);                                         
+                                     }
+                                 else
+                                     {
+                                     DEBUG_ERR("Could not add mux to codecbin");
+                                     return NULL;
+                                     }
+                                 /*use this as linkpoint*/
+                                 ghostsrc = gst_element_get_static_pad(mux,"src");
+                                 }
+                             /*set audio defaults*/
+                             if(ctx->xaAudioSource)
+                                 {
+                                 /*no audio codec but audio source = PCM case, explicity request audio pad*/
+                                 ghostaudiosink = gst_element_get_static_pad(mux,"sink");
+                                 }
+                             break;                                
+                        case XA_CONTAINERTYPE_3GPP:
+                        case XA_CONTAINERTYPE_BMP:
+                        case XA_CONTAINERTYPE_ASF:
+                        case XA_CONTAINERTYPE_M4A:
+                        case XA_CONTAINERTYPE_MP3:
+                        case XA_CONTAINERTYPE_JPG2000:
+                        case XA_CONTAINERTYPE_MPEG_ES:
+                        case XA_CONTAINERTYPE_MPEG_PS:
+                        case XA_CONTAINERTYPE_MPEG_TS:
+                        case XA_CONTAINERTYPE_QT:
+                        case XA_CONTAINERTYPE_XMF_0:
+                        case XA_CONTAINERTYPE_XMF_1:
+                        case XA_CONTAINERTYPE_XMF_2:
+                        case XA_CONTAINERTYPE_XMF_3:
+                        case XA_CONTAINERTYPE_XMF_GENERIC:
+                        case XA_CONTAINERTYPE_AAC:
+                        case XA_CONTAINERTYPE_3GA:
+                        case XA_CONTAINERTYPE_RM:
+                        case XA_CONTAINERTYPE_DMF:
+                        default:
+                        DEBUG_INFO("No support for requested container type.");
+                        ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                        break;
+                        }
+                    break;
+                    }
+                default:
+                DEBUG_ERR("Incorrect data format type.");
+                ret = XA_RESULT_PARAMETER_INVALID;
+                break;
+                }
+            }
+        else
+            {
+            DEBUG_ERR("Invalid data sink for stream recording!!");
+            ret = XA_RESULT_PARAMETER_INVALID;
+            }
+        }
+    else
+        {/* stream recording not requested, datasink ignored, use uncoded recordstream*/
+        mux = gst_element_factory_make("identity", "mux");
+        gst_bin_add(GST_BIN(codecbin), mux);
+        ghostsrc = gst_element_get_static_pad(mux,"src");
+        ghostvideosink = gst_element_get_static_pad(mux,"sink");
+        }
+
+    /*set default codecs for unrecognized*/
+    if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED)
+    ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_PCM;
+    if(ctx->imageEncSettings.encoderId == XA_ADAPTID_UNINITED)
+    ctx->imageEncSettings.encoderId = XA_IMAGECODEC_RAW;
+    if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED)
+    ctx->videoEncSettings.encoderId = XA_ADAPTID_RAWVIDEO;
+
+    if ( ret != XA_RESULT_SUCCESS )
+        {
+        gst_object_unref(codecbin);
+        codecbin=NULL;
+        }
+    else
+        {
+        /*add ghost pad(s) to link to*/
+        if(ghostsrc)
+            {
+            gst_element_add_pad(codecbin, gst_ghost_pad_new("src",ghostsrc));
+            gst_object_unref(GST_OBJECT(ghostsrc));
+            }
+        if(ghostaudiosink)
+            {
+            gst_element_add_pad(codecbin, gst_ghost_pad_new("sink",ghostaudiosink));
+            gst_object_unref(GST_OBJECT(ghostaudiosink));
+            }
+        if(ghostvideosink)
+            {
+            gst_element_add_pad(codecbin, gst_ghost_pad_new("v_sink",ghostvideosink));
+            gst_object_unref(GST_OBJECT(ghostvideosink));
+            }
+        DEBUG_INFO_A1("Created encoder bin at %x", (int)codecbin);
+        }
+
+    DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin");
+    return codecbin;
+
+    }
+
+/*
+ * void XAMediaRecorderAdapt_BufferAvailable(GstElement* sink, gpointer user_data)
+ * called when new buffer is available at appsink
+ */
+void XAMediaRecorderAdapt_BufferAvailable(GstElement* sink, gpointer user_data)
+    {
+    GstBuffer *buffer=NULL;
+    XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)user_data;
+    DEBUG_API("->XAMediaRecorderAdapt_BufferAvailable");
+    if(!mCtx || !mCtx->xaSink)
+        {
+        DEBUG_ERR("Invalid context")
+        return;
+        }
+    /* get the buffer */
+    buffer = gst_app_sink_pull_buffer(GST_APP_SINK(sink));
+    if(buffer)
+        {
+        guint size;
+        XADataLocator_Address* address;
+        size = GST_BUFFER_SIZE(buffer);
+        DEBUG_INFO_A1("Pulled new buffer of size %d", size);
+        address = (XADataLocator_Address*)(mCtx->xaSink->pLocator);
+        if( !address || *(XAuint32*)address != XA_DATALOCATOR_ADDRESS )
+            {
+            DEBUG_ERR("Invalid address datalocator")
+            return;
+            }
+
+        if(mCtx->writepos + size < address->length )
+            { /*enough room in buffer*/
+            memcpy(((char*)(address->pAddress) + mCtx->writepos),
+                    GST_BUFFER_DATA (buffer), size);
+            mCtx->writepos+=size;
+            }
+        else
+            { /*not enough room in buffer*/
+            XAAdaptEvent event =
+                {XA_RECORDITFEVENTS, XA_RECORDEVENT_BUFFER_FULL, 0, NULL};
+
+            size = address->length - mCtx->writepos;
+            memcpy(((char*)(address->pAddress) + mCtx->writepos),
+                    GST_BUFFER_DATA (buffer), size);
+            DEBUG_INFO_A1("Buffer insufficient, wrote %d bytes", size);
+            /* send event */
+            XAAdaptationBase_SendAdaptEvents(&(mCtx->baseObj.baseObj), &event);
+            /* "recordhead to start" i.e. reset write position */
+            mCtx->writepos=0;
+            mCtx->recThrCtx.buffer_insufficient = XA_BOOLEAN_TRUE;
+            if ( XAImpl_PostSemaphore( mCtx->recThrCtx.bufInsufficientSem ) != XA_RESULT_SUCCESS)
+                {
+                DEBUG_ERR("Posting buffer-insufficien semaphore FAILED!");
+                }
+            }
+        gst_buffer_unref (buffer);
+        }
+    else
+        {
+        DEBUG_ERR("Could not pull buffer from appsink!");
+        }
+    DEBUG_API("<-XAMediaRecorderAdapt_BufferAvailable");
+    }
+
+/*
+ * void* XAMediaRecorderAdapt_RecordEventThr( void* ctx )
+ */
+void* XAMediaRecorderAdapt_RecordEventThr( void* ctx )
+    {
+    XAMediaRecorderAdaptationCtx* mrCtx = (XAMediaRecorderAdaptationCtx*)ctx;
+    GstStateChangeReturn gret;
+    XAresult ret;
+    DEBUG_API("->XAMediaRecorderAdapt_RecordEventThr");
+
+    /* Wait semaphore here */
+    ret = XAImpl_WaitSemaphore( mrCtx->recThrCtx.bufInsufficientSem );
+    if ( ret != XA_RESULT_SUCCESS)
+        {
+        DEBUG_ERR("Could not start semaphore");
+        }
+
+    if(mrCtx->recThrCtx.buffer_insufficient)
+        {
+        mrCtx->baseObj.binWantedState = GST_STATE_PAUSED;
+        XAAdaptationGst_PrepareAsyncWait(&(mrCtx->baseObj));
+        gret = gst_element_set_state( GST_ELEMENT(mrCtx->baseObj.bin), mrCtx->baseObj.binWantedState);
+        if( gret == GST_STATE_CHANGE_ASYNC )
+            {
+            DEBUG_INFO("Start to wait recoder state change.");
+            XAAdaptationGst_StartAsyncWait(&(mrCtx->baseObj));
+            DEBUG_INFO("Recorder state change async. SUCCESFULL.");
+            }
+        else if( gret == GST_STATE_CHANGE_FAILURE )
+            {
+            DEBUG_INFO("Recorder state change FAILED");
+            /*ret = XA_RESULT_INTERNAL_ERROR;*/
+            }
+        else
+            {
+            DEBUG_INFO("Recorder state change SUCCESFULL")
+            }
+
+        mrCtx->baseObj.waitingasyncop= XA_BOOLEAN_FALSE;
+        }
+    DEBUG_API("<-XAMediaRecorderAdapt_RecordEventThr");
+    return NULL;
+    }
+
+XAresult XAMediaRecorderAdapt_CreateCapsFilter( XAMediaRecorderAdaptationCtx* ctx )
+{
+
+    GstCaps* encSrcCaps = NULL;
+    XADataFormat_MIME *pMime = 0;
+    
+    if (!ctx )
+        return XA_RESULT_PARAMETER_INVALID;
+
+    DEBUG_INFO("create capsfilter");
+    ctx->audiofilter = gst_element_factory_make("capsfilter", "audiofilter");
+    if( !ctx->audiofilter )
+    {
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    //   GstCaps* encSrcCaps; TL
+    if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->audiofilter))
+    {
+        DEBUG_INFO("Added audiofilter to bin");
+    }
+    else
+    {
+        DEBUG_ERR("Could not add audio filter to bin");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    
+    pMime = (XADataFormat_MIME*) ctx->xaSink->pFormat;
+    if(!strcmp((const char*)pMime->mimeType, "audio/amr"))
+        {
+        encSrcCaps = gst_caps_new_simple ("audio/amr",
+                   "width", G_TYPE_INT, 8,
+                   "depth", G_TYPE_INT, 8,
+                   "signed",G_TYPE_BOOLEAN, TRUE,
+                   "endianness",G_TYPE_INT, G_BYTE_ORDER,
+                   "rate", G_TYPE_INT,  8000,
+                   "channels", G_TYPE_INT, 1, NULL);
+        }
+    else
+        {
+        encSrcCaps = gst_caps_new_full(
+                gst_structure_new("audio/x-raw-int",
+                    "width", G_TYPE_INT, 16,
+                    "depth", G_TYPE_INT, 16,
+                    "signed",G_TYPE_BOOLEAN, 1,
+                    "endianness",G_TYPE_INT, 1234,
+                    "rate", G_TYPE_INT, 16000,
+                    "bitrate", G_TYPE_INT, ctx->audioEncSettings.bitRate,
+                    "channels", G_TYPE_INT, 1, NULL),
+                /*gst_structure_new("audio/x-raw-int",
+                  "channels", G_TYPE_INT, ctx->audioEncSettings.channelsOut,
+                  "rate", G_TYPE_INT, ctx->audioEncSettings.sampleRate,
+                  "bitrate", G_TYPE_INT, ctx->audioEncSettings.bitRate,
+                  NULL),*/
+                gst_structure_new("audio/x-raw-float",
+                    "channels", G_TYPE_INT, ctx->audioEncSettings.channelsOut,
+                    "width", G_TYPE_INT, ctx->audioEncSettings.bitsPerSample,
+                    "rate", G_TYPE_INT, ctx->audioEncSettings.sampleRate,
+                    "bitrate", G_TYPE_INT, ctx->audioEncSettings.bitRate,
+                    NULL),
+                NULL);
+
+        }
+
+
+    DEBUG_INFO_A1("audio encoder config from settings: %s",gst_caps_to_string(encSrcCaps));
+    g_object_set( G_OBJECT(ctx->audiofilter), "caps",encSrcCaps,NULL);
+
+    gst_caps_unref(encSrcCaps);
+    return XA_RESULT_SUCCESS;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAMEDIARECORDERADAPTCTX_H_
+#define XAMEDIARECORDERADAPTCTX_H_
+
+#include "xaadaptationgst.h"
+#include "xametadataadaptation.h"
+
+/* TYPEDEFS */
+
+typedef struct XASnapshotItfVars_
+{
+
+    /*User variables*/
+    XAuint32        numpics;
+    XAuint32        fps;
+    XAboolean       freeze;
+    gchar*          fnametemplate;
+    XADataSink*     xaSink;
+
+    /* internal variables */
+    gboolean        waitforbuffer;
+    gboolean        parsenegotiated;
+    XAuint32        numpicstaken;
+
+    GstBus*         ssbus;
+    GstElement*     sspipeline;
+    GstElement*     ssbuffersrc;
+    GstElement*     ssparser;
+    GstElement*     ssscaler;
+    GstElement*     ssfilter;
+    GstElement*     ssencoder;
+    GstElement*     sstagger;
+    GstElement*     sssink;
+    gulong          sighandler;
+
+    GstBuffer*      snapshotbuffer;
+
+} XASnapshotItfVars;
+
+/* context to track buffer insufficient event */
+typedef struct recordItfCtx_{
+    XAImplSemHandle bufInsufficientSem;
+    XAboolean buffer_insufficient;
+}recodtItfCtx;
+
+typedef struct XAMediaRecorderAdaptationCtx_ XAMediaRecorderAdaptationCtx;
+
+typedef struct XAMediaRecorderAdaptationCtx_
+{
+    /* Parent*/
+    XAAdaptationGstCtx_ baseObj;
+
+    /* OMX-AL Variables */
+    XADataSource            *xaAudioSource, *xaVideoSource;
+    XADataSink              *xaSink;
+    XAuint8                 recModes;
+
+    /* GST elements */
+    GstElement              *datasink;
+    XAboolean               isobjsink;   /*is sink another XA object?*/
+    GstElement              *codecbin;
+    GstElement              *audioppbin;
+    GstElement              *audiofilter;
+    GstElement              *videoppbin;
+    GstElement              *videofilter;
+    GstElement              *videoextract;
+    GstElement              *audiosource;
+    GstElement              *audioqueue;
+    XAboolean               isobjasrc;    /*is audio source another XA object?*/
+    GstElement              *videosource;
+    GstState                vsrcOrigState;
+    GstElement              *videoqueue;
+    XAboolean               isobjvsrc;    /*is video source another XA object?*/
+    XAboolean               encodingchanged;
+
+    XAboolean               mute;
+    XAuint32                imageEffectID;
+    XAboolean               isStereoPosition;
+    XAuint32                xaRecordState;
+    XAmillidegree           curRotation;
+    XAuint32                curMirror;
+    XAboolean               isRecord;
+
+    /* internals */
+    XAboolean               trackpositionenabled;
+    gboolean                runpositiontimer;
+    GSourceFunc             positionCb;
+
+    XAImplThreadHandle      recordingEventThr;
+    recodtItfCtx            recThrCtx;
+
+
+    /* Variables for snapshot */
+    XASnapshotItfVars       snapshotVars;
+
+    XAMetadataAdaptVars     *metadatavars;
+
+    /* Variables for encoders */
+    XAAudioEncoderSettings  audioEncSettings;
+    XAVideoSettings         videoEncSettings;
+    XAImageSettings         imageEncSettings;
+
+    /*buffersink variable*/
+    guint64                 writepos;
+
+} XAMediaRecorderAdaptationCtx_;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create(  XADataSource* pAudioSrc, XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes );
+XAresult XAMediaRecorderAdapt_PostInit( XAAdaptationGstCtx* bCtx );
+void XAMediaRecorderAdapt_Destroy( XAAdaptationGstCtx* bCtx );
+/*XAresult XAMediaRecorderAdapt_InitContentPipeSink(XAMediaRecorderAdaptationCtx* ctx);*/
+XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx_* mCtx );
+XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx, XACapsType encType, XAuint32 encoderId );
+
+void*  XAMediaRecorderAdapt_RecordEventThr(void* ctx);
+
+#endif /* XAMEDIARECORDERADAPTCTX_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,1200 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include <gst.h>
+#include "xaadaptationgst.h"
+#include "xametadataadaptctx.h"
+#include "xamediaplayeradaptctx.h"
+#include "xamediarecorderadaptctx.h"
+#include "xametadataadaptation.h"
+
+/* forward declarations of internal methods */
+XAMetadataAdaptVars* XAMetadataAdapt_GetMetadataVars(XAAdaptationGstCtx *bCtx);
+GstStructure* XAMetadataAdapt_GetChildStructure(XAMetadataAdaptVars* mdv, XAuint32 index);
+gboolean XAMetadataAdapt_CountTags(GQuark gkey, const GValue *gvalue, gpointer counter);
+void XAMetadataAdapt_ParseTag(const GstTagList* list, const gchar* tag, gpointer listptr);
+gboolean XAMetadataAdapt_ParseItem(GQuark field_id, const GValue * value, gpointer listptr);
+gboolean XAMetadataAdapt_GstTagCb( GstBus *bus, GstMessage *message, gpointer data );
+
+/*NOTE: no way to query these dynamically?*/
+/*supported keys for metadata insertion*/
+static char* xaMetadataAdaptSupportedKeys[] = {
+    KHRONOS_TITLE,
+    KHRONOS_ALBUM,
+    KHRONOS_TRACK_NUMBER,
+    KHRONOS_ARTIST,
+    KHRONOS_GENRE,
+    KHRONOS_COMMENT,
+    KHRONOS_COPYRIGHT,
+    GST_TAG_TITLE,
+    GST_TAG_TITLE_SORTNAME,
+    GST_TAG_ARTIST,
+    GST_TAG_ARTIST_SORTNAME,
+    GST_TAG_ALBUM,
+    GST_TAG_ALBUM_SORTNAME,
+    GST_TAG_COMPOSER,
+    GST_TAG_DATE,
+    GST_TAG_GENRE,
+    GST_TAG_COMMENT,
+    GST_TAG_EXTENDED_COMMENT,
+    GST_TAG_TRACK_NUMBER,
+    GST_TAG_TRACK_COUNT,
+    GST_TAG_ALBUM_VOLUME_NUMBER,
+    GST_TAG_ALBUM_VOLUME_COUNT,
+    GST_TAG_LOCATION,
+    GST_TAG_DESCRIPTION,
+    GST_TAG_VERSION,
+    GST_TAG_ISRC,
+    GST_TAG_ORGANIZATION,
+    GST_TAG_COPYRIGHT,
+    GST_TAG_COPYRIGHT_URI,
+    GST_TAG_CONTACT,
+    GST_TAG_LICENSE,
+    GST_TAG_LICENSE_URI,
+    GST_TAG_PERFORMER,
+    NULL
+};
+
+/******************************************************************************
+ * COMMONS
+ ******************************************************************************/
+
+
+/* const char* XAMetadataAdapt_ParseKhronosKey(const char* pKKey)
+ * Translates Khronos key string to adaptation-specific key string
+ * @return Translated key string
+ */
+const XAchar* XAMetadataAdapt_ParseKhronosKey(const XAchar* pKKey)
+{
+    const XAchar* newKey;
+    DEBUG_API_A1("->XAMetadataAdapt_ParseKhronosKey: \"%s\"", (char*)pKKey);
+    if( strcmp((char*)pKKey,KHRONOS_TITLE) ==0 ) newKey = (XAchar*)GST_TAG_TITLE;
+    else if( strcmp((char*)pKKey,KHRONOS_ALBUM) ==0 ) newKey = (XAchar*)GST_TAG_ALBUM;
+    else if( strcmp((char*)pKKey,KHRONOS_TRACK_NUMBER) ==0 ) newKey = (XAchar*)GST_TAG_TRACK_NUMBER;
+    else if( strcmp((char*)pKKey,KHRONOS_ARTIST) ==0 ) newKey = (XAchar*)GST_TAG_ARTIST;
+    else if( strcmp((char*)pKKey,KHRONOS_GENRE) ==0 ) newKey = (XAchar*)GST_TAG_GENRE;
+    else if( strcmp((char*)pKKey,KHRONOS_COMMENT) ==0 ) newKey = (XAchar*)GST_TAG_COMMENT;
+    else if( strcmp((char*)pKKey,KHRONOS_COPYRIGHT) ==0 ) newKey = (XAchar*)GST_TAG_COPYRIGHT;
+    else newKey = pKKey;
+/* No Gst keys for following:
+    else if( strcmp(pKKey,KHRONOS_YEAR) ==0 ) newKey = ;
+    else if( strcmp(pKKey,KHRONOS_ARTIST_URL) ==0 ) newKey = ;
+    else if( strcmp(pKKey,KHRONOS_CONTENT_URL) ==0 ) newKey = ;
+    else if( strcmp(pKKey,KHRONOS_RATING) ==0 ) newKey = ;
+    else if( strcmp(pKKey,KHRONOS_ALBUM_ART) ==0 ) newKey = ;
+ */
+    DEBUG_API_A1("<-XAMetadataAdapt_ParseKhronosKey: => \"%s\"", (char*)newKey);
+    return newKey;
+}
+
+/* XAresult XAMetadataAdapt_PreInit(XAAdaptationGstCtx *bCtx)
+ * Initialize values needed before preroll
+ * @return XAresult ret - Success value
+ */
+XAresult XAMetadataAdapt_PreInit(XAAdaptationGstCtx *bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv;
+    DEBUG_API("->XAMetadataAdapt_PreInit");
+    if( bCtx->baseObj.ctxId == XAMDAdaptation ||
+        bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        mdv = (XAMetadataAdaptVars*) calloc(1, sizeof(XAMetadataAdaptVars));
+        mdv->currentchild = &(mdv->generaltags);
+        mdv->traversemode=XA_METADATATRAVERSALMODE_NODE;
+        ((XAMediaPlayerAdaptationCtx*)bCtx)->metadatavars = mdv;
+
+    }
+    else if ( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        mdv = (XAMetadataAdaptVars*) calloc(1, sizeof(XAMetadataAdaptVars));
+        mdv->currentchild = &(mdv->generaltags);
+        mdv->traversemode=XA_METADATATRAVERSALMODE_NODE;
+        ((XAMediaRecorderAdaptationCtx*)bCtx)->metadatavars = mdv;
+    }
+    else
+    {
+        DEBUG_ERR("Unsupported metadata context!!");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+    }
+
+    if(ret == XA_RESULT_SUCCESS)
+    {
+        if(bCtx->bus)
+        {
+            g_signal_connect(bCtx->bus, "message::tag", G_CALLBACK(XAMetadataAdapt_GstTagCb), bCtx );
+        }
+        else
+        {
+            DEBUG_ERR("No bus in context!!");
+            ret = XA_RESULT_PRECONDITIONS_VIOLATED;
+        }
+    }
+    DEBUG_API_A1("<-XAMetadataAdapt_PreInit (%d)", (int)ret);
+    return ret;
+}
+/* XAresult XAMetadataAdapt_PostInit(XAAdaptationGstCtx *bCtx)
+ * Initialize values after preroll
+ * @return XAresult ret - Success value
+ */
+XAresult XAMetadataAdapt_PostInit(XAAdaptationGstCtx *bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+    XAMediaPlayerAdaptationCtx* mCtx=NULL;
+    GstPad* tmppad=NULL;
+    GstCaps* tmpcaps=NULL;
+    GstElement* tmpelement=NULL;
+    XAAdaptEvent event = {XA_METADATAEVENTS, XA_ADAPT_MDE_TAGS_AVAILABLE, 0, NULL };
+
+    DEBUG_API("->XAMetadataAdapt_PostInit");
+    if( bCtx->baseObj.ctxId == XAMDAdaptation ||
+        bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        mdv = XAMetadataAdapt_GetMetadataVars(bCtx);
+        if( mdv )
+        {
+            mdv->childcount = 0;
+            /* try to dig out audio and video pads from decodebin for stream info tags */
+            /* NOTE: currently no good deterministic way to dig out undecoded pads
+             * from decodebin's internal demuxer, this is just ugly way to try to cope
+             * with most demuxers.
+             */
+            mCtx = ((XAMediaPlayerAdaptationCtx*)bCtx);
+            if(GST_IS_BIN(mCtx->codecbin))
+            {
+                tmpelement=gst_bin_get_by_name(GST_BIN(mCtx->codecbin),"typefind");
+                if(tmpelement)
+                {
+                    tmppad = gst_element_get_static_pad(GST_ELEMENT(tmpelement),"src");
+                    tmpelement=NULL;
+                    if(tmppad)
+                    {
+                        tmppad = gst_pad_get_peer(tmppad);
+                        if(tmppad)
+                        {
+                            tmpelement = gst_pad_get_parent_element(tmppad);
+                        }
+                    }
+                    /* now we have demuxer, if existing */
+                    if(tmpelement)
+                    {
+                        tmppad = gst_element_get_pad( tmpelement, "audio_00");
+                        if(tmppad)
+                        {
+                            tmpcaps = gst_pad_get_negotiated_caps( GST_PAD(tmppad) );
+                            if(tmpcaps==NULL || gst_caps_is_any(tmpcaps) || gst_caps_is_empty(tmpcaps))
+                            {
+                                mdv->audiotags = NULL;
+                                DEBUG_INFO("no usable audio properties found from pad !");
+                            }
+                            else
+                            {
+                                mdv->audiotags = gst_caps_get_structure(tmpcaps,0);
+                                mdv->childcount++;
+                                DEBUG_INFO_A1("found audio node: %s",gst_caps_to_string(tmpcaps));
+                            }
+                        }
+                        tmppad = gst_element_get_pad( tmpelement, "video_00");
+                        if(tmppad)
+                        {
+                            tmpcaps = gst_pad_get_negotiated_caps( GST_PAD(tmppad) );
+                            if(tmpcaps==NULL || gst_caps_is_any(tmpcaps) || gst_caps_is_empty(tmpcaps))
+                            {
+                                mdv->videotags = NULL;
+                                DEBUG_INFO("no usable video properties found from pad !");
+                            }
+                            else
+                            {
+                                mdv->videotags = gst_caps_get_structure(tmpcaps,0);
+                                mdv->childcount++;
+                                DEBUG_INFO_A1("found video node: %s",gst_caps_to_string(tmpcaps));
+                            }
+                        }
+                    }
+                }
+            }
+            XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+        }
+    }
+
+    if ( tmpelement )
+    {
+    	gst_object_unref( tmpelement );
+    }
+    if ( tmppad )
+    {
+    	gst_object_unref( tmppad );
+    }
+    if ( tmpcaps )
+    {
+    	gst_object_unref( tmpcaps );
+    }
+
+    DEBUG_API_A1("<-XAMetadataAdapt_PostInit (%d)", (int)ret);
+    return ret;
+}
+
+/*
+ * void XAMetadataAdapt_FreeImplTagList(XAMetadataImplTagList *list, XAboolean freeItems)
+ * deallocate elements inside taglist
+ */
+void XAMetadataAdapt_FreeImplTagList(XAMetadataImplTagList *list, XAboolean freeItems)
+{
+    XAuint16 i;
+    DEBUG_API("->XAMetadataExtractionItfAdapt_FreeTagList");
+    if(list->mdeKeys)
+    {
+        for(i=0;i<list->itemcount;i++)
+        {
+            if(list->mdeKeys[i])
+            {
+                if(freeItems)
+                    free(list->mdeKeys[i]);
+                list->mdeKeys[i]=NULL;
+            }
+        }
+        free(list->mdeKeys);
+        list->mdeKeys = NULL;
+    }
+    if(list->mdeValues)
+    {
+        for(i=0;i<list->itemcount;i++)
+        {
+            if(list->mdeValues[i])
+            {
+                if(freeItems)
+                    free(list->mdeValues[i]);
+                list->mdeValues[i]=NULL;
+            }
+        }
+        free(list->mdeValues);
+        list->mdeValues = NULL;
+    }
+    list->itemcount = 0;
+    DEBUG_API("<-XAMetadataExtractionItfAdapt_FreeTagList");
+}
+
+/*
+ * void XAMetadataAdapt_FreeVars(XAMetadataAdaptVars *vars)
+ * deallocate XAMetadataAdaptVars
+ */
+void XAMetadataAdapt_FreeVars(XAMetadataAdaptVars *vars)
+{
+    DEBUG_API("->XAMetadataAdapt_FreeVars");
+    if(vars)
+    {
+        if( vars->generaltags )
+        {
+            gst_tag_list_free(vars->generaltags);
+        }
+        if( vars->audiotags )
+        {
+            gst_structure_set_parent_refcount(vars->audiotags,NULL);
+            gst_structure_free(vars->audiotags);
+        }
+        if( vars->videotags )
+        {
+            gst_structure_set_parent_refcount(vars->videotags,NULL);
+            gst_structure_free(vars->videotags);
+        }
+        free(vars);
+    }
+    DEBUG_API("<-XAMetadataAdapt_FreeVars");
+}
+
+/******************************************************************************
+ * EXTRACTION
+ ******************************************************************************/
+
+/*
+ * XAresult XAMetadataExtractionItfAdapt_FillTagList()
+ * @param tagList - contains pointer to tag list to be updated
+ * @return XAresult ret - Success value
+ */
+XAresult XAMetadataExtractionItfAdapt_FillTagList(XAAdaptationGstCtx *bCtx,
+                                                  XAMetadataImplTagList* tagList)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv;
+    XAuint32 newcount = 0;
+    DEBUG_API("->XAMetadataExtractionItfAdapt_FillTagList");
+
+    mdv = XAMetadataAdapt_GetMetadataVars(bCtx);
+    if( mdv )
+    {
+        XAMetadataAdapt_FreeImplTagList(tagList, XA_BOOLEAN_TRUE);
+        /* get number of tags and allocate memory for them */
+        if(mdv->traversemode==XA_METADATATRAVERSALMODE_ALL)
+        {
+            if(mdv->generaltags)
+                gst_structure_foreach(mdv->generaltags, XAMetadataAdapt_CountTags, &newcount);
+            if(mdv->audiotags)
+                gst_structure_foreach(mdv->audiotags, XAMetadataAdapt_CountTags, &newcount);
+            if(mdv->videotags)
+                gst_structure_foreach(mdv->videotags, XAMetadataAdapt_CountTags, &newcount);
+        }
+        else
+        {
+            if(mdv->currentchild && *(mdv->currentchild))
+                gst_structure_foreach(*(mdv->currentchild), XAMetadataAdapt_CountTags, &newcount);
+        }
+        DEBUG_INFO_A1("tag count = %d",(int)newcount)
+        tagList->mdeKeys = (XAMetadataInfo**)calloc(newcount,sizeof(XAMetadataInfo*));
+        tagList->mdeValues = (XAMetadataInfo**)calloc(newcount,sizeof(XAMetadataInfo*));
+
+        /* fill in given tag list */
+        tagList->itemcount = 0;
+        if(mdv->traversemode==XA_METADATATRAVERSALMODE_ALL)
+        {
+            if(mdv->generaltags)
+                gst_tag_list_foreach(mdv->generaltags, XAMetadataAdapt_ParseTag, tagList);
+            if(mdv->audiotags)
+                gst_structure_foreach(mdv->audiotags, XAMetadataAdapt_ParseItem, tagList);
+            if(mdv->videotags)
+                gst_structure_foreach(mdv->videotags, XAMetadataAdapt_ParseItem, tagList);
+        }
+        else
+        {
+            if(mdv->currentchild && *(mdv->currentchild))
+            {
+                if(GST_IS_TAG_LIST(*(mdv->currentchild)))
+                {
+                    gst_tag_list_foreach(*(mdv->currentchild), XAMetadataAdapt_ParseTag, tagList);
+                }
+                else
+                {
+                    gst_structure_foreach(*(mdv->currentchild), XAMetadataAdapt_ParseItem, tagList);
+                }
+            }
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Metadata variables not found!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_API_A1("<-XAMetadataExtractionItfAdapt_FillTagList (%d)", (int)ret);
+    return ret;
+}
+
+/******************************************************************************
+ * TRAVERSAL
+ *****************************************************************************/
+
+/*
+ * XAresult XAMetadataTraversalItfAdapt_SetMode(XAAdaptationGstCtx *bCtx, XAuint32 mode)
+ */
+XAresult XAMetadataTraversalItfAdapt_SetMode(XAAdaptationGstCtx *bCtx, XAuint32 mode)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+    XAAdaptEvent event = {XA_METADATAEVENTS, XA_ADAPT_MDE_TAGS_AVAILABLE, 0, NULL };
+
+    DEBUG_API("->XAMetadataTraversalItfAdapt_SetMode");
+    mdv = XAMetadataAdapt_GetMetadataVars(bCtx);
+    if( mdv )
+    {
+        mdv->traversemode = mode;
+        /* inform extractor to update tag list */
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+        if(mdv->traversemode==XA_METADATATRAVERSALMODE_ALL)
+        {
+            mdv->nodedepth = 0;
+            mdv->currentchild = &(mdv->generaltags);
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Metadata variables not found!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_API("<-XAMetadataTraversalItfAdapt_SetMode");
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataTraversalItfAdapt_GetChildCount(XAAdaptationGstCtx *bCtx, XAuint32 *pCount)
+ */
+XAresult XAMetadataTraversalItfAdapt_GetChildCount(XAAdaptationGstCtx *bCtx, XAuint32 *pCount)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+
+    DEBUG_API("->XAMetadataTraversalItfAdapt_GetChildCount");
+    mdv = XAMetadataAdapt_GetMetadataVars(bCtx);
+    if( mdv )
+    {
+        /* only depth of 1 is supported */
+        if( mdv->nodedepth == 0 )
+        {
+            *pCount=mdv->childcount;
+        }
+        else
+        {
+            *pCount=0;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Metadata variables not found!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+        *pCount=0;
+    }
+    DEBUG_API_A2("<-XAMetadataTraversalItfAdapt_GetChildCount(%d) count=%d", (int)ret, (int)*pCount);
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataTraversalItfAdapt_GetChildMIMETypeSize(XAAdaptationGstCtx *bCtx,
+ *                                                         XAuint32 index,
+ *                                                         XAuint32 *pSize)
+ */
+XAresult XAMetadataTraversalItfAdapt_GetChildMIMETypeSize(XAAdaptationGstCtx *bCtx,
+                                                          XAuint32 index,
+                                                          XAuint32 *pSize)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+
+    DEBUG_API("->XAMetadataTraversalItfAdapt_GetChildMIMETypeSize");
+    mdv = XAMetadataAdapt_GetMetadataVars(bCtx);
+    if( mdv )
+    {
+        GstStructure* child = XAMetadataAdapt_GetChildStructure(mdv,index);
+        if(child)
+        {
+            *pSize = strlen(gst_structure_get_name(child));
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Metadata variables not found!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+        *pSize=0;
+    }
+    DEBUG_API("<-XAMetadataTraversalItfAdapt_GetChildMIMETypeSize");
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataTraversalItfAdapt_GetChildInfo(XAAdaptationGstCtx *bCtx,
+ *                                                  XAuint32 index,
+ *                                                 XAint32 *pNodeID,
+ *                                                 XAuint32 *pType,
+ *                                                 XAuint32 size,
+ *                                                 XAchar *pMimeType)
+ */
+XAresult XAMetadataTraversalItfAdapt_GetChildInfo(XAAdaptationGstCtx *bCtx,
+                                                  XAuint32 index,
+                                                  XAint32 *pNodeID,
+                                                  XAuint32 *pType,
+                                                  XAuint32 size,
+                                                  XAchar *pMimeType)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+    const gchar* mime;
+    GstStructure* child;
+
+    DEBUG_API("->XAMetadataTraversalItfAdapt_GetChildInfo");
+    mdv = XAMetadataAdapt_GetMetadataVars(bCtx);
+    if( mdv )
+    {
+        child = XAMetadataAdapt_GetChildStructure(mdv,index);
+        if(child)
+        {
+            *pNodeID = (XAint32)child;
+            mime = gst_structure_get_name(child);
+            if(strncmp(mime,"audio",5)==0)
+            {
+                *pType = XA_NODETYPE_AUDIO;
+            }
+            if(strncmp(mime,"video",5)==0)
+            {
+                *pType = XA_NODETYPE_VIDEO;
+            }
+            if(strncmp(mime,"image",5)==0)
+            {
+                *pType = XA_NODETYPE_IMAGE;
+            }
+            else
+            {
+                *pType = XA_NODETYPE_UNSPECIFIED;
+            }
+            strncpy((char*)pMimeType,mime,size);
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Metadata variables not found!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    DEBUG_API("<-XAMetadataTraversalItfAdapt_GetChildInfo");
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataTraversalItfAdapt_SetActiveNode(XAAdaptationGstCtx *bCtx,
+ *                                                  XAuint32 index)
+ */
+XAresult XAMetadataTraversalItfAdapt_SetActiveNode(XAAdaptationGstCtx *bCtx,
+                                                   XAuint32 index)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+    GstStructure* child;
+
+    DEBUG_API("->XAMetadataTraversalItfAdapt_SetActiveNode");
+    mdv = XAMetadataAdapt_GetMetadataVars(bCtx);
+    if( mdv )
+    {
+        child = XAMetadataAdapt_GetChildStructure(mdv,index);
+        if(child)
+        {
+            mdv->currentchild = &child;
+            if(index==XA_NODE_PARENT) mdv->nodedepth--;
+            else mdv->nodedepth++;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Metadata variables not found!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    DEBUG_API("<-XAMetadataTraversalItfAdapt_SetActiveNode");
+    return ret;
+}
+
+/*****************************************************************************
+ * INSERTION
+ *****************************************************************************/
+
+/*
+ * XAresult XAMetadataInsertionItfAdapt_CreateChildNode(XAAdaptationGstCtx *bCtx,
+ *                                                   XAint32 parentNodeID,
+ *                                                   XAuint32 type,
+ *                                                   XAchar *mimeType,
+ *                                                   XAint32 *pChildNodeID)
+ */
+XAresult XAMetadataInsertionItfAdapt_CreateChildNode(XAAdaptationGstCtx *bCtx,
+                                                    XAint32 parentNodeID,
+                                                    XAuint32 type,
+                                                    XAchar *mimeType,
+                                                    XAint32 *pChildNodeID)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+    XAMediaRecorderAdaptationCtx* mCtx;
+
+    DEBUG_API("->XAMetadataInsertionItfAdapt_CreateChildNode");
+    if(bCtx && bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        /* no support for more than 1 levels of childs*/
+        if(parentNodeID==XA_ROOT_NODE_ID)
+        {
+            XAMediaType mediaType;
+            mCtx = (XAMediaRecorderAdaptationCtx*)bCtx;
+
+            /* first check sink type */
+            XACommon_CheckDataSource((XADataSource*)(mCtx->xaSink),&mediaType);
+            if( ((mediaType==XA_MEDIATYPE_AUDIO||mediaType==XA_MEDIATYPE_VIDEO) && type==XA_NODETYPE_IMAGE) ||
+                (mediaType==XA_MEDIATYPE_IMAGE && (type==XA_NODETYPE_AUDIO || type==XA_NODETYPE_VIDEO)) )
+            {
+                DEBUG_ERR("Nodetype not supported!");
+                ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                DEBUG_API_A1("<-XAMetadataInsertionItfAdapt_CreateChildNode (%d)", (int)ret);
+                return ret;            }
+
+            mdv = mCtx->metadatavars;
+            if(!mdv)
+            {
+                DEBUG_ERR("Metadata variables not initialized!");
+                ret = XA_RESULT_PRECONDITIONS_VIOLATED;
+            }
+            switch(type)
+            {
+            case XA_NODETYPE_IMAGE:
+                /*fall-through to use video pipe tags for image*/
+            case XA_NODETYPE_VIDEO:
+                if(!mCtx->videosource)
+                {
+                    DEBUG_ERR("Nodetype not found!");
+                    ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                }
+                else
+                {
+                    if(!mdv->videotags)
+                    {
+                        if(strlen((char*)mimeType)==0)
+                        {
+                            mdv->videotags = gst_structure_empty_new("video/unknown");
+                        }
+                        else
+                        {
+                            mdv->videotags = gst_structure_empty_new((gchar*)mimeType);
+                        }
+                    }
+                    *pChildNodeID = (XAint32)mdv->videotags;
+                }
+                break;
+            case XA_NODETYPE_AUDIO:
+                if(!mCtx->audiosource)
+                {
+                    DEBUG_ERR("Nodetype not found!");
+                    ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                }
+                else
+                {
+                    if(!mdv->audiotags)
+                    {
+                        if(strlen((char*)mimeType)==0)
+                        {
+                            mdv->audiotags = gst_structure_empty_new("audio/unknown");
+                        }
+                        else
+                        {
+                            mdv->audiotags = gst_structure_empty_new((gchar*)mimeType);
+                        }
+                    }
+                    *pChildNodeID = (XAint32)mdv->audiotags;
+                }
+                break;
+            default:
+                DEBUG_ERR("Nodetype not found!");
+                ret = XA_RESULT_CONTENT_UNSUPPORTED;
+                break;
+            }
+        }
+        else
+        {
+            DEBUG_ERR("Only root childs supported!!");
+            ret = XA_RESULT_CONTENT_UNSUPPORTED;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Unsupported metadata insertion context!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    DEBUG_API_A1("<-XAMetadataInsertionItfAdapt_CreateChildNode (%d)", (int)ret);
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataInsertionItfAdapt_GetSupportedKeysCount(XAAdaptationGstCtx *bCtx,
+ *                                                         XAint32 nodeID,
+ *                                                         XAboolean *pFreeKeys,
+ *                                                         XAuint32 *pKeyCount,
+ *                                                         XAuint32 *pEncodingCount)
+ */
+XAresult XAMetadataInsertionItfAdapt_GetSupportedKeysCount(XAAdaptationGstCtx *bCtx,
+                                                          XAint32 nodeID,
+                                                          XAboolean *pFreeKeys,
+                                                          XAuint32 *pKeyCount,
+                                                          XAuint32 *pEncodingCount)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("->XAMetadataInsertionItfAdapt_GetSupportedKeysCount");
+    if(bCtx && bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        *pKeyCount = 0;
+        *pFreeKeys = XA_BOOLEAN_FALSE;
+        while(xaMetadataAdaptSupportedKeys[*pKeyCount])
+        {
+            (*pKeyCount)++;
+        }
+        *pEncodingCount = 1;
+    }
+    else
+    {
+        DEBUG_ERR("Unsupported metadata insertion context!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    DEBUG_API("<-XAMetadataInsertionItfAdapt_GetSupportedKeysCount");
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataInsertionItfAdapt_GetKeySize(XAAdaptationGstCtx *bCtx,
+ *                                              XAint32 nodeID,
+ *                                              XAuint32 keyIndex,
+ *                                              XAuint32 *pKeySize)
+ */
+XAresult XAMetadataInsertionItfAdapt_GetKeySize(XAAdaptationGstCtx *bCtx,
+                                               XAint32 nodeID,
+                                               XAuint32 keyIndex,
+                                               XAuint32 *pKeySize)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("->XAMetadataInsertionItfAdapt_GetKeySize");
+    if(bCtx && bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        if(xaMetadataAdaptSupportedKeys[keyIndex])
+        {
+            *pKeySize = sizeof(XAMetadataInfo)+strlen(xaMetadataAdaptSupportedKeys[keyIndex]);
+        }
+        else
+        {
+            ret = XA_RESULT_PARAMETER_INVALID;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Unsupported metadata insertion context!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    DEBUG_API("<-XAMetadataInsertionItfAdapt_GetKeySize");
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataInsertionItfAdapt_GetKey(XAAdaptationGstCtx *bCtx,
+ *                                          XAint32 nodeID,
+ *                                          XAuint32 keyIndex,
+ *                                          XAuint32 keySize,
+ *                                          XAMetadataInfo *pKey)
+ */
+XAresult XAMetadataInsertionItfAdapt_GetKey(XAAdaptationGstCtx *bCtx,
+                                           XAint32 nodeID,
+                                           XAuint32 keyIndex,
+                                           XAuint32 keySize,
+                                           XAMetadataInfo *pKey)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 datasize, neededsize;
+
+    DEBUG_API("->XAMetadataInsertionItfAdapt_GetKey");
+    if(bCtx && bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        memset(pKey,0,keySize);
+        if(xaMetadataAdaptSupportedKeys[keyIndex] && (keySize > sizeof(XAMetadataInfo)))
+        {
+            neededsize = strlen(xaMetadataAdaptSupportedKeys[keyIndex])+1;
+            datasize = keySize-sizeof(XAMetadataInfo)+1;
+            if(neededsize>datasize)
+            {
+                strncpy((char*)pKey->data,xaMetadataAdaptSupportedKeys[keyIndex],datasize);
+                pKey->size=datasize;
+                ret=XA_RESULT_BUFFER_INSUFFICIENT;
+            }
+            else
+            {
+                strncpy((char*)pKey->data,xaMetadataAdaptSupportedKeys[keyIndex],neededsize);
+                pKey->size=neededsize;
+            }
+            pKey->encoding = XA_CHARACTERENCODING_ASCII;
+            strcpy((char*)(pKey->langCountry),"en");
+        }
+        else
+        {
+            ret = XA_RESULT_PARAMETER_INVALID;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Unsupported metadata insertion context!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    DEBUG_API("<-XAMetadataInsertionItfAdapt_GetKey");
+    return ret;
+}
+
+/*
+ * XAresult XAMetadataInsertionItfAdapt_GetFreeKeysEncoding(XAAdaptationGstCtx *bCtx,
+ *                                                       XAint32 nodeID,
+ *                                                       XAuint32 encodingIndex,
+ *                                                       XAuint32 *pEncoding)
+ */
+XAresult XAMetadataInsertionItfAdapt_GetFreeKeysEncoding(XAAdaptationGstCtx *bCtx,
+                                                        XAint32 nodeID,
+                                                        XAuint32 encodingIndex,
+                                                        XAuint32 *pEncoding)
+{
+    DEBUG_API("->XAMetadataInsertionItfAdapt_GetFreeKeysEncoding");
+    DEBUG_API("<-XAMetadataInsertionItfAdapt_GetFreeKeysEncoding");
+    /* no free keys*/
+    return XA_RESULT_PRECONDITIONS_VIOLATED;
+}
+
+/*
+ * XAresult XAMetadataInsertionItfAdapt_InsertMetadataItem(XAAdaptationGstCtx *bCtx,
+ *                                                      XAint32 nodeID,
+ *                                                      XAMetadataInfo *pKey,
+ *                                                      XAMetadataInfo *pValue,
+ *                                                      XAboolean overwrite)
+ */
+XAresult XAMetadataInsertionItfAdapt_InsertMetadataItem(XAAdaptationGstCtx *bCtx,
+                                                       XAint32 nodeID,
+                                                       XAMetadataInfo *pKey,
+                                                       XAMetadataInfo *pValue,
+                                                       XAboolean overwrite)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMetadataAdaptVars* mdv=NULL;
+    XAMediaRecorderAdaptationCtx* mCtx;
+    GstTagMergeMode mode = (overwrite?GST_TAG_MERGE_REPLACE:GST_TAG_MERGE_KEEP);
+    gchar* parsedKey = (gchar*)XAMetadataAdapt_ParseKhronosKey((XAchar*)pKey->data);
+    DEBUG_API("->XAMetadataInsertionItfAdapt_InsertMetadataItem");
+    if(bCtx && bCtx->baseObj.ctxId == XAMediaRecorderAdaptation)
+    {
+        mCtx = (XAMediaRecorderAdaptationCtx*)bCtx;
+        mdv = mCtx->metadatavars;
+        if(mdv)
+        {
+            if( nodeID==XA_ROOT_NODE_ID )
+            {
+                if(!mdv->generaltags)
+                {
+                    mdv->generaltags = gst_tag_list_new();
+                }
+                if (gst_tag_get_type (parsedKey) == G_TYPE_STRING)
+                {
+                    gst_tag_list_add(mdv->generaltags, mode, parsedKey, (gchar*)pValue->data, NULL );
+                }
+                else
+                {
+                    gst_tag_list_add(mdv->generaltags, mode, parsedKey, atoi((gchar*)pValue->data), NULL );
+                }
+            }
+            else
+            {
+                if(nodeID == (XAint32)mdv->audiotags || nodeID == (XAint32)mdv->videotags)
+                {
+                    if (gst_tag_get_type (parsedKey) == G_TYPE_STRING)
+                    {
+                        gst_structure_set((GstStructure*)nodeID, parsedKey, G_TYPE_STRING, g_strdup((gchar*)pValue->data), NULL );
+                    }
+                    else
+                    {
+                        gst_structure_set((GstStructure*)nodeID, parsedKey, gst_tag_get_type (parsedKey), atoi((gchar*)pValue->data), NULL );
+                    }
+                }
+                else
+                {
+                    DEBUG_ERR("Unknown node!!");
+                    ret = XA_RESULT_PARAMETER_INVALID;
+                }
+            }
+            if( ret == XA_RESULT_SUCCESS )
+            {   /* let (possible) extraction itf to know new tags  */
+                XAAdaptEvent event = {XA_METADATAEVENTS, XA_ADAPT_MDE_TAGS_AVAILABLE, 0, NULL };
+                XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+            }
+        }
+        else
+        {
+            DEBUG_ERR("Metadata not initialized!!");
+            ret = XA_RESULT_PARAMETER_INVALID;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Unsupported metadata insertion context!!");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    DEBUG_API("<-XAMetadataInsertionItfAdapt_InsertMetadataItem");
+    return ret;
+}
+
+/*****************************************************************************
+ * INTERNALS
+ *****************************************************************************/
+
+
+/*
+ * GstStructure* XAMetadataAdapt_GetChildStructure(XAMetadataAdaptVars* mdv, XAuint32 index)
+ * helper to get gst structure corresponding to child index
+ */
+GstStructure* XAMetadataAdapt_GetChildStructure(XAMetadataAdaptVars* mdv, XAuint32 index)
+{
+    if(mdv->nodedepth == 0)
+    {   /*root childs, if existent, the order is 1)video 2)audio*/
+        if (index==0)
+        {
+            if(mdv->videotags) return mdv->videotags;
+            else if (mdv->audiotags) return mdv->audiotags;
+        }
+        else if (index==1)
+        {
+            if (mdv->audiotags) return mdv->audiotags;
+        }
+    }
+    else
+    {
+        if(index==XA_NODE_PARENT)
+        {
+            return GST_STRUCTURE(mdv->generaltags);
+        }
+    }
+    /*else*/
+    return NULL;
+}
+
+/*
+ * XAMetadataAdaptVars* XAMetadataAdapt_GetMetadataVars(XAAdaptationGstCtx *bCtx)
+ * Return metadata variables from different types of context
+ */
+XAMetadataAdaptVars* XAMetadataAdapt_GetMetadataVars(XAAdaptationGstCtx *bCtx)
+{
+    if( bCtx->baseObj.ctxId == XAMDAdaptation ||
+        bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        return ((XAMediaPlayerAdaptationCtx*)bCtx)->metadatavars;
+    }
+    else if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        return ((XAMediaRecorderAdaptationCtx*)bCtx)->metadatavars;
+    }
+    else
+    {
+        DEBUG_ERR("Invalid context for metadata");
+        return NULL;
+    }
+}
+
+/*
+ * gboolean XAMetadataAdapt_CountTags(GQuark field_id, const GValue* value, gpointer counter)
+ * GstStructureForeachFunc to count number of items inside list
+ */
+gboolean XAMetadataAdapt_CountTags(GQuark field_id, const GValue* value, gpointer counter)
+{
+    XAuint32* cnt = (XAuint32*)counter;
+    (*cnt)++;
+    return TRUE;
+}
+
+/*
+ * void XAMetadataAdapt_ParseTag(const GstTagList* list, const gchar* tag, gpointer listptr)
+ * GstTaglistForeachFunc to parse items inside gsttaglist
+ */
+void XAMetadataAdapt_ParseTag(const GstTagList* list, const gchar* tag, gpointer listptr)
+{
+    XAMetadataImplTagList* tagList = (XAMetadataImplTagList*)listptr;
+    const gchar *key;
+    gchar *value;
+    guint32 keylen, valuelen;
+
+    DEBUG_API("->XAMetadataAdapt_ParseTag");
+    key = gst_tag_get_nick(tag);
+    /*include null-terminator*/
+    keylen = strlen(key)+1;
+    tagList->mdeKeys[tagList->itemcount] = (XAMetadataInfo*)calloc(1,keylen+sizeof(XAMetadataInfo));
+    tagList->mdeKeys[tagList->itemcount]->size = keylen;
+    strncpy((char*)tagList->mdeKeys[tagList->itemcount]->data,key,keylen-1);
+
+    if (gst_tag_get_type (tag) == G_TYPE_STRING)
+    {
+        gst_tag_list_get_string_index(list, tag, 0, &value);
+    }
+    else
+    {
+        value = g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, 0));
+    }
+    /*include null-terminator*/
+    valuelen = strlen(value)+1;
+    tagList->mdeValues[tagList->itemcount] = (XAMetadataInfo*)calloc(1,valuelen+sizeof(XAMetadataInfo));
+    tagList->mdeValues[tagList->itemcount]->size = valuelen;
+    strncpy((char*)tagList->mdeValues[tagList->itemcount]->data,value,valuelen-1);
+
+    /* NOTE: for now, encoding and language fixed */
+    tagList->mdeKeys[tagList->itemcount]->encoding = XA_CHARACTERENCODING_ASCII;
+    tagList->mdeValues[tagList->itemcount]->encoding = XA_CHARACTERENCODING_ASCII;
+    strcpy((char*)tagList->mdeKeys[tagList->itemcount]->langCountry,"en");
+    strcpy((char*)tagList->mdeValues[tagList->itemcount]->langCountry,"en");
+    tagList->itemcount++;
+    DEBUG_API_A2("<-XAMetadataAdapt_ParseTag: added %s : %s",
+                 tagList->mdeKeys[tagList->itemcount-1]->data,
+                 tagList->mdeValues[tagList->itemcount-1]->data);
+}
+
+/*
+ * gboolean XAMetadataAdapt_ParseItem(GQuark gkey,
+ *                                const GValue* gvalue,
+ *                                gpointer listptr)
+ * GstStructureForeachFunc to parse items inside caps structure
+ */
+gboolean XAMetadataAdapt_ParseItem(GQuark gkey,
+                                 const GValue* gvalue,
+                                 gpointer listptr)
+{
+    XAMetadataImplTagList* tagList = (XAMetadataImplTagList*)listptr;
+    const gchar *key;
+    gchar *value;
+    guint32 keylen, valuelen;
+
+    DEBUG_API("->XAMetadataAdapt_ParseItem");
+    key = g_quark_to_string(gkey);
+    /*include null-terminator*/
+    keylen = strlen(key)+1;
+    tagList->mdeKeys[tagList->itemcount] = (XAMetadataInfo*)calloc(1,keylen+sizeof(XAMetadataInfo));
+    tagList->mdeKeys[tagList->itemcount]->size = keylen;
+    strncpy((char*)tagList->mdeKeys[tagList->itemcount]->data,key,keylen-1);
+
+    value = gst_value_serialize(gvalue);
+    /*include null-terminator*/
+    valuelen = strlen(value)+1;
+    tagList->mdeValues[tagList->itemcount] = (XAMetadataInfo*)calloc(1,valuelen+sizeof(XAMetadataInfo));
+    tagList->mdeValues[tagList->itemcount]->size = valuelen;
+    strncpy((char*)tagList->mdeValues[tagList->itemcount]->data,value,valuelen-1);
+
+    /* for Gst, encoding and language fixed */
+    tagList->mdeKeys[tagList->itemcount]->encoding = XA_CHARACTERENCODING_ASCII;
+    tagList->mdeValues[tagList->itemcount]->encoding = XA_CHARACTERENCODING_ASCII;
+    strcpy((char*)tagList->mdeKeys[tagList->itemcount]->langCountry,"en");
+    strcpy((char*)tagList->mdeValues[tagList->itemcount]->langCountry,"en");
+    tagList->itemcount++;
+    DEBUG_API_A2("<-XAMetadataAdapt_ParseItem: added %15s : %s",
+                 tagList->mdeKeys[tagList->itemcount-1]->data,
+                 tagList->mdeValues[tagList->itemcount-1]->data);
+    return TRUE;
+}
+
+/*
+ * gboolean XAMetadataAdapt_GstTagCb( GstBus *bus, GstMessage *message, gpointer data )
+ * Metadata callback - called when new tags found from stream
+ */
+gboolean XAMetadataAdapt_GstTagCb( GstBus *bus, GstMessage *message, gpointer data )
+{
+    GstTagList *new_tags;
+    GstTagList **old_tags = NULL;
+    XAAdaptationGstCtx* bCtx;
+    GstTagMergeMode mode;
+
+    bCtx = (XAAdaptationGstCtx*)data;
+    if(GST_MESSAGE_TAG==GST_MESSAGE_TYPE(message))
+    {
+        DEBUG_API_A2("->XAMetadataAdapt_GstTagCb:\"%s\" from object \"%s\"",
+                        GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+        gst_message_parse_tag (message, &new_tags);
+        /* NOTE: only general tags received this way (not child nodes)*/
+        if( bCtx->baseObj.ctxId == XAMDAdaptation ||
+            bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+        {
+            old_tags = &((XAMediaPlayerAdaptationCtx*)bCtx)->metadatavars->generaltags;
+            mode = GST_TAG_MERGE_REPLACE;
+        }
+        else if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+        {
+            old_tags = &((XAMediaRecorderAdaptationCtx*)bCtx)->metadatavars->generaltags;
+            /* keep user's tags */
+            mode = GST_TAG_MERGE_KEEP;
+        }
+        else
+        {   /*context not applicable*/
+            return TRUE;
+        }
+
+        if( *old_tags )
+            *old_tags = gst_tag_list_merge (*old_tags, new_tags, mode);
+        else
+            *old_tags = new_tags;
+
+        if( GST_STATE(bCtx->bin)==GST_STATE_PLAYING )
+        {   /* send event only for live stream, otherwise wait for preroll to complete */
+            XAAdaptEvent event = {XA_METADATAEVENTS, XA_ADAPT_MDE_TAGS_AVAILABLE, 0, NULL };
+            XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+        }
+        DEBUG_API("<-XAMetadataAdapt_GstTagCb");
+    }
+    return TRUE;
+}
+
+/*
+ * void XAMetadataAdapt_TryWriteTag(const GstTagList* list, const gchar* tag, gpointer taggerptr)
+ * GstTaglistForeachFunc to write single tag entries to stream
+ */
+void XAMetadataAdapt_TryWriteTag(const GstTagList* list, const gchar* tag, gpointer taggerptr)
+{
+    GstTagSetter* tagger = (GstTagSetter*)taggerptr;
+    const gchar *key;
+    gchar *value;
+
+    DEBUG_API("->XAMetadataAdapt_ParseTag");
+    key = gst_tag_get_nick(tag);
+    if (gst_tag_get_type (tag) == G_TYPE_STRING)
+    {
+        gst_tag_list_get_string_index(list, tag, 0, &value);
+    }
+    else
+    {
+        value = g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, 0));
+    }
+    gst_tag_setter_add_tags(tagger, GST_TAG_MERGE_REPLACE, key, value, NULL);
+}
+
+/*
+ * XAresult XAMetadataAdapt_TryWriteTags(XAAdaptationGstCtx* bCtx, GstBin* binToWriteTo)
+ */
+XAresult XAMetadataAdapt_TryWriteTags(XAAdaptationGstCtx* bCtx, GstBin* binToWriteTo)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    GstTagSetter *tagger=NULL;
+    /* Find metadata tagger from bin (if any) */
+    GstIterator *iter = gst_bin_iterate_all_by_interface( binToWriteTo, GST_TYPE_TAG_SETTER );
+    gboolean done = FALSE;
+    XAMediaRecorderAdaptationCtx* mCtx;
+    XAAdaptEvent mdevent = {XA_METADATAEVENTS, XA_ADAPT_MDE_TAGS_WRITTEN, 0, NULL };
+
+    DEBUG_API("->XAMetadataAdapt_TryWriteTags");
+
+    if( bCtx->baseObj.ctxId != XAMediaRecorderAdaptation )
+    {
+        return XA_RESULT_FEATURE_UNSUPPORTED;
+    }
+    mCtx = ((XAMediaRecorderAdaptationCtx*)bCtx);
+    while (!done)
+    {
+        switch (gst_iterator_next(iter, (gpointer)&tagger))
+        {
+        case GST_ITERATOR_OK:
+            if(mCtx->metadatavars)
+            {
+                if(mCtx->metadatavars->generaltags)
+                {
+                    gst_tag_setter_merge_tags(tagger, mCtx->metadatavars->generaltags, GST_TAG_MERGE_REPLACE);
+                }
+            }
+            done = TRUE;
+        break;
+        case GST_ITERATOR_ERROR:
+            done = TRUE;
+            DEBUG_ERR("Pipeline does not support tag setting");
+            ret = XA_RESULT_CONTENT_UNSUPPORTED;
+        break;
+        case GST_ITERATOR_DONE:
+            done = TRUE;
+            DEBUG_ERR("Pipeline does not support tag setting");
+            ret = XA_RESULT_CONTENT_UNSUPPORTED;
+        break;
+        case GST_ITERATOR_RESYNC:
+            gst_iterator_resync(iter);
+        break;
+        }
+    }
+    /*here datasize field is used for return value*/
+    mdevent.datasize = ret;
+    XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &mdevent );
+    gst_iterator_free (iter);
+    DEBUG_API("<-XAMetadataAdapt_TryWriteTags");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAMETADATAADAPTATION_H
+#define XAMETADATAADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+
+/* FUNCTIONS */
+typedef struct XAMetadataImplTagList
+{
+    XAuint32         itemcount; /* number of items in all three following arrays */
+    XAMetadataInfo** mdeKeys;   /* array of tag keys */
+    XAMetadataInfo** mdeValues; /* array of tag values */
+} XAMetadataImplTagList;
+
+
+typedef struct XAMetadataAdaptVars_
+{
+
+    XAuint32        childcount;
+    XAuint32        nodedepth;
+    XAuint32        traversemode;
+
+    GstTagList*     generaltags;
+    GstStructure*   audiotags;
+    GstStructure*   videotags;
+    GstStructure**   currentchild; /*points to one of previous 3*/
+
+} XAMetadataAdaptVars;
+
+XAresult XAMetadataAdapt_PreInit(XAAdaptationGstCtx *bCtx);
+XAresult XAMetadataAdapt_PostInit(XAAdaptationGstCtx *bCtx);
+const XAchar* XAMetadataAdapt_ParseKhronosKey(const XAchar* KKey);
+void XAMetadataAdapt_FreeImplTagList(XAMetadataImplTagList *list, XAboolean freeItems);
+void XAMetadataAdapt_FreeVars(XAMetadataAdaptVars *vars);
+XAresult XAMetadataAdapt_TryWriteTags(XAAdaptationGstCtx* bCtx, GstBin* binToWriteTo);
+
+XAresult XAMetadataExtractionItfAdapt_FillTagList(XAAdaptationGstCtx *bCtx,
+                                                  XAMetadataImplTagList* tagList);
+
+
+XAresult XAMetadataTraversalItfAdapt_SetMode(XAAdaptationGstCtx *bCtx, XAuint32 mode);
+XAresult XAMetadataTraversalItfAdapt_GetChildCount(XAAdaptationGstCtx *bCtx, XAuint32 *pCount);
+XAresult XAMetadataTraversalItfAdapt_GetChildMIMETypeSize(XAAdaptationGstCtx *bCtx,
+                                                          XAuint32 index,
+                                                          XAuint32 *pSize);
+XAresult XAMetadataTraversalItfAdapt_GetChildInfo(XAAdaptationGstCtx *bCtx,
+                                                  XAuint32 index,
+                                                  XAint32 *pNodeID,
+                                                  XAuint32 *pType,
+                                                  XAuint32 size,
+                                                  XAchar *pMimeType);
+XAresult XAMetadataTraversalItfAdapt_SetActiveNode(XAAdaptationGstCtx *bCtx,
+                                                   XAuint32 index);
+
+XAresult XAMetadataInsertionItfAdapt_CreateChildNode(XAAdaptationGstCtx *bCtx,
+                                                    XAint32 parentNodeID,
+                                                    XAuint32 type,
+                                                    XAchar *mimeType,
+                                                    XAint32 *pChildNodeID);
+XAresult XAMetadataInsertionItfAdapt_GetSupportedKeysCount(XAAdaptationGstCtx *bCtx,
+                                                          XAint32 nodeID,
+                                                          XAboolean *pFreeKeys,
+                                                          XAuint32 *pKeyCount,
+                                                          XAuint32 *pEncodingCount);
+XAresult XAMetadataInsertionItfAdapt_GetKeySize(XAAdaptationGstCtx *bCtx,
+                                               XAint32 nodeID,
+                                               XAuint32 keyIndex,
+                                               XAuint32 *pKeySize);
+XAresult XAMetadataInsertionItfAdapt_GetKey(XAAdaptationGstCtx *bCtx,
+                                           XAint32 nodeID,
+                                           XAuint32 keyIndex,
+                                           XAuint32 keySize,
+                                           XAMetadataInfo *pKey);
+XAresult XAMetadataInsertionItfAdapt_GetFreeKeysEncoding(XAAdaptationGstCtx *bCtx,
+                                                        XAint32 nodeID,
+                                                        XAuint32 encodingIndex,
+                                                        XAuint32 *pEncoding);
+XAresult XAMetadataInsertionItfAdapt_InsertMetadataItem(XAAdaptationGstCtx *bCtx,
+                                                       XAint32 nodeID,
+                                                       XAMetadataInfo *pKey,
+                                                       XAMetadataInfo *pValue,
+                                                       XAboolean overwrite);
+#endif /* XAMETADATAADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include "xametadataadaptctx.h"
+#include "xaadaptationgst.h"
+
+/*
+ * XAAdaptationGstCtx* XAMetadataAdapt_Create()
+ * Allocates memory for Metadata Adaptation Context and makes 1st phase initialization
+ * @returns XAMetadataAdaptationCtx* - Pointer to created context
+ */
+XAAdaptationBaseCtx* XAMetadataAdaptCtx_Create(XADataSource* pDataSrc)
+{
+    /* use media player context with NULL sinks
+     * (no specific MDE context needed, because in GStreamer,
+     *  playback resources are needed for getting stream tags)
+     **/
+    return XAMediaPlayerAdapt_Create(pDataSrc,NULL,NULL,NULL,NULL,NULL);
+}
+
+/*
+ * XAresult XAMetadataAdapt_PostInit()
+ * 2nd phase initialization of Metadata Adaptation Context
+ */
+XAresult XAMetadataAdaptCtx_PostInit(XAAdaptationGstCtx* bCtx)
+{
+    /* pipe to media player adaptation */
+    return XAMediaPlayerAdapt_PostInit(bCtx);
+}
+
+/*
+ * void XAMetadataAdapt_Destroy(XAMetadataAdaptationCtx* ctx)
+ * Destroys Metadata Adaptation Context
+ * @param ctx - Metadata Adaptation context to be destroyed
+ */
+void XAMetadataAdaptCtx_Destroy(XAAdaptationGstCtx* bCtx)
+{
+    /* pipe to media player adaptation */
+    XAMediaPlayerAdapt_Destroy(bCtx);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAMETADATAADAPTCTX_H
+#define XAMETADATAADAPTCTX_H
+
+#include "xamediaplayeradaptctx.h"
+/* TYPEDEFS */
+
+/* use media player context with NULL sinks
+ * (no specific MDE context needed, because in GStreamer,
+ *  playback resources are needed for getting stream tags)
+ */
+typedef struct XAMediaPlayerAdaptationCtx_ XAMetadataAdaptationCtx;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XAMetadataAdaptCtx_Create(XADataSource* pDataSource);
+XAresult XAMetadataAdaptCtx_PostInit(XAAdaptationGstCtx* bCtx);
+void XAMetadataAdaptCtx_Destroy(XAAdaptationGstCtx* bCtx);
+
+
+#endif /* XAMETADATAADAPTCTX_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,226 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xaoutputmixadaptctx.h"
+#include "xaadaptationgst.h"
+#include "xacapabilitiesmgr.h"
+
+
+/*
+ * XAAdaptationGstCtx* XAOutputMixAdapt_Create()
+ * @returns XAOutputMixAdaptationCtx* - Pointer to created context
+ * Description: Allocates memory for Output Mix Adaptation Context and makes 1st phase initialization
+ */
+XAAdaptationBaseCtx* XAOutputMixAdapt_Create()
+{
+    XAOutputMixAdaptationCtx *pSelf = (XAOutputMixAdaptationCtx*)calloc(1, sizeof(XAOutputMixAdaptationCtx));
+
+    DEBUG_API("->XAOutputMixAdapt_Create");
+    if ( pSelf)
+    {
+        if( XAAdaptationBase_Init(&(pSelf->baseObj.baseObj),XAOutputMixAdaptation)
+                    != XA_RESULT_SUCCESS )
+        {
+            DEBUG_ERR("Failed to init base context!!!");
+            free(pSelf);
+            pSelf = NULL;
+        }
+        else
+        {
+            XAuint32 devId;
+            pSelf->connectedObjects = g_array_new (FALSE, TRUE, sizeof (XAOMixAdaptConnObj));
+            pSelf->availableDevices = g_array_new (FALSE, TRUE, sizeof (XAuint32));
+            /*initially, only alsasink available*/
+//            devId = XA_ADAPTID_ALSASINK;
+            devId = XA_ADAPTID_DEVSOUNDSINK;
+            g_array_append_val(pSelf->availableDevices, devId);
+            pSelf->currentrouting = devId;
+        }
+    }
+    DEBUG_API("<-XAOutputMixAdapt_Create");
+    return (XAAdaptationBaseCtx* )&pSelf->baseObj;
+}
+
+/*
+ * XAresult XAOutputMixAdapt_PostInit(XAAdaptationGstCtx* bCtx)
+ * 2nd phase initialization of Output Mix Adaptation Context
+ */
+XAresult XAOutputMixAdapt_PostInit(XAAdaptationGstCtx* bCtx)
+{
+    DEBUG_API("->XAOutputMixAdapt_PostInit");
+    if(bCtx == NULL || bCtx->baseObj.ctxId != XAOutputMixAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAOutputMixAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* check and add devices to pSelf->availableDevices if such detection can be done */
+    DEBUG_API("<-XAOutputMixAdapt_PostInit");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * void XAOutputMixAdapt_Destroy(XAAdaptationGstCtx* bCtx)
+ * Destroys Output Mix Adaptation Context
+ * @param ctx - Output Mix Adaptation context to be destroyed
+ */
+void XAOutputMixAdapt_Destroy(XAAdaptationGstCtx* bCtx)
+{
+    XAOutputMixAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XAOutputMixAdapt_Destroy");
+    if(bCtx == NULL || bCtx->baseObj.ctxId != XAOutputMixAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAOutputMixAdapt_Destroy");
+        return;
+    }
+    ctx = (XAOutputMixAdaptationCtx*)bCtx;
+    g_array_free(ctx->connectedObjects, TRUE);
+    g_array_free(ctx->availableDevices, TRUE);
+
+    XAAdaptationBase_Free( &(ctx->baseObj.baseObj) );
+    free(ctx);
+    DEBUG_API("<-XAOutputMixAdapt_Destroy");
+}
+
+/*
+ * GstElement* XAOutputMixAdapt_GetSink(XAAdaptationGstCtx* bCtx)
+ */
+GstElement* XAOutputMixAdapt_GetSink(XAAdaptationGstCtx* bCtx)
+{
+    XAOutputMixAdaptationCtx* mixCtx = NULL;
+    /* create sink for current routing */
+    GstElement* newsink=NULL;
+    XACapabilities temp;
+
+    DEBUG_API("->XAOutputMixAdapt_GetSink");
+    if(bCtx == NULL || bCtx->baseObj.ctxId != XAOutputMixAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAOutputMixAdapt_GetSink");
+        return NULL;
+    }
+    mixCtx = (XAOutputMixAdaptationCtx*)bCtx;
+
+    if(!mixCtx)
+    {
+        DEBUG_ERR("NULL context!");
+        return NULL;
+    }
+
+    if( XA_RESULT_SUCCESS ==
+            XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)((XACapsType)(XACAP_DEVSNK|XACAP_AUDIO)), mixCtx->currentrouting, &temp) )
+    {
+        newsink = gst_element_factory_make((char*)temp.adaptId,(char*)temp.adaptId);
+        if(!newsink)
+        {
+            DEBUG_ERR_A1("Could not create sink \"%s\"!", (char*)temp.adaptId);
+        }
+    }
+    else
+    {
+        DEBUG_ERR_A1("Could not find audio device by id 0x%x", (int)mixCtx->currentrouting);
+    }
+    DEBUG_API("<-XAOutputMixAdapt_GetSink");
+    return newsink;
+
+}
+
+/*
+ * XAresult XAOutputMixAdapt_ConnectObject(XAAdaptationGstCtx* omCtx, XAAdaptationGstCtx* bCtx, GstElement* usedMix)
+ */
+XAresult XAOutputMixAdapt_ConnectObject(XAAdaptationGstCtx* omCtx, XAAdaptationGstCtx* bCtx, GstElement* usedMix)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 i=0;
+    XAOutputMixAdaptationCtx* mixCtx =NULL;
+    DEBUG_API("->XAOutputMixAdapt_ConnectObject");
+    if( !omCtx || omCtx->baseObj.ctxId!=XAOutputMixAdaptation || !bCtx || !usedMix )
+    {
+        DEBUG_ERR("Invalid attribute!!");
+        DEBUG_API("<-XAOutputMixAdapt_ConnectObject");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mixCtx = (XAOutputMixAdaptationCtx*)omCtx;
+    if( !mixCtx || !bCtx || !usedMix )
+    {
+        DEBUG_ERR("Invalid attribute!!");
+        DEBUG_API("<-XAOutputMixAdapt_DisconnectObject");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    for(i=0; i<mixCtx->connectedObjects->len; i++)
+    {
+        if( (g_array_index(mixCtx->connectedObjects, XAOMixAdaptConnObj, i)).ctx == bCtx )
+        {
+            /*item found already*/
+            ret = XA_RESULT_PARAMETER_INVALID;
+            break;
+        }
+    }
+    if(i==mixCtx->connectedObjects->len)
+    {
+        XAOMixAdaptConnObj tmp;
+        tmp.ctx= bCtx;
+        tmp.currentSink = usedMix;
+        g_array_append_val(mixCtx->connectedObjects, tmp);
+    }
+
+    DEBUG_API("<-XAOutputMixAdapt_ConnectObject");
+    return ret;
+}
+
+/*
+ * XAresult XAOutputMixAdapt_DisconnectObject(XAAdaptationGstCtx* omCtx, XAAdaptationGstCtx* bCtx)
+ */
+XAresult XAOutputMixAdapt_DisconnectObject(XAAdaptationGstCtx* omCtx, XAAdaptationGstCtx* bCtx)
+{
+    XAuint32 i=0;
+    XAOutputMixAdaptationCtx* mixCtx =NULL;
+    DEBUG_API("->XAOutputMixAdapt_DisconnectObject");
+
+    if( !omCtx || omCtx->baseObj.ctxId!=XAOutputMixAdaptation || !bCtx )
+    {
+        DEBUG_ERR("Invalid attribute!!");
+        DEBUG_API("<-XAOutputMixAdapt_DisconnectObject");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mixCtx = (XAOutputMixAdaptationCtx*)omCtx;
+
+    if( !mixCtx || !bCtx )
+    {
+        DEBUG_ERR("Invalid attribute!!");
+        DEBUG_API("<-XAOutputMixAdapt_DisconnectObject");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    for(i=0; i<mixCtx->connectedObjects->len; i++)
+    {
+        XAOMixAdaptConnObj* tmp = &(g_array_index(mixCtx->connectedObjects, XAOMixAdaptConnObj, i));
+        if( tmp->ctx == bCtx  )
+        {
+            g_array_remove_index(mixCtx->connectedObjects, i);
+            DEBUG_API("<-XAOutputMixAdapt_DisconnectObject");
+            return XA_RESULT_SUCCESS;
+        }
+    }
+    /*did not find, return error*/
+    DEBUG_ERR("Object not found!");
+    DEBUG_API("<-XAOutputMixAdapt_DisconnectObject");
+    return XA_RESULT_PARAMETER_INVALID;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAOUTPUTMIXADAPTCTX_H
+#define XAOUTPUTMIXADAPTCTX_H
+
+#include "xaadaptationgst.h"
+
+/* TYPEDEFS */
+
+typedef struct XAOutputMixAdaptationCtx_ XAOutputMixAdaptationCtx;
+
+typedef struct XAOutputMixAdaptationCtx_
+{
+    /* Parent*/
+    XAAdaptationGstCtx_ baseObj;
+    /* Internal variables */
+    XAboolean   isStereoPosition;
+    XAboolean   mute;
+
+    XAuint32    currentrouting;
+
+    GArray*     availableDevices;
+    GArray*     connectedObjects;
+} XAOutputMixAdaptationCtx_;
+
+typedef struct XAOMixAdaptConnObj_
+{
+    /*pointer to connected context*/
+    XAAdaptationGstCtx* ctx;
+    /*pointer to sink currently used by connected ctx*/
+    GstElement* currentSink;
+} XAOMixAdaptConnObj;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XAOutputMixAdapt_Create(void);
+XAresult XAOutputMixAdapt_PostInit(XAAdaptationGstCtx* bCtx);
+void XAOutputMixAdapt_Destroy(XAAdaptationGstCtx* bCtx);
+
+
+GstElement* XAOutputMixAdapt_GetSink(XAAdaptationGstCtx* bCtx);
+XAresult XAOutputMixAdapt_ConnectObject(XAAdaptationGstCtx* omCtx, XAAdaptationGstCtx* bCtx, GstElement* usedMix);
+XAresult XAOutputMixAdapt_DisconnectObject(XAAdaptationGstCtx* omCtx, XAAdaptationGstCtx* bCtx);
+
+#endif /* XAOUTPUTMIXADAPTCTX_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,203 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include <gst.h>
+#include "xaoutputmixadaptctx.h"
+#include "xaoutputmixitfadaptation.h"
+#include "xaadaptationgst.h"
+#include "xacapabilitiesmgr.h"
+
+/*
+ * XAresult XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs( XAAdaptationGstCtx *bCtx,
+ *                                                              XAint32 * pNumDevices,
+ *                                                              XAuint32 * pDeviceIDs )
+ * @param XAAdaptationGstCtx *bCtx - Pointer to OutputMix adaptation context
+ * @param XAint32 * pNumDevices - [in] Length of pDeviceIDs array
+ *                                [out] number of destination devices
+ * @param XAuint32 * pDeviceIDs - List of DeviceIDs
+ * @return XAresult success value
+ * Description: Returns audio output deviceIDs that are currently connected
+ */
+XAresult XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs( XAAdaptationGstCtx *bCtx, XAint32 * pNumDevices, XAuint32 * pDeviceIDs )
+{
+    XAOutputMixAdaptationCtx* mCtx = NULL;
+    XAint32 iterator = 0;
+    DEBUG_API_A1("->XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs pNumDevices:%ld",*pNumDevices);
+    if(!bCtx || bCtx->baseObj.ctxId != XAOutputMixAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAOutputMixAdaptationCtx*) bCtx;
+    if(!mCtx)
+    {
+        DEBUG_ERR("NULL context!");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( pNumDevices )
+    {
+        *pNumDevices = mCtx->availableDevices->len;
+    }
+    else
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(pDeviceIDs)
+    {   /*query devices*/
+        if ( *pNumDevices < mCtx->availableDevices->len )
+        {    /* Lenght of pDeviceIDs is insufficient for all connected audio devices */
+            DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
+            DEBUG_API("<-XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs");
+            return XA_RESULT_BUFFER_INSUFFICIENT;
+        }
+
+        for ( iterator = 0; iterator <  mCtx->availableDevices->len; iterator++ )
+        {
+            pDeviceIDs[iterator] = g_array_index(mCtx->availableDevices,XAuint32,iterator);
+        }
+    }
+
+    DEBUG_API("<-XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs");
+    return XA_RESULT_SUCCESS;
+}
+
+
+/*
+ * XAresult XAOutputMixItfAdapt_ReRoute( XAAdaptationGstCtx *bCtx,
+ *                                       XAint32 numOutputDevices,
+ *                                       XAuint32 * pOutputDeviceIDs)
+ * @param XAAdaptationGstCtx *bCtx - Ponter to OutputMix adaptation context
+ * @param XAint32 numOutputDevices - Length of pOutputDeviceIDs
+ * @param XAuint32 * pOutputDeviceIDs - List of requested audio output device IDs
+ * @return XAresult success value
+ * Description: Reroutes audio output to requested destination devices
+ */
+XAresult XAOutputMixItfAdapt_ReRoute( XAAdaptationGstCtx *bCtx, XAint32 numOutputDevices, XAuint32 * pOutputDeviceIDs)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    gint32 idx = 0;
+    XAOutputMixAdaptationCtx* mCtx = NULL;
+    XAuint32 devId=0;
+    GstElement* newsink = NULL;
+    GstElement* current = NULL;
+    gchar* currentname= NULL;
+    XACapabilities temp;
+
+    DEBUG_API_A1("->XAOutputMixItfAdapt_ReRoute numOutputDevices:%ld",numOutputDevices);
+    if(!bCtx ||
+        bCtx->baseObj.ctxId != XAOutputMixAdaptation ||
+        !pOutputDeviceIDs )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XAOutputMixAdaptationCtx*) bCtx;
+
+    if( numOutputDevices > 1 )
+    {
+        /* currently, only routing to single output at time supported */
+        return XA_RESULT_FEATURE_UNSUPPORTED;
+    }
+    devId = pOutputDeviceIDs[0];
+
+    for ( idx = 0; idx < mCtx->connectedObjects->len; idx++ )
+    {
+        /*find wanted output plugin name*/
+        if( XA_RESULT_SUCCESS ==
+            XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_DEVSNK|XACAP_AUDIO), devId, &temp) )
+        {
+            XAAdaptationGstCtx* ctx = g_array_index(mCtx->connectedObjects,XAOMixAdaptConnObj,idx).ctx;
+            if(!ctx)
+            {
+                DEBUG_ERR_A1("Context in connected objects array (index %u) is NULL!", idx);
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+            /*check current output plugin name*/
+            current = g_array_index(mCtx->connectedObjects,XAOMixAdaptConnObj,idx).currentSink;
+            currentname = gst_element_get_name(current);
+            DEBUG_INFO_A2("OMix pl%d - current output: \"%s\"", (int)idx, (char*)currentname);
+            DEBUG_INFO_A3("OMix pl%d -  wanted output: \"%s\" (id 0x%x)", (int)idx, (char*)temp.adaptId, (int)devId);
+            if(strcmp(currentname,(char*)temp.adaptId)!=0)
+            {
+                if(ret==XA_RESULT_SUCCESS)
+                {
+                    mCtx->currentrouting = devId;
+                    g_array_index(mCtx->connectedObjects,XAOMixAdaptConnObj,idx).currentSink = newsink;
+                }
+                newsink = gst_bin_get_by_name(GST_BIN(ctx->bin), (char*)temp.adaptId);
+                if(!newsink)
+                {   /*not existing yet, create*/
+                    newsink = gst_element_factory_make((char*)temp.adaptId,(char*)temp.adaptId);
+                    gst_bin_add(GST_BIN(ctx->bin), newsink);
+                }
+                if(!newsink)
+                {
+                    DEBUG_ERR_A1("Could not create wanted sink \"%s\"!", (char*)temp.adaptId);
+                    ret = XA_RESULT_PARAMETER_INVALID;
+                }
+                else
+                {
+                    /* switch routing: pause, block, unlink old, link new, unblock pipe, play*/
+                    GstPad *sinkpad=NULL, *blockpad=NULL;
+                    sinkpad = gst_element_get_static_pad(current,"sink");
+                    if(sinkpad)
+                    {
+                        blockpad = gst_pad_get_peer(sinkpad);
+                    }
+                    if(blockpad && gst_pad_is_active(blockpad))
+                    {
+                        DEBUG_INFO("block pad");
+                        gst_pad_set_blocked_async(blockpad,TRUE,XAAdaptationGst_PadBlockCb,NULL);
+                    }
+                    gst_pad_unlink(blockpad, sinkpad);
+                    sinkpad = gst_element_get_static_pad(newsink,"sink");
+                    gst_pad_link(blockpad, sinkpad);
+                    if(gst_pad_is_blocked(blockpad))
+                    {
+                        DEBUG_INFO("unblock pad");
+                        gst_pad_set_blocked_async(blockpad,FALSE,XAAdaptationGst_PadBlockCb,NULL);
+                    }
+                    /*set sink to same state as the mp bin*/
+                    gst_element_sync_state_with_parent(newsink);
+                    mCtx->currentrouting = devId;
+                    g_array_index(mCtx->connectedObjects,XAOMixAdaptConnObj,idx).currentSink = newsink;
+                }
+            }
+            else
+            {
+                DEBUG_INFO("No routing switch needed");
+            }
+        }
+        else
+        {
+            DEBUG_ERR_A1("Could not find audio device by id 0x%x", (int)devId);
+            ret = XA_RESULT_PARAMETER_INVALID;
+        }
+    }
+
+    DEBUG_API("<-XAOutputMixItfAdapt_ReRoute");
+    return ret;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef OUTPUTMIXITFADAPTATION_H_
+#define OUTPUTMIXITFADAPTATION_H_
+
+#include "xaadaptationgst.h"
+
+
+XAresult XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs( XAAdaptationGstCtx *bCtx, XAint32 * pNumDevices, XAuint32 * pDeviceIDs );
+XAresult XAOutputMixItfAdapt_ReRoute( XAAdaptationGstCtx *bCtx, XAint32 numOutputDevices, XAuint32 * pOutputDeviceIDs);
+
+#endif /* OUTPUTMIXITFADAPTATION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaplaybackrateitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,209 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xaplaybackrateitfadaptation.h"
+#include "xaplayitfadaptation.h"
+
+/*XA_RATEPROP_STAGGEREDVIDEO,XA_RATEPROP_SMOOTHVIDEO,XA_RATEPROP_SILENTAUDIO,
+  XA_RATEPROP_STAGGEREDAUDIO,XA_RATEPROP_NOPITCHCORAUDIO,XA_RATEPROP_PITCHCORAUDIO*/
+#define SUPPORTEDPROPS (XA_RATEPROP_SMOOTHVIDEO | XA_RATEPROP_SILENTAUDIO)
+/* NOTE: currently rewind rates do not seem to work */
+#define MINRATE (100)
+#define MAXRATE 8000
+/*
+ * XAresult XAPlaybackRateItfAdapt_SetRate(XAAdaptationGstCtx *bCtx, XApermille rate)
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value
+ * @param XApermille rate - new playback rate in permilles of original speed
+ * @return XAresult ret - Success value
+ */
+XAresult XAPlaybackRateItfAdapt_SetRate(XAAdaptationGstCtx *bCtx, XApermille rate)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+    DEBUG_API_A1("->XAPlaybackRateItfAdapt_SetRate %d permilles", rate);
+
+    if( !bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation )
+    {
+        DEBUG_ERR("Invalid context!");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    if( rate<MINRATE || rate>MAXRATE )
+    {
+        DEBUG_ERR("Invalid rate!");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    if(rate != 0)
+    {
+        mCtx->playrate = ((gdouble)rate)/1000;
+        if( GST_STATE(bCtx->bin) < GST_STATE_PAUSED )
+        {   /* This should not happen */
+            DEBUG_ERR("WARNING: Gst not prerolled yet!");
+        }
+        else
+        {
+            /* apply immediately */
+            XAAdaptationGst_PrepareAsyncWait(bCtx);
+            DEBUG_INFO_A1("Apply new playrate %f.", mCtx->playrate);
+            if(!gst_element_seek( bCtx->bin, mCtx->playrate, GST_FORMAT_TIME,
+                                (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE),
+                                GST_SEEK_TYPE_NONE, 0,
+                                GST_SEEK_TYPE_NONE, -1))
+            {
+                DEBUG_ERR("WARN: gst reports seek not handled");
+            }
+            /* flushed seeks always asynchronous */
+            XAAdaptationGst_StartAsyncWait(bCtx);
+            DEBUG_INFO("New playrate handled.")
+            bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+        }
+    }
+    else
+    {  /* Gst do not accept rate of 0, pause instead */
+        mCtx->playrate = 1.0;
+        if( GST_STATE(bCtx->bin) > GST_STATE_PAUSED )
+        {
+            DEBUG_ERR("Pause playback");
+            XAPlayItfAdaptGST_SetPlayState((XAAdaptationBaseCtx *)bCtx, XA_PLAYSTATE_PAUSED);
+        }
+
+    }
+
+    DEBUG_API("<-XAPlaybackRateItfAdapt_SetRate");
+    return ret;
+}
+
+/*
+ * XAresult XAPlaybackRateItfAdapt_SetPropertyConstraints(XAAdaptationGstCtx *bCtx,
+ *                                                       XAuint32 constraints)
+ */
+XAresult XAPlaybackRateItfAdapt_SetPropertyConstraints(XAAdaptationGstCtx *bCtx,
+                                                       XAuint32 constraints)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XAPlaybackRateItfAdapt_SetPropertyConstraints");
+
+    if( !bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation )
+    {
+        DEBUG_ERR("Invalid context!");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+    if( (constraints & SUPPORTEDPROPS ) == 0 )
+    {
+        DEBUG_ERR("constraints cannot be satisfied!!");
+        ret = XA_RESULT_FEATURE_UNSUPPORTED;
+    }
+    else
+    {
+        mCtx->rateprops = SUPPORTEDPROPS & constraints;
+    }
+    DEBUG_API("<-XAPlaybackRateItfAdapt_SetPropertyConstraints");
+    return ret;
+}
+
+/*
+ * XAresult XAPlaybackRateItfAdapt_GetProperties(XAAdaptationGstCtx *bCtx,
+ *                                              XAuint32 *pProperties)
+ */
+XAresult XAPlaybackRateItfAdapt_GetProperties(XAAdaptationGstCtx *bCtx,
+                                               XAuint32 *pProperties)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XAPlaybackRateItfAdapt_GetProperties");
+
+    if( !bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation )
+    {
+        DEBUG_ERR("Invalid context!");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+    *pProperties = mCtx->rateprops;
+
+    DEBUG_API("<-XAPlaybackRateItfAdapt_GetProperties");
+    return ret;
+}
+
+
+XAresult XAPlaybackRateItfAdapt_GetCapabilitiesOfRate(XAAdaptationGstCtx *bCtx,
+                                                       XApermille rate,
+                                                       XAuint32 *pCapabilities)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    
+    DEBUG_API("->XAPlaybackRateItfAdapt_GetCapabilitiesOfRate");
+    if( !bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation )
+    {
+        DEBUG_ERR("Invalid context!");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( rate<MINRATE || rate>MAXRATE )
+    {
+        DEBUG_ERR("Invalid rate!");
+        *pCapabilities = 0;
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    else
+    {
+        *pCapabilities = SUPPORTEDPROPS;
+    }
+
+    DEBUG_API("<-XAPlaybackRateItfAdapt_GetCapabilitiesOfRate");
+    return ret;
+}
+
+
+XAresult XAPlaybackRateItfAdapt_GetRateRange(XAAdaptationGstCtx *bCtx,
+                                             XAuint8 index,
+                                             XApermille *pMinRate,
+                                             XApermille *pMaxRate,
+                                             XApermille *pStepSize,
+                                             XAuint32 *pCapabilities)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("->XAPlaybackRateItfAdapt_GetRateRange");
+
+    if( !bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation )
+    {
+        DEBUG_ERR("Invalid context!");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* NOTE: hardcoded values, cannot be queried from gst */
+    /* only one range supported */
+    if( index>0 )
+    {
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    else
+    {
+        *pMinRate = MINRATE;
+        *pMaxRate = MAXRATE;
+        *pStepSize = 0; /* continuous range */
+        *pCapabilities = SUPPORTEDPROPS;
+    }
+
+    DEBUG_API("<-XAPlaybackRateItfAdapt_GetRateRange");
+    return ret;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaplaybackrateitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XADYNAMICSOURCEITFADAPTATION_H
+#define XADYNAMICSOURCEITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+
+/* FUNCTIONS */
+
+XAresult XAPlaybackRateItfAdapt_SetRate(XAAdaptationGstCtx *bCtx, XApermille rate);
+
+XAresult XAPlaybackRateItfAdapt_SetPropertyConstraints(XAAdaptationGstCtx *bCtx,
+                                                        XAuint32 constraints);
+
+XAresult XAPlaybackRateItfAdapt_GetProperties(XAAdaptationGstCtx *bCtx,
+                                               XAuint32 *pProperties);
+
+XAresult XAPlaybackRateItfAdapt_GetCapabilitiesOfRate(XAAdaptationGstCtx *bCtx,
+                                                       XApermille rate,
+                                                       XAuint32 *pCapabilities);
+
+XAresult XAPlaybackRateItfAdapt_GetRateRange(XAAdaptationGstCtx *bCtx,
+                                              XAuint8 index,
+                                              XApermille *pMinRate,
+                                              XApermille *pMaxRate,
+                                              XApermille *pStepSize,
+                                              XAuint32 *pCapabilities);
+
+#endif /* XADYNAMICSOURCEITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaplayitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,499 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "unistd.h"
+#include <pthread.h>
+#include "xamediaplayeradaptctx.h"
+#include "xaplayitfadaptation.h"
+#include "xaadaptationgst.h"
+#include "xacameraadaptctx.h"
+
+extern XAboolean cameraRealized;
+extern XACameraAdaptationCtx_* cameraCtx;
+
+/*forward declaration of position updater callback*/
+gboolean XAPlayItfAdapt_PositionUpdate(gpointer ctx);
+
+/*
+ * XAresult XAPlayItfAdaptGST_SetPlayState(XAAdaptationGstCtx *bCtx, XAuint32 state)
+ * Sets play state to GStreamer.
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID
+ * XAuint32 state - Play state to be set
+ * @return XAresult ret - Success value
+ */
+XAresult XAPlayItfAdaptGST_SetPlayState(XAAdaptationBaseCtx *ctx, XAuint32 state)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAboolean requestStateChange = XA_BOOLEAN_FALSE;
+    GstStateChangeReturn gstRet = GST_STATE_CHANGE_SUCCESS;
+    XAMediaPlayerAdaptationCtx* mCtx = NULL;
+    XAuint32 locType = 0;
+    GstState gstOrigState = GST_STATE_PLAYING;
+    XADataLocator_Address *address = NULL;
+    XAboolean playing = XA_BOOLEAN_FALSE;
+    XAAdaptationGstCtx *bCtx = (XAAdaptationGstCtx *)ctx;
+
+    DEBUG_API_A1("->XAPlayItfAdaptGST_SetPlayState %s",PLAYSTATENAME(state));
+
+    
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+    switch ( state )
+    {
+        case XA_PLAYSTATE_STOPPED:
+        {
+           	if ( cameraCtx && cameraRealized && mCtx->isobjsrc && mCtx->source  )
+			{
+				cameraCtx->playing = XA_BOOLEAN_FALSE;
+				if(!cameraCtx->recording && !cameraCtx->snapshotting)
+				{
+					/* Future improvement: We could block MPObjSrc pad from tee-eleement here, when
+					 * tee-element supports sending stream to one pad when others are blocked */
+
+					/* Neither view finder or recorder is running -> pause camera */
+					if ( GST_STATE( GST_ELEMENT(mCtx->source)) == GST_STATE_PLAYING )
+					{
+						GstStateChangeReturn gret;
+						DEBUG_INFO("Stop camera source");
+						gret = gst_element_set_state( GST_ELEMENT(mCtx->source), GST_STATE_PAUSED );
+						if(gret == GST_STATE_CHANGE_SUCCESS)
+						    gret = gst_element_get_state( GST_ELEMENT(mCtx->source), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
+					}
+				}
+			}
+
+            gstOrigState = GST_STATE(bCtx->bin);
+            if ( gstOrigState != GST_STATE_READY )
+            {
+                DEBUG_INFO("Set gst-bin to GST_STATE_READY");
+                bCtx->binWantedState = GST_STATE_READY;
+                XAAdaptationGst_PrepareAsyncWait(bCtx);
+                gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), GST_STATE_READY);
+                switch ( gstRet )
+                {
+                    case GST_STATE_CHANGE_FAILURE:
+                        DEBUG_ERR_A1("FAILED to change state (target %s)",
+                                      gst_element_state_get_name(bCtx->binWantedState));
+                        bCtx->binWantedState = GST_STATE(bCtx->bin);
+                        ret = XA_RESULT_INTERNAL_ERROR;
+                        break;
+                    case GST_STATE_CHANGE_ASYNC:
+                        DEBUG_INFO_A1("Change state will happen asyncronously (target %s)",
+                                       gst_element_state_get_name(bCtx->binWantedState));
+                        XAAdaptationGst_StartAsyncWait(bCtx);
+                        ret = XA_RESULT_SUCCESS;
+                        break;
+                    case GST_STATE_CHANGE_SUCCESS:
+                        DEBUG_INFO_A1("Successfully changed state (target %s)",
+                                       gst_element_state_get_name(bCtx->binWantedState));
+                        break;
+                    default:
+                        DEBUG_ERR_A1("Unhandled error (%d)",gstRet);
+                        break;
+                }
+                bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+                DEBUG_INFO_A1("Setted gst-bin to state %s", gst_element_state_get_name(GST_STATE(bCtx->bin)));
+
+                DEBUG_INFO_A1("Restoring gst-bin state to state %s", gst_element_state_get_name(gstOrigState));
+                bCtx->binWantedState = gstOrigState;
+                XAAdaptationGst_PrepareAsyncWait(bCtx);
+                gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), gstOrigState);
+                switch ( gstRet )
+                {
+                    case GST_STATE_CHANGE_FAILURE:
+                        DEBUG_ERR_A1("FAILED to change state (target %s)",
+                                      gst_element_state_get_name(bCtx->binWantedState));
+                        bCtx->binWantedState = GST_STATE(bCtx->bin);
+                        ret = XA_RESULT_INTERNAL_ERROR;
+                        break;
+                    case GST_STATE_CHANGE_ASYNC:
+                        DEBUG_INFO_A1("Change state will happen asyncronously (target %s)",
+                                       gst_element_state_get_name(bCtx->binWantedState));
+                        XAAdaptationGst_StartAsyncWait(bCtx);
+                        ret = XA_RESULT_SUCCESS;
+                        break;
+                    case GST_STATE_CHANGE_SUCCESS:
+                        DEBUG_INFO_A1("Successfully changed state (target %s)",
+                                       gst_element_state_get_name(bCtx->binWantedState));
+                        break;
+                    default:
+                        DEBUG_ERR_A1("Unhandled error (%d)",gstRet);
+                        break;
+                }
+                bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+                gstOrigState = GST_STATE(bCtx->bin);
+                DEBUG_INFO_A1("Restored gst-bin to state %s", gst_element_state_get_name(gstOrigState));
+            }
+
+
+/*        	if( bCtx->pipeSrcThrCtx.dataHandle )
+        	{
+        		XAresult retVal = XA_RESULT_SUCCESS;
+				if ( bCtx->pipeSrcThrCtx.state != CPStateNull )
+				{
+					bCtx->pipeSrcThrCtx.state = CPStateStopped;
+				}
+
+				retVal = XAImpl_PostSemaphore( bCtx->pipeSrcThrCtx.stateSem );
+				if ( retVal != XA_RESULT_SUCCESS )
+				{
+					DEBUG_ERR("Could not post content pipe semaphore!");
+				}
+
+        	}*/
+            /* stop head and drive head to beginning */
+            bCtx->binWantedState = GST_STATE_PAUSED;
+            if(mCtx->runpositiontimer > 0)
+            {
+                g_source_remove(mCtx->runpositiontimer);
+                mCtx->runpositiontimer=0;
+            }
+
+            gst_element_send_event(bCtx->bin,gst_event_new_flush_start());
+            gst_element_send_event(bCtx->bin,gst_event_new_flush_stop());
+
+            locType = *((XAuint32*)( mCtx->xaSource->pLocator ));
+            if( locType == XA_DATALOCATOR_ADDRESS )
+            {
+                address = (XADataLocator_Address*)(mCtx->xaSource->pLocator);
+
+                /* init gst buffer from datalocator */
+                if( mCtx->source )
+                {
+                    GstBuffer* userBuf = NULL;
+
+                    /* init GST buffer from XADataLocator*/
+                    userBuf = gst_buffer_new();
+                    if( userBuf )
+                    {
+                        userBuf->size = address->length;
+                        userBuf->data = address->pAddress;
+                        /* push the whole buffer to appsrc so it is ready for preroll */
+                        DEBUG_INFO("Pushing buffer");
+                        gst_app_src_push_buffer( GST_APP_SRC(mCtx->source), userBuf );
+                        DEBUG_INFO_A1("Sent buffer at 0x%x to appsrc", userBuf );
+                        gst_app_src_end_of_stream( GST_APP_SRC(mCtx->source) );
+                    }
+                    else
+                    {
+                        DEBUG_ERR("Failure allocating buffer!");
+                    }
+                }
+            }
+            break;
+        }
+        case XA_PLAYSTATE_PAUSED:
+
+           	if ( cameraCtx && cameraRealized && mCtx->isobjsrc && mCtx->source  )
+			{
+				cameraCtx->playing = XA_BOOLEAN_FALSE;
+
+				/* Future improvement: We could block MPObjSrc pad from tee-eleement here, when
+				 * tee-element supports sending stream to one pad when others are blocked */
+
+				if(!cameraCtx->recording && !cameraCtx->snapshotting)
+				{
+					/* Neither view finder or recorder is running -> pause camera */
+					if ( GST_STATE( GST_ELEMENT(mCtx->source)) == GST_STATE_PLAYING )
+					{
+						GstStateChangeReturn gret;
+						DEBUG_INFO("Stop camera source");
+						gret = gst_element_set_state( GST_ELEMENT(mCtx->source), GST_STATE_PAUSED );
+						if(gret == GST_STATE_CHANGE_SUCCESS)
+						    gret = gst_element_get_state( GST_ELEMENT(mCtx->source), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
+					}
+				}
+			}
+
+/*            if ( bCtx->pipeSrcThrCtx.state != CPStateNull )
+            {
+                bCtx->pipeSrcThrCtx.state = CPStatePaused;
+            }*/
+            bCtx->binWantedState = GST_STATE_PAUSED;
+            if(mCtx->runpositiontimer > 0)
+            {
+                g_source_remove(mCtx->runpositiontimer);
+                mCtx->runpositiontimer=0;
+            }
+            break;
+        case XA_PLAYSTATE_PLAYING:
+        {
+        	if ( cameraCtx && mCtx->isobjsrc )
+        	{
+        		cameraCtx->playing = XA_BOOLEAN_TRUE;
+        	}
+
+        	if ( mCtx->videoppBScrbin )
+        	{
+        		gst_element_set_state( GST_ELEMENT(mCtx->videoppBScrbin), GST_STATE_PAUSED);
+        	}
+        	if  (mCtx->isobjsrc && !mCtx->cameraSinkSynced && cameraCtx )
+        	{ /* create videosink now */
+				mCtx->cameraSinkSynced = XA_BOOLEAN_TRUE;
+				if ( mCtx->videosink )
+				{
+					gst_element_unlink( mCtx->filter,mCtx->videosink );
+					gst_element_set_state( GST_ELEMENT(mCtx->videosink), GST_STATE_NULL);
+					gst_bin_remove( GST_BIN(mCtx->baseObj.bin), mCtx->videosink);
+					mCtx->videosink = XAAdaptationGst_CreateGstSink( mCtx->xaVideoSink, "videosink", &(mCtx->isobjvsink) );
+					gst_bin_add(GST_BIN(mCtx->baseObj.bin), mCtx->videosink);
+					if (! gst_element_link(mCtx->filter, mCtx->videosink))
+			               {
+			                    DEBUG_ERR("Could not link Filter to videosink!!");
+			                    return XA_RESULT_INTERNAL_ERROR;
+			               }
+				}
+        	}
+
+/*            if ( bCtx->pipeSrcThrCtx.state != CPStateNull )
+            {
+                XAresult retVal = XA_RESULT_SUCCESS;
+
+                if ( bCtx->pipeSrcThrCtx.state == CPStateInitialized )
+                {  Start thread if it's not running 
+                    retVal = XAImpl_StartThread( &(bCtx->pipeSrcThr), NULL, &XAAdaptationGst_ContentPipeScrThrFunc, &(bCtx->pipeSrcThrCtx) );
+                    if ( retVal != XA_RESULT_SUCCESS )
+                    {
+                        DEBUG_ERR("Could not start content pipe thread!");
+                    }
+                }
+                if ( bCtx->pipeSrcThrCtx.state == CPStatePaused ||
+                     bCtx->pipeSrcThrCtx.state == CPStateInitialized ||
+                     bCtx->pipeSrcThrCtx.state == CPStateStarted )
+                retVal = XAImpl_PostSemaphore( bCtx->pipeSrcThrCtx.stateSem );
+                if ( retVal != XA_RESULT_SUCCESS )
+                {
+                    DEBUG_ERR("Could not post content pipe semaphore!");
+                }
+            }*/
+
+            bCtx->binWantedState = GST_STATE_PLAYING;
+            if(mCtx->playrate!=1 && !mCtx->isobjsrc)
+            { /*set seek element for ff, rew and slow*/
+                XAAdaptationGst_PrepareAsyncWait(bCtx);
+                DEBUG_INFO_A1("Apply new playrate %f.", mCtx->playrate);
+                if(!gst_element_seek( bCtx->bin, mCtx->playrate, GST_FORMAT_TIME,
+                                    (GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE),
+                                    GST_SEEK_TYPE_NONE, 0,
+                                    GST_SEEK_TYPE_NONE, -1))
+                {
+                    DEBUG_ERR("WARN: gst reports seek not handled");
+                }
+                /* flushed seeks always asynchronous */
+                XAAdaptationGst_StartAsyncWait(bCtx);
+                DEBUG_INFO("New playrate handled.");
+                bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+            }
+
+            playing = XA_BOOLEAN_TRUE;
+            break;
+        }
+        default:
+            ret = XA_RESULT_PARAMETER_INVALID;
+            break;
+    }
+    /* launch Gstreamer state change only if necessary */
+    if( GST_STATE_TARGET(bCtx->bin) == bCtx->binWantedState )
+    {
+        DEBUG_INFO("Gst already in or transitioning to wanted state");
+        requestStateChange = XA_BOOLEAN_FALSE;
+    }
+    else
+    {
+        if( (GST_STATE(bCtx->bin) == bCtx->binWantedState) &&
+            (GST_STATE_PENDING(bCtx->bin) == GST_STATE_VOID_PENDING) )
+        {
+            DEBUG_ERR_A3("WARNING : gststate %d == wanted %d != gsttarget %d and no statechange pending",
+                          GST_STATE(bCtx->bin), bCtx->binWantedState, GST_STATE_TARGET(bCtx->bin));
+        }
+        requestStateChange = XA_BOOLEAN_TRUE;
+    }
+
+    if( requestStateChange )
+    {
+        XAAdaptationGst_PrepareAsyncWait(bCtx);
+        DEBUG_INFO_A1("Sending change state request to state %d", bCtx->binWantedState);
+        gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+        switch ( gstRet )
+        {
+            case GST_STATE_CHANGE_FAILURE:
+                DEBUG_ERR_A1("FAILED to change state (target %s)",
+                              gst_element_state_get_name(bCtx->binWantedState));
+                bCtx->binWantedState = GST_STATE(bCtx->bin);
+                ret = XA_RESULT_INTERNAL_ERROR;
+                break;
+            case GST_STATE_CHANGE_ASYNC:
+                DEBUG_INFO_A1("Change state will happen asyncronously (target %s)",
+                               gst_element_state_get_name(bCtx->binWantedState));
+                XAAdaptationGst_StartAsyncWait(bCtx);
+                ret = XA_RESULT_SUCCESS;
+                break;
+            case GST_STATE_CHANGE_NO_PREROLL:
+                DEBUG_INFO("GST_STATE_CHANGE_NO_PREROLL");
+                /* deliberate fall-through */
+            case GST_STATE_CHANGE_SUCCESS:
+                DEBUG_INFO_A1("Successfully changed state (target %s)",
+                               gst_element_state_get_name(bCtx->binWantedState));
+                ret = XA_RESULT_SUCCESS;
+                break;
+            default:
+                DEBUG_ERR_A1("Unhandled error (%d)",gstRet);
+                ret = XA_RESULT_UNKNOWN_ERROR;
+                break;
+        }
+        bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+    }
+
+    if (playing && mCtx->isobjsrc && cameraCtx )
+    {
+    	GstPad* moSrc=NULL ;
+
+    	playing = XA_BOOLEAN_FALSE;
+    	moSrc = gst_element_get_static_pad( mCtx->source, "MPObjSrc");
+		if( moSrc && gst_pad_is_linked(moSrc) )
+		{
+			DEBUG_INFO_A2("unblock element:%s pad:%s",
+					gst_element_get_name( mCtx->source),
+					gst_pad_get_name(moSrc));
+			gst_pad_set_blocked_async(moSrc, FALSE, XAAdaptationGst_PadBlockCb, NULL);
+		}
+
+		if ( GST_STATE( GST_ELEMENT(mCtx->source)) != GST_STATE_PLAYING )
+		{
+			GstStateChangeReturn gret;
+			DEBUG_INFO("Start camera source");
+			gret = gst_element_set_state( GST_ELEMENT(mCtx->source), GST_STATE_PLAYING );
+			if(gret == GST_STATE_CHANGE_SUCCESS)
+			    gret = gst_element_get_state( GST_ELEMENT(mCtx->source), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
+		}
+    }
+    DEBUG_API("<-XAPlayItfAdaptGST_SetPlayState");
+    return ret;
+}
+
+/*
+ * XAresult XAPlayItfAdaptGST_GetDuration(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec)
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID
+ * XAmillisecond *pMsec - Pointer where to store duration of stream.
+ * @return XAresult ret - Success value
+ */
+XAresult XAPlayItfAdaptGST_GetDuration(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    GstFormat format = GST_FORMAT_TIME;
+    gint64 duration;
+    DEBUG_API("->XAPlayItfAdaptGST_GetDuration");
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation || !pMsec)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( gst_element_query_duration( GST_ELEMENT(bCtx->bin), &format, &duration ) )
+    {
+        DEBUG_INFO_A1("Duration: %"GST_TIME_FORMAT, GST_TIME_ARGS(duration));
+        ret = XA_RESULT_SUCCESS;
+        *pMsec = GST_TIME_AS_MSECONDS(duration);/*Warning ok due to used API specification*/
+    }
+    else
+    {
+        DEBUG_ERR("WARNING: Gst: could not get duration");
+        *pMsec = XA_TIME_UNKNOWN;
+        ret = XA_RESULT_SUCCESS;
+    }
+
+    DEBUG_API("<-XAPlayItfAdaptGST_GetDuration");
+    return ret;
+}
+
+/*
+ * XAresult XAPlayItfAdaptGST_GetPosition(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec)
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value
+ * XAmillisecond *pMsec - Pointer where to store current position in stream.
+ * @return XAresult ret - Success value
+ */
+XAresult XAPlayItfAdaptGST_GetPosition(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    gint64 position;
+    GstFormat format = GST_FORMAT_TIME;
+    DEBUG_API("->XAPlayItfAdapGSTt_GetPosition");
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &position  ) )
+    {
+        DEBUG_INFO_A1("Current position %"GST_TIME_FORMAT, GST_TIME_ARGS(position));
+        ret = XA_RESULT_SUCCESS;
+        *pMsec = GST_TIME_AS_MSECONDS(position);/*Warning ok due to used API specification*/
+    }
+    else
+    {
+        DEBUG_ERR("WARNING: Gst: could not get position");
+        /* probably not fully prerolled - safe assumption for position = 0 */
+        *pMsec = 0;
+        ret = XA_RESULT_SUCCESS;
+    }
+
+    DEBUG_API("<-XAPlayItfAdaptGST_GetPosition");
+    return ret;
+}
+
+/*
+ * XAresult XAPlayItfAdapt_EnablePositionTracking
+ * Enable/disable periodic position tracking callbacks
+ */
+XAresult XAPlayItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *bCtx, XAboolean enable)
+{
+    XAMediaPlayerAdaptationCtx* mCtx;
+
+    DEBUG_API_A1("->XAPlayItfAdapt_EnablePositionTracking (enable: %d)", (int)enable);
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+    if(enable && !(mCtx->trackpositionenabled))
+    {
+        mCtx->trackpositionenabled = XA_BOOLEAN_TRUE;
+        XAMediaPlayerAdapt_UpdatePositionCbTimer(mCtx);
+    }
+    else if (!enable && (mCtx->trackpositionenabled))
+    {
+        mCtx->trackpositionenabled = XA_BOOLEAN_FALSE;
+        XAMediaPlayerAdapt_UpdatePositionCbTimer(mCtx);
+    }
+
+    DEBUG_API("<-XAPlayItfAdapt_EnablePositionTracking");
+    return XA_RESULT_SUCCESS;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaplayitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAPLAYITFADAPTATION_H
+#define XAPLAYITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+#ifdef _DEBUG
+/*parse state names for debug prints*/
+static const char* playstatenames[3] =
+{
+    "XA_PLAYSTATE_STOPPED",
+    "XA_PLAYSTATE_PAUSED",
+    "XA_PLAYSTATE_PLAYING"
+};
+#define PLAYSTATENAME(i) (const char*)((i>0&&i<4)?playstatenames[i-1]:"INVALID")
+#endif /*_DEBUG*/
+
+
+/* FUNCTIONS */
+
+XAresult XAPlayItfAdaptGST_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state);
+XAresult XAPlayItfAdaptGST_GetDuration(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec);
+XAresult XAPlayItfAdaptGST_GetPosition(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec);
+XAresult XAPlayItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *bCtx, XAboolean enable);
+
+
+#endif /* XAPLAYITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaradioadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xaradioadaptctx.h"
+#include "xaadaptationgst.h"
+#include "assert.h"
+
+
+/*
+ * XAAdaptationGstCtx* XARadioAdapt_Create()
+ * Allocates memory for Radio Adaptation Context and makes 1st phase initialization
+ * @returns XARadioAdaptationCtx* - Pointer to created context
+ */
+XAAdaptationBaseCtx* XARadioAdapt_Create()
+{
+    XARadioAdaptationCtx *pSelf = (XARadioAdaptationCtx*)calloc(1, sizeof(XARadioAdaptationCtx));
+    DEBUG_API("->XARadioAdapt_Create");
+
+    if ( pSelf)
+    {
+        if( XAAdaptationBase_Init(&(pSelf->baseObj.baseObj),XARadioAdaptation)
+                    != XA_RESULT_SUCCESS )
+                {
+                    DEBUG_ERR("Failed to init base context!!!");
+                    free(pSelf);
+                    pSelf = NULL;
+                }
+                else
+                {
+                    pSelf->state = XA_RADIO_IDLE;
+                    pSelf->range = RADIO_DEFAULT_FREQ_RANGE;
+                    pSelf->frequency = RADIO_DEFAULT_FREQ;
+
+                    pSelf->rdsEmulationThread = 0;
+                    pSelf->emulationThread = 0;
+                }
+    }
+
+    DEBUG_API("<-XARadioAdapt_Create");
+    return (XAAdaptationBaseCtx*)&pSelf->baseObj;
+}
+
+/*
+ * XAresult XARadioAdapt_PostInit()
+ * 2nd phase initialization of Radio Adaptation Context
+ */
+XAresult XARadioAdapt_PostInit(XAAdaptationBaseCtx* bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XARadioAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XARadioAdapt_PostInit");
+    if(bCtx == NULL || bCtx->ctxId != XARadioAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XARadioAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    ctx = (XARadioAdaptationCtx*)bCtx;
+
+    assert(ctx);
+
+    ret = XAAdaptationBase_PostInit( &ctx->baseObj.baseObj );
+    if( ret!=XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Base context postinit failed!!");
+        DEBUG_API("<-XARadioAdapt_PostInit");
+        return ret;
+    }
+
+    ctx->baseObj.bin = gst_element_factory_make( "audiotestsrc", "audiosrc");
+    if ( !ctx->baseObj.bin )
+    {
+        DEBUG_ERR("Unable to create test audio source!");
+        DEBUG_API("<-XARadioAdapt_PostInit");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    g_object_set( G_OBJECT(ctx->baseObj.bin), "wave", 0x5, NULL );
+
+    DEBUG_API("<-XARadioAdapt_PostInit");
+    return ret;
+}
+
+/*
+ * void XARadioAdapt_Destroy(XAAdaptationGstCtx* bCtx)
+ * Destroys Radio Adaptation Context
+ * @param ctx - Radio Adaptation context to be destroyed
+ */
+void XARadioAdapt_Destroy(XAAdaptationBaseCtx* bCtx)
+{
+    XARadioAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XARadioAdapt_Destroy");
+
+    if(bCtx == NULL || bCtx->ctxId != XARadioAdaptation )
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XARadioAdapt_Destroy");
+        return;
+    }
+    ctx = (XARadioAdaptationCtx*)bCtx;
+    XAAdaptationBase_Free(&(ctx->baseObj.baseObj));
+
+    free(ctx);
+
+    DEBUG_API("<-XARadioAdapt_Destroy");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaradioadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XARADIOADAPTCTX_H
+#define XARADIOADAPTCTX_H
+
+#include "xaadaptationgst.h"
+
+typedef enum {
+  GST_AUDIO_TEST_SRC_WAVE_SINE,
+  GST_AUDIO_TEST_SRC_WAVE_SQUARE,
+  GST_AUDIO_TEST_SRC_WAVE_SAW,
+  GST_AUDIO_TEST_SRC_WAVE_TRIANGLE,
+  GST_AUDIO_TEST_SRC_WAVE_SILENCE,
+  GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE,
+  GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE,
+  GST_AUDIO_TEST_SRC_WAVE_SINE_TAB,
+  GST_AUDIO_TEST_SRC_WAVE_TICKS
+} GstAudioTestSrcWave;
+
+typedef enum
+{
+    XA_RADIO_IDLE,
+    XA_RADIO_SEEKING,
+    XA_RADIO_SETTING_FREQUENCY,
+    XA_RADIO_SETTING_FREQUENCY_RANGE
+} XARadioState;
+
+typedef enum
+{
+    XA_RADIO_RDS_IDLE,
+    XA_RADIO_RDS_GETTING_ODA_GROUP
+} XARadioRDSState;
+
+#define RADIO_DEFAULT_FREQ_RANGE XA_FREQRANGE_FMEUROAMERICA
+#define RADIO_DEFAULT_FREQ 88000000
+
+/* TYPEDEFS */
+typedef struct XARadioAdaptationCtx_ XARadioAdaptationCtx;
+
+/*
+ * Structure for Camera specific gst-adaptation variables
+ */
+typedef struct XARadioAdaptationCtx_ {
+
+    /* Parent*/
+    XAAdaptationGstCtx_ baseObj;
+
+    /* OMX-AL Variables */
+    XAuint32 frequency;
+    XAuint8 range;
+
+    pthread_t emulationThread;
+    pthread_t rdsEmulationThread;
+    XARadioRDSState rdsState;
+    XARadioState state;
+
+    /* GST Variables */
+} XARadioAdaptationCtx_;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XARadioAdapt_Create(void);
+XAresult XARadioAdapt_PostInit(XAAdaptationBaseCtx* bCtx);
+void XARadioAdapt_Destroy(XAAdaptationBaseCtx* bCtx);
+
+#endif /* XARADIOADAPTCTX_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaradioitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,797 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <unistd.h>
+#include <gst.h>
+#include "xaadaptationgst.h"
+#include "xaradioitfadaptation.h"
+#include "xaradioadaptctx.h"
+
+#define NUM_OF_SUPPORTED_RANGES 2
+#define NUM_OF_CHANNELS 2
+const char* RadioPresetDefaultName = "Default";
+
+/* emulated frequency range data */
+typedef struct FreqRange_
+{
+    XAuint8     id;
+    XAuint32    minFreq;
+    XAuint32    maxFreq;
+    XAuint32    freqInterval;
+    XAuint32    stereoMode;
+} FreqRange;
+
+/* emulated radio channel data */
+typedef struct Channel_
+{
+    XAuint32    freq;
+    XAuint32    strength;
+} Channel;
+
+/* emulated radio state */
+typedef enum
+{
+    RADIO_STATE_ON_CHANNEL,
+    RADIO_STATE_OFF_CHANNEL
+} RadioState;
+
+/* data structure to pass onto async functions */
+typedef struct
+{
+    XAAdaptationGstCtx *bCtx;
+    XAuint32             value;
+} ThreadArgs;
+
+/* emulation variables and constraints */
+static const FreqRange supportedFreqRanges[NUM_OF_SUPPORTED_RANGES] = {
+        { XA_FREQRANGE_FMEUROAMERICA, 87500000, 108000000, 100000, XA_STEREOMODE_MONO },
+        {XA_FREQRANGE_FMJAPAN, 76000000, 90000000, 100000, XA_STEREOMODE_STEREO }};
+
+static const Channel channels[NUM_OF_CHANNELS] = { {88500000, 80},
+                                    {89300000, 60 }};
+
+static XAuint8 freqRangeIndex = 0;
+static XAboolean squelchMode = XA_BOOLEAN_FALSE;
+static XAint32 currentChannel = -1;
+static RadioState radioState = RADIO_STATE_OFF_CHANNEL;
+
+static void* asyncdata = NULL;
+
+/* FORWARD DECLARATIONS */
+void * XARadioItfAdapt_AsyncSetFrequencyRange(void* args);
+XAresult XARadioItfAdapt_SyncSetFrequencyRange(XAAdaptationGstCtx *bCtx, XAuint8 range);
+void * XARadioItfAdapt_AsyncSetFrequency(void* args);
+XAresult XARadioItfAdapt_SyncSetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq);
+void * XARadioItfAdapt_AsyncSeek(void* args);
+
+/*
+ * XAresult XARadioItfAdapt_SetFreqRange(XAAdaptationGstCtx *bCtx, XAuint8 range)
+ */
+XAresult XARadioItfAdapt_SetFreqRange(XAAdaptationGstCtx *bCtx, XAuint8 range)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint16 index=0;
+    XARadioAdaptationCtx* mCtx = (XARadioAdaptationCtx*) bCtx;
+    int pt_ret=0;
+    DEBUG_API("->XARadioItfAdapt_SetFreqRange");
+
+    if(!bCtx || range < XA_FREQRANGE_FMEUROAMERICA || range > XA_FREQRANGE_AMSW)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_SetFreqRange");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    for (index = 0; index < NUM_OF_SUPPORTED_RANGES; index++)
+    {
+        if (supportedFreqRanges[index].id == range)
+        {
+            if (mCtx->range != range)
+            {
+                if (mCtx->state != XA_RADIO_IDLE)
+                {
+                  //  pthread_cancel(mCtx->emulationThread);
+                    if (asyncdata)
+                    {
+                        free(asyncdata);
+                        asyncdata = NULL;
+                    }
+                    mCtx->state = XA_RADIO_IDLE;
+                }
+                {
+                    ThreadArgs* args = (ThreadArgs*)calloc(1, sizeof(ThreadArgs));
+                    if (!args)
+                    {
+                        DEBUG_ERR("Calloc failed")
+                        DEBUG_API("<-XARadioItfAdapt_SetFreqRange");
+                        return XA_RESULT_INTERNAL_ERROR;
+                    }
+                    args->bCtx = bCtx;
+                    args->value = range;
+                    mCtx->state = XA_RADIO_SETTING_FREQUENCY_RANGE;
+                    pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARadioItfAdapt_AsyncSetFrequencyRange),(void*)args);
+
+                    if(pt_ret)
+                    {
+                        DEBUG_ERR_A1("could not create thread!! (%d)",ret)
+                        DEBUG_API("<-XARadioItfAdapt_SetFreqRange");
+                        return XA_RESULT_INTERNAL_ERROR;
+                    }
+                }
+            }
+            break;
+        }
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_SetFreqRange");
+    return ret;
+}
+
+/*
+ * void * XARadioItfAdapt_AsyncSetFrequencyRange(void* args)
+ */
+void * XARadioItfAdapt_AsyncSetFrequencyRange(void* args)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    ThreadArgs* tArgs = NULL;
+    XARadioAdaptationCtx* mCtx = NULL;
+
+    DEBUG_API("->XARadioItfAdapt_AsyncSetFrequencyRange");
+    asyncdata = args;
+    tArgs = args;
+
+    mCtx = (XARadioAdaptationCtx*) tArgs->bCtx;
+
+    DEBUG_INFO("Setting frequency async")
+    usleep(100000); /* 1/10 seconds */
+
+    ret = XARadioItfAdapt_SyncSetFrequencyRange(tArgs->bCtx, tArgs->value);
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR("XARadioItfAdapt_SyncSetFrequencyRange FAILED");
+    }
+
+    /* Send event to RadioItf */
+    {
+        XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED, 0, NULL};
+        XAAdaptationBase_SendAdaptEvents(&tArgs->bCtx->baseObj, &event );
+    }
+    mCtx->state = XA_RADIO_IDLE;
+
+    free(args);
+    asyncdata = NULL;
+    DEBUG_API("<-XARadioItfAdapt_AsyncSetFrequencyRange");
+    pthread_exit(NULL);
+    return NULL;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SyncSetFrequencyRange(XAAdaptationGstCtx *bCtx, XAuint8 range)
+ */
+XAresult XARadioItfAdapt_SyncSetFrequencyRange(XAAdaptationGstCtx *bCtx, XAuint8 range)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XARadioAdaptationCtx* mCtx=NULL;
+    XAuint8 index=0;
+    DEBUG_API("->XARadioItfAdapt_SyncSetFrequencyRange");
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_SyncSetFrequencyRange");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (range != mCtx->range)
+    {
+        DEBUG_INFO("Frequency range changed!")
+
+        mCtx->range = range;
+        for(index = 0; index < NUM_OF_SUPPORTED_RANGES; index++)
+        {
+            if (supportedFreqRanges[index].id == mCtx->range)
+            {
+                freqRangeIndex = index;
+            }
+        }
+
+        ret = XARadioItfAdapt_SyncSetFrequency( bCtx, RADIO_DEFAULT_FREQ );
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_SyncSetFrequencyRange");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetFreqRange(XAAdaptationGstCtx *bCtx,
+ *                                       XAuint8 * pFreqRange)
+ */
+XAresult XARadioItfAdapt_GetFreqRange(XAAdaptationGstCtx *bCtx,
+                                      XAuint8 * pFreqRange)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XARadioAdaptationCtx* mCtx=NULL;
+    DEBUG_API("->XARadioItfAdapt_GetFreqRange");
+
+    if(!bCtx || !pFreqRange)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_GetFreqRange");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    *pFreqRange = mCtx->range;
+
+    DEBUG_API("<-XARadioItfAdapt_GetFreqRange");
+    return ret;
+}
+
+
+
+/*
+ *  XAresult XARadioItfAdapt_IsFreqRangeSupported(XAAdaptationGstCtx *bCtx,
+ *                                                XAuint8 range,
+ *                                                XAboolean * pSupported)
+ */
+XAresult XARadioItfAdapt_IsFreqRangeSupported(XAAdaptationGstCtx *bCtx,
+                                             XAuint8 range,
+                                             XAboolean * pSupported)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint16 index=0;
+    DEBUG_API("->XARadioItfAdapt_IsFreqRangeSupported");
+
+    if(!bCtx || !pSupported || range < XA_FREQRANGE_FMEUROAMERICA || range > XA_FREQRANGE_AMSW)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_IsFreqRangeSupported");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pSupported = XA_BOOLEAN_FALSE;
+    for (index = 0; index < NUM_OF_SUPPORTED_RANGES; index++)
+    {
+        if (supportedFreqRanges[index].id == range)
+        {
+            *pSupported = XA_BOOLEAN_TRUE;
+            break;
+        }
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_IsFreqRangeSupported");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetFreqRangeProperties(XAAdaptationGstCtx *bCtx,
+ *                                                 XAuint8 range,
+ *                                                 XAuint32 * pMinFreq,
+ *                                                 XAuint32 * pMaxFreq,
+ *                                                 XAuint32 * pFreqInterval)
+ */
+XAresult XARadioItfAdapt_GetFreqRangeProperties(XAAdaptationGstCtx *bCtx,
+                                               XAuint8 range,
+                                               XAuint32 * pMinFreq,
+                                               XAuint32 * pMaxFreq,
+                                               XAuint32 * pFreqInterval)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    
+    XAuint16 index=0;
+    DEBUG_API("->XARadioItfAdapt_GetFreqRangeProperties");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_GetFreqRangeProperties");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    for (index = 0; index < NUM_OF_SUPPORTED_RANGES; index++)
+    {
+        if (supportedFreqRanges[index].id == range)
+        {
+            *pMinFreq = supportedFreqRanges[index].minFreq;
+            *pMaxFreq = supportedFreqRanges[index].maxFreq;
+            *pFreqInterval = supportedFreqRanges[index].freqInterval;
+            break;
+        }
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_GetFreqRangeProperties");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq)
+ */
+XAresult XARadioItfAdapt_SetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    int pt_ret=0;
+    XARadioAdaptationCtx* mCtx=NULL;
+    DEBUG_API("->XARadioItfAdapt_SetFrequency");
+
+    if(!bCtx || freq < supportedFreqRanges[freqRangeIndex].minFreq
+            || freq > supportedFreqRanges[freqRangeIndex].maxFreq
+            || ((freq - supportedFreqRanges[freqRangeIndex].minFreq)
+                    % supportedFreqRanges[freqRangeIndex].freqInterval) != 0)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_SetFrequency");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (freq != mCtx->frequency)
+    {
+        if (mCtx->state != XA_RADIO_IDLE)
+        {
+           // pthread_cancel(mCtx->emulationThread);
+            if (asyncdata)
+            {
+                free(asyncdata);
+                asyncdata = NULL;
+            }
+        }
+
+        {
+            ThreadArgs* args = (ThreadArgs*)calloc(1, sizeof(ThreadArgs));
+            if (!args)
+            {
+                DEBUG_ERR("Calloc failed")
+                DEBUG_API("<-XARadioItfAdapt_SetFrequency");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+            args->bCtx = bCtx;
+            args->value = freq;
+            mCtx->state = XA_RADIO_SETTING_FREQUENCY;
+            pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARadioItfAdapt_AsyncSetFrequency),(void*)args);
+
+            if(pt_ret)
+            {
+                DEBUG_ERR_A1("could not create thread!! (%d)",ret)
+                DEBUG_API("<-XARadioItfAdapt_SetFrequency");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+    } /* else do nothing freq was same */
+
+    DEBUG_API("<-XARadioItfAdapt_SetFrequency");
+    return ret;
+}
+
+/*
+ * void * XARadioItfAdapt_AsyncSetFrequency(void* args)
+ */
+void * XARadioItfAdapt_AsyncSetFrequency(void* args)
+{
+    ThreadArgs* tArgs = NULL;
+    XARadioAdaptationCtx* mCtx = NULL;
+    asyncdata = args;
+    tArgs = args;
+
+    mCtx = (XARadioAdaptationCtx*) tArgs->bCtx;
+    DEBUG_API("->XARadioItfAdapt_AsyncSetFrequency");
+    DEBUG_INFO("Setting frequency async")
+    usleep(100000); /* 1/10 seconds */
+
+    XARadioItfAdapt_SyncSetFrequency(tArgs->bCtx, tArgs->value);
+
+    /* Send event to RadioItf */
+    {
+        XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_FREQUENCY_CHANGED, 0, NULL };
+        XAAdaptationBase_SendAdaptEvents(&tArgs->bCtx->baseObj, &event );
+    }
+    mCtx->state = XA_RADIO_IDLE;
+
+    free(args);
+    asyncdata = NULL;
+    DEBUG_API("<-XARadioItfAdapt_AsyncSetFrequency");
+    pthread_exit(NULL);
+    return NULL;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SyncSetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq)
+ */
+XAresult XARadioItfAdapt_SyncSetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint8 index=0;
+    XAboolean channelFound = XA_BOOLEAN_FALSE;
+    XARadioAdaptationCtx* mCtx=NULL;
+
+    DEBUG_API("->XARadioItfAdapt_SyncSetFrequency");
+
+    if(!bCtx || freq < supportedFreqRanges[freqRangeIndex].minFreq
+            || freq > supportedFreqRanges[freqRangeIndex].maxFreq
+            || ((freq - supportedFreqRanges[freqRangeIndex].minFreq)
+                    % supportedFreqRanges[freqRangeIndex].freqInterval) != 0)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_SyncSetFrequency");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (freq != mCtx->frequency)
+    {
+        for (index = 0; index < NUM_OF_CHANNELS; index++)
+        {
+            if (channels[index].freq == freq)
+            {
+                currentChannel = index;
+                channelFound = XA_BOOLEAN_TRUE;
+                break;
+            }
+        }
+        if ( channelFound == XA_BOOLEAN_FALSE && radioState == RADIO_STATE_ON_CHANNEL)
+        {
+            if (squelchMode == XA_BOOLEAN_FALSE)
+            {
+                DEBUG_API("Channel not found, squelch mode off, set radio to white noise");
+                g_object_set( G_OBJECT(bCtx->bin), "wave", GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE, NULL );
+            }
+            else
+            {
+                DEBUG_API("Channel not found, squelch mode off, set radio to silence");
+                g_object_set( G_OBJECT(bCtx->bin), "wave", GST_AUDIO_TEST_SRC_WAVE_SILENCE, NULL );
+            }
+            radioState = RADIO_STATE_OFF_CHANNEL;
+        }
+        else if ( channelFound == XA_BOOLEAN_TRUE && radioState == RADIO_STATE_OFF_CHANNEL )
+        {
+            DEBUG_API("Channel found, set radio to sine wave");
+            g_object_set( G_OBJECT(bCtx->bin), "wave", GST_AUDIO_TEST_SRC_WAVE_SINE, NULL );
+            radioState = RADIO_STATE_ON_CHANNEL;
+        }
+        else
+        {
+            /* do nothing */
+        }
+
+        DEBUG_INFO("Frequency changed!")
+
+        mCtx->frequency = freq;
+    } /* else frequency not changed do nothing */
+
+    DEBUG_API("<-XARadioItfAdapt_SyncSetFrequency");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetFrequency(XAAdaptationGstCtx *bCtx,
+ *                                       XAuint32 * pFrequency)
+ */
+XAresult XARadioItfAdapt_GetFrequency(XAAdaptationGstCtx *bCtx,
+                                      XAuint32 * pFrequency)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XARadioAdaptationCtx* mCtx=NULL;
+    DEBUG_API("->XARadioItfAdapt_GetFrequency");
+
+    if(!bCtx || !pFrequency)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_GetFrequency");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    *pFrequency = mCtx->frequency;
+
+    DEBUG_API("<-XARadioItfAdapt_GetFrequency");
+    return ret;
+}
+
+
+/*
+ * XAresult XARadioItfAdapt_CancelSetFrequency(XAAdaptationGstCtx *bCtx)
+ */
+XAresult XARadioItfAdapt_CancelSetFrequency(XAAdaptationGstCtx *bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XARadioAdaptationCtx* mCtx=NULL;
+    DEBUG_API("->XARadioItfAdapt_CancelSetFrequency");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_CancelSetFrequency");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+
+    if (mCtx->state == XA_RADIO_SEEKING)
+    {
+      //  pthread_cancel(mCtx->emulationThread);
+        mCtx->state = XA_RADIO_IDLE;
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_CancelSetFrequency");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SetSquelch(XAAdaptationGstCtx *bCtx, XAboolean squelch)
+ */
+XAresult XARadioItfAdapt_SetSquelch(XAAdaptationGstCtx *bCtx, XAboolean squelch)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARadioItfAdapt_SetSquelch");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_SetSquelch");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if (squelch != squelchMode)
+    {
+        if (radioState == RADIO_STATE_OFF_CHANNEL)
+        {
+            if (squelch == XA_BOOLEAN_FALSE)
+            {
+                DEBUG_API("Squelch untoggled, no channel, set radio to white noise")
+                g_object_set( G_OBJECT(bCtx->bin), "wave", GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE, NULL );
+            }
+            else
+            {
+                DEBUG_API("Squelch toggled, no channel, set radio to silence")
+                g_object_set( G_OBJECT(bCtx->bin), "wave", GST_AUDIO_TEST_SRC_WAVE_SILENCE, NULL );
+            }
+        }
+        else
+        {
+            DEBUG_API("Squelch toggled, radio on channel, radio not changed")
+        }
+        squelchMode = squelch;
+    } /* else do nothing as mode not changed */
+
+    DEBUG_API("<-XARadioItfAdapt_SetSquelch");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SetStereoMode(XAAdaptationGstCtx *bCtx, XAuint32 mode)
+ */
+XAresult XARadioItfAdapt_SetStereoMode(XAAdaptationGstCtx *bCtx, XAuint32 mode)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARadioItfAdapt_SetStereoMode");
+
+    if(!bCtx || mode > XA_STEREOMODE_AUTO )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_SetStereoMode");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    switch ( mode )
+    {
+        case XA_STEREOMODE_MONO:
+            /* always works */
+            break;
+        case XA_STEREOMODE_STEREO:
+            if ( supportedFreqRanges[freqRangeIndex].stereoMode == XA_STEREOMODE_MONO )
+            {
+                DEBUG_ERR("StereoMode stereo unsupported");
+                ret = XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+            break;
+        case XA_STEREOMODE_AUTO:
+            if ( supportedFreqRanges[freqRangeIndex].stereoMode != XA_STEREOMODE_AUTO )
+            {
+                DEBUG_ERR("StereoMode auto unsupported");
+                ret = XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+            break;
+        default :
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            ret = XA_RESULT_INTERNAL_ERROR; /* shouldn't come here */
+            break;
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_SetStereoMode");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetSignalStrength(XAAdaptationGstCtx *bCtx, XAuint32 * pStrength)
+ */
+XAresult XARadioItfAdapt_GetSignalStrength(XAAdaptationGstCtx *bCtx, XAuint32 * pStrength)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARadioItfAdapt_GetSignalStrength");
+
+    if(!bCtx || !pStrength)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_GetSignalStrength");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if (currentChannel != -1)
+    {
+        *pStrength = channels[currentChannel].strength;
+    }
+    else
+    {
+        *pStrength = 0;
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_GetSignalStrength");
+    return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_Seek(XAAdaptationGstCtx *bCtx, XAboolean upwards)
+ */
+XAresult XARadioItfAdapt_Seek(XAAdaptationGstCtx *bCtx, XAboolean upwards)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XARadioAdaptationCtx* mCtx = NULL;
+    int pt_ret=0;
+    DEBUG_API("->XARadioItfAdapt_Seek");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_Seek");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (mCtx->state != XA_RADIO_IDLE)
+    {
+       // pthread_cancel(mCtx->emulationThread);
+        if (asyncdata)
+        {
+            free(asyncdata);
+            asyncdata = NULL;
+        }
+        mCtx->state = XA_RADIO_IDLE;
+    }
+
+    mCtx->state = XA_RADIO_SEEKING;
+    pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARadioItfAdapt_AsyncSeek),(void*)bCtx);
+
+    if(pt_ret)
+    {
+        DEBUG_ERR_A1("could not create thread!! (%d)",ret)
+        DEBUG_API("<-XARadioItfAdapt_Seek");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_Seek");
+    return ret;
+}
+
+/*
+ * void * XARadioItfAdapt_AsyncSeek(void* args)
+ */
+void * XARadioItfAdapt_AsyncSeek(void* args)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    XAAdaptationGstCtx *bCtx = (XAAdaptationGstCtx*)args;
+
+    XARadioAdaptationCtx* mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    XAuint8 index=0;
+    XAint8 currentChannel = 0;
+    XAuint32 freq=0;
+    mCtx->state = XA_RADIO_SEEKING;
+    usleep(100000); /* 1/10 seconds */
+
+    DEBUG_INFO("Seek done!")
+
+    for( index = 0; index < NUM_OF_CHANNELS; index++)
+    {
+        if (channels[index].freq == mCtx->frequency)
+        {
+            currentChannel = index;
+            break;
+        }
+    }
+
+    freq = channels[(currentChannel + 1)%NUM_OF_CHANNELS].freq;
+
+    ret = XARadioItfAdapt_SyncSetFrequency( bCtx, freq );
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR("XARadioItfAdapt_SyncSetFrequency failed")
+    }
+
+    /* Send event to RadioItf */
+    {
+        XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_SEEK_COMPLETE, 0, NULL };
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+    mCtx->state = XA_RADIO_IDLE;
+
+    pthread_exit(NULL);
+    return NULL;
+}
+
+/*
+ * XAresult XARadioItfAdapt_StopSeeking(XAAdaptationGstCtx *bCtx)
+ */
+XAresult XARadioItfAdapt_StopSeeking(XAAdaptationGstCtx *bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XARadioAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XARadioItfAdapt_StopSeeking");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARadioItfAdapt_StopSeeking");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (mCtx->state == XA_RADIO_SEEKING)
+    {
+        mCtx->state = XA_RADIO_IDLE;
+      //  pthread_cancel(mCtx->emulationThread);
+
+        /* just put some random non-channel freq */
+        ret = XARadioItfAdapt_SyncSetFrequency( bCtx, channels[0].freq+supportedFreqRanges[freqRangeIndex].freqInterval);
+        if (ret != XA_RESULT_SUCCESS)
+        {
+            ret = XA_RESULT_INTERNAL_ERROR;
+        }
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_StopSeeking");
+    return ret;
+}
+
+/*
+ * void XARadioItfAdapt_Free(XAAdaptationGstCtx *bCtx)
+ */
+void XARadioItfAdapt_Free(XAAdaptationBaseCtx *bCtx)
+{
+    XARadioAdaptationCtx* mCtx = (XARadioAdaptationCtx*) bCtx;
+    DEBUG_API("->XARadioItfAdapt_Free");
+
+    if (mCtx->state != XA_RADIO_IDLE)
+    {
+       // pthread_cancel(mCtx->emulationThread);
+        if (asyncdata)
+        {
+            free(asyncdata);
+            asyncdata = NULL;
+        }
+        mCtx->state = XA_RADIO_IDLE;
+    }
+
+    DEBUG_API("<-XARadioItfAdapt_Free");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaradioitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XARADIOITFFADAPTATION_H
+#define XARADIOITFFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xadebug.h"
+
+/* MACROS */
+#define RADIO_DEFAULT_STEREO_MODE XA_STEREOMODE_AUTO
+#define RADIO_NUM_OF_PRESETS 10
+
+extern const char* RadioPresetDefaultName;
+
+/* FUNCTIONS */
+XAresult XARadioItfAdapt_SetFreqRange(XAAdaptationGstCtx *bCtx, XAuint8 range);
+
+XAresult XARadioItfAdapt_GetFreqRange(XAAdaptationGstCtx *bCtx,
+                                      XAuint8 * pFreqRange);
+
+XAresult XARadioItfAdapt_IsFreqRangeSupported(XAAdaptationGstCtx *bCtx,
+                                             XAuint8 range,
+                                             XAboolean * pSupported);
+
+XAresult XARadioItfAdapt_GetFreqRangeProperties(XAAdaptationGstCtx *bCtx,
+                                               XAuint8 range,
+                                               XAuint32 * pMinFreq,
+                                               XAuint32 * pMaxFreq,
+                                               XAuint32 * pFreqInterval);
+
+XAresult XARadioItfAdapt_SetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq);
+
+XAresult XARadioItfAdapt_GetFrequency(XAAdaptationGstCtx *bCtx,
+                                      XAuint32 * pFrequency);
+
+XAresult XARadioItfAdapt_CancelSetFrequency(XAAdaptationGstCtx *bCtx);
+
+XAresult XARadioItfAdapt_SetSquelch(XAAdaptationGstCtx *bCtx, XAboolean squelch);
+
+XAresult XARadioItfAdapt_SetStereoMode(XAAdaptationGstCtx *bCtx, XAuint32 mode);
+
+XAresult XARadioItfAdapt_GetSignalStrength(XAAdaptationGstCtx *bCtx, XAuint32 * pStrength);
+
+XAresult XARadioItfAdapt_Seek(XAAdaptationGstCtx *bCtx, XAboolean upwards);
+
+XAresult XARadioItfAdapt_StopSeeking(XAAdaptationGstCtx *bCtx);
+
+void XARadioItfAdapt_Free(XAAdaptationBaseCtx *bCtx);
+
+#endif /* XARADIOITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,877 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <unistd.h>
+#include <time.h>
+#include <string.h>
+
+#include "xaadaptationgst.h"
+#include "xaradioadaptctx.h"
+#include "xardsitfadaptation.h"
+#include "xaradioitfadaptation.h"
+
+/* emulated device data and constraints */
+
+#define NUM_OF_CHANNELS 2
+#define MAX_PS_STRING_LENGHT 17
+#define MAX_RT_STRING_LENGHT 129
+#define MAX_ODA_GROUP_SUBSCRIPTIONS 100
+#define MAX_PTY_STRING_SHORT_LENGHT 17
+#define MAX_PTY_STRING_LONG_LENGHT 33
+#define NONE_STRING_LENGHT 4
+
+/* emulated rds data structure */
+typedef struct
+{
+    XAuint32 frequency;
+    XAchar *progServiceName;
+    XAchar *radioText;
+    XAuint32 programmeType;
+    XAchar *ptyStringShort;
+    XAchar *ptyStringLong;
+    XAint16 programmeID;
+    XAboolean trafficAnnouncement;
+    XAboolean trafficProgramme;
+} RDSData;
+
+#define TRAFFIC_PROGRAMME_CHANNEL 0
+#define TRAFFIC_ANNOUNCEMENT_CHANNEL 0
+#define POPMUSIC_CHANNEL 1
+
+/* emulated rds data from channels */
+static const RDSData rdsData[NUM_OF_CHANNELS] = {
+        {88500000, (XAchar *)"Traffic", (XAchar *)"All your traffic needs", XA_RDSPROGRAMMETYPE_RDSPTY_NONE,
+            (XAchar *)"None", (XAchar *)"None", 0x0001, XA_BOOLEAN_TRUE, XA_BOOLEAN_TRUE },
+        {89300000, (XAchar *)"Popular", (XAchar *)"For the populous", XA_RDSPROGRAMMETYPE_RDSPTY_POPMUSIC,
+            (XAchar *)"Pop music", (XAchar *)"Pop music for the masses", 0x0002, XA_BOOLEAN_FALSE, XA_BOOLEAN_FALSE }
+};
+
+static const XAchar* noneString = (XAchar *)"None";
+
+static XAint16 subscribedODAGroups[MAX_ODA_GROUP_SUBSCRIPTIONS];
+static XAuint16 subscribedODAGroupCount = 0;
+
+static XAuint32 freqSetAfterSeek;
+
+const RDSData* GetCurrentRdsData( XAAdaptationGstCtx *bCtx );
+void * XARDSItfAdapt_AsyncSeek(void* args);
+void * XARDSItfAdapt_AsyncGetODAGroup(void* args);
+
+/* exposing radio itf adaptation internal function here */
+XAresult XARadioItfAdapt_SyncSetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq);
+
+
+/*
+ * XAresult XARDSItfAdapt_QueryRDSSignal(XAAdaptationGstCtx *bCtx, XAboolean * isSignal)
+ */
+XAresult XARDSItfAdapt_QueryRDSSignal(XAAdaptationGstCtx *bCtx, XAboolean * isSignal)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARDSItfAdapt_QueryRDSSignal");
+
+    if(!bCtx || !isSignal)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_QueryRDSSignal");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if (GetCurrentRdsData(bCtx))
+    {
+        *isSignal = XA_BOOLEAN_TRUE;
+    }
+    else
+    {
+        *isSignal = XA_BOOLEAN_FALSE;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_QueryRDSSignal");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetProgrammeServiceName(XAAdaptationGstCtx *bCtx, XAchar * ps)
+ */
+XAresult XARDSItfAdapt_GetProgrammeServiceName(XAAdaptationGstCtx *bCtx, XAchar * ps)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    const RDSData* data;
+    DEBUG_API("->XARDSItfAdapt_GetProgrammeServiceName");
+
+
+    if(!bCtx || !ps)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetProgrammeServiceName");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    data = GetCurrentRdsData( bCtx );
+
+    if (data)
+    {
+        strncpy( (char *)ps, (char *)data->progServiceName, MAX_PS_STRING_LENGHT );
+    }
+    else
+    {
+        *ps = 0;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetProgrammeServiceName");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetRadioText(XAAdaptationGstCtx *bCtx, XAchar * rt)
+ */
+XAresult XARDSItfAdapt_GetRadioText(XAAdaptationGstCtx *bCtx, XAchar * rt)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    const RDSData* data;
+    DEBUG_API("->XARDSItfAdapt_GetRadioText");
+
+    if(!bCtx || !rt)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetRadioText");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    data = GetCurrentRdsData( bCtx );
+
+    if (data)
+    {
+        strncpy( (char *)rt, (char *)data->radioText, MAX_RT_STRING_LENGHT );
+    }
+    else
+    {
+        *rt = 0;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetRadioText");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetRadioTextPlus(XAAdaptationGstCtx *bCtx,
+ *                                         XAuint8 contentType,
+ *                                         XAchar * informationElement,
+ *                                         XAchar * descriptor,
+ *                                         XAuint8 * descriptorContentType)
+ */
+XAresult XARDSItfAdapt_GetRadioTextPlus(XAAdaptationGstCtx *bCtx,
+                                        XAuint8 contentType,
+                                        XAchar * informationElement,
+                                        XAchar * descriptor,
+                                        XAuint8 * descriptorContentType)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARDSItfAdapt_GetRadioTextPlus");
+
+    if(!bCtx || contentType < XA_RDSRTPLUS_ITEMTITLE || contentType > XA_RDSRTPLUS_GETDATA
+            || !informationElement || !descriptor || !descriptorContentType)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetRadioTextPlus");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *informationElement = 0;
+    *descriptorContentType = 0;
+
+    DEBUG_API("<-XARDSItfAdapt_GetRadioTextPlus");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetProgrammeType(XAAdaptationGstCtx *bCtx, XAuint32 * pty)
+ */
+XAresult XARDSItfAdapt_GetProgrammeType(XAAdaptationGstCtx *bCtx, XAuint32 * pty)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    const RDSData* data;
+    DEBUG_API("->XARDSItfAdapt_GetProgrammeType");
+
+    if(!bCtx || !pty)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetProgrammeType");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    data = GetCurrentRdsData( bCtx );
+
+    if (data)
+    {
+        *pty = data->programmeType;
+    }
+    else
+    {
+        *pty = 0;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetProgrammeType");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetProgrammeTypeString(XAAdaptationGstCtx *bCtx,
+ *                                               XAboolean isLengthMax16,
+ *                                               XAchar * pty)
+ *
+ */
+XAresult XARDSItfAdapt_GetProgrammeTypeString(XAAdaptationGstCtx *bCtx,
+                                             XAboolean isLengthMax16,
+                                             XAchar * pty)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    const RDSData* data;
+    DEBUG_API("->XARDSItfAdapt_GetProgrammeTypeString");
+
+    if(!bCtx || !pty)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetProgrammeTypeString");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    data = GetCurrentRdsData( bCtx );
+
+    if (data)
+    {
+        if (isLengthMax16)
+        {
+            DEBUG_API_A1("Programme type string %s", data->ptyStringLong);
+            strncpy( (char *)pty, (char *)data->ptyStringLong, MAX_PTY_STRING_LONG_LENGHT );
+        }
+        else
+        {
+            DEBUG_API_A1("Programme type string %s", data->ptyStringShort);
+            strncpy( (char *)pty, (char *)data->ptyStringShort, MAX_PTY_STRING_SHORT_LENGHT );
+        }
+    }
+    else
+    {
+        DEBUG_API_A1("Programme type string %s", noneString);
+        strncpy( (char *)pty, (char *)noneString, NONE_STRING_LENGHT );
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetProgrammeTypeString");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetProgrammeIdentificationCode(XAAdaptationGstCtx *bCtx, XAint16 * pi)
+ */
+XAresult XARDSItfAdapt_GetProgrammeIdentificationCode(XAAdaptationGstCtx *bCtx, XAint16 * pi)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    const RDSData* data;
+    DEBUG_API("->XARDSItfAdapt_GetProgrammeIdentificationCode");
+
+    if(!bCtx || !pi)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetProgrammeIdentificationCode");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    data = GetCurrentRdsData( bCtx );
+
+    if (data)
+    {
+        *pi = data->programmeID;
+    }
+    else
+    {
+        *pi = 0;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetProgrammeIdentificationCode");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetClockTime(XAAdaptationGstCtx *bCtx, XAtime * dateAndTime)
+ */
+XAresult XARDSItfAdapt_GetClockTime(XAAdaptationGstCtx *bCtx, XAtime * dateAndTime)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    time_t timeRet=0;
+    DEBUG_API("->XARDSItfAdapt_GetClockTime");
+
+    if(!bCtx || !dateAndTime)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetClockTime");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    timeRet = time(NULL);
+
+    if (timeRet == -1) /* could not get time for some reason */
+    {
+        ret = XA_RESULT_INTERNAL_ERROR;
+    }
+    else
+    {
+        *dateAndTime = timeRet;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetClockTime");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean * ta)
+ */
+XAresult XARDSItfAdapt_GetTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean * ta)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    const RDSData* data;
+    DEBUG_API("->XARDSItfAdapt_GetTrafficAnnouncement");
+
+    if(!bCtx || !ta)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetTrafficAnnouncement");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    data = GetCurrentRdsData( bCtx );
+
+    if (data)
+    {
+        *ta = data->trafficAnnouncement;
+    }
+    else
+    {
+        *ta = XA_BOOLEAN_FALSE;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetTrafficAnnouncement");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetTrafficProgramme(XAAdaptationGstCtx *bCtx, XAboolean * tp)
+ */
+XAresult XARDSItfAdapt_GetTrafficProgramme(XAAdaptationGstCtx *bCtx, XAboolean * tp)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    const RDSData* data;
+    DEBUG_API("->XARDSItfAdapt_GetTrafficProgramme");
+
+    if(!bCtx || !tp)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetTrafficProgramme");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    data = GetCurrentRdsData( bCtx );
+
+    if (data)
+    {
+        *tp = data->trafficProgramme;
+    }
+    else
+    {
+        *tp = XA_BOOLEAN_FALSE;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetTrafficProgramme");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_SeekByProgrammeType(XAAdaptationGstCtx *bCtx,
+ *                                            XAuint32 pty,
+ *                                            XAboolean upwards)
+ */
+XAresult XARDSItfAdapt_SeekByProgrammeType(XAAdaptationGstCtx *bCtx,
+                                           XAuint32 pty,
+                                           XAboolean upwards)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    int pt_ret=0;
+    XARadioAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XARDSItfAdapt_SeekByProgrammeType");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_SeekByProgrammeType");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (mCtx->state != XA_RADIO_IDLE)
+    {
+      //  pthread_cancel(mCtx->emulationThread);
+        mCtx->state = XA_RADIO_IDLE;
+    }
+
+    if (pty == XA_RDSPROGRAMMETYPE_RDSPTY_POPMUSIC)
+    {
+        freqSetAfterSeek = rdsData[POPMUSIC_CHANNEL].frequency;
+    }
+    else
+    {
+        freqSetAfterSeek = mCtx->frequency;
+    }
+
+    mCtx->state = XA_RADIO_SEEKING;
+    pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARDSItfAdapt_AsyncSeek),(void*)bCtx);
+
+    if(pt_ret)
+    {
+        DEBUG_ERR_A1("could not create thread!! (%d)",ret);
+        DEBUG_API("<-XARDSItfAdapt_SeekByProgrammeType");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_SeekByProgrammeType");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_SeekTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean upwards)
+ */
+XAresult XARDSItfAdapt_SeekTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean upwards)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    int pt_ret=0;
+    XARadioAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XARDSItfAdapt_SeekTrafficAnnouncement");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_SeekTrafficAnnouncement");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (mCtx->state != XA_RADIO_IDLE)
+    {
+     //   pthread_cancel(mCtx->emulationThread);
+        mCtx->state = XA_RADIO_IDLE;
+    }
+
+    freqSetAfterSeek = rdsData[TRAFFIC_ANNOUNCEMENT_CHANNEL].frequency;
+
+    mCtx->state = XA_RADIO_SEEKING;
+    pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARDSItfAdapt_AsyncSeek),(void*)bCtx);
+
+    if(pt_ret)
+    {
+        DEBUG_ERR_A1("could not create thread!! (%d)",ret);
+        DEBUG_API("<-XARDSItfAdapt_SeekTrafficAnnouncement");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_SeekTrafficAnnouncement");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_SeekTrafficProgramme(XAAdaptationGstCtx *bCtx, XAboolean upwards)
+ */
+XAresult XARDSItfAdapt_SeekTrafficProgramme(XAAdaptationGstCtx *bCtx, XAboolean upwards)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    int pt_ret=0;
+    XARadioAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XARDSItfAdapt_SeekTrafficProgramme");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_SeekTrafficProgramme");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (mCtx->state != XA_RADIO_IDLE)
+    {
+      //  pthread_cancel(mCtx->emulationThread);
+        mCtx->state = XA_RADIO_IDLE;
+    }
+
+    freqSetAfterSeek = rdsData[TRAFFIC_PROGRAMME_CHANNEL].frequency;
+
+    mCtx->state = XA_RADIO_SEEKING;
+    pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARDSItfAdapt_AsyncSeek),(void*)bCtx);
+
+    if(pt_ret)
+    {
+        DEBUG_ERR_A1("could not create thread!! (%d)",ret);
+        DEBUG_API("<-XARDSItfAdapt_SeekTrafficProgramme");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_SeekTrafficProgramme");
+    return ret;
+}
+
+/*
+ * void * XARadioItfAdapt_AsyncSeek(void* args)
+ */
+void * XARDSItfAdapt_AsyncSeek(void* args)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAAdaptationGstCtx *bCtx = (XAAdaptationGstCtx*)args;
+
+    XARadioAdaptationCtx* mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    DEBUG_API("->XARDSItfAdapt_AsyncSeek");
+
+    usleep(100000); /* 1/10 seconds */
+
+    DEBUG_INFO("Seek done!");
+
+    ret = XARadioItfAdapt_SyncSetFrequency( bCtx, freqSetAfterSeek );
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR("XARadioItfAdapt_SyncSetFrequency FAILED");
+    }
+
+    /* Send event to RadioItf */
+    {
+        XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_SEEK_COMPLETE, 0, NULL };
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+    mCtx->state = XA_RADIO_IDLE;
+
+    DEBUG_API("<-XARDSItfAdapt_AsyncSeek");
+    pthread_exit(NULL);
+    return NULL;
+}
+
+/*
+ * XAresult XARDSItfAdapt_SetAutomaticSwitching(XAAdaptationGstCtx *bCtx, XAboolean automatic)
+ */
+XAresult XARDSItfAdapt_SetAutomaticSwitching(XAAdaptationGstCtx *bCtx, XAboolean automatic)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARDSItfAdapt_SetAutomaticSwitching");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_SetAutomaticSwitching");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ret = XA_RESULT_FEATURE_UNSUPPORTED;
+
+    DEBUG_API("<-XARDSItfAdapt_SetAutomaticSwitching");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetAutomaticSwitching(XAAdaptationGstCtx *bCtx, XAboolean * automatic)
+ */
+XAresult XARDSItfAdapt_GetAutomaticSwitching(XAAdaptationGstCtx *bCtx, XAboolean * automatic)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARDSItfAdapt_GetAutomaticSwitching");
+
+    if(!bCtx || !automatic)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetAutomaticSwitching");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* Feature not supported */
+    *automatic = XA_BOOLEAN_FALSE;
+
+    DEBUG_API("<-XARDSItfAdapt_GetAutomaticSwitching");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_SetAutomaticTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean automatic)
+ */
+XAresult XARDSItfAdapt_SetAutomaticTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean automatic)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARDSItfAdapt_SetAutomaticTrafficAnnouncement");
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_SetAutomaticTrafficAnnouncement");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ret = XA_RESULT_FEATURE_UNSUPPORTED;
+
+    DEBUG_API("<-XARDSItfAdapt_SetAutomaticTrafficAnnouncement");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetAutomaticTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean * automatic)
+ */
+XAresult XARDSItfAdapt_GetAutomaticTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean * automatic)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XARDSItfAdapt_GetAutomaticTrafficAnnouncement");
+
+    if(!bCtx || !automatic)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetAutomaticTrafficAnnouncement");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *automatic = XA_BOOLEAN_FALSE;
+
+    DEBUG_API("<-XARDSItfAdapt_GetAutomaticTrafficAnnouncement");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_GetODAGroup(XAAdaptationGstCtx *bCtx,
+ *                                    XAint16 AID)
+ */
+XAresult XARDSItfAdapt_GetODAGroup(XAAdaptationGstCtx *bCtx, XAint16 AID)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    int pt_ret=0;
+    XARadioAdaptationCtx* mCtx=NULL;
+    DEBUG_API("->XARDSItfAdapt_GetODAGroup");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_GetODAGroup");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    if (mCtx->rdsState != XA_RADIO_RDS_IDLE)
+    {
+      //  pthread_cancel(mCtx->rdsEmulationThread);
+        mCtx->rdsState = XA_RADIO_RDS_IDLE;
+        DEBUG_INFO("Previous getodagroup async call cancelled")
+    }
+
+    pt_ret = pthread_create(&(mCtx->rdsEmulationThread), NULL, (XARDSItfAdapt_AsyncGetODAGroup),(void*)bCtx);
+
+    if(pt_ret)
+    {
+        DEBUG_ERR_A1("could not create thread!! (%d)",ret);
+        DEBUG_API("<-XARDSItfAdapt_GetODAGroup");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_GetODAGroup");
+    return ret;
+}
+
+/*
+ * void * XARDSItfAdapt_AsyncGetODAGroup(void* args)
+ */
+void * XARDSItfAdapt_AsyncGetODAGroup(void* args)
+{
+    XARadioAdaptationCtx* mCtx = (XARadioAdaptationCtx*)args;
+
+    DEBUG_API("->XARDSItfAdapt_AsyncGetODAGroup");
+    mCtx->rdsState = XA_RADIO_RDS_GETTING_ODA_GROUP;
+
+    DEBUG_INFO("Get oda group async wait")
+    usleep(100000); /* 1/10 seconds */
+
+    /* Send event */
+    {
+        XAAdaptEvent event = {XA_RDSITFEVENTS, XA_ADAPT_RDS_GET_ODA_GROUP_DONE, 0, NULL };
+        XAAdaptationBase_SendAdaptEvents(args, &event );
+    }
+    mCtx->rdsState = XA_RADIO_RDS_IDLE;
+    DEBUG_API("<-XARDSItfAdapt_AsyncGetODAGroup");
+    pthread_exit(NULL);
+    return NULL;
+}
+
+/*
+ * XAresult XARDSItfAdapt_SubscribeODAGroup(XAAdaptationGstCtx *bCtx,
+ *                                          XAint16 group,
+ *                                          XAboolean useErrorCorrection)
+ */
+XAresult XARDSItfAdapt_SubscribeODAGroup(XAAdaptationGstCtx *bCtx,
+                                        XAint16 group,
+                                        XAboolean useErrorCorrection)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint8 index=0;
+    XAboolean groupFound = XA_BOOLEAN_FALSE;
+    DEBUG_API("->XARDSItfAdapt_SubscribeODAGroup");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_SubscribeODAGroup");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* Look for group in list, if not there add it */
+    if (subscribedODAGroupCount < MAX_ODA_GROUP_SUBSCRIPTIONS)
+    {
+        for (index = 0; index < subscribedODAGroupCount; index++)
+        {
+            if (subscribedODAGroups[index] == group)
+            {
+                groupFound = XA_BOOLEAN_TRUE;
+            }
+        }
+        if (!groupFound)
+        {
+            subscribedODAGroups[subscribedODAGroupCount] = group;
+            subscribedODAGroupCount++;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XARDSItfAdapt_SubscribeODAGroup");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_SubscribeODAGroup");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_UnsubscribeODAGroup(XAAdaptationGstCtx *bCtx, XAint16 group)
+ */
+XAresult XARDSItfAdapt_UnsubscribeODAGroup(XAAdaptationGstCtx *bCtx, XAint16 group)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint8 index=0;
+    DEBUG_API("->XARDSItfAdapt_UnsubscribeODAGroup");
+
+    if(!bCtx)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_UnsubscribeODAGroup");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* Look for group in list, if found, remove it */
+    for (index = 0; index < subscribedODAGroupCount; index++)
+    {
+        if (subscribedODAGroups[index] == group)
+        {
+            subscribedODAGroups[index] = subscribedODAGroups[subscribedODAGroupCount-1];
+            subscribedODAGroupCount--;
+        }
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_UnsubscribeODAGroup");
+    return ret;
+}
+
+/*
+ * XAresult XARDSItfAdapt_ListODAGroupSubscriptions(XAAdaptationGstCtx *bCtx,
+ *                                                  XAint16* pGroups,
+ *                                                  XAuint32* pLength)
+ */
+XAresult XARDSItfAdapt_ListODAGroupSubscriptions(XAAdaptationGstCtx *bCtx,
+                                                XAint16* pGroups,
+                                                XAuint32* pLength)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint8 index=0;
+    DEBUG_API("->XARDSItfAdapt_ListODAGroupSubscriptions");
+
+    if(!bCtx || !pLength)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARDSItfAdapt_ListODAGroupSubscriptions");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if (!pGroups)
+    {
+        *pLength = subscribedODAGroupCount;
+    }
+    else
+    {
+        if (*pLength < subscribedODAGroupCount)
+        {
+            ret = XA_RESULT_BUFFER_INSUFFICIENT;
+        }
+        for (index = 0; index < *pLength; index++)
+        {
+            pGroups[index] = subscribedODAGroups[index];
+        }
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_ListODAGroupSubscriptions");
+    return ret;
+}
+
+/*
+ * const RDSData* GetCurrentRdsData( XAAdaptationGstCtx *bCtx )
+ */
+const RDSData* GetCurrentRdsData( XAAdaptationGstCtx *bCtx )
+{
+    XAuint8 index=0;
+    XARadioAdaptationCtx* mCtx = (XARadioAdaptationCtx*) bCtx;
+
+    for (index = 0; index < NUM_OF_CHANNELS; index++ )
+    {
+        if (rdsData[index].frequency == mCtx->frequency)
+        {
+            DEBUG_API("<-GetCurrentRdsData");
+            return &(rdsData[index]);
+        }
+    }
+    DEBUG_API("<-GetCurrentRdsData");
+    return NULL;
+}
+
+
+/*
+ * void XARDSItfAdapt_Free(XAAdaptationGstCtx *bCtx)
+ */
+void XARDSItfAdapt_Free(XAAdaptationBaseCtx *bCtx)
+{
+    XARadioAdaptationCtx* mCtx = (XARadioAdaptationCtx*) bCtx;
+    DEBUG_API("->XARDSItfAdapt_Free");
+
+    if (mCtx->state != XA_RADIO_IDLE)
+    {
+       // pthread_cancel(mCtx->emulationThread);
+        mCtx->state = XA_RADIO_IDLE;
+    }
+
+    if (mCtx->rdsState != XA_RADIO_RDS_IDLE)
+    {
+      //  pthread_cancel(mCtx->rdsEmulationThread);
+        mCtx->rdsState = XA_RADIO_RDS_IDLE;
+    }
+
+    DEBUG_API("<-XARDSItfAdapt_Free");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XARDSITFFADAPTATION_H
+#define XARDSOITFFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xadebug.h"
+
+/* MACROS */
+
+/* FUNCTIONS */
+
+XAresult XARDSItfAdapt_QueryRDSSignal(XAAdaptationGstCtx *bCtx, XAboolean * isSignal);
+
+XAresult XARDSItfAdapt_GetProgrammeServiceName(XAAdaptationGstCtx *bCtx, XAchar * ps);
+
+XAresult XARDSItfAdapt_GetRadioText(XAAdaptationGstCtx *bCtx, XAchar * rt);
+
+XAresult XARDSItfAdapt_GetRadioTextPlus(XAAdaptationGstCtx *bCtx,
+                                       XAuint8 contentType,
+                                       XAchar * informationElement,
+                                       XAchar * descriptor,
+                                       XAuint8 * descriptorContentType);
+
+XAresult XARDSItfAdapt_GetProgrammeType(XAAdaptationGstCtx *bCtx, XAuint32 * pty);
+
+XAresult XARDSItfAdapt_GetProgrammeTypeString(XAAdaptationGstCtx *bCtx,
+                                             XAboolean isLengthMax16,
+                                             XAchar * pty);
+
+XAresult XARDSItfAdapt_GetProgrammeIdentificationCode(XAAdaptationGstCtx *bCtx, XAint16 * pi);
+
+XAresult XARDSItfAdapt_GetClockTime(XAAdaptationGstCtx *bCtx, XAtime * dateAndTime);
+
+XAresult XARDSItfAdapt_GetTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean * ta);
+
+XAresult XARDSItfAdapt_GetTrafficProgramme(XAAdaptationGstCtx *bCtx, XAboolean * tp);
+
+XAresult XARDSItfAdapt_SeekByProgrammeType(XAAdaptationGstCtx *bCtx,
+                                          XAuint32 pty,
+                                          XAboolean upwards);
+
+XAresult XARDSItfAdapt_SeekTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean upwards);
+
+XAresult XARDSItfAdapt_SeekTrafficProgramme(XAAdaptationGstCtx *bCtx, XAboolean upwards);
+
+XAresult XARDSItfAdapt_SetAutomaticSwitching(XAAdaptationGstCtx *bCtx, XAboolean automatic);
+
+XAresult XARDSItfAdapt_GetAutomaticSwitching(XAAdaptationGstCtx *bCtx, XAboolean * automatic);
+
+XAresult XARDSItfAdapt_SetAutomaticTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean automatic);
+
+XAresult XARDSItfAdapt_GetAutomaticTrafficAnnouncement(XAAdaptationGstCtx *bCtx, XAboolean * automatic);
+
+XAresult XARDSItfAdapt_GetODAGroup(XAAdaptationGstCtx *bCtx, XAint16 AID);
+
+XAresult XARDSItfAdapt_SubscribeODAGroup(XAAdaptationGstCtx *bCtx,
+                                        XAint16 group,
+                                        XAboolean useErrorCorrection);
+
+XAresult XARDSItfAdapt_UnsubscribeODAGroup(XAAdaptationGstCtx *bCtx, XAint16 group);
+
+XAresult XARDSItfAdapt_ListODAGroupSubscriptions(XAAdaptationGstCtx *bCtx,
+                                                XAint16* pGroups,
+                                                XAuint32* pLength);
+
+void XARDSItfAdapt_Free(XAAdaptationBaseCtx *bCtx);
+
+#endif /* XARDSITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,402 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <pthread.h>
+#include <gst.h>
+#include "xamediarecorderadaptctx.h"
+#include "xarecorditfadaptation.h"
+#include "xaadaptationgst.h"
+#include "xacameraadaptctx.h"
+
+/*forward declaration of position updater callback*/
+gboolean XARecordItfAdapt_PositionUpdate(gpointer ctx);
+
+extern XAboolean cameraRealized;
+extern XACameraAdaptationCtx_* cameraCtx;
+
+/*
+ * XAresult XARecordItfAdapt_SetRecordState(XAAdaptationGstCtx *ctx, XAuint32 state)
+ * Sets record state to GStreamer.
+ * @param XAAdaptationGstCtx *ctx - Adaptation context
+ * XAuint32 state - Record state to be set
+ * @return XAresult ret - Success value
+ */
+XAresult XARecordItfAdapt_SetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 state)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAboolean closeSink = XA_BOOLEAN_FALSE;
+    XAboolean requestStateChange = XA_BOOLEAN_FALSE;
+    GstStateChangeReturn gstRet = GST_STATE_CHANGE_SUCCESS;
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    XAboolean recording = XA_BOOLEAN_FALSE;
+    DEBUG_API_A1("->XARecordItfAdapt_SetRecordState %s",RECORDSTATENAME(state));
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdapt_SetRecordState");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+    mCtx->isRecord = XA_BOOLEAN_TRUE;
+
+    switch ( state )
+    {
+        case XA_RECORDSTATE_STOPPED:
+        {
+                // Audio sourse should be stopped 
+                if ( mCtx->audiosource )
+                {
+                   if ( gst_element_send_event (mCtx->audiosource, gst_event_new_eos ()) == TRUE )
+                   {
+                       DEBUG_INFO ("posted eos");
+                   }
+                   else
+                       {
+                        DEBUG_ERR("FAIL : post eos");
+                       }
+                }
+        
+        	if ( cameraCtx && cameraRealized && mCtx->isobjvsrc && mCtx->videosource  )
+			{
+				cameraCtx->recording = XA_BOOLEAN_FALSE;
+
+	            if(!cameraCtx->playing && !cameraCtx->snapshotting)
+	            {
+	            	/* Neither view finder or recorder is running -> pause camera */
+	            	if ( GST_STATE( GST_ELEMENT(mCtx->videosource)) == GST_STATE_PLAYING )
+	            	{
+	            		GstStateChangeReturn gret;
+	        			DEBUG_INFO("Stop camera source");
+	        			gret = gst_element_set_state( GST_ELEMENT(mCtx->videosource), GST_STATE_PAUSED );
+	        			if(gret == GST_STATE_CHANGE_SUCCESS)
+	        			    gret = gst_element_get_state( GST_ELEMENT(mCtx->videosource), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
+	            	}
+	            }
+			}
+
+            bCtx->binWantedState = GST_STATE_PAUSED;
+            closeSink = XA_BOOLEAN_TRUE;
+            if(mCtx->runpositiontimer > 0)
+            {
+                g_source_remove(mCtx->runpositiontimer);
+                mCtx->runpositiontimer=0;
+            }
+
+            if ( mCtx->recThrCtx.bufInsufficientSem )
+            {
+                DEBUG_INFO("No buffer-insufficient received, posting record thr semaphore.");
+                if ( XAImpl_PostSemaphore( mCtx->recThrCtx.bufInsufficientSem ) != XA_RESULT_SUCCESS)
+                {
+                    DEBUG_ERR("Posting buffer-insufficient semaphore FAILED!");
+                }
+            }
+
+            break;
+        }
+        case XA_RECORDSTATE_PAUSED:
+        {
+        	if ( cameraCtx && cameraRealized && mCtx->isobjvsrc && mCtx->videosource  )
+			{
+				cameraCtx->recording = XA_BOOLEAN_FALSE;
+				if(!cameraCtx->playing && !cameraCtx->snapshotting)
+				{
+					/* Neither view finder or recorder is running -> pause camera */
+					if ( GST_STATE( GST_ELEMENT(mCtx->videosource)) == GST_STATE_PLAYING )
+					{
+						GstStateChangeReturn gret;
+						DEBUG_INFO("Stop camera source");
+						gret = gst_element_set_state( GST_ELEMENT(mCtx->videosource), GST_STATE_PAUSED );
+						if(gret == GST_STATE_CHANGE_SUCCESS)
+						    gret = gst_element_get_state( GST_ELEMENT(mCtx->videosource), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
+					}
+				}
+			}
+
+            if(mCtx->xaRecordState==XA_RECORDSTATE_STOPPED && mCtx->encodingchanged)
+            {
+                XAMediaRecorderAdapt_ChangeEncoders( mCtx );
+                mCtx->encodingchanged = XA_BOOLEAN_FALSE;
+            }
+            bCtx->binWantedState = GST_STATE_PAUSED;
+            if(mCtx->runpositiontimer > 0)
+            {
+                g_source_remove(mCtx->runpositiontimer);
+                mCtx->runpositiontimer=0;
+            }
+            break;
+        }
+        case XA_RECORDSTATE_RECORDING:
+        {
+        	if ( cameraCtx && mCtx->isobjvsrc )
+			{
+				cameraCtx->recording = XA_BOOLEAN_TRUE;
+			}
+
+            if(mCtx->xaRecordState==XA_RECORDSTATE_STOPPED && (mCtx->encodingchanged))
+            {
+                XAMediaRecorderAdapt_ChangeEncoders( mCtx );
+                mCtx->encodingchanged = XA_BOOLEAN_FALSE;
+            }
+
+            if ( mCtx->recThrCtx.bufInsufficientSem )
+            {
+                /* Recording to address and recording thread semaphora is created */
+                if(! XAImpl_StartThread(&(mCtx->recordingEventThr),NULL, &XAMediaRecorderAdapt_RecordEventThr, (void*)mCtx ))
+                    {
+                        DEBUG_ERR("Start thread Failed");
+						return XA_RESULT_INTERNAL_ERROR;
+                    }
+            }
+
+            bCtx->binWantedState = GST_STATE_PLAYING;
+            recording = XA_BOOLEAN_TRUE;
+            break;
+        }
+        default:
+            DEBUG_ERR("Unhandled state");
+            ret = XA_RESULT_PARAMETER_INVALID;
+            break;
+    }
+
+    if( ret == XA_RESULT_SUCCESS )
+    {
+        mCtx->xaRecordState = state;
+    }
+
+    /* launch Gstreamer state change only if necessary */
+    if( GST_STATE_TARGET(bCtx->bin) == bCtx->binWantedState )
+    {
+        DEBUG_INFO("Gst already transitioning to wanted state!!");
+        requestStateChange = XA_BOOLEAN_FALSE;
+    }
+    else
+    {
+        if( (GST_STATE(bCtx->bin) == bCtx->binWantedState) &&
+            (GST_STATE_PENDING(bCtx->bin) == GST_STATE_VOID_PENDING) )
+        {
+            DEBUG_ERR_A3("WARNING : gststate %d == wanted %d != gsttarget %d and no statechange pending",
+                          GST_STATE(bCtx->bin), bCtx->binWantedState, GST_STATE_TARGET(bCtx->bin));
+        }
+        requestStateChange = XA_BOOLEAN_TRUE;
+    }
+
+    if( requestStateChange )
+    {
+        XAAdaptationGst_PrepareAsyncWait(bCtx);
+        DEBUG_INFO_A1("Sending change state request to state %d", bCtx->binWantedState);
+        gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
+        switch ( gstRet )
+        {
+            case GST_STATE_CHANGE_FAILURE:
+                DEBUG_ERR_A1("FAILED to change state (target %d)",bCtx->binWantedState);
+                bCtx->binWantedState = GST_STATE(bCtx->bin);
+                ret = XA_RESULT_INTERNAL_ERROR;
+                break;
+            case GST_STATE_CHANGE_ASYNC:
+                DEBUG_INFO_A1("Change state will happen asyncronously (target %d)",bCtx->binWantedState);
+                XAAdaptationGst_StartAsyncWait(bCtx);
+                ret = XA_RESULT_SUCCESS;
+                break;
+            case GST_STATE_CHANGE_NO_PREROLL:
+                DEBUG_INFO("GST_STATE_CHANGE_NO_PREROLL");
+                /* deliberate fall-through */
+            case GST_STATE_CHANGE_SUCCESS:
+                DEBUG_INFO_A1("Successfully changed state (target %d)",bCtx->binWantedState);
+                ret = XA_RESULT_SUCCESS;
+                break;
+            default:
+                DEBUG_ERR_A1("Unhandled error (%d)",gstRet);
+                ret = XA_RESULT_UNKNOWN_ERROR;
+                break;
+        }
+        bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+    }
+    if( (GST_STATE(bCtx->bin) > GST_STATE_READY) && closeSink )
+    {   /* close the sink*/
+        gst_element_send_event(bCtx->bin,gst_event_new_flush_start());
+        gst_element_send_event(bCtx->bin,gst_event_new_flush_stop());
+    }
+
+    if ( recording && mCtx->isobjvsrc && mCtx->videosource )
+    {
+    	GstPad *pad = gst_element_get_static_pad( GST_ELEMENT(mCtx->videosource), "MRObjSrc");
+		if( pad && gst_pad_is_linked(pad) )
+		{
+			DEBUG_INFO_A2("unblock element:%s pad:%s",
+					gst_element_get_name(mCtx->videosource),
+					gst_pad_get_name(pad));
+			gst_pad_set_blocked_async(pad, FALSE, XAAdaptationGst_PadBlockCb, NULL);
+		}
+
+		if ( GST_STATE( GST_ELEMENT(mCtx->videosource)) != GST_STATE_PLAYING )
+		{
+			GstStateChangeReturn gret = GST_STATE_CHANGE_SUCCESS;
+			DEBUG_INFO("Start camera source");
+			gret = gst_element_set_state( GST_ELEMENT(mCtx->videosource), GST_STATE_PLAYING );
+			if(gret == GST_STATE_CHANGE_SUCCESS)
+			    gret = gst_element_get_state( GST_ELEMENT(mCtx->videosource), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
+		}
+    }
+    DEBUG_API("<-XARecordItfAdapt_SetRecordState");
+    return ret;
+}
+
+/*
+ * XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 *state)
+ * Description: Return record state
+ */
+XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 *state)
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XARecordItfAdapt_GetRecordState");
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdapt_GetRecordState");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+    *state = mCtx->xaRecordState;
+
+    DEBUG_API("<-XARecordItfAdapt_GetRecordState");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XARecordItfAdapt_GetPosition(XAAdaptationGstCtx *ctx, AdaptationContextIDS ctxIDs, XAmillisecond *pMsec)
+ * @param XAAdaptationGstCtx *ctx - Adaptation context, this will be casted to correct type regarding to contextID value given as 2nd parameter
+ * XAmillisecond *pMsec - Pointer where to store current position in stream.
+ * @return XAresult ret - Success value
+ */
+XAresult XARecordItfAdapt_GetPosition(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    
+    gint64 position=0;
+    GstFormat format = GST_FORMAT_TIME;
+    DEBUG_API("->XARecordItfAdapt_GetPosition");
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdapt_GetPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    if ( gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &position  ) )
+    {
+        ret = XA_RESULT_SUCCESS;
+        *pMsec = GST_TIME_AS_MSECONDS(position); /*Warning ok due to used API specification*/
+        DEBUG_INFO_A1("Gst: Position in microseconds : %u", *pMsec );
+    }
+    else
+    {
+        DEBUG_ERR("WARNING: Gst: could not get position");
+        /* probably not fully prerolled - safe assumption for position = 0 */
+        *pMsec = 0;
+        ret = XA_RESULT_SUCCESS;
+    }
+
+    DEBUG_API("<-XARecordItfAdapt_GetPosition");
+    return ret;
+}
+
+
+/*
+ * gboolean XARecordItfAdapt_PositionUpdate(gpointer ctx)
+ * callback.
+ * If position tracking enabled, periodic timer calls this method every XA_ADAPT_PU_INTERVAL msecs
+ * @return false to stop periodic calls
+ */
+gboolean XARecordItfAdapt_PositionUpdate(gpointer ctx)
+{
+    XAAdaptationGstCtx *bCtx = (XAAdaptationGstCtx*) ctx;
+    XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) ctx;
+    DEBUG_API("->XARecordItfAdapt_PositionUpdate");
+
+    if( mCtx && mCtx->trackpositionenabled )
+    {
+        GstFormat format = GST_FORMAT_TIME;
+        gint64 position = 0;
+        if ( gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &position ) )
+        {
+            XAuint32 posMsec = GST_TIME_AS_MSECONDS(position);/*Warning ok due to used API specification*/
+            XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
+            event.data = &posMsec;
+            DEBUG_API_A1("XARecordItfAdapt_PositionUpdate: pos %lu ms", posMsec);
+            /* send needed events */
+            XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+        }
+        else
+        {
+            DEBUG_ERR("Gst: Failed to get position");
+        }
+    DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
+    /* return false to stop timer */
+    return( mCtx->runpositiontimer );
+    }
+    return FALSE;
+}
+
+/*
+ * XAresult XARecordItfAdapt_EnablePositionTracking
+ * Enable/disable periodic position tracking callbacks
+ */
+XAresult XARecordItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *bCtx, XAboolean enable)
+{
+    XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+    DEBUG_API_A1("->XARecordItfAdapt_EnablePositionTracking (enable: %lu)", enable);
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+
+    /* create a timer to track position of playback */
+    if(enable && !(mCtx->trackpositionenabled))
+    {
+        mCtx->trackpositionenabled = XA_BOOLEAN_TRUE;
+        mCtx->positionCb = &XARecordItfAdapt_PositionUpdate;
+        /* if recording is already on, create a timer to track position of recording */
+        if( GST_STATE(bCtx->bin) == GST_STATE_PLAYING )
+        {
+            mCtx->runpositiontimer = g_timeout_add(XA_ADAPT_PU_INTERVAL, mCtx->positionCb, mCtx);
+        }
+    }
+    else if (!enable && (mCtx->trackpositionenabled))
+    {
+        mCtx->trackpositionenabled = XA_BOOLEAN_FALSE;
+        if(mCtx->runpositiontimer > 0)
+        {
+            g_source_remove(mCtx->runpositiontimer);
+            mCtx->runpositiontimer=0;
+        }
+    }
+
+    DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
+    return XA_RESULT_SUCCESS;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XARECORDITFADAPTATION_H
+#define XARECORDITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+
+#ifdef _DEBUG
+/*parse state names for debug prints*/
+static const char* recordstatenames[3] =
+{
+    "XA_RECORDSTATE_STOPPED",
+    "XA_RECORDSTATE_PAUSED",
+    "XA_RECORDSTATE_RECORDING",
+};
+#define RECORDSTATENAME(i) ((i>0&&i<4)?recordstatenames[i-1]:"INVALID")
+#endif /*_DEBUG*/
+
+/* FUNCTIONS */
+
+XAresult XARecordItfAdapt_SetRecordState(XAAdaptationGstCtx *ctx, XAuint32 state );
+XAresult XARecordItfAdapt_SetDurationLimit( XAAdaptationGstCtx *ctx, XAmillisecond msec );
+XAresult XARecordItfAdapt_GetPosition( XAAdaptationGstCtx *ctx, XAmillisecond *pMsec );
+XAresult XARecordItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *ctx, XAboolean enable);
+XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 *state);
+
+#endif /* XARECORDITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaseekitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xaseekitfadaptation.h"
+
+/*
+ * XAresult XASeekItfAdapt_SetPosition(XAAdaptationGstCtx *bCtx, XAmillisecond pos, XAuint32 seekMode)
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value
+ * XAmillisecond pos - Position to be set in Milliseconds
+ * XAuint32 seekMode - Preferred seek mode
+ * @return XAresult ret - Success value
+ */
+XAresult XASeekItfAdapt_SetPosition(XAAdaptationGstCtx *bCtx, XAmillisecond pos, XAuint32 seekMode)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+    gint64 gstSeekPos = pos * GST_MSECOND;
+    XAmillisecond newPosMs=0;
+    GstFormat format = GST_FORMAT_TIME;
+    GstSeekFlags seekFlags = GST_SEEK_FLAG_FLUSH;
+    DEBUG_API_A2("->XASeekItfAdapt_SetPosition (pos %ld ms, mode=%d)", pos, (int)seekMode);
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASeekItfAdapt_SetPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( GST_STATE(bCtx->bin) < GST_STATE_PAUSED )
+    {   /* This should not happen */
+        DEBUG_ERR("Gst not prerolled - can not seek!!");
+        DEBUG_API("<-XASeekItfAdapt_SetPosition");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    if ( seekMode == XA_SEEKMODE_FAST )
+    {
+        seekFlags |= GST_SEEK_FLAG_KEY_UNIT;
+    }
+    else
+    {
+        seekFlags |= GST_SEEK_FLAG_ACCURATE;
+    }
+
+    XAAdaptationGst_PrepareAsyncWait(bCtx);
+    DEBUG_INFO("Send gst_element_seek");
+    mCtx->lastpos = gstSeekPos;
+    if ( !gst_element_seek( bCtx->bin, mCtx->playrate, GST_FORMAT_TIME,  seekFlags,
+                            GST_SEEK_TYPE_SET, gstSeekPos,
+                            GST_SEEK_TYPE_NONE, (gint64)GST_CLOCK_TIME_NONE ) )
+    {
+        DEBUG_ERR("WARN: gst reports seek not handled");
+    }
+    /* flushed seeks always asynchronous */
+    XAAdaptationGst_StartAsyncWait(bCtx);
+    DEBUG_INFO("Seek handled.")
+    bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
+    /* update new position to playitf */
+    {
+        XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
+        if ( !gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &mCtx->lastpos  ) )
+        {
+            DEBUG_ERR("WARNING: could not get position from GST")
+        }
+        DEBUG_INFO_A1("Current position %"GST_TIME_FORMAT, GST_TIME_ARGS(mCtx->lastpos));
+        newPosMs = GST_TIME_AS_MSECONDS(mCtx->lastpos);
+        event.data = &newPosMs;
+        XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+    }
+
+    ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("<-XASeekItfAdapt_SetPosition");
+    return ret;
+}
+
+/*
+ * XAresult XASeekItfAdapt_SetLoop(void *bCtx, AdaptationContextIDS ctxIDs, XAboolean loopEnable, XAmillisecond startPos,
+ *                                 XAmillisecond endPos)
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value
+ * XAboolean loopEnable - Enable/Disable looping
+ * XAmillisecond startPos - Loop start position in milliseconds
+ * XAmillisecond endPos - Loop end position in milliseconds
+ * @return XAresult ret - Success value
+ */
+XAresult XASeekItfAdapt_SetLoop(XAAdaptationGstCtx *bCtx, XAboolean loopEnable, XAmillisecond startPos,
+                                XAmillisecond endPos)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationCtx* mCtx = (XAMediaPlayerAdaptationCtx*) bCtx;
+    GstFormat format = GST_FORMAT_TIME;
+
+    DEBUG_API_A3("->XASeekItfAdapt_SetLoop (enable=%d, start=%ld, stop=%ld)", (int)loopEnable, startPos, endPos);
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaPlayerAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASeekItfAdapt_SetLoop");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( loopEnable )
+    {
+        if(endPos==XA_TIME_UNKNOWN)
+        {
+            mCtx->loopend = (gint64)GST_CLOCK_TIME_NONE;
+        }
+        else
+        {
+            mCtx->loopend = (endPos*GST_MSECOND);
+            DEBUG_INFO_A1("Set looping to %ld", mCtx->loopend);
+        }
+        DEBUG_INFO_A2("Enable looping from %"GST_TIME_FORMAT" to %"GST_TIME_FORMAT,
+                      GST_TIME_ARGS(mCtx->loopstart), GST_TIME_ARGS(mCtx->loopend));
+        mCtx->loopstart = (startPos*GST_MSECOND);
+        if ( !gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &(mCtx->lastpos) ) )
+        {
+            DEBUG_ERR("WARNING: could not get position from GST")
+        }
+        DEBUG_INFO_A1("current head position %"GST_TIME_FORMAT"",GST_TIME_ARGS(mCtx->lastpos));
+        mCtx->loopingenabled = XA_BOOLEAN_TRUE;
+        XAMediaPlayerAdapt_UpdatePositionCbTimer(mCtx);
+    }
+    else
+    {
+        DEBUG_INFO("Disable looping");
+        mCtx->loopstart = 0;
+        mCtx->loopend = (gint64)GST_CLOCK_TIME_NONE;
+        mCtx->loopingenabled = XA_BOOLEAN_FALSE;
+        XAMediaPlayerAdapt_UpdatePositionCbTimer(mCtx);
+    }
+
+    DEBUG_API("<-XASeekItfAdapt_SetLoop");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaseekitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XASEEKITFADAPTATION_H
+#define XASEEKITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xadebug.h"
+
+/* FUNCTIONS */
+
+XAresult XASeekItfAdapt_SetPosition(XAAdaptationGstCtx *ctx, XAmillisecond pos,
+                                        XAuint32 seekMode);
+
+XAresult XASeekItfAdapt_SetLoop(XAAdaptationGstCtx *ctx, XAboolean loopEnable,
+                                XAmillisecond startPos, XAmillisecond endPos);
+#endif /* XASEEKITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xasnapshotitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,891 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <string.h>
+#include <gst.h>
+#include <gstappsrc.h>
+#include <gstappsink.h>
+#include "xaadaptationgst.h"
+#include "xasnapshotitfadaptation.h"
+#include "xamediarecorderadaptctx.h"
+#include "xametadataadaptation.h"
+#include "xacameraadaptctx.h"
+#include "xacapabilitiesmgr.h"
+
+#define SSMAXPIC 30
+#define SSMAXFPS 30 /*technically, same as FPS of video stream*/
+#define SSMINFPS 1
+
+extern XAboolean cameraRealized;
+extern XACameraAdaptationCtx_* cameraCtx;
+
+/* Forward declarations for internal methods */
+XAresult XASnapshotItfAdaptation_CreateSnapshotPipeline(XAAdaptationGstCtx* bCtx);
+XAresult XASnapshotItfAdaptation_FreeSnapshot(XAAdaptationGstCtx* bCtx);
+const char* XASnapshotItfAdaptation_GetFileSuffix(XADataFormat_MIME* format);
+void XASnapshotItfAdaptation_AllocNextFilename(char** fname, const char* template);
+void XASnapshotItfAdaptation_StopSnapshotting(XAAdaptationGstCtx* bCtx);
+
+/* callbacks */
+gboolean XASnapshotItfAdaptation_SnapshotBusCb( GstBus *bus, GstMessage *message, gpointer data );
+void XASnapshotItfAdaptation_BufferHandoffCb( GstElement *extract, GstBuffer *buffer, gpointer data);
+
+/*********************************
+ * SnapshotItf adaptation methods
+ *********************************/
+
+/*
+ * XAresult XASnapshotItfAdaptation_InitiateSnapshot(XAAdaptationGstCtx* bCtx,
+ *                                                 XAuint32 numberOfPictures,
+ *                                                 XAuint32 fps,
+ *                                                 XAboolean freezeViewFinder,
+ *                                                 XADataSink* sink)
+ */
+XAresult XASnapshotItfAdaptation_InitiateSnapshot(XAAdaptationGstCtx* bCtx,
+                                                  XAuint32 numberOfPictures,
+                                                  XAuint32 fps,
+                                                  XAboolean freezeViewFinder,
+                                                  XADataSink* sink)
+{
+    XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)bCtx;
+    XADataLocator_URI* uri=NULL;
+
+    DEBUG_API("->XASnapshotItfAdaptation_InitiateSnapshot");
+    /* Store initialization variables */
+    mCtx->snapshotVars.numpics = numberOfPictures;
+    mCtx->snapshotVars.fps = fps;
+    mCtx->snapshotVars.freeze =freezeViewFinder;
+    mCtx->snapshotVars.parsenegotiated = FALSE;
+    mCtx->snapshotVars.snapshotbuffer = NULL;
+
+    if( sink )
+    {   /* parse file sink name*/
+        if( sink->pLocator && *((XAuint32*)(sink->pLocator)) == XA_DATALOCATOR_URI )
+        {
+            uri = (XADataLocator_URI*)sink->pLocator;
+            if ( uri->URI != NULL )
+            {
+                /* parse filename template: <prefix><nnnn><suffix> */
+                mCtx->snapshotVars.fnametemplate = (char*)calloc(1,strlen((char*)uri->URI)+10);
+                DEBUG_INFO_A1("URI: %s", uri->URI);
+                if(strncmp((char*)uri->URI, "file://", 7) == 0)
+                {
+                    strcat(mCtx->snapshotVars.fnametemplate, (char*)&((uri->URI)[7]));
+                }
+                else
+                {
+                    strcat(mCtx->snapshotVars.fnametemplate, (char*)uri->URI);
+                }
+                strcat(mCtx->snapshotVars.fnametemplate, "%04d.");
+                strcat(mCtx->snapshotVars.fnametemplate,
+                        XASnapshotItfAdaptation_GetFileSuffix(sink->pFormat));
+                DEBUG_INFO_A1("->template name %s", mCtx->snapshotVars.fnametemplate);
+            }
+            else
+            {
+                DEBUG_ERR("No uri specified.");
+                return XA_RESULT_PARAMETER_INVALID;
+            }
+        }
+        else
+        { /* take snapshot to memory buffer */
+            if( mCtx->snapshotVars.fnametemplate )
+            {
+                free( mCtx->snapshotVars.fnametemplate );
+            }
+            mCtx->snapshotVars.fnametemplate = NULL;
+        }
+        if( sink->pFormat && *((XAuint32*)(sink->pFormat)) == XA_DATAFORMAT_RAWIMAGE )
+        {
+            XADataFormat_RawImage* img = ((XADataFormat_RawImage*)sink->pFormat);
+            /*set needed image settings from the sink structure*/
+            mCtx->imageEncSettings.encoderId = XA_IMAGECODEC_RAW;
+            mCtx->imageEncSettings.width = img->width;
+            mCtx->imageEncSettings.height = img->height;
+            mCtx->imageEncSettings.colorFormat = img->colorFormat;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("XASnapshotItfAdaptation_InitiateSnapshot, invalid data sink!");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASnapshotItfAdaptation_InitiateSnapshot");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+
+    if( mCtx->snapshotVars.sspipeline )
+    {
+        XASnapshotItfAdaptation_FreeSnapshot(bCtx);
+    }
+    if( XASnapshotItfAdaptation_CreateSnapshotPipeline(bCtx) != XA_RESULT_SUCCESS )
+    {
+        DEBUG_ERR("Failed to create pipeline!!");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XASnapshotItfAdaptation_InitiateSnapshot");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_API("<-XASnapshotItfAdaptation_InitiateSnapshot");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XASnapshotItfAdaptation_TakeSnapshot(XAAdaptationGstCtx* bCtx)
+ */
+XAresult XASnapshotItfAdaptation_TakeSnapshot(XAAdaptationGstCtx* bCtx)
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+
+    DEBUG_API("->XASnapshotItfAdaptation_TakeSnapshot");
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASnapshotItfAdaptation_TakeSnapshot");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*)bCtx;
+    /*to get buffer, base pipeline must be playing...*/
+    if( GST_STATE(mCtx->baseObj.bin) != GST_STATE_PLAYING )
+    {
+        DEBUG_INFO_A1("Parent bin in state %d, set to PLAYING", GST_STATE(mCtx->baseObj.bin));
+        gst_element_set_state( GST_ELEMENT(mCtx->baseObj.bin), GST_STATE_PLAYING );
+        gst_element_get_state( GST_ELEMENT(mCtx->baseObj.bin), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+    }
+    if ( mCtx->isobjvsrc && mCtx->videosource && cameraCtx && cameraRealized )
+    {
+    	GstPad *pad=NULL;
+    	GstPad *pad1=NULL;
+
+    	cameraCtx->snapshotting = XA_BOOLEAN_TRUE;
+    	pad = gst_element_get_static_pad( GST_ELEMENT(cameraCtx->baseObj.bin), "MRObjSrc");
+		if( pad && gst_pad_is_linked(pad) )
+		{
+			DEBUG_INFO_A2("unblock element:%s pad:%s",
+					gst_element_get_name(cameraCtx->baseObj.bin),
+					gst_pad_get_name(pad));
+			gst_pad_set_blocked_async(pad, FALSE, XAAdaptationGst_PadBlockCb, NULL);
+		}
+
+    	pad1 = gst_element_get_static_pad( GST_ELEMENT(cameraCtx->baseObj.bin), "MPObjSrc");
+		if( pad1 && gst_pad_is_linked(pad1) )
+		{
+			DEBUG_INFO_A2("unblock element:%s pad:%s",
+					gst_element_get_name(cameraCtx->baseObj.bin),
+					gst_pad_get_name(pad1));
+			gst_pad_set_blocked_async(pad, FALSE, XAAdaptationGst_PadBlockCb, NULL);
+		}
+
+    	DEBUG_INFO_A1("Using camera from global pointer %x", cameraCtx);
+    	if ( GST_STATE( GST_ELEMENT(cameraCtx->baseObj.bin)) != GST_STATE_PLAYING )
+		{
+			cameraCtx->baseObj.binWantedState = GST_STATE(cameraCtx->baseObj.bin);
+			DEBUG_INFO_A1("Camerabin state %d, set to PLAYING", GST_STATE(GST_ELEMENT(cameraCtx->baseObj.bin)));
+			gst_element_set_state( GST_ELEMENT(cameraCtx->baseObj.bin), GST_STATE_PLAYING );
+			gst_element_get_state( GST_ELEMENT(cameraCtx->baseObj.bin), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+		}
+	}
+
+    /* Connect signal for getting current buffer from video pipeline*/
+    mCtx->snapshotVars.numpicstaken = 0;
+    mCtx->snapshotVars.waitforbuffer = TRUE;
+    if(mCtx->videoextract)
+    {
+        mCtx->snapshotVars.sighandler = g_signal_connect(mCtx->videoextract, "handoff",
+                                G_CALLBACK (XASnapshotItfAdaptation_BufferHandoffCb),mCtx);
+    }
+    if( mCtx->snapshotVars.sighandler==0 )
+    {
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XASnapshotItfAdaptation_TakeSnapshot");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_API("<-XASnapshotItfAdaptation_TakeSnapshot");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XASnapshotItfAdaptation_CancelSnapshot(XAAdaptationGstCtx* bCtx)
+ */
+XAresult XASnapshotItfAdaptation_CancelSnapshot(XAAdaptationGstCtx* bCtx)
+{
+    DEBUG_API("->XASnapshotItfAdaptation_CancelSnapshot");
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASnapshotItfAdaptation_CancelSnapshot");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    XASnapshotItfAdaptation_FreeSnapshot(bCtx);
+
+    DEBUG_API("<-XASnapshotItfAdaptation_CancelSnapshot");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XASnapshotItfAdaptation_GetMaxPicsPerBurst(XAAdaptationGstCtx* bCtx,
+ *                                              XAuint32 *maxNumberOfPictures)
+ */
+XAresult XASnapshotItfAdaptation_GetMaxPicsPerBurst(XAAdaptationGstCtx* bCtx,
+                                              XAuint32 *maxNumberOfPictures)
+{
+    DEBUG_API("->XASnapshotItfAdaptation_GetMaxPicsPerBurst");
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASnapshotItfAdaptation_GetMaxPicsPerBurst");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    *maxNumberOfPictures = SSMAXPIC;
+    DEBUG_API("<-XASnapshotItfAdaptation_GetMaxPicsPerBurst");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XASnapshotItfAdaptation_GetBurstFPSRange(XAAdaptationGstCtx* bCtx,
+ *                                            XAuint32 *minFPS,
+ *                                           XAuint32 *maxFPS)
+ */
+XAresult XASnapshotItfAdaptation_GetBurstFPSRange(XAAdaptationGstCtx* bCtx,
+                                            XAuint32 *minFPS,
+                                            XAuint32 *maxFPS)
+{
+    DEBUG_API("->XASnapshotItfAdaptation_GetBurstFPSRange");
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation )
+        {
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASnapshotItfAdaptation_GetBurstFPSRange");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+    *minFPS = SSMINFPS;
+    *maxFPS = SSMAXFPS;
+
+    DEBUG_API("<-XASnapshotItfAdaptation_GetBurstFPSRange");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XASnapshotItfAdaptation_SetShutterFeedback(XAAdaptationGstCtx* bCtx,
+ *                                              XAboolean enabled)
+ */
+XAresult XASnapshotItfAdaptation_SetShutterFeedback(XAAdaptationGstCtx* bCtx,
+                                              XAboolean enabled)
+{
+    DEBUG_API("->XASnapshotItfAdaptation_SetShutterFeedback");
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASnapshotItfAdaptation_SetShutterFeedback");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    /* stubbed, no implementation */
+    DEBUG_API("<-XASnapshotItfAdaptation_SetShutterFeedback");
+    return XA_RESULT_SUCCESS;
+}
+
+/********************
+ * Internal methods
+ ********************/
+
+/*
+ * void XASnapshotItfAdaptation_StopSnapshotting(XAAdaptationGstCtx* bCtx)
+ */
+void XASnapshotItfAdaptation_StopSnapshotting(XAAdaptationGstCtx* bCtx)
+{
+    XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+    DEBUG_API("->XASnapshotItfAdaptation_StopSnapshotting");
+    mCtx->snapshotVars.waitforbuffer = FALSE;
+    mCtx->snapshotVars.snapshotbuffer = NULL;
+    if(mCtx->snapshotVars.sighandler)
+    {
+        if(mCtx->videoextract)
+        {
+            g_signal_handler_disconnect(mCtx->videoextract,mCtx->snapshotVars.sighandler);
+        }
+        mCtx->snapshotVars.sighandler = 0;
+    }
+    /* did we change the state of parent pipeline?*/
+    if( mCtx->baseObj.bin && (GST_STATE(mCtx->baseObj.bin) != mCtx->baseObj.binWantedState) )
+    {
+        gst_element_set_state( GST_ELEMENT(mCtx->baseObj.bin), mCtx->baseObj.binWantedState );
+    }
+
+    if ( cameraCtx && (GST_STATE(cameraCtx->baseObj.bin) != cameraCtx->baseObj.binWantedState) )
+	{
+    	cameraCtx->snapshotting = XA_BOOLEAN_FALSE;
+		DEBUG_INFO_A2("Camerabin state %d, restored to %d", GST_STATE(cameraCtx->baseObj.bin), cameraCtx->baseObj.binWantedState );
+		gst_element_set_state( GST_ELEMENT(cameraCtx->baseObj.bin), cameraCtx->baseObj.binWantedState );
+		gst_element_get_state( GST_ELEMENT(cameraCtx->baseObj.bin), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+	}
+    DEBUG_API("<-XASnapshotItfAdaptation_StopSnapshotting");
+}
+
+/*
+ * XAresult XASnapshotItfAdaptation_FreeSnapshot(XAAdaptationGstCtx* bCtx)
+ */
+XAresult XASnapshotItfAdaptation_FreeSnapshot(XAAdaptationGstCtx* bCtx)
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    DEBUG_API("->XASnapshotItfAdaptation_FreeSnapshot");
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XASnapshotItfAdaptation_FreeSnapshot");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+    XASnapshotItfAdaptation_StopSnapshotting(bCtx);
+    /* Clean up pipeline and set current pipeline state to null*/
+    if( mCtx->snapshotVars.sspipeline )
+    {
+        gst_element_set_state( GST_ELEMENT(mCtx->snapshotVars.sspipeline), GST_STATE_NULL );
+        gst_object_unref( GST_OBJECT(mCtx->snapshotVars.sspipeline) );
+        mCtx->snapshotVars.sspipeline = NULL;
+    }
+    if( mCtx->snapshotVars.ssbus )
+    {
+        gst_object_unref( GST_OBJECT(mCtx->snapshotVars.ssbus) );
+        mCtx->snapshotVars.ssbus = NULL;
+    }
+    if( mCtx->snapshotVars.fnametemplate )
+    {
+        free(mCtx->snapshotVars.fnametemplate);
+        mCtx->snapshotVars.fnametemplate=NULL;
+    }
+    DEBUG_API("<-XASnapshotItfAdaptation_FreeSnapshot");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XASnapshotItfAdaptation_CreateSnapshotPipeline(XAAdaptationGstCtx* bCtx)
+ */
+XAresult XASnapshotItfAdaptation_CreateSnapshotPipeline(XAAdaptationGstCtx* bCtx)
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+
+    XACapabilities temp;
+    GstCaps *imageCaps=NULL;
+
+    DEBUG_API("->XASnapshotItfAdaptation_CreateSnapshotPipeline");
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+    /*Create snapshotpipeline*/
+    mCtx->snapshotVars.sspipeline = gst_pipeline_new ("sspipeline");
+    if( mCtx->snapshotVars.sspipeline  )
+    {
+        /*add listener*/
+        mCtx->snapshotVars.ssbus = gst_pipeline_get_bus(GST_PIPELINE( mCtx->snapshotVars.sspipeline ) );
+        if( ! mCtx->snapshotVars.ssbus )
+        {
+            DEBUG_API("Cannot create snapshotbus");
+            DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        gst_bus_add_signal_watch( mCtx->snapshotVars.ssbus );
+        g_signal_connect(mCtx->snapshotVars.ssbus, "message::eos",
+                G_CALLBACK(XASnapshotItfAdaptation_SnapshotBusCb), bCtx );
+        g_signal_connect(mCtx->snapshotVars.ssbus, "message::state-changed",
+                G_CALLBACK(XASnapshotItfAdaptation_SnapshotBusCb), bCtx );
+        g_signal_connect(mCtx->snapshotVars.ssbus, "message::async-done",
+                G_CALLBACK(XASnapshotItfAdaptation_SnapshotBusCb), bCtx );
+
+        /*Create snapshotsource element*/
+        mCtx->snapshotVars.ssbuffersrc = gst_element_factory_make("appsrc", "ssbuffersrc");
+        if( !mCtx->snapshotVars.ssbuffersrc )
+        {
+            DEBUG_ERR("Cannot create ssbuffersrc!");
+            DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        /*Frame parser*/
+        mCtx->snapshotVars.ssparser =
+            gst_element_factory_make("videoparse","ssparser");
+        if( !mCtx->snapshotVars.ssparser )
+        {
+            DEBUG_ERR("Could not create snapshotparse");
+            DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        /*Scaler and filter for XAImageSettings width&height*/
+        mCtx->snapshotVars.ssscaler =
+            gst_element_factory_make("videoscale","ssscaler");
+        if( !mCtx->snapshotVars.ssscaler )
+        {
+            DEBUG_ERR("Could not create ssscaler");
+            DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        mCtx->snapshotVars.ssfilter =
+            gst_element_factory_make("capsfilter","ssfilter");
+        if( !mCtx->snapshotVars.ssfilter )
+        {
+            DEBUG_ERR("Could not create ssfilter");
+            DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        /*Create imageencoder */
+        if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE), mCtx->imageEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS)
+        {
+            if(temp.adaptId != NULL)
+            {
+                mCtx->snapshotVars.ssencoder = gst_element_factory_make((char*)temp.adaptId, "ssencoder");
+            }
+            else if(mCtx->imageEncSettings.encoderId == XA_IMAGECODEC_RAW)
+            {
+                /* raw frames are internal format, so no codec needed. just insert identity for linking*/
+               mCtx->snapshotVars.ssencoder = gst_element_factory_make("identity", "ssencoder");
+            }
+        }
+        if( !mCtx->snapshotVars.ssencoder )
+        {
+            DEBUG_API("Cannot create image encoder");
+            DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        /* Create also tag setter for JPG */
+        if(mCtx->imageEncSettings.encoderId == XA_IMAGECODEC_JPEG)
+        {
+            mCtx->snapshotVars.sstagger = gst_element_factory_make("metadatamux", "sstagger");
+            if( !mCtx->snapshotVars.sstagger || !gst_bin_add(GST_BIN(mCtx->snapshotVars.sspipeline),mCtx->snapshotVars.sstagger))
+            {
+                DEBUG_API("Cannot create metadatamux");
+                DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            }
+            g_object_set( G_OBJECT(mCtx->snapshotVars.sstagger), "xmp", TRUE, "exif", TRUE, "iptc", TRUE, NULL );
+        }
+
+        /*Create sink*/
+        if(mCtx->snapshotVars.fnametemplate)
+        {
+            DEBUG_INFO("RECORD SNAPSHOT TO FILE");
+            mCtx->snapshotVars.sssink = gst_element_factory_make("filesink","ssfilesink");
+            g_object_set( G_OBJECT(mCtx->snapshotVars.sssink), "location", "temp",
+                                                                "async", FALSE,
+                                                                "qos", FALSE,
+                                                                "max-lateness", (gint64)(-1),
+                                                                "buffer-mode", 2,
+                                                                NULL );
+        }
+        else
+        {
+            DEBUG_INFO("RECORD SNAPSHOT TO MEMORY");
+            mCtx->snapshotVars.sssink = gst_element_factory_make("appsink","ssbuffersink");
+        }
+        if( !mCtx->snapshotVars.sssink )
+        {
+            DEBUG_ERR("Could not create sssink!!");
+            DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        g_object_set( G_OBJECT(mCtx->snapshotVars.sssink), "async", FALSE, NULL );
+
+        /*Add elements to bin*/
+        gst_bin_add_many (GST_BIN (mCtx->snapshotVars.sspipeline),
+                mCtx->snapshotVars.ssbuffersrc,
+                mCtx->snapshotVars.ssparser,
+                mCtx->snapshotVars.ssscaler,
+                mCtx->snapshotVars.ssfilter,
+                mCtx->snapshotVars.ssencoder,
+                mCtx->snapshotVars.sssink,
+                NULL);
+
+        /* set needed XAImageSettings properties*/
+        /* set caps from imagesettings */
+        imageCaps = gst_caps_new_simple("video/x-raw-yuv",
+                                        "width", G_TYPE_INT, mCtx->imageEncSettings.width,
+                                        "height", G_TYPE_INT, mCtx->imageEncSettings.height, NULL);
+        g_object_set( G_OBJECT(mCtx->snapshotVars.ssfilter), "caps", imageCaps, NULL );
+        DEBUG_INFO_A1("new caps: %s",gst_caps_to_string(imageCaps));
+        gst_caps_unref(imageCaps);
+
+        /* set compression level */
+        if(mCtx->imageEncSettings.encoderId == XA_IMAGECODEC_JPEG)
+        {
+            g_object_set( G_OBJECT(mCtx->snapshotVars.ssencoder), "quality", (gint)(1000 - mCtx->imageEncSettings.compressionLevel)/10, NULL );
+        }
+
+        /*Chain elements together*/
+        if(mCtx->snapshotVars.sstagger)
+        {
+            if( !gst_element_link_many(
+                    mCtx->snapshotVars.ssbuffersrc,
+                    mCtx->snapshotVars.ssparser,
+                    mCtx->snapshotVars.ssscaler,
+                    mCtx->snapshotVars.ssfilter,
+                    mCtx->snapshotVars.ssencoder,
+                    mCtx->snapshotVars.sstagger,
+                    mCtx->snapshotVars.sssink,
+                    NULL) )
+            {
+                DEBUG_ERR("Could not link pipeline")
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+        else
+        {
+            if( !gst_element_link_many(
+                    mCtx->snapshotVars.ssbuffersrc,
+                    mCtx->snapshotVars.ssparser,
+                    mCtx->snapshotVars.ssscaler,
+                    mCtx->snapshotVars.ssfilter,
+                    mCtx->snapshotVars.ssencoder,
+                    mCtx->snapshotVars.sssink,
+                    NULL) )
+            {
+                DEBUG_ERR("Could not link pipeline")
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+        }
+        gst_element_set_state(GST_ELEMENT(mCtx->snapshotVars.sspipeline), GST_STATE_READY);
+        DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline");
+        return XA_RESULT_SUCCESS;
+
+    }
+    else
+    {
+        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+        DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline");
+        return  XA_RESULT_PRECONDITIONS_VIOLATED;
+    }
+}
+
+/*
+ * gboolean XASnapshotItfAdaptation_SnapshotBusCb( GstBus *bus, GstMessage *message, gpointer data )
+ */
+gboolean XASnapshotItfAdaptation_SnapshotBusCb( GstBus *bus, GstMessage *message, gpointer data )
+{
+    XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)data;
+
+    GstState oldstate = GST_STATE_NULL , newstate = GST_STATE_NULL , pendingstate = GST_STATE_NULL;
+
+    /* only interested in messages from snapshot pipeline */
+    if( GST_MESSAGE_SRC(message) == GST_OBJECT(mCtx->snapshotVars.sspipeline) )
+    {
+        DEBUG_API_A2("->XASnapshotItfAdaptation_SnapshotBusCb:\"%s\" from object \"%s\"",
+                GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+
+        switch( GST_MESSAGE_TYPE(message))
+        {
+            case GST_MESSAGE_EOS:
+            {
+                if( gst_element_set_state(GST_ELEMENT(mCtx->snapshotVars.sspipeline), GST_STATE_READY)
+                        == GST_STATE_CHANGE_FAILURE )
+                {
+                    DEBUG_ERR("Error stopping snapshot pipeline!!!");
+                }
+                gst_element_get_state(mCtx->snapshotVars.sspipeline, NULL, NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+
+                DEBUG_INFO_A2("Requested %lu snapshots, taked %lu",mCtx->snapshotVars.numpics,mCtx->snapshotVars.numpicstaken+1);
+                if( ++mCtx->snapshotVars.numpicstaken >= mCtx->snapshotVars.numpics )
+                {
+                    XAAdaptEvent takenevent = {XA_SNAPSHOTITFEVENTS, XA_ADAPT_SNAPSHOT_TAKEN, 0, NULL };
+                    DEBUG_INFO("Snapshot burst finished");
+                    XASnapshotItfAdaptation_StopSnapshotting(&(mCtx->baseObj));
+                    if( mCtx->snapshotVars.fnametemplate == NULL )
+                    {   /* non-datasink snapshot, return buffer */
+                        GstBuffer* pullBuffer = NULL;
+                        XADataSink* pullSink = NULL;
+                        XADataLocator_Address* pullSinkLoc = NULL;
+                        DEBUG_INFO("Get buffer from appsink");
+                        pullBuffer = gst_app_sink_pull_preroll( GST_APP_SINK(mCtx->snapshotVars.sssink) );
+                        /* allocate XADataSink, client should release this later*/
+                        pullSink = (XADataSink*)calloc(1, sizeof(XADataSink));
+                        pullSinkLoc = (XADataLocator_Address*)calloc(1, sizeof(XADataLocator_Address));
+                        pullSinkLoc->length = pullBuffer->size;
+                        pullSinkLoc->pAddress = (XADataLocator_Address*)calloc(1, pullBuffer->size);
+                        memcpy(pullSinkLoc->pAddress, pullBuffer->data, pullBuffer->size);
+                        pullSinkLoc->locatorType = XA_DATALOCATOR_ADDRESS;
+                        pullSink->pLocator = pullSinkLoc;
+                        pullSink->pFormat = NULL;
+                        takenevent.data = pullSink;
+                    }
+                    /* send needed events */
+                    takenevent.datasize = mCtx->snapshotVars.numpicstaken;
+                    XAAdaptationBase_SendAdaptEvents(&(mCtx->baseObj.baseObj), &takenevent );
+                }
+                else
+                {
+                    /* videoparse element can not handle renegotiation of stream for new buffer
+                     * after EOS, so recreate it */
+                    gst_element_unlink_many(
+                            mCtx->snapshotVars.ssbuffersrc,
+                            mCtx->snapshotVars.ssparser,
+                            mCtx->snapshotVars.ssscaler,
+                            NULL);
+                    gst_element_set_state(GST_ELEMENT(mCtx->snapshotVars.ssparser), GST_STATE_NULL);
+                    gst_bin_remove(GST_BIN (mCtx->snapshotVars.sspipeline),mCtx->snapshotVars.ssparser);
+                    mCtx->snapshotVars.ssparser = gst_element_factory_make("videoparse", "ssparser");
+                    if( !mCtx->snapshotVars.ssparser )
+                    {
+                        DEBUG_ERR("Cannot create ssparser!");
+                        DEBUG_API("<-XASnapshotItfAdaptation_CreateSnapshotPipeline - XA_RESULT_INTERNAL_ERROR");
+                        return XA_RESULT_INTERNAL_ERROR;
+                    }
+                    gst_bin_add(GST_BIN (mCtx->snapshotVars.sspipeline),mCtx->snapshotVars.ssparser);
+                    if( !gst_element_link_many(
+                            mCtx->snapshotVars.ssbuffersrc,
+                            mCtx->snapshotVars.ssparser,
+                            mCtx->snapshotVars.ssscaler,
+                            NULL) )
+                    {
+                        DEBUG_ERR("Could not link pipeline")
+                        return XA_RESULT_INTERNAL_ERROR;
+                    }
+                    mCtx->snapshotVars.parsenegotiated = FALSE;
+
+                    /*now, wait for new buffer to arrive*/
+                    DEBUG_INFO("Wait for more pictures");
+                    mCtx->snapshotVars.waitforbuffer = TRUE;
+                    mCtx->snapshotVars.sighandler = g_signal_connect(mCtx->videoextract, "handoff",
+                                            G_CALLBACK (XASnapshotItfAdaptation_BufferHandoffCb),mCtx);
+                }
+                break;
+            }
+            case GST_MESSAGE_STATE_CHANGED:
+            {
+                gst_message_parse_state_changed(message, &oldstate, &newstate, &pendingstate);
+                DEBUG_INFO_A4("old %s -> new %s ( pending %s, gsttarget %s )",
+                        gst_element_state_get_name(oldstate),
+                        gst_element_state_get_name(newstate),
+                        gst_element_state_get_name(pendingstate),
+                        gst_element_state_get_name(GST_STATE_TARGET(mCtx->snapshotVars.sspipeline)) );
+                if( newstate==GST_STATE_READY && oldstate==GST_STATE_NULL )
+                {
+                    XAAdaptEvent initevent = {XA_SNAPSHOTITFEVENTS, XA_ADAPT_SNAPSHOT_INITIATED,0, NULL };
+                    DEBUG_INFO("Init complete");
+                    /* send needed events */
+                    XAAdaptationBase_SendAdaptEvents( &(mCtx->baseObj.baseObj), &initevent);
+                }
+                else if( newstate==GST_STATE_PLAYING && oldstate==GST_STATE_PAUSED && mCtx->snapshotVars.snapshotbuffer )
+                {
+                    DEBUG_INFO("Pushing buffer");
+                    gst_app_src_push_buffer( GST_APP_SRC(mCtx->snapshotVars.ssbuffersrc),
+                                             mCtx->snapshotVars.snapshotbuffer );
+                    DEBUG_INFO_A1("Sent buffer at 0x%x to  ssbuffersrc", (int)mCtx->snapshotVars.snapshotbuffer );
+                    gst_app_src_end_of_stream( GST_APP_SRC(mCtx->snapshotVars.ssbuffersrc) );
+                    mCtx->snapshotVars.snapshotbuffer = NULL;
+                    DEBUG_INFO("Sent EOS ssbuffersrc");
+                }
+
+                break;
+            }
+            default:
+                break;
+        }
+        DEBUG_API("<-XASnapshotItfAdaptation_SnapshotBusCb");
+    }
+    return TRUE;
+}
+
+/*
+ * void XASnapshotItfAdaptation_BufferHandoffCb( GstElement *extract, GstBuffer  *buffer, gpointer data )
+ */
+void XASnapshotItfAdaptation_BufferHandoffCb( GstElement *extract, GstBuffer  *buffer, gpointer data )
+{
+    XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)data;
+    gint32 width=0, height=0;
+    guint32  fourcc=0, formatnum=0;
+    GstPad* srcPad=NULL;
+    GstCaps* srcPadCaps=NULL;
+    GstStructure* capS=NULL;
+    XAAdaptEvent event = {XA_SNAPSHOTITFEVENTS, XA_ADAPT_SNAPSHOT_TAKEN, 0, NULL };
+    char* fname=NULL;
+
+    DEBUG_API("->XASnapshotItfAdaptation_BufferHandoffCb");
+    if( !mCtx->snapshotVars.waitforbuffer ||
+        !GST_IS_BUFFER(buffer) )
+    {   /* pass on... */
+        DEBUG_API("<-XASnapshotItfAdaptation_BufferHandoffCb");
+        return;
+    }
+
+    if(mCtx->snapshotVars.snapshotbuffer)
+    {
+        DEBUG_INFO("WARNING: snapshotbuffer already exists!!");
+        gst_buffer_unref(GST_BUFFER(mCtx->snapshotVars.snapshotbuffer));
+    }
+    DEBUG_INFO("Receiced snapshotbuffer");
+    mCtx->snapshotVars.snapshotbuffer = gst_buffer_copy(buffer);
+    mCtx->snapshotVars.waitforbuffer = FALSE;
+    g_signal_handler_disconnect(mCtx->videoextract,mCtx->snapshotVars.sighandler);
+    mCtx->snapshotVars.sighandler = 0;
+
+    if( GST_STATE(mCtx->snapshotVars.sspipeline)==GST_STATE_READY )
+    {
+        if( !(mCtx->snapshotVars.parsenegotiated) )
+        {
+            /*read relevant caps of extraction source and set them to videoparse*/
+            srcPad = gst_element_get_pad( GST_ELEMENT(extract), "src");
+            srcPadCaps = gst_pad_get_negotiated_caps( GST_PAD(srcPad) );
+            capS = gst_caps_get_structure(srcPadCaps,0);
+            DEBUG_INFO_A1("buffer caps from extraction source: %s",gst_caps_to_string(srcPadCaps));
+            if( !gst_structure_get_int(capS,"width",&width) ||
+                !gst_structure_get_int(capS,"height",&height) ||
+                !gst_structure_get_fourcc(capS,"format",&fourcc) )
+            {
+                DEBUG_ERR("ERROR! Missing crucial capabilities for buffer!!");
+                DEBUG_API("<-XASnapshotItfAdaptation_BufferHandoffCb");
+                return;
+            }
+            /* convert fourcc to videoparse enumeration */
+            switch(fourcc)
+            {
+                case GST_MAKE_FOURCC('I','4','2','0'):
+                    formatnum = 0;
+                    break;
+                case GST_MAKE_FOURCC('Y','V','1','2'):
+                    formatnum = 1;
+                    break;
+                case GST_MAKE_FOURCC('Y','U','Y','2'):
+                    formatnum = 2;
+                    break;
+                case GST_MAKE_FOURCC('U','Y','V','Y'):
+                    formatnum = 3;
+                    break;
+                case GST_MAKE_FOURCC('R','G','B',' '):
+                    formatnum = 10;
+                    break;
+                case GST_MAKE_FOURCC('G','R','A','Y'):
+                    formatnum = 11;
+                    break;
+                default:
+                    formatnum = 0;
+                    break;
+            }
+            /* set source width and height for parser */
+            g_object_set(mCtx->snapshotVars.ssparser,"width",width,"height",height,"format",formatnum,NULL);
+            mCtx->snapshotVars.parsenegotiated = TRUE;
+        }
+        if(mCtx->snapshotVars.fnametemplate)
+        {   /* get actual filename from template */
+            XASnapshotItfAdaptation_AllocNextFilename(&fname, mCtx->snapshotVars.fnametemplate);
+            DEBUG_INFO_A1("start taking snapshot (%s)", fname);
+            gst_element_set_state(GST_ELEMENT(mCtx->snapshotVars.sssink), GST_STATE_NULL);
+            g_object_set( G_OBJECT(mCtx->snapshotVars.sssink), "location", fname,
+                                                                "async", FALSE,
+                                                                "qos", FALSE,
+                                                                "max-lateness", (gint64)(-1),
+                                                                NULL );
+            gst_element_sync_state_with_parent(mCtx->snapshotVars.sssink);
+            gst_element_get_state(mCtx->snapshotVars.sssink, NULL, NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+            free(fname);
+        }
+        else
+        {   /* take snapshot to buffer */
+            DEBUG_INFO("start taking snapshot (memory buffer used)");
+        }
+        /* write metadata, if any */
+        XAMetadataAdapt_TryWriteTags(&(mCtx->baseObj), GST_BIN(mCtx->snapshotVars.sspipeline));
+        /* start buffering */
+        if( gst_element_set_state(GST_ELEMENT(mCtx->snapshotVars.sspipeline), GST_STATE_PLAYING )
+                == GST_STATE_CHANGE_FAILURE )
+        {
+            DEBUG_ERR("Error taking picture!!!");
+            /* NOTE: no event for errors in snapshotitf!!! */
+            event.datasize = mCtx->snapshotVars.numpicstaken;
+            XAAdaptationBase_SendAdaptEvents(&(mCtx->baseObj.baseObj), &event );
+        }
+    }
+    else
+    {
+        DEBUG_INFO_A1("warning: sspipeline in wrong state (%d)",
+                        GST_STATE(mCtx->snapshotVars.sspipeline));
+    }
+    DEBUG_API("<-XASnapshotItfAdaptation_BufferHandoffCb");
+}
+
+/*
+ * const char* XASnapshotItfAdaptation_GetFileSuffix(XADataFormat_MIME* format)
+ */
+const char* XASnapshotItfAdaptation_GetFileSuffix(XADataFormat_MIME* format)
+{
+    const char* ret=NULL;
+    if( format )
+    {
+        if( *(XAuint32*)format == XA_DATAFORMAT_MIME )
+        {
+            switch (format->containerType)
+            {
+                case XA_CONTAINERTYPE_JPG:
+                    ret = "jpg";
+                    break;
+                case XA_CONTAINERTYPE_RAW:
+                    ret = "raw";
+                    break;
+                case XA_CONTAINERTYPE_BMP:
+                    ret = "bmp";
+                    break;
+                default:
+                    break;
+            }
+            if(!ret)
+            { /*parse from mimetype*/
+                if(format->mimeType)
+                {
+                    ret = strrchr((char*)format->mimeType,'/');
+                    if (ret)
+                    {
+                        ret++;
+                    }
+                }
+            }
+        }
+        else if( *(XAuint32*)format == XA_DATAFORMAT_RAWIMAGE )
+        {
+            ret = "raw";
+        }
+    }
+    if(!ret)
+    {
+        ret="jpg"; /*default*/
+    }
+    return ret;
+}
+
+/*
+ * void XASnapshotItfAdaptation_AllocNextFilename(char** fname, const char* template)
+ */
+void XASnapshotItfAdaptation_AllocNextFilename(char** fname, const char* template)
+{
+    XAuint32 idx=0;
+    XAboolean found=XA_BOOLEAN_FALSE;
+    FILE* file=NULL;
+    *fname = (char*)calloc(1,strlen(template)+10);
+    while(!found)
+    {
+        sprintf(*fname, template, idx++ );
+        strcat(*fname, "\0");
+        file = fopen(*fname, "r");
+        if(file==NULL)
+        {
+            found = XA_BOOLEAN_TRUE;
+            break;
+        }
+        fclose(file);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xasnapshotitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XSNAPSHOTITFADAPTATION_H
+#define XSNAPSHOTITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+
+/* DEFINES*/
+
+/* MACROS */
+
+/* FUNCTIONS */
+
+XAresult XASnapshotItfAdaptation_InitiateSnapshot(XAAdaptationGstCtx* ctx,
+                                            XAuint32 numberOfPictures,
+                                            XAuint32 fps,
+                                            XAboolean freezeViewFinder,
+                                            XADataSink* sink);
+
+XAresult XASnapshotItfAdaptation_TakeSnapshot(XAAdaptationGstCtx* ctx);
+
+XAresult XASnapshotItfAdaptation_CancelSnapshot(XAAdaptationGstCtx* ctx);
+
+XAresult XASnapshotItfAdaptation_GetMaxPicsPerBurst(XAAdaptationGstCtx* ctx,
+                                              XAuint32 *maxNumberOfPictures);
+
+XAresult XASnapshotItfAdaptation_GetBurstFPSRange(XAAdaptationGstCtx* ctx,
+                                            XAuint32 *minFPS,
+                                            XAuint32 *maxFPS);
+
+XAresult XASnapshotItfAdaptation_SetShutterFeedback(XAAdaptationGstCtx* ctx,
+                                              XAboolean enabled);
+#endif /* XSNAPSHOTITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xastaticcameracapsadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,562 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <gst.h>
+#include <photography.h>
+#include "xaglobals.h"
+#include "xastaticcameracapsadaptation.h"
+#include "xaadptbasectx.h"
+
+#define XACAMERAIMPL_DEFAULT_MAX_ZOOM 16000 /* 16x */
+#define XACAMERAIMPL_DEFAULT_MAX_ISO 1600
+#define XACAMERAIMPL_DEFAULT_MIN_ISO 200
+#define XACAMERAIMPL_DEFAULT_MAX_APERTURE 3200 /* f/32 */
+#define XACAMERAIMPL_DEFAULT_MIN_APERTURE 75   /* f/0.75 */
+
+static XAStaticCameraCapsData allCameraCaps[] =
+{
+#ifdef XA_USE_TEST_PLUGINS
+        { XA_ADAPTID_VIDEOTESTSRC, { (XAchar*)"videotestsrc", 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+#else
+        { XA_ADAPTID_V4L2SRC, { (XAchar*)"v4l2src", 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+#endif
+};
+
+/*forward declaration*/
+XAuint32 XAStaticCameraCaps_IdxFromId(XAuint32 cameraDeviceID);
+
+/*
+ * void XAStaticCameraCaps_Init()
+ */
+void XAStaticCameraCaps_Init()
+{
+    GstElement* element=NULL;
+    GstPhotoCaps photoCaps = GST_PHOTOGRAPHY_CAPS_NONE;
+    GError* gerror=NULL;
+    guint32 i=0;
+    guint32 numDevices = sizeof(allCameraCaps)/sizeof(XAStaticCameraCapsData);
+    gboolean detected = FALSE;
+
+
+    if ( !gst_init_check( NULL, NULL, &gerror ) )
+    {
+        DEBUG_ERR("Gst Initalization failure.");
+        return;
+    }
+    for(i=0;i<numDevices;i++)
+    {
+        /*init values*/
+        allCameraCaps[i].XAcaps.orientation = XA_ORIENTATION_UNKNOWN;
+        allCameraCaps[i].XAcaps.featuresSupported = 0;
+        allCameraCaps[i].XAcaps.exposureModesSupported = 0;
+        allCameraCaps[i].XAcaps.flashModesSupported = 0;
+        allCameraCaps[i].XAcaps.focusModesSupported = 0;
+        allCameraCaps[i].XAcaps.meteringModesSupported = 0;
+        allCameraCaps[i].XAcaps.whiteBalanceModesSupported = 0;
+        allCameraCaps[i].XAcaps.maxWidth = 0;
+        allCameraCaps[i].XAcaps.maxHeight = 0;
+
+        element = gst_element_factory_make((char*)allCameraCaps[i].XAcaps.name,NULL);
+        if(element)
+        {
+            GstPad* srcPad = gst_element_get_static_pad( element, "src");
+            if (srcPad)
+            {
+                guint32 j = 0, cnt = 0, width = 0, height = 0;
+                GstCaps* srcCaps = gst_pad_get_caps( srcPad );
+
+                /* search caps for absolute maximum values */
+                if(srcCaps)
+                {
+                    cnt = gst_caps_get_size( srcCaps );
+                    for( j = 0; j < cnt; j++ )
+                    {
+                        G_CONST_RETURN GValue* value = NULL;
+                        GstStructure* capsStruct = gst_caps_get_structure( srcCaps, j );
+
+                        if(capsStruct)
+                        {
+                            value = gst_structure_get_value( capsStruct, "width" );
+                            if (GST_VALUE_HOLDS_INT_RANGE(value))
+                            {
+                                detected = TRUE;
+                                width = gst_value_get_int_range_max( value );
+                                if(width > allCameraCaps[i].XAcaps.maxWidth)
+                                {
+                                    allCameraCaps[i].XAcaps.maxWidth = width;
+                                }
+                            }
+
+                            value = gst_structure_get_value( capsStruct, "height" );
+                            if (GST_VALUE_HOLDS_INT_RANGE(value))
+                            {
+                                detected = TRUE;
+                                height = gst_value_get_int_range_max( value );
+                                if(height > allCameraCaps[i].XAcaps.maxHeight)
+                                {
+                                    allCameraCaps[i].XAcaps.maxHeight = height;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            if(!detected)
+            {
+                DEBUG_ERR("Warn: could not get maxWidth and maxHeight from GST!!");
+                allCameraCaps[i].XAcaps.maxWidth = 0x7FFFFFFF;
+                allCameraCaps[i].XAcaps.maxHeight =  0x7FFFFFFF;
+            }
+
+            if(GST_IS_PHOTOGRAPHY(element))
+            {
+                photoCaps = gst_photography_get_capabilities(GST_PHOTOGRAPHY(element));
+                if( photoCaps & GST_PHOTOGRAPHY_CAPS_FLASH )
+                {
+                    allCameraCaps[i].XAcaps.featuresSupported |= XA_CAMERACAP_FLASH;
+                    allCameraCaps[i].XAcaps.flashModesSupported = XA_CAMERA_FLASHMODE_OFF |
+                                                       XA_CAMERA_FLASHMODE_ON |
+                                                       XA_CAMERA_FLASHMODE_AUTO |
+                                                       XA_CAMERA_FLASHMODE_REDEYEREDUCTION |
+                                                       XA_CAMERA_FLASHMODE_FILLIN;
+                }
+                if( photoCaps & GST_PHOTOGRAPHY_CAPS_FOCUS )
+                {
+                    allCameraCaps[i].XAcaps.featuresSupported |= XA_CAMERACAP_AUTOFOCUS;
+                    allCameraCaps[i].XAcaps.focusModesSupported = XA_CAMERA_FOCUSMODE_AUTO;
+                }
+                if( photoCaps & GST_PHOTOGRAPHY_CAPS_EXPOSURE )
+                {
+                    allCameraCaps[i].XAcaps.featuresSupported |= XA_CAMERACAP_MANUALEXPOSURE;
+                    allCameraCaps[i].XAcaps.exposureModesSupported = XA_CAMERA_EXPOSUREMODE_AUTO |
+                                                          XA_CAMERA_EXPOSUREMODE_PORTRAIT |
+                                                          XA_CAMERA_EXPOSUREMODE_SPORTS |
+                                                          XA_CAMERA_EXPOSUREMODE_NIGHT;
+                }
+
+                if( photoCaps & GST_PHOTOGRAPHY_CAPS_ISO_SPEED )
+                {
+                    allCameraCaps[i].XAcaps.featuresSupported |= XA_CAMERACAP_MANUALISOSENSITIVITY;
+                }
+                if( photoCaps & GST_PHOTOGRAPHY_CAPS_APERTURE )
+                {
+                    allCameraCaps[i].XAcaps.featuresSupported |= XA_CAMERACAP_MANUALAPERTURE;
+                }
+                if( photoCaps & GST_PHOTOGRAPHY_CAPS_WB_MODE )
+                {
+                    allCameraCaps[i].XAcaps.featuresSupported |= XA_CAMERACAP_AUTOWHITEBALANCE;
+                    allCameraCaps[i].XAcaps.whiteBalanceModesSupported = XA_CAMERA_WHITEBALANCEMODE_AUTO |
+                                                              XA_CAMERA_WHITEBALANCEMODE_SUNLIGHT |
+                                                              XA_CAMERA_WHITEBALANCEMODE_CLOUDY |
+                                                              XA_CAMERA_WHITEBALANCEMODE_TUNGSTEN |
+                                                              XA_CAMERA_WHITEBALANCEMODE_FLUORESCENT |
+                                                              XA_CAMERA_WHITEBALANCEMODE_SUNSET;
+                }
+                if( photoCaps & GST_PHOTOGRAPHY_CAPS_ZOOM )
+                {
+                    allCameraCaps[i].XAcaps.featuresSupported |= XA_CAMERACAP_DIGITALZOOM;
+                }
+            }
+        }
+    }
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetCameraCapabilities(
+ *                       XAuint32* pIndex,
+ *                       XAuint32* pCameraDeviceID,
+ *                       XACameraDescriptor* pDescriptor)
+ *
+ */
+XAresult XAStaticCameraCaps_GetCameraCapabilities(
+                        XAuint32* pIndex,
+                        XAuint32* pCameraDeviceID,
+                        XACameraDescriptor* pDescriptor)
+{
+    guint32 idx = 0;
+    guint32 numDevices = sizeof(allCameraCaps)/sizeof(XAStaticCameraCapsData);
+
+    if(!pDescriptor)
+    {
+        if(pIndex) /* query number of devices */
+        {
+            *pIndex = numDevices;
+            DEBUG_API("<-XAStaticCameraCaps_GetCameraCapabilities");
+            return XA_RESULT_SUCCESS;
+        }
+        else
+        {
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAStaticCameraCaps_GetCameraCapabilities");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+    }
+
+    if( !pIndex && pCameraDeviceID )
+    {
+        /* get index from ID */
+        idx = XAStaticCameraCaps_IdxFromId(*pCameraDeviceID);
+    }
+    else if( pIndex && pCameraDeviceID )
+    {
+        idx = *pIndex;
+    }
+    else
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAStaticCameraCaps_GetCameraCapabilities");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( idx >= numDevices )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAStaticCameraCaps_GetCameraCapabilities");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    else
+    {
+        /*fill capabilities*/
+        memcpy(pDescriptor, &allCameraCaps[idx].XAcaps, sizeof(XACameraDescriptor) );
+        *pCameraDeviceID = allCameraCaps[idx].deviceID;
+    }
+
+    DEBUG_API("<-XAStaticCameraCaps_GetCameraCapabilities");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_QueryFocusRegionPatterns(
+ *                       XAuint32 cameraDeviceID,
+ *                       XAuint32* pPatternID,
+ *                       XAuint32* pFocusPattern,
+ *                       XAuint32* pCustomPoints1,
+ *                       XAuint32* pCustomPoints2)
+ */
+XAresult XAStaticCameraCaps_QueryFocusRegionPatterns(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pPatternID,
+                        XAuint32* pFocusPattern,
+                        XAuint32* pCustomPoints1,
+                        XAuint32* pCustomPoints2)
+{
+    DEBUG_API("->XAStaticCameraCaps_QueryFocusRegionPatterns");
+    if( !pFocusPattern )
+    {   /* return number of focus patterns */
+        if(!pPatternID)
+        {
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAStaticCameraCaps_QueryFocusRegionPatterns");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        /* no support in GST */
+        DEBUG_INFO("No support in gst");
+        *pPatternID = 0;
+    }
+    else
+    {
+        if( !(pFocusPattern&&pCustomPoints1&&pCustomPoints2) )
+        {
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAStaticCameraCaps_QueryFocusRegionPatterns");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        DEBUG_INFO("No support in gst");
+        *pFocusPattern = 0;
+        *pCustomPoints1 = 0;
+        *pCustomPoints2 = 0;
+        /*no focus patterns, index always out of range*/
+        DEBUG_API("<-XAStaticCameraCaps_QueryFocusRegionPatterns");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_API("<-XAStaticCameraCaps_QueryFocusRegionPatterns");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetSupportedAutoLocks(
+ *                       XAuint32 cameraDeviceID,
+ *                       XAuint32* pNumCombinations,
+ *                       XAuint32** ppLocks)
+ */
+XAresult XAStaticCameraCaps_GetSupportedAutoLocks(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pNumCombinations,
+                        XAuint32** ppLocks)
+{
+    DEBUG_API("->XAStaticCameraCaps_GetSupportedAutoLocks");
+    /* No support in gst.
+     * Spec: "If no settings are supported,
+     *        this method returns XA_RESULT_FEATURE_UNSUPPORTED."
+     **/
+    DEBUG_INFO("No support in gst");
+    if(pNumCombinations)
+    {
+        *pNumCombinations = 0;
+    }
+    DEBUG_API("<-XAStaticCameraCaps_GetSupportedAutoLocks");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetSupportedFocusManualSettings(
+ *                       XAuint32 cameraDeviceID,
+ *                       XAboolean macroEnabled,
+ *                       XAmillimeter* pMinValue,
+ *                       XAmillimeter* pMaxValue,
+ *                       XAuint32* pNumSettings,
+ *                       XAmillimeter** ppSettings)
+ */
+XAresult XAStaticCameraCaps_GetSupportedFocusManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAboolean macroEnabled,
+                        XAmillimeter* pMinValue,
+                        XAmillimeter* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAmillimeter** ppSettings)
+{
+    DEBUG_API("->XAStaticCameraCaps_GetSupportedFocusManualSettings");
+    /* No support in gst.
+     * Spec: "If no settings are supported,
+     *        this method returns XA_RESULT_FEATURE_UNSUPPORTED."
+     **/
+    DEBUG_INFO("No support in gst");
+    if(pNumSettings)
+    {
+        *pNumSettings = 0;
+    }
+    DEBUG_API("<-XAStaticCameraCaps_GetSupportedFocusManualSettings");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetSupportedISOSensitivitySettings(
+ *                       XAuint32 cameraDeviceID,
+ *                       XAuint32* pMinValue,
+ *                       XAuint32* pMaxValue,
+ *                       XAuint32* pNumSettings,
+ *                       XAuint32** ppSettings)
+ */
+XAresult XAStaticCameraCaps_GetSupportedISOSensitivitySettings(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pMinValue,
+                        XAuint32* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAuint32** ppSettings)
+{
+    DEBUG_API("->XAStaticCameraCaps_GetSupportedISOSensitivitySettings");
+    if( !pNumSettings )
+    {
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    if( !ppSettings )
+    {
+        /* no items in ppSettings array*/
+        *pNumSettings = 0;
+    }
+    else
+    {
+        if( !(pMinValue && pMaxValue) )
+        {
+            DEBUG_API("<-XAStaticCameraCaps_GetSupportedISOSensitivitySettings");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        /* continuous range */
+        *pNumSettings = 0;
+        /* NOTE: no way to query actual values from gstreamer, use hardcoded default values */
+        *pMinValue = XACAMERAIMPL_DEFAULT_MIN_ISO;
+        *pMaxValue = XACAMERAIMPL_DEFAULT_MAX_ISO;
+    }
+    DEBUG_API("<-XAStaticCameraCaps_GetSupportedISOSensitivitySettings");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetSupportedApertureManualSettings(
+ *                       XAuint32 cameraDeviceID,
+ *                       XAuint32* pMinValue,
+ *                       XAuint32* pMaxValue,
+ *                       XAuint32* pNumSettings,
+ *                       XAuint32** ppSettings)
+ */
+XAresult XAStaticCameraCaps_GetSupportedApertureManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pMinValue,
+                        XAuint32* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAuint32** ppSettings)
+{
+    DEBUG_API("->XAStaticCameraCaps_GetSupportedApertureManualSettings");
+    if( !pNumSettings )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAStaticCameraCaps_GetSupportedApertureManualSettings");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    if( !ppSettings )
+    {
+        /* no items in ppSettings array*/
+        *pNumSettings = 0;
+    }
+    else
+    {
+        /* continuous range */
+        *pNumSettings = 0;
+        /* NOTE: no way to query actual values from gstreamer, use hardcoded default values */
+        *pMinValue = XACAMERAIMPL_DEFAULT_MIN_APERTURE;
+        *pMaxValue = XACAMERAIMPL_DEFAULT_MAX_APERTURE;
+    }
+    DEBUG_API("<-XAStaticCameraCaps_GetSupportedApertureManualSettings");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetSupportedShutterSpeedManualSettings(
+ *                        XAuint32 cameraDeviceID,
+ *                       XAmicrosecond* pMinValue,
+ *                       XAmicrosecond* pMaxValue,
+ *                       XAuint32* pNumSettings,
+ *                       XAmicrosecond** ppSettings)
+ */
+XAresult XAStaticCameraCaps_GetSupportedShutterSpeedManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAmicrosecond* pMinValue,
+                        XAmicrosecond* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAmicrosecond** ppSettings)
+{
+    DEBUG_API("->XAStaticCameraCaps_GetSupportedShutterSpeedManualSettings");
+    /* No support in gst.
+     * Spec: "If no settings are supported,
+     *        this method returns XA_RESULT_FEATURE_UNSUPPORTED."
+     **/
+    DEBUG_INFO("No support in gst");
+    if(pNumSettings)
+    {
+        *pNumSettings = 0;
+    }
+    DEBUG_API("<-XAStaticCameraCaps_GetSupportedShutterSpeedManualSettings");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetSupportedWhiteBalanceManualSettings(
+ *                       XAuint32 cameraDeviceID,
+ *                       XAuint32* pMinValue,
+ *                       XAuint32* pMaxValue,
+ *                       XAuint32* pNumSettings,
+ *                       XAuint32** ppSettings)
+ */
+XAresult XAStaticCameraCaps_GetSupportedWhiteBalanceManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pMinValue,
+                        XAuint32* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAuint32** ppSettings)
+{
+    DEBUG_API("->XAStaticCameraCaps_GetSupportedWhiteBalanceManualSettings");
+    /* No support in gst.
+     * Spec: "If no settings are supported,
+     *        this method returns XA_RESULT_FEATURE_UNSUPPORTED."
+     **/
+    DEBUG_INFO("No support in gst");
+    if(pNumSettings)
+    {
+        *pNumSettings = 0;
+    }
+    DEBUG_API("<-XAStaticCameraCaps_GetSupportedWhiteBalanceManualSettings");
+    return XA_RESULT_FEATURE_UNSUPPORTED;
+}
+
+/*
+ * XAresult XAStaticCameraCaps_GetSupportedZoomSettings(
+ *                       XAuint32 cameraDeviceID,
+ *                       XAboolean digitalEnabled,
+ *                       XAboolean macroEnabled,
+ *                       XApermille* pMaxValue,
+ *                       XAuint32* pNumSettings,
+ *                       XApermille** ppSettings,
+ *                       XAboolean* pSpeedSupported)
+ */
+XAresult XAStaticCameraCaps_GetSupportedZoomSettings(
+                        XAuint32 cameraDeviceID,
+                        XAboolean digitalEnabled,
+                        XAboolean macroEnabled,
+                        XApermille* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XApermille** ppSettings,
+                        XAboolean* pSpeedSupported)
+{
+    DEBUG_API("->XAStaticCameraCaps_GetSupportedZoomSettings");
+    if( !ppSettings )
+    {
+        if( !pNumSettings )
+        {
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAStaticCameraCaps_GetSupportedZoomSettings");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        *pNumSettings = 0;
+    }
+    else
+    {
+        if( !(pMaxValue && pSpeedSupported) )
+        {
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAStaticCameraCaps_GetSupportedZoomSettings");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        /*NOTE: no way to query actual max value*/
+        *pMaxValue = XACAMERAIMPL_DEFAULT_MAX_ZOOM;
+        /*no gst support for speed settings*/
+        *pSpeedSupported = XA_BOOLEAN_FALSE;
+        *pNumSettings = 0;
+    }
+    DEBUG_API("<-XAStaticCameraCaps_GetSupportedZoomSettings");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAuint32 XAStaticCameraCaps_IdxFromId(XAuint32 cameraDeviceID)
+ */
+XAuint32 XAStaticCameraCaps_IdxFromId(XAuint32 cameraDeviceID)
+{
+    XAuint32 devId = 0;
+    XAuint32 idx = 0;
+    guint32 numDevices = sizeof(allCameraCaps)/sizeof(XAStaticCameraCapsData);
+
+    if(cameraDeviceID == XA_DEFAULTDEVICEID_CAMERA)
+    {
+        devId = XACAMERAIMPL_DEFAULT_DEVICE;
+    }
+    else
+    {
+        devId = cameraDeviceID;
+    }
+
+    /* query capas with id -> find index*/
+    for(idx=0; idx<numDevices; idx++)
+    {
+        if( devId==allCameraCaps[idx].deviceID )
+            break;
+    }
+    return idx;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xastaticcameracapsadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XASTATICCAMERACAPSADAPTATION_H
+#define XASTATICCAMERACAPSADAPTATION_H
+
+#include "openmaxalwrapper.h"
+#include "xaglobals.h"
+
+#ifdef XA_USE_TEST_PLUGINS
+#define XACAMERAIMPL_DEFAULT_DEVICE XA_ADAPTID_VIDEOTESTSRC
+#else
+#define XACAMERAIMPL_DEFAULT_DEVICE XA_ADAPTID_V4L2SRC
+#endif
+
+/* Structure to hold commonly used capabilities of codec/device.
+ */
+typedef struct XAStaticCameraCapsData_
+{
+    XAuint32              deviceID;
+    XACameraDescriptor    XAcaps;
+} XAStaticCameraCapsData;
+
+void XAStaticCameraCaps_Init(void);
+
+XAresult XAStaticCameraCaps_GetCameraCapabilities(
+                        XAuint32* pIndex,
+                        XAuint32* pCameraDeviceID,
+                        XACameraDescriptor* pDescriptor);
+
+XAresult XAStaticCameraCaps_QueryFocusRegionPatterns(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pPatternID,
+                        XAuint32* pFocusPattern,
+                        XAuint32* pCustomPoints1,
+                        XAuint32* pCustomPoints2);
+
+XAresult XAStaticCameraCaps_GetSupportedAutoLocks(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pNumCombinations,
+                        XAuint32** ppLocks);
+
+XAresult XAStaticCameraCaps_GetSupportedFocusManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAboolean macroEnabled,
+                        XAmillimeter* pMinValue,
+                        XAmillimeter* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAmillimeter** ppSettings);
+
+XAresult XAStaticCameraCaps_GetSupportedISOSensitivitySettings(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pMinValue,
+                        XAuint32* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAuint32** ppSettings);
+
+XAresult XAStaticCameraCaps_GetSupportedApertureManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pMinValue,
+                        XAuint32* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAuint32** ppSettings);
+
+XAresult XAStaticCameraCaps_GetSupportedShutterSpeedManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAmicrosecond* pMinValue,
+                        XAmicrosecond* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAmicrosecond** ppSettings);
+
+XAresult XAStaticCameraCaps_GetSupportedWhiteBalanceManualSettings(
+                        XAuint32 cameraDeviceID,
+                        XAuint32* pMinValue,
+                        XAuint32* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XAuint32** ppSettings);
+
+XAresult XAStaticCameraCaps_GetSupportedZoomSettings(
+                        XAuint32 cameraDeviceID,
+                        XAboolean digitalEnabled,
+                        XAboolean macroEnabled,
+                        XApermille* pMaxValue,
+                        XAuint32* pNumSettings,
+                        XApermille** ppSettings,
+                        XAboolean* pSpeedSupported);
+
+#endif /* XASTATICCAMERACAPSADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,891 @@
+/**
+ * src\adaptation\XAStreamInformationItfAdaptation.c
+ * Part of OpenMAX AL Implementation
+ * Copyright (c) 2009 Nokia Inc.
+ *
+ * This file contains implementation of XAStreamInformationItfAdaptation
+ **/
+
+#include "xadebug.h"
+#include "xathreadsafety.h"
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xastreaminformationitfadaptation.h"
+#include "xaplayitfadaptation.h"
+
+/* local functions */
+XAresult GetDomainTypeFromCodecBinSrcPads(
+                    GList *sourcePads,
+                    XAuint32 containerType,
+                    XAuint32 streamIndex,
+                    XAuint32 *domain);
+
+XAresult GetAudioStreamInfoFromPads(
+                    GstPad *srcPad,
+                    XAuint32 *channels,
+                    XAuint32 *sampleRate,
+                    XAuint32 *bitRate);
+
+XAresult GetVideoStreamInfoFromPads(
+                    GstPad *srcPad,
+                    XAuint32 *width,
+                    XAuint32 *height,
+                    XAuint32 *frameRate,
+                    XAuint32 *bitRate);
+
+XAresult GetImageStreamInfoFromPads(
+                    GstPad *srcPad,
+                    XAuint32 *width,
+                    XAuint32 *height);
+
+/*
+ * XAStreamInformationItfAdapt_QueryMediaContainerInformation(
+ *   XAAdaptationBaseCtx *adaptCtx,
+ *   XAMediaContainerInformation *info);
+ * Description: Obtains media container information
+ */
+XAresult  XAStreamInformationItfAdapt_QueryMediaContainerInformation(
+    XAAdaptationBaseCtx *adaptCtx,
+    XAuint32 *containerType,
+    XAmillisecond *mediaDuration,
+    XAuint32 *numStreams)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XADataSource *xaDataSource = NULL;
+    GstElement *codecbin = NULL;
+
+    DEBUG_API("->XAStreamInformationItfAdapt_QueryMediaContainerInformation");
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+/*        !((adaptCtx->ctxId == XAMediaPlayerAdaptation) ||
+         (adaptCtx->ctxId == XAMDAdaptation) ) )
+*/
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryMediaContainerInformation");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* Get media container type */
+    DEBUG_INFO_A2("Adaptation Context- ID is [%u] Extended ID[%u]",
+                (unsigned int)adaptCtx->ctxId,
+                (unsigned int)((XAMediaPlayerAdaptationCtx*) adaptCtx)->extendedCtxId);
+
+    /* Initialize to unspecified */
+    *containerType = XA_CONTAINERTYPE_UNSPECIFIED;
+    xaDataSource = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->xaSource;
+/*    DEBUG_INFO("Obtained handle to xaDataSource");*/
+    if ( xaDataSource &&
+         xaDataSource->pFormat &&
+         ( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_MIME) )
+    {
+        *containerType = ((XADataFormat_MIME*)(xaDataSource->pFormat))->containerType;
+        DEBUG_INFO_A1("Container type obtained from xaDataSource->pFormat is [%u]", (unsigned int)(*containerType));
+    }
+    else
+    {
+        DEBUG_INFO("Container type unspecified");
+    }
+
+    /* Get media duration */
+    ret = XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)adaptCtx, mediaDuration);
+    if ( ret != XA_RESULT_SUCCESS )
+        return ret;
+
+    /* Determine number of streams */
+    codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
+    if ( codecbin == NULL )
+    {
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryMediaContainerInformation");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    *numStreams = codecbin->numsrcpads;
+
+    DEBUG_API("-<XAStreamInformationItfAdapt_QueryMediaContainerInformation");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdapt_QueryStreamType(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 streamIndex,
+ *               XAuint32 *domain)
+ * Description: Obtains stream type information
+ */
+XAresult XAStreamInformationItfAdapt_QueryStreamType(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex,
+                XAuint32 *domain)
+{
+    XAresult ret;
+    XAuint32 containerType;
+    XAmillisecond mediaDuration;
+    XAuint32 numStreams;
+    XADataSource *xaDataSource = NULL;
+
+
+    DEBUG_API("->XAStreamInformationItfAdapt_QueryStreamType");
+
+    ret = XAStreamInformationItfAdapt_QueryMediaContainerInformation(
+            adaptCtx, &containerType, &mediaDuration, &numStreams);
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
+        return ret;
+    }
+
+    /* validate stream index */
+    if ( streamIndex > numStreams )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* if format type is raw image */
+    xaDataSource = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->xaSource;
+    if( xaDataSource->pFormat &&
+      ( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_RAWIMAGE) )
+    {
+        *domain = XA_DOMAINTYPE_IMAGE;
+        return XA_RESULT_SUCCESS;
+    }
+    else
+    {
+        GstElement *codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
+        if ( codecbin == NULL )
+        {
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        GST_OBJECT_LOCK( codecbin );
+        ret = GetDomainTypeFromCodecBinSrcPads(
+                    codecbin->srcpads,
+                    containerType,
+                    streamIndex,
+                    domain);
+        GST_OBJECT_UNLOCK( codecbin );
+    }
+
+    DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
+    return ret;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdapt_QueryStreamInformation(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 streamIndex,
+ *               void * info)
+ * Description: Obtains stream information
+ */
+XAresult XAStreamInformationItfAdapt_QueryStreamInformation(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex,
+                void * info)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 domain;
+    XAuint32 codecId = 0;
+    XAuint32 channels;
+    XAmilliHertz sampleRate;
+    XAuint32 bitRate;
+    XAmillisecond duration;
+    XAuint32 width;
+    XAuint32 height;
+    XAuint32 frameRate;
+    /*TODO fix this call below in capabilitymgr*/
+    /*XACapsType filter;*/
+    GstElement *codecbin = NULL;
+
+    DEBUG_API("->XAStreamInformationItfAdapt_QueryStreamInformation");
+
+    /* stream index is validated in XAStreamInformationItfAdapt_QueryStreamType */
+    ret = XAStreamInformationItfAdapt_QueryStreamType(
+            adaptCtx, streamIndex, &domain);
+
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
+        return ret;
+    }
+    if ( domain == XA_DOMAINTYPE_UNKNOWN )
+    {
+        DEBUG_ERR("XA_RESULT_CONTENT_UNSUPPORTED");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
+        return XA_RESULT_CONTENT_UNSUPPORTED;
+    }
+
+    codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
+    if ( codecbin == NULL )
+    {
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    /* For midi none of the properties can be queried from gstreamer */
+    if ( domain != XA_DOMAINTYPE_MIDI )
+    {
+        GstPad* srcPad = NULL;
+        gchar* codecbinFactoryName = NULL;
+
+        GST_OBJECT_LOCK( codecbin );
+        srcPad = (GstPad*) g_list_nth_data(codecbin->srcpads, (streamIndex -1 ));
+        DEBUG_INFO_A1("Obtaining SrcPad%u from Decode bin", (unsigned int)(streamIndex-1));
+        if (srcPad == NULL)
+        {
+            GST_OBJECT_UNLOCK( codecbin );
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            DEBUG_API("-<QueryStreamInformation");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+        switch (domain)
+        {
+            /*TODO fix this call below in capabilitymgr*/
+            /*case XA_DOMAINTYPE_AUDIO:
+                filter = XACAP_AUDIO;
+                break;
+            case XA_DOMAINTYPE_VIDEO:
+                filter = XACAP_VIDEO;
+                break;
+            case XA_DOMAINTYPE_IMAGE:
+                filter = XACAP_IMAGE;
+                break;*/
+        };
+
+        codecbinFactoryName = gst_element_get_name(gst_element_get_factory (codecbin));
+        /* decode bin has the sink pads ghosted from targetPad.
+        So retreive the name of the original decoder element*/
+        if ( strcmp(codecbinFactoryName, "decodebin") == 0 )
+        {
+            GstPad* targetPad = NULL;
+            gchar* decoderElementName = NULL; /* for retreiving codec id*/
+
+            DEBUG_INFO("Decodebin: Obtaining target pad of SrcPad");
+            targetPad = gst_ghost_pad_get_target ((GstGhostPad*)srcPad);
+            decoderElementName = gst_element_get_name(gst_element_get_factory (gst_pad_get_parent_element(targetPad)));
+            /*TODO fix this call below in capabilitymgr*/
+            /*
+            ret = XAStaticCapsAdapt_GetCodecIDByPluginName(
+                        filter,
+                        (XAchar*)decoderElementName,
+                        &codecId);
+             */
+            gst_object_unref(targetPad);
+            g_free(decoderElementName);
+        }
+        else /* for identity, audioparse and videoparse elements */
+        {
+            DEBUG_INFO("Not decode bin, but a passthru element");
+            /*TODO fix this call below in capabilitymgr*/
+/*            ret = XAStaticCapsAdapt_GetCodecIDByPluginName(
+                        filter,
+                        (XAchar*)codecbinFactoryName,
+                        &codecId);*/
+        }
+        g_free(codecbinFactoryName);
+        if ( ret == XA_RESULT_SUCCESS )
+        {
+            /* retreive srcPad properties before releasing lock on codecbin */
+            switch(domain)
+            {
+                case XA_DOMAINTYPE_AUDIO:
+                    DEBUG_INFO("Getting Audio Stream Info from SrcPad");
+                    ret = GetAudioStreamInfoFromPads(
+                                srcPad,
+                                &channels,
+                                &sampleRate,
+                                &bitRate);
+                    break;
+                case XA_DOMAINTYPE_VIDEO:
+                    DEBUG_INFO("Getting Video Stream Info from SrcPad");
+                    ret = GetVideoStreamInfoFromPads(
+                                srcPad,
+                                &width,
+                                &height,
+                                &frameRate,
+                                &bitRate);
+                    break;
+                case XA_DOMAINTYPE_IMAGE:
+                    DEBUG_INFO("Getting Image Stream Info from SrcPad");
+                    ret = GetImageStreamInfoFromPads(
+                                srcPad,
+                                &width,
+                                &height
+                                );
+                    break;
+                default:
+                    break;
+            };
+        }
+        /* Now unlock the bin */
+        GST_OBJECT_UNLOCK( codecbin );
+    }    /*if ( domain != XA_DOMAIN_TYPE_MIDI )*/
+
+    if ( ret == XA_RESULT_SUCCESS)
+    {
+        DEBUG_INFO("Getting media duration");
+        ret = XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)adaptCtx, &duration);
+    }
+
+    /* Now assign properties to data structure */
+    if ( ret == XA_RESULT_SUCCESS)
+    {
+        switch(domain)
+        {
+            case XA_DOMAINTYPE_AUDIO:
+            {
+                XAAudioStreamInformation* streamInfo = (XAAudioStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAAudioStreamInformation");
+                streamInfo->codecId = codecId;
+                streamInfo->channels = channels;
+                streamInfo->sampleRate = sampleRate;
+                streamInfo->bitRate = bitRate;
+                streamInfo->langCountry[0] = '\0';
+                streamInfo->duration = duration;
+            }
+                break;
+            case XA_DOMAINTYPE_MIDI:
+            {
+                XAMIDIStreamInformation* streamInfo = (XAMIDIStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAMIDIStreamInformation");
+                /*currently there is no way to get these information from gstreamer*/
+                streamInfo->channels = XA_MIDI_UNKNOWN;
+                streamInfo->tracks = XA_MIDI_UNKNOWN;
+                streamInfo->bankType = XA_MIDIBANK_DEVICE;
+                /*streamInfo->bitRate = 0;*/
+                streamInfo->langCountry[0] = '\0';
+                streamInfo->duration = duration;
+            }
+                break;
+            case XA_DOMAINTYPE_VIDEO:
+            {
+                XAVideoStreamInformation* streamInfo = (XAVideoStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAVideoStreamInformation");
+                streamInfo->codecId = codecId;
+                streamInfo->width = width;
+                streamInfo->height = height;
+                streamInfo->bitRate = bitRate;
+                streamInfo->duration = duration;
+            }
+                break;
+            case XA_DOMAINTYPE_IMAGE:
+            {
+                XAImageStreamInformation* streamInfo = (XAImageStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAImageStreamInformation");
+                streamInfo->codecId = codecId;
+                streamInfo->width = width;
+                streamInfo->height = height;
+                streamInfo->presentationDuration = duration;
+            }
+                break;
+            default:
+                break;
+        };
+    } /*if ( ret == XA_RESULT_SUCCESS)*/
+
+    DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
+    return ret;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdapt_QueryStreamName(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 streamIndex,
+ *               XAuint16 * pNameSize,
+ *               XAchar * pName)
+ * Description: Obtains stream name
+ */
+XAresult XAStreamInformationItfAdapt_QueryStreamName(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex,
+                XAuint16 * pNameSize,
+                XAchar * pName)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 numStreams;
+    GstElement *codecbin = NULL;
+
+    DEBUG_API("->XAStreamInformationItfAdapt_QueryStreamName");
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* validate stream index */
+    codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
+    if ( codecbin == NULL )
+    {
+        DEBUG_INFO("Unable to get codec bin");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    numStreams = codecbin->numsrcpads;
+
+    /* validate stream index */
+    if ( streamIndex > numStreams )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* TODO there is no straight way to retreive stream name from gstreamer*/
+    /*XAuint16 inputNameSize = *pNameSize;*/
+    *pNameSize = 0; /* Replace this with actual size*/
+    if ( pName )
+    {
+        /* TODO copy stream name into pName taking into account inputNameSize */
+    }
+
+    DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
+    return ret;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdapt_QueryActiveStreams(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 *numStreams,
+ *               XAboolean *activeStreams);
+ * Description: Obtains active stream information
+ */
+ XAresult XAStreamInformationItfAdapt_QueryActiveStreams(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 *numStreams,
+                XAboolean *activeStreams)
+{
+    XAuint32 inputNumStreams;
+    GstElement *codecbin;
+
+    DEBUG_API("->XAStreamInformationItfAdapt_QueryActiveStreams");
+
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( adaptCtx->ctxId ==  XAMDAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
+        return XA_RESULT_PRECONDITIONS_VIOLATED;
+    }
+
+    inputNumStreams = *numStreams;
+
+    /* Determine number of streams */
+    codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
+    if ( codecbin == NULL )
+    {
+        DEBUG_INFO("Unable to get codec bin");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    *numStreams = codecbin->numsrcpads;
+
+    if ( activeStreams )
+    {
+        XAuint32 loopIndex;
+        if (inputNumStreams < *numStreams )
+        {
+            DEBUG_INFO("numStreams param value is smaller than number of streams");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        for (loopIndex = 0; loopIndex < *numStreams; loopIndex++)
+        {
+            /* TODO currently gstreamer doesn't allow multiple dynamic streams
+             * all streams are active streams */
+            activeStreams[loopIndex] = XA_BOOLEAN_TRUE;
+        }
+    }
+
+    DEBUG_API("->XAStreamInformationItfAdapt_QueryActiveStreams");
+    return XA_RESULT_SUCCESS;
+}
+
+XAresult XAStreamInformationItfAdapt_SetActiveStream(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamNum,
+                XAboolean active,
+                XAboolean commitNow)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 numStreams;
+    GstElement *codecbin;
+
+    DEBUG_API("->XAStreamInformationItfAdapt_SetActiveStream");
+
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( adaptCtx->ctxId ==  XAMDAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+        DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
+        return XA_RESULT_PRECONDITIONS_VIOLATED;
+    }
+
+    /* Determine number of streams */
+    codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
+    if ( codecbin == NULL )
+    {
+        DEBUG_INFO("Unable to get codec bin");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    numStreams = codecbin->numsrcpads;
+
+    /* validate stream index */
+    if ( streamNum > numStreams )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    ret = XA_RESULT_FEATURE_UNSUPPORTED;
+
+    DEBUG_API("->XAStreamInformationItfAdapt_SetActiveStream");
+    return ret;
+}
+
+/* local functions */
+
+XAresult GetDomainTypeFromCodecBinSrcPads(
+                    GList *sourcePads,
+                    XAuint32 containerType,
+                    XAuint32 streamIndex,
+                    XAuint32 *domain)
+{
+    GstPad* srcPad;
+    GstCaps* negotiatedCaps;
+    const GstStructure* gstStruct;
+    const gchar *mime;
+
+    DEBUG_API("->GetDomainTypeFromCodecBinSrcPads");
+
+
+    srcPad = (GstPad*) g_list_nth_data(sourcePads, (streamIndex -1 ));
+    if (srcPad == NULL)
+    {
+        DEBUG_INFO_A1("Error obtaining SrcPad%u", (unsigned int)streamIndex);
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_INFO_A1("Obtained SrcPad%u from SrcPads list", (unsigned int)(streamIndex-1));
+
+    negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Obtaining allowed caps from SrcPad.");
+        negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
+    }
+
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
+
+    gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
+    if ( gstStruct == NULL )
+    {
+        gst_object_unref (negotiatedCaps);
+        DEBUG_INFO("Error getting GstStructure from GstCaps");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_INFO("Obtained GstStructure from GstCaps");
+
+    mime = gst_structure_get_name (gstStruct);
+
+    DEBUG_INFO_A1("MimeType associated with SrcPad is [%s]", mime);
+
+    *domain = XA_DOMAINTYPE_UNKNOWN;
+    if (strncmp (mime, "audio", 5) == 0)
+    {
+        gchar* elementFactoryName = NULL;
+
+        *domain = XA_DOMAINTYPE_AUDIO;
+
+        /*check if it is midi or not by checking the sink pad's mime-type*/
+        /* this should done by checking the sinkpad's mime-type of parent element */
+        elementFactoryName = gst_element_get_name(gst_element_get_factory (gst_pad_get_parent_element(srcPad)));
+
+        /*printf("Element factory name [%s]\n", elementFactoryName);*/
+
+        /* decode bin has the sink pads ghosted from targetPad.
+        So retreive the name of the original decoder element*/
+        if ( strcmp(elementFactoryName, "decodebin") == 0 )
+        {
+            GstPad* targetPad = NULL;
+            gchar* decoderElementName = NULL;
+
+            DEBUG_INFO("Decodebin: Obtaining target pad of SrcPad");
+            targetPad = gst_ghost_pad_get_target ((GstGhostPad*)srcPad);
+
+            decoderElementName = gst_element_get_name (gst_element_get_factory (gst_pad_get_parent_element (targetPad)));
+            /* better solution would be to get mime-type from decoder and decide based on that */
+            /* currently we cannot retrieive sinkpad's caps. Perhaps a bug in gstreamer. We need */
+            /* to revisit this when we move to newer version of gstreamer */
+            if ( strcmp(decoderElementName, "wildmidi") == 0 )
+            {
+                *domain = XA_DOMAINTYPE_MIDI;
+            }
+            g_free(decoderElementName);
+            gst_object_unref(targetPad);
+        }
+        g_free(elementFactoryName);
+
+    }
+    else if (strncmp (mime, "video", 5) == 0)
+    {
+        switch(containerType)
+        {
+            case XA_CONTAINERTYPE_BMP:
+            case XA_CONTAINERTYPE_JPG:
+            case XA_CONTAINERTYPE_JPG2000:
+                *domain = XA_DOMAINTYPE_IMAGE;
+                break;
+            default:
+                *domain = XA_DOMAINTYPE_VIDEO;
+                break;
+        };
+    }
+    /* TODO find out why this causes assertion failure */
+    /*gst_object_unref (negotiatedCaps);*/
+
+    DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
+
+    return XA_RESULT_SUCCESS;
+}
+
+XAresult GetAudioStreamInfoFromPads(
+                    GstPad *srcPad,
+                    XAuint32 *channels,
+                    XAuint32 *sampleRate,
+                    XAuint32 *bitRate)
+{
+    GstCaps* negotiatedCaps;
+    const GstStructure* gstStruct;
+    gint negotiated_sampleRate;
+    gint negotiated_channels;
+    gint negotiated_bitRate;
+
+    DEBUG_API("->GetAudioStreamInfoFromPads");
+
+    negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Obtaining allowed caps from SrcPad.");
+        negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
+    }
+
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetAudioStreamInfoFromPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
+
+    gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
+    if ( gstStruct == NULL )
+    {
+        gst_object_unref (negotiatedCaps);
+        DEBUG_INFO("Error getting GstStructure from GstCaps");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetAudioStreamInfoFromPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_INFO("Obtained GstStructure from GstCaps");
+
+    *channels = 0;
+    *sampleRate = 0;
+    *bitRate = 0;
+
+    gst_structure_get_int (gstStruct, "channels", &negotiated_channels);
+    gst_structure_get_int (gstStruct, "rate", &negotiated_sampleRate);
+    gst_structure_get_int (gstStruct, "bitrate", &negotiated_bitRate);
+
+    *channels = negotiated_channels;
+    *sampleRate = (XAmilliHertz) negotiated_sampleRate * 1000;
+    *bitRate = negotiated_bitRate;
+
+    DEBUG_INFO_A1("channels[%u]", (unsigned int)*channels);
+    DEBUG_INFO_A1("sampleRate[%u]", (unsigned int)*sampleRate);
+    DEBUG_INFO_A1("bitRate[%u]", (unsigned int)*bitRate);
+    /* TODO find out why this is causing assertion failure
+    gst_object_unref (negotiatedCaps);*/
+
+    DEBUG_API("-<GetAudioStreamInfoFromPads");
+
+    return XA_RESULT_SUCCESS;
+}
+
+XAresult GetVideoStreamInfoFromPads(
+                    GstPad *srcPad,
+                    XAuint32 *width,
+                    XAuint32 *height,
+                    XAuint32 *frameRate,
+                    XAuint32 *bitRate)
+{
+    GstCaps* negotiatedCaps;
+    const GstStructure* gstStruct;
+    gint negotiated_width;
+    gint negotiated_height;
+    gint negotiated_frameRate_numerator;
+    gint negotiated_frameRate_denominator;
+    gint negotiated_bitRate;
+
+    DEBUG_API("->GetVideoStreamInfoFromPads");
+
+    negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Obtaining allowed caps from SrcPad.");
+        negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
+    }
+
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetVideoStreamInfoFromPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
+
+    gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
+    if ( gstStruct == NULL )
+    {
+        gst_object_unref (negotiatedCaps);
+        DEBUG_INFO("Error getting GstStructure from GstCaps");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetVideoStreamInfoFromPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_INFO("Obtained GstStructure from GstCaps");
+
+    *width = 0;
+    *height = 0;
+    *frameRate = 0;
+    *bitRate = 0;
+
+    gst_structure_get_int (gstStruct, "width", &negotiated_width);
+    gst_structure_get_int (gstStruct, "height", &negotiated_height);
+    gst_structure_get_fraction (gstStruct, "framerate",
+                                    &negotiated_frameRate_numerator,
+                                    &negotiated_frameRate_denominator);
+    gst_structure_get_int (gstStruct, "bitrate", &negotiated_bitRate);
+
+    *width = negotiated_width;
+    *height = negotiated_height;
+    *bitRate = negotiated_bitRate;
+
+    DEBUG_INFO_A1("width[%u]", (unsigned int)*width);
+    DEBUG_INFO_A1("height[%u]", (unsigned int)*height);
+    DEBUG_INFO_A2("framerate[%u/%u]", (unsigned int)negotiated_frameRate_numerator, (unsigned int)negotiated_frameRate_denominator);
+    DEBUG_INFO_A1("bitrate[%u]", (unsigned int)*bitRate);
+    /* TODO find out why this is causing assertion failure
+    gst_object_unref (negotiatedCaps);*/
+
+    DEBUG_API("-<GetVideoStreamInfoFromPads");
+
+    return XA_RESULT_SUCCESS;
+}
+
+
+XAresult GetImageStreamInfoFromPads(
+                    GstPad *srcPad,
+                    XAuint32 *width,
+                    XAuint32 *height)
+{
+    GstCaps* negotiatedCaps;
+    const GstStructure* gstStruct;
+    gint negotiated_width;
+    gint negotiated_height;
+
+    DEBUG_API("->GetImageStreamInfoFromPads");
+
+    negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Obtaining allowed caps from SrcPad.");
+        negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
+    }
+
+    if ( negotiatedCaps == NULL )
+    {
+        DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetImageStreamInfoFromPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+
+    DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
+
+    gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
+    if ( gstStruct == NULL )
+    {
+        gst_object_unref (negotiatedCaps);
+        DEBUG_INFO("Error getting GstStructure from GstCaps");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("-<GetImageStreamInfoFromPads");
+        return XA_RESULT_INTERNAL_ERROR;
+    }
+    DEBUG_INFO("Obtained GstStructure from GstCaps");
+
+    *width = 0;
+    *height = 0;
+
+    gst_structure_get_int (gstStruct, "width", &negotiated_width);
+    gst_structure_get_int (gstStruct, "height", &negotiated_height);
+
+    *width = negotiated_width;
+    *height = negotiated_height;
+
+    DEBUG_INFO_A1("width[%u]", (unsigned int)*width);
+    DEBUG_INFO_A1("height[%u]", (unsigned int)*height);
+    /* TODO find out why this is causing assertion failure
+    gst_object_unref (negotiatedCaps);*/
+
+    DEBUG_API("-<GetImageStreamInfoFromPads");
+
+    return XA_RESULT_SUCCESS;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,50 @@
+/**
+ * src\adaptation\XAStreamInformationItfAdaptation.h
+ * Part of OpenMAX AL Implementation
+ * Copyright (c) 2009 Nokia Inc.
+ *
+ * This file contains implementation of XAStreamInformationItfAdaptation
+ **/
+#ifndef XASTREAMINFORMATIONITFADAPTATION_H
+#define XASTREAMINFORMATIONITFADAPTATION_H
+
+#include "openmaxalwrapper.h"
+#include "xaadptbasectx.h"
+/* MACROS */
+
+/* FUNCTIONS */
+XAresult XAStreamInformationItfAdapt_QueryMediaContainerInformation(
+    XAAdaptationBaseCtx *adaptCtx,
+    XAuint32 *containerType,
+    XAmillisecond *mediaDuration,
+    XAuint32 *numStreams);
+
+XAresult XAStreamInformationItfAdapt_QueryStreamType(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex, 
+                XAuint32 *domain);
+
+XAresult XAStreamInformationItfAdapt_QueryStreamInformation(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 streamIndex,
+                void * info);
+
+XAresult XAStreamInformationItfAdapt_QueryStreamName(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 streamIndex,
+                XAuint16 * pNameSize,
+                XAchar * pName);
+
+XAresult XAStreamInformationItfAdapt_QueryActiveStreams(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 *numStreams,
+                XAboolean *activeStreams);
+
+XAresult XAStreamInformationItfAdapt_SetActiveStream(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 streamNum,
+                XAboolean active, 
+                XAboolean commitNow);
+
+
+#endif /* XASTREAMINFORMATIONITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavibraadaptctx.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xavibraadaptctx.h"
+#include "xaadaptationgst.h"
+
+/*
+ * XAAdaptationGstCtx* XAVibraAdapt_Create()
+ * Allocates memory for Vibra Adaptation Context and makes 1st phase initialization
+ * @returns XAVibraAdaptationCtx* - Pointer to created context
+ */
+XAAdaptationBaseCtx* XAVibraAdapt_Create(XAuint32 deviceID)
+{
+    XAVibraAdaptationCtx *pSelf = (XAVibraAdaptationCtx*)calloc(1, sizeof(XAVibraAdaptationCtx));
+    DEBUG_API("->XAVibraAdapt_Create");
+    if ( pSelf)
+    {
+        if( XAAdaptationBase_Init(&(pSelf->baseObj.baseObj),XAVibraAdaptation)
+                    != XA_RESULT_SUCCESS )
+        {
+        DEBUG_ERR("Failed to init base context!!!");
+        free(pSelf);
+        pSelf = NULL;
+        }
+    }
+
+    DEBUG_API("<-XAVibraAdapt_Create");
+    return (XAAdaptationBaseCtx*)&pSelf->baseObj;
+}
+
+/*
+ * XAresult XAVibraAdapt_PostInit()
+ * 2nd phase initialization of Vibra Adaptation Context
+ */
+XAresult XAVibraAdapt_PostInit(XAAdaptationBaseCtx* bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAVibraAdaptationCtx* ctx = NULL;
+
+    DEBUG_API("->XAVibraAdapt_PostInit");
+    if(bCtx == NULL || bCtx->ctxId != XAVibraAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVibraAdapt_PostInit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    ctx = (XAVibraAdaptationCtx*)bCtx;
+
+    XAAdaptationBase_PostInit( &(ctx->baseObj.baseObj) );
+
+    DEBUG_API("<-XAVibraAdapt_PostInit");
+    return ret;
+}
+
+/*
+ * void XAVibraAdapt_Destroy(XAVibraAdaptationCtx* ctx)
+ * Destroys Vibra Adaptation Context
+ * @param ctx - Vibra Adaptation context to be destroyed
+ */
+void XAVibraAdapt_Destroy(XAAdaptationBaseCtx* bCtx)
+{
+    XAVibraAdaptationCtx* ctx = NULL;
+    DEBUG_API("->XAVibraAdapt_Destroy");
+
+    if(bCtx == NULL || bCtx->ctxId != XAVibraAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVibraAdapt_Destroy");
+        return;
+    }
+    ctx = (XAVibraAdaptationCtx*)bCtx;
+    XAAdaptationBase_Free(&(ctx->baseObj.baseObj));
+
+    free(ctx);
+    ctx = NULL;
+
+    DEBUG_API("<-XAVibraAdapt_Destroy");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavibraadaptctx.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAVIBRAADAPTCTX_H
+#define XAVIBRAADAPTCTX_H
+
+#include "xaadaptationgst.h"
+
+/* TYPEDEFS */
+
+typedef struct XAVibraAdaptationCtx_ XAVibraAdaptationCtx;
+
+/*
+ * Structure for Vibra specific gst-adaptation variables
+ */
+typedef struct XAVibraAdaptationCtx_ {
+
+    /* Parent*/
+    XAAdaptationGstCtx_ baseObj;
+
+    /* OMX-AL Variables */
+    XAuint32    deviceID;
+
+    /* GST Variables */
+} XAVibraAdaptationCtx_;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XAVibraAdapt_Create(XAuint32 deviceID);
+
+XAresult XAVibraAdapt_PostInit(XAAdaptationBaseCtx* bCtx);
+void XAVibraAdapt_Destroy(XAAdaptationBaseCtx* bCtx);
+
+#endif /* XAVIBRAADAPTCTX_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavibraitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "xavibraadaptctx.h"
+#include "xavibraitfadaptation.h"
+#include "xaadaptationgst.h"
+
+/*
+ * XAresult XAVibraItfAdapt_Vibrate( XAAdaptationGstCtx *bCtx, XAboolean vibrate );
+ */
+XAresult XAVibraItfAdapt_Vibrate( XAAdaptationGstCtx *bCtx, XAboolean vibrate )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    if(vibrate)
+    {
+        DEBUG_API("->XAVibraItfAdapt_Vibrate: ON");
+    }
+    else
+        DEBUG_API("->XAVibraItfAdapt_Vibrate: OFF");
+
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAVibraAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVibraItfAdapt_Vibrate");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_INFO("No support > stubbed.");
+    DEBUG_API("<-XAVibraItfAdapt_Vibrate");
+
+    return ret;
+}
+/*
+ * XAresult XAVibraItfAdapt_SetFrequency ( XAAdaptationGstCtx *bCtx,   XAmilliHertz frequency );
+ */
+XAresult XAVibraItfAdapt_SetFrequency ( XAAdaptationGstCtx *bCtx,  XAmilliHertz frequency )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API_A1("->XAVibraItfAdapt_SetFrequency %ld", frequency);
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAVibraAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVibraItfAdapt_SetFrequency");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_INFO("No support > stubbed.");
+    DEBUG_API("<-XAVibraItfAdapt_SetFrequency");
+    return ret;
+}
+/*
+ * XAresult XAVibraItfAdapt_SetIntensity ( XAAdaptationGstCtx *bCtx,   XApermille intensity );
+ */
+XAresult XAVibraItfAdapt_SetIntensity ( XAAdaptationGstCtx *bCtx,  XApermille intensity )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API_A1("->XAVibraItfAdapt_SetIntensity %d", intensity);
+
+    if(!bCtx || bCtx->baseObj.ctxId != XAVibraAdaptation )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVibraItfAdapt_SetIntensity");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_INFO("No support > stubbed.");
+    DEBUG_API("<-XAVibraItfAdapt_SetIntensity");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavibraitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAVibraItfADAPTATION_H_
+#define XAVibraItfADAPTATION_H_
+
+#include "xaadaptationgst.h"
+
+/* FUNCTIONS */
+XAresult XAVibraItfAdapt_Vibrate( XAAdaptationGstCtx *bCtx, XAboolean vibrate );
+XAresult XAVibraItfAdapt_SetFrequency ( XAAdaptationGstCtx *bCtx,  XAmilliHertz frequency );
+XAresult XAVibraItfAdapt_SetIntensity ( XAAdaptationGstCtx *bCtx,  XApermille intensity );
+#endif /* XAVIBRAITFADAPTATION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavideoencoderitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include "xamediarecorderadaptctx.h"
+#include "xavideoencoderitfadaptation.h"
+#include "xaadaptationgst.h"
+
+
+/*
+ * XAresult XAVideoEncoderITfAdapt_SetVideoSettings( XAAdaptationGstCtx *bCtx,
+ *                                                   XAVideoSettings *pSettings )
+ * @param XAAdaptationGstCtx *ctx - pointer to Media Recorer adaptation context
+ * @param XAVideoSettings *pSettings - Settings for encoder
+ * @return XAresult ret - return success value
+ * Description: Sets preferred encoder settings for pipeline.
+ */
+XAresult XAVideoEncoderItfAdapt_SetVideoSettings( XAAdaptationGstCtx *bCtx,
+                                                  XAVideoSettings *pSettings )
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("->XAVideoEncoderAdapt_SetVideoSettings");
+    if( !bCtx || (bCtx->baseObj.ctxId != XAMediaRecorderAdaptation) || !pSettings )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVideoEncoderAdapt_SetVideoSettings");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+    ret = XAMediaRecorderAdapt_CheckCodec(mCtx,XACAP_VIDEO,pSettings->encoderId);
+    if(ret==XA_RESULT_SUCCESS)
+    {
+        /*change of settings - pipeline must be regenerated**/
+        mCtx->encodingchanged = XA_BOOLEAN_TRUE;
+        memcpy(&mCtx->videoEncSettings, pSettings, sizeof(XAVideoSettings));
+    }
+    DEBUG_API("<-XAVideoEncoderAdapt_SetVideoSettings");
+    return ret;
+}
+
+/*
+ * XAresult XAVideoEncoderItfAdapt_GetVideoSettings( XAAdaptationGstCtx *bCtx, XAVideoSettings *pSettings )
+ */
+XAresult XAVideoEncoderItfAdapt_GetVideoSettings( XAAdaptationGstCtx *bCtx,
+                                                  XAVideoSettings *pSettings )
+{
+    XAMediaRecorderAdaptationCtx* mCtx = NULL;
+    XAresult ret = XA_RESULT_SUCCESS;
+
+    DEBUG_API("->XAVideoEncoderItfAdapt_GetVideoSettings");
+
+    if( !bCtx || (bCtx->baseObj.ctxId != XAMediaRecorderAdaptation) || !pSettings )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVideoEncoderItfAdapt_GetVideoSettings");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
+    memcpy(pSettings, &(mCtx->videoEncSettings), sizeof(XAVideoSettings));
+    DEBUG_API("<-XAVideoEncoderItfAdapt_GetVideoSettings");
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavideoencoderitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAVIDEOENCODERITFADAPTATION_H
+#define XAVIDEOENCODERITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+
+
+/* FUNCTIONS */
+XAresult XAVideoEncoderItfAdapt_SetVideoSettings(XAAdaptationGstCtx *bCtx,
+                                                 XAVideoSettings *pSettings  );
+XAresult XAVideoEncoderItfAdapt_GetVideoSettings( XAAdaptationGstCtx *bCtx,
+                                                  XAVideoSettings *pSettings );
+#endif /* XAVIDEOENCODERITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavideopostprosessingitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,863 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include <video.h>
+#include "xaadaptationgst.h"
+#include "xamediaplayeradaptctx.h"
+#include "xamediarecorderadaptctx.h"
+#include "xacameraadaptctx.h"
+#include "xavideopostprosessingitfadaptation.h"
+#include "xastaticcameracapsadaptation.h"
+
+/*
+ * XAresult XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported(XAAdaptationGstCtx *bCtx,
+ *                                                                     XAboolean *pSupported)
+ */
+XAresult XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported(XAAdaptationGstCtx *bCtx,
+                                                                    XAboolean *pSupported)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported");
+
+    if(!bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+            && bCtx->baseObj.ctxId != XACameraAdaptation) || !pSupported)
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* This feature is not supported, return boolean false */
+    *pSupported = XA_BOOLEAN_FALSE;
+
+    DEBUG_API("<-XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported");
+    return ret;
+}
+
+/*
+ * XAresult XAVideoPostProcessingItfAdapt_Commit(XAAdaptationGstCtx *bCtx)
+ */
+XAresult XAVideoPostProcessingItfAdapt_Commit(XAAdaptationGstCtx *bCtx,
+                                              XAmillidegree rotation,
+                                              XAuint32 scaleOptions,
+                                              XAuint32 backgroundColor,
+                                              XAuint32 renderingHints,
+                                              const XARectangle *pSrcRect,
+                                              const XARectangle *pDestRect,
+                                              XAuint32 mirror,
+                                              XAboolean isMirror,
+                                              XAboolean isRotate,
+                                              XAboolean isDestRect,
+                                              XAboolean isSrcRect,
+                                              XAboolean isScaleOptions
+                                              )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAmillidegree tempRotation = 0;
+    XAmillidegree newRotation = 0;
+    XAuint32 tempMirror = XA_VIDEOMIRROR_NONE;
+    XAuint32 newMirror = XA_VIDEOMIRROR_NONE;
+    XADataSource *dataSrc = NULL;
+    GstElement *cropElement = NULL;
+    GstElement *rotateElement = NULL;
+    GstElement *mirrorElement = NULL;
+    GstElement *boxElement = NULL;
+/*
+    GstElement *balanceElement = NULL;
+    GstElement *gammaElement = NULL;
+*/
+    GstElement *sink = NULL;
+    GstElement *col1 = NULL;
+    GstElement *scale = NULL;
+/*
+    gdouble     alphaValue = 1;
+    gint        videoBackgroundColor = 0;
+*/
+    gint            cropscaleRight = 0, cropscaleBottom = 0,
+                cropscaleLeft = 0,
+                cropscaleTop = 0,
+                videoscaleHeight = 0;
+    GstStateChangeReturn gstRet = GST_STATE_CHANGE_SUCCESS;
+    GstState gstOrigState = GST_STATE_PLAYING;
+    GstState gstTmpState = GST_STATE_PLAYING;
+
+    DEBUG_API("->XAVideoPostProcessingItfAdapt_Commit");
+
+    if( !bCtx || (bCtx->baseObj.ctxId != XAMediaPlayerAdaptation && bCtx->baseObj.ctxId != XAMediaRecorderAdaptation
+        && bCtx->baseObj.ctxId != XACameraAdaptation))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        XAMediaPlayerAdaptationCtx* ctx = (XAMediaPlayerAdaptationCtx*) bCtx;
+
+
+        /* Get video pp elements */
+        GstPad *pad = NULL;
+        GstCaps *caps = NULL;
+        col1 = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_colsp1");
+        cropElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_crop");
+        rotateElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_rotate");
+        mirrorElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_mirror");
+        boxElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_box");
+/*
+        balanceElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_balance");
+        gammaElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_gamma");
+*/
+        sink = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "videosink");
+        pad = gst_element_get_static_pad(GST_ELEMENT(sink),"sink");
+        caps = gst_caps_new_simple("video/x-raw-yuv",
+                 "width", G_TYPE_INT,0,
+                 "height", G_TYPE_INT,0,
+                 NULL);
+        gst_pad_set_caps(pad, caps);
+
+        /* get current mirror state and rotate value */
+        tempMirror = ctx->curMirror;
+        tempRotation = ctx->curRotation;
+        dataSrc = ctx->xaSource;
+    }
+
+    if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        XAMediaRecorderAdaptationCtx* ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+
+        /* Get video pp elements */
+        GstPad *pad = NULL;
+        GstCaps *caps = NULL;
+        scale = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_scale2");
+        col1 = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_colsp1");
+        cropElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_crop");
+        rotateElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_rotate");
+        mirrorElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_mirror");
+        boxElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_box");
+/*        balanceElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_balance");
+        gammaElement = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_gamma");*/
+        sink = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "datasink");
+        pad = gst_element_get_static_pad(GST_ELEMENT(sink),"sink");
+        caps = gst_caps_new_simple("video/x-raw-yuv",
+                 "width", G_TYPE_INT,0,
+                 "height", G_TYPE_INT,0,
+                 NULL);
+        gst_pad_set_caps(pad, caps);
+
+        /* get current mirror state and rotate value */
+        tempMirror = ctx->curMirror;
+        tempRotation = ctx->curRotation;
+    }
+
+    if( bCtx->baseObj.ctxId == XACameraAdaptation )
+    {
+        XACameraAdaptationCtx* ctx = (XACameraAdaptationCtx*) bCtx;
+
+        GstElement *videoPP = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "videopp_camera");
+        if( !videoPP )
+        {
+            DEBUG_ERR("Could not receive videopp from camerabin!");
+        }
+        else
+        {
+            /* Get camera pp elements */
+            GstPad *pad = NULL;
+            GstCaps *caps = NULL;
+            rotateElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_rotate");
+            col1 = gst_bin_get_by_name( GST_BIN(videoPP), "pp_colsp1");
+            cropElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_crop");
+            mirrorElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_mirror");
+            boxElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_box");
+/*            balanceElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_balance");
+            gammaElement = gst_bin_get_by_name( GST_BIN(videoPP), "pp_gamma");*/
+            sink = gst_bin_get_by_name( GST_BIN(ctx->baseObj.bin), "pp_crop");
+            pad = gst_element_get_static_pad(GST_ELEMENT(sink),"sink");
+            caps = gst_caps_new_simple("video/x-raw-yuv",
+                     "width", G_TYPE_INT,0,
+                     "height", G_TYPE_INT,0,
+                     NULL);
+            gst_pad_set_caps(pad, caps);
+
+            /* get current mirror state and rotate value */
+            tempMirror = ctx->curMirror;
+            tempRotation = ctx->curRotation;
+        }
+    }
+
+    /* Cropping */
+    if( isSrcRect && pSrcRect && cropElement && col1 )
+    {
+
+        gint        cropRight = 0;
+        gint        cropBottom = 0;
+        gint        cropLeft = 0;
+        gint        cropTop = 0;
+        GstPad      *videoPad = NULL;
+        gint        videoWidth = 0;
+        gint        videoHeight = 0;
+        DEBUG_INFO("Start cropping!");
+
+        DEBUG_INFO_A1("pSrcRect->left:%d",(int)pSrcRect->left);
+        DEBUG_INFO_A1("pSrcRect->top:%d",(int)pSrcRect->top);
+        DEBUG_INFO_A1("pSrcRect->width:%d",(int)pSrcRect->width);
+        DEBUG_INFO_A1("pSrcRect->height:%d", (int)pSrcRect->height);
+
+        if( bCtx->baseObj.ctxId == XACameraAdaptation )
+        {
+            GstCaps *caps = NULL;
+            XACameraAdaptationCtx* ctx = (XACameraAdaptationCtx*) bCtx;
+            gint capsCount = 0;
+            gint iterator = 0;
+            GstStructure *capsStruct = NULL;
+
+            g_object_get( G_OBJECT(ctx->baseObj.bin), "filter-caps", &caps, NULL );
+
+            if( !caps )
+            {
+                DEBUG_ERR("Cannot receive caps (filter-caps) from camerabin!");
+                DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit - XA_RESULT_INTERNAL_ERROR");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+
+            capsCount = gst_caps_get_size( caps );
+
+            for( iterator= 0; iterator < capsCount; iterator++ )
+            {
+                capsStruct = gst_caps_get_structure( caps, iterator );
+                if( capsStruct )
+                {
+                    if( !gst_structure_get_int( capsStruct, "width", &videoWidth ) )
+                    {
+                        DEBUG_ERR("Could not get width from filter-caps");
+                        videoWidth = TEST_VIDEO_WIDTH;
+                    }
+                    if( !gst_structure_get_int( capsStruct, "height", &videoHeight) )
+                    {
+                        DEBUG_ERR("Could not get height from filter-caps");
+                        videoHeight = TEST_VIDEO_HEIGHT;
+                    }
+                    DEBUG_INFO_A2("videoWidth:%d, videoHeight:%d",videoWidth,videoHeight);
+                }
+            }
+        }
+        else
+        {
+            GstCaps* negcapas=NULL;
+            videoPad = gst_element_get_pad( col1, "src" );
+            negcapas = gst_pad_get_negotiated_caps( GST_PAD(videoPad) );
+            if ( negcapas )
+            {
+                if( !gst_video_get_size( videoPad, &videoWidth, &videoHeight ) )
+                {
+                    DEBUG_ERR("WARN: Cannot receive video size, using defaults");
+                    videoWidth = TEST_VIDEO_WIDTH;
+                    videoHeight = TEST_VIDEO_HEIGHT;
+                }
+            }
+            else
+            {
+				videoWidth = TEST_VIDEO_WIDTH;
+				videoHeight = TEST_VIDEO_HEIGHT;
+            }
+        }
+
+        DEBUG_INFO_A2("Received video frame info, videoWidth:%d, videoHeight:%d",videoWidth,videoHeight);
+        cropLeft = (gint)pSrcRect->left;
+        cropTop = (gint)pSrcRect->top;
+        cropRight = videoWidth - ((gint)pSrcRect->left + (gint)pSrcRect->width);
+        cropBottom = videoHeight - ((gint)pSrcRect->top + (gint)pSrcRect->height);
+        DEBUG_INFO_A4("Crop values - cropLeft:%d ,cropTop:%d,cropRight:%d,cropBottom:%d", cropLeft,cropTop,cropRight,cropBottom);
+
+        if( cropBottom >= 0 && cropLeft >=0 && cropRight >= 0  && cropTop >= 0 )
+        {
+            g_object_set(G_OBJECT(cropElement), "bottom",cropBottom, NULL);
+            g_object_set(G_OBJECT(cropElement), "left", cropLeft, NULL);
+            g_object_set(G_OBJECT(cropElement), "right", cropRight, NULL);
+            g_object_set(G_OBJECT(cropElement), "top", cropTop, NULL);
+        }
+        else
+        {
+            if( cropLeft > videoWidth || cropLeft < 0 ||
+                cropRight > videoWidth || cropRight < 0 ||
+                cropBottom > videoHeight || cropBottom < 0 ||
+                cropTop > videoHeight || cropTop < 0)
+            {
+                DEBUG_INFO("Cropped params out of original frame.");
+            }
+        }
+    }
+
+    if(rotateElement && isRotate)
+    {
+        DEBUG_INFO("Start rotating!");
+
+        /* calculate rotation */
+        newRotation = tempRotation + rotation;
+
+        if( newRotation > ROTATION_RATIO || newRotation < ROTATION_RATIO_NEG )
+        {
+            newRotation = newRotation % ROTATION_RATIO;
+        }
+
+        /* Set rotation */
+        switch(newRotation)
+        {
+            case 0:
+            {
+                /* no rotation */
+                DEBUG_INFO("Set rotation FLIP_NONE");
+                g_object_set(G_OBJECT(rotateElement), "method", FLIP_NONE, NULL);
+                break;
+            }
+            case 90000:
+            case -270000:
+            {
+                /* rotation 90 degree */
+                DEBUG_INFO("Set rotation 90 degrees");
+                g_object_set(G_OBJECT(rotateElement), "method", FLIP_CLOCKWISE, NULL);
+                break;
+            }
+            case 180000:
+            case -180000:
+            {
+                /* rotation 180 degree */
+                DEBUG_INFO("Set rotation 180 degrees");
+                g_object_set(G_OBJECT(rotateElement), "method", FLIP_ROTATE_180, NULL);
+                break;
+            }
+            case 270000:
+            case -90000:
+            {
+                /* rotation 270 degree */
+                DEBUG_INFO("Set rotation 270 degrees");
+                g_object_set(G_OBJECT(rotateElement), "method", FLIP_COUNTERCLOCKWISE, NULL);
+                break;
+            }
+            case 360000:
+            case -360000:
+            {
+                /* rotation 360 degree */
+                DEBUG_INFO("Set rotation 360 degrees");
+                g_object_set(G_OBJECT(rotateElement), "method", FLIP_NONE, NULL);
+                break;
+            }
+            default:
+            {
+                /* no rotation */
+                DEBUG_INFO("Set rotation default (FLIP_NONE) degree");
+                g_object_set(G_OBJECT(rotateElement), "method", FLIP_NONE, NULL);
+                break;
+            }
+        }
+
+        /* Store current rotate value */
+        if( bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+        {
+            XAMediaPlayerAdaptationCtx* ctx = (XAMediaPlayerAdaptationCtx*) bCtx;
+            ctx->curRotation = newRotation;
+        }
+        if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+        {
+            XAMediaRecorderAdaptationCtx* ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+            ctx->curRotation = newRotation;
+        }
+        if( bCtx->baseObj.ctxId == XACameraAdaptation )
+        {
+            XACameraAdaptationCtx* ctx = (XACameraAdaptationCtx*) bCtx;
+            ctx->curRotation = newRotation;
+        }
+    }
+
+    if(mirrorElement && isMirror)
+    {
+        /* solve new mirror state */
+        switch(mirror)
+        {
+            case XA_VIDEOMIRROR_NONE:
+            {
+                newMirror = tempMirror;
+                break;
+            }
+            case XA_VIDEOMIRROR_VERTICAL:
+            {
+                if( tempMirror == XA_VIDEOMIRROR_VERTICAL )
+                {
+                    newMirror = XA_VIDEOMIRROR_NONE;
+                }
+                else if( tempMirror == XA_VIDEOMIRROR_HORIZONTAL )
+                {
+                    newMirror = XA_VIDEOMIRROR_BOTH;
+                }
+                else if( tempMirror == XA_VIDEOMIRROR_BOTH )
+                {
+                    newMirror = XA_VIDEOMIRROR_HORIZONTAL;
+                }
+                else
+                {
+                    newMirror = XA_VIDEOMIRROR_VERTICAL;
+                }
+                break;
+            }
+            case XA_VIDEOMIRROR_HORIZONTAL:
+            {
+                if( tempMirror == XA_VIDEOMIRROR_VERTICAL )
+                {
+                    newMirror = XA_VIDEOMIRROR_BOTH;
+                }
+                else if( tempMirror == XA_VIDEOMIRROR_HORIZONTAL )
+                {
+                    newMirror = XA_VIDEOMIRROR_NONE;
+                }
+                else if( tempMirror == XA_VIDEOMIRROR_BOTH )
+                {
+                    newMirror = XA_VIDEOMIRROR_VERTICAL;
+                }
+                else
+                {
+                    newMirror = XA_VIDEOMIRROR_HORIZONTAL;
+                }
+                break;
+            }
+            case XA_VIDEOMIRROR_BOTH:
+            {
+                if( tempMirror == XA_VIDEOMIRROR_VERTICAL )
+                {
+                    newMirror = XA_VIDEOMIRROR_HORIZONTAL;
+                }
+                else if( tempMirror == XA_VIDEOMIRROR_HORIZONTAL )
+                {
+                    newMirror = XA_VIDEOMIRROR_VERTICAL;
+                }
+                else if( tempMirror == XA_VIDEOMIRROR_BOTH )
+                {
+                    newMirror = XA_VIDEOMIRROR_NONE;
+                }
+                else
+                {
+                    newMirror = XA_VIDEOMIRROR_BOTH;
+                }
+                break;
+            }
+            default:
+                break;
+        }
+
+
+        DEBUG_INFO("Start mirroring!");
+        /* Set mirror */
+        switch(newMirror)
+        {
+            case XA_VIDEOMIRROR_NONE:
+            {
+                /* none */
+                DEBUG_INFO("Set mirror none");
+                g_object_set(G_OBJECT(mirrorElement), "method", FLIP_NONE, NULL);
+                break;
+            }
+            case XA_VIDEOMIRROR_VERTICAL:
+            {
+                /* vertical mirror */
+                DEBUG_INFO("Set mirror vertical");
+                g_object_set(G_OBJECT(mirrorElement), "method", FLIP_VERTICAL, NULL);
+                break;
+            }
+            case XA_VIDEOMIRROR_HORIZONTAL:
+            {
+                /* horizontal mirror */
+                DEBUG_INFO("Set mirror horizontal");
+                g_object_set(G_OBJECT(mirrorElement), "method", FLIP_HORIZONTAL, NULL);
+                break;
+            }
+            case XA_VIDEOMIRROR_BOTH:
+            {
+                /* both mirror */
+                DEBUG_INFO("Set mirror vertical and horizontal");
+                g_object_set(G_OBJECT(mirrorElement), "method", FLIP_ROTATE_180, NULL);
+                break;
+            }
+            default:
+            {
+                /* Default no mirroring */
+                g_object_set(G_OBJECT(mirrorElement), "method", FLIP_NONE, NULL);
+                break;
+            }
+        }
+
+        /* Store current mirror state */
+        if( bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
+        {
+            XAMediaPlayerAdaptationCtx* ctx = (XAMediaPlayerAdaptationCtx*) bCtx;
+            ctx->curMirror = newMirror;
+        }
+        if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+        {
+            XAMediaRecorderAdaptationCtx* ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
+            ctx->curMirror = newMirror;
+        }
+        if( bCtx->baseObj.ctxId == XACameraAdaptation )
+        {
+            XACameraAdaptationCtx* ctx = (XACameraAdaptationCtx*) bCtx;
+            ctx->curMirror = newMirror;
+        }
+    }
+
+    /* Set scale */
+    if ( isScaleOptions || isDestRect || isSrcRect )
+    {
+		switch( scaleOptions )
+		{
+
+			case XA_VIDEOSCALE_STRETCH:
+			{
+				DEBUG_INFO("XA_VIDEOSCALE_STRETCH");
+				/* The source and destination rectangle's width and height params are used to calculate
+				 * the scaling factors independently. Aspect ratio is ignored. */
+				if (pDestRect)
+				{
+					if (bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+					{
+						GstPad *pad = NULL;
+						GstCaps* simplecaps = NULL;
+						g_object_set ( G_OBJECT(sink), "force-aspect-ratio", FALSE, NULL);
+						simplecaps = gst_caps_new_simple("video/x-raw-rgb",
+											"width", G_TYPE_INT, pDestRect->width,
+											"height", G_TYPE_INT, pDestRect->height,
+											"framerate", GST_TYPE_FRACTION, 0,1,
+											NULL);
+						DEBUG_API_A1("caps: %s",gst_caps_to_string(simplecaps));
+						pad = gst_element_get_static_pad(GST_ELEMENT(sink),"sink");
+						if (!gst_pad_set_caps(pad, simplecaps))
+						{
+							DEBUG_INFO("Stubbed at this point");
+							DEBUG_INFO("Cannot set destrect size during XA_VIDEOSCALE_STRETCH!");
+							DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit - XA_VIDEOSCALE_STRETCH");
+							return XA_RESULT_SUCCESS;
+						}
+						DEBUG_API_A1("ret: %lu",ret);
+					}
+					else
+					{
+						GstCaps* simplecaps = NULL;
+						GstPad *pad = NULL;
+						if ( !scale )
+						{
+							DEBUG_ERR("Could not get scaling element from pipeline!");
+							DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit - XA_RESULT_INTERNAL_ERROR");
+							return XA_RESULT_INTERNAL_ERROR;
+						}
+						simplecaps = gst_caps_new_simple("video/x-raw-yuv",
+											"width", G_TYPE_INT, pDestRect->width,
+											"height", G_TYPE_INT, pDestRect->height,
+											"framerate", GST_TYPE_FRACTION, 0,1,
+											NULL);
+						DEBUG_API_A1("caps: %s",gst_caps_to_string(simplecaps));
+						pad = gst_element_get_static_pad(GST_ELEMENT(scale),"src");
+						if (!gst_pad_set_caps(pad, simplecaps))
+						{
+							DEBUG_INFO("Stubbed at this point");
+							DEBUG_INFO("Cannot set destrect size during XA_VIDEOSCALE_STRETCH!");
+							DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit - XA_VIDEOSCALE_STRETCH");
+							return XA_RESULT_SUCCESS;
+						}
+
+					}
+				}
+				DEBUG_INFO("XA_VIDEOSCALE_STRETCH Done");
+
+				break;
+			}
+			case XA_VIDEOSCALE_FIT:
+			{
+				DEBUG_INFO("XA_VIDEOSCALE_FIT");
+				/* The miminum scale factor between the destination rectangle's width over the
+				 * source rectangle's 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 */
+				if (pDestRect)
+				{
+					if (bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+					{
+						GstPad *pad = NULL;
+						GstCaps* simplecaps = NULL;
+						g_object_set ( G_OBJECT(sink), "force-aspect-ratio", TRUE, NULL);
+						simplecaps = gst_caps_new_simple("video/x-raw-rgb",
+											"width", G_TYPE_INT, pDestRect->width,
+											"height", G_TYPE_INT, pDestRect->height,
+											"framerate", GST_TYPE_FRACTION, 0,1,
+											NULL);
+						DEBUG_API_A1("caps: %s",gst_caps_to_string(simplecaps));
+						pad = gst_element_get_static_pad(GST_ELEMENT(sink),"sink");
+						if (!gst_pad_set_caps(pad, simplecaps))
+						{
+							DEBUG_INFO("Stubbed at this point");
+							DEBUG_INFO("Cannot set destrect size during XA_VIDEOSCALE_FIT!");
+							DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit - XA_VIDEOSCALE_FIT");
+							return XA_RESULT_SUCCESS;
+						}
+					}
+					else
+					{
+						GstPad *videoScalePad = NULL;
+						GstCaps *negcaps = NULL;
+						gint videoScalePadHeight = 0, videoScalePadWidth = 0;
+						gfloat scaleFactorWidth = 0;
+						gfloat scaleFactorHeight = 0;
+						gfloat scaleFactor = 0;
+						videoScalePad = gst_element_get_pad( col1, "src" );
+						negcaps = gst_pad_get_negotiated_caps( GST_PAD(videoScalePad) );
+						if ( negcaps )
+						{
+							if( !gst_video_get_size( videoScalePad, &videoScalePadWidth, &videoScalePadHeight ) )
+							{
+								DEBUG_ERR("Cannot receive current cropscalevideo size!");
+								DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit - XA_RESULT_INTERNAL_ERROR");
+								return XA_RESULT_INTERNAL_ERROR;
+							}
+						}
+						else
+						{
+							DEBUG_ERR("No negotiated caps in col1:src!");
+							DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit");
+							return XA_RESULT_SUCCESS;
+						}
+						if (pSrcRect->width != 0 && pSrcRect->height != 0)
+						{
+							scaleFactorWidth = (gfloat)videoScalePadWidth / (gfloat)pSrcRect->width;
+							scaleFactorHeight = (gfloat)videoScalePadHeight / (gfloat)pSrcRect->height;
+							if (scaleFactorWidth < scaleFactorHeight)
+							{
+								scaleFactor = scaleFactorWidth;
+							}
+							else
+							{
+								scaleFactor = scaleFactorHeight;
+							}
+
+							cropscaleBottom = (gint)(pSrcRect->height*scaleFactor - videoScalePadHeight)/2;
+							cropscaleLeft = (gint)(pSrcRect->width*scaleFactor - videoScalePadWidth)/2;
+							if (cropscaleLeft > 0){
+								cropscaleLeft *= -1;
+							}
+							cropscaleRight = cropscaleLeft;
+							if (cropscaleBottom > 0){
+								cropscaleBottom *= -1;
+							}
+							cropscaleTop = cropscaleBottom;
+							g_object_set (G_OBJECT (boxElement), "bottom", cropscaleBottom , NULL);
+							g_object_set (G_OBJECT (boxElement), "right", cropscaleRight, NULL);
+							g_object_set (G_OBJECT (boxElement), "left", cropscaleLeft, NULL);
+							g_object_set (G_OBJECT (boxElement), "top", cropscaleTop, NULL);
+						}
+					}
+				}
+				DEBUG_INFO("XA_VIDEOSCALE_FIT done");
+
+				break;
+			}
+			case XA_VIDEOSCALE_CROP:
+			{
+				DEBUG_INFO("XA_VIDEOSCALE_CROP");
+				/* The maximum scale factor between the destination rectangle's width over the source
+				 * rectangle's width and destination rectangle's height over the source rectangle's
+				 * height is used. Aspect ratio is maintained. Frame is centered. */
+				if( pDestRect && pSrcRect )
+				{
+					GstPad *videoScalePad = NULL;
+					GstCaps *negcaps = NULL;
+					gint videoScalePadHeight = 0, videoScalePadWidth = 0;
+					videoScalePad = gst_element_get_pad( col1, "src" );
+					negcaps = gst_pad_get_negotiated_caps( GST_PAD(videoScalePad) );
+					if ( negcaps )
+					{
+						if( !gst_video_get_size( videoScalePad, &videoScalePadWidth, &videoScalePadHeight ) )
+						{
+							DEBUG_ERR("Cannot receive current cropscalevideo size!");
+							DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit - XA_RESULT_INTERNAL_ERROR");
+							return XA_RESULT_INTERNAL_ERROR;
+						}
+					}
+					else
+					{
+						DEBUG_ERR("No negotiated caps in col1:src!");
+						DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit");
+						return XA_RESULT_SUCCESS;
+					}
+
+					DEBUG_INFO_A2( "Received video scale frame info, videoScalePadWidth:%d, "
+									"videoScalePadHeight:%d",videoScalePadWidth,videoScalePadHeight);
+
+					if( pSrcRect->height > 0 && pSrcRect->width > 0 )
+					{
+						if( pSrcRect->height > pDestRect->height )
+						{
+							videoscaleHeight = pSrcRect->height;
+							if( pDestRect->top == 0)
+							{
+								cropscaleTop = ((videoscaleHeight - pDestRect->height)/2);
+								cropscaleBottom = ((videoscaleHeight - pDestRect->height)/2);
+							}
+							else
+							{
+								cropscaleTop = (pDestRect->top/2);
+								cropscaleBottom = (pDestRect->top/2);
+							}
+						}
+						else if( pDestRect->height > pSrcRect->height )
+						{
+							videoscaleHeight = pDestRect->height;
+							if( pDestRect->top == 0)
+							{
+								cropscaleTop = -((videoscaleHeight - pSrcRect->height)/2);
+								cropscaleBottom = -((videoscaleHeight - pSrcRect->height)/2);
+							}
+							else
+							{
+								cropscaleTop = -(pDestRect->top/2);
+								cropscaleBottom = -(pDestRect->top/2);
+							}
+						}
+						else if( pDestRect->height == pSrcRect->height )
+						{
+						}
+						else
+						{
+						}
+						if( pSrcRect->width > pDestRect->width )
+						{
+							if( pDestRect->left == 0 )
+							{
+								cropscaleLeft = ((gint)(pSrcRect->width -pDestRect->width)/2);
+								cropscaleRight = ((gint)(pSrcRect->width -pDestRect->width)/2);
+							}
+							else
+							{
+								cropscaleLeft = (pDestRect->left/2);
+								cropscaleRight = (pDestRect->left/2);
+							}
+						}
+						else if( pDestRect->width > pSrcRect->width )
+						{
+							if( pDestRect->left == 0 )
+							{
+								cropscaleLeft =-((gint)(pDestRect->width -pSrcRect->width)/2);
+								cropscaleRight =-((gint)(pDestRect->width -pSrcRect->width)/2);
+							}
+							else
+							{
+								cropscaleLeft = -(pDestRect->left/2);
+								cropscaleRight = -(pDestRect->left/2);
+							}
+						}
+						else if( pDestRect->width == pSrcRect->width )
+						{
+						}
+						else
+						{
+						}
+					}
+					else
+					{
+						DEBUG_ERR("Invalid rectangle values in source rectangles");
+						DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit, Exit with invalid source rectangle values");
+						return XA_RESULT_PARAMETER_INVALID;
+					}
+					if( pDestRect->width != pSrcRect->width && pDestRect->height != pSrcRect->height )
+					{
+						  DEBUG_INFO_A4("Crop values - cropscaleLeft:%d "
+										",cropscaleTop:%d,"
+										"cropscaleRight:%d,"
+										"cropscaleBottom:%d",
+										cropscaleLeft,
+										cropscaleTop,
+										cropscaleRight,
+										cropscaleBottom);
+						g_object_set (G_OBJECT (boxElement), "bottom",cropscaleBottom , NULL);
+						g_object_set (G_OBJECT (boxElement), "right", cropscaleRight, NULL);
+						g_object_set (G_OBJECT (boxElement), "left", cropscaleLeft, NULL);
+						g_object_set (G_OBJECT (boxElement), "top",cropscaleTop, NULL);
+					}
+				}
+				break;
+			}
+			default:
+				DEBUG_INFO("no scale options!");
+				break;
+		}
+    }
+
+    
+    /*TODO The Code below does nothing. just set the variable which are never used.
+     * commenting the code below. */
+/*    if(pDestRect && boxElement)
+    {
+         is background color black 
+        if((backgroundColor >> 8) & BLACK_BG_COLOR_MASK)
+        {
+            videoBackgroundColor = 0;
+        }
+         is background color green 
+        else if((backgroundColor >> 8) & GREEN_BG_COLOR_MASK)
+        {
+            videoBackgroundColor = 1;
+        }
+         is background color blue 
+        else if((backgroundColor >> 8) & BLUE_BG_COLOR_MASK)
+        {
+            videoBackgroundColor = 2;
+        }
+        else
+        {
+             by default black 
+            videoBackgroundColor = 0;
+        }
+
+         check alpha value. Gst support values 0 to 1 and XA 0 to 255 
+        {
+            XAuint32 tempColor = 0;
+            tempColor = backgroundColor & ALPHA_VALUE_MASK;
+
+            alphaValue = (gdouble)(tempColor/ALPHA_VALUE_MASK);
+        }
+    
+    
+    }*/
+
+    if( dataSrc )
+    {
+        XAMediaType mediaType = XA_MEDIATYPE_UNKNOWN;
+        ret = XACommon_CheckDataSource(dataSrc, &mediaType);
+        if( ret == XA_RESULT_SUCCESS && mediaType == XA_MEDIATYPE_IMAGE )
+        {
+            gstOrigState = GST_STATE(bCtx->bin);
+
+            DEBUG_INFO_A1("Sending change state request to state %d", GST_STATE_READY);
+            gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), GST_STATE_READY);
+            gstTmpState = GST_STATE(bCtx->bin);
+            
+            if(gstRet == GST_STATE_CHANGE_SUCCESS && gstTmpState == GST_STATE_READY)
+            {
+            DEBUG_INFO_A1("Sending change state request to state %d", gstOrigState);
+            gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), gstOrigState);
+            }
+        }
+    }
+
+    DEBUG_API("<-XAVideoPostProcessingItfAdapt_Commit");
+    return ret;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavideopostprosessingitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAVIDEOPOSTPROSESSINGITFADAPTATION_H
+#define XAVIDEOPOSTPROSESSINGITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xathreadsafety.h"
+
+/* MACROS */
+#define BLACK_BG_COLOR_MASK  0x00FFFFFF
+#define GREEN_BG_COLOR_MASK  0x0000FF00
+#define BLUE_BG_COLOR_MASK   0x000000FF
+#define ALPHA_VALUE_MASK     0x000000FF
+
+#define TEST_VIDEO_WIDTH     640
+#define TEST_VIDEO_HEIGHT    480
+
+#define ROTATION_RATIO       360000
+#define ROTATION_RATIO_NEG   -360000
+
+/* FUNCTIONS */
+XAresult XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported(XAAdaptationGstCtx *bCtx,
+                                                                    XAboolean *pSupported);
+
+XAresult XAVideoPostProcessingItfAdapt_Commit(XAAdaptationGstCtx *bCtx,
+                                              XAmillidegree rotation,
+                                              XAuint32 scaleOptions,
+                                              XAuint32 backgroundColor,
+                                              XAuint32 renderingHints,
+                                              const XARectangle *pSrcRect,
+                                              const XARectangle *pDestRect,
+                                              XAuint32 mirror,
+                                              XAboolean isMirror,
+                                              XAboolean isRotate,
+                                              XAboolean isDestRect,
+                                              XAboolean isSrcRect,
+                                              XAboolean isScaleOptions
+                                              );
+
+#endif /* XAVIDEOPOSTPROSESSINGITFADAPTATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavolumeitfadaptation.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,502 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <gst.h>
+#include <mixer.h>
+#include "xaadaptationgst.h"
+#include "xavolumeitfadaptation.h"
+#include "xamediaplayeradaptctx.h"
+
+#include "xaoutputmixadaptctx.h"
+#include "xamediarecorderadaptctx.h"
+
+/*
+ * XAresult XAVolumeItfAdapt_FlushBin(XAAdaptationGstCtx *ctx)
+ */
+XAresult XAVolumeItfAdapt_FlushBin(XAAdaptationGstCtx *ctx)
+{
+    DEBUG_API("->XAVolumeItfAdapt_FlushBin");
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation ))
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    if (GST_STATE(ctx->bin) != GST_STATE_PLAYING)
+    {
+        gint64 position = 0;
+        GstFormat format = GST_FORMAT_TIME;
+
+        if (! gst_element_query_position( GST_ELEMENT(ctx->bin), &format, &position  ))
+            {
+                DEBUG_ERR("Gst: Failed to get position");
+				return XA_RESULT_INTERNAL_ERROR;
+            }
+        XAAdaptationGst_PrepareAsyncWait(ctx);
+        /* in effect seeks to current position and flushing the buffer, due to
+         * gstreamer implementation actual position might change, if stopped, seek to beginning
+         */
+        if(!gst_element_seek( ctx->bin, ((XAMediaPlayerAdaptationCtx*)ctx)->playrate, GST_FORMAT_TIME,
+                            (GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE),
+                            GST_SEEK_TYPE_SET, position,
+                            GST_SEEK_TYPE_NONE, (gint64)GST_CLOCK_TIME_NONE))
+        {
+            DEBUG_ERR("WARN: gst reports seek not handled");
+        }
+        /* flushed seeks always asynchronous */
+        XAAdaptationGst_StartAsyncWait(ctx);
+        DEBUG_INFO("Bin flushed.");
+        ctx->waitingasyncop = XA_BOOLEAN_FALSE;
+    }
+    DEBUG_API("<-XAVolumeItfAdapt_FlushBin");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAVolumeItfAdapt_SetVolumeLevel(void *ctx, AdaptationContextIDS ctx->baseObj.ctxId,
+ *                                          XAmillibel level)
+ * @param void *ctx - Adaptation context, this will be casted to correct type regarding to contextID
+ * XAmillibel level - Requested volume level, in between XA_MILLIBEL_MIN and XA_MILLIBEL_MAX
+ * @return XAresult ret - Success value
+ */
+XAresult XAVolumeItfAdapt_SetVolumeLevel(XAAdaptationGstCtx *ctx, XAmillibel level)
+{
+    GstElement *vol=NULL, *audiopp=NULL;
+    gdouble gstVolume = 0;
+    XAmillibel tempVolumeLevel = 0;
+    XAresult res = XA_RESULT_SUCCESS;
+
+    DEBUG_API_A1("->XAVolumeItfAdapt_SetVolumeLevel (level %d)", level);
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XAOutputMixAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVolumeItfAdapt_SetVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( level <= MIN_SUPPORT_VOLUME_LEVEL )
+    {
+        tempVolumeLevel = MIN_SUPPORT_VOLUME_LEVEL;
+    }
+    else if( level >= MAX_SUPPORT_VOLUME_LEVEL )
+    {
+        tempVolumeLevel = MAX_SUPPORT_VOLUME_LEVEL;
+    }
+    else
+    {
+        tempVolumeLevel = level;
+    }
+    gstVolume = ( ( (gdouble)(VOLUME_LEVEL_RATIO + tempVolumeLevel)/ VOLUME_LEVEL_RATIO) );
+
+    if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        XAMediaPlayerAdaptationCtx* context = (XAMediaPlayerAdaptationCtx*) ctx;
+        audiopp = gst_bin_get_by_name( GST_BIN(context->baseObj.bin), "audiopp" );
+        if(audiopp)
+        {
+            vol = gst_bin_get_by_name( GST_BIN(audiopp), "pp_vol" );
+        }
+        if(vol)
+        {
+            DEBUG_INFO_A1("Setting gst level to %f",gstVolume);
+            g_object_set( G_OBJECT(vol), "volume", (gdouble)gstVolume, NULL );
+
+            XAVolumeItfAdapt_FlushBin(ctx);
+        }
+        else
+        {
+            DEBUG_ERR("Could not find gst volume controller element!!");
+        }
+    }
+    else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        XAMediaRecorderAdaptationCtx* context = (XAMediaRecorderAdaptationCtx*) ctx;
+        audiopp = gst_bin_get_by_name( GST_BIN(context->baseObj.bin), "audiopp" );
+        if(audiopp)
+        {
+            vol = gst_bin_get_by_name( GST_BIN(audiopp), "pp_vol" );
+        }
+        if(vol)
+        {
+            DEBUG_INFO_A1("Setting gst level to %f",gstVolume);
+            g_object_set( G_OBJECT(vol), "volume", (gdouble)gstVolume, NULL );
+        }
+        else
+        {
+            DEBUG_ERR("Could not find gst volume controller element!!");
+        }
+    }
+    else if (ctx->baseObj.ctxId == XAOutputMixAdaptation )
+    {
+        XAOutputMixAdaptationCtx* context = (XAOutputMixAdaptationCtx*) ctx;
+        guint iterator = 0;
+        for ( iterator = 0; iterator < context->connectedObjects->len; iterator++ )
+        {
+            GstBin* basebin = NULL;
+            XAAdaptationGstCtx* bCtx = g_array_index(context->connectedObjects,XAOMixAdaptConnObj,iterator).ctx;
+            if(!bCtx)
+            {
+                DEBUG_ERR_A1("Context in connected objects array (index %u) is NULL!", iterator);
+                DEBUG_API("<-XAVolumeItfAdapt_SetVolumeLevel");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+
+            basebin = GST_BIN(bCtx->bin);
+            if(!basebin)
+            {
+                DEBUG_ERR_A1("Bin in connected objects context (index %u) is NULL!", iterator);
+                DEBUG_API("<-XAVolumeItfAdapt_SetVolumeLevel");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+
+            audiopp = gst_bin_get_by_name( basebin, "audiopp" );
+            if(audiopp)
+            {
+                vol = gst_bin_get_by_name( GST_BIN(audiopp), "pp_vol" );
+            }
+            if(vol)
+            {
+                DEBUG_INFO_A1("Setting gst level to %f",gstVolume);
+                g_object_set( G_OBJECT(vol), "volume", (gdouble)gstVolume, NULL );
+
+                XAVolumeItfAdapt_FlushBin(bCtx);
+            }
+            else
+            {
+                DEBUG_ERR_A1("Could not find gst volume controller for player %u!!", iterator);
+            }
+        }
+    }
+    DEBUG_API("<-XAVolumeItfAdapt_SetVolumeLevel");
+    return res;
+}
+
+/*
+ * XAresult XAVolumeItfAdapt_GetMaxVolumeLevel(void *ctx, AdaptationContextIDS ctx->baseObj.ctxId,
+                                            XAmillibel *pMaxLevel)
+ * @param void *ctx - Adaptation context, this will be casted to correct type regarding to contextID value given as 2nd parameter
+ * @param AdaptationContextIDS ctx->baseObj.ctxId - Type specifier for context, this will be used to cast ctx pointer to correct type.
+ * XAmillibel *pMaxLevel - Maximum volume level
+ * @return XAresult ret - Success value
+ */
+XAresult XAVolumeItfAdapt_GetMaxVolumeLevel(XAAdaptationGstCtx *ctx, XAmillibel *pMaxLevel)
+{
+    DEBUG_API("->XAVolumeItfAdapt_GetMaxVolumeLevel");
+
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XAOutputMixAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVolumeItfAdapt_GetMaxVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    *pMaxLevel = MAX_SUPPORT_VOLUME_LEVEL;
+
+    DEBUG_API("<-XAVolumeItfAdapt_GetMaxVolumeLevel");
+
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAVolumeItfAdapt_SetMute(void *ctx, AdaptationContextIDS ctx->baseObj.ctxId, XAboolean mute)
+ * @param void *ctx - Adaptation context, this will be casted to correct type regarding to contextID value given as 2nd parameter
+ * @param AdaptationContextIDS ctx->baseObj.ctxId - Type specifier for context, this will be used to cast ctx pointer to correct type.
+ * @param XAboolean mute - status of mute value
+ * @return XAresult ret - Success value
+ */
+XAresult XAVolumeItfAdapt_SetMute(XAAdaptationGstCtx *ctx, XAboolean mute)
+{
+    GstElement *vol=NULL, *audiopp=NULL;
+    gboolean gmute = 0;
+
+    DEBUG_API("->XAVolumeItfAdapt_SetMute");
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XAOutputMixAdaptation ) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVolumeItfAdapt_SetMute");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+        XAMediaPlayerAdaptationCtx* context = (XAMediaPlayerAdaptationCtx*) ctx;
+        context->mute = mute;
+        audiopp = gst_bin_get_by_name( GST_BIN(context->baseObj.bin), "audiopp" );
+        if(audiopp)
+        {
+            vol = gst_bin_get_by_name( GST_BIN(audiopp), "pp_vol" );
+        }
+        if(vol)
+        {
+            if ( mute )
+            {
+                gmute = 1;
+            }
+            else
+            {
+                gmute = 0;
+            }
+            g_object_set( G_OBJECT(vol), "mute", gmute, NULL );
+        }
+        else
+        {
+            DEBUG_ERR("Could not find gst volume controller element!!");
+        }
+    }
+    else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+        XAMediaRecorderAdaptationCtx* context = (XAMediaRecorderAdaptationCtx*) ctx;
+        context->mute = mute;
+        audiopp = gst_bin_get_by_name( GST_BIN(context->baseObj.bin), "audiopp" );
+        if(audiopp)
+        {
+            vol = gst_bin_get_by_name( GST_BIN(audiopp), "pp_vol" );
+        }
+        if(vol)
+        {
+            if ( mute )
+            {
+                gmute = 1;
+            }
+            else
+            {
+                gmute = 0;
+            }
+            g_object_set( G_OBJECT(vol), "mute", gmute, NULL );
+        }
+        else
+        {
+            DEBUG_ERR("Could not find gst volume controller element!!");
+        }
+    }
+    else if ( ctx->baseObj.ctxId == XAOutputMixAdaptation )
+    {
+        XAOutputMixAdaptationCtx* context = (XAOutputMixAdaptationCtx*) ctx;
+        guint iterator = 0;
+        context->mute = mute;
+        for ( iterator = 0; iterator < context->connectedObjects->len; iterator++ )
+        {
+            GstBin* basebin = NULL;
+            XAAdaptationGstCtx* bCtx = g_array_index(context->connectedObjects,XAOMixAdaptConnObj,iterator).ctx;
+            if(!bCtx)
+            {
+                DEBUG_ERR_A1("Context in connected objects array (index %u) is NULL!", iterator);
+                DEBUG_API("<-XAVolumeItfAdapt_SetMute");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+
+            basebin = GST_BIN(bCtx->bin);
+            if(!basebin)
+            {
+                DEBUG_ERR_A1("Bin in connected objects context (index %u) is NULL!", iterator);
+                DEBUG_API("<-XAVolumeItfAdapt_SetMute");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+
+            audiopp = gst_bin_get_by_name( basebin, "audiopp" );
+            if(audiopp)
+            {
+                vol = gst_bin_get_by_name( GST_BIN(audiopp), "pp_vol" );
+            }
+            if(vol)
+            {
+                if ( mute )
+                {
+                    gmute = 1;
+                }
+                else
+                {
+                    gmute = 0;
+                }
+                g_object_set( G_OBJECT(vol), "mute", gmute, NULL );
+            }
+            else
+            {
+                DEBUG_ERR_A1("Could not find gst volume controller for player %u!!", iterator);
+            }
+        }
+    }
+    DEBUG_API("<-XAVolumeItfAdapt_SetMute");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAVolumeItfAdapt_EnableStereoPosition(XAAdaptationGstCtx *ctx, XAboolean enable)
+ * @param XAAdaptationGstCtx *ctx - Adaptation context
+ * @param XAboolean enable - Enable Stereo Position
+ * @return XAresult - Success value
+ */
+XAresult XAVolumeItfAdapt_EnableStereoPosition(XAAdaptationGstCtx *ctx, XAboolean enable)
+{
+    DEBUG_API("->XAVolumeItfAdapt_EnableStereoPosition");
+
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XAOutputMixAdaptation ) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVolumeItfAdapt_EnableStereoPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation  )
+    {
+        XAMediaPlayerAdaptationCtx* context = (XAMediaPlayerAdaptationCtx*) ctx;
+        context->isStereoPosition = enable;
+    }
+    else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation  )
+    {
+        XAMediaRecorderAdaptationCtx* context = (XAMediaRecorderAdaptationCtx*) ctx;
+        context->isStereoPosition = enable;
+    }
+    else if ( ctx->baseObj.ctxId == XAOutputMixAdaptation  )
+    {
+        XAOutputMixAdaptationCtx* context = (XAOutputMixAdaptationCtx*) ctx;
+        context->isStereoPosition = enable;
+    }
+
+    DEBUG_API("<-XAVolumeItfAdapt_EnableStereoPosition");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAVolumeItfAdapt_SetStereoPosition(XAAdaptationGstCtx *ctx, XApermille stereoPosition)
+ * @param XAAdaptationGstCtx *ctx - Adaptation context
+ * @param XApermille stereoPosition - Stereo Position to be set
+ * @return XAresult - Success value
+ */
+XAresult XAVolumeItfAdapt_SetStereoPosition(XAAdaptationGstCtx *ctx,
+                                            XApermille stereoPosition)
+{
+    GstElement *audiopp = NULL, *pan = NULL;
+    gfloat gstPosition = 0.0;
+
+    DEBUG_API("->XAVolumeItfAdapt_SetStereoPosition");
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XAOutputMixAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    gstPosition = ( (gfloat)stereoPosition / STEREO_POSITION_RATIO );
+
+    if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation  )
+    {
+        XAMediaPlayerAdaptationCtx* context = (XAMediaPlayerAdaptationCtx*) ctx;
+
+        audiopp = gst_bin_get_by_name( GST_BIN(context->baseObj.bin), "audiopp");
+        if( !audiopp )
+        {
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        pan = gst_bin_get_by_name( GST_BIN(audiopp), "pp_pan" );
+        if( !pan )
+        {
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        g_object_set( G_OBJECT(pan), "panorama", gstPosition, NULL );
+
+        XAVolumeItfAdapt_FlushBin(ctx);
+    }
+    else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation  )
+    {
+        XAMediaRecorderAdaptationCtx* context = (XAMediaRecorderAdaptationCtx*) ctx;
+
+        audiopp = gst_bin_get_by_name( GST_BIN(context->baseObj.bin), "audiopp");
+        if( !audiopp )
+        {
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        pan = gst_bin_get_by_name( GST_BIN(audiopp), "pp_pan" );
+        if( !pan )
+        {
+            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+            DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+            return XA_RESULT_INTERNAL_ERROR;
+        }
+
+        g_object_set( G_OBJECT(pan), "panorama", gstPosition, NULL );
+    }
+
+    else if ( ctx->baseObj.ctxId == XAOutputMixAdaptation )
+    {
+        XAOutputMixAdaptationCtx* context = (XAOutputMixAdaptationCtx*) ctx;
+        guint iterator = 0;
+        for ( iterator = 0; iterator < context->connectedObjects->len; iterator++ )
+        {
+            GstBin* basebin = NULL;
+            XAAdaptationGstCtx* bCtx = g_array_index(context->connectedObjects,XAOMixAdaptConnObj,iterator).ctx;
+            if(!bCtx)
+            {
+                DEBUG_ERR_A1("Context in connected objects array (index %u) is NULL!", iterator);
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+
+            basebin = GST_BIN(bCtx->bin);
+            if(!basebin)
+            {
+                DEBUG_ERR_A1("Bin in connected objects context (index %u) is NULL!", iterator);
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+
+            audiopp = gst_bin_get_by_name( basebin, "audiopp" );
+            if( !audiopp )
+            {
+                DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+                DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+            pan = gst_bin_get_by_name( GST_BIN(audiopp), "pp_pan" );
+            if( !pan )
+            {
+                DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+                DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+                return XA_RESULT_INTERNAL_ERROR;
+            }
+            g_object_set( G_OBJECT(pan), "panorama", gstPosition, NULL );
+
+            XAVolumeItfAdapt_FlushBin(bCtx);
+        }
+    }
+
+    DEBUG_API("<-XAVolumeItfAdapt_SetStereoPosition");
+    return XA_RESULT_SUCCESS;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/gst_adaptation/xavolumeitfadaptation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XAVOLUMEITFADAPTATION_H
+#define XAVOLUMEITFADAPTATION_H
+
+#include "xaadaptationgst.h"
+#include "xathreadsafety.h"
+
+/* MACROS */
+#define STEREO_POSITION_RATIO    1000
+#define MIN_SUPPORT_VOLUME_LEVEL -1000
+#define VOLUME_LEVEL_RATIO       1000
+
+/* FUNCTIONS */
+
+XAresult XAVolumeItfAdapt_SetVolumeLevel(XAAdaptationGstCtx *ctx,
+                                         XAmillibel level);
+
+XAresult XAVolumeItfAdapt_GetMaxVolumeLevel(XAAdaptationGstCtx *ctx,
+                                            XAmillibel *pMaxLevel);
+
+XAresult XAVolumeItfAdapt_SetMute(XAAdaptationGstCtx *ctx,  XAboolean mute);
+
+XAresult XAVolumeItfAdapt_EnableStereoPosition(XAAdaptationGstCtx *ctx,
+                                               XAboolean enable);
+
+XAresult XAVolumeItfAdapt_SetStereoPosition(XAAdaptationGstCtx *ctx,
+                                            XApermille stereoPosition);
+
+#endif /* XAVOLUMEITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/ledarray/xaledarraydevice.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/ledarray/xaledarraydevice.c	Fri Apr 30 19:18:45 2010 -0500
@@ -23,7 +23,7 @@
 #include "xaconfigextensionsitf.h"
 #include "xadynintmgmtitf.h"
 #include "xathreadsafety.h"
-
+#include "xaledarrayadaptctx.h"
 
 /* Static mapping of enumeration XALEDArrayDeviceInterfaces to interface iids */
 static const XAInterfaceID* XALEDArrayDeviceItfIIDs[LEDARRAY_ITFCOUNT]=
@@ -42,7 +42,8 @@
 /* XAResult XALEDArrayDeviceImpl_Create
  * Description: Create object
  */
-XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice(XAObjectItf* pDevice,
+XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice(FrameworkMap* mapper,
+                                                   XAObjectItf* pDevice,
                                                    XAuint32 deviceID,
                                                    XAuint32 numInterfaces,
                                                    const XAInterfaceID * pInterfaceIds,
@@ -127,11 +128,6 @@
         }
     }
 
-    /* Initialize XALEDArrayDeviceImpl variables */
-    pImpl->deviceID = deviceID;
-#ifdef _GSTREAMER_BACKEND_  
-    pImpl->adaptationCtx = XALEDArrayAdapt_Create(pImpl->deviceID);
-#endif
     
     /* This code is put here to return Feature Not Supported since adaptation is not present*/
     /*************************************************/
@@ -140,15 +136,17 @@
     DEBUG_ERR("Required interface not found - abort creation!");
     DEBUG_API("<-XALEDArrayDeviceImpl_Create");
     return XA_RESULT_FEATURE_UNSUPPORTED;
-    /*************************************************/
+    /*************************************************/    
     
-    /* Set ObjectItf to point to newly created object */
-/*
+/*    // Initialize XALEDArrayDeviceImpl variables 
+    pImpl->deviceID = deviceID;
+    pImpl->adaptationCtx = XALEDArrayAdapt_Create(pImpl->deviceID);
+    
+    // Set ObjectItf to point to newly created object 
     *pDevice = (XAObjectItf)&(pBaseObj->self);
     XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
     DEBUG_API("<-XALEDArrayDeviceImpl_Create");
-    return XA_RESULT_SUCCESS;
-*/
+    return XA_RESULT_SUCCESS;*/
 }
 
 /* XAResult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces
@@ -159,9 +157,9 @@
     DEBUG_API("->XALEDArrayDeviceImpl_QueryNumSupportedInterfaces");
     if( pNumSupportedInterfaces )
     {
-#ifdef _GSTREAMER_BACKEND_  
+  
         *pNumSupportedInterfaces = LEDARRAY_ITFCOUNT;
-#endif
+
         DEBUG_API_A1("<-XALEDArrayDeviceImpl_QueryNumSupportedInterfaces - %ld", *pNumSupportedInterfaces );
         return XA_RESULT_SUCCESS;
     }
@@ -180,7 +178,7 @@
 {
     DEBUG_API("->XALEDArrayDeviceImpl_QuerySupportedInterfaces");
 
-#ifdef _GSTREAMER_BACKEND_  
+  
     if( index >= LEDARRAY_ITFCOUNT || !pInterfaceId )
     {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
@@ -190,12 +188,12 @@
     else
     {
         *pInterfaceId = *(XALEDArrayDeviceItfIIDs[index]);
-#endif
+
         DEBUG_API("<-XALEDArrayDeviceImpl_QuerySupportedInterfaces");
         return XA_RESULT_SUCCESS;
-#ifdef _GSTREAMER_BACKEND_  
+  
     }
-#endif    
+    
 }
 
 
@@ -210,7 +208,7 @@
  */
 XAresult XALEDArrayDeviceImpl_DoRealize( XAObjectItf self )
 {
-#ifdef _GSTREAMER_BACKEND_
+
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAuint8 itfIdx = 0;
     XALEDArrayDeviceImpl* pObjImpl = (XALEDArrayDeviceImpl*)(pObj);
@@ -229,7 +227,7 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    ret = XALEDArrayAdapt_PostInit( pObjImpl->adaptationCtx );
+    ret = XALEDArrayAdapt_PostInit( (XAAdaptationGstCtx*)pObjImpl->adaptationCtx );
     if( ret != XA_RESULT_SUCCESS )
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
@@ -276,7 +274,7 @@
 
     pObj->state = XA_OBJECT_STATE_REALIZED;
     XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-#endif    
+    
     DEBUG_API("<-XALEDArrayDeviceImpl_DoRealize");
     return XA_RESULT_SUCCESS;
 }
@@ -297,7 +295,7 @@
  */
 void XALEDArrayDeviceImpl_FreeResources(XAObjectItf self)
 {
-#ifdef _GSTREAMER_BACKEND_  
+  
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XALEDArrayDeviceImpl* pImpl = (XALEDArrayDeviceImpl*)(*self);
     XAuint8 itfIdx = 0;
@@ -307,7 +305,7 @@
 
     if ( pImpl->adaptationCtx != NULL )
     {
-        XALEDArrayAdapt_Destroy( pImpl->adaptationCtx );
+        XALEDArrayAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
         pImpl->adaptationCtx = NULL;
     }
 
@@ -338,13 +336,13 @@
 
     if ( pImpl->adaptationCtx != NULL )
     {
-        XALEDArrayAdapt_Destroy( pImpl->adaptationCtx );
+        XALEDArrayAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
         pImpl->adaptationCtx = NULL;
     }
 
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSLEDArray);
     DEBUG_API("<-XALEDArrayDeviceImpl_FreeResources");
-#endif    
+    
     return;
 }
 /* END OF FILE */
--- a/khronosfws/openmax_al/src/ledarray/xaledarraydevice.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/ledarray/xaledarraydevice.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,9 +21,8 @@
 #include "openmaxalwrapper.h"
 #include "xaobjectitf.h"
 #include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "../adaptation/XALEDArrayAdaptCtx.h"
-#endif
+
+#include "xaadptbasectx.h"
 /** MACROS **/
 
 
@@ -51,9 +50,8 @@
     /* variables */
     XAuint32 deviceID;
 
-#ifdef _GSTREAMER_BACKEND_
     XAAdaptationBaseCtx* adaptationCtx;
-#endif
+
 } XALEDArrayDeviceImpl;
 
 
--- a/khronosfws/openmax_al/src/ledarray/xaledarrayitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/ledarray/xaledarrayitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xaledarrayitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XALEDArrayItfAdaptation.h"
-#endif
+  
+#include "xaledarrayitfadaptation.h"
+
 #include "xathreadsafety.h"
 
 /* XALEDArrayItfImpl* GetImpl(XALEDArrayItf self)
@@ -69,9 +69,9 @@
     /* check is ligtMask mode changed */
     if( impl->lightMask != lightMask )
     {
-#ifdef _GSTREAMER_BACKEND_  
-        ret = XALEDArrayItfAdapt_ActivateLEDArray( impl->adapCtx, lightMask );
-#endif
+  
+        ret = XALEDArrayItfAdapt_ActivateLEDArray( (XAAdaptationGstCtx*)impl->adapCtx, lightMask );
+
         if ( ret == XA_RESULT_SUCCESS )
         {
             impl->lightMask = lightMask;
@@ -152,9 +152,9 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_  
-        ret = XALEDArrayItfAdapt_SetColor( impl->adapCtx, index, pColor);
-#endif
+  
+        ret = XALEDArrayItfAdapt_SetColor( (XAAdaptationGstCtx*)impl->adapCtx, index, pColor);
+
         if ( ret == XA_RESULT_SUCCESS )
         {
             impl->color = *pColor;
@@ -208,7 +208,7 @@
 /*****************************************************************************
  * XALEDArrayItfImpl -specific methods
  *****************************************************************************/
-#ifdef _GSTREAMER_BACKEND_  
+  
 
 /* XALEDArrayItfImpl* XALEDArrayItfImpl_Create()
  * Description: Allocate and initialize LEDArrayItfImpl
@@ -239,7 +239,7 @@
     DEBUG_API("<-XALEDArrayItfImpl_Create");
     return self;
 }
-#endif
+
 /* void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self)
  * Description: Free all resources reserved at XALEDArrayItfImpl_Create
  */
--- a/khronosfws/openmax_al/src/ledarray/xaledarrayitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/ledarray/xaledarrayitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XALEDARRAYITF_H
 #define XALEDARRAYITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 #define LED_COUNT 1
 #define PRIMARY_LED 0
@@ -45,10 +42,10 @@
     XAuint32    lightMask;
     XAHSL       color;
 
-#ifdef _GSTREAMER_BACKEND_  
+ 
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
 } XALEDArrayItfImpl;
 
 /** METHODS **/
@@ -61,9 +58,9 @@
 XAresult XALEDArrayItfImpl_SetColor ( XALEDArrayItf self, XAuint8 index, const XAHSL * pColor );
 XAresult XALEDArrayItfImpl_GetColor ( XALEDArrayItf self, XAuint8 index, XAHSL * pColor );
 /* XALEDArrayItfImpl -specific methods */
-#ifdef _GSTREAMER_BACKEND_  
+ 
 XALEDArrayItfImpl* XALEDArrayItfImpl_Create( XAAdaptationBaseCtx *adapCtx );
 void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self);
-#endif
+
 
 #endif /* XALEDARRAYITF_H */
--- a/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.c	Fri Apr 30 19:18:45 2010 -0500
@@ -34,11 +34,12 @@
 #include "xavideopostprocessingitf.h"
 #include "xaconfigextensionsitf.h"
 #include "xathreadsafety.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAMetadataAdaptation.h"
-#endif
+#include "xametadataadaptation.h"
+#include "xacapabilitiesmgr.h"
 #include "xadynamicsourceitf.h"
-
+#include "xastreaminformationitf.h"
+#include "xanlinearvolumeitf.h"
+#include "xanvolumeextitf.h"
 
 extern void* vfHandle;
 
@@ -59,7 +60,10 @@
     &XA_IID_METADATAEXTRACTION,
     &XA_IID_METADATATRAVERSAL,
     &XA_IID_PLAYBACKRATE,
-    &XA_IID_VIDEOPOSTPROCESSING
+    &XA_IID_VIDEOPOSTPROCESSING,
+    &XA_IID_NOKIAVOLUMEEXT,
+    &XA_IID_NOKIALINEARVOLUME,
+    &XA_IID_STREAMINFORMATION
 };
 
 /* Global methods */
@@ -67,7 +71,9 @@
 /* XAResult XAMediaPlayerImpl_CreateMediaPlayer
  * Create object
  */
-XAresult XAMediaPlayerImpl_CreateMediaPlayer(XAObjectItf *pPlayer,
+XAresult XAMediaPlayerImpl_CreateMediaPlayer(FrameworkMap* mapper,
+                                            XACapabilities* capabilities,   
+                                             XAObjectItf *pPlayer,
                                              XADataSource *pDataSrc,
                                              XADataSource *pBankSrc,
                                              XADataSink *pAudioSnk,
@@ -81,11 +87,13 @@
     XAuint8 itfIdx = 0;
     XAMediaType mediaType = XA_MEDIATYPE_UNKNOWN;
     XAMediaPlayerImpl* pPlayerImpl = NULL;
+    FWMgrFwType fwType;
     XAObjectItfImpl* pBaseObj = NULL;
+    const char *uri = NULL;
     XAresult ret = XA_RESULT_SUCCESS;
-    XADataLocator_URI* tmpUri;
+    
+    DEBUG_API("->XAMediaPlayerImpl_CreateMediaPlayer");
 
-    DEBUG_API("->XAMediaPlayerImpl_CreateMediaPlayer");
     XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer);
 
     if(!pPlayer || !pDataSrc)
@@ -199,11 +207,11 @@
     pBaseObj->interfaceMap[MP_METADATATRAVERSALITF].isDynamic = XA_BOOLEAN_TRUE;
     pBaseObj->interfaceMap[MP_PLAYBACKRATEITF].isDynamic = XA_BOOLEAN_TRUE;
 
-
-    /* Set ObjectItf to point to newly created object */
+    
+    /*Set ObjectItf to point to newly created object*/ 
     *pPlayer = (XAObjectItf)&(pBaseObj->self);
 
-    /* initialize XAPlayerImpl variables */
+    /*initialize XAPlayerImpl variables */
 
     pPlayerImpl->dataSrc = pDataSrc;
     pPlayerImpl->bankSrc = pBankSrc;
@@ -211,43 +219,61 @@
     pPlayerImpl->imageVideoSnk = pImageVideoSnk;
     pPlayerImpl->vibra = pVibra;
     pPlayerImpl->LEDArray = pLEDArray;
-    
-    tmpUri = (XADataLocator_URI*)(pPlayerImpl->dataSrc->pLocator);
-    XAMediaPlayerImpl_DeterminePlaybackEngine(*pPlayer, tmpUri);
+
+    /* Determine framework type that can handle recording */
+    fwType = (FWMgrFwType)FWMgrMOUnknown;
+    /**/
+    if (pDataSrc->pLocator)
+    {
+        XADataLocator_URI* dataLoc = (XADataLocator_URI*)pDataSrc->pLocator;
+        if (dataLoc->locatorType == XA_DATALOCATOR_URI)
+            {
+            uri = (char*)dataLoc->URI;
+            }
+    }
+    fwType = XAFrameworkMgr_GetFramework(
+                        mapper,
+                        uri,
+                        FWMgrMOPlayer);
+
+    if (fwType == FWMgrMOUnknown)
+        {
+        ret = XA_RESULT_CONTENT_UNSUPPORTED;
+        XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+        DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
+        return ret;
+        }
     
-    /* This code is put here to return Feature Not Supported since adaptation is not present*/
-    /*************************************************/
-    XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
-    DEBUG_ERR("Required interface not found - abort creation!");
-    DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
-    return XA_RESULT_FEATURE_UNSUPPORTED;
-    /*************************************************/
-    
-/*    if(pPlayerImpl->isMMFPlayback)
-    {
+    if(fwType == FWMgrFWMMF)
+    {    
         pPlayerImpl->adaptationCtxMMF = XAMediaPlayerAdaptMMF_Create(pPlayerImpl->dataSrc,
                                                                pPlayerImpl->bankSrc,
                                                                pPlayerImpl->audioSnk,
                                                                pPlayerImpl->imageVideoSnk,
                                                                pPlayerImpl->vibra,
                                                                pPlayerImpl->LEDArray);
-    
+        
+        pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxMMF;    
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_  
-       pPlayerImpl->adaptationCtx = XAMediaPlayerAdapt_Create(pPlayerImpl->dataSrc,
+       pPlayerImpl->adaptationCtxGst = XAMediaPlayerAdapt_Create(pPlayerImpl->dataSrc,
                                                            pPlayerImpl->bankSrc,
                                                            pPlayerImpl->audioSnk,
                                                            pPlayerImpl->imageVideoSnk,
                                                            pPlayerImpl->vibra,
                                                            pPlayerImpl->LEDArray);
-#endif
+       
+       pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxGst;
     }
+    
+    pPlayerImpl->curAdaptCtx->capslist = capabilities;
+    pPlayerImpl->curAdaptCtx->fwtype = fwType;
+    
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
-    return XA_RESULT_SUCCESS;*/
+    return XA_RESULT_SUCCESS;
 }
 
 /* XAResult XAMediaPlayerImpl_QueryNumSupportedInterfaces
@@ -282,9 +308,9 @@
     if (index >= MP_ITFCOUNT || !pInterfaceId )
     {
         if(pInterfaceId)
-            {
+        {
             *pInterfaceId = XA_IID_NULL;
-            }
+        }
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XAMediaPlayerImpl_QuerySupportedInterfaces");
         return XA_RESULT_PARAMETER_INVALID;
@@ -307,7 +333,6 @@
     XAuint8 itfIdx = 0;
     void *pItf = NULL;
     XAresult ret = XA_RESULT_SUCCESS;
-    XADataLocator_URI* tmpUri;
 
     DEBUG_API("->XAMediaPlayerImpl_DoRealize");
     XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
@@ -340,11 +365,7 @@
                     }
                     break;
                 case MP_PLAYITF:
-                    pItf = XAPlayItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-                            pImpl->adaptationCtx,
-#endif
-                            pImpl->adaptationCtxMMF);
+                    pItf = XAPlayItfImpl_Create(pImpl);
                     if ( pImpl->dataSrc )
                     {
                 		XAuint32 locType = *((XAuint32*)(pImpl->dataSrc->pLocator));
@@ -357,11 +378,6 @@
                 				DEBUG_INFO_A1("Stored view finder pointer to global address %x", vfHandle);
                 			    }
                 		    }
-                		else if(locType == XA_DATALOCATOR_URI )
-                		    {
-                            tmpUri = (XADataLocator_URI*)(pImpl->dataSrc->pLocator);
-                            XAPlayItfImpl_DeterminePlaybackEngine(pItf, tmpUri);
-                		    }
                 		else
                 		    {
                 		
@@ -369,44 +385,51 @@
                     }
                     break;
                 case MP_VOLUMEITF:
-#ifdef _GSTREAMER_BACKEND_  
-                    pItf = XAVolumeItfImpl_Create(pImpl->adaptationCtx);
+                    pItf = XAVolumeItfImpl_Create(pImpl->curAdaptCtx);
                     break;
                 case MP_SEEKITF:
-                    pItf = XASeekItfImpl_Create(pImpl->adaptationCtx);
+                    pItf = XASeekItfImpl_Create(pImpl);
                     break;
                 case MP_PREFETCHSTATUSITF:
-                    pItf = XAPrefetchStatusItfImpl_Create( pImpl->adaptationCtx );
+                    pItf = XAPrefetchStatusItfImpl_Create( pImpl );
                     break;
                 case MP_METADATAEXTRACTIONITF:
-                    pItf = XAMetadataExtractionItfImpl_Create( pImpl->adaptationCtx );
+                    pItf = XAMetadataExtractionItfImpl_Create( pImpl->curAdaptCtx );
                     break;
                 case MP_METADATATRAVERSALITF:
-                    pItf = XAMetadataTraversalItfImpl_Create( pImpl->adaptationCtx );
+                    pItf = XAMetadataTraversalItfImpl_Create( pImpl->curAdaptCtx );
                     break;
                 case MP_PLAYBACKRATEITF:
-                    pItf = XAPlaybackRateItfImpl_Create(pImpl->adaptationCtx);
+                    pItf = XAPlaybackRateItfImpl_Create(pImpl);
                     break;
                 case MP_CONFIGEXTENSIONITF:
                     pItf = XAConfigExtensionsItfImpl_Create();
-                    XAConfigExtensionsItfImpl_SetContext( pItf, pImpl->adaptationCtx);
+                    XAConfigExtensionsItfImpl_SetContext( pItf, pImpl->curAdaptCtx);
                     break;
                 case MP_DYNAMICSOURCEITF:
-                    pItf = XADynamicSourceItfImpl_Create(pImpl->adaptationCtx);
+                    pItf = XADynamicSourceItfImpl_Create(pImpl->curAdaptCtx);
                     break;
                 case MP_EQUALIZERITF:
-                    pItf = XAEqualizerItfImpl_Create(pImpl->adaptationCtx);
+                    pItf = XAEqualizerItfImpl_Create(pImpl->curAdaptCtx);
                     break;
                 case MP_IMAGECONTROLSITF:
-                    pItf = XAImageControlsItfImpl_Create(pImpl->adaptationCtx);
+                    pItf = XAImageControlsItfImpl_Create(pImpl->curAdaptCtx);
                     break;
                 case MP_IMAGEEFFECTSITF:
-                    pItf = XAImageEffectsItfImpl_Create(pImpl->adaptationCtx);
+                    pItf = XAImageEffectsItfImpl_Create(pImpl->curAdaptCtx);
                     break;
                 case MP_VIDEOPOSTPROCESSINGITF:
-                    pItf = XAVideoPostProcessingItfImpl_Create(pImpl->adaptationCtx);
-#endif
+                    pItf = XAVideoPostProcessingItfImpl_Create(pImpl->curAdaptCtx);
+                    break;
+               case MP_NOKIAVOLUMEEXT:
+                    pItf = XANokiaVolumeExtItfImpl_Create(pImpl->curAdaptCtx);
                     break;
+               case MP_NOKIALINEARVOLUME:
+                    pItf = XANokiaLinearVolumeItfImpl_Create(pImpl->curAdaptCtx);
+                    break;                                        
+                case MP_STREAMINFORMATIONITF:
+                    pItf = XAStreamInformationItfImpl_Create(pImpl->curAdaptCtx);
+                    break;                    
                 default:
                     break;
             }
@@ -425,15 +448,13 @@
         }
     }
     /* init adaptation */
-    if(pImpl->isMMFPlayback)
+    if(pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
     {
-       ret = XAMediaPlayerAdaptMMF_PostInit( pImpl->adaptationCtxMMF );
+       ret = XAMediaPlayerAdaptMMF_PostInit( (XAAdaptationMMFCtx*)pImpl->adaptationCtxMMF );
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-       ret = XAMediaPlayerAdapt_PostInit( pImpl->adaptationCtx );
-#endif
+       ret = XAMediaPlayerAdapt_PostInit( (XAAdaptationGstCtx*)pImpl->adaptationCtxGst );
     }
     if ( ret != XA_RESULT_SUCCESS )
     {
@@ -469,16 +490,11 @@
 {
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAuint8 itfIdx = 0;
-
+    XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*)pObj;
     DEBUG_API("->XAMediaPlayerImpl_FreeResources");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
-#ifdef _GSTREAMER_BACKEND_
-    XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*)pObj;
+
     assert(pObj && pImpl && pObj == pObj->self);
-#endif
-
-    
-
     for(itfIdx = 0; itfIdx < MP_ITFCOUNT; itfIdx++)
     {
         void *pItf = pObj->interfaceMap[itfIdx].pItf;
@@ -528,17 +544,33 @@
                 case MP_VIDEOPOSTPROCESSINGITF:
                     XAVideoPostProcessingItfImpl_Free(pItf);
                     break;
+                case MP_NOKIAVOLUMEEXT:
+                    XANokiaVolumeExtItfImpl_Free(pItf);
+                    break;
+                case MP_NOKIALINEARVOLUME:
+                    XANokiaLinearVolumeItfImpl_Free(pItf);
+                    break;                                        
+                case MP_STREAMINFORMATIONITF:
+                    XAStreamInformationItfImpl_Free(pItf);
+                    break;
+                    
             }
             pObj->interfaceMap[itfIdx].pItf = NULL;
         }
     }
-#ifdef _GSTREAMER_BACKEND_
-    if ( pImpl->adaptationCtx != NULL )
-    {
-        XAMediaPlayerAdapt_Destroy( pImpl->adaptationCtx );
-        pImpl->adaptationCtx = NULL;
-    }
-#endif
+    
+    if(pImpl->curAdaptCtx)
+        {
+        if(pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+            {
+            XAMediaPlayerAdaptMMF_Destroy( (XAAdaptationMMFCtx*)pImpl->adaptationCtxMMF );
+            }
+        else
+            {
+            XAMediaPlayerAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtxGst );
+            }
+        }
+
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
     DEBUG_API("<-XAMediaPlayerImpl_FreeResources");
     return;
@@ -549,10 +581,10 @@
  */
 XAresult XAMediaPlayerImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
 {
-#ifdef _GSTREAMER_BACKEND_  
+  
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*)(pObj);
-#endif
+
     XAresult ret = XA_RESULT_SUCCESS;
     DEBUG_API("->XAMediaPlayerImpl_DoAddItf");
 
@@ -560,23 +592,23 @@
     {
         switch( mapEntry->mapIdx )
             {
-#ifdef _GSTREAMER_BACKEND_  
+  
             case MP_METADATAEXTRACTIONITF:
-                mapEntry->pItf = XAMetadataExtractionItfImpl_Create( pImpl->adaptationCtx );
+                mapEntry->pItf = XAMetadataExtractionItfImpl_Create( pImpl->curAdaptCtx );
                 break;
             case MP_METADATATRAVERSALITF:
-                mapEntry->pItf = XAMetadataTraversalItfImpl_Create( pImpl->adaptationCtx );
+                mapEntry->pItf = XAMetadataTraversalItfImpl_Create( pImpl->curAdaptCtx );
                 break;
             case MP_PLAYBACKRATEITF:
-                mapEntry->pItf = XAPlaybackRateItfImpl_Create(pImpl->adaptationCtx);
+                mapEntry->pItf = XAPlaybackRateItfImpl_Create(pImpl);
                 break;
             case MP_EQUALIZERITF:
-                mapEntry->pItf = XAEqualizerItfImpl_Create( pImpl->adaptationCtx );
+                mapEntry->pItf = XAEqualizerItfImpl_Create( pImpl->curAdaptCtx );
                 break;
             case MP_IMAGEEFFECTSITF:
-                mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->adaptationCtx );
+                mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->curAdaptCtx );
                 break;
-#endif
+
             default:
                 DEBUG_ERR("XAMediaPlayerImpl_DoAddItf unknown id");
                 ret = XA_RESULT_FEATURE_UNSUPPORTED;
@@ -653,30 +685,4 @@
     DEBUG_API("<-XAMediaPlayerImpl_DoRemoveItf");
     return ret;
 }
-XAresult XAMediaPlayerImpl_DeterminePlaybackEngine(XAObjectItf self, XADataLocator_URI *uri)
-{
- 
-  XAresult ret = XA_RESULT_SUCCESS;
-  char* tempPtr = NULL;
-  char extension[5];
-  
-  XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-  XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*)pObj;
-  DEBUG_API("->XAMediaPlayerImpl_DeterminePlaybackEngine");
-    
-  //need to move to configuration file and add more in final class
-  
-  pImpl->isMMFPlayback = XA_BOOLEAN_TRUE;
-	
-  tempPtr = strchr((char*)(uri->URI), '.');
-  strcpy(extension, tempPtr);
-	
-  if(!strcmp(extension, ".wav"))
-  {
-     pImpl->isMMFPlayback = XA_BOOLEAN_FALSE;
-  }
 
-  DEBUG_API("<-XAMediaPlayerImpl_DeterminePlaybackEngine"); 
-  return ret;  
-  
-}
--- a/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,11 +21,9 @@
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
 #include "xaobjectitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAMediaPlayerAdaptCtx.h"
-#endif
+#include "xamediaplayeradaptctx.h"
 #include "xamediaplayeradaptctxmmf.h"
-
+#include "xacapabilitiesmgr.h"
 /** MACROS **/
 
 
@@ -51,6 +49,9 @@
     MP_METADATATRAVERSALITF,
     MP_PLAYBACKRATEITF,
     MP_VIDEOPOSTPROCESSINGITF,
+    MP_NOKIAVOLUMEEXT,
+    MP_NOKIALINEARVOLUME,
+    MP_STREAMINFORMATIONITF,
     MP_ITFCOUNT
 } MPInterfaces;
 
@@ -71,11 +72,10 @@
     XAuint32 numRequiredInterfaces;
     XAInterfaceID *requiredItfIds;
 
-#ifdef _GSTREAMER_BACKEND_
-    XAAdaptationBaseCtx* adaptationCtx;
-#endif
-    XAAdaptationBaseMMFCtx* adaptationCtxMMF;
-    XAboolean isMMFPlayback;
+    XAAdaptationBaseCtx* curAdaptCtx;
+    XAAdaptationBaseCtx* adaptationCtxGst;
+    XAAdaptationBaseCtx* adaptationCtxMMF;
+
 } XAMediaPlayerImpl;
 
 
@@ -86,8 +86,6 @@
 XAresult XAMediaPlayerImpl_DoResume(XAObjectItf self);
 void XAMediaPlayerImpl_FreeResources(XAObjectItf self);
 
-XAresult XAMediaPlayerImpl_DeterminePlaybackEngine(XAObjectItf self, XADataLocator_URI *uri);
-
 /* DynamicInterfaceManagement object-specific methods */
 XAresult XAMediaPlayerImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
 XAresult XAMediaPlayerImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
--- a/khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xaplaybackrateitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAPlaybackRateItfAdaptation.h"
-#endif
+
+#include "xaplaybackrateitfadaptation.h"
+
 #include "xathreadsafety.h"
 
 static XAPlaybackRateItfImpl* GetImpl(XAPlaybackRateItf self)
@@ -56,9 +56,16 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    res = XAPlaybackRateItfAdapt_SetRate(impl->adaptCtx, rate);
-#endif
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        res = XAPlaybackRateItfAdapt_SetRate((XAAdaptationGstCtx*)impl->adaptCtx, rate);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;          
+        }
+    
     if(res == XA_RESULT_SUCCESS)
     {
         impl->currentRate = rate;
@@ -81,7 +88,15 @@
         DEBUG_API("<-XAPlaybackRateItfImpl_GetRate");
         return XA_RESULT_PARAMETER_INVALID;
     }
-    *pRate = impl->currentRate;
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        *pRate = impl->currentRate;
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;          
+        }
 
     DEBUG_API("<-XAPlaybackRateItfImpl_GetRate");
     return res;
@@ -103,10 +118,17 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
     
-#ifdef _GSTREAMER_BACKEND_
-    /* set to adaptation */
-    res = XAPlaybackRateItfAdapt_SetPropertyConstraints(impl->adaptCtx, constraints);
-#endif
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        /* set to adaptation */
+        res = XAPlaybackRateItfAdapt_SetPropertyConstraints((XAAdaptationGstCtx*)impl->adaptCtx, constraints);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;          
+        }
+    
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XAPlaybackRateItfImpl_SetPropertyConstraints");
     return res;
@@ -126,10 +148,17 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
    
-#ifdef _GSTREAMER_BACKEND_
-    /* needs to be queried from adaptation */
-    res = XAPlaybackRateItfAdapt_GetProperties(impl->adaptCtx, pProperties);
-#endif
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        /* needs to be queried from adaptation */
+        res = XAPlaybackRateItfAdapt_GetProperties((XAAdaptationGstCtx*)impl->adaptCtx, pProperties);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;          
+        }
+    
     DEBUG_API("<-XAPlaybackRateItfImpl_GetProperties");
     return res;
 }
@@ -152,10 +181,17 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
     
-#ifdef _GSTREAMER_BACKEND_
-    /* needs to be queried from adaptation */
-    res = XAPlaybackRateItfAdapt_GetCapabilitiesOfRate(impl->adaptCtx, rate, pCapabilities);
-#endif
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        /* needs to be queried from adaptation */
+        res = XAPlaybackRateItfAdapt_GetCapabilitiesOfRate((XAAdaptationGstCtx*)impl->adaptCtx, rate, pCapabilities);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;          
+        }
+
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XAPlaybackRateItfImpl_GetCapabilitiesOfRate");
     return res;
@@ -180,12 +216,18 @@
         DEBUG_API("<-XAPlaybackRateItfImpl_GetRateRange");
         return XA_RESULT_PARAMETER_INVALID;
     }
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        /* needs to be queried from adaptation */
+        res = XAPlaybackRateItfAdapt_GetRateRange((XAAdaptationGstCtx*)impl->adaptCtx, index, pMinRate,
+                                                  pMaxRate,pStepSize, pCapabilities);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;          
+        }
     
-#ifdef _GSTREAMER_BACKEND_
-    /* needs to be queried from adaptation */
-    res = XAPlaybackRateItfAdapt_GetRateRange(impl->adaptCtx, index, pMinRate,
-                                              pMaxRate,pStepSize, pCapabilities);
-#endif
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XAPlaybackRateItfImpl_GetRateRange");
     return res;
@@ -194,13 +236,11 @@
 /**
  * XAPlaybackRateItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_
-
 /**
  * XAPlaybackRateItfImpl* XAPlaybackRateItfImpl_Create();
  * @return  XAPlaybackRateItfImpl* - Pointer to  PlaybackRateItf interface implementation
  **/
-XAPlaybackRateItfImpl* XAPlaybackRateItfImpl_Create( XAAdaptationBaseCtx *adaptCtx )
+XAPlaybackRateItfImpl* XAPlaybackRateItfImpl_Create( XAMediaPlayerImpl *impl )
 {
     XAPlaybackRateItfImpl *self = (XAPlaybackRateItfImpl*)
         calloc(1,sizeof(XAPlaybackRateItfImpl));
@@ -217,7 +257,7 @@
         self->itf.SetRate = XAPlaybackRateItfImpl_SetRate;
 
         /* init variables */
-        self->adaptCtx = adaptCtx;
+        self->adaptCtx = impl->curAdaptCtx;
         self->currentRate = 1000;
         self->self = self;
     }
@@ -225,7 +265,7 @@
     DEBUG_API("<-XAPlaybackRateItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XAPlaybackRateItfImpl_Free(XAPlaybackRateItfImpl* self);
  * @param  XAPlaybackRateItfImpl* self -
--- a/khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,7 @@
 #ifndef XAPLAYBACKRATEITF_H
 #define XAPLAYBACKRATEITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xamediaplayer.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -38,10 +34,8 @@
     /* pointer to self */
     struct XAPlaybackRateItfImpl_* self;
 
-#ifdef _GSTREAMER_BACKEND_
     /* variables */
     XAAdaptationBaseCtx *adaptCtx;
-#endif
     XApermille currentRate;
 
 } XAPlaybackRateItfImpl;
@@ -70,11 +64,9 @@
                                               XApermille *pStepSize,
                                               XAuint32 *pCapabilities);
 
-#ifdef _GSTREAMER_BACKEND_
 
 /* XAPlaybackRateItfImpl -specific methods */
-XAPlaybackRateItfImpl* XAPlaybackRateItfImpl_Create( XAAdaptationBaseCtx *adaptCtx );
-#endif
+XAPlaybackRateItfImpl* XAPlaybackRateItfImpl_Create( XAMediaPlayerImpl *impl );
 void XAPlaybackRateItfImpl_Free(XAPlaybackRateItfImpl* self);
 
 #endif /* XAPLAYBACKRATEITF_H */
--- a/khronosfws/openmax_al/src/mediaplayer/xaplayitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplayitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,9 +20,9 @@
 #include <assert.h>
 
 #include "xaplayitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAPlayItfAdaptation.h"
-#endif
+
+#include "xaplayitfadaptation.h"
+
 #include "xaplayitfadaptationmmf.h"
 #include "xathreadsafety.h"
 #include <string.h>
@@ -58,46 +58,43 @@
     XAresult ret = XA_RESULT_SUCCESS;
     XAPlayItfImpl* impl = GetImpl(self);
     DEBUG_API_A1("->XAPlayItfImpl_SetPlayState %s",PLAYSTATENAME(state));
-    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
 
     if( !impl || state < XA_PLAYSTATE_STOPPED || state > XA_PLAYSTATE_PLAYING )
     {
         /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XAPlayItfImpl_SetPlayState");
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    /* check is play state changed, if not do nothing */
-    if(state != impl->playbackState)
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
     {
-        if(state == XA_PLAYSTATE_PLAYING)
-        {
-#ifdef _GSTREAMER_BACKEND_
-        XAPlayItfAdapt_GetPosition(impl->adapCtx, &(impl->lastPosition));
-#endif        
-        }
-        if(impl->isMMFPlayback)
-        {
-           ret = XAPlayItfAdaptMMF_SetPlayState(impl->adaptCtxMMF, state);    
-        }
-        else
-        {
-#ifdef _GSTREAMER_BACKEND_
-        ret = XAPlayItfAdapt_SetPlayState(impl->adapCtx, state);
-#endif        
-        }
+        ret = XAPlayItfAdaptMMF_SetPlayState(impl->pObjImpl->curAdaptCtx, state);
+        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+        DEBUG_API("<-XAPlayItfImpl_SetPlayState");
+        return ret;		    
+    }
 
-        if(ret == XA_RESULT_SUCCESS)
-        {
-            impl->playbackState = state;
-            if(state == XA_PLAYSTATE_STOPPED || state == XA_PLAYSTATE_PAUSED)
-            {
-                impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
-                impl->lastPosition = 0;
-            }
-        }
+	/* check is play state changed, if not do nothing */
+    if(state != impl->playbackState)
+	{
+    	if(state == XA_PLAYSTATE_PLAYING)
+    	{
+        	XAPlayItfAdaptGST_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, &(impl->lastPosition));
+    	}
+		ret = XAPlayItfAdaptGST_SetPlayState(impl->adapCtx, state);
+
+		if(ret == XA_RESULT_SUCCESS)
+		    {
+		    impl->playbackState = state;
+		    if(state == XA_PLAYSTATE_STOPPED || state == XA_PLAYSTATE_PAUSED)
+		        {
+		        impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
+		        impl->lastPosition = 0;
+		        }
+		    }
     }
 
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -113,6 +110,7 @@
 {
     XAresult ret = XA_RESULT_SUCCESS;
     XAPlayItfImpl* impl = GetImpl(self);
+
     DEBUG_API("->XAPlayItfImpl_GetPlayState");
 
     if(!impl || !pState)
@@ -123,7 +121,18 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    *pState = impl->playbackState;
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_GetPlayState(impl->pObjImpl->curAdaptCtx, pState);    
+    }
+    else
+    {
+        *pState = impl->playbackState;
+    }
+
+    XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
 
     DEBUG_API_A1("<-XAPlayItfImpl_GetPlayState: %s",PLAYSTATENAME(impl->playbackState));
     return ret;
@@ -138,20 +147,28 @@
     XAresult ret = XA_RESULT_SUCCESS;
     XAPlayItfImpl* impl = GetImpl(self);
     DEBUG_API("->XAPlayItfImpl_GetDuration");
-    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
 
     if(!impl || !pMsec)
     {
         /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XAPlayItfImpl_GetDuration");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_
-    ret = XAPlayItfAdapt_GetDuration(impl->adapCtx, pMsec);
-#endif
+
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_GetDuration(impl->pObjImpl->curAdaptCtx, pMsec);
+    }
+    else
+    {
+        ret = XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)impl->adapCtx, pMsec);
+    }
+    
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+
     DEBUG_API("<-XAPlayItfImpl_GetDuration");
     return ret;
 }
@@ -165,27 +182,36 @@
 {
     XAresult ret = XA_RESULT_SUCCESS;
     XAPlayItfImpl* impl = GetImpl(self);
+ 
     DEBUG_API("->XAPlayItfImpl_GetPosition");
-    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
     if(!impl || !pMsec)
     {
         /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XAPlayItfImpl_GetPosition");
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    if ( impl->playbackState == XA_PLAYSTATE_STOPPED )
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_GetPosition(impl->pObjImpl->curAdaptCtx, pMsec);
+    }
+    else
     {
-    	*pMsec = 0;
-    	DEBUG_API("<-XAPlayItfImpl_GetPosition");
-      XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );    	
-    	return XA_RESULT_SUCCESS;
-    }
-#ifdef _GSTREAMER_BACKEND_
-    ret = XAPlayItfAdapt_GetPosition(impl->adapCtx, pMsec);
-#endif
+
+        if ( impl->playbackState == XA_PLAYSTATE_STOPPED )
+        {
+    	    *pMsec = 0;
+    	    DEBUG_API("<-XAPlayItfImpl_GetPosition");
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );    	
+    	    return XA_RESULT_SUCCESS;
+        }
+        ret = XAPlayItfAdaptGST_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, pMsec);
+	}
+
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XAPlayItfImpl_GetPosition");
     return ret;
@@ -216,6 +242,15 @@
     impl->cbcontext = pContext;
     impl->cbPtrToSelf = self;
 
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_RegisterCallback(impl->pObjImpl->curAdaptCtx, callback);
+    }
+
+    XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+
     DEBUG_API("<-XAPlayItfImpl_RegisterCallback");
     return ret;
 }
@@ -230,25 +265,34 @@
     XAPlayItfImpl* impl = GetImpl(self);
 
     DEBUG_API("->XAPlayItfImpl_SetCallbackEventsMask");
-    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
 
     if(!impl || ( eventFlags > (XA_PLAYEVENT_HEADATEND | XA_PLAYEVENT_HEADATMARKER |
                   XA_PLAYEVENT_HEADATNEWPOS | XA_PLAYEVENT_HEADMOVING | XA_PLAYEVENT_HEADSTALLED) ) )
     {
         /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
         return XA_RESULT_PARAMETER_INVALID;
     }
 
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
     impl->eventFlags = eventFlags;
-#ifdef _GSTREAMER_BACKEND_
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_SetCallbackEventsMask(impl->pObjImpl->curAdaptCtx, eventFlags);
+
+	    XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+	    DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
+	    return ret;
+    }
+
     /* enable position tracking if client wants so */
     if( (eventFlags & (XA_PLAYEVENT_HEADATMARKER | XA_PLAYEVENT_HEADATNEWPOS))
         &&  impl->adapCtx && !impl->positionupdateOn)
-    {
-        ret = XAPlayItfAdapt_EnablePositionTracking(impl->adapCtx, XA_BOOLEAN_TRUE);
+        {
+        ret = XAPlayItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_TRUE);
         if( ret == XA_RESULT_SUCCESS )
         {
             impl->positionupdateOn = XA_BOOLEAN_TRUE;
@@ -257,13 +301,13 @@
     else if( !(eventFlags & (XA_PLAYEVENT_HEADATMARKER | XA_PLAYEVENT_HEADATNEWPOS))
             &&  impl->adapCtx && impl->positionupdateOn)
     {
-        ret = XAPlayItfAdapt_EnablePositionTracking(impl->adapCtx, XA_BOOLEAN_FALSE);
+        ret = XAPlayItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_FALSE);
         if( ret == XA_RESULT_SUCCESS )
         {
             impl->positionupdateOn = XA_BOOLEAN_FALSE;
         }
     }
-#endif
+
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
     return ret;
@@ -301,10 +345,10 @@
 {
     XAresult ret = XA_RESULT_SUCCESS;
     XAmillisecond duration = 0;
-    XAPlayItfImpl* impl = NULL;
-
+    XAPlayItfImpl* impl = GetImpl(self);
 
     DEBUG_API_A1("->XAPlayItfImpl_SetMarkerPosition: %lu ms", mSec);
+
     /* Get duration of the content */
     if(XAPlayItfImpl_GetDuration(self, &duration) != XA_RESULT_SUCCESS)
     {
@@ -314,7 +358,6 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    impl = GetImpl(self);
 
     if(!impl || mSec > duration)
     {
@@ -323,9 +366,19 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
+
     impl->markerPosition = mSec;
     impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
 
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_SetMarkerPosition(impl->pObjImpl->curAdaptCtx, mSec);
+    }
+
+    XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+
     DEBUG_API("<-XAPlayItfImpl_SetMarkerPosition");
     return ret;
 }
@@ -347,9 +400,19 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
+
     impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
     impl->markerPosition = NO_POSITION;
 
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_ClearMarkerPosition(impl->pObjImpl->curAdaptCtx);
+    }
+
+    XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+
     DEBUG_API("<-XAPlayItfImpl_ClearMarkerPosition");
     return ret;
 }
@@ -405,6 +468,15 @@
     }
     impl->positionUpdatePeriod = mSec;
 
+    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        ret = XAPlayItfAdaptMMF_SetPositionUpdatePeriod(impl->pObjImpl->curAdaptCtx, mSec);
+    }
+
+    XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+
     DEBUG_API("<-XAPlayItfImpl_SetPositionUpdatePeriod");
     return ret;
 }
@@ -442,11 +514,7 @@
  * XAPlayItfImpl* XAPlayItfImpl_Create()
  * Description: Allocate and initialize PlayItfImpl
  **/
-XAPlayItfImpl* XAPlayItfImpl_Create( 
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adapCtx,
-#endif        
-        XAAdaptationBaseMMFCtx *adaptationCtxMMF )
+XAPlayItfImpl* XAPlayItfImpl_Create( XAMediaPlayerImpl *impl )
 {
     XAPlayItfImpl *self;
 
@@ -476,16 +544,13 @@
         self->markerPosition = NO_POSITION;
         self->positionUpdatePeriod = PLAYITF_DEFAULT_UPDATE_PERIOD;
         self->lastPosition = START_POSITION;
-#ifdef _GSTREAMER_BACKEND_
-        self->adapCtx = adapCtx;
-#endif        
-        self->adaptCtxMMF = adaptationCtxMMF;
+        /*self->adapCtx = impl->curAdaptCtx;*/
+        self->pObjImpl = impl;
         self->cbPtrToSelf = NULL;
         self->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
-
-#ifdef _GSTREAMER_BACKEND_  
-        XAAdaptationBase_AddEventHandler( adapCtx, &XAPlayItfImpl_AdaptCb, XA_PLAYITFEVENTS, self );
-#endif
+        
+/*        XAAdaptationBase_AddEventHandler( self->adapCtx, &XAPlayItfImpl_AdaptCb, XA_PLAYITFEVENTS, self );*/
+        XAAdaptationBase_AddEventHandler( self->pObjImpl->curAdaptCtx, &XAPlayItfImpl_AdaptCb, XA_PLAYITFEVENTS, self );
 
         self->self = self;
     }
@@ -501,15 +566,12 @@
 {
     DEBUG_API("->XAPlayItfImpl_Free");
     assert(self==self->self);
-#ifdef _GSTREAMER_BACKEND_   
-    XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XAPlayItfImpl_AdaptCb );
-#endif    
+/*    XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XAPlayItfImpl_AdaptCb );*/
+    XAAdaptationBase_RemoveEventHandler( self->pObjImpl->curAdaptCtx, &XAPlayItfImpl_AdaptCb );
     free(self);
     DEBUG_API("<-XAPlayItfImpl_Free");
 }
 
-#ifdef _GSTREAMER_BACKEND_  
-
 /* void XAPlayItfImpl_AdaptCb
  * Description: Listen changes in adaptation
  */
@@ -528,6 +590,15 @@
         return;
     }
     assert(event);
+
+    if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+        impl->callback(impl->cbPtrToSelf, impl->cbcontext, event->eventid);
+        DEBUG_API("<-XAPlayItfImpl_AdaptCb");
+        XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
+        return;
+    }
+
     /* check position update events */
     if( event->eventid == XA_ADAPT_POSITION_UPDATE_EVT )
     {
@@ -592,7 +663,14 @@
     else if( event->eventid == XA_PLAYEVENT_HEADSTALLED )
     {
         impl->playbackState = XA_PLAYSTATE_PAUSED;
-        XAPlayItfAdapt_GetPosition(impl->adapCtx, &(impl->lastPosition));
+        if(impl->adapCtx->fwtype == FWMgrFWMMF)
+            {
+            //XAPlayItfAdaptMMF_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, &(impl->lastPosition));
+            }
+        else
+            {
+            XAPlayItfAdaptGST_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, &(impl->lastPosition));
+            }        
         /* send callback if needed */
         if( (XA_PLAYEVENT_HEADSTALLED & impl->eventFlags) && impl->callback )
         {
@@ -616,32 +694,4 @@
     DEBUG_API("<-XAPlayItfImpl_AdaptCb");
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
 }
-#endif
 
-XAresult XAPlayItfImpl_DeterminePlaybackEngine(XAPlayItf self, XADataLocator_URI *uri)
-{
-
-  XAresult ret = XA_RESULT_SUCCESS;
-  
-  char* tempPtr = NULL;
-  char extension[5];
-  
-  XAPlayItfImpl* impl = (XAPlayItfImpl*)(self);
-  DEBUG_API("->XAPlayItfImpl_DeterminePlaybackEngine");
-    
-  //need to move to configuration file and add more in final class
-  
-  impl->isMMFPlayback = XA_BOOLEAN_TRUE;
-	
-  tempPtr = strchr((char*)(uri->URI), '.');
-  strcpy(extension, tempPtr);
-	
-  if(!strcmp(extension, ".wav"))
-  {
-     impl->isMMFPlayback = XA_BOOLEAN_FALSE;
-  }
-
-  return ret;  
-  
-  DEBUG_API("<-XAPlayItfImpl_DeterminePlaybackEngine");
-}
--- a/khronosfws/openmax_al/src/mediaplayer/xaplayitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplayitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,12 +18,7 @@
 #ifndef XAPLAYITF_H
 #define XAPLAYITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
-#include "xaadaptationcontextbasemmf.h"
+#include "xaadptbasectx.h"
 #include "xamediaplayer.h"
 
 
@@ -47,7 +42,10 @@
 
     /* variables */
     XAPlayItf cbPtrToSelf;
+    /* TODO : This is no longer needed we need to get state from XAMediaPlayerImpl
+     * Delete this.*/
     XAuint32 playbackState;
+
     xaPlayCallback callback;
     void *cbcontext;
     XAuint32 eventFlags;
@@ -57,12 +55,12 @@
     XAmillisecond lastPosition;
     XAboolean isMarkerPosCbSend;
 
-#ifdef _GSTREAMER_BACKEND_
     /*Adaptation variables*/
+    /* TODO : This is no longer needed since we have access to XAMediaPlayerImpl
+     * Delete this.*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
-    XAAdaptationBaseMMFCtx *adaptCtxMMF;
-    XAboolean isMMFPlayback;
+    
+    XAMediaPlayerImpl* pObjImpl;
 
 } XAPlayItfImpl;
 
@@ -98,15 +96,8 @@
 /*
  * implementation-specific methods
  */
-XAPlayItfImpl* XAPlayItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adapCtx,
-#endif
-        XAAdaptationBaseMMFCtx *adaptationCtxMMF );
-#ifdef _GSTREAMER_BACKEND_
+XAPlayItfImpl* XAPlayItfImpl_Create( XAMediaPlayerImpl *impl );
 void XAPlayItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
-XAresult XAPlayItfImpl_DeterminePlaybackEngine(XAPlayItf self, XADataLocator_URI *uri);
 void XAPlayItfImpl_Free(XAPlayItfImpl* self);
 
 
--- a/khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,9 +20,9 @@
 #include <assert.h>
 
 #include "xaprefetchstatusitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+
+#include "xaadaptationgst.h"
+
 
 static XAPrefetchStatusItfImpl* GetImpl(XAPrefetchStatusItf self)
 {
@@ -188,12 +188,10 @@
     return ret;
 }
 
-#ifdef _GSTREAMER_BACKEND_
-
 /*
  * implementation-specific methods
  */
-XAPrefetchStatusItfImpl* XAPrefetchStatusItfImpl_Create( XAAdaptationBaseCtx* adaptationCtx )
+XAPrefetchStatusItfImpl* XAPrefetchStatusItfImpl_Create( XAMediaPlayerImpl* impl )
 {
     XAPrefetchStatusItfImpl *self = (XAPrefetchStatusItfImpl*)
         calloc(1,sizeof(XAPrefetchStatusItfImpl));
@@ -215,10 +213,10 @@
         self->eventFlags = 0;
         self->fillUpdatePeriod = PREFETCHSTATUSITF_DEFAULT_UPDATE_PERIOD;
         self->pStatus = XA_PREFETCHSTATUS_SUFFICIENTDATA;
-        self->adaptationCtx = adaptationCtx;
+        self->adaptationCtx = impl->curAdaptCtx;
         self->cbPtrToSelf = NULL;
 
-        XAAdaptationBase_AddEventHandler( adaptationCtx, &XAPrefetchStatusItfImpl_AdaptCb, XA_PREFETCHITFEVENTS, self );
+        XAAdaptationBase_AddEventHandler( self->adaptationCtx, &XAPrefetchStatusItfImpl_AdaptCb, XA_PREFETCHITFEVENTS, self );
 
         self->self = self;
     }
@@ -226,21 +224,17 @@
     DEBUG_API("<-XAPrefetchStatusItfImpl_Create");
     return self;
 }
-#endif
+
 
 void XAPrefetchStatusItfImpl_Free(XAPrefetchStatusItfImpl* self)
 {
     DEBUG_API("->XAPrefetchStatusItfImpl_Free");
     assert(self==self->self);
-#ifdef _GSTREAMER_BACKEND_
     XAAdaptationBase_RemoveEventHandler( (XAAdaptationBaseCtx*)self->adaptationCtx, &XAPrefetchStatusItfImpl_AdaptCb );
-#endif    
     free(self);
     DEBUG_API("<-XAPrefetchStatusItfImpl_Free");
 }
 
-#ifdef _GSTREAMER_BACKEND_
-
 /* void XAPrefetchStatusItfImpl_AdaptCb
  * Description: Listen changes in adaptation
  */
@@ -272,5 +266,4 @@
 
     DEBUG_API("<-XAPrefetchStatusItfImpl_AdaptCb");
 }
-#endif
 
--- a/khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -20,9 +20,9 @@
 
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAMediaPlayerAdaptCtx.h"
-#endif
+#include "xaadptbasectx.h"
+#include "xamediaplayer.h"
+
 #define PREFETCHSTATUSITF_DEFAULT_UPDATE_PERIOD 100
 
 /*
@@ -45,9 +45,7 @@
     void                *cbcontext;
     XAuint32            eventFlags;
     XApermille          fillUpdatePeriod;
-#ifdef _GSTREAMER_BACKEND_
     XAAdaptationBaseCtx* adaptationCtx;
-#endif
 }XAPrefetchStatusItfImpl;
 
 /**
@@ -75,15 +73,13 @@
 XAresult XAPrefetchStatusItfImpl_GetFillUpdatePeriod(XAPrefetchStatusItf self,
                                                        XApermille *pPeriod);
 
-#ifdef _GSTREAMER_BACKEND_
+
 
 /*
  * implementation-specific methods
  */
-XAPrefetchStatusItfImpl* XAPrefetchStatusItfImpl_Create( XAAdaptationBaseCtx* adaptationCtx);
+XAPrefetchStatusItfImpl* XAPrefetchStatusItfImpl_Create(  XAMediaPlayerImpl* impl );
 void XAPrefetchStatusItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
-
 void XAPrefetchStatusItfImpl_Free(XAPrefetchStatusItfImpl* self);
 
 #endif /* XAPREFETCHSTATUSITF_H_ */
--- a/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -21,13 +21,11 @@
 
 #include "xaseekitf.h"
 
-#ifdef _GSTREAMER_BACKEND_
-#include "XASeekItfAdaptation.h"
-#include "XAPlayItfAdaptation.h"
-#endif
+#include "xaseekitfadaptation.h"
+#include "xaplayitfadaptation.h"
 #include "xathreadsafety.h"
-
-
+#include "xaplayitfadaptationmmf.h"
+#include "xaseekitfadaptationmmf.h"
 /**
  * XASeekItfImpl* GetImpl(XASeekItf self)
  * Description: Validate interface pointer and cast it to implementation pointer.
@@ -72,44 +70,80 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    /* Get duration of the content */
-    if(XAPlayItfAdapt_GetDuration(impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASeekItfImpl_SetPosition");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-#endif
+
+    if(impl->adapCtx->fwtype == FWMgrFWMMF)
+        {
+        /* Get duration of the content */
+        if(XAPlayItfAdaptMMF_GetDuration((XAAdaptationBaseCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetPosition");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+        if(pos > duration)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetPosition");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+    
+        if(seekMode != XA_SEEKMODE_FAST && seekMode != XA_SEEKMODE_ACCURATE)
+            {
+            /* seek mode unsupported */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+            DEBUG_API("<-XASeekItfImpl_SetPosition");
+            return XA_RESULT_FEATURE_UNSUPPORTED;
+            }
     
-    if(pos > duration)
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASeekItfImpl_SetPosition");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    if(seekMode != XA_SEEKMODE_FAST && seekMode != XA_SEEKMODE_ACCURATE)
-    {
-        /* seek mode unsupported */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XASeekItfImpl_SetPosition");
-        return XA_RESULT_FEATURE_UNSUPPORTED;
-    }
-
-#ifdef _GSTREAMER_BACKEND_
-    ret = XASeekItfAdapt_SetPosition(impl->adapCtx, pos, seekMode);
-#endif
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        impl->playbackPosition = pos;
-        impl->seekMode = seekMode;
-    }
+        ret = XASeekItfAdaptMMF_SetPosition(impl->adapCtx, pos, seekMode);
+        if(ret == XA_RESULT_SUCCESS)
+            {
+            impl->playbackPosition = pos;
+            impl->seekMode = seekMode;
+            }
+        }
+    else
+        {
+        /* Get duration of the content */
+        if(XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetPosition");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+        if(pos > duration)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetPosition");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+    
+        if(seekMode != XA_SEEKMODE_FAST && seekMode != XA_SEEKMODE_ACCURATE)
+            {
+            /* seek mode unsupported */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+            DEBUG_API("<-XASeekItfImpl_SetPosition");
+            return XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+    
+        ret = XASeekItfAdapt_SetPosition((XAAdaptationGstCtx*)impl->adapCtx, pos, seekMode);
+        if(ret == XA_RESULT_SUCCESS)
+            {
+            impl->playbackPosition = pos;
+            impl->seekMode = seekMode;
+            }
+    
+        }
 
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XASeekItfImpl_SetPosition");
@@ -139,35 +173,63 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    /* Get duration of the content */
-    if(XAPlayItfAdapt_GetDuration(impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASeekItfImpl_SetLoop");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-#endif
-    if(endPos > duration && endPos != XA_TIME_UNKNOWN)
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASeekItfImpl_SetLoop");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-#ifdef _GSTREAMER_BACKEND_
-    ret = XASeekItfAdapt_SetLoop(impl->adapCtx, loopEnable, startPos, endPos);
-#endif
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        impl->loopEnable = loopEnable;
-        impl->startPos = startPos;
-        impl->endPos = endPos;
-    }
+    if(impl->adapCtx->fwtype == FWMgrFWMMF)
+        {
+        /* Get duration of the content */
+        if(XAPlayItfAdaptMMF_GetDuration((XAAdaptationBaseCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetLoop");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+        if(endPos > duration && endPos != XA_TIME_UNKNOWN)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetLoop");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+    
+        ret = XASeekItfAdaptMMF_SetLoop(impl->adapCtx, loopEnable, startPos, endPos);
+        if(ret == XA_RESULT_SUCCESS)
+            {
+            impl->loopEnable = loopEnable;
+            impl->startPos = startPos;
+            impl->endPos = endPos;
+            }    
+        }
+    else
+        {
+        /* Get duration of the content */
+        if(XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetLoop");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+        if(endPos > duration && endPos != XA_TIME_UNKNOWN)
+            {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XASeekItfImpl_SetLoop");
+            return XA_RESULT_PARAMETER_INVALID;
+            }
+    
+        ret = XASeekItfAdapt_SetLoop((XAAdaptationGstCtx*)impl->adapCtx, loopEnable, startPos, endPos);
+        if(ret == XA_RESULT_SUCCESS)
+            {
+            impl->loopEnable = loopEnable;
+            impl->startPos = startPos;
+            impl->endPos = endPos;
+            }
+    
+        }
 
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XASeekItfImpl_SetLoop");
@@ -208,13 +270,12 @@
 /**
  * XASeekItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_
 
 /**
  * XASeekItfImpl* XASeekItfImpl_Create()
  * Description: Allocate and initialize SeekItfImpl.
  **/
-XASeekItfImpl* XASeekItfImpl_Create( XAAdaptationBaseCtx *adapCtx )
+XASeekItfImpl* XASeekItfImpl_Create(  XAMediaPlayerImpl* impl )
 {
     XASeekItfImpl *self = (XASeekItfImpl*)
         calloc(1,sizeof(XASeekItfImpl));
@@ -233,14 +294,14 @@
         self->startPos = 0;
         self->endPos = 0;
 
-        self->adapCtx = adapCtx;
+        self->adapCtx = impl->curAdaptCtx;
 
         self->self = self;
     }
     DEBUG_API("<-XASeekItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XASeekItfImpl_Free(XASeekItfImpl* self)
  * Description: Free all resources reserved at XASeekItfImpl_Create.
--- a/khronosfws/openmax_al/src/mediaplayer/xaseekitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaseekitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,7 @@
 #ifndef XASEEKITF_H
 #define XASEEKITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xamediaplayer.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -45,10 +41,8 @@
     XAmillisecond startPos;
     XAmillisecond endPos;
 
-#ifdef _GSTREAMER_BACKEND_
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
 }XASeekItfImpl;
 
 /** METHODS **/
@@ -65,10 +59,8 @@
                                XAmillisecond *pStartPos,
                                XAmillisecond *pEndPos);
 
-#ifdef _GSTREAMER_BACKEND_
 /* XASeekItfImpl -specific methods */
-XASeekItfImpl* XASeekItfImpl_Create( XAAdaptationBaseCtx *adapCtx );
-#endif
+XASeekItfImpl* XASeekItfImpl_Create( XAMediaPlayerImpl* impl );
 void XASeekItfImpl_Free(XASeekItfImpl* self);
 
 #endif /* XASEEKITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -15,19 +15,14 @@
 *
 */
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <assert.h>
-#include <string.h>
+#include "xamediarecorderadaptctxmmf.h"
 #include "xaaudioencoderitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAudioEncoderItfAdaptation.h"
-#include "XAStaticCapsAdaptation.h"
-#include "XARecordItfAdaptation.h"
-#endif
+#include "xaaudioencoderitfadaptation.h"
+#include "xarecorditfadaptation.h"
 #include "xathreadsafety.h"
-#include "xaadaptationmmf.h"
 #include "cmmfbackendengine.h"
+#include "xacapabilitiesmgr.h"
 
 /* XAAudioEncoderItfImpl* GetImpl(XAAudioEncoderItf self)
  * Description: Validate interface pointer and cast it to implementation pointer.
@@ -57,11 +52,11 @@
 XAresult XAAudioEncoderItfImpl_SetEncoderSettings(XAAudioEncoderItf self,
                                                   XAAudioEncoderSettings *pSettings)
 {
+    XAMediaRecorderAdaptationMMFCtx* mCtx;
     XAresult ret = XA_RESULT_SUCCESS;
     XAuint32 recState = XA_RECORDSTATE_STOPPED;
+    XAAudioEncoderSettings currentSettings;
     XAAudioEncoderItfImpl *impl = GetImpl(self);
-    XAMediaRecorderAdaptationMMFCtx* mCtx;
-    XAAudioEncoderSettings currentSettings;
 
     DEBUG_API("->XAAudioEncoderItfImpl_SetEncoderSettings");
     XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
@@ -75,18 +70,18 @@
         return XA_RESULT_PARAMETER_INVALID;
         }
 
-    mCtx = (XAMediaRecorderAdaptationMMFCtx*) impl->pObjImpl->adaptationCtxMMF;
-    
-    if(mCtx->xaRecordState != recState)
+    if(impl->adapCtx->fwtype == FWMgrFWMMF)
         {
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
-        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
-        DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
-        return XA_RESULT_PRECONDITIONS_VIOLATED;
-        }
+        mCtx = (XAMediaRecorderAdaptationMMFCtx*) impl->pObjImpl->adaptationCtx;
+        
+        if(mCtx->xaRecordState != recState)
+            {
+            XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
+            DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+            DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
+            return XA_RESULT_PRECONDITIONS_VIOLATED;
+            }
 
-    if(impl->pObjImpl->isMMFRecord)
-        {
         XAAudioEncoderItfImpl_GetEncoderSettings(self, &currentSettings);
         if(pSettings->encoderId == currentSettings.encoderId)
             {
@@ -146,13 +141,12 @@
         }
     else
         {
-#ifdef _GSTREAMER_BACKEND_
-        XAStaticCapsData temp;
+        XACapabilities temp;
     
-        ret = XAStaticCapsAdapt_GetCapsById(XACAP_ENCODER|XACAP_AUDIO, pSettings->encoderId, &temp);
+        ret = XACapabilitiesMgr_GetCapsById(impl->pObjImpl->adaptationCtx->capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), pSettings->encoderId, &temp);
         if( ret == XA_RESULT_SUCCESS )
             {
-            ret = XARecordItfAdapt_GetRecordState( impl->adapCtx, &recState );
+            ret = XARecordItfAdapt_GetRecordState( (XAAdaptationGstCtx*)impl->adapCtx, &recState );
             if( ret == XA_RESULT_SUCCESS )
                 {
                 if( XA_RECORDSTATE_STOPPED == recState )
@@ -173,7 +167,6 @@
             DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
             return XA_RESULT_FEATURE_UNSUPPORTED;
             }
-#endif
         }    
     
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
@@ -207,13 +200,13 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    mCtx = (XAMediaRecorderAdaptationMMFCtx*) (impl->pObjImpl->adaptationCtxMMF);
+    mCtx = (XAMediaRecorderAdaptationMMFCtx*) (impl->pObjImpl->adaptationCtx);
     
 
 
-    if(impl->pObjImpl->isMMFRecord)
+    if(impl->adapCtx->fwtype == FWMgrFWMMF)
         {
-        mmf_get_encoder_id(mCtx->mmfContext, &encoderId);
+        mmf_get_codec_id(mCtx->mmfContext, &encoderId);
         
         switch(encoderId)
             {
@@ -240,13 +233,13 @@
                 break;
             }
         
-        mmf_get_destination_channels(mCtx->mmfContext, &channelsIn);
+        mmf_get_channels(mCtx->mmfContext, &channelsIn);
         pSettings->channelsIn =  channelsIn;
-        mmf_get_destination_channels(mCtx->mmfContext, &channelsOut);
+        mmf_get_channels(mCtx->mmfContext, &channelsOut);
         pSettings->channelsOut = channelsOut;
-        mmf_get_destination_samplerate(mCtx->mmfContext, &sampleRate);
+        mmf_get_samplerate(mCtx->mmfContext, &sampleRate);
         pSettings->sampleRate = sampleRate;
-        mmf_get_destination_bitrate(mCtx->mmfContext, &bitRate);
+        mmf_get_bitrate(mCtx->mmfContext, &bitRate);
         pSettings->bitRate = bitRate;
         pSettings->rateControl = XA_RATECONTROLMODE_CONSTANTBITRATE;
         pSettings->channelMode = 0;
@@ -255,9 +248,7 @@
         }
     else
         {
-#ifdef _GSTREAMER_BACKEND_
         ret = XAAudioEncoderItfAdapt_GetEncoderSettings(impl->adapCtx, pSettings);
-#endif    
         }
     DEBUG_API("<-XAAudioEncoderItfImpl_GetEncoderSettings");
     return ret;
@@ -270,26 +261,25 @@
 /* XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create()
  * Description: Allocate and initialize XAAudioEncoderItfImpl
  */
-XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adapCtx,
-#endif
-        XAMediaRecorderImpl* impl
-        )
+XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create( XAMediaRecorderImpl* impl )
 {
     XAAudioEncoderItfImpl* self = (XAAudioEncoderItfImpl*)
         calloc(1,sizeof(XAAudioEncoderItfImpl));
+    //XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)(impl->adaptationCtx);
+    
     DEBUG_API("->XAAudioEncoderItfImpl_Create");
     if( self )
     {
-        /* init itf default implementation */
-        self->itf.GetEncoderSettings = XAAudioEncoderItfImpl_GetEncoderSettings;
-        self->itf.SetEncoderSettings = XAAudioEncoderItfImpl_SetEncoderSettings;
+        //if(mCtx->fwtype == FWMgrFWMMF)
+            {
+            /* init itf default implementation */
+            self->itf.GetEncoderSettings = XAAudioEncoderItfImpl_GetEncoderSettings;
+            self->itf.SetEncoderSettings = XAAudioEncoderItfImpl_SetEncoderSettings;
+            }
+        
         self->pObjImpl = impl;
         /* init variables */
-#ifdef _GSTREAMER_BACKEND_
-        self->adapCtx = adapCtx;
-#endif        
+        self->adapCtx = impl->adaptationCtx;
 
         self->self = self;
     }
--- a/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,12 +18,6 @@
 #ifndef XAAUDIOENCODERITF_H
 #define XAAUDIOENCODERITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
-
 #include "xamediarecorder.h"
 
 /** MACROS **/
@@ -43,10 +37,9 @@
     
     XAMediaRecorderImpl* pObjImpl;
     
-#ifdef _GSTREAMER_BACKEND_
     /* variables */
     XAAdaptationBaseCtx    *adapCtx;
-#endif
+
 } XAAudioEncoderItfImpl;
 
 /** METHODS **/
@@ -61,12 +54,7 @@
                                                    XAAudioEncoderSettings *pSettings );
 
 /* XAAudioEncoderItfImpl -specific methods */
-XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create( 
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adapCtx, 
-#endif
-        XAMediaRecorderImpl* impl 
-        );
+XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create( XAMediaRecorderImpl* impl );
 void XAAudioEncoderItfImpl_Free( XAAudioEncoderItfImpl* self );
 
 #endif /* XAAUDIOENCODERITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,12 +20,11 @@
 #include <assert.h>
 #include <string.h>
 #include "xaimageencoderitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAImageEncoderItfAdaptation.h"
-#include "XARecordItfAdaptation.h"
-#include "XAStaticCapsAdaptation.h"
-#endif
+
+#include "xaimageencoderitfadaptation.h"
+#include "xarecorditfadaptation.h"
 #include "xathreadsafety.h"
+#include "xacapabilitiesmgr.h"
 
 #define APPROX_MAXRATIO (90/100)
 
@@ -56,8 +55,7 @@
                                                 const XAImageSettings *pSettings)
 {
     XAresult res = XA_RESULT_SUCCESS;
-#ifdef _GSTREAMER_BACKEND_
-    XAStaticCapsData temp;
+    XACapabilities temp;
     XAImageEncoderItfImpl *impl = GetImpl(self);
 
     DEBUG_API("->XAImageEncoderItfImpl_SetImageSettings");
@@ -71,19 +69,22 @@
         DEBUG_API("<-XAImageEncoderItfImpl_SetImageSettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-    res = XAStaticCapsAdapt_GetCapsById(XACAP_ENCODER|XACAP_IMAGE, pSettings->encoderId, &temp);
-    if( res == XA_RESULT_SUCCESS )
-    {
-        res = XAImageEncoderItfAdapt_SetImageSettings(impl->adaptCtx, pSettings);
-    }
-    else
-    {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XAImageEncoderItfImpl_SetImageSettings");
-        return XA_RESULT_FEATURE_UNSUPPORTED;
-    }
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE), pSettings->encoderId, &temp);
+        if( res == XA_RESULT_SUCCESS )
+            {
+            res = XAImageEncoderItfAdapt_SetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
+            }
+        else
+            {
+            DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+            res = XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+        }
+    
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
-#endif
+
     DEBUG_API("<-XAImageEncoderItfImpl_SetImageSettings");
     return res;
 }
@@ -105,9 +106,17 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_
-    res = XAImageEncoderItfAdapt_GetImageSettings(impl->adaptCtx, pSettings);
-#endif
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        res = XAImageEncoderItfAdapt_GetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XAImageEncoderItfImpl_GetImageSettings");
+        return XA_RESULT_FEATURE_UNSUPPORTED;    
+        }
+
     DEBUG_API("<-XAImageEncoderItfImpl_GetImageSettings");
     return res;
 }
@@ -133,9 +142,17 @@
     }
     /* calculate size estimate */
 
-#ifdef _GSTREAMER_BACKEND_
-    XAImageEncoderItfAdapt_GetImageSettings(impl->adaptCtx, &curSettings);
-#endif
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        XAImageEncoderItfAdapt_GetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, &curSettings);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XAImageEncoderItfImpl_GetSizeEstimate");
+        return XA_RESULT_FEATURE_UNSUPPORTED;   
+        }
+    
     switch(curSettings.colorFormat)
     {
         case XA_COLORFORMAT_MONOCHROME:
@@ -221,26 +238,25 @@
 /* XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create()
  * Description: Allocate and initialize ImageEncoderItfImpl
  */
-XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx
-#endif
-        )
+XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create(XAMediaRecorderImpl* impl)
 {
     XAImageEncoderItfImpl* self = (XAImageEncoderItfImpl*)
         calloc(1,sizeof(XAImageEncoderItfImpl));
+    //XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)(impl->adaptationCtx);
+    
     DEBUG_API("->XAImageEncoderItfImpl_Create");
     if( self )
     {
-        /* init itf default implementation */
-        self->itf.GetImageSettings = XAImageEncoderItfImpl_GetImageSettings;
-        self->itf.SetImageSettings = XAImageEncoderItfImpl_SetImageSettings;
-        self->itf.GetSizeEstimate = XAImageEncoderItfImpl_GetSizeEstimate;
+        //if(mCtx->fwtype == FWMgrFWGST)
+            {
+            /* init itf default implementation */
+            self->itf.GetImageSettings = XAImageEncoderItfImpl_GetImageSettings;
+            self->itf.SetImageSettings = XAImageEncoderItfImpl_SetImageSettings;
+            self->itf.GetSizeEstimate = XAImageEncoderItfImpl_GetSizeEstimate;
+            }
 
         /* init variables */
-#ifdef _GSTREAMER_BACKEND_
-        self->adaptCtx = adaptCtx;
-#endif        
+        self->adaptCtx = impl->adaptationCtx;
         
         self->self = self;
     }
--- a/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,7 @@
 #ifndef XAIMAGEENCODERITF_H
 #define XAIMAGEENCODERITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xamediarecorder.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -37,10 +33,9 @@
     struct XAImageEncoderItf_ itf;
     /* pointer to self */
     struct XAImageEncoderItfImpl_* self;
-#ifdef _GSTREAMER_BACKEND_
     /* variables */
     XAAdaptationBaseCtx *adaptCtx;
-#endif
+
 } XAImageEncoderItfImpl;
 
 /** METHODS **/
@@ -59,13 +54,7 @@
 
 
 /* XAImageEncoderItfImpl -specific methods */
-XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx,
-#endif
-        void
-        );
-
+XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create(XAMediaRecorderImpl* impl);
 void XAImageEncoderItfImpl_Free(XAImageEncoderItfImpl* self);
 
 #endif /* XAIMAGEENCODERITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c	Fri Apr 30 19:18:45 2010 -0500
@@ -36,6 +36,9 @@
 #include "xametadatatraversalitf.h"
 #include "xathreadsafety.h"
 #include <string.h>
+#include "xacapabilitiesmgr.h"
+#include "xamediarecorderadaptctxmmf.h"
+#include "xamediarecorderadaptctx.h"
 /* Static mapping of enumeration XAMediaRecorderInterfaces to interface iids */
 static const XAInterfaceID* xaMediaRecorderItfIIDs[MR_ITFCOUNT]=
 {
@@ -62,7 +65,9 @@
 /* XAResult XAMediaRecorderImpl_Create
  * Create object
  */
-XAresult XAMediaRecorderImpl_CreateMediaRecorder(XAObjectItf* pRecorder,
+XAresult XAMediaRecorderImpl_CreateMediaRecorder(FrameworkMap* mapper,
+                                                 XACapabilities* capabilities,
+                                                 XAObjectItf* pRecorder,
                                                  XADataSource* pAudioSrc,
                                                  XADataSource* pImageVideoSrc,
                                                  XADataSink* pDataSnk,
@@ -72,11 +77,12 @@
 {
     XAMediaRecorderImpl* pImpl = NULL;
     XAObjectItfImpl* pBaseObj = NULL;
+    FWMgrFwType fwType;
     XAuint8 itfIdx;
     XAMediaType mediaType = XA_MEDIATYPE_UNKNOWN;
     XAresult ret=XA_RESULT_SUCCESS;
-    XADataLocator_URI* tmpUri;
-
+    const char *uri = NULL;
+    
     DEBUG_API("->XAMediaRecorderImpl_CreateMediaRecorder");
     XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
 
@@ -240,34 +246,63 @@
     pImpl->audioSrc = pAudioSrc;
     pImpl->dataSnk = pDataSnk;
     pImpl->imageVideoSrc = pImageVideoSrc;
+    /* Determine framework type that can handle recording */
+    fwType = (FWMgrFwType)FWMgrMOUnknown;
+    /**/
+    if (pDataSnk->pLocator)
+    {
+        XADataLocator_URI* dataLoc = (XADataLocator_URI*)pDataSnk->pLocator;
+        if (dataLoc->locatorType == XA_DATALOCATOR_URI)
+            {
+            uri = (char*)dataLoc->URI;
+            }
+    }
+    fwType = XAFrameworkMgr_GetFramework(
+                        mapper,
+                        uri,
+                        FWMgrMORecorder);
+
+    if (fwType == FWMgrMOUnknown)
+        {
+        ret = XA_RESULT_CONTENT_UNSUPPORTED;
+        XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
+        DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
+        return ret;
+        }
     
     /* Set ObjectItf to point to newly created object */
     *pRecorder = (XAObjectItf)&(pBaseObj->self);    
     
-    
-    tmpUri = (XADataLocator_URI*)(pImpl->dataSnk->pLocator);
-    XAMediaRecorderImpl_DetermineRecordEngine(*pRecorder, tmpUri);
-    
-    if(pImpl->isMMFRecord)
+    if(fwType == FWMgrFWMMF)
     {    
         
-       pImpl->adaptationCtxMMF = XAMediaRecorderAdaptMMF_Create(pImpl->audioSrc,
-                                                             pImpl->imageVideoSrc,
-                                                             pImpl->dataSnk,
-                                                             pImpl->recModes);      
+       pImpl->adaptationCtx = XAMediaRecorderAdaptMMF_Create(pImpl->audioSrc,
+               pImpl->imageVideoSrc, pImpl->dataSnk, pImpl->recModes);
     }
     else
     {
 
-#ifdef _GSTREAMER_BACKEND_
         pImpl->adaptationCtx = XAMediaRecorderAdapt_Create(pImpl->audioSrc,
                                                            pImpl->imageVideoSrc,
                                                            pImpl->dataSnk,
                                                            pImpl->recModes);
-#endif
     }
 
-
+    if(pImpl->adaptationCtx)
+        {
+        pImpl->adaptationCtx->capslist = capabilities;
+        pImpl->adaptationCtx->fwtype = fwType;
+        }
+    else
+        {
+        ret = XA_RESULT_MEMORY_FAILURE;
+        XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
+        DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
+        return ret;
+        }
+    
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
     DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
     return XA_RESULT_SUCCESS;
@@ -328,7 +363,7 @@
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAMediaRecorderImpl* pObjImpl = (XAMediaRecorderImpl*)(pObj);
     XAresult ret = XA_RESULT_SUCCESS;
-    XADataLocator_URI* tmpUri;
+    
 
     DEBUG_API("->XAMediaRecorderImpl_DoRealize");
     XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
@@ -343,15 +378,13 @@
     }
 
     /* init adaptation */
-    if(pObjImpl->isMMFRecord)
+    if(pObjImpl->adaptationCtx->fwtype == FWMgrFWMMF)
     {
-       ret = XAMediaRecorderAdaptMMF_PostInit( pObjImpl->adaptationCtxMMF );
+       ret = XAMediaRecorderAdaptMMF_PostInit( (XAAdaptationMMFCtx*)pObjImpl->adaptationCtx );
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-       ret = XAMediaRecorderAdapt_PostInit( pObjImpl->adaptationCtx );
-#endif
+       ret = XAMediaRecorderAdapt_PostInit( (XAAdaptationGstCtx*)pObjImpl->adaptationCtx );
     }
 
     if( ret != XA_RESULT_SUCCESS )
@@ -381,48 +414,23 @@
                     break;
                 case MR_RECORDITF:
                     pItf = XARecordItfImpl_Create( pObjImpl );
-                    tmpUri = (XADataLocator_URI*)(pObjImpl->dataSnk->pLocator);
-                    XARecordItfImpl_DetermineRecordEngine(pItf, tmpUri);                
                     break;
-                    
-
                 case MR_AUDIOENCODERITF:
-                    pItf = XAAudioEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-                            pObjImpl->adaptationCtx,
-#endif
-                            pObjImpl
-                            );
+                    pItf = XAAudioEncoderItfImpl_Create(pObjImpl);
                     break;
                 case MR_SNAPSHOTITF:
-                    pItf = XASnapshotItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-                            pObjImpl->adaptationCtx
-#endif
-                            );
+                    pItf = XASnapshotItfImpl_Create(pObjImpl);
                     break;
                 case MR_VIDEOENCODER:
-                    pItf = XAVideoEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-                            pObjImpl->adaptationCtx
-#endif
-                            );
+                    pItf = XAVideoEncoderItfImpl_Create(pObjImpl);
                     break;  
                 case MR_IMAGEENCODERITF:
-                    pItf = XAImageEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-                            pObjImpl->adaptationCtx
-#endif
-                            );
+                    pItf = XAImageEncoderItfImpl_Create(pObjImpl);
                     break; 
                 case MR_METADATAINSERTIONITF:
-                    pItf = XAMetadataInsertionItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-                            pObjImpl->adaptationCtx
-#endif
-                            );
+                    pItf = XAMetadataInsertionItfImpl_Create(pObjImpl);
                     break;                    
-#ifdef _GSTREAMER_BACKEND_
+
                     case MR_CONFIGEXTENSIONITF:
                     pItf = XAConfigExtensionsItfImpl_Create();
                     XAConfigExtensionsItfImpl_SetContext( pItf, pObjImpl->adaptationCtx);
@@ -448,7 +456,7 @@
                 case MR_METADATATRAVERSALITF:
                     pItf = XAMetadataTraversalItfImpl_Create( pObjImpl->adaptationCtx );
                     break;
-#endif                    
+                    
                 default:
                     break;
             }
@@ -491,13 +499,11 @@
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAMediaRecorderImpl* pObjImpl = (XAMediaRecorderImpl*)(pObj);
     XAuint8 itfIdx;
-
+    XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*)(*self);
     DEBUG_API("->XAMediaRecorderImpl_FreeResources");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS( XATSMediaRecorder );
-#ifdef _GSTREAMER_BACKEND_
-    XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*)(*self);
     assert( pObj && pImpl && pObj == pObj->self );
-#endif
+
     /* free all allocated interfaces */
     for(itfIdx = 0; itfIdx < MR_ITFCOUNT; itfIdx++)
     {
@@ -558,14 +564,19 @@
         }
     }
 
-#ifdef _GSTREAMER_BACKEND_
     if ( pImpl->adaptationCtx != NULL )
     {
-        XAMediaRecorderAdapt_Destroy( pImpl->adaptationCtx );
+        if(pImpl->adaptationCtx->fwtype == FWMgrFWMMF)
+            {
+            XAMediaRecorderAdaptMMF_Destroy( (XAAdaptationMMFCtx*)pObjImpl->adaptationCtx );
+            }
+        else
+            {
+            XAMediaRecorderAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
+            }
         pImpl->adaptationCtx = NULL;
     }
-#endif
-    XAMediaRecorderAdaptMMF_Destroy( pObjImpl->adaptationCtxMMF );
+
     /* free all other allocated resources*/
 
     DEBUG_API("<-XAMediaRecorderImpl_FreeResources");
@@ -582,10 +593,10 @@
  */
 XAresult XAMediaRecorderImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
 {
-#ifdef _GSTREAMER_BACKEND_
+
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*)(pObj);
-#endif
+
     XAresult ret = XA_RESULT_SUCCESS;
 
     DEBUG_API("->XAMediaRecorderImpl_DoAddItf");
@@ -597,20 +608,15 @@
         {
 
         case MR_METADATAINSERTIONITF:
-            mapEntry->pItf = XAMetadataInsertionItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-                    pImpl->adaptationCtx
-#endif
-                    );
+            mapEntry->pItf = XAMetadataInsertionItfImpl_Create(pImpl);
             break;
-#ifdef _GSTREAMER_BACKEND_
         case MR_EQUALIZERITF:
             mapEntry->pItf = XAEqualizerItfImpl_Create( pImpl->adaptationCtx );
             break;
         case MR_IMAGEEFFECTSITF:
             mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->adaptationCtx );
             break;
-#endif
+
         default:
             DEBUG_ERR("XAMediaRecorderImpl_DoAddItf unknown id");
             ret = XA_RESULT_FEATURE_UNSUPPORTED;
@@ -686,36 +692,5 @@
     return ret;
 }
 
-XAresult XAMediaRecorderImpl_DetermineRecordEngine(XAObjectItf self, XADataLocator_URI *uri)
-{
-
-  XAresult ret = XA_RESULT_SUCCESS;
-  char* tempPtr = NULL;
-  char extension[5];
-  
-  XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-  XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*)(pObj);  
-  
-    
-  DEBUG_API("->XAMediaRecorderImpl_DetermineRecordEngine");
-    
-  //need to move to configuration file and add more in final class
-  
-  pImpl->isMMFRecord = XA_BOOLEAN_TRUE;
-	
-  tempPtr = strchr((char*)(uri->URI), '.');
-  strcpy(extension, tempPtr);
-	
-	//TODO:
-	//temp everything goes to mmf. in future wav format to go to gst
-  //if(!strcmp(extension, ".wav"))  
-  //{
-  //   pImpl->isMMFRecord = XA_BOOLEAN_FALSE;
-  //}
-
-  DEBUG_API("<-XAMediaRecorderImpl_DetermineRecordEngine"); 
-  return ret;  
-  
-}
 
 /* END OF FILE */
--- a/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,10 +21,8 @@
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
 #include "xaobjectitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAMediaRecorderAdaptCtx.h"
-#endif
-#include "xamediarecorderadaptctxmmf.h"
+#include "xaadptbasectx.h"
+#include "xacapabilitiesmgr.h"
 
 /** MACROS **/
 
@@ -67,12 +65,7 @@
     XADataSource *imageVideoSrc;
     XADataSink *dataSnk;
     XAuint8 recModes;
-    XAboolean isMMFRecord;    
-
-#ifdef _GSTREAMER_BACKEND_
     XAAdaptationBaseCtx* adaptationCtx;
-#endif
-    XAAdaptationBaseMMFCtx* adaptationCtxMMF;    
 
 } XAMediaRecorderImpl;
 
@@ -85,8 +78,6 @@
 void        XAMediaRecorderImpl_FreeResources(XAObjectItf self);
 
 
-XAresult XAMediaRecorderImpl_DetermineRecordEngine(XAObjectItf self, XADataLocator_URI *uri);
-
 /* MediaRecorderImpl -specific methods*/
 XAresult XAMediaRecorderImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  );
 XAresult XAMediaRecorderImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  );
--- a/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xametadatainsertionitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAMetadataAdaptation.h"
-#endif
+
+#include "xametadataadaptation.h"
+
 #define MAX_TAGS 255
 /* XAMetadataInsertionItfImpl* GetImpl(XAMetadataInsertionItf self)
  * Description: Validate interface pointer and cast it to implementation pointer.
@@ -65,22 +65,26 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        if( impl->adaptCtx )
-        {
-            ret = XAMetadataInsertionItfAdapt_CreateChildNode(
-                    impl->adaptCtx,parentNodeID,type,mimeType,pChildNodeID);
-        }
-        else
+
+    if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
         {
-            ret = XA_RESULT_INTERNAL_ERROR;
+        if(impl->adaptCtx)
+            {
+                ret = XAMetadataInsertionItfAdapt_CreateChildNode(
+                        (XAAdaptationGstCtx*)impl->adaptCtx,parentNodeID,type,mimeType,pChildNodeID);
+            }
+            else
+            {
+                ret = XA_RESULT_INTERNAL_ERROR;
+            }
+    
         }
-#endif
-    /*******************************************/
-    /****This is being done since mmf does not 
-     * support metadata Insertion
-     *******************************************/
-    ret = XA_RESULT_FEATURE_UNSUPPORTED;    
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
+        return XA_RESULT_FEATURE_UNSUPPORTED; 
+        }
     }
     DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
     return ret;
@@ -109,23 +113,24 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
+    if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
         if( impl->adaptCtx )
-        {
+            {
             ret = XAMetadataInsertionItfAdapt_GetSupportedKeysCount(
-                    impl->adaptCtx,nodeID,pFreeKeys,pKeyCount,pEncodingCount);
-        }
+                    (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,pFreeKeys,pKeyCount,pEncodingCount);
+            }
         else
-        {
+            {
             ret = XA_RESULT_INTERNAL_ERROR;
+            }
         }
-#endif
-    /*******************************************/
-    /****This is being done since mmf does not 
-     * support metadata Insertion
-     *******************************************/
-
-    ret = XA_RESULT_PARAMETER_INVALID;     
+    else
+        {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
+        return XA_RESULT_PARAMETER_INVALID;     
+        }
     }
     DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
     return ret;
@@ -153,23 +158,25 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
+    if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+
         if( impl->adaptCtx )
-        {
+            {
             ret = XAMetadataInsertionItfAdapt_GetKeySize(
-                        impl->adaptCtx, nodeID, keyIndex, pKeySize);
-        }
+                    (XAAdaptationGstCtx*)impl->adaptCtx, nodeID, keyIndex, pKeySize);
+            }
         else
-        {
+            {
             ret = XA_RESULT_INTERNAL_ERROR;
+            }
         }
-#endif
-        /*******************************************/
-        /****This is being done since mmf does not 
-         * support metadata Insertion
-         *******************************************/
-
-        ret = XA_RESULT_PARAMETER_INVALID;          
+    else
+        {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
+        return XA_RESULT_PARAMETER_INVALID;   
+        }
     }
     DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
     return ret;
@@ -198,23 +205,26 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
+    if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+
         if( impl->adaptCtx )
-        {
+            {
             ret = XAMetadataInsertionItfAdapt_GetKey(
-                    impl->adaptCtx,nodeID,keyIndex,keySize,pKey);
-        }
+                    (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,keyIndex,keySize,pKey);
+            }
         else
-        {
+            {
             ret = XA_RESULT_INTERNAL_ERROR;
+            }
         }
-#endif
-    /*******************************************/
-    /****This is being done since mmf does not 
-     * support metadata Insertion
-     *******************************************/
+    else
+        {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
+        return XA_RESULT_PARAMETER_INVALID;   
+        }    
 
-    ret = XA_RESULT_PARAMETER_INVALID;         
     }
     DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
     return ret;
@@ -242,23 +252,25 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
+    if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+
         if( impl->adaptCtx )
-        {
+            {
             ret = XAMetadataInsertionItfAdapt_GetFreeKeysEncoding(
-                    impl->adaptCtx,nodeID,encodingIndex,pEncoding);
-        }
+                    (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,encodingIndex,pEncoding);
+            }
         else
-        {
+            {
             ret = XA_RESULT_INTERNAL_ERROR;
+            }
         }
-#endif
-        /*******************************************/
-        /****This is being done since mmf does not 
-         * support metadata Insertion
-         *******************************************/
-
-        ret = XA_RESULT_PARAMETER_INVALID;         
+    else
+        {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
+        return XA_RESULT_PARAMETER_INVALID;   
+        }        
     }
     DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
     return ret;
@@ -286,27 +298,28 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        if( impl->adaptCtx )
+    if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
         {
+
+        if( impl->adaptCtx )
+            {
             ret = XAMetadataInsertionItfAdapt_InsertMetadataItem(
-                    impl->adaptCtx,nodeID,pKey,pValue,overwrite);
-            /*store pointers for callback*/
+                    (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,pKey,pValue,overwrite);
             impl->currentTags.mdeKeys[impl->currentTags.itemcount] = pKey;
             impl->currentTags.mdeValues[impl->currentTags.itemcount] = pValue;
             impl->currentTags.itemcount++;
-        }
+            }
         else
-        {
+            {
             ret = XA_RESULT_INTERNAL_ERROR;
+            }
         }
-#endif      
-        /*******************************************/
-        /****This is being done since mmf does not 
-         * support metadata Insertion
-         *******************************************/
-
-        ret = XA_RESULT_FEATURE_UNSUPPORTED;         
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
+        return XA_RESULT_FEATURE_UNSUPPORTED;   
+        }            
     }
     DEBUG_API("<-XAMetadataInsertionItfImpl_InsertMetadataItem");
     return ret;
@@ -331,20 +344,19 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_
+
     if(callback)
     {
         XAAdaptationBase_AddEventHandler( impl->adaptCtx, &XAMetadataInsertionItfImpl_AdaptCb,
                                           XA_METADATAEVENTS, impl );
+        impl->callback = callback;
+        impl->cbcontext  = pContext;
+        impl->cbPtrToSelf = self;
     }
     else
     {
         XAAdaptationBase_RemoveEventHandler(impl->adaptCtx, &XAMetadataInsertionItfImpl_AdaptCb );
     }
-#endif
-    impl->callback = callback;
-    impl->cbcontext  = pContext;
-    impl->cbPtrToSelf = self;
 
     DEBUG_API("<-XAMetadataInsertionItfImpl_RegisterCallback");
     return XA_RESULT_SUCCESS;
@@ -358,36 +370,35 @@
 /* XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create()
  * Description: Allocate and initialize MetadataInsertionItfImpl
  */
-XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx
-#endif
-        )
+XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(XAMediaRecorderImpl* impl)
 {
     XAMetadataInsertionItfImpl* self = (XAMetadataInsertionItfImpl*)
         calloc(1,sizeof(XAMetadataInsertionItfImpl));
+    //XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)(impl->adaptationCtx);
+    
     DEBUG_API("->XAMetadataInsertionItfImpl_Create");
     if( self )
     {
-        /* init itf default implementation */
-        self->itf.CreateChildNode = XAMetadataInsertionItfImpl_CreateChildNode;
-        self->itf.GetFreeKeysEncoding = XAMetadataInsertionItfImpl_GetFreeKeysEncoding;
-        self->itf.GetKey = XAMetadataInsertionItfImpl_GetKey;
-        self->itf.GetKeySize = XAMetadataInsertionItfImpl_GetKeySize;
-        self->itf.GetSupportedKeysCount = XAMetadataInsertionItfImpl_GetSupportedKeysCount;
-        self->itf.InsertMetadataItem = XAMetadataInsertionItfImpl_InsertMetadataItem;
-        self->itf.RegisterCallback = XAMetadataInsertionItfImpl_RegisterCallback;
+        //if(mCtx->fwtype == FWMgrFWGST)
+            {
+            /* init itf default implementation */
+            self->itf.CreateChildNode = XAMetadataInsertionItfImpl_CreateChildNode;
+            self->itf.GetFreeKeysEncoding = XAMetadataInsertionItfImpl_GetFreeKeysEncoding;
+            self->itf.GetKey = XAMetadataInsertionItfImpl_GetKey;
+            self->itf.GetKeySize = XAMetadataInsertionItfImpl_GetKeySize;
+            self->itf.GetSupportedKeysCount = XAMetadataInsertionItfImpl_GetSupportedKeysCount;
+            self->itf.InsertMetadataItem = XAMetadataInsertionItfImpl_InsertMetadataItem;
+            self->itf.RegisterCallback = XAMetadataInsertionItfImpl_RegisterCallback;
+            }
 
         /* init variables*/
         
         self->callback = NULL;
         self->cbcontext = NULL;
         self->cbPtrToSelf = NULL;
-#ifdef _GSTREAMER_BACKEND_
-        self->adaptCtx = adaptCtx;
+        self->adaptCtx = impl->adaptationCtx;
         self->currentTags.mdeKeys = calloc(MAX_TAGS,sizeof(XAMetadataInfo*));
         self->currentTags.mdeValues = calloc(MAX_TAGS,sizeof(XAMetadataInfo*));
-#endif
         self->self = self;
 
     }
@@ -404,17 +415,13 @@
     assert( self==self->self );
     if(self->callback)
     {
-#ifdef _GSTREAMER_BACKEND_
         XAAdaptationBase_RemoveEventHandler(self->adaptCtx, &XAMetadataInsertionItfImpl_AdaptCb );
-#endif        
     }
-#ifdef _GSTREAMER_BACKEND_
     XAMetadataAdapt_FreeImplTagList(&(self->currentTags), XA_BOOLEAN_FALSE);
-#endif
     free( self );
     DEBUG_API("<-XAMetadataInsertionItfImpl_Free");
 }
-#ifdef _GSTREAMER_BACKEND_
+
 /* With this method, adaptation infroms that tags are written to stream
  */
 void XAMetadataInsertionItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
@@ -460,4 +467,3 @@
     DEBUG_API("<-XAMetadataInsertionItfImpl_AdaptCb");
 }
 
-#endif
--- a/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,12 +18,9 @@
 #ifndef XAMETADATAINSERTIONITF_H
 #define XAMETADATAINSERTIONITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#include "XAMetadataAdaptation.h"
-#endif
+
+#include "xametadataadaptation.h"
+#include "xamediarecorder.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -39,11 +36,10 @@
     /* pointer to self */
     struct XAMetadataInsertionItfImpl_* self;
 
-#ifdef _GSTREAMER_BACKEND_
     /* variables */
     XAAdaptationBaseCtx *adaptCtx;
     XAMetadataImplTagList   currentTags;
-#endif
+
     /*Callback*/
     xaMetadataInsertionCallback callback;
     void    *cbcontext;
@@ -93,16 +89,8 @@
                                                      void *pContext);
 
 /* XAMetadataInsertionItfImpl -specific methods */
-XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx,
-#else
-        void
-#endif
-        );
-#ifdef _GSTREAMER_BACKEND_
+XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(XAMediaRecorderImpl* impl);
 void XAMetadataInsertionItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
 void XAMetadataInsertionItfImpl_Free(XAMetadataInsertionItfImpl* self);
 
 #endif /* XAMETADATAINSERTIONITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xarecorditf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xarecorditf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xarecorditf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XARecordItfAdaptation.h"
-#endif
+
+#include "xarecorditfadaptation.h"
+
 #include "xarecorditfadaptationmmf.h"
 #include "xathreadsafety.h"
 #include <string.h>
@@ -69,15 +69,13 @@
     /* check is play state changed, if not do nothing */
     if(state != impl->recordState)
     {
-        if(impl->isMMFRecord)
+        if(impl->adapCtx->fwtype == FWMgrFWMMF)
         {
-           ret = XARecordItfAdaptMMF_SetRecordState(impl->adaptCtxMMF, state);
+           ret = XARecordItfAdaptMMF_SetRecordState((XAAdaptationMMFCtx*)impl->adapCtx, state);
         }
         else
         {
-#ifdef _GSTREAMER_BACKEND_
-           ret = XARecordItfAdapt_SetRecordState(impl->adapCtx, state);
-#endif
+           ret = XARecordItfAdapt_SetRecordState((XAAdaptationGstCtx*)impl->adapCtx, state);
         }
 
         if(ret == XA_RESULT_SUCCESS)
@@ -139,15 +137,13 @@
 
     impl->durationLimitSetted = 1;
     impl->durationLimit = msec;
-    if(!(impl->isMMFRecord))
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
     {
-#ifdef _GSTREAMER_BACKEND_
-       ret = XARecordItfAdapt_EnablePositionTracking( impl->adapCtx, 1 );
-#endif
+       ret = XARecordItfAdapt_EnablePositionTracking( (XAAdaptationGstCtx*)impl->adapCtx, 1 );
     }
     else
     {
-    ret = XARecordItfAdaptMMF_EnablePositionTracking( impl->adaptCtxMMF, 1 );
+    ret = XARecordItfAdaptMMF_EnablePositionTracking( (XAAdaptationMMFCtx*)impl->adapCtx, 1 );
     }
 
 
@@ -179,16 +175,13 @@
     }
 
     
-    if(!(impl->isMMFRecord))
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
     {
-    
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARecordItfAdapt_GetPosition(impl->adapCtx, pMsec);
-#endif
+    ret = XARecordItfAdapt_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, pMsec);
     }
     else
     {
-    ret = XARecordItfAdaptMMF_GetPosition(impl->adaptCtxMMF, pMsec);
+    ret = XARecordItfAdaptMMF_GetPosition((XAAdaptationMMFCtx*)impl->adapCtx, pMsec);
     }
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
@@ -259,14 +252,13 @@
 
     impl->eventFlags = eventFlags;
     
-    if(!(impl->isMMFRecord))
+    if(impl->adapCtx->fwtype == FWMgrFWGST)
         {
-#ifdef _GSTREAMER_BACKEND_
             /* enable position tracking if client wants so */
             if( (eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
                 &&  impl->adapCtx && !impl->positionupdateOn)
             {
-                ret = XARecordItfAdapt_EnablePositionTracking(impl->adapCtx, XA_BOOLEAN_TRUE);
+                ret = XARecordItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_TRUE);
                 if( ret == XA_RESULT_SUCCESS )
                 {
                     impl->positionupdateOn = XA_BOOLEAN_TRUE;
@@ -275,30 +267,29 @@
             else if( !(eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
                     &&  impl->adapCtx && impl->positionupdateOn)
             {
-                ret = XARecordItfAdapt_EnablePositionTracking(impl->adapCtx, XA_BOOLEAN_FALSE);
+                ret = XARecordItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_FALSE);
                 if( ret == XA_RESULT_SUCCESS )
                 {
                     impl->positionupdateOn = XA_BOOLEAN_FALSE;
                 }
             }
-#endif
         }
     else
         {
             /* enable position tracking if client wants so */
             if( (eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
-                &&  impl->adaptCtxMMF && !impl->positionupdateOn)
+                &&  impl->adapCtx && !impl->positionupdateOn)
             {
-                ret = XARecordItfAdaptMMF_EnablePositionTracking(impl->adaptCtxMMF, XA_BOOLEAN_TRUE);
+                ret = XARecordItfAdaptMMF_EnablePositionTracking((XAAdaptationMMFCtx*)impl->adapCtx, XA_BOOLEAN_TRUE);
                 if( ret == XA_RESULT_SUCCESS )
                 {
                     impl->positionupdateOn = XA_BOOLEAN_TRUE;
                 }
             }
             else if( !(eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
-                    &&  impl->adaptCtxMMF && impl->positionupdateOn)
+                    &&  impl->adapCtx && impl->positionupdateOn)
             {
-                ret = XARecordItfAdaptMMF_EnablePositionTracking(impl->adaptCtxMMF, XA_BOOLEAN_FALSE);
+                ret = XARecordItfAdaptMMF_EnablePositionTracking((XAAdaptationMMFCtx*)impl->adapCtx, XA_BOOLEAN_FALSE);
                 if( ret == XA_RESULT_SUCCESS )
                 {
                     impl->positionupdateOn = XA_BOOLEAN_FALSE;
@@ -478,14 +469,12 @@
  * XARecordItfImpl* XARecordItfImpl_Create()
  * Description: Allocate and initialize XARecordItfImpl
  **/
-XARecordItfImpl* XARecordItfImpl_Create( 
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adapCtx,
-#endif
-        XAMediaRecorderImpl* impl )
+XARecordItfImpl* XARecordItfImpl_Create( XAMediaRecorderImpl* impl )
 {
     XARecordItfImpl* self = (XARecordItfImpl*)
         calloc(1,sizeof(XARecordItfImpl));
+    
+    
     DEBUG_API("->XARecordItfImpl_Create");
     if( self )
     {
@@ -513,14 +502,10 @@
         self->callback = NULL;
         self->cbcontext = NULL;
         self->eventFlags = 0;
-        self->adaptCtxMMF = impl->adaptationCtxMMF;
         self->cbPtrToSelf = NULL;
         self->pObjImpl = impl;
-#ifdef _GSTREAMER_BACKEND_
-        self->adapCtx = adapCtx;
-        XAAdaptationBase_AddEventHandler( adapCtx, &XARecordItfImpl_AdaptCb, XA_RECORDITFEVENTS, self );
-#endif
-        XAAdaptationBaseMMF_AddEventHandler( impl->adaptationCtxMMF, &XARecordItfImplMMF_AdaptCb, XA_RECORDITFEVENTS, self );
+        self->adapCtx = impl->adaptationCtx;
+        XAAdaptationBase_AddEventHandler( impl->adaptationCtx, &XARecordItfImpl_AdaptCb, XA_RECORDITFEVENTS, self );
         self->self = self;
     }
     DEBUG_API("<-XARecordItfImpl_Create");
@@ -535,15 +520,11 @@
 {
     DEBUG_API("->XARecordItfImpl_Free");
     assert( self==self->self );
-#ifdef _GSTREAMER_BACKEND_
     XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XARecordItfImpl_AdaptCb );
-#endif    
-    XAAdaptationBaseMMF_RemoveEventHandler( self->adaptCtxMMF, &XARecordItfImplMMF_AdaptCb );
     free( self );
     DEBUG_API("<-XARecordItfImpl_Free");
 }
 
-#ifdef _GSTREAMER_BACKEND_
 /* void XARecordItfImpl_AdaptCb
  * Description: Listen changes in adaptation
  */
@@ -594,9 +575,9 @@
         /* Check have we reached record duration limit */
         if ( impl->durationLimitSetted)
         {
-            if ( impl->lastPosition >= impl->durationLimit )
+            if ( impl->callback && (impl->lastPosition >= impl->durationLimit ))
             {
-                XARecordItfImpl_SetRecordState( impl->cbPtrToSelf,XA_RECORDSTATE_STOPPED );
+                impl->itf.SetRecordState(impl->cbPtrToSelf,XA_RECORDSTATE_STOPPED);
                 impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADATLIMIT);
             }
         }
@@ -635,129 +616,4 @@
 
     DEBUG_API("<-XARecordItfImpl_AdaptCb");
 }
-#endif
 
-
-/* void XARecordItfImpl_AdaptCb
- * Description: Listen changes in adaptation
- */
-void XARecordItfImplMMF_AdaptCb( void *pHandlerCtx, XAAdaptEventMMF *event )
-{
-    XARecordItfImpl* impl = (XARecordItfImpl*)pHandlerCtx;
-    DEBUG_API("->XARecordItfImpl_AdaptCb");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XARecordItfImpl_AdaptCb, invalid context pointer!");
-        DEBUG_API("<-XARecordItfImpl_AdaptCb");
-        return;
-    }
-    assert(event);
-    /* check position update events */
-    if( event->eventid == XA_ADAPT_POSITION_UPDATE_EVT )
-    {
-        XAuint32 newpos = 0;
-        assert(event->data);
-        newpos = *((XAuint32*)(event->data));
-        DEBUG_INFO_A1("new position %u",newpos);
-        /* check if marker passed and callback needed */
-        if( (impl->markerPosition != NO_POSITION) &&
-            (impl->eventFlags & XA_RECORDEVENT_HEADATMARKER) )
-        {
-            if( (impl->lastPosition < impl->markerPosition) &&
-                (newpos >= impl->markerPosition) &&
-                impl->callback )
-            {
-                impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADATMARKER);
-            }
-        }
-        /* check if update period passed and callback needed */
-        if( (impl->positionUpdatePeriod > 0) &&
-            (impl->eventFlags & XA_RECORDEVENT_HEADATNEWPOS) &&
-            impl->callback )
-        {
-            if( (XAuint32)((impl->lastPosition)/(impl->positionUpdatePeriod )) <
-                (XAuint32)(newpos/(impl->positionUpdatePeriod )) )
-            {
-                impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADATNEWPOS);
-            }
-        }
-        /* store position */
-        impl->lastPosition = newpos;
-
-        /* Check have we reached record duration limit */
-        if ( impl->durationLimitSetted && impl->callback)
-        {
-            if ( impl->lastPosition >= impl->durationLimit )
-            {
-                XARecordItfImpl_SetRecordState( impl->cbPtrToSelf,XA_RECORDSTATE_STOPPED );
-                impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADATLIMIT);
-            }
-        }
-    }
-    else if( event->eventid == XA_RECORDEVENT_HEADSTALLED )
-    {
-        impl->recordState = XA_RECORDSTATE_PAUSED;
-        /* send callback if needed */
-        if( (XA_RECORDEVENT_HEADSTALLED & impl->eventFlags) && impl->callback )
-        {
-            impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADSTALLED);
-        }
-    }
-    else if( event->eventid == XA_RECORDEVENT_BUFFER_FULL )
-    {
-        /* Adaptation is set to pause, need to sync state with AL-layer*/
-        impl->recordState = XA_RECORDSTATE_STOPPED;
-        /* send callback if needed */
-        if( (XA_RECORDEVENT_BUFFER_FULL & impl->eventFlags) && impl->callback )
-        {
-            impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_BUFFER_FULL);
-        }
-    }
-    else if( event->eventid == XA_RECORDEVENT_HEADMOVING )
-    {
-        /* send callback if needed */
-        if( (XA_RECORDEVENT_HEADMOVING & impl->eventFlags) && impl->callback )
-        {
-            impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADMOVING);
-        }
-    }
-    else
-    {
-        impl->pObjImpl->baseObj.callBack(impl->pObjImpl->baseObj.cbPtrToSelf, impl->pObjImpl->baseObj.context, 
-                                        event->eventid, 0 ,
-                                        impl->pObjImpl->baseObj.state , NULL);
-    }
-
-    DEBUG_API("<-XARecordItfImpl_AdaptCb");
-}
-
-XAresult XARecordItfImpl_DetermineRecordEngine(XARecordItf self, XADataLocator_URI *uri)
-{
-
-  XAresult ret = XA_RESULT_SUCCESS;
-  
-  char* tempPtr = NULL;
-  char extension[5];
-  
-  XARecordItfImpl* impl = (XARecordItfImpl*)(self);
-  DEBUG_API("->XAPlayItfImpl_DetermineRecordEngine");
-    
-  //need to move to configuration file and add more in final class
-  
-  impl->isMMFRecord = XA_BOOLEAN_TRUE;
-	
-  tempPtr = strchr((char*)(uri->URI), '.');
-  strcpy(extension, tempPtr);
-	
-	//TODO:
-	//For now all record use cases need to go to MMF in the future can move wav to gst
-  //if(!strcmp(extension, ".wav"))  
-  //{
-  //   impl->isMMFRecord = XA_BOOLEAN_FALSE;
-  //}
-
-  return ret;  
-  
-  DEBUG_API("<-XAPlayItfImpl_DetermineRecordEngine");
-}
--- a/khronosfws/openmax_al/src/mediarecorder/xarecorditf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xarecorditf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -20,10 +20,7 @@
 
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
-#include "xaadaptationcontextbasemmf.h"
+
 #include "xamediarecorder.h"
 /** MACROS **/
 #define NO_POSITION XA_TIME_UNKNOWN
@@ -60,12 +57,8 @@
     void*            context;
     XARecordItf      cbPtrToSelf;
 
-#ifdef _GSTREAMER_BACKEND_
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
-    XAAdaptationBaseMMFCtx *adaptCtxMMF;
-    XAboolean isMMFRecord;    
 
 } XARecordItfImpl;
 
@@ -111,15 +104,9 @@
                                                   XAmillisecond *pMsec );
 
 /* XARecordItfImpl -specific methods */
-XARecordItfImpl* XARecordItfImpl_Create( 
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adapCtx,
+XARecordItfImpl* XARecordItfImpl_Create( XAMediaRecorderImpl* impl );
+void XARecordItfImpl_Free( XARecordItfImpl* self );
+void XARecordItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+
 #endif
-        XAMediaRecorderImpl* impl );
-XAresult XARecordItfImpl_DetermineRecordEngine(XARecordItf self, XADataLocator_URI *uri);
-void XARecordItfImpl_Free( XARecordItfImpl* self );
-#ifdef _GSTREAMER_BACKEND_
-void XARecordItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
-void XARecordItfImplMMF_AdaptCb( void *pHandlerCtx, XAAdaptEventMMF *event );
-#endif /* XARECORDITF_H */
+ /* XARECORDITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xasnapshotitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XASnapShotItfAdaptation.h"
-#endif
+
+#include "xasnapshotitfadaptation.h"
+
 #include "xathreadsafety.h"
 #include "xaplayitf.h"
 #include "xaglobals.h"
@@ -84,65 +84,73 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    XASnapshotItfAdaptation_GetBurstFPSRange(impl->adapCtx,&minF,&maxF);
-    XASnapshotItfAdaptation_GetMaxPicsPerBurst(impl->adapCtx,&maxP);
-#endif
-    /*Check attributes and initialize local variables*/
-    /*NOTE: bug in spec? - should sink attribute be a pointer?*/
-    if( numberOfPictures > maxP ||
-        (numberOfPictures!=1 && !(sink.pLocator) ) )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-        DEBUG_ERR("XASnapshotItfImpl_InitiateSnapshot -"
-                        "XA_RESULT_PARAMETER_INVALID (numberOfPictures)");
+    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        XASnapshotItfAdaptation_GetBurstFPSRange((XAAdaptationGstCtx*)impl->adapCtx,&minF,&maxF);
+        XASnapshotItfAdaptation_GetMaxPicsPerBurst((XAAdaptationGstCtx*)impl->adapCtx,&maxP);
+    
+        /*Check attributes and initialize local variables*/
+        /*NOTE: bug in spec? - should sink attribute be a pointer?*/
+        if( numberOfPictures > maxP ||
+            (numberOfPictures!=1 && !(sink.pLocator) ) )
+        {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+            DEBUG_ERR("XASnapshotItfImpl_InitiateSnapshot -"
+                            "XA_RESULT_PARAMETER_INVALID (numberOfPictures)");
+            DEBUG_API("<-XASnapshotItfImpl_InitiateSnapshot");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        if( numberOfPictures!=1 && (fps<minF || fps>maxF) )
+        {
+            /* invalid parameter */
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+            DEBUG_ERR("XASnapshotItfImpl_InitiateSnapshot -"
+                            "XA_RESULT_PARAMETER_INVALID (fps)");
+            DEBUG_API("<-XASnapshotItfImpl_InitiateSnapshot");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+    
+        impl->numberofpictures = numberOfPictures;
+        impl->usercontext = pContext;
+        impl->initcallback = initiatedCallback;
+        impl->takencallback = takenCallback;
+        impl->cbPtrToSelf = self;
+        impl->freezevf = freezeViewFinder;
+    
+    
+        if( impl->initongoing ||
+            impl->initialized ||
+            impl->snapshotongoing )
+        {
+            res = XASnapshotItfAdaptation_CancelSnapshot((XAAdaptationGstCtx*)impl->adapCtx);
+            impl->initongoing = XA_BOOLEAN_FALSE;
+            impl->snapshotongoing = XA_BOOLEAN_FALSE;
+        }
+    
+        /* Initialize snapshot to adaptation */
+        if( impl->adapCtx )
+            {
+            impl->initongoing = XA_BOOLEAN_TRUE;
+            res = XASnapshotItfAdaptation_InitiateSnapshot((XAAdaptationGstCtx*)impl->adapCtx,
+                                                           numberOfPictures,
+                                                           fps,
+                                                           freezeViewFinder,
+                                                           &sink);
+            }
+        else
+            {
+            res = XA_RESULT_INTERNAL_ERROR;
+            }
+    
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
         DEBUG_API("<-XASnapshotItfImpl_InitiateSnapshot");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    if( numberOfPictures!=1 && (fps<minF || fps>maxF) )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-        DEBUG_ERR("XASnapshotItfImpl_InitiateSnapshot -"
-                        "XA_RESULT_PARAMETER_INVALID (fps)");
-        DEBUG_API("<-XASnapshotItfImpl_InitiateSnapshot");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
+        res = XA_RESULT_FEATURE_UNSUPPORTED;      
+        }
 
-    impl->numberofpictures = numberOfPictures;
-    impl->usercontext = pContext;
-    impl->initcallback = initiatedCallback;
-    impl->takencallback = takenCallback;
-    impl->cbPtrToSelf = self;
-    impl->freezevf = freezeViewFinder;
-
-#ifdef _GSTREAMER_BACKEND_
-
-    if( impl->initongoing ||
-        impl->initialized ||
-        impl->snapshotongoing )
-    {
-        res = XASnapshotItfAdaptation_CancelSnapshot(impl->adapCtx);
-        impl->initongoing = XA_BOOLEAN_FALSE;
-        impl->snapshotongoing = XA_BOOLEAN_FALSE;
-    }
-
-    /* Initialize snapshot to adaptation */
-    if( impl->adapCtx )
-    {
-        impl->initongoing = XA_BOOLEAN_TRUE;
-        res = XASnapshotItfAdaptation_InitiateSnapshot(impl->adapCtx,
-                                                       numberOfPictures,
-                                                       fps,
-                                                       freezeViewFinder,
-                                                       &sink);
-    }
-    else
-    {
-        res = XA_RESULT_INTERNAL_ERROR;
-    }
-#endif
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
     DEBUG_API_A1("<-XASnapshotItfImpl_InitiateSnapshot (%d)", (int)res);
     return res;
@@ -169,45 +177,53 @@
         res = XA_RESULT_PARAMETER_INVALID;
     }
 
-    if( impl->initongoing ||
-        impl->snapshotongoing ||
-        !impl->initialized )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-        DEBUG_ERR("XASnapshotItfImpl_TakeSnapshot -"
-                        "XA_RESULT_PRECONDITIONS_VIOLATED");
-        DEBUG_API("<-XASnapshotItfImpl_TakeSnapshot");
-        return XA_RESULT_PRECONDITIONS_VIOLATED;
-    }
-
-    if( impl->numberofpictures == 0 )
-    {
-        if( impl->takencallback )
+    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
         {
-            impl->takencallback(impl->cbPtrToSelf, impl->usercontext,
-                                impl->numberofpictures, NULL);
+        if( impl->initongoing ||
+            impl->snapshotongoing ||
+            !impl->initialized )
+            {
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+            DEBUG_ERR("XASnapshotItfImpl_TakeSnapshot -"
+                            "XA_RESULT_PRECONDITIONS_VIOLATED");
+            DEBUG_API("<-XASnapshotItfImpl_TakeSnapshot");
+            return XA_RESULT_PRECONDITIONS_VIOLATED;
+            }
+    
+        if( impl->numberofpictures == 0 )
+            {
+            if( impl->takencallback )
+                {
+                impl->takencallback(impl->cbPtrToSelf, impl->usercontext,
+                                    impl->numberofpictures, NULL);
+                }
+            res = XA_RESULT_SUCCESS;
+            }
+        /*Inform adaptation to take snapshot*/
+        else if( impl->adapCtx )
+            {
+            impl->snapshotongoing = XA_BOOLEAN_TRUE;
+            res = XASnapshotItfAdaptation_TakeSnapshot((XAAdaptationGstCtx*)impl->adapCtx);
+            if( res!=XA_RESULT_SUCCESS )
+                {
+                DEBUG_ERR_A1("Adaptation returns error %d taking snapshot!", (int)res);
+                impl->snapshotongoing = XA_BOOLEAN_FALSE;
+                }
+            }
+        else
+            {
+            res = XA_RESULT_INTERNAL_ERROR;
+            DEBUG_ERR("XASnapshotItfImpl_TakeSnapshot"
+                    "-XA_RESULT_INTERNAL_ERROR ");
+            }
+    
         }
-        res = XA_RESULT_SUCCESS;
-    }
-#ifdef _GSTREAMER_BACKEND_
-    /*Inform adaptation to take snapshot*/
-    else if( impl->adapCtx )
-    {
-        impl->snapshotongoing = XA_BOOLEAN_TRUE;
-        res = XASnapshotItfAdaptation_TakeSnapshot(impl->adapCtx);
-        if( res!=XA_RESULT_SUCCESS )
+    else
         {
-            DEBUG_ERR_A1("Adaptation returns error %d taking snapshot!", (int)res);
-            impl->snapshotongoing = XA_BOOLEAN_FALSE;
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XASnapshotItfImpl_TakeSnapshot");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;      
         }
-    }
-#endif    
-    else
-    {
-        res = XA_RESULT_INTERNAL_ERROR;
-        DEBUG_ERR("XASnapshotItfImpl_TakeSnapshot"
-                "-XA_RESULT_INTERNAL_ERROR ");
-    }
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
     DEBUG_API("<-XASnapshotItfImpl_TakeSnapshot");
@@ -235,26 +251,33 @@
         /* invalid parameter */
         res = XA_RESULT_PARAMETER_INVALID;
     }
-
-    if( impl->initongoing ||
-        impl->snapshotongoing ||
-        impl->initialized )
-    {
-#ifdef _GSTREAMER_BACKEND_
-        if( impl->adapCtx )
+    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
         {
-            res = XASnapshotItfAdaptation_CancelSnapshot(impl->adapCtx);
+        if( impl->initongoing ||
+            impl->snapshotongoing ||
+            impl->initialized )
+            {
+            if( impl->adapCtx )
+                {
+                res = XASnapshotItfAdaptation_CancelSnapshot((XAAdaptationGstCtx*)impl->adapCtx);
+                }
+            else
+                {
+                DEBUG_ERR("No adaptation context!!");
+                res = XA_RESULT_INTERNAL_ERROR;
+                }
+            impl->initongoing = XA_BOOLEAN_FALSE;
+            impl->snapshotongoing = XA_BOOLEAN_FALSE;
+            impl->initialized = XA_BOOLEAN_FALSE;
+            }
+    
         }
-        else
+    else
         {
-            DEBUG_ERR("No adaptation context!!");
-            res = XA_RESULT_INTERNAL_ERROR;
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XASnapshotItfImpl_CancelSnapshot");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;         
         }
-#endif        
-        impl->initongoing = XA_BOOLEAN_FALSE;
-        impl->snapshotongoing = XA_BOOLEAN_FALSE;
-        impl->initialized = XA_BOOLEAN_FALSE;
-    }
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
     DEBUG_API_A1("<-XASnapshotItfImpl_CancelSnapshot (%d)", (int)res);
@@ -277,24 +300,34 @@
         /* invalid parameter */
         res =  XA_RESULT_PARAMETER_INVALID;
     }
-    if( image && (image->pLocator) &&
+    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        if( image && (image->pLocator) &&
         *((XAuint32*)(image->pLocator)) == XA_DATALOCATOR_ADDRESS )
-    {
-        if( ((XADataLocator_Address*)(image->pLocator))->pAddress )
-        {
-            free(((XADataLocator_Address*)(image->pLocator))->pAddress);
+            {
+            if( ((XADataLocator_Address*)(image->pLocator))->pAddress )
+                {
+                free(((XADataLocator_Address*)(image->pLocator))->pAddress);
+                }
+            image->pLocator = NULL;
+            image->pFormat = NULL;
+            DEBUG_API("<-XASnapshotItfImpl_ReleaseBuffers- buffers released");
+            res = XA_RESULT_SUCCESS;
+            }
+        else
+            {
+            DEBUG_ERR_A1("<-XASnapshotItfImpl_ReleaseBuffers- "
+                    "INVALID XADataSink at 0x%x", (int)image);
+            res = XA_RESULT_PARAMETER_INVALID;
+            }
         }
-        image->pLocator = NULL;
-        image->pFormat = NULL;
-        DEBUG_API("<-XASnapshotItfImpl_ReleaseBuffers- buffers released");
-        res = XA_RESULT_SUCCESS;
-    }
     else
-    {
-        DEBUG_ERR_A1("<-XASnapshotItfImpl_ReleaseBuffers- "
-                "INVALID XADataSink at 0x%x", (int)image);
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XASnapshotItfImpl_ReleaseBuffers");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;     
+        }
+    
     DEBUG_API("<-XASnapshotItfImpl_ReleaseBuffers");
     return res;
 }
@@ -319,19 +352,26 @@
         DEBUG_API("<-XASnapshotItfImpl_GetMaxPicsPerBurst");
         return XA_RESULT_PARAMETER_INVALID;
     }
-
-#ifdef _GSTREAMER_BACKEND_
-    if( impl->adapCtx )
-    {
-        res = XASnapshotItfAdaptation_GetMaxPicsPerBurst(impl->adapCtx, maxNumberOfPictures);
-    }
+    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        if( impl->adapCtx )
+            {
+            res = XASnapshotItfAdaptation_GetMaxPicsPerBurst((XAAdaptationGstCtx*)impl->adapCtx, maxNumberOfPictures);
+            }
+        else
+            {
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+            DEBUG_API("<-XASnapshotItfImpl_GetMaxPicsPerBurst");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        }
     else
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
         DEBUG_API("<-XASnapshotItfImpl_GetMaxPicsPerBurst");
-        return XA_RESULT_INTERNAL_ERROR;
-    }
-#endif
+        res = XA_RESULT_FEATURE_UNSUPPORTED;     
+        }
+    
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
     DEBUG_API("<-XASnapshotItfImpl_GetMaxPicsPerBurst");
     return res;
@@ -361,18 +401,25 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    if( impl->adapCtx )
-    {
-        res = XASnapshotItfAdaptation_GetBurstFPSRange(impl->adapCtx,minFPS,maxFPS);
-    }
+    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        if( impl->adapCtx )
+            {
+            res = XASnapshotItfAdaptation_GetBurstFPSRange((XAAdaptationGstCtx*)impl->adapCtx,minFPS,maxFPS);
+            }
+        else
+            {
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+            DEBUG_API("<-XASnapshotItfImpl_GetBurstFPSRange");
+            return XA_RESULT_INTERNAL_ERROR;
+            }
+        }
     else
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
         DEBUG_API("<-XASnapshotItfImpl_GetBurstFPSRange");
-        return XA_RESULT_INTERNAL_ERROR;
-    }
-#endif
+        res = XA_RESULT_FEATURE_UNSUPPORTED; 
+        }
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
     DEBUG_API("<-XASnapshotItfImpl_GetBurstFPSRange");
     return res;
@@ -397,14 +444,21 @@
         res = XA_RESULT_PARAMETER_INVALID;
     }
     impl->shutterfeedback = enabled;
+    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
+        {
+        if( impl->adapCtx )
+            {
+            /*Inform adaptation about shutter feedback */
+            res = XASnapshotItfAdaptation_SetShutterFeedback((XAAdaptationGstCtx*)impl->adapCtx, enabled);
+            }           
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        DEBUG_API("<-XASnapshotItfImpl_GetBurstFPSRange");
+        res = XA_RESULT_FEATURE_UNSUPPORTED; 
+        }
     
-#ifdef _GSTREAMER_BACKEND_
-    if( impl->adapCtx )
-    {
-        /*Inform adaptation about shutter feedback */
-        res = XASnapshotItfAdaptation_SetShutterFeedback(impl->adapCtx, enabled);
-    }
-#endif
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
     DEBUG_API("<-XASnapshotItfImpl_SetShutterFeedback");
     return res;
@@ -441,14 +495,12 @@
  * XASnapshotItfImpl* XASnapshotItfImpl_Create()
  * Description: Allocate and initialize SnapshotItfImpl
  **/
-XASnapshotItfImpl* XASnapshotItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx
-#endif
-        )
+XASnapshotItfImpl* XASnapshotItfImpl_Create(XAMediaRecorderImpl* impl)
 {
     XASnapshotItfImpl* self = (XASnapshotItfImpl*)
         calloc(1,sizeof(XASnapshotItfImpl));
+    
+   
     DEBUG_API("->XASnapshotItfImpl_Create");
     if( self )
     {
@@ -463,17 +515,13 @@
         self->itf.TakeSnapshot = XASnapshotItfImpl_TakeSnapshot;
 
         /* init variables */
-#ifdef _GSTREAMER_BACKEND_
-        self->adapCtx = adapCtx;
-#endif
+        self->adapCtx = impl->adaptationCtx;
         self->self = self;
         self->cbPtrToSelf = NULL;
     }
 
-#ifdef _GSTREAMER_BACKEND_
     /* Add call back function to eventhandler. */
-    XAAdaptationBase_AddEventHandler( adapCtx, &XASnapshotItfImpl_AdaptCb, XA_SNAPSHOTITFEVENTS, self );
-#endif
+    XAAdaptationBase_AddEventHandler( impl->adaptationCtx, &XASnapshotItfImpl_AdaptCb, XA_SNAPSHOTITFEVENTS, self );
     DEBUG_API("<-XASnapshotItfImpl_Create");
     return self;
 }
@@ -489,17 +537,12 @@
     /*
      * Free all resources reserved at XASnapshotItfImpl_Create
      */
-#ifdef _GSTREAMER_BACKEND_
-    if( self->adapCtx )
-    {
-        XASnapshotItfAdaptation_CancelSnapshot(self->adapCtx);
-    }
+    self->itf.CancelSnapshot(self->cbPtrToSelf);
     XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XASnapshotItfImpl_AdaptCb );
-#endif    
     free( self );
     DEBUG_API("<-XASnapshotItfImpl_Free");
 }
-#ifdef _GSTREAMER_BACKEND_
+
 /* void XASnapshotItfImpl_AdaptCb
  * Description:
  * Listen adaptation callBacks from camera adaptation
@@ -551,5 +594,4 @@
     }
     DEBUG_API("<-XASnapshotItfImpl_AdaptCb");
 }
-#endif
 /*End of file*/
--- a/khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -19,11 +19,9 @@
 #define XASNAPSHOTITF_H
 
 #include <semaphore.h>
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+
+#include "xamediarecorder.h"
+
 /** MACROS **/
 
 /** TYPES **/
@@ -52,9 +50,9 @@
     void* usercontext;
     XASnapshotItf cbPtrToSelf;
 
-#ifdef _GSTREAMER_BACKEND_
+
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
     XAboolean           snapshotongoing;
     XAboolean           initongoing;
     XAboolean           initialized;
@@ -95,16 +93,8 @@
                                               XAboolean *enabled);
 
 /* XASnapshotItfImpl -specific methods */
-XASnapshotItfImpl* XASnapshotItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx,
-#else
-        void
-#endif
-        );
-#ifdef _GSTREAMER_BACKEND_
+XASnapshotItfImpl* XASnapshotItfImpl_Create(XAMediaRecorderImpl* impl);
 void XASnapshotItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
 void XASnapshotItfImpl_Free(XASnapshotItfImpl* self);
 
 #endif /* XASNAPSHOTITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,11 +20,10 @@
 #include <assert.h>
 #include <string.h>
 #include "xavideoencoderitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAVideoEncoderItfAdaptation.h"
-#include "XAStaticCapsAdaptation.h"
-#include "XARecordItfAdaptation.h"
-#endif
+
+#include "xavideoencoderitfadaptation.h"
+#include "xarecorditfadaptation.h"
+#include "xacapabilitiesmgr.h"
 #include "xathreadsafety.h"
 
 
@@ -55,8 +54,7 @@
                                                 XAVideoSettings *pSettings)
 {
     XAresult res = XA_RESULT_SUCCESS;
-#ifdef _GSTREAMER_BACKEND_
-    XAStaticCapsData temp;
+    XACapabilities temp;
     XAuint32 recState = XA_RECORDSTATE_STOPPED;
     XAVideoEncoderItfImpl *impl = GetImpl(self);
     DEBUG_API("->XAVideoEncoderItfImpl_SetVideoSettings");
@@ -70,34 +68,40 @@
         DEBUG_API("<-XAVideoEncoderItfImpl_SetVideoSettings");
         return XA_RESULT_PARAMETER_INVALID;
     }
-
-    res = XAStaticCapsAdapt_GetCapsById(XACAP_ENCODER|XACAP_VIDEO, pSettings->encoderId, &temp);
-    if( res == XA_RESULT_SUCCESS )
-    {
-        res = XARecordItfAdapt_GetRecordState( impl->adaptCtx, &recState );
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), pSettings->encoderId, &temp);
         if( res == XA_RESULT_SUCCESS )
-        {
-            if( XA_RECORDSTATE_STOPPED == recState )
-            {
-                res = XAVideoEncoderItfAdapt_SetVideoSettings(impl->adaptCtx, pSettings);
-            }
-            else
             {
-                DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
-                DEBUG_API("<-XAVideoEncoderItfImpl_SetVideoSettings");
-                return XA_RESULT_PRECONDITIONS_VIOLATED;
+            res = XARecordItfAdapt_GetRecordState( (XAAdaptationGstCtx*)impl->adaptCtx, &recState );
+            if( res == XA_RESULT_SUCCESS )
+                {
+                if( XA_RECORDSTATE_STOPPED == recState )
+                    {
+                    res = XAVideoEncoderItfAdapt_SetVideoSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
+                    }
+                else
+                    {
+                    DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+                    res = XA_RESULT_PRECONDITIONS_VIOLATED;
+                    }
+                }
             }
+        else
+            {
+            DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+            res = XA_RESULT_FEATURE_UNSUPPORTED;
+            }
+    
         }
-    }
     else
-    {
+        {
         DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XAVideoEncoderItfImpl_SetVideoSettings");
-        return XA_RESULT_FEATURE_UNSUPPORTED;
-    }
+        res = XA_RESULT_FEATURE_UNSUPPORTED;     
+        }
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-#endif
+
     DEBUG_API("<-XAVideoEncoderItfImpl_SetVideoSettings");
     return res;
 }
@@ -118,9 +122,16 @@
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_
-    res = XAVideoEncoderItfAdapt_GetVideoSettings(impl->adaptCtx, pSettings);
-#endif
+    if(impl->adaptCtx->fwtype == FWMgrFWGST)
+        {
+        res = XAVideoEncoderItfAdapt_GetVideoSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
+        }
+    else
+        {
+        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+        res = XA_RESULT_FEATURE_UNSUPPORTED;      
+        }
+
     DEBUG_API("<-XAVideoEncoderItfImpl_GetVideoSettings");
     return res;
 }
@@ -133,11 +144,7 @@
 /* XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create()
  * Description: Allocate and initialize VideoEncoderItfImpl
  */
-XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx
-#endif
-        )
+XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create( XAMediaRecorderImpl* impl )
 {
     XAVideoEncoderItfImpl* self = (XAVideoEncoderItfImpl*)
         calloc(1,sizeof(XAVideoEncoderItfImpl));
@@ -149,10 +156,8 @@
         self->itf.GetVideoSettings = XAVideoEncoderItfImpl_GetVideoSettings;
         self->itf.SetVideoSettings = XAVideoEncoderItfImpl_SetVideoSettings;
 
-#ifdef _GSTREAMER_BACKEND_
         /* init variables */
-        self->adaptCtx = adaptCtx;
-#endif
+        self->adaptCtx = impl->adaptationCtx;
         self->self = self;
     }
     DEBUG_API("<-XAVideoEncoderItfImpl_Create");
--- a/khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XAVIDEOENCODERITF_H
 #define XAVIDEOENCODERITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+
+#include "xamediarecorder.h"
 /** MACROS **/
 
 /** TYPES **/
@@ -37,10 +34,10 @@
     struct XAVideoEncoderItf_ itf;
     /* pointer to self */
     struct XAVideoEncoderItfImpl_* self;
-#ifdef _GSTREAMER_BACKEND_
+
     /* variables */
     XAAdaptationBaseCtx *adaptCtx;
-#endif
+
 } XAVideoEncoderItfImpl;
 
 /** METHODS **/
@@ -56,14 +53,7 @@
 
 
 /* XAVideoEncoderItfImpl -specific methods */
-XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create(
-#ifdef _GSTREAMER_BACKEND_
-        XAAdaptationBaseCtx *adaptCtx,
-#else
-        void
-#endif
-        );
-
+XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create( XAMediaRecorderImpl* impl );
 void XAVideoEncoderItfImpl_Free(XAVideoEncoderItfImpl* self);
 
 #endif /* XAVIDEOENCODERITF_H */
--- a/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.c	Fri Apr 30 19:18:45 2010 -0500
@@ -24,11 +24,15 @@
 #include "xametadataextractionitf.h"
 #include "xametadatatraversalitf.h"
 #include "xaconfigextensionsitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAMetadataAdaptCtx.h"
-#endif
+
+#include "xametadataadaptctx.h"
+#include "xacapabilitiesmgr.h"
 #include "xathreadsafety.h"
 
+#include "xaadaptationmmf.h"
+#include "xametadataadaptctxmmf.h"
+
+
 /* Static mapping of enumeration XAMetadataInterfaces to interface iids */
 static const XAInterfaceID* xaMetadataExtractorItfIIDs[MDE_ITFCOUNT]=
 {
@@ -49,7 +53,9 @@
  * Description: Create object
  * Add this method to XAGlobals.h
  */
-XAresult XAMetadataExtractorImpl_Create(XAObjectItf *pMetadataExtractor,
+XAresult XAMetadataExtractorImpl_Create(FrameworkMap* mapper,
+                                        XACapabilities* capabilities,
+                                        XAObjectItf *pMetadataExtractor,
                                         XADataSource *pDataSource,
                                         XAuint32 numInterfaces,
                                         const XAInterfaceID * pInterfaceIds,
@@ -58,6 +64,8 @@
     XAMetadataExtractorImpl* pImpl = NULL;
     XAObjectItfImpl* pBaseObj = NULL;
     XAuint8 itfIndex = 0;
+    FWMgrFwType fwType;
+    const char *uri = NULL;    
     XAresult res = XA_RESULT_SUCCESS;
 
     DEBUG_API("->XAMetadataExtractorImpl_Create");
@@ -139,29 +147,55 @@
         }
     }
 
-    /* Mark interfaces that can be handled dynamically */
+   
+    // Mark interfaces that can be handled dynamically 
     pBaseObj->interfaceMap[MDE_CONFIGEXTENSIONITF].isDynamic = XA_BOOLEAN_TRUE;
 
-    /* Set ObjectItf to point to newly created object */
+     //Set ObjectItf to point to newly created object 
     *pMetadataExtractor = (XAObjectItf)&(pBaseObj->self);
 
-#ifdef _GSTREAMER_BACKEND_
-    /* Create metadata adaptation context */
-    pImpl->adaptationCtx = XAMetadataAdaptCtx_Create(pDataSource);
-#endif
+	//store member variables
+	pImpl->dataSrc = pDataSource;
+
+	/* Determine framework type that can handle recording */
+    fwType = (FWMgrFwType)FWMgrMOUnknown;
+    /**/
+    if (pDataSource->pLocator)
+    {
+        XADataLocator_URI* dataLoc = (XADataLocator_URI*)pDataSource->pLocator;
+        if (dataLoc->locatorType == XA_DATALOCATOR_URI)
+        {
+            uri = (char*)dataLoc->URI;
+        }
+    }
+	
+    fwType = XAFrameworkMgr_GetFramework(mapper, uri, FWMgrMOPlayer);
+
+    if (fwType == FWMgrMOUnknown)
+    {
+        XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+        DEBUG_API("<-XAMetadataExtractorImpl_Create");
+        return XA_RESULT_CONTENT_UNSUPPORTED;
+    }
     
-    /* This code is put here to return Feature Not Supported since adaptation is not present*/
-    /*************************************************/
-    XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+    if(fwType == FWMgrFWMMF)
+    {    
+        pImpl->adaptationCtxMMF = XAMetadataAdaptCtxMMF_Create(pDataSource);
+        
+        pImpl->curAdaptCtx = pImpl->adaptationCtxMMF;    
+    }
+    else
+    {
+		// Create metadata adaptation context 
+		pImpl->adaptationCtxGst = XAMetadataAdaptCtx_Create(pDataSource);
+       
+       	pImpl->curAdaptCtx   = pImpl->adaptationCtxGst;
+    }
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
-    DEBUG_ERR("Required interface not found - abort creation!");
     DEBUG_API("<-XAMetadataExtractorImpl_Create");
-    return XA_RESULT_FEATURE_UNSUPPORTED;
-    /*************************************************/    
-    
-/*    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
-    DEBUG_API("<-XAMetadataExtractorImpl_Create");
-    return XA_RESULT_SUCCESS;*/
+    return XA_RESULT_SUCCESS;
 }
 
 /* XAResult XAMetadataExtractorImpl_QueryNumSupportedInterfaces
@@ -258,21 +292,21 @@
                                       XAMetadataExtractorImpl_DoRemoveItf);
                     }
                     break;
-#ifdef _GSTREAMER_BACKEND_
+
                 case MDE_METADATAEXTRACTIONITF:
-                    pItf = XAMetadataExtractionItfImpl_Create( pObjImpl->adaptationCtx );
+                    pItf = XAMetadataExtractionItfImpl_Create( pObjImpl->curAdaptCtx );
                     break;
                 case MDE_METADATATRAVERSALITF:
-                    pItf = XAMetadataTraversalItfImpl_Create( pObjImpl->adaptationCtx );
+                    pItf = XAMetadataTraversalItfImpl_Create( pObjImpl->curAdaptCtx );
                     break;
                 case MDE_CONFIGEXTENSIONITF:
                     pItf = XAConfigExtensionsItfImpl_Create();
-                    XAConfigExtensionsItfImpl_SetContext( pItf, pObjImpl->adaptationCtx );
+                    XAConfigExtensionsItfImpl_SetContext( pItf, pObjImpl->curAdaptCtx );
                     break;
                 case MDE_DYNAMICSOURCEITF:
-                    pItf = XADynamicSourceItfImpl_Create( pObjImpl->adaptationCtx );
+                    pItf = XADynamicSourceItfImpl_Create( pObjImpl->curAdaptCtx );
                     break;
-#endif
+
                 default:
                     break;
             }
@@ -292,9 +326,16 @@
     }
     /*Initialize adaptation context*/
     /* init adaptation */
-#ifdef _GSTREAMER_BACKEND_
-    ret = XAMetadataAdaptCtx_PostInit( pObjImpl->adaptationCtx );
-#endif
+
+    if(pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+    {
+       ret = XAMetadataAdaptCtxMMF_PostInit( (XAAdaptationMMFCtx*)pObjImpl->adaptationCtxMMF );
+    }
+    else
+    {
+	    ret = XAMetadataAdaptCtx_PostInit( (XAAdaptationGstCtx*)pObjImpl->adaptationCtxGst );
+    }
+
     if ( ret != XA_RESULT_SUCCESS )
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
@@ -328,12 +369,13 @@
     
     XAuint8 itfIdx = 0;
     void *pItf = NULL;
+    XAMetadataExtractorImpl* pImpl = (XAMetadataExtractorImpl*)(*self);
     DEBUG_API("->XAMetadataExtractorImpl_FreeResources");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSMediaPlayer);
-#ifdef _GSTREAMER_BACKEND_
-    XAMetadataExtractorImpl* pImpl = (XAMetadataExtractorImpl*)(*self);
+
+    
     assert( pObj && pImpl && pObj == pObj->self );
-#endif
+
     for(itfIdx = 0; itfIdx < MDE_ITFCOUNT; itfIdx++)
     {
         pItf = pObj->interfaceMap[itfIdx].pItf;
@@ -360,13 +402,23 @@
             pObj->interfaceMap[itfIdx].pItf = NULL;
         }
     }
-#ifdef _GSTREAMER_BACKEND_
-    if ( pImpl->adaptationCtx != NULL )
-    {
-        XAMetadataAdaptCtx_Destroy( pImpl->adaptationCtx );
-        pImpl->adaptationCtx = NULL;
-    }
-#endif
+	
+	if(pImpl->curAdaptCtx)
+	{
+		if(pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+		{
+			XAMetadataAdaptCtxMMF_Destroy( (XAAdaptationMMFCtx*)pImpl->adaptationCtxMMF );
+			pImpl->adaptationCtxMMF = NULL;
+		}
+		else
+		{
+			XAMetadataAdaptCtx_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtxGst );
+			pImpl->adaptationCtxGst = NULL;
+		}
+	}
+	
+	pImpl->curAdaptCtx = NULL;
+
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSMediaPlayer);
     DEBUG_API("<-XAMetadataExtractorImpl_FreeResources");
     return;
@@ -381,10 +433,10 @@
  */
 XAresult XAMetadataExtractorImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
 {
-#ifdef _GSTREAMER_BACKEND_
+
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAMetadataExtractorImpl* pImpl = (XAMetadataExtractorImpl*)(pObj);
-#endif
+
     XAresult ret = XA_RESULT_SUCCESS;
     DEBUG_API("->XAMetadataExtractorImpl_DoAddItf");
 
@@ -394,9 +446,9 @@
         {
             case MDE_CONFIGEXTENSIONITF:
                 mapEntry->pItf = XAConfigExtensionsItfImpl_Create();
-#ifdef _GSTREAMER_BACKEND_
-                XAConfigExtensionsItfImpl_SetContext( mapEntry->pItf, pImpl->adaptationCtx);
-#endif
+
+                XAConfigExtensionsItfImpl_SetContext( mapEntry->pItf, pImpl->adaptationCtxGst);
+
                 break;
             default:
                 DEBUG_ERR("XAMetadataExtractorImpl_DoAddItf unknown id");
--- a/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,9 +21,8 @@
 #include "openmaxalwrapper.h"
 #include "xaobjectitf.h"
 #include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAMetadataAdaptCtx.h"
-#endif
+#include "xaadptbasectx.h"
+
 
 /** MACROS **/
 
@@ -52,10 +51,13 @@
     /* Parent for XAMetadataExtractorImpl */
     XAObjectItfImpl baseObj; /* <-keep this first */
 
-#ifdef _GSTREAMER_BACKEND_
     /* variables */
-    XAAdaptationBaseCtx* adaptationCtx;
-#endif
+    XADataSource *dataSrc;
+	
+    XAAdaptationBaseCtx* curAdaptCtx;
+    XAAdaptationBaseCtx* adaptationCtxGst;
+    XAAdaptationBaseCtx* adaptationCtxMMF;
+
 } XAMetadataExtractorImpl;
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,980 @@
+#include "cmetadatautilityitf.h"
+#include <OpenMAXAL.h>
+#include <string.h>
+#include <ctype.h>
+#include <uri8.h>
+#include "profileutilmacro.h"
+
+CMetadataUtilityItf::CMetadataUtilityItf():m_pS60Util(NULL), m_pHXUtil(NULL)
+{
+}
+
+CMetadataUtilityItf::~CMetadataUtilityItf()
+{
+	if(m_pS60Util)
+	{
+		delete m_pS60Util;
+	}
+
+	if(m_pHXUtil)
+	{
+		delete m_pHXUtil;
+	}
+}
+
+
+CMetadataUtilityItf* CMetadataUtilityItf::New(char* uri)
+{
+	CMetadataUtilityItf* p_mdutilitf = new CMetadataUtilityItf;
+	
+	TInt ret = p_mdutilitf->ParseSource(uri);
+
+	if(ret == KErrNone)
+	{
+		return p_mdutilitf; 
+	}
+
+	delete p_mdutilitf;
+	return NULL;
+}
+
+TInt CMetadataUtilityItf::OpenSource(char* pOrigUri)
+{
+    //Make a local copy for uri
+    if ( !pOrigUri )
+        return XA_RESULT_PARAMETER_INVALID;
+    
+    int uriLen = strlen(pOrigUri);
+    char* uri = new char[uriLen+1];
+    if (! uri )
+        {
+        return XA_RESULT_MEMORY_FAILURE;
+        }
+    strncpy(uri, pOrigUri, uriLen);
+    uri[uriLen] = '\0';
+    ////////////////////////////////////////////
+
+    _LIT8(KFileSlash,"file:///");
+    TInt fileslashlen = KFileSlash().Length();
+
+    TPtr8 fileuri((TUint8*)uri, strlen(uri),strlen(uri));
+    TPtr8 filepath = fileuri.RightTPtr(strlen(uri)-fileslashlen);
+ 
+    TInt pos = filepath.LocateReverse(':');
+    if(pos != KErrNotFound)
+    {
+        fileuri.Delete(fileslashlen+pos,1);
+    }
+
+    TUriParser8 localfileUri;
+    TInt ret = localfileUri.Parse(fileuri);
+    if(ret == KErrNone)
+    {    
+        HBufC* file = NULL;
+        TRAP(ret,file = localfileUri.GetFileNameL());  
+        if(ret == KErrNone)
+        {
+        	if(m_pS60Util)
+        	{
+            	ret = m_pS60Util->ParseSource(*file);
+        	}
+			else if(m_pHXUtil)
+			{
+				ret = m_pHXUtil->ParseSource(*file);
+			}
+			else
+			{
+				ret = KErrNotFound;
+			}
+        }
+        
+        delete file;
+    }
+    
+    if(uri)
+    {
+        delete []uri;
+    }
+    
+	return ret;
+}
+
+TInt CMetadataUtilityItf::ExtractUCS2(TDesC& inDes, char* outPtr,TInt maxLen)
+{
+	TPtrC tempPtr = inDes.Left((maxLen/2)-1); //save last one for null terminator
+	TInt outLen = tempPtr.Length() + 1;
+	
+	TPtr16 outDes((unsigned short*)outPtr, outLen);
+	outDes.Copy(tempPtr);
+	outDes.ZeroTerminate();
+
+	return outLen * 2; //return size
+}
+
+TInt CMetadataUtilityItf::CalculateNumMetadataItems(TUint*numItems)
+{
+	if(m_pS60Util)
+	{
+		return m_pS60Util->CalculateNumMetadataItems(numItems);
+	}
+	else
+	{
+		return m_pHXUtil->CalculateNumMetadataItems(numItems);
+	}
+}
+
+char* CMetadataUtilityItf::GetKey(TInt index)
+{
+	if(m_pS60Util)
+	{
+		return m_pS60Util->GetKey(index);
+	}
+	else
+	{
+		return m_pHXUtil->GetKey(index);
+	}
+}
+
+TInt CMetadataUtilityItf::GetValueSize(TInt index)
+{
+	if(m_pS60Util)
+	{
+		return m_pS60Util->GetValueSize(index);
+	}
+	else
+	{
+		return m_pHXUtil->GetValueSize(index);
+	}
+}
+
+TInt CMetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType)
+{
+	if(m_pS60Util)
+	{
+		return m_pS60Util->GetValue(index, data, maxLength, outSize, encodingType);
+	}
+	else
+	{
+		return m_pHXUtil->GetValue(index, data, maxLength, outSize, encodingType);
+	}
+}
+
+TInt CMetadataUtilityItf::ParseSource(char* uri)
+{
+	char* tempPtr = NULL;
+ 	char extension[MAX_EXTENSION_SIZE] = { 0 };
+  
+	tempPtr = strchr(uri, (int)'.');
+	strncpy(extension,tempPtr,sizeof(tempPtr));
+	
+  	for(unsigned int i=0;i<sizeof(extension);i++)
+  	{
+      	extension[i] = tolower(extension[i]);
+  	}
+
+	//if s60 util in use
+	if(m_pS60Util)
+	{
+		//reset existing instace
+		TInt ret = m_pS60Util->Reset();
+		if(!CS60MetadataUtilityItf::IsSupportedExtension(extension))
+		{
+			delete m_pS60Util;
+			m_pS60Util = NULL;
+		}
+	}
+
+	if(m_pHXUtil)
+	{
+		//reset existing instace
+		TInt ret = m_pHXUtil->Reset();
+		if(CS60MetadataUtilityItf::IsSupportedExtension(extension))
+		{
+			delete m_pHXUtil;
+			m_pHXUtil = NULL;
+		}
+	}
+
+	if(!m_pS60Util && !m_pHXUtil)
+	{
+		
+		if(CS60MetadataUtilityItf::IsSupportedExtension(extension))
+		{
+			m_pS60Util = CS60MetadataUtilityItf::New(); 
+		}
+		else
+		{
+			m_pHXUtil = CHXMetadataUtilityItf::New();
+		}
+	}
+
+	return OpenSource(uri);
+}
+
+
+bool CS60MetadataUtilityItf::IsSupportedExtension(char *extn)
+{
+	if(	(!strcasecmp(extn, ".mp3"))	|| 
+		(!strcasecmp(extn, ".wma"))	|| 
+		(!strcasecmp(extn, ".aac")) ||
+		(!strcasecmp(extn, ".wav")) ||
+		(!strcasecmp(extn, ".m4a")))
+	{
+		return true;
+	}
+
+	return false;
+}
+
+CS60MetadataUtilityItf* CS60MetadataUtilityItf::New()
+{
+	CS60MetadataUtilityItf* self = new CS60MetadataUtilityItf();
+	
+	TInt err = KErrGeneral;
+	TRAP(err, self->ConstructL());
+
+	if(err == KErrNone)
+	{
+		return self;
+	}
+
+	delete self;
+	return NULL;
+}
+
+CS60MetadataUtilityItf::CS60MetadataUtilityItf():pMetaDataUtility(NULL)
+{
+}
+
+void CS60MetadataUtilityItf::ConstructL()
+{
+	TAG_TIME_PROFILING_BEGIN;
+	pMetaDataUtility = CMetaDataUtility::NewL();
+	TAG_TIME_PROFILING_END;
+	PRINT_TO_CONSOLE_TIME_DIFF;
+}
+    
+CS60MetadataUtilityItf::~CS60MetadataUtilityItf()
+{
+	if(pMetaDataUtility)
+	{		
+		TInt err = KErrGeneral;
+		
+		TAG_TIME_PROFILING_BEGIN;
+		TRAP(err, pMetaDataUtility->ResetL());
+		delete pMetaDataUtility;
+		TAG_TIME_PROFILING_END;
+		PRINT_TO_CONSOLE_TIME_DIFF;
+	}
+
+	pMetaDataUtility = NULL;
+}
+
+TInt CS60MetadataUtilityItf::ParseSource(TDesC& fileName)
+{
+	TInt err = KErrGeneral;
+
+	if(pMetaDataUtility)
+	{
+	
+		TAG_TIME_PROFILING_BEGIN;
+		//open with the file handle
+		TRAP(err, pMetaDataUtility->OpenFileL(fileName));
+		TAG_TIME_PROFILING_END;
+		PRINT_TO_CONSOLE_TIME_DIFF;
+
+		if(err == KErrNone)
+		{
+			uNumMetadataItems = pMetaDataUtility->MetaDataCount();
+		}
+	}
+
+	return err;
+}
+
+TInt CS60MetadataUtilityItf::CalculateNumMetadataItems(TUint* numItems)
+{
+	TInt err = KErrGeneral;
+
+	if(pMetaDataUtility && numItems)
+	{
+		*numItems = uNumMetadataItems;
+		err = KErrNone;
+	}
+
+	return err;
+}
+
+char* CS60MetadataUtilityItf::KeyMapping(TMetaDataFieldId fldID)
+{
+	switch(fldID)
+	{
+	
+		case EMetaDataSongTitle:
+		{
+			return "KhronosTitle";
+		}
+		case EMetaDataArtist:
+		{
+			return "KhronosArtist";
+		}
+		case EMetaDataAlbum:
+		{
+			return "KhronosAlbum";
+		}
+		case EMetaDataYear:
+		{
+			return "KhronosYear";
+		}
+		case EMetaDataComment:
+		{
+			return "KhronosComment";
+		}
+		case EMetaDataAlbumTrack:
+		{
+			return "KhronosTrackNumber";
+		}
+		case EMetaDataGenre:
+		{
+			return "KhronosGenre";
+		}
+		case EMetaDataComposer:
+		{
+			return "Composer"; //Non Standard
+		}
+		case EMetaDataCopyright:
+		{
+			return "KhronosCopyright";
+		}
+		case EMetaDataOriginalArtist:
+		{
+			return "Original Artist"; //Non Standard
+		}
+		case EMetaDataUserUrl:
+		case EMetaDataUrl:	   
+		{
+			return "KhronosContentURL";
+		}
+		case EMetaDataJpeg:
+		{
+			return "attachedpicture";//"KhronosAlbumArtJPEG";
+		}
+		case EMetaDataVendor:
+		{
+			return "Vendor"; //Non Standard
+		}
+		case EMetaDataRating:
+		{
+			return "KhronosRating";			
+		}
+		case EMetaDataDuration:
+		{
+			return "Duration"; //Non Standard
+		}
+		default:
+		{
+		}
+	} 
+
+	return NULL;
+}
+
+TInt CS60MetadataUtilityItf::ValueEncoding(TMetaDataFieldId fldID)
+{
+	switch(fldID)
+	{
+		case EMetaDataJpeg:
+		{
+			return CMetadataUtilityItf::EBinaryEncoding;
+		}
+		
+		case EMetaDataSongTitle:
+		case EMetaDataArtist:
+		case EMetaDataAlbum:
+		case EMetaDataYear:
+		case EMetaDataComment:
+		case EMetaDataAlbumTrack:
+		case EMetaDataGenre:
+		case EMetaDataComposer:
+		case EMetaDataCopyright:
+		case EMetaDataOriginalArtist:
+		case EMetaDataUserUrl:
+		case EMetaDataUrl:
+		case EMetaDataVendor:
+		case EMetaDataRating:
+		case EMetaDataDuration:
+		default:
+		{
+			return CMetadataUtilityItf::EUnicodeEncoding;
+		}
+	}
+	
+}
+char* CS60MetadataUtilityItf::GetKey(TInt index)
+{
+
+	if(pMetaDataUtility && index < uNumMetadataItems)
+	{
+		
+        TMetaDataFieldId fieldId; 
+		
+		TAG_TIME_PROFILING_BEGIN;
+		TInt err = KErrGeneral;
+		TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
+		TAG_TIME_PROFILING_END;
+		PRINT_TO_CONSOLE_TIME_DIFF;
+		
+		if((err == KErrNone) && (fieldId != EUnknownMetaDataField))
+		{
+			return KeyMapping(fieldId);
+		}
+	}
+	return NULL;
+}
+
+TInt CS60MetadataUtilityItf::GetValueSize(TInt index)
+{
+	if(pMetaDataUtility && index < uNumMetadataItems)
+	{
+		
+        TMetaDataFieldId fieldId; 
+		TInt err = KErrGeneral;
+		TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
+
+		if((err == KErrNone) && (fieldId != EUnknownMetaDataField))
+		{
+			const CMetaDataFieldContainer* iContainer = NULL;
+			TRAP(err, iContainer  = &pMetaDataUtility->MetaDataFieldsL());
+			if(err == KErrNone)
+			{
+				if(ValueEncoding(fieldId) == CMetadataUtilityItf::EUnicodeEncoding)
+				{
+					TPtrC field = iContainer->Field( fieldId ); 
+					if(field != KNullDesC)
+					{
+						return field.Size() + 2; //additional character (two bytes) for null terminator
+					}
+				}	
+				else //Binary
+				{
+					TPtrC8 field8 = iContainer->Field8( fieldId );
+					if(field8 != KNullDesC8)
+					{
+						return field8.Size();
+					}
+		        }
+			}
+		}
+	}
+
+	return 0;
+}
+	
+TInt CS60MetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength,  //in params
+										TInt* outSize, TInt* encodingType) //out params
+{
+
+	TInt retValueSize = 0;
+	*encodingType= CMetadataUtilityItf::EUnknownEncoding;
+
+	if(pMetaDataUtility && index < uNumMetadataItems)
+	{
+		
+        TMetaDataFieldId fieldId; 
+		TInt err = KErrGeneral;
+		TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId )); 
+		
+		
+		if((err==KErrNone) && (fieldId != EUnknownMetaDataField))
+		{
+		
+			const CMetaDataFieldContainer* iContainer = NULL;
+			TRAP(err, iContainer  = &pMetaDataUtility->MetaDataFieldsL());
+			if(err == KErrNone)
+			{
+				*encodingType = ValueEncoding(fieldId);
+				if(*encodingType == CMetadataUtilityItf::EUnicodeEncoding)
+				{
+				
+					
+					TAG_TIME_PROFILING_BEGIN;
+					TPtrC field = iContainer->Field( fieldId ); 
+					TAG_TIME_PROFILING_END;
+					PRINT_TO_CONSOLE_TIME_DIFF;
+					if(field != KNullDesC)
+					{
+						*outSize = CMetadataUtilityItf::ExtractUCS2(field, data, maxLength);
+						retValueSize = field.Size() + 2; //actual size
+					}
+				}	
+				else //Binary
+				{
+					
+					TAG_TIME_PROFILING_BEGIN;
+					TPtrC8 field8 = iContainer->Field8( fieldId ); 
+					TAG_TIME_PROFILING_END;
+					PRINT_TO_CONSOLE_TIME_DIFF;
+					if(field8 != KNullDesC8)
+					{
+						*outSize = (maxLength > field8.Size())?field8.Size():maxLength;					
+						memcpy(data, field8.Ptr(), *outSize);
+						retValueSize = field8.Size();					
+					}
+				}
+			}
+		}
+	}
+
+	return	 retValueSize;
+}
+
+TInt CS60MetadataUtilityItf::Reset()
+{
+	TInt err = KErrNone;	
+	if(pMetaDataUtility)
+	{		
+		TRAP(err, pMetaDataUtility->ResetL());
+	}
+
+	return err;
+}
+
+
+CHXMetadataUtilityItf::CHXMetadataUtilityItf():pHXMetaDataUtility(NULL)
+{
+}
+
+void CHXMetadataUtilityItf::ConstructL()
+{
+	TAG_TIME_PROFILING_BEGIN;
+	pHXMetaDataUtility = CHXMetaDataUtility::NewL();
+	TAG_TIME_PROFILING_END;
+	PRINT_TO_CONSOLE_TIME_DIFF;
+}
+
+   
+CHXMetadataUtilityItf* CHXMetadataUtilityItf::New()
+{
+	CHXMetadataUtilityItf* self = new CHXMetadataUtilityItf();
+
+	if(self)
+	{
+		TInt err = KErrGeneral;
+		TRAP(err, self->ConstructL());
+   
+		if(err != KErrNone)
+		{
+			delete self;
+			self = NULL;
+		}
+	}
+   
+	return self;
+}
+   
+CHXMetadataUtilityItf::~CHXMetadataUtilityItf()
+{
+	if(pHXMetaDataUtility)
+	{		
+		TInt err = KErrGeneral;
+		
+		TAG_TIME_PROFILING_BEGIN;
+		TRAP(err, pHXMetaDataUtility->ResetL());
+		delete pHXMetaDataUtility;
+		TAG_TIME_PROFILING_END;
+		PRINT_TO_CONSOLE_TIME_DIFF;
+	}
+
+	pHXMetaDataUtility = NULL;
+}
+
+TInt CHXMetadataUtilityItf::Reset()
+{
+	TInt err = KErrNone;	
+	if(pHXMetaDataUtility)
+	{		
+		TRAP(err, pHXMetaDataUtility->ResetL());
+	}
+
+	return err;
+}
+
+
+
+TInt CHXMetadataUtilityItf::ParseSource(TDesC& fileName)
+{
+	TInt err = KErrGeneral;
+
+	if(pHXMetaDataUtility)
+	{
+		//open with the file handle
+		TAG_TIME_PROFILING_BEGIN;
+		TRAP(err, pHXMetaDataUtility->OpenFileL(fileName));
+		TAG_TIME_PROFILING_END;
+		PRINT_TO_CONSOLE_TIME_DIFF;
+
+		if(err == KErrNone)
+		{
+			 return pHXMetaDataUtility->GetMetaDataCount(uNumMetadataItems);
+		}
+	}
+
+	return err;
+}
+
+TInt CHXMetadataUtilityItf::CalculateNumMetadataItems(TUint* numItems)
+{
+	TInt err = KErrGeneral;
+
+	if(pHXMetaDataUtility && numItems)
+	{
+		*numItems = uNumMetadataItems;
+		err = KErrNone;
+	}
+
+	return err;
+}
+
+char* CHXMetadataUtilityItf::KeyMapping(HXMetaDataKeys::EHXMetaDataId fldID)
+{
+        
+	switch(fldID)
+	{
+	
+		case HXMetaDataKeys::EHXTitle:
+		{
+			return "KhronosTitle";
+		}
+		case HXMetaDataKeys::EHXPerformer:
+		{
+			return "KhronosArtist";
+		}
+		case HXMetaDataKeys::EHXDescription:
+		{
+			return "KhronosComment";
+		}
+		case HXMetaDataKeys::EHXGenre:
+		{
+			return "KhronosGenre";
+		}
+		case HXMetaDataKeys::EHXAuthor:
+		{
+			return "Composer"; //Non Standard
+		}
+		case HXMetaDataKeys::EHXCopyright:
+		{
+			return "KhronosCopyright";
+		}
+		case HXMetaDataKeys::EHXContentURI:	   
+		{
+			return "KhronosContentURL";
+		}
+		case HXMetaDataKeys::EHXDuration:
+		{
+			return "Duration"; //Non Standard
+		}
+		case HXMetaDataKeys::EHXClipBitRate:
+		{
+			return "ClipBitRate"; //non-standard
+		}
+		case HXMetaDataKeys::EHXVideoBitRate:
+		{
+			return "VideoBitRate"; // non-standard
+		}
+		case HXMetaDataKeys::EHXAudioBitRate:
+		{
+			return "AudioBitRate";
+		}
+		case HXMetaDataKeys::EHXCodec:
+		{
+			return "Codec";
+		}
+		case HXMetaDataKeys::EHXFrameSize:
+		{
+			return "Resolution";
+		}
+		case HXMetaDataKeys::EHXFramesPerSecond:
+		{
+			return "FrameRate";
+		}
+		case HXMetaDataKeys::EHXStreamCount:
+		{
+			return "Stream Count";
+		}
+		case HXMetaDataKeys::EHXLiveStream:
+		{
+			return "Live Stream";
+		}
+        case HXMetaDataKeys::EHXSeekable:
+		{
+			return "Seekable";
+		}
+        case HXMetaDataKeys::EHXContentType:
+  		{
+			return "Content Type";
+		}
+		case HXMetaDataKeys::EHXFormat:
+		{
+			return "Format";
+		}
+        case HXMetaDataKeys::EHXQuality:
+		{
+			return "Quality";
+		}
+        case HXMetaDataKeys::EHXAbstract:
+		{
+			return "Abstract";
+		}
+		case HXMetaDataKeys::EHXMimeType:
+		{
+			return "MimeType";
+		}
+		case HXMetaDataKeys::EHXIconURI:
+		{
+			return "Icon URI";
+		}
+        case HXMetaDataKeys::EHXEPreviewURI:
+		{
+			return "Preview URI";
+		}
+        case HXMetaDataKeys::EHXContentID:
+		{
+			return "Content ID";
+		}
+        case HXMetaDataKeys::EHXInfoURL:
+		{
+			return "Info URL";
+		}
+		default:
+		{
+		}
+	} 
+
+	return NULL;
+}
+
+TInt CHXMetadataUtilityItf::ValueEncoding(HXMetaDataKeys::EHXMetaDataId fldID)
+{
+	switch(fldID)
+	{
+		default:
+		{
+			return CMetadataUtilityItf::EUnicodeEncoding;
+		}
+	}
+	
+}
+char* CHXMetadataUtilityItf::GetKey(TInt index)
+{
+
+	if(pHXMetaDataUtility && index < uNumMetadataItems)
+	{
+		HXMetaDataKeys::EHXMetaDataId id;
+		HBufC* pDes;
+		
+		TAG_TIME_PROFILING_BEGIN;
+        TInt err = pHXMetaDataUtility->GetMetaDataAt(index, id, pDes); 
+		TAG_TIME_PROFILING_END;
+		PRINT_TO_CONSOLE_TIME_DIFF;
+		
+		if(err == KErrNone)
+		{
+			return KeyMapping(id);
+		}
+	}
+	return NULL;
+}
+
+TInt CHXMetadataUtilityItf::GetValueSize(TInt index)
+{
+	if(pHXMetaDataUtility && index < uNumMetadataItems)
+	{
+		HXMetaDataKeys::EHXMetaDataId id;
+		HBufC* pDes;
+		
+        TInt err =  pHXMetaDataUtility->GetMetaDataAt(index, id, pDes); 
+		
+		if(err == KErrNone)
+		{
+			if(ValueEncoding(id) == CMetadataUtilityItf::EUnicodeEncoding)
+			{
+				return pDes->Size() + 2; //additional character (two bytes) for null terminator
+			}	
+			else //Binary
+			{
+				//no support
+	        }
+		}
+	}
+
+	return 0;
+}
+	
+TInt CHXMetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength,  //in params
+										TInt* outSize, TInt* encodingType) //out params
+{
+
+	TInt retValueSize = 0;
+	*encodingType= CMetadataUtilityItf::EUnknownEncoding;
+
+	if(pHXMetaDataUtility && index < uNumMetadataItems)
+	{
+		HXMetaDataKeys::EHXMetaDataId id;
+		HBufC* pDes;
+
+		
+		TAG_TIME_PROFILING_BEGIN;
+        TInt err =  pHXMetaDataUtility->GetMetaDataAt(index, id, pDes); 
+		TAG_TIME_PROFILING_END;
+		PRINT_TO_CONSOLE_TIME_DIFF;
+		
+		*encodingType = ValueEncoding(id);
+		
+		if(err == KErrNone)
+		{
+			if(*encodingType == CMetadataUtilityItf::EUnicodeEncoding)
+			{
+				*outSize = CMetadataUtilityItf::ExtractUCS2(*pDes, data, maxLength);
+				retValueSize = pDes->Size() + 2; //actual Size	
+			}	
+			else //Binary
+			{
+				//no support
+			}
+		}
+	}
+
+	return	 retValueSize;
+}
+
+
+extern "C" {
+
+    void* mmf_metadata_utility_init(char* uri)
+	{
+		return CMetadataUtilityItf::New(uri);
+	}
+
+    void mmf_metadata_utility_destroy(void* context)
+	{
+		delete ((CMetadataUtilityItf*)context);
+	}
+
+	XAresult mmf_metadata_utility_parse_source(void* context, char* uri)
+	{
+		TInt err = ((CMetadataUtilityItf*)context)->ParseSource(uri);
+		
+		if(err == KErrNone)
+		{
+			return XA_RESULT_SUCCESS;
+		}
+		
+		return XA_RESULT_PARAMETER_INVALID;
+	}
+
+
+	XAresult  mmf_get_item_count(void* context, XAuint32* itemCount)
+	{
+		if(itemCount)
+		{
+			TInt err = ((CMetadataUtilityItf*)(context))->CalculateNumMetadataItems((TUint *)itemCount);
+			if(err == KErrNone)
+			{
+				return XA_RESULT_SUCCESS;
+			}
+		}
+
+		return XA_RESULT_PARAMETER_INVALID;
+	}
+	
+	XAresult  mmf_get_key_size(void* context, XAuint32 keyIndex, XAuint32* keySize)
+	{
+		char* key = ((CMetadataUtilityItf*)(context))->GetKey(keyIndex);
+		if(key && keySize)
+		{
+			*keySize = (strlen(key) + sizeof(XAMetadataInfo));
+			
+			return XA_RESULT_SUCCESS;
+		}
+		
+		return XA_RESULT_PARAMETER_INVALID;		
+	}
+	
+
+	XAresult  mmf_get_key(void* context, XAuint32 index,XAuint32 keySize, XAMetadataInfo *pKey)
+	{
+		XAresult ret = XA_RESULT_PARAMETER_INVALID;
+		
+		TInt keyDataSize = keySize - sizeof(XAMetadataInfo) + 1;
+		char* ascKey = ((CMetadataUtilityItf*)(context))->GetKey(index);
+
+		if(ascKey && keyDataSize)
+		{
+			TInt ascKeySize = strlen(ascKey);
+			TInt outSize = (ascKeySize >= keyDataSize) ? (keyDataSize - 1) : ascKeySize;
+			
+			pKey->size = outSize + 1;
+			pKey->encoding = XA_CHARACTERENCODING_ASCII;
+			strcpy((char *)(pKey->langCountry), "en-us");
+			strncpy((char *)(pKey->data), ascKey, outSize);
+			pKey->data[outSize] = '\0';
+
+			if(ascKeySize >= keyDataSize)
+			{
+				ret = XA_RESULT_BUFFER_INSUFFICIENT;
+			}
+			else
+			{
+				ret = XA_RESULT_SUCCESS;
+			}
+		}
+
+		ret = XA_RESULT_SUCCESS;
+		return ret;		
+	}
+
+	XAresult  mmf_get_value_size(void* context, XAuint32 index, XAuint32 *pValueSize)
+	{
+		if(pValueSize)
+		{
+			*pValueSize = ((CMetadataUtilityItf*)(context))->GetValueSize(index) + sizeof(XAMetadataInfo) - 1; //XAMetadataInfo already includes one byte for Data
+			
+			return XA_RESULT_SUCCESS;
+		}
+
+		return XA_RESULT_PARAMETER_INVALID;		
+	}
+
+	XAresult  mmf_get_value(void* context, XAuint32 index, XAuint32 valueSize, XAMetadataInfo *pValue)
+	{
+		XAresult ret = XA_RESULT_PARAMETER_INVALID;
+		TInt dataSize = valueSize - sizeof(XAMetadataInfo) + 1;
+		TInt outLen = 0, encodingType = CMetadataUtilityItf::EUnknownEncoding;
+
+		if(dataSize > 0)
+		{
+		
+			TInt actualDataSize = ((CMetadataUtilityItf*)(context))->GetValue(index, (char*)pValue->data, dataSize, &outLen, &encodingType);
+
+			pValue->size = outLen;
+			pValue->encoding = (encodingType == CMetadataUtilityItf::EUnicodeEncoding) ? XA_CHARACTERENCODING_UTF16LE : XA_CHARACTERENCODING_BINARY;
+			strcpy((char *)(pValue->langCountry), "en-us");
+
+			if(!actualDataSize)
+			{
+				return XA_RESULT_INTERNAL_ERROR;
+			}
+			if(actualDataSize > dataSize)
+			{
+				ret = XA_RESULT_BUFFER_INSUFFICIENT;
+			}
+			else
+			{
+				ret = XA_RESULT_SUCCESS;
+			}
+		}
+			
+		return ret; 
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,133 @@
+#ifndef CMETADATA_UTILITY_ITF_H
+#define CMETADATA_UTILITY_ITF_H
+
+
+#ifdef __cplusplus
+
+#include <e32base.h>
+#include <e32std.h>
+#include <e32hashtab.h>
+#include <OpenMAXAL.h>
+
+#include <Hxmetadatautil.h>
+#include <MetaDataUtility.h>
+#include <MetaDataFieldContainer.h>
+#include <MetaDataField.hrh>
+
+
+#define MAX_EXTENSION_SIZE 10
+#define uint32 unsigned int
+
+class CS60MetadataUtilityItf;
+class CHXMetadataUtilityItf;
+
+NONSHARABLE_CLASS(CMetadataUtilityItf)
+{
+public:
+
+	enum TValueEncodingType
+	{
+		EUnknownEncoding,
+		EAsciiEncoding,
+		EUnicodeEncoding,
+		EBinaryEncoding,	
+	};
+	
+	static CMetadataUtilityItf* New(char* uri);
+
+	CMetadataUtilityItf();
+	virtual ~CMetadataUtilityItf();
+	TInt ParseSource(char* uri);
+	TInt OpenSource(char* uri);	
+	TInt CalculateNumMetadataItems(TUint*);
+	char* GetKey(TInt index);
+	TInt GetValueSize(TInt index);
+	TInt GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType);
+
+	//helper function
+	//extracts left part of input descriptor upto (maxLen-1) and copies content in outPtr
+	//append a null terminator
+	static TInt ExtractUCS2(TDesC& inDes, char* outPtr,TInt maxLen);
+
+private:
+	CS60MetadataUtilityItf* m_pS60Util;
+	CHXMetadataUtilityItf*  m_pHXUtil;
+};
+
+
+NONSHARABLE_CLASS(CS60MetadataUtilityItf)
+{
+public:
+
+	static CS60MetadataUtilityItf* New();
+  	~CS60MetadataUtilityItf();
+
+	TInt CalculateNumMetadataItems(TUint*);
+	
+	char* GetKey(TInt index);
+	TInt  GetValueSize(TInt index);
+	TInt  GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType);
+
+	TInt 	ParseSource(TDesC&);
+
+	char* KeyMapping(TMetaDataFieldId);
+	TInt  ValueEncoding(TMetaDataFieldId);
+
+	static bool IsSupportedExtension(char* extn);
+
+	TInt Reset();
+
+private:
+	
+    CS60MetadataUtilityItf();
+    void ConstructL();
+	
+   	CMetaDataUtility* pMetaDataUtility; //S60MetadataUtility
+   	
+	TUint 		uNumMetadataItems;		
+		
+};
+
+NONSHARABLE_CLASS(CHXMetadataUtilityItf)
+{
+public:
+
+	static CHXMetadataUtilityItf* New();
+  ~CHXMetadataUtilityItf();
+
+	TInt CalculateNumMetadataItems(TUint*);
+	
+	char* GetKey(TInt index);
+	
+	TInt ValueEncoding(HXMetaDataKeys::EHXMetaDataId fldID);
+	TInt  GetValueSize(TInt index);
+	TInt  GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType);
+	
+	TInt 	ParseSource(TDesC&);
+	char* KeyMapping(HXMetaDataKeys::EHXMetaDataId);
+	
+	TInt Reset();
+
+private:
+	CHXMetadataUtilityItf();
+    void ConstructL();
+   	
+  CHXMetaDataUtility *pHXMetaDataUtility;
+  
+  TUint 	  uNumMetadataItems;	  
+};
+
+
+#else
+
+extern void* mmf_metadata_utility_init(char*);
+extern void  mmf_metadata_utility_destroy(void* context);
+extern XAresult mmf_metadata_utility_parse_source(void* , char*);
+extern XAresult  mmf_get_item_count(void* context, XAuint32* itemCount);
+extern XAresult  mmf_get_key_size(void* context, XAuint32 keyIndex, XAuint32* keySize);
+extern XAresult  mmf_get_key(void* context, XAuint32 index,XAuint32 keySize, XAMetadataInfo *pKey);
+extern XAresult  mmf_get_value_size(void* context, XAuint32 index, XAuint32 *pValueSize);
+extern XAresult  mmf_get_value(void* context, XAuint32 index, XAuint32 valueSize, XAMetadataInfo *pValue);
+#endif //__cplusplus
+
+#endif
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -11,328 +11,374 @@
 *
 * Contributors:
 *
-* Description: 
+* Description:
 *
 */
-/*
-Media Helper Class for handling surface events
-
-Shy Ward
-*/
 
 #include "cmmfbackendengine.h"
 #include <string.h>
 #include <ctype.h>
 #include <uri8.h>
+#include <uri16.h>
+#include "markerpositiontimer.h"
+#include "positionupdatetimer.h"
+#include "profileutilmacro.h"
 
 extern "C" {
 #include "xaadaptationmmf.h"
 }
 
+#define RET_IF_ERR(res, val) if (res != KErrNone) return val
 
-#define ENABLE_GRAPHICS_SURFACE_INTEGRATION_NOT_NOW
+const XAuint32 XA_PLAYSTATE_PLAYERUNINITIALIZED = 0;
 
 CMMFBackendEngine* CMMFBackendEngine::NewL()
     {
     CMMFBackendEngine* self = new (ELeave) CMMFBackendEngine();
+    CleanupStack::PushL(self);
     self->ConstructL();
+    CleanupStack::Pop(self);
     return self;
     }
 
 CMMFBackendEngine::~CMMFBackendEngine()
     {
-    CloseAndDestroy();
-    }
-    
-CMMFBackendEngine::CMMFBackendEngine()                  
-    {
-    iVideoPlayer = NULL;
-    m_bWindowReferencePassed = FALSE;
-    iRecordState = ERecorderNotReady;
-    iPositionUpdateTimer = NULL;
-    }
-
-
-void CMMFBackendEngine::InitVideoPlayerUtilityL()
-    {
-	iBaseVideoPlayer = CVideoPlayerUtility2::NewL(*this,EMdaPriorityNormal,EMdaPriorityPreferenceTimeAndQuality);
-	iVideoPlayer = (CVideoPlayerUtility2*)iBaseVideoPlayer;
-	iVideoPlayer->RegisterForVideoLoadingNotification(*this);   
+    Close();
+    Destroy();
     }
 
-void CMMFBackendEngine::CreateAndConfigureWindowL()
+CMMFBackendEngine::CMMFBackendEngine()
+:iPositionUpdatePeriod(1000), /* default is 1000 millisec */
+ iUriPtr(NULL,0)
     {
-#ifdef ENABLE_GRAPHICS_SURFACE_INTEGRATION_NOT_NOW
-    // create window for attaching the surface as its background
-    //RWsSession ws;
-    //TInt err2(KErrNone);
-    TInt err2 = m_ws.Connect();
-    m_pScr = new(ELeave) CWsScreenDevice(m_ws);
-    err2 = m_pScr->Construct();
-    CWindowGc* gc = NULL;
-    err2 = m_pScr->CreateContext(gc);
-    RWindowGroup grp(m_ws);
-    err2 = grp.Construct(0xf00f00);
-    const TSize KWinSize(320, 240);
-    m_pWindow = new (ELeave) RWindow(m_ws);
-    err2 = m_pWindow->Construct(grp, 0xfeefee);
-    m_pWindow->SetExtent(TPoint(), KWinSize);
-    m_pWindow->SetBackgroundColor(TRgb(255,0,0,128));
-    //win.SetBackgroundColor(TRgb(0,0,0,0));
-    m_pWindow->Activate();
-    m_pWindow->Invalidate();
-    m_pWindow->BeginRedraw();
-    gc->Activate(*m_pWindow);
-    m_pWindow->EndRedraw();
-    m_ws.Flush();
-
-    //Create MediaClientUitlity for NGA Surfaces
-    TInt displayId = m_pScr->GetScreenNumber();
-
-    // Add the display window
-    m_cropRegion = TRect(m_pWindow->Size());
-    m_clipRect = TRect(m_pWindow->Size());
-    m_videoExtent = TRect(m_pWindow->Size());
-    m_rotation = EVideoRotationNone;
-            
-#endif // ENABLE_GRAPHICS_SURFACE_INTEGRATION_NOT_NOW     
-    
+/*    m_bWindowReferencePassed = FALSE;*/
+    iRecordState = ERecorderNotReady;
+    iPositionUpdateTimer = NULL;
+    iMediaPlayerState = XA_PLAYSTATE_PLAYERUNINITIALIZED;
+    iMMFPlayerState = EPlayerClosed;
     }
 
 void CMMFBackendEngine::ConstructL()
     {
-	//iBaseAudioPlayer = CMdaAudioPlayerUtility::NewL(*this);
-	//iAudioPlayer = (CMdaAudioPlayerUtility*)iBaseAudioPlayer;
-	iAPIBeingUsed = EAudioPlayerUtility;	
-	//InitVideoPlayerUtilityL();
-	iPlayerState = EPlayerClosed;
-	iBaseAudioRecorder = CMdaAudioRecorderUtility::NewL(*this);
-	iAudioRecorder = (CMdaAudioRecorderUtility*)iBaseAudioRecorder;
-	iActiveSchedulerWait = new (ELeave) CActiveSchedulerWait;
-    } 
+    iAPIBeingUsed = ENoUtility;
+    iBaseAudioRecorder = CMdaAudioRecorderUtility::NewL(*this);
+    iAudioRecorder = (CMdaAudioRecorderUtility*)iBaseAudioRecorder;
+    iActiveSchedulerWait = new (ELeave) CActiveSchedulerWait;
+    }
+
+void CMMFBackendEngine::InitAudioPlayerUtilityL()
+    {
+    if (!iAudioPlayer)
+        {
+        iBaseAudioPlayer = CMdaAudioPlayerUtility::NewL(*this);
+        iAudioPlayer = (CMdaAudioPlayerUtility*)iBaseAudioPlayer;
+        }
+    InitPlayerTimersL();
+    }
+
+void CMMFBackendEngine::InitVideoPlayerUtilityL()
+    {
+    if (!iVideoPlayer)
+        {
+        iBaseVideoPlayer = CVideoPlayerUtility2::NewL(*this, EMdaPriorityNormal, EMdaPriorityPreferenceTimeAndQuality);
+        iVideoPlayer = (CVideoPlayerUtility2*)iBaseVideoPlayer;
+        iVideoPlayer->RegisterForVideoLoadingNotification(*this);
+        }
+    InitPlayerTimersL();
+    }
+
+void CMMFBackendEngine::InitPlayerTimersL()
+    {
+    if (!iMarkerPositionTimer)
+        {
+        iMarkerPositionTimer = CMarkerPositionTimer::NewL(iAudioPlayer, iVideoPlayer);
+        iMarkerPositionTimer->SetContext(iAdaptContext);
+        }
+    if (!iPlayItfPositionUpdateTimer)
+        {
+        iPlayItfPositionUpdateTimer = CPositionUpdateTimer::NewL(iAudioPlayer, iVideoPlayer);
+        iPlayItfPositionUpdateTimer->SetContext(iAdaptContext);
+        }
+    iMarkerPositionTimer->Stop();
+    iPlayItfPositionUpdateTimer->Stop();
+    }
 
 TInt CMMFBackendEngine::SetFileName(char* uri, XAuint32 format, TFuncInUse func)
     {
     TInt err(KErrNone);
     _LIT8(KFileSlash,"file:///");
     TInt fileslashlen = KFileSlash().Length();
-    if(func == ERecord)
+    if (func == ERecord)
         {
-        if(iRecordState == ERecorderNotReady)
+        if (iRecordState == ERecorderNotReady)
             {
             iFileFormat = format;
-            iAPIBeingUsed = DetermineAPIToUse(uri, ERecord);
+            iAPIBeingUsed = EAudioRecorderUtility;
             TPtr8 fileuri(((TUint8*)uri), strlen(uri) ,strlen(uri));
             TPtr8 filepath = fileuri.RightTPtr(strlen(uri)-fileslashlen);
-            if(iAPIBeingUsed == EAudioPlayerUtility)
+            TInt pos = filepath.LocateReverse(':');
+            if(pos != KErrNotFound)
                 {
-                TInt pos = filepath.LocateReverse(':');
-                if(pos != KErrNotFound)
-                    {
-                    fileuri.Delete(fileslashlen+pos,1);
-                    }
-                
-                TUriParser8 localfileUri;
-                TInt ret = localfileUri.Parse(fileuri);
-                HBufC* file = NULL;
-                TRAP(err,file = localfileUri.GetFileNameL());  
-                TPtr des = file->Des();
-                iFileName = des;
-                delete file;
-                file = NULL;
-                TRAP(err, iAudioRecorder->OpenFileL(iFileName));
+                fileuri.Delete(fileslashlen+pos,1);
+                }
+
+            TUriParser8 localfileUri;
+            TInt ret = localfileUri.Parse(fileuri);
+            HBufC* file = NULL;
+            TRAP(err,file = localfileUri.GetFileNameL());
+            TPtr des = file->Des();
+            iFileName = des;
+            delete file;
+            file = NULL;
+            TRAP(err, iAudioRecorder->OpenFileL(iFileName));
+            if (!err)
+                { /* Wait until we receive moscostatechanged callback */
                 if(!iActiveSchedulerWait->IsStarted())
                     {
                     iActiveSchedulerWait->Start();
                     }
+                err = iErrorCode;
                 }
            }
         }
     else
         {
-        if(iPlayerState == EPlayerClosed)
+        /* The second one is needed for dynamic source interface */
+        if ((iMediaPlayerState == XA_PLAYSTATE_PLAYERUNINITIALIZED) ||
+                (iMediaPlayerState == XA_PLAYSTATE_STOPPED))
             {
             iFileFormat = format;
-            iAPIBeingUsed = DetermineAPIToUse(uri,EPlay);
-            TPtr8 fileuri((TUint8*)uri, strlen(uri),strlen(uri));
-            
-            if(iAPIBeingUsed == EAudioPlayerUtility)
+            iAPIBeingUsed = DetermineAPIToUse(uri, EPlay);
+            err = XA_RESULT_INTERNAL_ERROR;
+            if (iAPIBeingUsed == EAudioPlayerUtility)
+                {
+                /* Initialize URI as needed by MMF utilities */
+                err = InitializeURIForMMFUtil(uri);
+                RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+                /* Initalize Player related objects */
+                TRAP(err, InitAudioPlayerUtilityL());
+                RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+
+                TAG_TIME_PROFILING_BEGIN;
+                TRAP(err, iAudioPlayer->OpenFileL(iUriPtr));
+                RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+                TAG_TIME_PROFILING_END;
+                PRINT_TO_CONSOLE_TIME_DIFF;
+
+                /* Wait until we receive mapc init complete */
+                PRINT_TO_CONSOLE_HOME_TIME;
+                if (!iActiveSchedulerWait->IsStarted())
+                    {
+                    iActiveSchedulerWait->Start();
+                    }
+                RET_IF_ERR(iErrorCode, XA_RESULT_INTERNAL_ERROR);
+                }
+            else if (iAPIBeingUsed == EVideoPlayerUtility)
                 {
-                TInt pos = fileuri.LocateReverse(':');
-                fileuri.Delete(pos,1);
-                
-                TUriParser8 localfileUri;
-                TInt ret = localfileUri.Parse(fileuri);
-                HBufC* file = NULL;
-                TRAP(err,file = localfileUri.GetFileNameL());  
-                TPtr des = file->Des();
-                iFileName = des;
-                delete file;
-                file = NULL;
-                }
-            else
-                {
-                HBufC* f(NULL);
-                TRAP(err, f = HBufC::NewL(strlen(uri)));
-                TPtr des = f->Des();
-                des.Copy(fileuri);
-                iFileName = des;
-                delete f;
-                f = NULL;
+                /* Initialize URI as needed by MMF utilities */
+                err = InitializeURIForMMFUtil(uri);
+                RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+                /* Initalize Player related objects */
+                TRAP(err, InitVideoPlayerUtilityL());
+                RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+
+                /* Open file */
+                TAG_TIME_PROFILING_BEGIN;
+                TRAP(err, iVideoPlayer->OpenFileL(iUriPtr));
+                RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+                TAG_TIME_PROFILING_END;
+                PRINT_TO_CONSOLE_TIME_DIFF;
+
+                /* Wait until we receive  MvpuoOpenComplete */
+                PRINT_TO_CONSOLE_HOME_TIME;
+                if (!iActiveSchedulerWait->IsStarted())
+                    {
+                    iActiveSchedulerWait->Start();
+                    }
+                RET_IF_ERR(iErrorCode, XA_RESULT_INTERNAL_ERROR);
+
+                /* Prepare utility */
+                TAG_TIME_PROFILING_BEGIN_NO_VAR_DEF;
+                iVideoPlayer->Prepare();
+                TAG_TIME_PROFILING_END_NO_VAR_DEF;
+                PRINT_TO_CONSOLE_TIME_DIFF;
+
+                /* Wait until we receive  MvpuoPrepareComplete */
+                PRINT_TO_CONSOLE_HOME_TIME_NO_VAR_DEF;
+                if (!iActiveSchedulerWait->IsStarted())
+                    {
+                    iActiveSchedulerWait->Start();
+                    }
+                RET_IF_ERR(iErrorCode, XA_RESULT_INTERNAL_ERROR);
                 }
            }
         }
+    if (err != KErrNone)
+        {
+        err = XA_RESULT_INTERNAL_ERROR;
+        }
     return err;
     }
 
 TInt CMMFBackendEngine::DetermineAPIToUse(char* uri, TFuncInUse aFunc)
     {
-    char* tempExtensionPtr = NULL;
-    char extension[MAX_EXTENSION_SIZE] = { 0 };
-    
-    tempExtensionPtr = strchr(uri, (int)'.');
-    strcpy(extension, tempExtensionPtr);
-        
-    for(unsigned int i=0;i<sizeof(extension);i++)
+    char* dotPtr = NULL;
+    char ext[MAX_EXTENSION_SIZE] = { 0 };
+    int extLen;
+
+    dotPtr = strrchr(uri, (int)'.');
+    if (!dotPtr)
         {
-        extension[i] = tolower(extension[i]);
+        return KErrNotFound;
         }
-    
-    if(aFunc == ERecord)
+
+    strncpy(ext, dotPtr,strlen(dotPtr));
+    /*Null terminate the string*/
+    ext[strlen(dotPtr)] = '\0';
+    extLen = sizeof(ext);
+    for(unsigned int i=0; i < extLen; i++)
         {
-        return EAudioPlayerUtility; 
+        ext[i] = tolower(ext[i]);
+        }
+
+    if (aFunc == ERecord)
+        {
+        return EAudioRecorderUtility;
         }
     else
         {
-        if(!strcmp(extension, ".mp3") || (!strcmp(extension, ".amr")) || (!strcmp(extension, ".aac")) || (!strcmp(extension, ".mid")) ||
-                  (!strcmp(extension, ".awb")))
+        if (!strcasecmp(ext, ".mp3") ||
+           !strcasecmp(ext, ".amr") ||
+           !strcasecmp(ext, ".aac") ||
+           !strcasecmp(ext, ".mid") ||
+		   !strcasecmp(ext, ".wav") ||
+           !strcasecmp(ext, ".awb"))
             {
-            return EAudioPlayerUtility; 
+            return EAudioPlayerUtility;
             }
-          else 
+          else
             {
             return EVideoPlayerUtility;
             }
         }
     }
 
-void CMMFBackendEngine::SetWindowHandle(void* display_info)
-    {
-    XADataLocator_NativeDisplay* nativeDisplay;
-    XADataSink* videoSink = (XADataSink*)display_info;
-    
-    nativeDisplay = (XADataLocator_NativeDisplay*) (videoSink->pLocator);
-    
-    m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
-    m_pWs =     ((RWsSession*)(nativeDisplay->hDisplay));
-    
-    m_bWindowReferencePassed = TRUE;
-    
-    }
-
 //From MVidePlayerUtilityObserver
 void CMMFBackendEngine::MvpuoOpenComplete(TInt aError)
     {
-    if(aError == KErrNone)
+    PRINT_TO_CONSOLE_HOME_TIME;
+
+    iErrorCode = aError;
+    if (iErrorCode == KErrNone)
+        {
+        iMMFPlayerState = EPlayerOpened;
+        }
+    if (iActiveSchedulerWait->IsStarted())
         {
-        //Issue the command to Play the file
-        TRAPD (error, iVideoPlayer->Prepare());
-        if (error == KErrNone)
+        iActiveSchedulerWait->AsyncStop();
+        }
+    }
+
+void CMMFBackendEngine::MvpuoPrepareComplete(TInt aError)
+    {
+    PRINT_TO_CONSOLE_HOME_TIME;
+
+    TAutoScaleType autoScale = EAutoScaleBestFit;
+    iErrorCode = aError;
+    iMediaPlayerState = XA_PLAYSTATE_PLAYERUNINITIALIZED;
+    iMediaDuration = 0;
+    iMarkerPositionTimer->ResetPlayer();
+    iPlayItfPositionUpdateTimer->ResetPlayer();
+    if (iErrorCode == KErrNone)
+        {
+        iMMFPlayerState = EPlayerPrepared;
+        TAG_TIME_PROFILING_BEGIN;
+        TRAP(iErrorCode, iMediaDuration = iVideoPlayer->DurationL());
+        TAG_TIME_PROFILING_END;
+        PRINT_TO_CONSOLE_TIME_DIFF;
+        if (iErrorCode == KErrNone)
             {
-                //prepare success
+            iPlaybackHead = 0;
+            iMediaPlayerState = XA_PLAYSTATE_STOPPED;
+            iMarkerPositionTimer->UseVideoPlayer();
+            iPlayItfPositionUpdateTimer->UseVideoPlayer();
+            if (m_pWs && m_pScr && m_pWindow)
+                {
+                TRect videoExtent = TRect(m_pWindow->Size());
+                TRect clipRect = TRect(m_pWindow->Size());        
+                TAG_TIME_PROFILING_BEGIN;
+                TRAP_IGNORE(iVideoPlayer->AddDisplayWindowL(*m_pWs, *m_pScr, *m_pWindow, videoExtent, clipRect));
+                TRAP_IGNORE(iVideoPlayer->SetAutoScaleL(*m_pWindow, autoScale));
+                TAG_TIME_PROFILING_END;
+                PRINT_TO_CONSOLE_TIME_DIFF;
+                }
             }
-        else
-            {
-                //prepare failed
-            }
+        }
+    if (iActiveSchedulerWait->IsStarted())
+        {
+        iActiveSchedulerWait->AsyncStop();
+        }
+    }
+
+void CMMFBackendEngine::MvpuoFrameReady(CFbsBitmap& /*aFrame*/,TInt /*aError*/)
+    {
+
+    }
+void CMMFBackendEngine::MvpuoPlayComplete(TInt aError)
+    {
+    iErrorCode = aError;
+    if (iErrorCode == KErrNone)
+        {
+        iPlaybackHead = iMediaDuration;
+        /* Per OpenMAX AL Spec, when playback is completed, media player stays in
+         * paused state with playhead at the end of the media clip */
+        iMediaPlayerState = XA_PLAYSTATE_PAUSED;
+        DoPostEvent(XA_PLAYEVENT_HEADATEND);
         }
     else
         {
-        //could not open file
+        iPlaybackHead = 0;
+        iMediaPlayerState = XA_PLAYSTATE_STOPPED;
+        XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
+        XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
         }
-    }
-
-
-
-void CMMFBackendEngine::MvpuoFrameReady(CFbsBitmap& /*aFrame*/,TInt /*aError*/)
-    {
-    
+    iMMFPlayerState = EPlayerPrepared;
+    iMarkerPositionTimer->Stop();
+    iPlayItfPositionUpdateTimer->Stop();
     }
 
-
-
-void CMMFBackendEngine::MvpuoPlayComplete(TInt aError)
-    {
-    
-        
-    if(aError == KErrNone)
-        {
-            //playback complete
-        }
-    else
-        {
-            //playback complete with error
-        }
-    }
-
-
-
 void CMMFBackendEngine::MvpuoEvent(class TMMFEvent const & event)
     {
-    RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent (0x%x %d)\n"),
-  		          event.iEventType, event.iErrorCode);
+    //RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent (0x%x %d)"), event.iEventType, event.iErrorCode);
 
     if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError &&
         event.iErrorCode == KErrHardwareNotAvailable)
         {
-        //audio device taken
-        //handle this case
+        //RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Hardware Not Available"));
         }
 
-	else if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError &&
-			 event.iErrorCode == KErrMMPartialPlayback)
+    else if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError &&
+             event.iErrorCode == KErrMMPartialPlayback)
         {
-        //Partial Playback
-        } 
-    
+        //RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Partial playback"));
+        }    
+    if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError &&
+        event.iErrorCode == -12014)
+        {
+        //RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Audio Device taken"));
+        PausePlayback();
+        XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
+        XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
+        }
     else if (event.iEventType == KMMFRefreshMetaData)
         {
-       //entry = iVideoPlayer->MetaDataEntryL( event.iErrorCode );
+        //RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: EventType == KMMFRefreshMetaData"));
         }
     else
         {
-    
+        //RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Unhandled event"));
         }
-    
-}
-
-
 
-void CMMFBackendEngine::MvpuoPrepareComplete(TInt aError)
-    {
-    TInt err(KErrNone);
-    TAutoScaleType autoScale = EAutoScaleBestFit;
-	if(aError == KErrNone)
-	    {
-        if(m_pWindow == NULL)
-            {
-            //no RWindow was given to use so I'll create one and handle it
-            //CreateAndConfigureWindowL();
-            }
-        else
-            {
-            TRAP(err, iVideoPlayer->AddDisplayWindowL(*m_pWs, *m_pScr, *m_pWindow));
-            TRAP(err, iVideoPlayer->SetAutoScaleL(*m_pWindow, autoScale));
-            }
-
-        TReal beginSecs = 1;
-        TReal intervalSecs = 5;
-        TTimeIntervalMicroSeconds  interval(1000000*intervalSecs);
-        TTimeIntervalMicroSeconds  beginning(1000000*beginSecs);
-        
-        iVideoPlayer->Play();
-        iPlayerState = EPlayerPlaying;
-	    }
     }
 
 // From MRebufferCallback
@@ -340,9 +386,6 @@
     {
     }
 
-
-
-
 void CMMFBackendEngine::MvloLoadingComplete()
     {
     //file playing
@@ -350,50 +393,90 @@
 
 //MMdaAudioPlayerCallback
 void CMMFBackendEngine::MapcInitComplete(TInt aError,
-										  const TTimeIntervalMicroSeconds& /* aDuration */)
+                                          const TTimeIntervalMicroSeconds& aDuration)
     {
-    if (aError == KErrNone)
+    PRINT_TO_CONSOLE_HOME_TIME;
+
+    iErrorCode = aError;
+    iMediaPlayerState = XA_PLAYSTATE_PLAYERUNINITIALIZED;
+    iMMFPlayerState = EPlayerClosed;
+    iMediaDuration = 0;
+    iMarkerPositionTimer->ResetPlayer();
+    iPlayItfPositionUpdateTimer->ResetPlayer();
+    if (iErrorCode == KErrNone)
         {
-        iAudioPlayer->Play();
-        iPlayerState = EPlayerPlaying;
+        iMediaDuration = aDuration;
+        iPlaybackHead = 0;
+        iMediaPlayerState = XA_PLAYSTATE_STOPPED;
+        iMMFPlayerState = EPlayerOpened;
+        iMarkerPositionTimer->UseAudioPlayer();
+        iPlayItfPositionUpdateTimer->UseAudioPlayer();
         }
-    else
+    if (iActiveSchedulerWait->IsStarted())
         {
-        //init failed
+        iActiveSchedulerWait->AsyncStop();
         }
     }
 
 
-void CMMFBackendEngine::MapcPlayComplete(TInt /* aError */)
+void CMMFBackendEngine::MapcPlayComplete(TInt aError)
     {
-    //audio playback complete
+    iErrorCode = aError;
+    if (iErrorCode == KErrNone)
+        {
+        /* Now we should have better value. Start using that */
+        iAudioPlayer->Duration(iMediaDuration);
+        iPlaybackHead = iMediaDuration;
+        /* Per OpenMAX AL Spec, when playback is completed, media player stays in
+         * paused state with playhead at the end of the media clip */
+        iMediaPlayerState = XA_PLAYSTATE_PAUSED;
+        DoPostEvent(XA_PLAYEVENT_HEADATEND);
+        iMMFPlayerState = EPlayerOpened;
+        }
+    else
+        {
+        iAudioPlayer->GetPosition(iPlaybackHead);
+        iMediaPlayerState = XA_PLAYSTATE_PAUSED;
+        iMMFPlayerState = EPlayerPaused;
+        XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
+        XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
+        }
+    iMarkerPositionTimer->Stop();
+    iPlayItfPositionUpdateTimer->Stop();
     }
 
 // from MMdaObjectStateChangeObserver
 void CMMFBackendEngine::MoscoStateChangeEvent(CBase* /*aObject*/, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)
     {
+    TInt err(KErrNone);
     iPreviousRecordState = aPreviousState;
     iCurrentRecordState = aCurrentState;
     iErrorCode = aErrorCode;
-    RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 1 Error[%d]"),aErrorCode);  
-    if(iCurrentRecordState == CMdaAudioClipUtility::EOpen)  //EOpen
+    //RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 1 Error[%d]"),aErrorCode);
+    if (iCurrentRecordState == CMdaAudioClipUtility::EOpen)  //EOpen
         {
         //outputfile is open and ready for recording
         iRecordState = CMMFBackendEngine::ERecorderOpen;
-        if(iErrorCode == KErrNone)
+        if (iErrorCode == KErrNone)
             {
             if (iPreviousRecordState == CMdaAudioClipUtility::ENotReady)
                 {
-                RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 2"));    
+                //RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 2"));
+                TRAP(err,iaudioInputRecord = CAudioInput::NewL( *iAudioRecorder ));
+                RArray<CAudioInput::TAudioInputPreference> inputArray;
+                inputArray.Append( CAudioInput::EDefaultMic );
+                // Set Audio Input
+                iaudioInputRecord->SetAudioInputL( inputArray.Array( ) );
+                inputArray.Close();
                 TMMFMessageDestination destination(KUidMetaDataWriteCustomCommand);
                 TMMFMessageDestinationPckg pckg = TMMFMessageDestinationPckg(destination);
                 TInt ret = iAudioRecorder->RecordControllerCustomCommandSync(pckg, 0, KNullDesC8, KNullDesC8);
-                RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 3 [%d]"),ret);    
-                if(ret != KErrNone && iFileFormat == XA_CONTAINERTYPE_MP4)
+                //RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 3 [%d]"),ret);
+                if (ret != KErrNone && iFileFormat == XA_CONTAINERTYPE_MP4)
                     {
                     iPauseSupportMP4 = FALSE;
                     }
-                if(iActiveSchedulerWait->IsStarted())
+                if (iActiveSchedulerWait->IsStarted())
                     {
                     iActiveSchedulerWait->AsyncStop();
                     }
@@ -401,21 +484,21 @@
             }
         else
             {
-            XAAdaptEventMMF event = {XA_RECORDITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
-            XAAdaptationBaseMMF_SendAdaptEvents((XAAdaptationBaseMMFCtx*)iAdaptContext, &event );
+            XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
+            XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
             }
         }
-    else if(iCurrentRecordState == CMdaAudioClipUtility::ERecording)  //ERecording
+    else if (iCurrentRecordState == CMdaAudioClipUtility::ERecording)  //ERecording
         {
         iRecordState = CMMFBackendEngine::ERecorderRecording;
         iPositionUpdateTimer->Start(iTimerDelay);
-        XAAdaptEventMMF event = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADMOVING, 0, NULL};
-        XAAdaptationBaseMMF_SendAdaptEvents((XAAdaptationBaseMMFCtx*)iAdaptContext, &event );
+        XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADMOVING, 0, NULL};
+        XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
         }
     else   //ENotReady
         {
         //outputfile is not open
-        iRecordState = CMMFBackendEngine::ERecorderNotReady;   
+        iRecordState = CMMFBackendEngine::ERecorderNotReady;
         }
     }
 
@@ -429,13 +512,13 @@
             iRecordState = ERecorderNotReady;
             break;
         case ERecorderOpen:
-            if(iFileFormat == XA_CONTAINERTYPE_MP4 && !iPauseSupportMP4 && !stopCalled)
+            if (iFileFormat == XA_CONTAINERTYPE_MP4 && !iPauseSupportMP4 && !stopCalled)
                 {
                 err = KErrNotSupported;
                 return err;
-                }            
+                }
             iPositionUpdateTimer->Stop();
-            iAudioRecorder->Stop(); 
+            iAudioRecorder->Stop();
             iRecordState = ERecorderOpen;
             break;
         case ERecorderRecording:
@@ -445,123 +528,50 @@
     return err;
     }
 
-void CMMFBackendEngine::AudioOpenFile()
-    {
-	TRAPD(err, iAudioPlayer->OpenFileL(iFileName));
-	if(err)
-	    {
-        
-	    }
-    }
-
-void CMMFBackendEngine::AudioStop()
-    {
-	iAudioPlayer->Stop();
-    }
-
-void CMMFBackendEngine::AudioPause()
-    {
-	iAudioPlayer->Pause();
-    }
-
-void CMMFBackendEngine::AudioClose()
+void CMMFBackendEngine::Close()
     {
-	iAudioPlayer->Close();
-    }
-
-void CMMFBackendEngine::ResumePlayback()
-    {
-    if(iPlayerState == EPlayerClosed)
-        {
-        //prepare playback
-        if(iAPIBeingUsed == EAudioPlayerUtility)
-            {
-            AudioOpenFile();
-            }
-        else
-            {
-            TRAPD (error, iVideoPlayer->OpenFileL(iFileName));
-            if(error != KErrNone)
-                {
-                
-                }
-            }
-        iPlayerState = EPlayerPaused;    
-        }
-    else if (iPlayerState == EPlayerPaused)
+    if (iMarkerPositionTimer)
         {
-        if(iAPIBeingUsed == EAudioPlayerUtility)
-            {
-            iAudioPlayer->Play();  
-            }
-        else
-            {
-            iVideoPlayer->Play();
-            }
-        iPlayerState = EPlayerPlaying;
+        iMarkerPositionTimer->Stop();
         }
-    }
-
-void CMMFBackendEngine::PausePlayback()
-    {
-    if(iAPIBeingUsed == EAudioPlayerUtility)
-        {
-        AudioPause();
-        }
-    else
+    if (iPlayItfPositionUpdateTimer)
         {
-        TRAPD(err, iVideoPlayer->PauseL());
-        if(err != KErrNone)
-            {
-            
-            }
-        } 
-    iPlayerState = EPlayerPaused;
-    }
+        iPlayItfPositionUpdateTimer->Stop();
+        }
 
-void CMMFBackendEngine::StopPlayback()
-    {
-    if(iAPIBeingUsed == EAudioPlayerUtility)
-        {
-        AudioStop();
-        }
-    if(iAPIBeingUsed == EVideoPlayerUtility)
-        {
-        iVideoPlayer->Stop();
-        }
-    iPlayerState = EPlayerClosed;   
-    }
-
-void CMMFBackendEngine::CloseAndDestroy()
-    {
     if (iBaseVideoPlayer && iVideoPlayer)
         {
-        iVideoPlayer->Close();
-        delete iBaseVideoPlayer;
-        iVideoPlayer = NULL;
-        iBaseVideoPlayer = NULL;
+        switch(iMMFPlayerState)
+            {
+            case EPlayerPlaying:
+            case EPlayerPaused:
+            case EPlayerPrepared:
+                iVideoPlayer->Stop();
+            case EPlayerOpened:
+            if (m_pWs && m_pScr && m_pWindow)
+                {
+                iVideoPlayer->RemoveDisplayWindow(*m_pWindow);
+                }
+                iVideoPlayer->Close();
+            case EPlayerClosed:
+            default:
+                break;
+            };
         }
-    
+
     if (iBaseAudioPlayer && iAudioPlayer)
         {
         iAudioPlayer->Close();
-        delete iBaseAudioPlayer;
-        iAudioPlayer = NULL;
-        iBaseAudioPlayer = NULL;
         }
-    
+
     if (iBaseAudioRecorder)
         {
         iAudioRecorder->Close();
-        delete iBaseAudioRecorder;
-        iAudioRecorder = NULL;
-        iBaseAudioRecorder = NULL;
         }
-    
+
     if(iPositionUpdateTimer)
         {
-        delete iPositionUpdateTimer;
-        iPositionUpdateTimer = NULL;
+        iPositionUpdateTimer->Stop();
         }
 
     if(iActiveSchedulerWait)
@@ -570,35 +580,49 @@
             {
             iActiveSchedulerWait->AsyncStop();
             }
-        delete iActiveSchedulerWait;
-        iActiveSchedulerWait = NULL;
-        } 
+        }
     }
 
-void CMMFBackendEngine::SetNativeDisplayInformation(void* display_info)
+void CMMFBackendEngine::Destroy()
     {
-	//display_info is of type XADataSink
-	//display_info.pLocator is of type XADataLocator_NativeDisplay
-	m_bWindowReferencePassed = TRUE;
-	XADataLocator_NativeDisplay* nativeDisplay;
-	XADataSink* videoSink = (XADataSink*)display_info;
-	
-	nativeDisplay = (XADataLocator_NativeDisplay*) (videoSink->pLocator);
-	//TODO: scrDevice is not been passed Properly
-    // Add the display window
-    m_cropRegion = TRect(((RWindow*)(nativeDisplay->hWindow))->Size());
-    m_videoExtent = TRect(((RWindow*)(nativeDisplay->hWindow))->Size());
-    m_cropRect = TRect(((RWindow*)(nativeDisplay->hWindow))->Size());
-    m_clipRect = TRect(((RWindow*)(nativeDisplay->hWindow))->Size());
-    m_cropRegion = TRect(((RWindow*)(nativeDisplay->hWindow))->Size());
-    m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
-    m_pWs = ((RWsSession*)(nativeDisplay->hDisplay));
-    
-    TRAPD(err, m_pScr = new(ELeave) CWsScreenDevice(*m_pWs));
-    if(err == KErrNone)
+
+    if (iBaseAudioRecorder)
+        {
+        iAudioRecorder->Close();
+        }
+
+    if (iActiveSchedulerWait && iActiveSchedulerWait->IsStarted())
         {
-        m_pScr->Construct();
+        iActiveSchedulerWait->AsyncStop();
         }
+
+    delete iPositionUpdateTimer;
+    iPositionUpdateTimer = NULL;
+    delete iUri;
+    iUri = NULL;
+    delete iMarkerPositionTimer;
+    iMarkerPositionTimer = NULL;
+    delete iPlayItfPositionUpdateTimer;
+    iPlayItfPositionUpdateTimer = NULL;
+    delete iBaseVideoPlayer;
+    iBaseVideoPlayer = NULL;
+    iVideoPlayer = NULL;
+    if (iaudioInputRecord)
+        {
+        delete iaudioInputRecord;
+        iaudioInputRecord = NULL;
+        }
+		
+    delete iBaseAudioPlayer;
+    iBaseAudioPlayer = NULL;
+    iAudioPlayer = NULL;
+    delete iBaseAudioRecorder;
+    iBaseAudioRecorder = NULL;
+    iAudioRecorder = NULL;
+    delete iActiveSchedulerWait;
+    iActiveSchedulerWait = NULL;
+    delete m_pScr;
+    m_pScr = NULL;
     }
 
 TInt CMMFBackendEngine::GetRecordPosition(XAuint64* position)
@@ -620,68 +644,140 @@
     TInt err(KErrNone);
     iAdaptContext = adaptcontext;
     TRAP(err, iPositionUpdateTimer = new (ELeave) LocalTimer(this, iAdaptContext));
-    if(!err)
+    if (!err)
         {
         iPositionUpdateTimer->PostInit();
         }
     return err;
     }
 
-TInt CMMFBackendEngine::GetEncoderId(XAuint32* encoderId)
+TInt CMMFBackendEngine::GetCodecId(XAuint32* codecid)
     {
     TInt err(KErrNone);
-    if(iRecordState == CMMFBackendEngine::ERecorderOpen)
+
+    if(iAPIBeingUsed == EAudioRecorderUtility)
         {
-        TFourCC dest;
-        TRAP(err, dest = iAudioRecorder->DestinationDataTypeL());
-        if(err == KErrNone)
+        if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
             {
-            *encoderId = dest.FourCC();
+            TFourCC dest;
+            TRAP(err, dest = iAudioRecorder->DestinationDataTypeL());
+            if(err == KErrNone)
+                {
+                *codecid = dest.FourCC();
+                }
+            }
+        }
+    else if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+            {
+            TMMFMessageDestinationPckg pckg(KUidInterfaceMMFAudioController);
+            TPckgBuf<TMMFAudioConfig> configPackage;
+            TInt err =  iAudioPlayer->CustomCommandSync(pckg,
+                                                        EMMFAudioControllerGetSourceDataType,
+                                                        KNullDesC8,
+                                                        KNullDesC8,
+                                                        configPackage);
+            if(err == KErrNone)
+                {
+                *codecid = configPackage().iSourceDataTypeCode.FourCC();
+                }
             }
         }
     return err;
     }
 
-TInt CMMFBackendEngine::GetDestinationBitRate(XAuint32* bitrate)
+TInt CMMFBackendEngine::GetBitRate(XAuint32* bitrate)
     {
     TInt err(KErrNone);
     TUint br(0);
-    if(iRecordState == CMMFBackendEngine::ERecorderOpen)
+    if(iAPIBeingUsed == EAudioRecorderUtility)
         {
-        TRAP(err, br = iAudioRecorder->DestinationBitRateL());
-        if(err == KErrNone)
+        if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
             {
+            TRAP(err, br = iAudioRecorder->DestinationBitRateL());
+            if(err == KErrNone)
+                {
+                *bitrate = br;
+                }
+            }
+        }
+    else if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+            {
+            TInt err =  iAudioPlayer->GetBitRate(br);
             *bitrate = br;
             }
         }
     return err;
     }
 
-TInt CMMFBackendEngine::GetDestinationSampleRate(XAmilliHertz* samplerate)
+TInt CMMFBackendEngine::GetSampleRate(XAmilliHertz* samplerate)
     {
     TInt err(KErrNone);
     TUint sr(0);
-    if(iRecordState == CMMFBackendEngine::ERecorderOpen)
+    if(iAPIBeingUsed == EAudioRecorderUtility)
+        {
+        if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
+            {
+            TRAP(err, sr = iAudioRecorder->DestinationSampleRateL());
+            if(err == KErrNone)
+                {
+                *samplerate = sr;
+                }
+            }
+        }
+    else if(iAPIBeingUsed == EAudioPlayerUtility)
         {
-        TRAP(err, sr = iAudioRecorder->DestinationSampleRateL());
-        if(err == KErrNone)
+        if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
             {
-            *samplerate = sr;
+            TMMFMessageDestinationPckg pckg(KUidInterfaceMMFAudioController);
+            TPckgBuf<TMMFAudioConfig> configPackage;
+            TInt err =  iAudioPlayer->CustomCommandSync(pckg,
+                                                        EMMFAudioControllerGetSourceSampleRate,
+                                                        KNullDesC8,
+                                                        KNullDesC8,
+                                                        configPackage);
+            if(err == KErrNone)
+                {
+                *samplerate = configPackage().iSampleRate;
+                }
             }
         }
     return err;
     }
 
-TInt CMMFBackendEngine::GetDestinationChannels(XAuint32* channels)
+TInt CMMFBackendEngine::GetChannels(XAuint32* channels)
     {
     TInt err(KErrNone);
     TUint ch(0);
-    if(iRecordState == CMMFBackendEngine::ERecorderOpen)
+    if(iAPIBeingUsed == EAudioRecorderUtility)
+        {
+        if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
+            {
+            TRAP(err,ch = iAudioRecorder->DestinationNumberOfChannelsL());
+            if(err == KErrNone)
+                {
+                *channels = ch;
+                }
+            }
+        }
+    else if(iAPIBeingUsed == EAudioPlayerUtility)
         {
-        TRAP(err,ch = iAudioRecorder->DestinationNumberOfChannelsL());
-        if(err == KErrNone)
+        if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
             {
-            *channels = ch;
+            TMMFMessageDestinationPckg pckg(KUidInterfaceMMFAudioController);
+            TPckgBuf<TMMFAudioConfig> configPackage;
+            TInt err =  iAudioPlayer->CustomCommandSync(  pckg,
+                                                        EMMFAudioControllerGetSourceNumChannels,
+                                                        KNullDesC8,
+                                                        KNullDesC8,
+                                                        configPackage   );
+            if(err == KErrNone)
+                {
+                *channels = configPackage().iChannels;
+                }
             }
         }
     return err;
@@ -718,10 +814,10 @@
 TInt CMMFBackendEngine::SetDestinationChannels(XAuint32* channels)
     {
     TInt err(KErrNone);
-    if(iRecordState == CMMFBackendEngine::ERecorderOpen)
+    if (iRecordState == CMMFBackendEngine::ERecorderOpen)
         {
         TRAP(err,iAudioRecorder->SetDestinationNumberOfChannelsL(*channels));
-        if(err != KErrNone)
+        if (err != KErrNone)
             {
             return XA_RESULT_PARAMETER_INVALID;
             }
@@ -729,103 +825,811 @@
     return err;
     }
 
+/*
+XAresult CMMFBackendEngine::SetWindowHandle(void* display_info)
+    {
+    XADataLocator_NativeDisplay* nativeDisplay;
+    XADataSink* videoSink = (XADataSink*)display_info;
+
+    nativeDisplay = (XADataLocator_NativeDisplay*) (videoSink->pLocator);
+
+    m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
+    m_pWs =     ((RWsSession*)(nativeDisplay->hDisplay));
+
+    m_bWindowReferencePassed = TRUE;
+    return XA_RESULT_SUCCESS;
+    }
+
+*/
+XAresult CMMFBackendEngine::CreateAndConfigureWindowL()
+    {
+#ifdef USE_LOCAL_WINDOW_RESOURCES
+    // create window for attaching the surface as its background
+    //RWsSession ws;
+    //TInt err2(KErrNone);
+    TInt err2 = m_ws.Connect();
+    m_pScr = new(ELeave) CWsScreenDevice(m_ws);
+    err2 = m_pScr->Construct();
+    CWindowGc* gc = NULL;
+    err2 = m_pScr->CreateContext(gc);
+    RWindowGroup grp(m_ws);
+    err2 = grp.Construct(0xf00f00);
+    const TSize KWinSize(320, 240);
+    m_pWindow = new (ELeave) RWindow(m_ws);
+    err2 = m_pWindow->Construct(grp, 0xfeefee);
+    m_pWindow->SetExtent(TPoint(), KWinSize);
+    m_pWindow->SetBackgroundColor(TRgb(255,0,0,128));
+    //win.SetBackgroundColor(TRgb(0,0,0,0));
+    m_pWindow->Activate();
+    m_pWindow->Invalidate();
+    m_pWindow->BeginRedraw();
+    gc->Activate(*m_pWindow);
+    m_pWindow->EndRedraw();
+    m_ws.Flush();
+
+    //Create MediaClientUitlity for NGA Surfaces
+    TInt displayId = m_pScr->GetScreenNumber();
+
+    // Add the display window
+    m_cropRegion = TRect(m_pWindow->Size());
+    m_clipRect = TRect(m_pWindow->Size());
+    m_videoExtent = TRect(m_pWindow->Size());
+    m_rotation = EVideoRotationNone;
+#endif /* USE_LOCAL_WINDOW_RESOURCES */
+
+    return XA_RESULT_SUCCESS;
+    }
+
+XAresult CMMFBackendEngine::SetNativeDisplayInformation(void* display_info)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    //display_info is of type XADataSink
+    //display_info.pLocator is of type XADataLocator_NativeDisplay
+    XADataLocator_NativeDisplay* nativeDisplay;
+    XADataSink* videoSink = (XADataSink*)display_info;
+
+    if (videoSink)
+        {
+        nativeDisplay = (XADataLocator_NativeDisplay*) (videoSink->pLocator);
+        m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
+        m_pWs = ((RWsSession*)(nativeDisplay->hDisplay));
+    /*
+        m_cropRegion = TRect(m_pWindow->Size());
+        m_videoExtent = TRect(m_pWindow->Size());
+        m_cropRect = TRect(m_pWindow->Size());
+        m_clipRect = TRect(m_pWindow->Size());
+        m_cropRegion = TRect(m_pWindow->Size());
+    */
+        if (m_pWs)
+            {
+            delete m_pScr;
+            m_pScr = NULL;
+            TRAPD(err, m_pScr = new CWsScreenDevice(*m_pWs));
+            RET_IF_ERR(err, XA_RESULT_MEMORY_FAILURE);
+            m_pScr->Construct();
+            }
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::ResumePlayback()
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    TBool postHeadMovingEvent(EFalse);
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+            /* If we are already at the end of clip, do nothing
+             * check ::MapcPlayComplete for documentation */
+            if ((iPlaybackHead < iMediaDuration) &&
+                    ((iAPIBeingUsed == EAudioPlayerUtility) ||
+                     (iAPIBeingUsed == EVideoPlayerUtility)) )
+                {
+                if (iAPIBeingUsed == EAudioPlayerUtility)
+                    {
+                    TAG_TIME_PROFILING_BEGIN;
+                    iAudioPlayer->Play();
+                    TAG_TIME_PROFILING_END;
+                    PRINT_TO_CONSOLE_TIME_DIFF;                    
+                    }
+                else if (iAPIBeingUsed == EVideoPlayerUtility)
+                    {
+                    TAG_TIME_PROFILING_BEGIN;
+                    //iVideoPlayer->Play( iPlaybackHead, iMediaDuration);
+                    iVideoPlayer->Play();
+                    TAG_TIME_PROFILING_END;
+                    PRINT_TO_CONSOLE_TIME_DIFF;
+                    }
+                postHeadMovingEvent = ETrue;
+                iMediaPlayerState = XA_PLAYSTATE_PLAYING;
+                iMMFPlayerState = EPlayerPlaying;
+                iMarkerPositionTimer->Start();
+                iPlayItfPositionUpdateTimer->Start();
+                }
+            break;
+        case XA_PLAYSTATE_PLAYING:
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            retVal = XA_RESULT_INTERNAL_ERROR;
+            break;
+        }
+
+    if (postHeadMovingEvent)
+        {
+        DoPostEvent(XA_PLAYEVENT_HEADMOVING);
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::PausePlayback()
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_PLAYING:
+        case XA_PLAYSTATE_STOPPED:
+            if ((iAPIBeingUsed == EAudioPlayerUtility) ||
+                (iAPIBeingUsed == EVideoPlayerUtility) )
+                {
+                TInt pauseOpRes(KErrNone);
+                if (iAPIBeingUsed == EAudioPlayerUtility)
+                    {
+                    TAG_TIME_PROFILING_BEGIN;
+                    pauseOpRes = iAudioPlayer->Pause();
+                    TAG_TIME_PROFILING_END;
+                    PRINT_TO_CONSOLE_TIME_DIFF;
+                    }
+                else if (iAPIBeingUsed == EVideoPlayerUtility)
+                    {
+                    TAG_TIME_PROFILING_BEGIN;
+                    TRAP(pauseOpRes, iVideoPlayer->PauseL());
+                    if (pauseOpRes == KErrNone)
+                        {
+                        TRAPD(err, iPlaybackHead = iVideoPlayer->PositionL());
+                        if (err != KErrNone)
+                            {
+                            iPlaybackHead = 0;
+                            }
+                        }
+                    TAG_TIME_PROFILING_END;
+                    PRINT_TO_CONSOLE_TIME_DIFF;
+                    }
+                if ( pauseOpRes == KErrNone)
+                    {
+                    iMediaPlayerState = XA_PLAYSTATE_PAUSED;
+                    iMMFPlayerState = EPlayerPaused;
+                    iMarkerPositionTimer->Stop();
+                    iPlayItfPositionUpdateTimer->Stop();
+                    }
+                }
+            break;
+        case XA_PLAYSTATE_PAUSED:
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            retVal = XA_RESULT_INTERNAL_ERROR;
+            break;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::StopPlayback()
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_PAUSED:
+        case XA_PLAYSTATE_PLAYING:
+            if ((iAPIBeingUsed == EAudioPlayerUtility) ||
+                (iAPIBeingUsed == EVideoPlayerUtility) )
+                {
+                if (iAPIBeingUsed == EAudioPlayerUtility)
+                    {
+                    TAG_TIME_PROFILING_BEGIN;
+                    iAudioPlayer->Stop();
+                    TAG_TIME_PROFILING_END;
+                    PRINT_TO_CONSOLE_TIME_DIFF;
+
+                    iMMFPlayerState = EPlayerOpened;
+                    }
+                else if (iAPIBeingUsed == EVideoPlayerUtility)
+                    {
+                    TAG_TIME_PROFILING_BEGIN;
+                    iVideoPlayer->Stop();
+                    TAG_TIME_PROFILING_END;
+                    PRINT_TO_CONSOLE_TIME_DIFF;
+                    
+                    iMMFPlayerState = EPlayerPrepared;
+                    }
+                iMediaPlayerState = XA_PLAYSTATE_STOPPED;
+                iPlaybackHead = 0;
+                iMarkerPositionTimer->Stop();
+                iPlayItfPositionUpdateTimer->Stop();
+                }
+            break;
+        case XA_PLAYSTATE_STOPPED:
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            retVal = XA_RESULT_INTERNAL_ERROR;
+            break;
+        }
+    return retVal;
+    }
+XAresult CMMFBackendEngine::GetPlayState(XAuint32 *pState)
+    {
+    XAresult retVal(XA_RESULT_INTERNAL_ERROR);
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+        case XA_PLAYSTATE_PLAYING:
+            *pState = iMediaPlayerState;
+            retVal = XA_RESULT_SUCCESS;
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            break;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::GetDuration(XAmillisecond *pMsec)
+    {
+    XAresult retVal(XA_RESULT_INTERNAL_ERROR);
+    /* to convert from microseconds to milliseconds */
+    TInt64 divider(1000);
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+        case XA_PLAYSTATE_PLAYING:
+            /* TODO Check if we query from MMF*/
+            *pMsec = iMediaDuration.Int64() / divider;
+            retVal = XA_RESULT_SUCCESS;
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            break;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::GetPosition(XAmillisecond *pMsec)
+    {
+    XAresult retVal(XA_RESULT_INTERNAL_ERROR);
+    TInt64 divider(1000);
+    TTimeIntervalMicroSeconds pos;
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+        case XA_PLAYSTATE_PLAYING:
+            if (iAPIBeingUsed == EAudioPlayerUtility)
+                {
+                if (iAudioPlayer->GetPosition(pos) == KErrNone)
+                    {
+                    *pMsec = pos.Int64() / divider;
+                    retVal = XA_RESULT_SUCCESS;
+                    }
+                }
+            else if (iAPIBeingUsed == EVideoPlayerUtility)
+                {
+                TInt err(KErrNone);
+                TRAP(err, pos = iVideoPlayer->PositionL());
+                if (err == KErrNone)
+                    {
+                    *pMsec = pos.Int64() / divider; 
+                    retVal = XA_RESULT_SUCCESS;
+                    }
+                }
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            break;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::SetPosition(XAmillisecond pMsec)
+    {
+    XAresult retVal(XA_RESULT_INTERNAL_ERROR);
+    TInt64 multiplier(1000);
+    TTimeIntervalMicroSeconds pos;
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+        case XA_PLAYSTATE_PLAYING:
+            if(iAPIBeingUsed == EAudioPlayerUtility)
+                {
+                pos = pMsec * multiplier;
+                TAG_TIME_PROFILING_BEGIN;
+                iAudioPlayer->SetPosition(pos);
+                TAG_TIME_PROFILING_END;
+                PRINT_TO_CONSOLE_TIME_DIFF;
+
+                retVal = XA_RESULT_SUCCESS;
+                }
+            else if (iAPIBeingUsed == EVideoPlayerUtility)
+                {
+                pos = pMsec * multiplier;
+                TAG_TIME_PROFILING_BEGIN;
+                TRAPD(err, iVideoPlayer->SetPositionL(pos));
+                TAG_TIME_PROFILING_END;
+                PRINT_TO_CONSOLE_TIME_DIFF;
+                if (err == KErrNone)
+                    {
+                    retVal = XA_RESULT_SUCCESS;
+                    }
+                }
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            break;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::SetRepeats(XAboolean repeat)
+    {
+    XAresult retVal(XA_RESULT_INTERNAL_ERROR);
+    TInt numRepeats(0);
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+        case XA_PLAYSTATE_PLAYING:
+            if(iAPIBeingUsed == EAudioPlayerUtility)
+                {
+                numRepeats = repeat ? -2 : 0;
+                iAudioPlayer->SetRepeats(numRepeats, 0);
+                retVal = XA_RESULT_SUCCESS;
+                }
+            else
+                {
+                }
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            break;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::SetPlayWindow(XAmillisecond start, XAmillisecond end)
+    {
+    XAresult retVal(XA_RESULT_INTERNAL_ERROR);
+    TInt64 multiplier(1000);
+    TTimeIntervalMicroSeconds startpos(0);
+    TTimeIntervalMicroSeconds endpos(0);
+
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+        case XA_PLAYSTATE_PLAYING:
+            if(iAPIBeingUsed == EAudioPlayerUtility)
+                {
+                startpos = start * multiplier;
+                endpos = end * multiplier;
+                retVal = iAudioPlayer->SetPlayWindow(startpos,endpos);
+                }
+            else
+                {
+                }
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            break;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::SetPlayAdaptContext(void * adaptcontext)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+
+    iAdaptContext = adaptcontext;
+
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::RegisterCallback(xaPlayCallback cbFunction)
+    {
+    iPlayItfCBFunction = cbFunction;
+    return DoHandlePlayItfAttributesChanged();
+    }
+
+XAresult CMMFBackendEngine::SetCallbackEventsMask(XAuint32 eventflags)
+    {
+    iPlayItfEventFlags = eventflags;
+    return DoHandlePlayItfAttributesChanged();
+    }
+
+XAresult CMMFBackendEngine::SetMarkerPosition(XAmillisecond mSec)
+    {
+    iMarkerPosition = mSec;
+    return DoHandlePlayItfAttributesChanged();
+    }
+
+XAresult CMMFBackendEngine::ClearMarkerPosition()
+    {
+    iMarkerPosition = XA_TIME_UNKNOWN;
+    DoHandlePlayItfAttributesChanged();
+    return XA_RESULT_SUCCESS;
+    }
+
+XAresult CMMFBackendEngine::SetPositionUpdatePeriod(XAmillisecond mSec)
+    {
+    iPositionUpdatePeriod = mSec;
+    DoHandlePlayItfAttributesChanged();
+    return XA_RESULT_SUCCESS;
+    }
+
+XAresult CMMFBackendEngine::DoHandlePlayItfAttributesChanged()
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+
+    iMarkerPositionTimer->SetCallbackEventMask(iPlayItfEventFlags);
+    iMarkerPositionTimer->RegisterCallback(iPlayItfCBFunction);
+    iMarkerPositionTimer->SetMarkerPosition(iMarkerPosition);
+
+    iPlayItfPositionUpdateTimer->SetCallbackEventMask(iPlayItfEventFlags);
+    iPlayItfPositionUpdateTimer->RegisterCallback(iPlayItfCBFunction);
+    iPlayItfPositionUpdateTimer->SetPositionUpdatePeriod(iPositionUpdatePeriod);
+
+    switch (iMediaPlayerState)
+        {
+        case XA_PLAYSTATE_STOPPED:
+        case XA_PLAYSTATE_PAUSED:
+            break;
+        case XA_PLAYSTATE_PLAYING:
+            iMarkerPositionTimer->Start();
+            iPlayItfPositionUpdateTimer->Start();
+            break;
+        case XA_PLAYSTATE_PLAYERUNINITIALIZED:
+        default:
+            break;
+        }
+    return retVal;
+    }
+
+void CMMFBackendEngine::DoPostEvent(XAuint32 event)
+    {
+    if ((iPlayItfEventFlags & event) &&
+        (iPlayItfCBFunction != NULL))
+        {
+        XAAdaptEvent xaevent = {XA_PLAYITFEVENTS, event, 0, 0 };
+        XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &xaevent );
+        }
+    }
+
+XAresult CMMFBackendEngine::GetNumStreams(XAuint32* numstreams)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    TInt bitRate(0);
+    TInt numS(0);
+    if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        numS = 1;
+        *numstreams = numS;
+        }
+    else if (iAPIBeingUsed == EVideoPlayerUtility)
+        {
+        TRAPD(err, bitRate = iVideoPlayer->VideoBitRateL());
+        if(!err && bitRate)
+            {
+            numS++;
+            *numstreams = numS;
+            }
+        
+        bitRate = 0;
+        TRAP(err, bitRate = iVideoPlayer->AudioBitRateL());
+        if(!err && bitRate)
+            {
+            numS++;
+            *numstreams = numS;
+            }
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::GetStreamInfo(XAuint32 streamindex, XAuint32* streamtype)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        *streamtype = XA_DOMAINTYPE_AUDIO;
+        }
+    else if (iAPIBeingUsed == EVideoPlayerUtility)
+        {
+        switch(streamindex)
+            {
+            case 1:
+                *streamtype = XA_DOMAINTYPE_VIDEO;
+                break;
+            case 2:
+                *streamtype = XA_DOMAINTYPE_AUDIO;
+                break;
+            default:
+                retVal = XA_RESULT_PARAMETER_INVALID;
+                break;
+            }
+        }
+    return retVal;
+    }
+
+
+XAresult CMMFBackendEngine::GetVideoFrameSize(XAuint32* height, XAuint32* width, XAuint32* frameRate)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    if(iAPIBeingUsed == EVideoPlayerUtility)
+        {
+        if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+            {
+            TSize size;
+            TReal32 framerate(0);
+            TRAPD(err, iVideoPlayer->VideoFrameSizeL(size));
+            if(!err)
+                {
+                *height = size.iHeight;
+                *width = size.iWidth;
+                }
+            else
+                {
+                retVal = err;
+                }
+
+            TRAP(err, framerate = iVideoPlayer->VideoFrameRateL());
+            if(!err)
+                {
+                *frameRate = framerate;
+                }
+            }
+        else
+            {
+            retVal = XA_RESULT_PRECONDITIONS_VIOLATED;
+            }
+        }
+    else
+        {
+        retVal = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    return retVal;
+    }
+
+XAresult CMMFBackendEngine::SetActiveState(XAuint32 streamindex, XAboolean active)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    TInt err(KErrNone);
+    if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        retVal = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    else if (iAPIBeingUsed == EVideoPlayerUtility)
+        {
+        switch(streamindex)
+            {
+            case 1:
+                TRAP(err, iVideoPlayer->SetVideoEnabledL(active));
+                retVal = err;
+                break;
+            case 2:
+                TRAP(err, iVideoPlayer->SetAudioEnabledL(active));
+                retVal = err;
+                break;
+            default:
+                retVal = XA_RESULT_PARAMETER_INVALID;
+                break;
+            }
+        }
+    return retVal;
+    }
+
+TInt CMMFBackendEngine::InitializeURIForMMFUtil(char *uri)
+    {
+    /* Initializes and save uri param into iUri structure */
+    TInt err(KErrNone);
+    TInt uriLen;
+    
+    if (!uri)
+        return KErrArgument;
+
+    if (iUri)
+        {
+        delete iUri;
+        iUri = NULL;
+        }
+    
+    uriLen = strlen(uri);
+    TPtr8 uriParam((TUint8*)uri, uriLen, uriLen);
+    
+    TRAP(err, iUri = HBufC::NewL(uriLen));
+    if (err != KErrNone)
+        return err;
+
+    iUriPtr.Set(iUri->Des());
+    iUriPtr.Copy(uriParam); /* Copy data*/
+    iUriPtr.LowerCase();
+
+    /* For file scheme convert from file:///c:/folder/file.ext
+     * format to c:\\folder\\file.ext using TUriParser. */
+    _LIT(KFileScheme,"file:///");
+    if (iUriPtr.Find(KFileScheme) >= 0)
+        {
+        TPtr tmp(const_cast<TUint16 *>(iUriPtr.Ptr()) + KFileScheme().Length(),
+                iUriPtr.Length(),
+                iUriPtr.Length());
+        /* Convert from c:/folder/file.ext format to
+         * c:\\folder\\file.ext using TUriParser.
+         * TUriParser8 accepts uri in format file:///c/folder/file.ext,
+         * so get rid of ':' after drive letter (if any) */
+        TInt pos = tmp.Find(_L(":"));
+        if (pos != KErrNotFound)
+            {
+            iUriPtr.Delete(KFileScheme().Length() + pos, 1);
+            }
+
+        TUriParser16 uriParser;
+        err = uriParser.Parse(iUriPtr);
+        if (err != KErrNone)
+            return err;
+
+        HBufC* file = NULL;
+        TRAP(err, file = uriParser.GetFileNameL());
+        if (err != KErrNone)
+            return err;
+
+        iUriPtr.Copy(file->Des());
+        delete file;
+        file = NULL;
+
+        }
+    return err;
+    }
+
+
+XAresult CMMFBackendEngine::SetVolume(XAuint32 volume)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    TInt err(KErrNone);
+    if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        retVal = iAudioPlayer->SetVolume(volume);
+        }
+    else if (iAPIBeingUsed == EVideoPlayerUtility)
+        {
+        TRAP(err, iVideoPlayer->SetVolumeL(volume));
+        retVal = err;
+        }
+    else if(iAPIBeingUsed == EAudioRecorderUtility)
+        {
+        retVal = iAudioRecorder->SetVolume(volume);
+        }
+    return retVal;    
+    }
+
+XAresult CMMFBackendEngine::GetMaxVolume(XAuint32* maxvolume)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        *maxvolume = iAudioPlayer->MaxVolume();
+        }
+    else if (iAPIBeingUsed == EVideoPlayerUtility)
+        {
+        *maxvolume = iVideoPlayer->MaxVolume();
+        }
+    else if(iAPIBeingUsed == EAudioRecorderUtility)
+        {
+        *maxvolume = iAudioRecorder->MaxVolume();
+        }
+    return retVal;     
+    }
+
+XAresult CMMFBackendEngine::GetVolume(XAuint32* volume)
+    {
+    XAresult retVal(XA_RESULT_SUCCESS);
+    TInt mmfvolume(0);
+    if(iAPIBeingUsed == EAudioPlayerUtility)
+        {
+        retVal = iAudioPlayer->GetVolume(mmfvolume);
+        if(retVal == XA_RESULT_SUCCESS)
+            {
+            *volume = mmfvolume;
+            }
+        }
+    else if (iAPIBeingUsed == EVideoPlayerUtility)
+        {
+        *volume = iVideoPlayer->Volume();
+        }
+    else if(iAPIBeingUsed == EAudioRecorderUtility)
+        {
+        retVal = iAudioRecorder->GetVolume(mmfvolume);
+        if(retVal == XA_RESULT_SUCCESS)
+            {
+            *volume = mmfvolume;
+            }
+        }
+    return retVal;     
+    }
+
 extern "C" {
 
     int mmf_backend_engine_init(void** engine)
-    { 
+    {
         TRAPD(err, *engine = CMMFBackendEngine::NewL());
         return err;
-        /*int err = CreateEngine(engine);
-        return err;*/
     }
-        
+
+    void mmf_backend_engine_deinit(void* engine)
+    {
+        delete ((CMMFBackendEngine*)engine);
+    }
+
     int mmf_set_recorder_uri(void* context, char* uri, XAuint32 format)
     {
         return ((CMMFBackendEngine*)(context))->SetFileName(uri,format,CMMFBackendEngine::ERecord);
     }
 
-    void mmf_set_player_uri(void* context, char* uri, XAuint32 format)
-    {
-        ((CMMFBackendEngine*)(context))->SetFileName(uri,format,CMMFBackendEngine::EPlay);
-    }
-
     int mmf_set_adapt_context(void* context, void* adaptcontext)
     {
         return ((CMMFBackendEngine*)(context))->SetAdaptContext(adaptcontext);
     }
 
-    void mmf_pause_playback(void* context)
+    void mmf_close(void* context)
     {
-        ((CMMFBackendEngine*)(context))->PausePlayback();      
+        ((CMMFBackendEngine*)context)->Close();
     }
 
-    void mmf_resume_playback(void* context)
-    {
-        ((CMMFBackendEngine*)(context))->ResumePlayback();       
-    }
-    void mmf_set_window_handle(void* context, void* display_info)
-    {
-        ((CMMFBackendEngine*)(context))->SetWindowHandle(display_info);
-    }
-    
-    void mmf_stop_playback(void* context)
-    {
-        ((CMMFBackendEngine*)(context))->StopPlayback(); 
-    }
-    void mmf_close(void* context)
-    {
-        delete ((CMMFBackendEngine*)context);
-    }
-    void mmf_setup_native_display(void* context, void* display_info)
-    {
-        ((CMMFBackendEngine*)(context))->SetNativeDisplayInformation(display_info); 
-    }
-    
     int mmf_start_recording(void* context)
     {
-        return ((CMMFBackendEngine*)(context))->SetRecorderState(CMMFBackendEngine::ERecorderRecording,FALSE); 
+        return ((CMMFBackendEngine*)(context))->SetRecorderState(CMMFBackendEngine::ERecorderRecording,FALSE);
     }
-    
+
     int mmf_stop_recording(void* context, XAboolean stopCalled )
     {
-        return ((CMMFBackendEngine*)(context))->SetRecorderState(CMMFBackendEngine::ERecorderOpen, stopCalled); 
+        return ((CMMFBackendEngine*)(context))->SetRecorderState(CMMFBackendEngine::ERecorderOpen, stopCalled);
     }
-        
+
     int mmf_get_record_position(void* context, XAuint64* position)
     {
         return ((CMMFBackendEngine*)(context))->GetRecordPosition(position);
     }
-    
+
     int mmf_set_record_position_update_period(void* context, XAmillisecond msec)
     {
         return ((CMMFBackendEngine*)(context))->SetPositionUpdatePerioed(msec);
-    }    
-    
-    int mmf_get_encoder_id(void* context, XAuint32* encoderId)
+    }
+
+    int mmf_get_codec_id(void* context, XAuint32* encoderId)
     {
-        return ((CMMFBackendEngine*)(context))->GetEncoderId(encoderId);
-    }
-    
-    int mmf_get_destination_channels(void* context, XAuint32* channelsIn)
-    {
-        return ((CMMFBackendEngine*)(context))->GetDestinationChannels(channelsIn);
-    }
-    
-    int mmf_get_destination_samplerate(void* context, XAmilliHertz* sampleRate)
-    {
-        return ((CMMFBackendEngine*)(context))->GetDestinationSampleRate(sampleRate);
+        return ((CMMFBackendEngine*)(context))->GetCodecId(encoderId);
     }
 
-    int mmf_get_destination_bitrate(void* context, XAuint32* bitRate)
+    int mmf_get_channels(void* context, XAuint32* channelsIn)
+    {
+        return ((CMMFBackendEngine*)(context))->GetChannels(channelsIn);
+    }
+
+    int mmf_get_samplerate(void* context, XAmilliHertz* sampleRate)
     {
-        return ((CMMFBackendEngine*)(context))->GetDestinationBitRate(bitRate);
+        return ((CMMFBackendEngine*)(context))->GetSampleRate(sampleRate);
+    }
+
+    int mmf_get_bitrate(void* context, XAuint32* bitRate)
+    {
+        return ((CMMFBackendEngine*)(context))->GetBitRate(bitRate);
     }
 
     int mmf_set_destination_channels(void* context, XAuint32* channelsIn)
     {
         return ((CMMFBackendEngine*)(context))->SetDestinationChannels(channelsIn);
     }
-    
+
     int mmf_set_destination_samplerate(void* context, XAmilliHertz* sampleRate)
     {
         return ((CMMFBackendEngine*)(context))->SetDestinationSampleRate(sampleRate);
@@ -835,5 +1639,135 @@
     {
         return ((CMMFBackendEngine*)(context))->SetDestinationBitRate(bitRate);
     }
+
+    XAresult mmf_set_play_adapt_context(void * context, void * adaptcontext)
+    {
+        return ((CMMFBackendEngine *)(context))->SetPlayAdaptContext(adaptcontext);
+    }
+
+    XAresult mmf_set_player_uri(void * context, char * uri, XAuint32 format)
+    {
+        return ((CMMFBackendEngine *)(context))->SetFileName(uri,format,CMMFBackendEngine::EPlay);
+    }
+
+/*
+    XAresult mmf_set_window_handle(void * context, void *  display_info)
+    {
+        return ((CMMFBackendEngine *)(context))->SetWindowHandle(display_info);
+    }
+
+*/
+    XAresult mmf_setup_native_display(void * context, void * display_info)
+    {
+        return ((CMMFBackendEngine *)(context))->SetNativeDisplayInformation(display_info);
+    }
+
+    XAresult mmf_playitf_resume_playback(void * context)
+    {
+        return ((CMMFBackendEngine *)(context))->ResumePlayback();
+    }
+
+    XAresult mmf_playitf_pause_playback(void * context)
+    {
+        return ((CMMFBackendEngine *)(context))->PausePlayback();
+    }
+
+    XAresult mmf_playitf_stop_playback(void * context)
+    {
+        return ((CMMFBackendEngine *)(context))->StopPlayback();
+    }
+
+    XAresult mmf_playitf_get_play_state(void * context, XAuint32 * pState)
+    {
+        return ((CMMFBackendEngine *)(context))->GetPlayState(pState);
+    }
+
+    XAresult mmf_playitf_get_duration(void * context, XAmillisecond * pMsec)
+    {
+        return ((CMMFBackendEngine *)(context))->GetDuration(pMsec);
+    }
+
+    XAresult mmf_playitf_get_position(void * context, XAmillisecond * pMsec)
+    {
+        return ((CMMFBackendEngine *)(context))->GetPosition(pMsec);
+    }
+
+    XAresult mmf_playitf_register_callback(void * context, xaPlayCallback callback)
+    {
+        return ((CMMFBackendEngine *)(context))->RegisterCallback(callback);
+    }
+
+    XAresult mmf_playitf_set_callback_events_mask(void * context, XAuint32 eventflags)
+    {
+        return ((CMMFBackendEngine *)(context))->SetCallbackEventsMask(eventflags);
+    }
+
+    XAresult mmf_playitf_set_marker_position(void * context, XAmillisecond mSec)
+    {
+        return ((CMMFBackendEngine *)(context))->SetMarkerPosition(mSec);
+    }
+
+    XAresult mmf_playitf_clear_marker_position(void * context)
+    {
+        return ((CMMFBackendEngine *)(context))->ClearMarkerPosition();
+
+    }
+
+    XAresult mmf_playitf_set_position_update_period(void * context, XAmillisecond mSec)
+    {
+        return ((CMMFBackendEngine *)(context))->SetPositionUpdatePeriod(mSec);
+    }
+
+    XAresult mmf_seekitf_set_position(void * context, XAmillisecond pMsec)
+    {
+        return ((CMMFBackendEngine *)(context))->SetPosition(pMsec);
+    }
+
+    XAresult mmf_seekitf_set_playwindow(void * context, XAmillisecond start, XAmillisecond end)
+    {
+        return ((CMMFBackendEngine *)(context))->SetPlayWindow(start,end);
+    }
+
+    XAresult mmf_seekitf_set_repeats(void * context, XAboolean repeat)
+    {
+        return ((CMMFBackendEngine *)(context))->SetRepeats(repeat);
+    }
+
+    XAresult mmf_streaminformationitf_get_streaminfo(void * context, XAuint32 streamindex,
+                                                                    XAuint32* streamtype)
+    {
+        return ((CMMFBackendEngine *)(context))->GetStreamInfo(streamindex, streamtype);
+    }
+
+    XAresult mmf_streaminformationitf_get_numstreams(void * context, XAuint32* numstreams)
+    {
+        return ((CMMFBackendEngine *)(context))->GetNumStreams(numstreams);
+    }
+
+    XAresult mmf_streaminformationitf_get_videoframesize(void * context, XAuint32* height,
+                                                        XAuint32* width, XAuint32* frameRate)
+    {
+        return ((CMMFBackendEngine *)(context))->GetVideoFrameSize(height,width,frameRate);
+    }
+
+    XAresult mmf_streaminformationitf_set_activestream(void * context, XAuint32 streamindex,
+                                                                    XAboolean active)
+    {
+        return ((CMMFBackendEngine *)(context))->SetActiveState(streamindex, active);
+    }
     
+    XAresult mmf_volumeitf_set_volume(void * context, XAuint32 volume)
+    {
+        return ((CMMFBackendEngine *)(context))->SetVolume(volume);
+    }    
+
+    XAresult mmf_volumeitf_get_maxvolume(void * context, XAuint32* volume)
+    {
+        return ((CMMFBackendEngine *)(context))->GetMaxVolume(volume);
+    }    
+    
+    XAresult mmf_volumeitf_get_volume(void * context, XAuint32* volume)
+    {
+        return ((CMMFBackendEngine *)(context))->GetVolume(volume);
+    }     
 }
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h	Fri Apr 30 19:18:45 2010 -0500
@@ -14,11 +14,6 @@
 * Description: 
 *
 */
-/*
-Media Helper Class for handling surface events
-
-Shy Ward
-*/
 
 #ifndef XA_CMMFBackendEngine_H
 #define XA_CMMFBackendEngine_H
@@ -38,12 +33,14 @@
 #include <mmf/common/mmferrors.h>
 #include <mmf/common/Mmfbase.h>
 #include <MMFMetadataEventConfigConstants.h>
+#include <mmf/common/mmfstandardcustomcommands.h>
 #ifdef ENABLE_GRAPHICS_SURFACE_INTEGRATION
 #include <graphics/surface.h> //TSurfaceId
 #include <mmf/common/mmfvideo.h> //TVideoAspectRatio
 #include <mediaclientvideodisplay.h>
 #include <surfaceeventhandler.h>
 #include <mdaaudiosampleeditor.h>
+#include <AudioInput.h>
 #include "sfmrlocaltimer.h"
 #endif
 
@@ -52,11 +49,13 @@
 
 #define MAX_EXTENSION_SIZE 10
 
+class CMarkerPositionTimer;
+class CPositionUpdateTimer;
 NONSHARABLE_CLASS(CMMFBackendEngine) : public CBase,
                           public MVideoPlayerUtilityObserver,
                           public MVideoLoadingObserver,
-						              public MMdaAudioPlayerCallback,
-						              public MMdaObjectStateChangeObserver
+                          public MMdaAudioPlayerCallback,
+                          public MMdaObjectStateChangeObserver
     {
 public:      
       enum TFuncInUse
@@ -65,19 +64,13 @@
           ERecord
           };
       
-	enum TPlayerInUse
-	{
-		EVideoPlayerUtility = 0,
-		EAudioPlayerUtility,
-	};
-	
-	enum TPlayerState
-	{
-	  EPlayerClosed,
-		EPlayerPaused,
-		EPlayerPlaying,
-		EPlayerError
-	};
+	enum TMMFUtiltyInUse
+	    {
+        ENoUtility,
+        EVideoPlayerUtility,
+        EAudioPlayerUtility,
+        EAudioRecorderUtility
+	    };
 	
 	enum TRecorderState
 	{
@@ -91,95 +84,123 @@
     static CMMFBackendEngine* NewL();
     ~CMMFBackendEngine();
     
-
-    void InitVideoPlayerUtilityL();
     TInt SetFileName(char* uri,XAuint32 format,TFuncInUse func);
-    void ResumePlayback();
-    void PausePlayback();    
-    void StopPlayback();
-    void SetWindowHandle(void* display_info);
-    void CreateAndConfigureWindowL();
-    void CloseAndDestroy();
-    void SetNativeDisplayInformation(void* display_info);
+    void Close();
+    void Destroy();
     TInt SetRecorderState(TRecorderState state, XAboolean stopCalled);
     TInt GetRecordPosition(XAuint64* position);
     TInt SetPositionUpdatePerioed(XAmillisecond period);
     TInt SetAdaptContext(void* adaptcontext);
-    TInt GetEncoderId(XAuint32* encoderId);
-    TInt GetDestinationBitRate(XAuint32* bitrate);
-    TInt GetDestinationSampleRate(XAmilliHertz* samplerate);
-    TInt GetDestinationChannels(XAuint32* channels);
+    TInt GetCodecId(XAuint32* encoderId);
+    TInt GetBitRate(XAuint32* bitrate);
+    TInt GetSampleRate(XAmilliHertz* samplerate);
+    TInt GetChannels(XAuint32* channels);
     TInt SetDestinationBitRate(XAuint32* bitrate);
     TInt SetDestinationSampleRate(XAmilliHertz* samplerate);
     TInt SetDestinationChannels(XAuint32* channels);
-private:
 
-		//From MVidePlayerUtilityObserver
-		void MvpuoOpenComplete(TInt aError);
-		void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
-		void MvpuoPlayComplete(TInt aError);
-		void MvpuoEvent(const TMMFEvent& aEvent);
-		void MvpuoPrepareComplete(TInt aError);
+/*    XAresult SetWindowHandle(void* display_info);*/
+    XAresult CreateAndConfigureWindowL();
+    XAresult SetNativeDisplayInformation(void* display_info);
+    XAresult ResumePlayback();
+    XAresult PausePlayback();    
+    XAresult StopPlayback();
+    XAresult GetPlayState(XAuint32 *pState);
+    XAresult GetDuration(XAmillisecond *pMsec);
+    XAresult GetPosition(XAmillisecond *pMsec);
+    XAresult SetPlayAdaptContext(void * adaptcontext);
+    XAresult RegisterCallback(xaPlayCallback cbFunction);
+    XAresult SetCallbackEventsMask(XAuint32 eventflags);
+    XAresult SetMarkerPosition(XAmillisecond mSec);
+    XAresult ClearMarkerPosition();
+    XAresult SetPositionUpdatePeriod(XAmillisecond mSec);
 
+    XAresult SetPosition(XAmillisecond pMsec);
+    XAresult SetRepeats(XAboolean repeat);
+    XAresult SetPlayWindow(XAmillisecond start, XAmillisecond end);
+	
+    XAresult GetNumStreams(XAuint32* numstreams);
+    XAresult GetStreamInfo(XAuint32 streamindex, XAuint32* streamtype);
+    XAresult GetVideoFrameSize(XAuint32* height, XAuint32* width, XAuint32* frameRate);
+    XAresult SetActiveState(XAuint32 streamindex, XAboolean active);
+	
+    XAresult SetVolume(XAuint32 volume);
+    XAresult GetVolume(XAuint32* volume);
+    XAresult GetMaxVolume(XAuint32* maxvolume);
 public:
 
-		//MMdaAudioPlayerCallback
-		void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
-		void MapcPlayComplete(TInt aError);
-		
-    // from MMdaObjectStateChangeObserver
-    void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
-		
-    
-private:
+    // MMdaObjectStateChangeObserver
+    void MoscoStateChangeEvent(
+            CBase* aObject,
+            TInt aPreviousState,
+            TInt aCurrentState,
+            TInt aErrorcCode);
 
-		// From MRebufferCallback
-		void MvloLoadingStarted();
-		void MvloLoadingComplete();		
+    //MMdaAudioPlayerCallback
+    void MapcInitComplete(
+            TInt aError,
+            const TTimeIntervalMicroSeconds& aDuration);
+    void MapcPlayComplete(TInt aError);
+    
+    //From MVidePlayerUtilityObserver
+    void MvpuoOpenComplete(TInt aError);
+    void MvpuoPrepareComplete(TInt aError);
+    void MvpuoFrameReady(CFbsBitmap& aFrame, TInt aError);
+    void MvpuoPlayComplete(TInt aError);
+    void MvpuoEvent(const TMMFEvent& aEvent);
 
-private:
-    //audio player methods
-    void AudioOpenFile();
-    void AudioClose();
-    void AudioStop();
-    void AudioPause();
-    
-    //video player methods
+    // From MRebufferCallback
+    void MvloLoadingStarted();
+    void MvloLoadingComplete();     
+
+private:  
+    enum TPlayerState
+    {
+      EPlayerClosed,
+      EPlayerOpened,
+      EPlayerPrepared,
+      EPlayerPaused,
+      EPlayerPlaying,
+    };
     
 private:
     CMMFBackendEngine();
     void ConstructL();
+    void InitAudioPlayerUtilityL();
+    void InitVideoPlayerUtilityL();
+    void InitPlayerTimersL();
     TInt DetermineAPIToUse(char *uri, TFuncInUse aFunc);
-  
-    
-    //RThread                   m_ThreadHandle; 
-    CVideoPlayerUtility2*		  iVideoPlayer;
-		CBase*		                iBaseVideoPlayer;
-		CBase*                    iBaseAudioPlayer; 
-		CBase*                    iBaseAudioRecorder;
-		CMdaAudioPlayerUtility*	  iAudioPlayer;  
-		CMdaAudioRecorderUtility* iAudioRecorder;
-		TFileName					        iFileName;
-		TInt						iAPIBeingUsed;		
-		TPlayerState              iPlayerState;
-		TInt                      iPreviousRecordState;
-		TInt                      iCurrentRecordState;
-		TInt                      iErrorCode;
-		TRecorderState            iRecordState;
-		LocalTimer*               iPositionUpdateTimer;
-		TUint64                   iTimerDelay;
-		void*                     iAdaptContext;
-		XAuint32                  iFileFormat;
-		TInt                      iPauseSupportMP4;
-		CActiveSchedulerWait*     iActiveSchedulerWait;
-#ifdef ENABLE_GRAPHICS_SURFACE_INTEGRATION
+    XAresult DoHandlePlayItfAttributesChanged();
+    void DoPostEvent(XAuint32 event);
+    TInt InitializeURIForMMFUtil(char *uri);
+
+private:
+    CVideoPlayerUtility2*       iVideoPlayer;
+    CBase*		                iBaseVideoPlayer;
+    CMdaAudioPlayerUtility*     iAudioPlayer;  
+    CBase*                      iBaseAudioPlayer; 
+    CMdaAudioRecorderUtility*   iAudioRecorder;
+    CBase*                      iBaseAudioRecorder;
+    TFileName                   iFileName;
+    TInt                        iAPIBeingUsed;		
+    TInt                        iPreviousRecordState;
+    TInt                        iCurrentRecordState;
+    TInt                        iErrorCode;
+    TRecorderState              iRecordState;
+    LocalTimer*                 iPositionUpdateTimer;
+    TUint64                     iTimerDelay;
+    void*                       iAdaptContext;
+    XAuint32                    iFileFormat;
+    TInt                        iPauseSupportMP4;
+    CActiveSchedulerWait*       iActiveSchedulerWait;
+		CAudioInput*              iaudioInputRecord;
+#ifdef USE_LOCAL_WINDOW_RESOURCES
     CMediaClientVideoDisplay* iMediaClientVideoDisplay;
     TRect m_clipRect;
     TRect m_videoExtent;    
     TRect m_cropRegion;
     TVideoAspectRatio m_pixelAspectRatio;
     RWindow m_Window;
-    RWindow* m_pWindow;
     TRect m_cropRect;
     TSurfaceId m_surfaceId;
     TVideoRotation m_rotation;
@@ -188,33 +209,51 @@
     TInt m_horizPos;
     TInt m_vertPos; 
     TInt m_displayId;   
-    TBool m_bWindowReferencePassed;
+    /*TBool m_bWindowReferencePassed;*/
+    RWsSession m_ws;
+#endif /* USE_LOCAL_WINDOW_RESOURCES */
+
+    /* Holds duration of the media clip opend for playback */
+    TTimeIntervalMicroSeconds iMediaDuration;
+    /* Holds the playback position to be used for next play command */
+    TTimeIntervalMicroSeconds iPlaybackHead;
+    /* Holds current XA state of media player object */
+    XAuint32 iMediaPlayerState;
+    /* Owns */
+    CMarkerPositionTimer* iMarkerPositionTimer;
+    CPositionUpdateTimer* iPlayItfPositionUpdateTimer;
+    /* Owns */
     CWsScreenDevice* m_pScr;
-    RWsSession m_ws;
+    /* Holds mmf state of media player object */
+    TPlayerState iMMFPlayerState;
+
+    /* Property set by client */
+    XAuint32 iPlayItfEventFlags;
+    /* Property set by client */
+    xaPlayCallback iPlayItfCBFunction;
+    /* Property set by client */
+    XAmillisecond iMarkerPosition;
+    /* Property set by client */
+    XAmillisecond iPositionUpdatePeriod;
+    /* Property set by client (for file without file:///) */
+    HBufC* iUri; /* owns */
+    TPtr iUriPtr;
+    /* Property set by client */
     RWsSession* m_pWs;
+    /* Property set by client */
+    RWindow* m_pWindow;   
+    };
 
-#endif /*ENABLE_GRAPHICS_SURFACE_INTEGRATION*/    
-    };
 #else  /* __cplusplus */
 
 
 extern int mmf_backend_engine_init(void** engine);
+extern int mmf_backend_engine_deinit(void* engine);
 
 extern int mmf_set_recorder_uri(void* context, char* uri, XAuint32 format);
 
-extern void mmf_set_player_uri(void* context, char* uri, XAuint32 format);
-
-extern void mmf_pause_playback(void* context);
-
-extern void mmf_resume_playback(void* context);
-
-extern void mmf_set_window_handle(void* context, void* display_infos);
-
-extern void mmf_stop_playback(void* context);
 
 extern void mmf_close(void* context);
-    
-extern void mmf_setup_native_display(void* context, void* display_info);
 
 extern int mmf_set_adapt_context(void* context, void* adaptcontext);
 
@@ -226,14 +265,47 @@
 
 extern int mmf_set_record_position_update_period(void* context, XAmillisecond msec);
 
-extern int mmf_get_encoder_id(void* context, XAuint32* encoderId);
-extern int mmf_get_destination_channels(void* context, XAuint32* channelsIn);
-extern int mmf_get_destination_samplerate(void* context, XAmilliHertz* sampleRate);
-extern int mmf_get_destination_bitrate(void* context, XAuint32* bitRate);
+extern int mmf_get_codec_id(void* context, XAuint32* encoderId);
+extern int mmf_get_channels(void* context, XAuint32* channelsIn);
+extern int mmf_get_samplerate(void* context, XAmilliHertz* sampleRate);
+extern int mmf_get_bitrate(void* context, XAuint32* bitRate);
 extern int mmf_set_destination_channels(void* context, XAuint32* channelsIn);
 extern int mmf_set_destination_samplerate(void* context, XAmilliHertz* sampleRate);
 extern int mmf_set_destination_bitrate(void* context, XAuint32* bitRate);
 
+extern XAresult mmf_set_play_adapt_context(void * context, void * adaptcontext);
+extern XAresult mmf_set_player_uri(void * context, char * uri, XAuint32 format);
+/*extern XAresult mmf_set_window_handle(void * context, void * display_infos);*/
+extern XAresult mmf_setup_native_display(void * context, void * display_info);
+
+/*Functions for XAPlayItf*/
+extern XAresult mmf_playitf_resume_playback(void * context);
+extern XAresult mmf_playitf_pause_playback(void * context);
+extern XAresult mmf_playitf_stop_playback(void * context);
+extern XAresult mmf_playitf_get_play_state(void * context, XAuint32 * pState);
+extern XAresult mmf_playitf_get_duration(void * context, XAmillisecond * pMsec);
+extern XAresult mmf_playitf_get_position(void * context, XAmillisecond * pMsec);
+extern XAresult mmf_playitf_register_callback(void * context, xaPlayCallback callback);
+extern XAresult mmf_playitf_set_callback_events_mask(void * context, XAuint32 eventflags);
+extern XAresult mmf_playitf_set_marker_position(void * context, XAmillisecond mSec);
+extern XAresult mmf_playitf_clear_marker_position(void * context);
+extern XAresult mmf_playitf_set_position_update_period(void * context, XAmillisecond mSec);
+
+extern XAresult mmf_seekitf_set_position(void * context, XAmillisecond mSec);
+extern XAresult mmf_seekitf_set_playwindow(void * context, XAmillisecond start, XAmillisecond end);
+extern XAresult mmf_seekitf_set_repeats(void * context, XAboolean repeat);
+
+extern XAresult mmf_streaminformationitf_get_numstreams(void * context, XAuint32* numstreams);
+extern XAresult mmf_streaminformationitf_get_streaminfo(void * context, XAuint32 streamindex,
+                                                                XAuint32* streamtype);
+extern XAresult mmf_streaminformationitf_get_videoframesize(void * context, XAuint32* height,
+                                                            XAuint32* width, XAuint32* frameRate);
+extern XAresult mmf_streaminformationitf_set_activestream(void * context, XAuint32 streamindex,
+                                                                XAboolean active);
+
+extern XAresult mmf_volumeitf_set_volume(void * context, XAuint32 volume);
+extern XAresult mmf_volumeitf_get_volume(void * context, XAuint32* volume);
+extern XAresult mmf_volumeitf_get_maxvolume(void * context, XAuint32* volume);
 #endif /* __cplusplus */
 
 #endif /* XA_CMMFBackendEngine_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,239 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Handles marker timer implementation 
+*
+*/
+
+#include "markerpositiontimer.h"
+#include <mdaaudiosampleplayer.h>
+#include <videoplayer2.h>
+#include <e32math.h>
+
+extern "C" {
+#include "xarecorditfadaptationmmf.h"
+}
+
+#define RET_ERR_IF_ERR(s) if (s!=KErrNone) return s;
+#define RET_IF_ERR(s) if (s!=KErrNone) return;
+
+CMarkerPositionTimer::CMarkerPositionTimer(
+        CMdaAudioPlayerUtility* aAudioPlayer,
+        CVideoPlayerUtility2* aVideoPlayer)
+:CActive(CActive::EPriorityStandard),
+ iAudioPlayer(aAudioPlayer),
+ iVideoPlayer(aVideoPlayer)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+CMarkerPositionTimer::~CMarkerPositionTimer()
+    {
+    Cancel();
+    iTimer.Close();
+    }
+
+CMarkerPositionTimer* CMarkerPositionTimer::NewL(
+        CMdaAudioPlayerUtility* aAudioPlayer,
+        CVideoPlayerUtility2* aVideoPlayer)
+    {
+    CMarkerPositionTimer* self = new (ELeave)CMarkerPositionTimer(aAudioPlayer, aVideoPlayer);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CMarkerPositionTimer::ConstructL()
+    {
+    User::LeaveIfError(iTimer.CreateLocal());    
+    }
+
+void CMarkerPositionTimer::SetContext(TAny* aCtx)
+    {
+    iCtx = aCtx;    
+    }
+
+void CMarkerPositionTimer::SetMarkerPosition(XAmillisecond aMarkerPos)
+    {
+    iMarkerPosition = aMarkerPos;
+    }
+
+void CMarkerPositionTimer::SetCallbackEventMask(XAuint32 aMask)
+    {
+    iCallbackEventMask = aMask;
+    }
+
+void CMarkerPositionTimer::RegisterCallback(xaPlayCallback aCallback)
+    {
+    iCallback = aCallback;
+    }
+
+void CMarkerPositionTimer::UseAudioPlayer()
+    {
+    iPlayerToUse = static_cast<CBase*>(iAudioPlayer);
+    }
+void CMarkerPositionTimer::UseVideoPlayer()
+    {
+    iPlayerToUse = static_cast<CBase*>(iVideoPlayer);
+    }
+
+void CMarkerPositionTimer::ResetPlayer()
+    {
+    iPlayerToUse = NULL;
+    }
+
+TInt CMarkerPositionTimer::Start()
+    {
+    TInt retVal(KErrNone);
+    if (IsActive())
+        {
+        Cancel();
+        }
+    if ((iMarkerPosition != XA_TIME_UNKNOWN) &&
+        (iCallbackEventMask & XA_PLAYEVENT_HEADATMARKER) &&
+        iCallback &&
+        iPlayerToUse)
+        {
+        TTimeIntervalMicroSeconds32 delay;
+        /* Convert milli to micro */
+        TTimeIntervalMicroSeconds markerPos(iMarkerPosition * 1000);
+        TReal res;
+        TReal p;
+        TReal q(markerPos.Int64());
+
+        iSyncToPlayHead = ETrue;
+
+        retVal = GetCurrentPlayPosition(iSyncToPlayHeadStartPos);
+        RET_ERR_IF_ERR(retVal);
+
+        p = iSyncToPlayHeadStartPos.Int64();
+        /* Adjust delay based on current play position
+         * user may call this in the middle of playback */
+        retVal = Math::Mod(res, p, q);
+        RET_ERR_IF_ERR(retVal);
+
+        /* Let the timer go off early and then re-adjust 
+         * the remaining time based on then current position */
+        delay = (markerPos.Int64() - res) / 2;
+#ifdef MARKERPOSITIONTIMERLOG
+        // Keep this block for debugging purposes
+        RDebug::Print(_L("CMarkerPositionTimer::RunL:SyncPlayHead[%u]Delay Reset[%u]microSec"),
+                iSyncToPlayHeadStartPos.Int64(),
+                delay.Int());
+#endif /* MARKERPOSITIONTIMERLOG */
+        if ( delay >= TTimeIntervalMicroSeconds32(0))
+            {
+            iStatus = KRequestPending;
+            iTimer.After(iStatus, delay);
+            SetActive();
+            }
+        }
+    return retVal;
+    }
+
+void CMarkerPositionTimer::Stop()
+    {
+    Cancel();
+    }
+
+void CMarkerPositionTimer::RunL()
+    {
+    TInt retVal(KErrNone);
+    /* Make sure some of the attributes are not unset */
+    if ((iStatus == KErrNone) &&
+            iCtx &&
+            (iMarkerPosition != XA_TIME_UNKNOWN) &&
+            (iCallbackEventMask & XA_PLAYEVENT_HEADATMARKER) &&
+            iCallback &&
+            iPlayerToUse)
+        {
+        TTimeIntervalMicroSeconds curPlayPos;
+        if (iSyncToPlayHead)
+            {
+            retVal = GetCurrentPlayPosition(curPlayPos);
+            RET_IF_ERR(retVal);
+
+            /* If the play head hasn't moved, re-start all over again */
+            if (curPlayPos == iSyncToPlayHeadStartPos)
+                {
+#ifdef MARKERPOSITIONTIMERLOG
+            RDebug::Print(_L("CMarkerPositionTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]microSec. Restart"),
+                    iSyncToPlayHeadStartPos.Int64(),
+                    curPlayPos.Int64());
+#endif /* MARKERPOSITIONTIMERLOG */
+                Start();
+                return;
+                }
+            /* Play head has moved. calculate remaining time and set the timer */
+            /* Convert milli to micro */
+            TTimeIntervalMicroSeconds markerPos(iMarkerPosition * 1000);
+            TReal res;
+            TReal p;
+            TReal q(markerPos.Int64());
+
+            p = curPlayPos.Int64();
+            iSyncToPlayHead = EFalse;
+
+            retVal = Math::Mod(res, p, q);
+            RET_IF_ERR(retVal);
+
+            TTimeIntervalMicroSeconds32 delay = (markerPos.Int64() - res);
+#ifdef MARKERPOSITIONTIMERLOG
+            RDebug::Print(_L("CMarkerPositionTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]Delay Reset[%u]microSec"),
+                    iSyncToPlayHeadStartPos.Int64(),
+                    curPlayPos.Int64(),
+                    delay.Int());
+#endif /* MARKERPOSITIONTIMERLOG */
+            if ( delay >= TTimeIntervalMicroSeconds32(0))
+                {
+                iStatus = KRequestPending;
+                iTimer.After(iStatus, delay);
+                SetActive();
+                }
+            return;
+            } /* of if (iSyncToPlayHead) */
+
+#ifdef MARKERPOSITIONTIMERLOG
+        retVal = GetCurrentPlayPosition(curPlayPos);
+        RDebug::Print(_L("CMarkerPositionTimer::RunL:CurPlayPos[%u]microSec. Posting XA_PLAYEVENT_HEADATMARKER."), curPlayPos.Int64());
+#endif /* MARKERPOSITIONTIMERLOG */
+        XAAdaptEvent xaevent = {XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADATMARKER, 0, 0 };
+        XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iCtx, &xaevent );
+        }
+    }
+
+void CMarkerPositionTimer::DoCancel()
+    {
+    iTimer.Cancel();
+    }
+
+TInt CMarkerPositionTimer::RunError(TInt /*aError*/)
+    {
+    return KErrNone;
+    }
+
+TInt CMarkerPositionTimer::GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos)
+    {
+    TTimeIntervalMicroSeconds pos;
+    TInt err(KErrNone);
+    if (iPlayerToUse == iAudioPlayer)
+        {
+        iAudioPlayer->GetPosition(aPos);
+        }
+    else if (iPlayerToUse == iVideoPlayer)
+        {
+        TRAP(err, aPos = iVideoPlayer->PositionL());
+        }
+    return err;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Handles marker timer implementation 
+*
+*/
+
+#ifndef CMARKERPOSITIONTIMER_H
+#define CMARKERPOSITIONTIMER_H
+
+#include <e32base.h>
+#include "openmaxalwrapper.h"
+
+class CMdaAudioPlayerUtility;
+class CVideoPlayerUtility2;
+
+NONSHARABLE_CLASS(CMarkerPositionTimer) : public CActive
+    {
+public:
+    // Construct/destruct
+    static CMarkerPositionTimer* NewL(CMdaAudioPlayerUtility* aAudioPlayer,
+                            CVideoPlayerUtility2* aVideoPlayer);
+    ~CMarkerPositionTimer();
+
+public:
+    void SetContext(TAny* aCtx);
+    void SetMarkerPosition(XAmillisecond aMarkerPos);
+    void SetCallbackEventMask(XAuint32 aMask);
+    void RegisterCallback(xaPlayCallback aCallback);
+    void UseAudioPlayer();
+    void UseVideoPlayer();
+    void ResetPlayer();
+    TInt Start();
+    void Stop();
+
+protected:
+    // From CActive
+    void RunL();
+    void DoCancel();
+    TInt RunError(TInt aError);
+
+private:
+    CMarkerPositionTimer(CMdaAudioPlayerUtility* aAudioPlayer,
+            CVideoPlayerUtility2* aVideoPlayer);
+    void ConstructL();
+    TInt GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos);
+
+private:
+    RTimer iTimer;      // Has
+    TAny* iCtx;
+    CMdaAudioPlayerUtility* iAudioPlayer;
+    CVideoPlayerUtility2* iVideoPlayer;
+    CBase* iPlayerToUse;
+    XAmillisecond iMarkerPosition;
+    XAuint32 iCallbackEventMask;
+    xaPlayCallback iCallback;
+    TBool iSyncToPlayHead;
+    TTimeIntervalMicroSeconds iSyncToPlayHeadStartPos;
+    };
+
+#endif /* CMARKERPOSITIONTIMER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,243 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Handles new position timer implementation 
+*
+*/
+
+#include "positionupdatetimer.h"
+#include <mdaaudiosampleplayer.h>
+#include <videoplayer2.h>
+#include <e32math.h>
+
+extern "C" {
+#include "xarecorditfadaptationmmf.h"
+}
+
+#define RET_ERR_IF_ERR(s) if (s!=KErrNone) return s;
+#define RET_IF_ERR(s) if (s!=KErrNone) return;
+
+CPositionUpdateTimer::CPositionUpdateTimer(
+        CMdaAudioPlayerUtility* aAudioPlayer,
+        CVideoPlayerUtility2* aVideoPlayer)
+:CActive(CActive::EPriorityStandard),
+ iAudioPlayer(aAudioPlayer),
+ iVideoPlayer(aVideoPlayer)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+CPositionUpdateTimer::~CPositionUpdateTimer()
+    {
+    Cancel();
+    iTimer.Close();
+    }
+
+CPositionUpdateTimer* CPositionUpdateTimer::NewL(
+        CMdaAudioPlayerUtility* aAudioPlayer,
+        CVideoPlayerUtility2* aVideoPlayer)
+    {
+    CPositionUpdateTimer* self = new (ELeave)CPositionUpdateTimer(aAudioPlayer, aVideoPlayer);
+    CleanupStack::PushL(self);
+    self->CostructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CPositionUpdateTimer::CostructL()
+    {
+    User::LeaveIfError(iTimer.CreateLocal());    
+    }
+
+void CPositionUpdateTimer::SetContext(TAny* aCtx)
+    {
+    iCtx = aCtx;    
+    }
+
+void CPositionUpdateTimer::SetPositionUpdatePeriod(XAmillisecond aPos)
+    {
+    iPositionUpdatePeriod = aPos;
+    iDelay = TTimeIntervalMicroSeconds32(aPos*1000);
+    }
+
+void CPositionUpdateTimer::SetCallbackEventMask(XAuint32 aMask)
+    {
+    iCallbackEventMask = aMask;
+    }
+
+void CPositionUpdateTimer::RegisterCallback(xaPlayCallback aCallback)
+    {
+    iCallback = aCallback;
+    }
+
+void CPositionUpdateTimer::UseAudioPlayer()
+    {
+    iPlayerToUse = static_cast<CBase*>(iAudioPlayer);
+    }
+void CPositionUpdateTimer::UseVideoPlayer()
+    {
+    iPlayerToUse = static_cast<CBase*>(iVideoPlayer);
+    }
+
+void CPositionUpdateTimer::ResetPlayer()
+    {
+    iPlayerToUse = NULL;
+    }
+
+TInt CPositionUpdateTimer::Start()
+    {
+    TInt retVal(KErrNone);
+    if (IsActive())
+        {
+        Cancel();
+        }
+    if ((iCallbackEventMask & XA_PLAYEVENT_HEADATNEWPOS) &&
+        iCallback &&
+        iPlayerToUse)
+        {
+        TTimeIntervalMicroSeconds curPlayPos;
+        /* Convert milli to micro */
+        TTimeIntervalMicroSeconds posUpdatePeriod(iPositionUpdatePeriod * 1000);
+        TTimeIntervalMicroSeconds32 delay;
+        /* Convert milli to micro */
+        TReal res;
+        TReal p;
+        TReal q(posUpdatePeriod.Int64());
+
+        iSyncToPlayHead = ETrue;
+
+        retVal = GetCurrentPlayPosition(iSyncToPlayHeadStartPos);
+        RET_ERR_IF_ERR(retVal);
+
+        p = iSyncToPlayHeadStartPos.Int64();
+        /* Adjust delay based on current play position
+         * user may call this in the middle of playback */
+        retVal = Math::Mod(res, p, q);
+        RET_ERR_IF_ERR(retVal);
+
+        /* Let the timer go off early and then re-adjust 
+         * the remaining time based on then current position */
+        delay = (posUpdatePeriod.Int64() - res) / 2;
+#ifdef POSITIONUPDATETIMERLOG
+        // Keep this block for debugging purposes
+        RDebug::Print(_L("CPositionUpdateTimer::RunL:SyncPlayHead[%u]Delay Reset[%u]microSec"),
+                iSyncToPlayHeadStartPos.Int64(),
+                delay.Int());
+#endif /* POSITIONUPDATETIMERLOG */
+        if ( delay >= TTimeIntervalMicroSeconds32(0))
+            {
+            iStatus = KRequestPending;
+            iTimer.After(iStatus, delay);
+            SetActive();
+            }
+        }
+    return retVal;
+    }
+
+void CPositionUpdateTimer::Stop()
+    {
+    Cancel();
+    }
+
+void CPositionUpdateTimer::RunL()
+    {
+    TInt retVal(KErrNone);
+    /* Make sure some of the attributes are not unset */
+    if ((iStatus == KErrNone) &&
+            iCtx &&
+            (iCallbackEventMask & XA_PLAYEVENT_HEADATNEWPOS) &&
+            iCallback &&
+            iPlayerToUse)
+        {
+        TTimeIntervalMicroSeconds curPlayPos;
+        if (iSyncToPlayHead)
+            {
+            retVal = GetCurrentPlayPosition(curPlayPos);
+            RET_IF_ERR(retVal);
+
+            /* If the play head hasn't moved, re-start all over again */
+            if (curPlayPos == iSyncToPlayHeadStartPos)
+                {
+#ifdef POSITIONUPDATETIMERLOG
+            RDebug::Print(_L("CPositionUpdateTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]microSec. Restart"),
+                    iSyncToPlayHeadStartPos.Int64(),
+                    curPlayPos.Int64());
+#endif /* POSITIONUPDATETIMERLOG */
+                Start();
+                return;
+                }
+            /* Play head has moved. calculate remaining time and set the timer */
+            /* Convert milli to micro */
+            TTimeIntervalMicroSeconds posUpdatePeriod(iPositionUpdatePeriod * 1000);
+            TReal res;
+            TReal p;
+            TReal q(posUpdatePeriod.Int64());
+
+            p = curPlayPos.Int64();
+            iSyncToPlayHead = EFalse;
+
+            retVal = Math::Mod(res, p, q);
+            RET_IF_ERR(retVal);
+
+            TTimeIntervalMicroSeconds32 delay = (posUpdatePeriod.Int64() - res);
+#ifdef POSITIONUPDATETIMERLOG
+            RDebug::Print(_L("CPositionUpdateTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]Delay Reset[%u]microSec"),
+                    iSyncToPlayHeadStartPos.Int64(),
+                    curPlayPos.Int64(),
+                    delay.Int());
+#endif /* POSITIONUPDATETIMERLOG */
+            if ( delay >= TTimeIntervalMicroSeconds32(0))
+                {
+                iStatus = KRequestPending;
+                iTimer.After(iStatus, delay);
+                SetActive();
+                }
+            return;
+            } /* of if (iSyncToPlayHead) */
+
+#ifdef POSITIONUPDATETIMERLOG
+        retVal = GetCurrentPlayPosition(curPlayPos);
+        RDebug::Print(_L("CPositionUpdateTimer::RunL:CurPlayPos[%u]microSec. Posting XA_PLAYEVENT_HEADATNEWPOS."), curPlayPos.Int64());
+#endif /* POSITIONUPDATETIMERLOG */
+        XAAdaptEvent xaevent = {XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADATNEWPOS, 0, 0 };
+        XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iCtx, &xaevent );
+        iStatus = KRequestPending;
+        iTimer.After(iStatus, iDelay);
+        SetActive();
+        }
+    }
+
+void CPositionUpdateTimer::DoCancel()
+    {
+    iTimer.Cancel();
+    }
+
+TInt CPositionUpdateTimer::RunError(TInt /*aError*/)
+    {
+    return KErrNone;
+    }
+
+TInt CPositionUpdateTimer::GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos)
+    {
+    TTimeIntervalMicroSeconds pos;
+    TInt err(KErrNone);
+    if (iPlayerToUse == iAudioPlayer)
+        {
+        iAudioPlayer->GetPosition(aPos);
+        }
+    else if (iPlayerToUse == iVideoPlayer)
+        {
+        TRAP(err, aPos = iVideoPlayer->PositionL());
+        }
+    return err;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Handles marker timer implementation 
+*
+*/
+
+#ifndef CPOSITIONUPDATETIMER_H
+#define CPOSITIONUPDATETIMER_H
+
+#include <e32base.h>
+#include "openmaxalwrapper.h"
+
+class CMdaAudioPlayerUtility;
+class CVideoPlayerUtility2;
+
+NONSHARABLE_CLASS(CPositionUpdateTimer) : public CActive
+    {
+public:
+    // Construct/destruct
+    static CPositionUpdateTimer* NewL(CMdaAudioPlayerUtility* aAudioPlayer,
+                            CVideoPlayerUtility2* aVideoPlayer);
+    ~CPositionUpdateTimer();
+
+public:
+    void SetContext(TAny* aCtx);
+    void SetPositionUpdatePeriod(XAmillisecond aPos);
+    void SetCallbackEventMask(XAuint32 aMask);
+    void RegisterCallback(xaPlayCallback aCallback);
+    void UseAudioPlayer();
+    void UseVideoPlayer();
+    void ResetPlayer();
+    TInt Start();
+    void Stop();
+
+protected:
+    // From CActive
+    void RunL();
+    void DoCancel();
+    TInt RunError(TInt aError);
+
+private:
+    CPositionUpdateTimer(CMdaAudioPlayerUtility* aAudioPlayer,
+            CVideoPlayerUtility2* aVideoPlayer);
+    void CostructL();
+    TInt GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos);
+
+private:
+    RTimer iTimer;      // Has
+    TAny* iCtx;
+    CMdaAudioPlayerUtility* iAudioPlayer;
+    CVideoPlayerUtility2* iVideoPlayer;
+    CBase* iPlayerToUse;
+    XAmillisecond iPositionUpdatePeriod;
+    XAuint32 iCallbackEventMask;
+    xaPlayCallback iCallback;
+    TTimeIntervalMicroSeconds32 iDelay;
+	TBool iSyncToPlayHead;
+	TTimeIntervalMicroSeconds iSyncToPlayHeadStartPos;
+    };
+
+#endif /* CPOSITIONUPDATETIMER_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationcontextbasemmf.c	Mon May 03 12:59:52 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <assert.h>
-#include <string.h>
-#include "xaadaptationcontextbasemmf.h"
-#include "xaadaptationmmf.h"
-#include "xaobjectitf.h"
-#include "xamediaplayeradaptctxmmf.h"
-
-/*
- * XAAdaptationBaseCtx* XAAdaptationBase_Create()
- * 1st phase initialization function for Adaptation Base context structure.
- * Reserves memory for base context and initializes GStreamer FW.
- */
-XAresult XAAdaptationBaseMMF_Init( XAAdaptationBaseMMFCtx* pSelf, XAuint32 ctxId )
-{
-    DEBUG_API("->XAAdaptationBase_Init");
-
-    if ( pSelf )
-    {
-    pSelf->evtHdlrs = g_array_new (FALSE, FALSE, sizeof (XAAdaptEvtHdlrMMF));
-    pSelf->ctxId = ctxId;
-    }
-    else
-    {
-        DEBUG_ERR("Invalid Adaptation Base Context.")
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    DEBUG_API("<-XAAdaptationBase_Init");
-    return XA_RESULT_SUCCESS;
-}
-
-/*
- * XAresult XAAdaptationBase_PostInit()
- * 2nd phase initialization for Adaptation Base.
- */
-XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationBaseMMFCtx* ctx )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAAdaptationBase_PostInit");
-
-   
-
-    DEBUG_API("<-XAAdaptationBase_PostInit");
-    return ret;
-}
-
-/*
- * void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
- * Frees all Base context variables .
- */
-void XAAdaptationBaseMMF_Free( XAAdaptationBaseMMFCtx* ctx )
-{
-    g_array_free(ctx->evtHdlrs, TRUE);
-    DEBUG_API("<-XAAdaptationBase_Free");
-}
-
-/*
- * XAresult XAAdaptationBase_AddEventHandler
- * Adds event handler for certain event types.
- */
-XAresult XAAdaptationBaseMMF_AddEventHandler( XAAdaptationBaseMMFCtx* ctx, xaAdaptEventHandlerMMF evtHandler,
-                                    XAuint32 evtTypes, void *pHandlerCtx )
-{
-    XAuint32 i;
-    XAAdaptEvtHdlrMMF tmp;
-    DEBUG_API("->XAAdaptationBase_AddEventHandler");
-    if(!ctx)
-    {
-        DEBUG_ERR("no context");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    for(i=0; i<ctx->evtHdlrs->len; i++)
-    {
-        if( (g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlrMMF, i)).handlerfunc == evtHandler )
-        {
-            return XA_RESULT_PARAMETER_INVALID;
-        }
-    }
-    tmp.handlerfunc = evtHandler;
-    tmp.handlercontext = pHandlerCtx;
-    tmp.eventtypes = evtTypes;
-    g_array_append_val(ctx->evtHdlrs, tmp);
-    DEBUG_API("<-XAAdaptationBase_AddEventHandler");
-    return XA_RESULT_SUCCESS;
-}
-
-/*
- * XAresult XAAdaptationBase_RemoveEventHandler
- * Removes event handler for certain event types.
- */
-XAresult XAAdaptationBaseMMF_RemoveEventHandler( XAAdaptationBaseMMFCtx* ctx, xaAdaptEventHandlerMMF evtHandler)
-{
-    XAuint32 i;
-    DEBUG_API("->XAAdaptationBase_RemoveEventHandler");
-    if(!ctx)
-    {
-        DEBUG_ERR("no context");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    for(i=0; i<ctx->evtHdlrs->len; i++)
-    {
-        if( (g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlrMMF, i)).handlerfunc == evtHandler )
-        {
-            g_array_remove_index(ctx->evtHdlrs, i);
-            return XA_RESULT_SUCCESS;
-        }
-    }
-    DEBUG_API("<-XAAdaptationBase_RemoveEventHandler");
-    /*did not find, return error*/
-    return XA_RESULT_PARAMETER_INVALID;
-}
-
-void XAAdaptationBaseMMF_SendAdaptEvents(XAAdaptationBaseMMFCtx* ctx, XAAdaptEventMMF* event)
-{
-    XAuint32 i;
-    XAAdaptEvtHdlrMMF* tmp;
-    for(i=0; i<ctx->evtHdlrs->len; i++)
-    {
-        tmp = &g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlrMMF, i);
-        if( tmp->eventtypes & event->eventtype )
-        {
-            (tmp->handlerfunc)(tmp->handlercontext, event);
-        }
-    }
-}
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationcontextbasemmf.h	Mon May 03 12:59:52 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef XAADAPTATIONCONTEXTBASEMMF_H
-#define XAADAPTATIONCONTEXTBASEMMF_H
-
-#include <stdlib.h>
-#include "xaglobals.h"
-#include "openmaxalwrapper.h"
-//#include "OpenMAXAL_ContentPipe.h"
-#include "xaplatform.h"
-
-
-/* ENUMERATIONS */
-typedef enum {
-    XAMediaPlayerAdaptationMMF = 0,
-    XAMediaRecorderAdaptationMMF,
-    XARadioAdaptationMMF,
-    XACameraAdaptationMMF,
-    XAOutputMixAdaptationMMF,
-    XAVibraAdaptationMMF,
-    XALedArrayAdaptationMMF,
-    XAMDAdaptationMMF,
-    XAEngineAdaptationMMF
-}AdaptationContextMMFIDS;
-
-/* Adaptation event structure */
-typedef struct XAAdaptEventMMF_
-{
-    XAAdaptEventTypes  eventtype; /* what kind of event, e.g. playitf event  */
-    XAuint32            eventid;   /* eventtype-specific event, e.g. XA_PLAYEVENT macro */
-    XAuint32           datasize;  /* event data size */
-    void*              data;      /* event data if needed */
-} XAAdaptEventMMF;
-
-/* Adaptation event callback */
-typedef void (*xaAdaptEventHandlerMMF) ( void *pHandlerCtx, XAAdaptEventMMF* event );
-
-/* Forward declaration of adaptation basecontext */
-typedef struct XAAdaptationBaseMMFCtx_ XAAdaptationBaseMMFCtx;
-
-/* FUNCTIONS */
-XAresult XAAdaptationBaseMMF_Init( XAAdaptationBaseMMFCtx* pSelf, XAuint32 ctxId );
-XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationBaseMMFCtx* ctx );
-XAresult XAAdaptationBaseMMF_AddEventHandler( XAAdaptationBaseMMFCtx* ctx, xaAdaptEventHandlerMMF evtHandler,
-                                    XAuint32 evtTypes,void *pHandlerCtx );
-XAresult XAAdaptationBaseMMF_RemoveEventHandler( XAAdaptationBaseMMFCtx* ctx, xaAdaptEventHandlerMMF evtHandler );
-void XAAdaptationBaseMMF_Free( XAAdaptationBaseMMFCtx* ctx );
-//XAresult XAAdaptationBase_SetCPConfiguration(XAAdaptationBaseCtx* ctx, XAConfigExtensionCpKey configValue);
-
-#endif /*XAADAPTATIONCONTEXTBASEMMF_H*/
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <assert.h>
+#include <string.h>
+#include "xaadaptationmmf.h"
+#include "xaadaptationmmf.h"
+#include "xaobjectitf.h"
+#include "xamediaplayeradaptctxmmf.h"
+
+/*
+ * XAAdaptationBaseCtx* XAAdaptationBase_Create()
+ * 1st phase initialization function for Adaptation Base context structure.
+ * Reserves memory for base context and initializes GStreamer FW.
+ */
+XAresult XAAdaptationBaseMMF_Init( XAAdaptationMMFCtx* pSelf, XAuint32 ctxId )
+{
+    DEBUG_API("->XAAdaptationBase_Init");
+
+    if ( pSelf )
+    {
+    if(XAAdaptationBase_Init(&(pSelf->baseObj), ctxId) != XA_RESULT_SUCCESS)
+        {
+        DEBUG_ERR("Failed to init base context!!!");
+        free(pSelf);
+        pSelf = NULL;
+        }
+    }
+    else
+    {
+        DEBUG_ERR("Invalid Adaptation Base Context.")
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    DEBUG_API("<-XAAdaptationBase_Init");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XAAdaptationBase_PostInit()
+ * 2nd phase initialization for Adaptation Base.
+ */
+XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationMMFCtx* ctx )
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    DEBUG_API("->XAAdaptationBase_PostInit");
+
+   XAAdaptationBase_PostInit(&ctx->baseObj);
+
+    DEBUG_API("<-XAAdaptationBase_PostInit");
+    return ret;
+}
+
+/*
+ * void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
+ * Frees all Base context variables .
+ */
+void XAAdaptationBaseMMF_Free( XAAdaptationMMFCtx* ctx )
+{
+    DEBUG_API("->XAAdaptationBaseMMF_Free");
+    XAAdaptationBase_Free(&ctx->baseObj);
+    DEBUG_API("<-XAAdaptationBaseMMF_Free");
+}
+
+
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -15,8 +15,8 @@
 *
 */
 
-#ifndef XAADAPTATION_H_
-#define XAADAPTATION_H_
+#ifndef XAADAPTATIONMMF_H_
+#define XAADAPTATIONMMF_H_
 
 #include <pthread.h>
 #include <semaphore.h>
@@ -24,11 +24,10 @@
 #include <string.h>
 #include <unistd.h>
 #include "openmaxalwrapper.h"
-#include "xaadaptationcontextbasemmf.h"
 #include "xaglobals.h"
 //#include "OpenMAXAL_ContentPipe.h"
 #include "xaplatform.h"
-
+#include "xaadptbasectx.h"
 #ifdef XA_IMPL_MEASURE_GST_DELAY
 #include <time.h>
 #endif /* XA_IMPL_MEASURE_GST_DELAY */
@@ -43,25 +42,25 @@
 
 /* TYPEDEFS */
 //typedef gboolean (*GstBusCb)( GstBus *bus, GstMessage *message, gpointer data );
-#define XA_IMPL_SUPPORTED_AUDIO_OUT_NUM 3
-#define XA_IMPL_OMIX_MAX_CONNECTED_MEDIAPLAYERS 10
+
 #define CONTENT_PIPE_BUFFER_SIZE 1000
 #define TEST_VIDEO_WIDTH     640
 #define TEST_VIDEO_HEIGHT    480
 
+/*
 typedef enum
 {
     XA_AUDIO_WAVENC = 0,
     XA_AUDIO_VORBISENC,
     XA_AUDIO_PCM,
-    XA_NUM_OF_AUDIOENCODERS /* Do not move this line */
+    XA_NUM_OF_AUDIOENCODERS  Do not move this line 
 } XAAudioEnc;
 
 typedef enum
 {
     XA_VIDEO_JPEGENC = 0,
     XA_VIDEO_THEORAENC,
-    XA_NUM_OF_VIDEOENCODERS /* Do not move this line */
+    XA_NUM_OF_VIDEOENCODERS  Do not move this line 
 } XAVideoEnc;
 
 typedef enum CP_STATE
@@ -77,31 +76,25 @@
 	CPStateEOS,
 	CPStateError
 }CP_STATE;
+*/
 
-typedef struct XAAdaptEvtHdlrMMF_
-{
-    xaAdaptEventHandlerMMF handlerfunc;    /* function handling the callback */
-    void               *handlercontext; /* context of handler */
-    XAuint32            eventtypes;     /* what kind of events this handles */
-} XAAdaptEvtHdlrMMF;
+/* Forward declaration of adaptation basecontext */
+typedef struct XAAdaptationMMFCtx_ XAAdaptationMMFCtx;
 
 /*
  * Structure that holds all common variables for every
  * mmf-Adaptation context structures.
  */
-typedef struct XAAdaptationBaseMMFCtx_
+typedef struct XAAdaptationMMFCtx_
 {
-    /* Common Variables for all adaptation elements */
-    GArray*         evtHdlrs;    /* array of event handlers */
-    XAuint32        ctxId;
-    XAboolean       placeholder;
+XAAdaptationBaseCtx baseObj;
 
-} XAAdaptationBaseMMFCtx_;
+} XAAdaptationMMFCtx_;
 
 typedef struct XAEngineAdaptationMMFCtx_
 {
     /* Parent*/
-    XAAdaptationBaseMMFCtx_    baseObj;
+    XAAdaptationMMFCtx_    baseObj;
 
 } XAEngineAdaptationMMFCtx_;
 
@@ -111,7 +104,7 @@
 typedef struct XAMediaPlayerAdaptationMMFCtx_
 {
     /* Parent*/
-    XAAdaptationBaseMMFCtx_    baseObj;
+    XAAdaptationMMFCtx_    baseObj;
 
     /* OMX-AL Variables */
     XADataSource            *xaSource, *xaBankSrc;
@@ -124,65 +117,36 @@
     XAboolean               isobjvsink;   /*is video sink another XA object?*/
 
     XAboolean               mute;
+    XAuint32                premutevol;
     XAuint32                imageEffectID;
     XAboolean               isStereoPosition;
     XAmillidegree           curRotation;
     XAuint32                curMirror;
-
     XAint32                 buffering;
 
     /* internals */
     XAboolean               trackpositionenabled;
-
-
     XAboolean               loopingenabled;
-
-    XAboolean		            cameraSinkSynced;
+    XAboolean		        cameraSinkSynced;
     void*                   mmfContext;
-
+	void* 					mmfMetadataContext;
+/*
+    XAuint32                playerState;
+*/
 
 } XAMediaPlayerAdaptationMMFCtx_;
 
-typedef struct XAMediaRecorderAdaptationMMFCtx_
+
+typedef struct XAMetadataAdaptationMMFCtx_
 {
     /* Parent*/
-    XAAdaptationBaseMMFCtx_ baseObj;
+    XAAdaptationMMFCtx_    baseObj;
 
     /* OMX-AL Variables */
-    XADataSource            *xaAudioSource, *xaVideoSource;
-    XADataSink              *xaSink;
-    XAuint8                 recModes;
-
-    /* GST elements */
-    XAboolean               isobjsink;   /*is sink another XA object?*/
-    XAboolean               isobjasrc;    /*is audio source another XA object?*/
-    XAboolean               isobjvsrc;    /*is video source another XA object?*/
-    XAboolean               encodingchanged;
+    XADataSource            *xaSource;
 
-    XAboolean               mute;
-    XAuint32                imageEffectID;
-    XAboolean               isStereoPosition;
-    XAuint32                xaRecordState;
-    XAmillidegree           curRotation;
-    XAuint32                curMirror;
-    XAboolean               isRecord;
-
-    /* internals */
-    XAboolean               trackpositionenabled;
-    gboolean                runpositiontimer;
-
-    XAImplThreadHandle      recordingEventThr;
-
-    /* Variables for encoders */
-    XAAudioEncoderSettings  audioEncSettings;
-    XAVideoSettings         videoEncSettings;
-    XAImageSettings         imageEncSettings;
-    
     void*                   mmfContext;
-
-
-} XAMediaRecorderAdaptationMMFCtx_;
-
+} XAMetadataAdaptationMMFCtx_;
 
 /* FUNCTIONS */
 /*
@@ -191,31 +155,8 @@
  * not implemented.
  */
 
-
-void XAAdaptationBaseMMF_SendAdaptEvents(XAAdaptationBaseMMFCtx* ctx, XAAdaptEventMMF* event);
-
-//void XAAdaptationBase_PrepareAsyncWait(XAAdaptationBaseCtx* ctx);
-//void XAAdaptationBase_StartAsyncWait(XAAdaptationBaseCtx* ctx);
-//gboolean XAAdaptationBase_CancelAsyncWait(gpointer ctx);
-//void XAAdaptationBase_CompleteAsyncWait(XAAdaptationBaseCtx* ctx);
-
-
-//XAresult XAMediaPlayerAdapt_UpdatePositionCbTimer(XAMediaPlayerAdaptationCtx_* mCtx);
-
-//XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx_* mCtx );
-//XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx, XACapsType encType, XAuint32 encoderId );
+XAresult XAAdaptationBaseMMF_Init( XAAdaptationMMFCtx* pSelf, XAuint32 ctxId );
+XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationMMFCtx* ctx );
+void XAAdaptationBaseMMF_Free( XAAdaptationMMFCtx* ctx );
 
-//XAresult XAMetadataAdapt_TryWriteTags(XAAdaptationBaseCtx* mCtx, GstBin* binToWriteTo);
-//void XAMetadataAdapt_FreeVars(XAMetadataAdaptVars *vars);
-
-//GstElement* XAOutputMixAdapt_GetSink(XAAdaptationBaseCtx* bCtx);
-
-
-//XAresult XAOutputMixAdapt_ConnectObject(XAAdaptationBaseCtx* omCtx, XAAdaptationBaseCtx* bCtx, GstElement* usedMix);
-//XAresult XAOutputMixAdapt_DisconnectObject(XAAdaptationBaseCtx* omCtx, XAAdaptationBaseCtx* bCtx);
-//void* XAAdaptationBase_ContentPipeScrThrFunc( void* arg);
-//void* XAAdaptationBase_ContentPipeSinkThrFunc( void* arg);
-//CPresult XAAdaptationBase_ContentPipeSrcCb(CP_EVENTTYPE eEvent, CPuint iParam);
-//CPresult XAAdaptationBase_ContentPipeSinkCb(CP_EVENTTYPE eEvent, CPuint iParam);
-
-#endif /* XAADAPTATION_H_ */
+#endif /* XAADAPTATIONMMF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "xamediaplayeradaptctxmmf.h"
+#include "xametadataadaptctxmmf.h"
+#include "xadynamicsourceitfadaptationmmf.h"
+#include "xaplayitfadaptationmmf.h"
+#include "cmmfbackendengine.h"
+#include "cmetadatautilityitf.h"
+
+/*
+ * XAresult XADynamicSourceItfAdaptMMF_SetSource(XAAdaptationGstCtx *bCtx, XADataSource *pDataSource)
+ * @param XAAdaptationGstCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value
+ * @param XADataSource *pDataSource - new data source
+ * @return XAresult ret - Success value
+ */
+XAresult XADynamicSourceItfAdaptMMF_SetSource(XAAdaptationMMFCtx *bCtx, XADataSource *pDataSource)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 origstate;
+    DEBUG_API("->XADynamicSourceItfAdaptMMF_SetSource");
+    if( !bCtx || !pDataSource || !pDataSource->pLocator )
+    {
+        DEBUG_ERR("Invalid NULL parameter");
+        ret = XA_RESULT_PARAMETER_INVALID;
+    }
+    else if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+    {
+        XADataLocator_URI* tempUri = (XADataLocator_URI*)(pDataSource->pLocator);
+        XADataFormat_MIME* tempFormat = (XADataFormat_MIME*)(pDataSource->pFormat);
+        XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+        ret = XAPlayItfAdaptMMF_GetPlayState(&bCtx->baseObj, &origstate);
+        
+        ret = XAPlayItfAdaptMMF_SetPlayState(&bCtx->baseObj, XA_PLAYSTATE_STOPPED);
+        
+        mmf_close(mCtx->mmfContext);
+        mCtx->xaSource = pDataSource;
+        ret = mmf_set_player_uri(mCtx->mmfContext, (char *)(tempUri->URI), tempFormat->containerType);
+        if(mCtx->xaVideoSink)
+          {
+            ret = mmf_setup_native_display(mCtx->mmfContext, mCtx->xaVideoSink);
+          }
+        if(ret == XA_RESULT_SUCCESS)
+            {
+			ret = XAPlayItfAdaptMMF_SetPlayState(&bCtx->baseObj, origstate);
+			}
+		else
+			{
+			DEBUG_ERR("Set Play state failed");
+	        ret = XA_RESULT_INTERNAL_ERROR;
+			}
+		if(ret == XA_RESULT_SUCCESS)
+		{
+			if(mCtx->mmfMetadataContext)
+			{
+				ret = mmf_metadata_utility_parse_source(mCtx->mmfMetadataContext, (char *)(tempUri->URI));
+			}
+		}
+    }
+	else if(bCtx->baseObj.ctxId == XAMDAdaptation)
+	{
+		
+        XAMetadataAdaptationMMFCtx* mCtx = (XAMetadataAdaptationMMFCtx*) bCtx;
+		if(mCtx->mmfContext)
+		{
+			mCtx->xaSource = pDataSource;
+			ret = mmf_metadata_utility_parse_source(mCtx->mmfContext, (char *)(( (XADataLocator_URI*)(pDataSource->pLocator))->URI));
+		}
+	}
+    DEBUG_API("<-XADynamicSourceItfAdaptMMF_SetSource");
+    return ret;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XADYNAMICSOURCEITFADAPTATIONMMF_H
+#define XADYNAMICSOURCEITFADAPTATIONMMF_H
+
+#include "xaadaptationmmf.h"
+
+
+/* FUNCTIONS */
+
+XAresult XADynamicSourceItfAdaptMMF_SetSource(XAAdaptationMMFCtx *bCtx, XADataSource *pDataSource);
+
+#endif /* XADYNAMICSOURCEITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaengineadaptctxmmf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaengineadaptctxmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -24,15 +24,15 @@
  * Allocates memory for Engine Adaptation Context and makes 1st phase initialization
  * @returns XAEngineAdaptationCtx* - Pointer to created context
  */
-XAAdaptationBaseMMFCtx* XAEngineAdaptMMF_Create()
+XAAdaptationMMFCtx* XAEngineAdaptMMF_Create()
 {
     XAEngineAdaptationMMFCtx *pSelf = NULL;
     DEBUG_API("->XAEngineAdaptMMF_Create");
 
-    pSelf = calloc(1, sizeof(XAEngineAdaptationMMFCtx));
+    pSelf = (XAEngineAdaptationMMFCtx*)calloc(1, sizeof(XAEngineAdaptationMMFCtx));
     if ( pSelf)
     {
-        if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAEngineAdaptationMMF)
+        if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAEngineAdaptation)
                     != XA_RESULT_SUCCESS )
             {
                 DEBUG_ERR("Failed to init base context!!!");
@@ -46,14 +46,14 @@
     }
 
     DEBUG_API("<-XAEngineAdaptMMF_Create");
-    return (XAAdaptationBaseMMFCtx*)pSelf;
+    return (XAAdaptationMMFCtx*)pSelf;
 }
 
 /*
  * XAresult XAEngineAdaptMMF_PostInit()
  * 2nd phase initialization of engine Adaptation Context
  */
-XAresult XAEngineAdaptMMF_PostInit(XAAdaptationBaseMMFCtx* bCtx)
+XAresult XAEngineAdaptMMF_PostInit(XAAdaptationMMFCtx* bCtx)
 {
     XAresult ret = XA_RESULT_SUCCESS;
 
@@ -66,7 +66,7 @@
  * Destroys Engine Adaptation Context
  * @param ctx - Engine Adaptation context to be destroyed
  */
-void XAEngineAdaptMMF_Destroy(XAAdaptationBaseMMFCtx* bCtx)
+void XAEngineAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx)
 {
 	XAEngineAdaptationMMFCtx* ctx = NULL;
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaengineadaptctxmmf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaengineadaptctxmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,16 +18,16 @@
 #ifndef XAENGINEADAPTCTXMMF_H_
 #define XAENGINEADAPTCTXMMF_H_
 
-#include "xaadaptationcontextbasemmf.h"
-//#include "XAStaticCapsAdaptation.h"
+#include "xaadaptationmmf.h"
+
 
 /* TYPEDEFS */
 
 typedef struct XAEngineAdaptationMMFCtx_ XAEngineAdaptationMMFCtx;
 
 /* FUNCTIONS */
-XAAdaptationBaseMMFCtx* XAEngineAdaptMMF_Create(void);
-XAresult XAEngineAdaptMMF_PostInit(XAAdaptationBaseMMFCtx* bCtx);
-void XAEngineAdaptMMF_Destroy(XAAdaptationBaseMMFCtx* bCtx);
+XAAdaptationMMFCtx* XAEngineAdaptMMF_Create(void);
+XAresult XAEngineAdaptMMF_PostInit(XAAdaptationMMFCtx* bCtx);
+void XAEngineAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx);
 
 #endif /* XAENGINEADAPTCTXMMF_H_ */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -22,6 +22,9 @@
 #include "xaobjectitf.h"
 #include "cmmfbackendengine.h"
 
+#include "cmetadatautilityitf.h"
+
+
 
 /*
  * XAMediaPlayerAdaptationMMFCtx* XAMediaPlayerAdapt_Create()
@@ -32,7 +35,7 @@
  * @param XADataSink *pImageVideoSnk - pointer to OMX-AL image and video sink definition
  * @returns XAMediaPlayerAdaptationMMFCtx* - Pointer to created context, NULL if error occurs.
  */
-XAAdaptationBaseMMFCtx* XAMediaPlayerAdaptMMF_Create(XADataSource *pDataSrc, XADataSource *pBankSrc,
+XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_Create(XADataSource *pDataSrc, XADataSource *pBankSrc,
                                                       XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
                                                       XADataSink *pVibra, XADataSink *pLEDArray)
 {
@@ -44,8 +47,8 @@
     pSelf = calloc(1, sizeof(XAMediaPlayerAdaptationMMFCtx));
     if ( pSelf)
     {
-#ifdef _GSTREAMER_BACKEND_          
-        if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),0)
+          
+        if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAMediaPlayerAdaptation)
             != XA_RESULT_SUCCESS )
         {
             DEBUG_ERR("Failed to init base context!!!");
@@ -53,8 +56,9 @@
             pSelf = NULL;
         }
         else
-#endif            
+            
         {
+            pSelf->baseObj.baseObj.fwtype = FWMgrFWMMF;
             pSelf->xaSource = pDataSrc;
             pSelf->xaBankSrc = pBankSrc;
             pSelf->xaAudioSink = pAudioSnk;
@@ -79,31 +83,41 @@
 		}
     }
     
+    else
+        {
+        DEBUG_ERR("Failed to create XAMediaPlayerAdaptationMMFCtx !!!");
+        return NULL;
+        }
     if(pSelf)
+    {
+	    res = mmf_backend_engine_init(&(pSelf->mmfContext));
+        if(!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS))
         {
-        res = mmf_backend_engine_init(&(pSelf->mmfContext));
-        if(pSelf->mmfContext && res == XA_RESULT_SUCCESS)
-            {
-            XADataLocator_URI*   tempUri;
-            XADataFormat_MIME* tempFormat;
-            tempUri = (XADataLocator_URI*)(pSelf->xaSource->pLocator);
-            tempFormat = (XADataFormat_MIME*)(pSelf->xaSource->pFormat);
-            mmf_set_player_uri(pSelf->mmfContext, (char *)(tempUri->URI), tempFormat->containerType);       
-            if(pImageVideoSnk)
-              {
-              mmf_setup_native_display(pSelf->mmfContext, pImageVideoSnk);
-              }
-            }
-        else
-            {
-             DEBUG_ERR("Failed to init mmf context!!!");
-             free(pSelf);
-             pSelf = NULL; 
-            }
+            /* TODO Check to make sure there is no undeleted MMF objects here*/
+            DEBUG_ERR("Failed to init mmf context!!!");
+            free(pSelf);
+            pSelf = NULL;
+            return NULL;
         }
+		res = mmf_set_play_adapt_context(pSelf->mmfContext, &(pSelf->baseObj));
+		if(pDataSrc)
+		    {
+             pSelf->mmfMetadataContext = mmf_metadata_utility_init((char *)(( (XADataLocator_URI*)(pDataSrc->pLocator))->URI));
+             if(!pSelf->mmfMetadataContext)
+                {
+                    DEBUG_ERR("Failed to init mmf metadata context!!!");
+                    pSelf->mmfMetadataContext = NULL;			
+                }
+		    }
+		else
+        	{
+        	DEBUG_ERR("Failed to create XAMediaPlayerAdaptationMMFCtx !!!");
+        	return NULL;
+        	}	
+    }
 
     DEBUG_API("<-XAMediaPlayerAdaptMMF_Create");
-    return (XAAdaptationBaseMMFCtx*)pSelf;
+    return (XAAdaptationBaseCtx*)(&pSelf->baseObj.baseObj);
 }
 
 
@@ -114,9 +128,29 @@
  * @param XAMediaPlayerAdaptationMMFCtx* ctx - pointer to Media Player adaptation context
  * @return XAresult - Success value
  */
-XAresult XAMediaPlayerAdaptMMF_PostInit( XAAdaptationBaseMMFCtx* bCtx )
+XAresult XAMediaPlayerAdaptMMF_PostInit( XAAdaptationMMFCtx* bCtx )
 {
-  XAresult ret = XA_RESULT_SUCCESS;
+    XAresult ret = XA_RESULT_PRECONDITIONS_VIOLATED;
+    XAMediaPlayerAdaptationMMFCtx *pSelf = (XAMediaPlayerAdaptationMMFCtx*)bCtx;
+
+    DEBUG_API("->XAMediaPlayerAdaptMMF_PostInit");
+    
+    XAAdaptationBaseMMF_PostInit(bCtx);
+    
+    if(pSelf->mmfContext)
+    {
+        XADataLocator_URI* tempUri = (XADataLocator_URI*)(pSelf->xaSource->pLocator);
+        XADataFormat_MIME* tempFormat = (XADataFormat_MIME*)(pSelf->xaSource->pFormat);
+        ret = XA_RESULT_SUCCESS;
+        if(pSelf->xaVideoSink)
+          {
+          ret = mmf_setup_native_display(pSelf->mmfContext, pSelf->xaVideoSink);
+          }
+        if (ret == XA_RESULT_SUCCESS)
+        {
+            ret = mmf_set_player_uri(pSelf->mmfContext, (char *)(tempUri->URI), tempFormat->containerType);
+        }
+    }
     DEBUG_API("<-XAMediaPlayerAdaptMMF_PostInit");
     return ret;
 }
@@ -126,7 +160,7 @@
  * Destroys Media Player Adaptation Context
  * @param ctx - Media Player Adaptation context to be destroyed
  */
-void XAMediaPlayerAdaptMMF_Destroy( XAAdaptationBaseMMFCtx* bCtx )
+void XAMediaPlayerAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx )
 {
     XAMediaPlayerAdaptationMMFCtx* ctx = NULL;
 
@@ -140,9 +174,18 @@
     }
     ctx = (XAMediaPlayerAdaptationMMFCtx*)bCtx;
 
-#ifdef _GSTREAMER_BACKEND_  
-    XAAdaptationBase_Free( bCtx );
-#endif    
+    if(ctx->mmfContext)
+        {
+        mmf_backend_engine_deinit(ctx->mmfContext);
+        }
+
+	if(ctx->mmfMetadataContext)
+	{
+		mmf_metadata_utility_destroy(ctx->mmfMetadataContext);		
+	}
+	
+    XAAdaptationBaseMMF_Free( bCtx );
+    
     free(ctx);
     ctx = NULL;
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,18 +18,18 @@
 #ifndef XAMEDIAPLAYERADAPTCTXMMF_H
 #define XAMEDIAPLAYERADAPTCTXMMF_H
 
-#include "xaadaptationcontextbasemmf.h"
+#include "xaadaptationmmf.h"
 
 /* TYPEDEFS */
 
 typedef struct XAMediaPlayerAdaptationMMFCtx_ XAMediaPlayerAdaptationMMFCtx;
 
 /* FUNCTIONS */
-XAAdaptationBaseMMFCtx* XAMediaPlayerAdaptMMF_Create( XADataSource *pDataSrc, XADataSource *pBankSrc,
+XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_Create( XADataSource *pDataSrc, XADataSource *pBankSrc,
                                                        XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
                                                        XADataSink *pVibra, XADataSink *pLEDArray);
-XAresult XAMediaPlayerAdaptMMF_PostInit( XAAdaptationBaseMMFCtx* bCtx );
-void XAMediaPlayerAdaptMMF_Destroy( XAAdaptationBaseMMFCtx* bCtx );
+XAresult XAMediaPlayerAdaptMMF_PostInit( XAAdaptationMMFCtx* bCtx );
+void XAMediaPlayerAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx );
 
 //XAresult XAMediaPlayerAdapt_InitContentPipeSrc(XAMediaPlayerAdaptationCtx* ctx);
 #endif /*XAMEDIAPLAYERADAPTCTXMMF_H*/
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,14 +20,13 @@
 #include "xamediarecorderadaptctxmmf.h"
 #include "xaadaptationmmf.h"
 #include "cmmfbackendengine.h"
+#include "xaadptbasectx.h"
 //#include "XAMetadataAdaptation.h"
 //#include "XAStaticCapsAdaptation.h"
 
 
-#define XA_ADAPTID_UNINITED 0
-#ifdef _GSTREAMER_BACKEND_ 
 extern XAboolean cameraRealized;
-#endif
+
 //extern XACameraAdaptationCtx_* cameraCtx;
 
 
@@ -40,7 +39,7 @@
  * @param XADataSink *pDataSnk - pointer to OMX-AL sink
  * @returns XAMediaRecorderAdaptationMMFCtx* - Pointer to created context, NULL if error occurs.
  */
-XAAdaptationBaseMMFCtx* XAMediaRecorderAdaptMMF_Create(XADataSource* pAudioSrc,
+XAAdaptationBaseCtx* XAMediaRecorderAdaptMMF_Create(XADataSource* pAudioSrc,
         XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes)
     {
     XAMediaRecorderAdaptationMMFCtx *pSelf = NULL;
@@ -49,11 +48,11 @@
     XADataLocator_IODevice *ioDevice;
     DEBUG_API("->XAMediaRecorderAdaptMMF_Create");
 
-    pSelf = calloc(1, sizeof(XAMediaRecorderAdaptationMMFCtx));
+    pSelf = (XAMediaRecorderAdaptationMMFCtx*)calloc(1, sizeof(XAMediaRecorderAdaptationMMFCtx));
     if (pSelf)
         {            
         if (XAAdaptationBaseMMF_Init(&(pSelf->baseObj),
-                XAMediaRecorderAdaptationMMF) != XA_RESULT_SUCCESS)
+                XAMediaRecorderAdaptation) != XA_RESULT_SUCCESS)
             {
             DEBUG_ERR("Failed to init base context!!!");
             free(pSelf);
@@ -97,9 +96,9 @@
                 ioDevice
                         = (XADataLocator_IODevice*) (pImageVideoSrc->pLocator);
                 if (ioDevice->deviceType == XA_IODEVICE_CAMERA
-#ifdef _GSTREAMER_BACKEND_ 
+ 
                         && !cameraRealized
-#endif                        
+                        
                         )
                     {
                     DEBUG_ERR("Preconditions violated - Camera object not realized");
@@ -123,7 +122,7 @@
         }
     
     DEBUG_API("<-XAMediaRecorderAdaptMMF_Create");
-    return (XAAdaptationBaseMMFCtx*) pSelf;
+    return (XAAdaptationBaseCtx*) (&pSelf->baseObj.baseObj);
     }
 
 /*
@@ -132,7 +131,7 @@
  * @param XAAdaptationBaseCtx* ctx - pointer to Media Recorder adaptation context
  * @return XAresult - Success value
  */
-XAresult XAMediaRecorderAdaptMMF_PostInit(XAAdaptationBaseMMFCtx* bCtx)
+XAresult XAMediaRecorderAdaptMMF_PostInit(XAAdaptationMMFCtx* bCtx)
     {
 
     XAresult ret = XA_RESULT_SUCCESS;
@@ -153,11 +152,11 @@
     }
 
 /*
- * void XAMediaRecorderAdaptMMF_Destroy( XAAdaptationBaseMMFCtx* bCtx )
+ * void XAMediaRecorderAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx )
  * Destroys Media Recorder Adaptation Context
  * @param ctx - Media Recorder Adaptation context to be destroyed
  */
-void XAMediaRecorderAdaptMMF_Destroy(XAAdaptationBaseMMFCtx* bCtx)
+void XAMediaRecorderAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx)
     {
     XAMediaRecorderAdaptationMMFCtx* ctx = NULL;
     
@@ -172,7 +171,7 @@
 
     if(ctx->mmfContext)
         {
-        mmf_close(ctx->mmfContext);
+        mmf_backend_engine_deinit(ctx->mmfContext);
         }
     XAAdaptationBaseMMF_Free(bCtx);
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,19 +18,58 @@
 #ifndef XAMEDIARECORDERADAPTCTXMMF_H_
 #define XAMEDIARECORDERADAPTCTXMMF_H_
 
-#include "xaadaptationcontextbasemmf.h"
+#include "xaadaptationmmf.h"
 
 
 /* TYPEDEFS */
-#define XA_RECMODE_STREAM 1
-#define XA_RECMODE_STILL 2
-
 typedef struct XAMediaRecorderAdaptationMMFCtx_ XAMediaRecorderAdaptationMMFCtx;
 
+typedef struct XAMediaRecorderAdaptationMMFCtx_
+{
+    /* Parent*/
+    XAAdaptationMMFCtx_ baseObj;
+
+    /* OMX-AL Variables */
+    XADataSource            *xaAudioSource, *xaVideoSource;
+    XADataSink              *xaSink;
+    XAuint8                 recModes;
+
+    /* GST elements */
+    XAboolean               isobjsink;   /*is sink another XA object?*/
+    XAboolean               isobjasrc;    /*is audio source another XA object?*/
+    XAboolean               isobjvsrc;    /*is video source another XA object?*/
+    XAboolean               encodingchanged;
+
+    XAboolean               mute;
+    XAuint32                premutevol;
+    XAuint32                imageEffectID;
+    XAboolean               isStereoPosition;
+    XAuint32                xaRecordState;
+    XAmillidegree           curRotation;
+    XAuint32                curMirror;
+    XAboolean               isRecord;
+
+    /* internals */
+    XAboolean               trackpositionenabled;
+    gboolean                runpositiontimer;
+
+    XAImplThreadHandle      recordingEventThr;
+
+    /* Variables for encoders */
+    XAAudioEncoderSettings  audioEncSettings;
+    XAVideoSettings         videoEncSettings;
+    XAImageSettings         imageEncSettings;
+    
+    void*                   mmfContext;
+
+
+} XAMediaRecorderAdaptationMMFCtx_;
+
 /* FUNCTIONS */
-XAAdaptationBaseMMFCtx* XAMediaRecorderAdaptMMF_Create(  XADataSource* pAudioSrc, XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes );
-XAresult XAMediaRecorderAdaptMMF_PostInit( XAAdaptationBaseMMFCtx* bCtx );
-void XAMediaRecorderAdaptMMF_Destroy( XAAdaptationBaseMMFCtx* bCtx );
+XAAdaptationBaseCtx* XAMediaRecorderAdaptMMF_Create(  XADataSource* pAudioSrc,
+                            XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes );
+XAresult XAMediaRecorderAdaptMMF_PostInit( XAAdaptationMMFCtx* bCtx );
+void XAMediaRecorderAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx );
 
 
 #endif /* XAMEDIARECORDERADAPTCTXMMF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,90 @@
+#include <assert.h>
+#include <stdlib.h>
+#include "xametadataadaptctxmmf.h"
+#include "xaobjectitf.h"
+#include "cmetadatautilityitf.h"
+
+XAAdaptationBaseCtx* XAMetadataAdaptCtxMMF_Create(XADataSource * pDataSrc)
+{
+
+    XAMetadataAdaptationMMFCtx *pSelf = NULL;
+    DEBUG_API("->XAMetadataAdaptCtxMMF_Create");
+    
+    pSelf = calloc(1, sizeof(XAMetadataAdaptationMMFCtx));
+    if ( pSelf)
+    {
+          
+        if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAMDAdaptation)
+            != XA_RESULT_SUCCESS )
+        {
+            DEBUG_ERR("Failed to init base context!!!");
+            free(pSelf);
+            pSelf = NULL;
+        }
+        else
+            
+        {
+            pSelf->baseObj.baseObj.fwtype = FWMgrFWMMF;
+            pSelf->xaSource = pDataSrc;
+        }
+
+		if(pDataSrc)
+		{
+			pSelf->mmfContext = mmf_metadata_utility_init((char *)(( (XADataLocator_URI*)(pDataSrc->pLocator))->URI));
+			if(!pSelf->mmfContext)
+            {
+	            DEBUG_ERR("Failed to init mmf context!!!");
+    	        free(pSelf);
+        	    pSelf = NULL;           
+            }
+		}
+
+    }
+
+    DEBUG_API("<- XAMetadataAdaptCtxMMF_Create");
+    return (XAAdaptationBaseCtx*)(&pSelf->baseObj.baseObj);
+}
+
+
+/*
+ * XAresult XAMediaPlayerAdaptMMF_PostInit()
+ * 2nd phase initialization of Media Player Adaptation Context
+ * @param XAMediaPlayerAdaptationMMFCtx* ctx - pointer to Media Player adaptation context
+ * @return XAresult - Success value
+ */
+XAresult XAMetadataAdaptCtxMMF_PostInit( XAAdaptationMMFCtx* bCtx )
+{
+ 	XAresult ret = XA_RESULT_SUCCESS;
+ 
+  DEBUG_API("<-XAMetadataAdaptCtxMMF_PostInit");
+  return ret;
+}
+
+/*
+ * void XAMediaPlayerAdaptMMF_Destroy( XAMediaPlayerAdaptationMMFCtx* ctx )
+ * Destroys Media Player Adaptation Context
+ * @param ctx - Media Player Adaptation context to be destroyed
+ */
+void XAMetadataAdaptCtxMMF_Destroy( XAAdaptationMMFCtx* bCtx )
+{
+    DEBUG_API("->XAMetadataAdaptCtxMMF_Destroy");
+    if(bCtx == NULL)
+    {
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAMetadataAdaptCtxMMF_Destroy");
+        return;
+    }
+	
+    if(((XAMetadataAdaptationMMFCtx*)bCtx)->mmfContext)
+    {
+        mmf_metadata_utility_destroy(((XAMetadataAdaptationMMFCtx*)bCtx)->mmfContext);
+    }
+
+    XAAdaptationBase_Free( &bCtx->baseObj );
+    free(bCtx);
+    bCtx = NULL;
+
+    DEBUG_API("<-XAMetadataExtractorAdaptMMF_Destroy");
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,15 @@
+#ifndef XAMETADATAADAPTCTXMMF_H
+#define XAMETADATAADAPTCTXMMF_H
+
+#include "xaadaptationmmf.h"
+
+/* TYPEDEFS */
+
+typedef struct XAMetadataAdaptationMMFCtx_ XAMetadataAdaptationMMFCtx;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XAMetadataAdaptCtxMMF_Create( XADataSource *pDataSrc );
+XAresult XAMetadataAdaptCtxMMF_PostInit( XAAdaptationMMFCtx* bCtx );
+void XAMetadataAdaptCtxMMF_Destroy( XAAdaptationMMFCtx* bCtx );
+#endif /*XAMETADATAADAPTCTXMMF_H*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,354 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "xammfcapabilitiesmgr.h"
+#include <stdio.h>
+#include <string.h>
+
+static XAresult XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode);
+static XAresult XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode);
+static XAresult XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode);
+
+/* XAresult XAMMFCapabilitiesMgr_UpdateCapabilitieList
+ * Description: Update the capabilities list supported by GStreamer framework.
+ */
+XAresult XAMMFCapabilitiesMgr_UpdateCapabilitieList(
+                FrameworkMap *frameworkMap,
+                XACapabilities **ppListHead)
+
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *lastNode;
+    XACapabilities *firstNode;
+    XACapabilities *newNode = NULL;
+    FWMgrFwType fwtype = FWMgrFWUknown;
+    char *uri = NULL;
+    DEBUG_API("->XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+
+    if(!frameworkMap || !ppListHead)
+    {
+        res = XA_RESULT_PARAMETER_INVALID;
+        return res;
+    }
+
+    lastNode = firstNode = *ppListHead;
+    
+    /* traverse and point to the last node in the list */
+    while(lastNode && lastNode->next)
+    {
+        lastNode = lastNode->next;
+    }
+
+    uri = "file:///c:/test.mp4";
+    fwtype = XAFrameworkMgr_GetFramework(
+            frameworkMap,
+            uri,
+            FWMgrMORecorder);
+    
+    if(fwtype == FWMgrFWMMF)
+    {
+        /* Add codec capabilities */
+        newNode = NULL;
+        res = XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(&newNode);
+        if (res != XA_RESULT_SUCCESS)
+            {
+            return res;
+            }
+        if (lastNode)
+        {
+            lastNode->next = newNode;
+        }
+        if (newNode)
+        { /* if a new node is created move lastNode to the new item */
+            if (!firstNode)
+                firstNode = newNode;
+            lastNode = newNode;
+        }
+    }
+    
+
+    uri = "file:///c:/test.amr";
+    fwtype = XAFrameworkMgr_GetFramework(
+            frameworkMap,
+            uri,
+            FWMgrMORecorder);
+    
+    if(fwtype == FWMgrFWMMF)
+    {
+        newNode = NULL;
+        res = XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(&newNode);
+        if (res != XA_RESULT_SUCCESS)
+            {
+            return res;
+            }
+        if (lastNode)
+        {
+            lastNode->next = newNode;
+        }
+        if (newNode)
+        { /* if a new node is created move lastNode to the new item */
+            if (!firstNode)
+                firstNode = newNode;
+            lastNode = newNode;
+        }
+    }
+
+    uri = "file:///c:/test.wav";
+    fwtype = XAFrameworkMgr_GetFramework(
+            frameworkMap,
+            uri,
+            FWMgrMORecorder);
+    
+    if(fwtype == FWMgrFWMMF)
+    {
+        newNode = NULL;
+        res = XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(&newNode);
+        if (res != XA_RESULT_SUCCESS)
+            {
+            return res;
+            }
+        if (lastNode)
+        {
+            lastNode->next = newNode;
+        }
+        if (newNode)
+        { /* if a new node is created move lastNode to the new item */
+            if (!firstNode)
+                firstNode = newNode;
+            lastNode = newNode;
+        }
+    }
+    /* if empty list, then append first node as the head */
+    if (!(*ppListHead))
+        {
+        *ppListHead = firstNode;
+        }
+    DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+    return res;
+}
+
+
+XAresult XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioCodecDescriptor *entries = NULL;
+
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_E;
+    newNode->xaid = XA_AUDIOCODEC_AAC;
+    newNode->noOfEntries = 1;
+
+    /* Allocate array */
+    entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+ 
+    entries->maxChannels = 2;
+    entries->minBitsPerSample = 16;
+    entries->maxBitsPerSample = 16;
+    entries->minSampleRate = 8000000;  /*milliHz*/
+    entries->maxSampleRate = 48000000;
+    entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+    entries->numSampleRatesSupported = 7;
+    entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+    if (!entries->pSampleRatesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    /* entries in milliHz */
+    entries->pSampleRatesSupported[0] = 8000000;
+    entries->pSampleRatesSupported[1] = 11025000;
+    entries->pSampleRatesSupported[2] = 16000000;
+    entries->pSampleRatesSupported[3] = 22050000;
+    entries->pSampleRatesSupported[4] = 32000000;
+    entries->pSampleRatesSupported[5] = 44100000;
+    entries->pSampleRatesSupported[6] = 48000000;
+
+    entries->minBitRate = 32000;
+    entries->maxBitRate = 256000;
+    entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
+    entries->numBitratesSupported = 8;
+    entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+    if (!entries->pBitratesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    (entries->pBitratesSupported)[0] = 32000;
+    (entries->pBitratesSupported)[1] = 64000;
+    (entries->pBitratesSupported)[2] = 96000;
+    (entries->pBitratesSupported)[3] = 128000;
+    (entries->pBitratesSupported)[4] = 160000;
+    (entries->pBitratesSupported)[5] = 192000;
+    (entries->pBitratesSupported)[6] = 224000;
+    (entries->pBitratesSupported)[7] = 256000;
+
+    entries->profileSetting = XA_AUDIOPROFILE_AAC_AAC;
+    entries->modeSetting = XA_AUDIOMODE_AAC_LC;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
+
+XAresult XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioCodecDescriptor *entries = NULL;
+ 
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_E;
+    newNode->xaid = XA_AUDIOCODEC_AMR;
+    newNode->noOfEntries = 1;
+
+    /* Allocate array */
+    entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+ 
+    entries->maxChannels = 1;
+    entries->minBitsPerSample = 8;
+    entries->maxBitsPerSample = 8;
+    entries->minSampleRate = 8000000;  /*milliHz*/
+    entries->maxSampleRate = 8000000;
+    entries->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
+    entries->numSampleRatesSupported = 1;
+    entries->minBitRate=4750;
+    entries->maxBitRate=12200;
+    entries->isBitrateRangeContinuous=XA_BOOLEAN_FALSE;
+    entries->numBitratesSupported = 8;
+    entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+    if (!entries->pBitratesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    (entries->pBitratesSupported)[0] = 4750;
+    (entries->pBitratesSupported)[1] = 5150;
+    (entries->pBitratesSupported)[2] = 5900;
+    (entries->pBitratesSupported)[3] = 6700;
+    (entries->pBitratesSupported)[4] = 7400;
+    (entries->pBitratesSupported)[5] = 7950;
+    (entries->pBitratesSupported)[6] = 10200;
+    (entries->pBitratesSupported)[7] = 12200;
+
+    entries->profileSetting = XA_AUDIOPROFILE_AMR;
+    entries->modeSetting = 0;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
+
+XAresult XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XACapabilities *newNode = NULL;
+    XAAudioCodecDescriptor *entries = NULL;
+
+    newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+    if (!newNode)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        return res;
+    }
+
+    newNode->capsType = AUD_E;
+    newNode->xaid = XA_AUDIOCODEC_PCM;
+    newNode->noOfEntries = 1;
+
+    /* Allocate array */
+    entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+    if (!entries)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+
+    newNode->pEntry = (void*)entries;
+
+    entries->maxChannels = 2;
+    entries->minBitsPerSample = 16;
+    entries->maxBitsPerSample = 16;
+    entries->minSampleRate = 8000000;  /*milliHz*/
+    entries->maxSampleRate = 96000000;
+    entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+    entries->numSampleRatesSupported = 10;
+    entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+    if (!entries->pSampleRatesSupported)
+    {
+        res = XA_RESULT_MEMORY_FAILURE;
+        XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
+        return res;
+    }
+    /* entries in milliHz */
+    entries->pSampleRatesSupported[0] = 12000000;
+    entries->pSampleRatesSupported[1] = 16000000;
+    entries->pSampleRatesSupported[2] = 22050000;
+    entries->pSampleRatesSupported[3] = 24000000;
+    entries->pSampleRatesSupported[4] = 32000000;
+    entries->pSampleRatesSupported[5] = 44100000;
+    entries->pSampleRatesSupported[6] = 48000000;
+    entries->pSampleRatesSupported[7] = 64000000;
+    entries->pSampleRatesSupported[8] = 88200000;
+    entries->pSampleRatesSupported[9] = 96000000;
+
+    entries->minBitRate = 0;
+    entries->maxBitRate = 0;
+    entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
+    entries->pBitratesSupported = NULL;
+    entries->numBitratesSupported = 0;
+    entries->profileSetting = XA_AUDIOPROFILE_PCM;
+    entries->modeSetting = 0;
+
+    newNode->pEntry = (void*)entries;
+
+    *ppNode = newNode;
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef XAMMFCAPABILITIESMGR_H
+#define XAMMFCAPABILITIESMGR_H
+
+#include "openmaxalwrapper.h"
+#include "xaframeworkmgr.h"
+#include "xacapabilitiesmgr.h"
+
+XAresult XAMMFCapabilitiesMgr_UpdateCapabilitieList(
+                FrameworkMap *frameworkMap,
+                XACapabilities** ppListHead);
+
+#endif /* XAGSTCAPABILITIESMGR_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xangavideosink.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xangavideosink.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -20,7 +20,7 @@
 Shy Ward
 */
 
-#include "XANGAVideoSink.h"
+#include "xangavideosink.h"
 #include "openmaxalwrapper.h"
 
 
@@ -33,14 +33,20 @@
 
 CNgaVideoSink::~CNgaVideoSink()
 {
-	iMediaClientVideoDisplay->RemoveDisplayWindow(*m_pWindow);
-	delete iMediaClientVideoDisplay;
-  if(IsActive())
-  {
-     Cancel();
-  }	
+    RemoveWindow();
+    
+    delete iMediaClientVideoDisplay;
+    if(IsActive())
+    {
+    Cancel();
+    }	
 }
     
+void CNgaVideoSink::RemoveWindow()
+    {
+    iMediaClientVideoDisplay->RemoveDisplayWindow(*m_pWindow);
+    }
+
 CNgaVideoSink::CNgaVideoSink()
                   :CActive(EPriorityStandard)
 {
@@ -133,8 +139,8 @@
   m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
   
 
-  iMediaClientVideoDisplay->AddDisplayWindowL(m_pWindow, m_clipRect, m_cropRegion, m_videoExtent, m_scaleWidth, m_scaleHeight,
-                                               m_rotation, EAutoScaleBestFit, m_horizPos, m_vertPos, m_pWindow);  
+  TRAPD(err, iMediaClientVideoDisplay->AddDisplayWindowL(m_pWindow, m_clipRect, m_cropRegion, m_videoExtent, m_scaleWidth, m_scaleHeight,
+                                               m_rotation, EAutoScaleBestFit, m_horizPos, m_vertPos, m_pWindow));  
 
 }
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xangavideosink.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xangavideosink.h	Fri Apr 30 19:18:45 2010 -0500
@@ -35,7 +35,7 @@
 #include <mediaclientvideodisplay.h>
 #endif
 
-class CNgaVideoSink : public CBase,
+NONSHARABLE_CLASS(CNgaVideoSink) : public CBase,
                       public CActive
     {
 public:
@@ -50,7 +50,7 @@
     virtual void RunL();
     virtual void DoCancel();
     void Activate();
-
+    void RemoveWindow();
     void CompleteRequest(TInt status = KErrNone);    
     
 private:
@@ -97,4 +97,4 @@
 
 #endif /* __cplusplus */
 
-#endif /* XA_CNGAVIDEOSINK_H */
\ No newline at end of file
+#endif /* XA_CNGAVIDEOSINK_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+//#include <mixer.h>
+#include "xaadaptationmmf.h"
+#include "xanokialinearvolumeitfadaptationmmf.h"
+#include "xamediaplayeradaptctxmmf.h"
+#include "cmmfbackendengine.h"
+/*
+ * XAresult XANokiaLinearVolumeItfAdapt_SetVolumeLevel(void *ctx, AdaptationContextIDS ctx->baseObj.ctxId,
+ *                                          XAuint32 percentage)
+ * @param void *ctx - Adaptation context, this will be casted to correct type regarding to contextID
+ * XAuint32 percentage - Requested volume level, in between MIN_VOLUME_LEVEL and MAX_VOLUME_LEVEL
+ * @return XAresult ret - Success value
+ */
+XAresult XANokiaLinearVolumeItfAdapt_SetVolumeLevel(XAAdaptationMMFCtx *ctx, XAuint32 percentage)
+{
+    XAresult res = XA_RESULT_SUCCESS;
+    XAuint32 maxvol;
+    XAuint32 vol;
+    DEBUG_API_A1("->XANokiaLinearVolumeItfAdapt_SetVolumeLevel to: %d", percentage);
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XARadioAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+    
+    if(ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+        {
+        mmf_volumeitf_get_maxvolume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
+                                        &maxvol); 
+        
+        vol = (percentage * maxvol) / MAX_PERCENTAGE_VOLUME;
+        
+        mmf_volumeitf_set_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
+                                    vol);
+        }
+    DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+    return res;
+}
+
+XAresult XANokiaLinearVolumeItfAdapt_GetStepCount(XAAdaptationMMFCtx *ctx,
+                                                    XAuint32* stepcount)
+    {
+    XAresult res = XA_RESULT_SUCCESS;
+    DEBUG_API_A1("->XANokiaLinearVolumeItfAdapt_SetVolumeLevel to: %d",
+                                                            percentage);
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XARadioAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+        {
+        mmf_volumeitf_get_maxvolume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
+                                        stepcount);
+        }
+    
+    DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+    return res;    
+    }
+
+void XANokiaLinearVolumeItfAdapt_VolumeChange(XAAdaptationBaseCtx *ctx, TInt aVolume)
+{
+   	XAAdaptEvent event = {XA_NOKIALINEARVOLITFEVENTS, XA_ADAPT_VOLUME_VOLUME_CHANGED,1,0};    	
+    if (ctx)
+ 		{
+ 			event.data = &aVolume;    
+ 			XAAdaptationBase_SendAdaptEvents(ctx, &event );
+   	}   
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XANOKIALINEARVOLUMEITFADAPTATIONMMF_H
+#define XANOKIALINEARVOLUMEITFADAPTATIONMMF_H
+
+#include "xaadaptationmmf.h"
+#include "xadebug.h"
+#include "xathreadsafety.h"
+
+/* MACROS */
+
+/* FUNCTIONS */
+
+XAresult XANokiaLinearVolumeItfAdapt_SetVolumeLevel(XAAdaptationMMFCtx *ctx,
+                                         XAuint32 percentage);
+XAresult XANokiaLinearVolumeItfAdapt_GetMaxVolumeLevel(XAAdaptationMMFCtx *ctx,                                         
+                                                        XAuint32 * pPercentage);
+ 
+XAresult XANokiaLinearVolumeItfAdapt_GetStepCount(XAAdaptationMMFCtx *ctx,
+        											XAuint32 * pStepCount);
+
+void XANokiaLinearVolumeItfAdapt_VolumeChange(XAAdaptationBaseCtx *ctx, TInt volume);
+
+#endif /* XANOKIALINEARVOLUMEITFADAPTATIONMMF_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "xanokiavolumeextitfadaptationmmf.h"
+#include "xamediaplayeradaptctxmmf.h"
+#include "xamediarecorderadaptctxmmf.h"
+#include "cmmfbackendengine.h"
+
+/*
+ * XAresult XANokiaVolumeExtItfAdapt_SetMute(void *ctx, AdaptationContextIDS ctx->ctxId, XAboolean mute)
+ * @param void *ctx - Adaptation context, this will be casted to correct type regarding to contextID value given as 2nd parameter
+ * @param AdaptationContextIDS ctx->ctxId - Type specifier for context, this will be used to cast ctx pointer to correct type.
+ * @param XAboolean mute - status of mute value
+ * @return XAresult ret - Success value
+ */
+XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx, XAboolean mute)
+{    
+    XAuint32 volume;
+    DEBUG_API("->XANokiaVolumeExtItfAdapt_SetMute");
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
+                 ctx->baseObj.ctxId != XARadioAdaptation ) )  
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetMute");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation )
+    {
+    if(mute)
+        {
+        
+        mmf_volumeitf_get_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
+                                    &volume);
+        ((XAMediaPlayerAdaptationMMFCtx*)ctx)->premutevol = volume;
+        mmf_volumeitf_set_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
+                                    0);
+        }
+    else
+        {
+        mmf_volumeitf_set_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
+                                    ((XAMediaPlayerAdaptationMMFCtx*)ctx)->premutevol);
+        }
+    }
+    else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+    if(mute)
+        {
+        
+        mmf_volumeitf_get_volume(((XAMediaRecorderAdaptationMMFCtx*)ctx)->mmfContext,
+                                    &volume);
+        ((XAMediaRecorderAdaptationMMFCtx*)ctx)->premutevol = volume;
+        mmf_volumeitf_set_volume(((XAMediaRecorderAdaptationMMFCtx*)ctx)->mmfContext,
+                                    0);
+        }
+    else
+        {
+        mmf_volumeitf_set_volume(((XAMediaRecorderAdaptationMMFCtx*)ctx)->mmfContext,
+                                    ((XAMediaRecorderAdaptationMMFCtx*)ctx)->premutevol);
+        } 
+    }
+   	else if ( ctx->baseObj.ctxId == XARadioAdaptation )
+    {
+   			
+    }
+        
+    DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetMute");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationBaseCtx *ctx, XAboolean enable)
+ * @param XAAdaptationBaseCtx *ctx - Adaptation context
+ * @param XAboolean enable - Enable Stereo Position
+ * @return XAresult - Success value
+ */
+XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationMMFCtx *ctx, XAboolean enable)
+{
+    DEBUG_API("->XANokiaVolumeExtItfAdapt_EnableStereoPosition");
+
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation ) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition");
+        /* invalid parameter */
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation  )
+    {
+
+    }
+    else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+ 
+    }
+
+    DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition");
+    return XA_RESULT_SUCCESS;
+}
+
+/*
+ * XAresult XANokiaVolumeExtItfAdapt_SetStereoPosition(XAAdaptationMMFCtx *ctx, XApermille stereoPosition)
+ * @param XAAdaptationBaseCtx *ctx - Adaptation context
+ * @param XApermille stereoPosition - Stereo Position to be set
+ * @return XAresult - Success value
+ */
+XAresult XANokiaVolumeExtItfAdapt_SetStereoPosition(XAAdaptationMMFCtx *ctx,
+                                            XApermille stereoPosition)
+{
+    DEBUG_API("->XANokiaVolumeExtItfAdapt_SetStereoPosition");
+    
+    if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
+                 ctx->baseObj.ctxId != XAMediaRecorderAdaptation ) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation  )
+    {
+
+    }
+    else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    {
+
+    }
+
+    DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
+    return XA_RESULT_SUCCESS;
+}
+
+void XANokiaVolumeExtItfAdapt_MuteChange(XAAdaptationBaseCtx* ctx, XAboolean aMute)
+{
+   	XAAdaptEvent event = {XA_NOKIAEXTVOLITFEVENTS, XA_ADAPT_VOLUME_MUTE_CHANGED,1,0};    	
+    if (ctx)
+ 		{
+ 			event.data = &aMute;
+ 			XAAdaptationBase_SendAdaptEvents(ctx, &event );
+   	}   
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XANOKIAVOLUMEEXTITFADAPTATIONMMF_H
+#define XANOKIAVOLUMEEXTITFADAPTATIONMMF_H
+
+#include "xaadaptationmmf.h"
+#include "xadebug.h"
+#include "xathreadsafety.h"
+
+/* MACROS */
+
+/* DEFINES */
+
+/* FUNCTIONS */
+
+XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx,  XAboolean mute);
+
+XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationMMFCtx *ctx,
+                                               XAboolean enable);
+
+XAresult XANokiaVolumeExtItfAdapt_SetStereoPosition(XAAdaptationMMFCtx *ctx,
+                                            XApermille stereoPosition);
+
+void XANokiaVolumeExtItfAdapt_MuteChange(XAAdaptationBaseCtx* ctx, XAboolean aMute);
+
+#endif /* XANOKIAVOLUMEEXTITFADAPTATIONMMF_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description: 
+* Description:
 *
 */
 
@@ -28,43 +28,34 @@
 gboolean XAPlayItfAdapt_PositionUpdate(gpointer ctx);
 
 /*
- * XAresult XAPlayItfAdapt_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state)
+ * XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state)
  * Sets play state to GStreamer.
  * @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID
  * XAuint32 state - Play state to be set
  * @return XAresult ret - Success value
  */
-XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseMMFCtx *bCtx, XAuint32 state)
+XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state)
 {
     XAresult ret = XA_RESULT_SUCCESS;
-    
-    XAMediaPlayerAdaptationMMFCtx* mCtx = NULL;
-
-
-    
-    DEBUG_API_A1("->XAPlayItfAdapt_SetPlayState %s",PLAYSTATENAME(state));
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
 
-    if(!bCtx)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
+    DEBUG_API_A1("->XAPlayItfAdaptMMF_SetPlayState %s",PLAYSTATENAME(state));
 
-    mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+    /* bCtx and parameter pointer validation happens in the calling function.
+     * We don't need to repeat it here*/
     switch ( state )
     {
         case XA_PLAYSTATE_STOPPED:
         {
-            mmf_stop_playback(mCtx->mmfContext);
-            mmf_close(mCtx->mmfContext);
+            ret = mmf_playitf_stop_playback(mCtx->mmfContext);
             break;
         }
         case XA_PLAYSTATE_PAUSED:
-            mmf_pause_playback(mCtx->mmfContext);
+            ret = mmf_playitf_pause_playback(mCtx->mmfContext);
             break;
         case XA_PLAYSTATE_PLAYING:
         {
-            mmf_resume_playback(mCtx->mmfContext);
+            ret = mmf_playitf_resume_playback(mCtx->mmfContext);
             break;
         }
         default:
@@ -72,72 +63,151 @@
             break;
     }
 
-   DEBUG_API("<-XAPlayItfAdapt_SetPlayState");
+    DEBUG_API("<-XAPlayItfAdaptMMF_SetPlayState");
     return ret;
 }
 
 /*
- * XAresult XAPlayItfAdapt_GetDuration(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
+ * XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 *pState)
+ * @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID
+ * XAuint32 *state - XAmillisecond *pMsec - Pointer where to store play state
+ * @return XAresult ret - Success value
+ */
+XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 *pState)
+    {
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XAPlayItfAdaptMMF_GetPlayState");
+
+    /* If playhead reaches eof, state will transition to paused.
+     * This object does not have visibility to callback*/
+    ret = mmf_playitf_get_play_state(mCtx->mmfContext, pState);
+
+    DEBUG_API("<-XAPlayItfAdaptMMF_GetPlayState");
+    return ret;
+
+    }
+
+/*
+ * XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
  * @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID
  * XAmillisecond *pMsec - Pointer where to store duration of stream.
  * @return XAresult ret - Success value
  */
-XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseMMFCtx *bCtx, XAmillisecond *pMsec)
+XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
 {
     XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
 
-    DEBUG_API("->XAPlayItfAdapt_GetDuration");
+    DEBUG_API("->XAPlayItfAdaptMMF_GetDuration");
 
-    if(!bCtx)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
+    ret = mmf_playitf_get_duration(mCtx->mmfContext, pMsec);
 
-
-    DEBUG_API("<-XAPlayItfAdapt_GetDuration");
+    DEBUG_API("<-XAPlayItfAdaptMMF_GetDuration");
     return ret;
 }
 
 /*
- * XAresult XAPlayItfAdapt_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
+ * XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
  * @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value
  * XAmillisecond *pMsec - Pointer where to store current position in stream.
  * @return XAresult ret - Success value
  */
-XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseMMFCtx *bCtx, XAmillisecond *pMsec)
+XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
 {
     XAresult ret = XA_RESULT_SUCCESS;
-    
-    DEBUG_API("->XAPlayItfAdapt_GetPosition");
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XAPlayItfAdaptMMF_GetPosition");
 
-    if(!bCtx)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    
-    DEBUG_API("<-XAPlayItfAdapt_GetPosition");
+    ret = mmf_playitf_get_position(mCtx->mmfContext, pMsec);
+
+    DEBUG_API("<-XAPlayItfAdaptMMF_GetPosition");
     return ret;
 }
 
 /*
- * XAresult XAPlayItfAdapt_EnablePositionTracking
- * Enable/disable periodic position tracking callbacks
+ * XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, xaPlayCallback callback)
+ * Description: Sets the playback callback function.
  */
-XAresult XAPlayItfAdaptMMF_EnablePositionTracking(XAAdaptationBaseMMFCtx *bCtx, XAboolean enable)
+XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, xaPlayCallback callback)
 {
-    DEBUG_API_A1("->XAPlayItfAdapt_EnablePositionTracking (enable: %d)", (int)enable);
-    if(!bCtx)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XAPlayItfAdaptMMF_RegisterCallback");
+
+    ret = mmf_playitf_register_callback(mCtx->mmfContext, callback);
+
+    DEBUG_API("<-XAPlayItfAdaptMMF_RegisterCallback");
+    return ret;
+}
 
-    DEBUG_API("<-XAPlayItfAdapt_EnablePositionTracking");
-    return XA_RESULT_SUCCESS;
+/**
+ * XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags)
+ * Description: Enables/disables notification of playback events.
+ **/
+XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XAPlayItfAdaptMMF_SetCallbackEventsMask");
+
+    ret = mmf_playitf_set_callback_events_mask(mCtx->mmfContext, eventFlags);
+
+    DEBUG_API("<-XAPlayItfAdaptMMF_SetCallbackEventsMask");
+    return ret;
 }
 
+/**
+ * XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
+ * Description: Sets marker position.
+ **/
+XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XAPlayItfAdaptMMF_SetMarkerPosition");
+
+    ret = mmf_playitf_set_marker_position(mCtx->mmfContext, mSec);
+
+    DEBUG_API("<-XAPlayItfAdaptMMF_SetMarkerPosition");
+    return ret;
+}
+
+/**
+ * XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags)
+ * Description: Clears marker position.
+ **/
+XAresult XAPlayItfAdaptMMF_ClearMarkerPosition(XAAdaptationBaseCtx *bCtx)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XAPlayItfAdaptMMF_ClearMarkerPosition");
+
+    ret = mmf_playitf_clear_marker_position(mCtx->mmfContext);
+
+    DEBUG_API("<-XAPlayItfAdaptMMF_ClearMarkerPosition");
+    return ret;
+}
+
+/**
+ * XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
+ * Description: Sets position update period.
+ **/
+XAresult XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XAPlayItfAdaptMMF_SetPositionUpdatePeriod");
+
+    ret = mmf_playitf_set_position_update_period(mCtx->mmfContext, mSec);
+
+    DEBUG_API("<-XAPlayItfAdaptMMF_SetPositionUpdatePeriod");
+    return ret;
+}
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,8 +18,8 @@
 #ifndef XAPLAYITFADAPTATIONMMF_H
 #define XAPLAYITFADAPTATIONMMF_H
 
-#include "xaadaptationcontextbasemmf.h"
-#include "xadebug.h"
+#include "xaadaptationmmf.h"
+
 
 #ifdef _DEBUG
 /*parse state names for debug prints*/
@@ -35,10 +35,14 @@
 
 /* FUNCTIONS */
 
-XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseMMFCtx *bCtx, XAuint32 state);
-XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseMMFCtx *bCtx, XAmillisecond *pMsec);
-XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseMMFCtx *bCtx, XAmillisecond *pMsec);
-XAresult XAPlayItfAdaptMMF_EnablePositionTracking(XAAdaptationBaseMMFCtx *bCtx, XAboolean enable);
-
+XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state);
+XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 *pState);
+XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec);
+XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec);
+XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, xaPlayCallback callback);
+XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags);
+XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec);
+XAresult XAPlayItfAdaptMMF_ClearMarkerPosition(XAAdaptationBaseCtx *bCtx);
+XAresult XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec);
 
 #endif /* XAPLAYITFADAPTATIONMMF_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,19 +19,20 @@
 #include "xarecorditfadaptationmmf.h"
 #include "cmmfbackendengine.h"
 #include "xaadaptationmmf.h"
+#include "xaadptbasectx.h"
 
 /*
- * XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationBaseMMFCtx *ctx, XAuint32 state)
+ * XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationMMFCtx *ctx, XAuint32 state)
  * Sets record state to GStreamer.
  * @param XAAdaptationBaseCtx *ctx - Adaptation context
  * XAuint32 state - Record state to be set
  * @return XAresult ret - Success value
  */
-XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationBaseMMFCtx *bCtx, XAuint32 state)
+XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationMMFCtx *bCtx, XAuint32 state)
 {
     XAresult ret = XA_RESULT_SUCCESS;
     int mmfretCode;
-    XAAdaptEventMMF stalledevent = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADSTALLED, 0, NULL};
+    XAAdaptEvent stalledevent = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADSTALLED, 0, NULL};
     XAMediaRecorderAdaptationMMFCtx* mCtx = NULL;
     DEBUG_API_A1("->XARecordItfAdaptMMF_SetRecordState %s",RECORDSTATENAME(state));
     if(!bCtx)
@@ -65,7 +66,7 @@
                 }
             else
                 {
-                XAAdaptationBaseMMF_SendAdaptEvents(bCtx, &stalledevent );
+                XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &stalledevent );
                 }
             break;
         }
@@ -98,7 +99,7 @@
  * XAresult XARecordItfAdapt_GetRecordState(XAAdaptationBaseCtx *bCtx, XAuint32 *state)
  * Description: Return record state
  */
-XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationBaseMMFCtx *bCtx, XAuint32 *state)
+XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationMMFCtx *bCtx, XAuint32 *state)
 {
     XAMediaRecorderAdaptationMMFCtx* mCtx = NULL;
     DEBUG_API("->XARecordItfAdaptMMF_GetRecordState");
@@ -124,7 +125,7 @@
  * XAmillisecond *pMsec - Pointer where to store current position in stream.
  * @return XAresult ret - Success value
  */
-XAresult XARecordItfAdaptMMF_GetPosition(XAAdaptationBaseMMFCtx *bCtx, XAmillisecond *pMsec)
+XAresult XARecordItfAdaptMMF_GetPosition(XAAdaptationMMFCtx *bCtx, XAmillisecond *pMsec)
 {
     XAresult ret = XA_RESULT_SUCCESS;
     XAuint64 position;
@@ -155,9 +156,9 @@
  */
 gboolean XARecordItfAdaptMMF_PositionUpdate(gpointer ctx, XAuint64 position)
 {
-    XAAdaptationBaseMMFCtx *bCtx = (XAAdaptationBaseMMFCtx*) ctx;
+    XAAdaptationMMFCtx *bCtx = (XAAdaptationMMFCtx*) ctx;
     XAMediaRecorderAdaptationMMFCtx* mCtx = (XAMediaRecorderAdaptationMMFCtx*) ctx;
-    XAAdaptEventMMF event = {XA_RECORDITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
+    XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
     DEBUG_API("->XARecordItfAdapt_PositionUpdate");
 
     if( mCtx && mCtx->trackpositionenabled )
@@ -167,7 +168,7 @@
             XARecordItfAdaptMMF_GetPosition(bCtx , &posInMsec);
             event.data = &posInMsec;
             DEBUG_API_A1("XARecordItfAdapt_PositionUpdate: pos %lu ms", posInMsec);
-            XAAdaptationBaseMMF_SendAdaptEvents(bCtx, &event );
+            XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
         }
     DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
     return( mCtx->runpositiontimer );
@@ -180,12 +181,12 @@
  * XAresult XARecordItfAdapt_EnablePositionTracking
  * Enable/disable periodic position tracking callbacks
  */
-XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationBaseMMFCtx *bCtx, XAboolean enable)
+XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationMMFCtx *bCtx, XAboolean enable)
 {
     XAMediaRecorderAdaptationMMFCtx* mCtx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
     DEBUG_API_A1("->XARecordItfAdapt_EnablePositionTracking (enable: %lu)", enable);
 
-    if(!bCtx || bCtx->ctxId != XAMediaRecorderAdaptationMMF)
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
     {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
@@ -214,12 +215,12 @@
     return XA_RESULT_SUCCESS;
 }
 
-XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseMMFCtx *bCtx, XAmillisecond pMsec)
+XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationMMFCtx *bCtx, XAmillisecond pMsec)
     {
     XAMediaRecorderAdaptationMMFCtx* mCtx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
     DEBUG_API_A1("->XARecordItfAdaptMMF_SetPositionUpdatePeriod (pMsec: %lu)", pMsec);
 
-    if(!bCtx || bCtx->ctxId != XAMediaRecorderAdaptationMMF)
+    if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
         {
             DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
             DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
--- a/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,7 +18,7 @@
 #ifndef XARECORDITFADAPTATIONMMF_H
 #define XARECORDITFADAPTATIONMMF_H
 
-#include "xaadaptationcontextbasemmf.h"
+#include "xaadaptationmmf.h"
 #include "xadebug.h"
 #include <glib.h>
 
@@ -40,10 +40,10 @@
 
 /* FUNCTIONS */
 
-XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationBaseMMFCtx *ctx, XAuint32 state );
-XAresult XARecordItfAdaptMMF_GetPosition( XAAdaptationBaseMMFCtx *ctx, XAmillisecond *pMsec );
-XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationBaseMMFCtx *bCtx, XAuint32 *state);
-XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationBaseMMFCtx *ctx, XAboolean enable);
-XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseMMFCtx *ctx, XAmillisecond pMsec);
+XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationMMFCtx *ctx, XAuint32 state );
+XAresult XARecordItfAdaptMMF_GetPosition( XAAdaptationMMFCtx *ctx, XAmillisecond *pMsec );
+XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationMMFCtx *bCtx, XAuint32 *state);
+XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationMMFCtx *ctx, XAboolean enable);
+XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationMMFCtx *ctx, XAmillisecond pMsec);
 
 #endif /* XARECORDITFADAPTATIONMMF_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "unistd.h"
+#include "xamediaplayeradaptctxmmf.h"
+#include "xaseekitfadaptationmmf.h"
+#include "cmmfbackendengine.h"
+#include <glib.h>
+
+/*
+ * XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state)
+ * Sets play state to GStreamer.
+ * @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID
+ * XAuint32 state - Play state to be set
+ * @return XAresult ret - Success value
+ */
+XAresult XASeekItfAdaptMMF_SetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond pos, XAuint32 seekMode)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+    DEBUG_API("->XASeekItfAdaptMMF_SetPosition ");
+    ret = mmf_seekitf_set_position(mCtx->mmfContext, pos);
+    /* bCtx and parameter pointer validation happens in the calling function.
+     * We don't need to repeat it here*/
+
+    DEBUG_API("<-XASeekItfAdaptMMF_SetPosition");
+    return ret;
+}
+
+XAresult XASeekItfAdaptMMF_SetLoop(XAAdaptationBaseCtx *bCtx, XAboolean loopEnable,
+                                    XAmillisecond startPos, XAmillisecond endPos)
+    {
+        XAresult ret = XA_RESULT_SUCCESS;
+        XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
+        DEBUG_API("->XASeekItfAdaptMMF_SetLoop ");
+
+        /* bCtx and parameter pointer validation happens in the calling function.
+         * We don't need to repeat it here*/
+        ret = mmf_seekitf_set_repeats(mCtx->mmfContext, loopEnable);
+        
+        ret = mmf_seekitf_set_playwindow(mCtx->mmfContext, startPos, endPos);
+        
+        
+        
+        DEBUG_API("<-XASeekItfAdaptMMF_SetLoop");
+        return ret;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef XASEEKITFADAPTATIONMMF_H
+#define XASEEKITFADAPTATIONMMF_H
+
+#include "xaadaptationmmf.h"
+
+
+/* FUNCTIONS */
+
+XAresult XASeekItfAdaptMMF_SetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond pos, XAuint32 seekMode);
+XAresult XASeekItfAdaptMMF_SetLoop(XAAdaptationBaseCtx *bCtx, XAboolean loopEnable,
+                                    XAmillisecond startPos, XAmillisecond endPos);
+
+#endif /* XASEEKITFADAPTATIONMMF_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,442 @@
+/**
+ * src\adaptation\XAStreamInformationItfAdaptation.c
+ * Part of OpenMAX AL Implementation
+ * Copyright (c) 2009 Nokia Inc.
+ *
+ * This file contains implementation of XAStreamInformationItfAdaptation
+ **/
+
+#include "xadebug.h"
+#include "xathreadsafety.h"
+#include "xamediaplayeradaptctxmmf.h"
+#include "xastreaminformationitfadaptationmmf.h"
+#include "xaplayitfadaptationmmf.h"
+#include "cmmfbackendengine.h"
+/*
+ * XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
+ *   XAAdaptationBaseCtx *adaptCtx,
+ *   XAMediaContainerInformation *info);
+ * Description: Obtains media container information
+ */
+XAresult  XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
+    XAAdaptationBaseCtx *adaptCtx,
+    XAuint32 *containerType,
+    XAmillisecond *mediaDuration,
+    XAuint32 *numStreams)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XADataSource *xaDataSource = NULL;
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+/*        !((adaptCtx->ctxId == XAMediaPlayerAdaptation) ||
+         (adaptCtx->ctxId == XAMDAdaptation) ) )
+*/
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* Initialize to unspecified */
+    *containerType = XA_CONTAINERTYPE_UNSPECIFIED;
+    xaDataSource = ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->xaSource;
+/*    DEBUG_INFO("Obtained handle to xaDataSource");*/
+    if ( xaDataSource &&
+         xaDataSource->pFormat &&
+         ( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_MIME) )
+    {
+        *containerType = ((XADataFormat_MIME*)(xaDataSource->pFormat))->containerType;
+        DEBUG_INFO_A1("Container type obtained from xaDataSource->pFormat is [%u]", (unsigned int)(*containerType));
+    }
+    else
+    {
+        DEBUG_INFO("Container type unspecified");
+    }
+
+    /* Get media duration */
+    ret = XAPlayItfAdaptMMF_GetDuration(adaptCtx, mediaDuration);
+    if ( ret != XA_RESULT_SUCCESS )
+        return ret;
+
+    ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
+                                                    numStreams);
+
+    DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
+    return ret;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdaptMMF_QueryStreamType(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 streamIndex,
+ *               XAuint32 *domain)
+ * Description: Obtains stream type information
+ */
+XAresult XAStreamInformationItfAdaptMMF_QueryStreamType(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex,
+                XAuint32 *domain)
+{
+    XAresult ret;
+    XAuint32 numStreams;
+    XADataSource *xaDataSource = NULL;
+
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryStreamType");
+
+    ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
+                                                    &numStreams);
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
+        return ret;
+    }
+
+    /* validate stream index */
+    if ( streamIndex > numStreams )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* if format type is raw image */
+    xaDataSource = ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->xaSource;
+    if( xaDataSource->pFormat &&
+      ( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_RAWIMAGE) )
+    {
+        *domain = XA_DOMAINTYPE_IMAGE;
+        return XA_RESULT_SUCCESS;
+    }
+    else
+    {
+    ret = mmf_streaminformationitf_get_streaminfo(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
+                                                    streamIndex,domain);
+    }
+
+    DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
+    return ret;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdaptMMF_QueryStreamInformation(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 streamIndex,
+ *               void * info)
+ * Description: Obtains stream information
+ */
+XAresult XAStreamInformationItfAdaptMMF_QueryStreamInformation(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex,
+                void * info)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 domain;
+    XAuint32 codecId;
+    XAuint32 channels;
+    XAmilliHertz sampleRate;
+    XAuint32 bitRate;
+    XAmillisecond duration;
+    XAuint32 width;
+    XAuint32 height;
+    XAuint32 frameRate;
+    void* mmfctx;
+    
+    mmfctx = ((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext;
+/*    GstElement *codecbin = NULL;*/
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryStreamInformation");
+
+    /* stream index is validated in XAStreamInformationItfAdaptMMF_QueryStreamType */
+    ret = XAStreamInformationItfAdaptMMF_QueryStreamType(
+            adaptCtx, streamIndex, &domain);
+
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamInformation");
+        return ret;
+    }
+    if ( domain == XA_DOMAINTYPE_UNKNOWN )
+    {
+        DEBUG_ERR("XA_RESULT_CONTENT_UNSUPPORTED");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamInformation");
+        return XA_RESULT_CONTENT_UNSUPPORTED;
+    }
+
+    switch(domain)
+    {
+        case XA_DOMAINTYPE_AUDIO:
+            DEBUG_INFO("Getting Audio Stream Info from Backend Engine");
+            ret = mmf_get_channels(mmfctx, &channels);
+            ret = mmf_get_samplerate(mmfctx, &sampleRate);
+            ret = mmf_get_bitrate(mmfctx, &bitRate);
+            ret = mmf_get_codec_id(mmfctx, &codecId);
+            break;
+        case XA_DOMAINTYPE_VIDEO:
+            DEBUG_INFO("Getting Video Stream Info from Backend Engine");
+            ret = mmf_get_bitrate(mmfctx, &bitRate);
+            ret = mmf_get_codec_id(mmfctx, &codecId);   
+            ret = mmf_streaminformationitf_get_videoframesize(mmfctx, &height, &width, &frameRate);
+            break;
+        case XA_DOMAINTYPE_IMAGE:
+            DEBUG_INFO("Getting Image Stream Info from SrcPad");
+            break;
+        default:
+            break;
+    };
+
+
+    if ( ret == XA_RESULT_SUCCESS)
+    {
+        DEBUG_INFO("Getting media duration");
+        ret = XAPlayItfAdaptMMF_GetDuration(adaptCtx, &duration);
+    }
+
+    /* Now assign properties to data structure */
+    if ( ret == XA_RESULT_SUCCESS)
+    {
+        switch(domain)
+        {
+            case XA_DOMAINTYPE_AUDIO:
+            {
+                XAAudioStreamInformation* streamInfo = (XAAudioStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAAudioStreamInformation");
+                streamInfo->codecId = codecId;
+                streamInfo->channels = channels;
+                streamInfo->sampleRate = sampleRate;
+                streamInfo->bitRate = bitRate;
+                streamInfo->langCountry[0] = '\0';
+                streamInfo->duration = duration;
+            }
+                break;
+            case XA_DOMAINTYPE_MIDI:
+            {
+                XAMIDIStreamInformation* streamInfo = (XAMIDIStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAMIDIStreamInformation");
+                /*currently there is no way to get these information from gstreamer*/
+                streamInfo->channels = XA_MIDI_UNKNOWN;
+                streamInfo->tracks = XA_MIDI_UNKNOWN;
+                streamInfo->bankType = XA_MIDIBANK_DEVICE;
+                /*streamInfo->bitRate = 0;*/
+                streamInfo->langCountry[0] = '\0';
+                streamInfo->duration = duration;
+            }
+                break;
+            case XA_DOMAINTYPE_VIDEO:
+            {
+                XAVideoStreamInformation* streamInfo = (XAVideoStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAVideoStreamInformation");
+                streamInfo->codecId = codecId;
+                streamInfo->width = width;
+                streamInfo->height = height;
+                streamInfo->bitRate = bitRate;
+                streamInfo->duration = duration;
+                streamInfo->frameRate = frameRate;
+            }
+                break;
+            case XA_DOMAINTYPE_IMAGE:
+            {
+                XAImageStreamInformation* streamInfo = (XAImageStreamInformation*)info;
+                DEBUG_INFO("Assigning values for XAImageStreamInformation");
+                streamInfo->codecId = codecId;
+                streamInfo->width = width;
+                streamInfo->height = height;
+                streamInfo->presentationDuration = duration;
+            }
+                break;
+            default:
+                break;
+        };
+    } /*if ( ret == XA_RESULT_SUCCESS)*/
+
+    DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamInformation");
+    return ret;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdaptMMF_QueryStreamName(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 streamIndex,
+ *               XAuint16 * pNameSize,
+ *               XAchar * pName)
+ * Description: Obtains stream name
+ */
+XAresult XAStreamInformationItfAdaptMMF_QueryStreamName(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex,
+                XAuint16 * pNameSize,
+                XAchar * pName)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 numStreams;
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryStreamName");
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* validate stream index */
+    ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
+                                                    &numStreams);
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+        return ret;
+    }
+
+    /* validate stream index */
+    if ( streamIndex > numStreams )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    /* TODO there is no straight way to retreive stream name from mmf*/
+    /*XAuint16 inputNameSize = *pNameSize;*/
+    *pNameSize = 0; /* Replace this with actual size*/
+    if ( pName )
+    {
+    /* TODO copy stream name into pName taking into account inputNameSize */
+    }
+
+    DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+    return ret;
+}
+
+/*
+ * XAresult XAStreamInformationItfAdaptMMF_QueryActiveStreams(
+ *               XAAdaptationBaseCtx *adaptCtx,
+ *               XAuint32 *numStreams,
+ *               XAboolean *activeStreams);
+ * Description: Obtains active stream information
+ */
+ XAresult XAStreamInformationItfAdaptMMF_QueryActiveStreams(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 *numStreams,
+                XAboolean *activeStreams)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 inputNumStreams;
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( adaptCtx->ctxId ==  XAMDAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+        return XA_RESULT_PRECONDITIONS_VIOLATED;
+    }
+
+    /* Determine number of streams */
+    ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
+                                                    &inputNumStreams);
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+        return ret;
+    }
+
+    if ( activeStreams )
+    {
+        XAuint32 loopIndex;
+        if (*numStreams < inputNumStreams)
+        {
+            DEBUG_INFO("numStreams param value is smaller than number of streams");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+            return XA_RESULT_PARAMETER_INVALID;
+        }
+        for (loopIndex = 0; loopIndex < inputNumStreams; loopIndex++)
+        {
+            /* TODO currently gstreamer doesn't allow multiple dynamic streams
+             * all streams are active streams */
+            activeStreams[loopIndex] = XA_BOOLEAN_TRUE;
+        }
+    }
+    else
+        {
+        *numStreams = inputNumStreams;
+        }
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+    return XA_RESULT_SUCCESS;
+}
+
+XAresult XAStreamInformationItfAdaptMMF_SetActiveStream(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamNum,
+                XAboolean active,
+                XAboolean commitNow)
+{
+    XAresult ret = XA_RESULT_SUCCESS;
+    XAuint32 numStreams;
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_SetActiveStream");
+
+    /* Both Media Player and Metadata Extractor objec uses the same ctxId */
+    if( !adaptCtx ||
+        (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if( adaptCtx->ctxId ==  XAMDAdaptation)
+    {
+        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
+        return XA_RESULT_PRECONDITIONS_VIOLATED;
+    }
+
+    /* Determine number of streams */
+    ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
+                                                    &numStreams);
+    if (ret != XA_RESULT_SUCCESS)
+    {
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+        return ret;
+    }
+
+    /* validate stream index */
+    if ( streamNum > numStreams )
+    {
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
+        return XA_RESULT_PARAMETER_INVALID;
+    }
+
+    if(commitNow)
+        {
+        ret = mmf_streaminformationitf_set_activestream(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
+                                                            streamNum, active);
+        }
+
+    DEBUG_API("->XAStreamInformationItfAdaptMMF_SetActiveStream");
+    return ret;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,49 @@
+/**
+ * src\adaptation\XAStreamInformationItfAdaptation.h
+ * Part of OpenMAX AL Implementation
+ * Copyright (c) 2009 Nokia Inc.
+ *
+ * This file contains implementation of XAStreamInformationItfAdaptation
+ **/
+#ifndef XASTREAMINFORMATIONITFADAPTATIONMMF_H
+#define XASTREAMINFORMATIONITFADAPTATIONMMF_H
+
+#include "openmaxalwrapper.h"
+#include "xaadptbasectx.h"
+/* MACROS */
+
+/* FUNCTIONS */
+XAresult XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
+    XAAdaptationBaseCtx *adaptCtx,
+    XAuint32 *containerType,
+    XAmillisecond *mediaDuration,
+    XAuint32 *numStreams);
+
+XAresult XAStreamInformationItfAdaptMMF_QueryStreamType(
+                XAAdaptationBaseCtx *adaptCtx,
+                XAuint32 streamIndex, 
+                XAuint32 *domain);
+
+XAresult XAStreamInformationItfAdaptMMF_QueryStreamInformation(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 streamIndex,
+                void * info);
+
+XAresult XAStreamInformationItfAdaptMMF_QueryStreamName(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 streamIndex,
+                XAuint16 * pNameSize,
+                XAchar * pName);
+
+XAresult XAStreamInformationItfAdaptMMF_QueryActiveStreams(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 *numStreams,
+                XAboolean *activeStreams);
+
+XAresult XAStreamInformationItfAdaptMMF_SetActiveStream(
+                XAAdaptationBaseCtx *adaptCtx, 
+                XAuint32 streamNum,
+                XAboolean active, 
+                XAboolean commitNow);
+
+#endif /* XASTREAMINFORMATIONITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmix.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/outputmix/xaoutputmix.c	Fri Apr 30 19:18:45 2010 -0500
@@ -27,6 +27,8 @@
 #include "xavolumeitf.h"
 #include "xaoutputmixitf.h"
 #include "xathreadsafety.h"
+#include "xaoutputmixadaptctx.h"
+#include "xacapabilitiesmgr.h"
 
 /* Static mapping of enumeration XAOMixInterfaces to interface iids */
 static const XAInterfaceID* xaOMixItfIIDs[OMIX_ITFCOUNT]={
@@ -50,7 +52,9 @@
  *                                   const XAboolean *pInterfaceRequired)
  * Description: Create object
  */
-XAresult XAOMixImpl_CreateOutputMix(XAObjectItf *pMix,
+XAresult XAOMixImpl_CreateOutputMix(FrameworkMap* mapper,
+                                    XACapabilities* capabilities,
+                                    XAObjectItf *pMix,
                                     XAuint32 numInterfaces,
                                     const XAInterfaceID *pInterfaceIds,
                                     const XAboolean *pInterfaceRequired)
@@ -61,6 +65,9 @@
     XAuint32 itfIdx = 0;
     DEBUG_API("->XAOMixImpl_CreateOutputMix");
     XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
+
+    
+    
     if(!pMix)
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
@@ -126,28 +133,25 @@
     }
     /* Mark interfaces that can be handled dynamically */
     pBaseObj->interfaceMap[OMIX_EQUALIZERITF].isDynamic = XA_BOOLEAN_TRUE;
-#ifdef _GSTREAMER_BACKEND_
-    /* Create outputmix adaptation context */
-    pImpl->adaptationCtx = XAOutputMixAdapt_Create();
-#endif 
-    
+
     /* This code is put here to return Feature Not Supported since adaptation is not present*/
     /*************************************************/
     XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
     XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
     DEBUG_ERR("Required interface not found - abort creation!");
     return XA_RESULT_FEATURE_UNSUPPORTED;
-    /*************************************************/
+    /*************************************************/    
     
-    /* Set ObjectItf to point to newly created object */
-/*
+/*    // Create outputmix adaptation context 
+    pImpl->adaptationCtx = XAOutputMixAdapt_Create();
+ 
+     //Set ObjectItf to point to newly created object 
     *pMix = (XAObjectItf)&(pBaseObj->self);
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
    
     DEBUG_API("<-XAOMixImpl_CreateOutputMix");
-    return XA_RESULT_SUCCESS;
-*/
+    return XA_RESULT_SUCCESS;*/
 }
 
 /*
@@ -187,9 +191,9 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
+
         *pInterfaceId = *(xaOMixItfIIDs[index]);
-#endif
+
         DEBUG_API("<-XAOMixImpl_QuerySupportedInterfaces");
         return XA_RESULT_SUCCESS;
     }
@@ -206,12 +210,12 @@
  */
 XAresult XAOMixImpl_DoRealize(XAObjectItf self)
 {
-#ifdef _GSTREAMER_BACKEND_
+
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAOMixImpl_DoRealize");
     XAOMixImpl* pMixImpl = (XAOMixImpl*)(pObj);
     XAuint8 itfIdx = 0;
+    DEBUG_API("->XAOMixImpl_DoRealize");
     XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
 
     /* check casting from correct pointer type */
@@ -225,7 +229,7 @@
     }
 
     /* Initialize adaptation */
-    ret = XAOutputMixAdapt_PostInit( pMixImpl->adaptationCtx );
+    ret = XAOutputMixAdapt_PostInit( (XAAdaptationGstCtx*)pMixImpl->adaptationCtx );
     if( ret != XA_RESULT_SUCCESS )
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
@@ -283,7 +287,7 @@
 
     pObj->state = XA_OBJECT_STATE_REALIZED;
     XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-#endif    
+    
     DEBUG_API("<-XAOMixImpl_DoRealize");
     return XA_RESULT_SUCCESS;
 }
@@ -306,7 +310,7 @@
  */
 void XAOMixImpl_FreeResources(XAObjectItf self)
 {
-#ifdef _GSTREAMER_BACKEND_
+
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAOMixImpl* pImpl = (XAOMixImpl*)(*self);
     XAuint8 itfIdx = 0;
@@ -316,7 +320,7 @@
 
     if ( pImpl->adaptationCtx != NULL )
     {
-        XAOutputMixAdapt_Destroy( pImpl->adaptationCtx );
+        XAOutputMixAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
         pImpl->adaptationCtx = NULL;
     }
 
@@ -352,12 +356,12 @@
 
     if ( pImpl->adaptationCtx != NULL )
     {
-        XAOutputMixAdapt_Destroy( pImpl->adaptationCtx );
+        XAOutputMixAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
         pImpl->adaptationCtx = NULL;
     }
 
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSOutputMix);
-#endif    
+    
     DEBUG_API("<-XAOMixImpl_FreeResources");
 }
 
@@ -370,10 +374,10 @@
  */
 XAresult XAOMixImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
 {
-#ifdef _GSTREAMER_BACKEND_
+
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
     XAOMixImpl* pImpl = (XAOMixImpl*)(pObj);
-#endif
+
     XAresult ret = XA_RESULT_SUCCESS;
     DEBUG_API("->XAOMixImpl_DoAddItf");
     if(mapEntry)
@@ -381,9 +385,9 @@
         switch( mapEntry->mapIdx )
         {
         case OMIX_EQUALIZERITF:
-#ifdef _GSTREAMER_BACKEND_
+
             mapEntry->pItf = XAEqualizerItfImpl_Create( pImpl->adaptationCtx );
-#endif
+
             break;
         default:
             DEBUG_ERR("XAOMixImpl_DoAddItf unknown id");
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmix.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/outputmix/xaoutputmix.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,9 +21,8 @@
 #include "openmaxalwrapper.h"
 #include "xaobjectitf.h"
 #include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "../adaptation/XAOutputMixAdaptCtx.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 
 
@@ -51,10 +50,9 @@
     /* Parent for XAMediaPlayerImpl */
     XAObjectItfImpl baseObj;
 
-#ifdef _GSTREAMER_BACKEND_
     /* variables */
     XAAdaptationBaseCtx* adaptationCtx;
-#endif
+
 } XAOMixImpl;
 
 
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmixitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/outputmix/xaoutputmixitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -16,9 +16,9 @@
 */
 
 #include "xaoutputmixitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAOutputMixItfAdaptation.h"
-#endif
+
+#include "xaoutputmixitfadaptation.h"
+
 #include <assert.h>
 #include "xathreadsafety.h"
 #include "e32def.h"
@@ -65,9 +65,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs(impl->adapCtx, pNumDevices, pDeviceIDs );
-#endif
+
+    ret = XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs((XAAdaptationGstCtx*)impl->adapCtx, pNumDevices, pDeviceIDs );
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
     DEBUG_API_A1("<-XAOutputMixItfImpl_GetDestinationOutputDeviceIDs - pNumDevices %ld",*pNumDevices);
     return ret;
@@ -97,7 +97,7 @@
    impl->callback = callback;
    impl->cbContext = pContext;
    impl->cbPtrToSelf = self;
-#ifdef _GSTREAMER_BACKEND_
+
    if(callback)
    {   /* start listening */
        XAAdaptationBase_AddEventHandler( impl->adapCtx, &XAOutputMixItfImpl_AdaptCb, XA_OUTPUTMIXITFEVENTS, (void*)self );
@@ -106,7 +106,7 @@
    {   /* stop listening */
        XAAdaptationBase_RemoveEventHandler( impl->adapCtx, &XAOutputMixItfImpl_AdaptCb );
    }
-#endif
+
 
    DEBUG_API("<-XAOutputMixItfImpl_RegisterDeviceChangeCallback");
    return ret;
@@ -135,9 +135,9 @@
        return XA_RESULT_PARAMETER_INVALID;
    }
 
-#ifdef _GSTREAMER_BACKEND_
-   ret = XAOutputMixItfAdapt_ReRoute(impl->adapCtx, numOutputDevices, pOutputDeviceIDs );
-#endif
+
+   ret = XAOutputMixItfAdapt_ReRoute((XAAdaptationGstCtx*)impl->adapCtx, numOutputDevices, pOutputDeviceIDs );
+
 
    XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
    DEBUG_API("<-XAOutputMixItfImpl_ReRoute");
@@ -148,7 +148,7 @@
 /**
  * XAVolumeItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_
+
 
 /*
  * XAOutputMixItfImpl* XAOutputMixItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
@@ -223,4 +223,4 @@
 
      DEBUG_API("<-XAOutputMixItfImpl_AdaptCb");
 }
-#endif
+
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmixitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/outputmix/xaoutputmixitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XAOUTPUTMIXITF_H_
 #define XAOUTPUTMIXITF_H_
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 
 /** TYPES **/
@@ -40,10 +37,9 @@
 
     /* Variables */
 
-#ifdef _GSTREAMER_BACKEND_
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
     XAuint32 eventFlags;
     xaMixDeviceChangeCallback callback;
     void    *cbContext;
@@ -58,11 +54,11 @@
 XAresult XAOutputMixItfImpl_RegisterDeviceChangeCallback( XAOutputMixItf self, xaMixDeviceChangeCallback callback, void * pContext);
 XAresult XAOutputMixItfImpl_ReRoute( XAOutputMixItf self, XAint32 numOutputDevices, XAuint32 * pOutputDeviceIDs);
 
-#ifdef _GSTREAMER_BACKEND_
+
 /* XAOutputMixItfImpl -specific methods */
 XAOutputMixItfImpl* XAOutputMixItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
 void XAOutputMixItfImpl_Free(XAOutputMixItfImpl* self);
 void XAOutputMixItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
+
 
 #endif /* XAOUTPUTMIXITF_H_ */
--- a/khronosfws/openmax_al/src/radio/xaradiodevice.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradiodevice.c	Fri Apr 30 19:18:45 2010 -0500
@@ -24,7 +24,7 @@
 #include "xadynintmgmtitf.h"
 #include "xardsitf.h"
 #include "xathreadsafety.h"
-
+#include "xaradioadaptctx.h"
 /* Static mapping of enumeration XARadioDeviceInterfaces to interface iids */
 static const XAInterfaceID* XARadioDeviceItfIIDs[RADIO_ITFCOUNT]=
 {
@@ -42,7 +42,8 @@
 /* XAResult XARadioDeviceImpl_Create
  * Description: Create object
  */
-XAresult XARadioDeviceImpl_CreateRadioDevice(XAObjectItf* pDevice,
+XAresult XARadioDeviceImpl_CreateRadioDevice(FrameworkMap* mapper,
+                                             XAObjectItf* pDevice,
                                              XAuint32 numInterfaces,
                                              const XAInterfaceID * pInterfaceIds,
                                              const XAboolean * pInterfaceRequired)
@@ -53,6 +54,7 @@
 
     DEBUG_API("->XARadioDeviceImpl_Create");
     XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
+   
     if( !pDevice )
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
@@ -118,23 +120,21 @@
             }
         }
     }
-#ifdef _GSTREAMER_BACKEND_
-    /* Initialize XARadioDeviceImpl variables */
-    pImpl->adaptationCtx = XARadioAdapt_Create();
-#endif
     
     /* This code is put here to return Feature Not Supported since adaptation is not present*/
     /*************************************************/
+    DEBUG_ERR("Required interface not found - abort creation!");
     XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_ERR("Required interface not found - abort creation!");
     DEBUG_API("<-XARadioDeviceImpl_CreateRadioDevice");
     return XA_RESULT_FEATURE_UNSUPPORTED;  
     /*************************************************/
     
-    
-    /* Set ObjectItf to point to newly created object */
-/*    *pDevice = (XAObjectItf)&(pBaseObj->self);
+/*    // Initialize XARadioDeviceImpl variables 
+    pImpl->adaptationCtx = XARadioAdapt_Create();
+
+     //Set ObjectItf to point to newly created object 
+    *pDevice = (XAObjectItf)&(pBaseObj->self);
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioDeviceImpl_Create");
@@ -215,9 +215,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
+
     ret = XARadioAdapt_PostInit( pObjImpl->adaptationCtx );
-#endif
+
     if( ret != XA_RESULT_SUCCESS )
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
@@ -235,9 +235,9 @@
             switch( itfIdx )
             {
                 case RADIO_RADIOITF:
-#ifdef _GSTREAMER_BACKEND_
+
                     pItf = XARadioItfImpl_Create( pObjImpl->adaptationCtx );
-#endif
+
                     break;
                 case RADIO_CONFIGEXTENSIONITF:
                     pItf = XAConfigExtensionsItfImpl_Create();
@@ -246,9 +246,9 @@
                     pItf = XADIMItfImpl_Create();
                     break;
                 case RADIO_RDSITF:
-#ifdef _GSTREAMER_BACKEND_
+
                    pItf = XARDSItfImpl_Create( pObjImpl->adaptationCtx );
-#endif
+
                    break;
                 default:
                     break;
@@ -291,14 +291,14 @@
 void XARadioDeviceImpl_FreeResources(XAObjectItf self)
 {
     XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    
+    XARadioDeviceImpl* pImpl = (XARadioDeviceImpl*)(*self);
     XAuint8 itfIdx = 0;
     DEBUG_API("->XARadioDeviceImpl_FreeResources");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSRadio);
-#ifdef _GSTREAMER_BACKEND_
-    XARadioDeviceImpl* pImpl = (XARadioDeviceImpl*)(*self);
+
+    
     assert( pObj && pImpl && pObj == pObj->self );
-#endif
+
 
     /* free all allocated interfaces */
     for(itfIdx = 0; itfIdx < RADIO_ITFCOUNT; itfIdx++)
@@ -327,13 +327,13 @@
         }
     }
 
-#ifdef _GSTREAMER_BACKEND_
+
     if ( pImpl->adaptationCtx != NULL )
     {
         XARadioAdapt_Destroy( pImpl->adaptationCtx );
         pImpl->adaptationCtx = NULL;
     }
-#endif
+
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSRadio);
     DEBUG_API("<-XARadioDeviceImpl_FreeResources");
     return;
--- a/khronosfws/openmax_al/src/radio/xaradiodevice.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradiodevice.h	Fri Apr 30 19:18:45 2010 -0500
@@ -21,9 +21,8 @@
 #include "openmaxalwrapper.h"
 #include "xaobjectitf.h"
 #include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "../adaptation/XARadioAdaptCtx.h"
-#endif
+
+#include "xaadptbasectx.h"
 /** MACROS **/
 
 
@@ -51,9 +50,7 @@
 
     /* variables */
 
-#ifdef _GSTREAMER_BACKEND_
     XAAdaptationBaseCtx* adaptationCtx;
-#endif
 } XARadioDeviceImpl;
 
 
--- a/khronosfws/openmax_al/src/radio/xaradioitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradioitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -20,9 +20,9 @@
 #include <assert.h>
 #include <string.h>
 #include "xaradioitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XARadioItfAdaptation.h"
-#endif
+
+#include "xaradioitfadaptation.h"
+
 #include "xathreadsafety.h"
 
 /**
@@ -54,9 +54,9 @@
 XAresult XARadioItfImpl_SetFreqRange(XARadioItf self, XAuint8 range)
 {
     XAresult ret = XA_RESULT_SUCCESS;
-#ifdef _GSTREAMER_BACKEND_
+
     XAboolean isSupported = XA_BOOLEAN_FALSE;
-#endif
+
     XARadioItfImpl* impl = GetImpl(self);
 
     DEBUG_API("->XARadioItfImpl_SetFreqRange");
@@ -72,14 +72,14 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_IsFreqRangeSupported(impl->adapCtx, range, &isSupported);
+
+    ret = XARadioItfAdapt_IsFreqRangeSupported((XAAdaptationGstCtx*)impl->adapCtx, range, &isSupported);
 
     if ( ret == XA_RESULT_SUCCESS && isSupported == XA_BOOLEAN_TRUE )
     {
-        ret = XARadioItfAdapt_SetFreqRange(impl->adapCtx, range);
+        ret = XARadioItfAdapt_SetFreqRange((XAAdaptationGstCtx*)impl->adapCtx, range);
     }
-#endif
+
     
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_SetFreqRange");
@@ -106,9 +106,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_GetFreqRange( impl->adapCtx, pRange);
-#endif
+
+    ret = XARadioItfAdapt_GetFreqRange( (XAAdaptationGstCtx*)impl->adapCtx, pRange);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_GetFreqRange");
     return ret;
@@ -138,9 +138,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_IsFreqRangeSupported( impl->adapCtx, range, pSupported );
-#endif
+
+    ret = XARadioItfAdapt_IsFreqRangeSupported( (XAAdaptationGstCtx*)impl->adapCtx, range, pSupported );
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_IsFreqRangeSupported");
     return ret;
@@ -176,9 +176,9 @@
         DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
         return XA_RESULT_PARAMETER_INVALID;
     }
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_IsFreqRangeSupported( impl->adapCtx, range, &isSupported );
-#endif
+
+    ret = XARadioItfAdapt_IsFreqRangeSupported( (XAAdaptationGstCtx*)impl->adapCtx, range, &isSupported );
+
     if (isSupported != XA_BOOLEAN_TRUE || ret != XA_RESULT_SUCCESS)
     {
         XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
@@ -188,10 +188,10 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_GetFreqRangeProperties( impl->adapCtx,
+
+    ret = XARadioItfAdapt_GetFreqRangeProperties( (XAAdaptationGstCtx*)impl->adapCtx,
             range, pMinFreq, pMaxFreq, pFreqInterval );
-#endif
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
     return ret;
@@ -220,9 +220,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_SetFrequency( impl->adapCtx, freq );
-#endif
+
+    ret = XARadioItfAdapt_SetFrequency( (XAAdaptationGstCtx*)impl->adapCtx, freq );
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_SetFrequency");
     return ret;
@@ -251,9 +251,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_CancelSetFrequency( impl->adapCtx );
-#endif
+
+    ret = XARadioItfAdapt_CancelSetFrequency( (XAAdaptationGstCtx*)impl->adapCtx );
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_CancelSetFrequency");
     return ret;
@@ -279,9 +279,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_GetFrequency( impl->adapCtx, pFreq);
-#endif
+
+    ret = XARadioItfAdapt_GetFrequency( (XAAdaptationGstCtx*)impl->adapCtx, pFreq);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_GetFrequency");
     return ret;
@@ -309,9 +309,9 @@
 
     if (impl->squelch != squelch)
     {
-#ifdef _GSTREAMER_BACKEND_
-        ret = XARadioItfAdapt_SetSquelch( impl->adapCtx, squelch );
-#endif
+
+        ret = XARadioItfAdapt_SetSquelch( (XAAdaptationGstCtx*)impl->adapCtx, squelch );
+
         if ( ret == XA_RESULT_SUCCESS )
         {
             impl->squelch = squelch;
@@ -368,9 +368,9 @@
 
     if ( impl->stereoMode != mode)
     {
-#ifdef _GSTREAMER_BACKEND_
-        ret = XARadioItfAdapt_SetStereoMode( impl->adapCtx, mode );
-#endif
+
+        ret = XARadioItfAdapt_SetStereoMode( (XAAdaptationGstCtx*)impl->adapCtx, mode );
+
         if ( ret == XA_RESULT_SUCCESS )
         {
             impl->stereoMode = mode;
@@ -426,9 +426,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_GetSignalStrength( impl->adapCtx, pStrength );
-#endif
+
+    ret = XARadioItfAdapt_GetSignalStrength( (XAAdaptationGstCtx*)impl->adapCtx, pStrength );
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_GetSignalStrength");
     return ret;
@@ -458,9 +458,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_Seek( impl->adapCtx, upwards );
-#endif
+
+    ret = XARadioItfAdapt_Seek( (XAAdaptationGstCtx*)impl->adapCtx, upwards );
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_Seek");
     return ret;
@@ -488,9 +488,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARadioItfAdapt_StopSeeking( impl->adapCtx );
-#endif
+
+    ret = XARadioItfAdapt_StopSeeking( (XAAdaptationGstCtx*)impl->adapCtx );
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_StopSeeking");
     return ret;
@@ -579,7 +579,7 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
+
     
     free(impl->presets[preset].name);
 
@@ -588,7 +588,7 @@
     impl->presets[preset].stereoMode = mode;
     impl->presets[preset].name = calloc(1, RADIO_PRESET_NAME_MAX_LENGTH+1);
     strncpy( impl->presets[preset].name, (char*)name, RADIO_PRESET_NAME_MAX_LENGTH );
-#endif
+
     DEBUG_API("<-XARadioItfImpl_SetPreset");
     return ret;
 }
@@ -633,7 +633,7 @@
             DEBUG_API("<-XARadioItfImpl_GetPreset");
             return XA_RESULT_PARAMETER_INVALID;
         }
-#ifdef _GSTREAMER_BACKEND_
+
         *pFreq = impl->presets[preset].freq;
         *pRange = impl->presets[preset].range;
         *pMode = impl->presets[preset].stereoMode;
@@ -646,7 +646,7 @@
         {
             strncpy( (char*)pName, impl->presets[preset].name, RADIO_PRESET_NAME_MAX_LENGTH );
         }
-#endif        
+        
     }
     /*Just adding some meaninful value, when supporting new spec this must be fetch the system*/
     *pNameLength = RADIO_PRESET_NAME_MAX_LENGTH;
@@ -688,7 +688,6 @@
 /**
  * XARadioItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_
 
 /**
  * XARadioItfImplImpl* XARadioItfImpl_Create()
@@ -756,18 +755,18 @@
     DEBUG_API("<-XARadioItfImpl_Create");
     return self;
 }
-#endif
+
 /**
  * void XARadioItfImpl_Free(XARadioItfImpl* self)
  * Description: Free all resources reserved at XARadioItfImpl_Create
  **/
 void XARadioItfImpl_Free(XARadioItfImpl* self)
 {
-    
+    XAuint16 index = 0;
     DEBUG_API("->XARadioItfImpl_Free");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSRadio);
-#ifdef _GSTREAMER_BACKEND_
-    XAuint16 index = 0;
+
+    
     XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XARadioItfImpl_AdaptCb );
 
     XARadioItfAdapt_Free(self->adapCtx);
@@ -776,14 +775,14 @@
     {
         free(self->presets[index].name);
     }
-#endif
+
     assert(self==self->self);
     free(self);
 
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_Free");
 }
-#ifdef _GSTREAMER_BACKEND_
+
 /* void XARadioItfimpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
  * Description: Event handler for adaptation events
  */
@@ -821,5 +820,5 @@
     }
     DEBUG_API("<-XARadioItfimpl_AdaptCb");
 }
-#endif
 
+
--- a/khronosfws/openmax_al/src/radio/xaradioitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradioitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,12 +18,9 @@
 #ifndef XARADIOITF_H
 #define XARADIOITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#include "XARadioItfAdaptation.h"
-#endif
+#include "xaadptbasectx.h"
+#include "xaradioitfadaptation.h"
+
 /** MACROS **/
 #define RADIO_PRESET_NAME_MAX_LENGTH 20
 
@@ -57,17 +54,14 @@
     XAuint32    preset;
     XAuint32    numOfPresets;
 
-#ifdef _GSTREAMER_BACKEND_
     RadioPreset presets[RADIO_NUM_OF_PRESETS];
-#endif
+
     XARadioItf         cbPtrToSelf;
     xaRadioCallback    callback;
     void               *context;
 
-#ifdef _GSTREAMER_BACKEND_
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
 } XARadioItfImpl;
 
 /** METHODS **/
@@ -127,12 +121,11 @@
 XAresult XARadioItfImpl_RegisterRadioCallback(XARadioItf self,
                                               xaRadioCallback callback,
                                               void * pContext);
-#ifdef _GSTREAMER_BACKEND_
 
 /* XARadioItfImpl -specific methods */
 XARadioItfImpl* XARadioItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
 void XARadioItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
+
 void XARadioItfImpl_Free(XARadioItfImpl* self);
 
 #endif /* XARADIOITF_H */
--- a/khronosfws/openmax_al/src/radio/xardsitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xardsitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xardsitf.h"
-/*#include "XARDSItfAdaptation.h"*/
+#include "xardsitfadaptation.h"
 #include "xathreadsafety.h"
-
+#include "xaadaptationgst.h"
 /**
  * XARDSItfImpl* GetImpl(XARDSItf self)
  * Description: Validated interface pointer and cast it to implementations pointer.
@@ -62,9 +62,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_QueryRDSSignal(impl->adapCtx, isSignal);
-#endif
+
+    ret = XARDSItfAdapt_QueryRDSSignal((XAAdaptationGstCtx*)impl->adapCtx, isSignal);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_QueryRDSSignal");
     return ret;
@@ -87,9 +87,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetProgrammeServiceName(impl->adapCtx, ps);
-#endif
+
+    ret = XARDSItfAdapt_GetProgrammeServiceName((XAAdaptationGstCtx*)impl->adapCtx, ps);
+
     DEBUG_API("<-XARDSItfImpl_GetProgrammeServiceName");
     return ret;
 }
@@ -114,9 +114,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetRadioText(impl->adapCtx, rt);
-#endif
+
+    ret = XARDSItfAdapt_GetRadioText((XAAdaptationGstCtx*)impl->adapCtx, rt);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetRadioText");
     return ret;
@@ -152,10 +152,10 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetRadioTextPlus(impl->adapCtx, contentType, informationElement,
+
+    ret = XARDSItfAdapt_GetRadioTextPlus((XAAdaptationGstCtx*)impl->adapCtx, contentType, informationElement,
                                         descriptor, descriptorContentType);
-#endif
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetRadioTextPlus");
     return ret;
@@ -182,9 +182,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetProgrammeType(impl->adapCtx, pty);
-#endif
+
+    ret = XARDSItfAdapt_GetProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty);
+
     DEBUG_API("<-XARDSItfImpl_GetProgrammeType");
     return ret;
 }
@@ -216,9 +216,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetProgrammeTypeString(impl->adapCtx, isLengthMax16, pty);
-#endif
+
+    ret = XARDSItfAdapt_GetProgrammeTypeString((XAAdaptationGstCtx*)impl->adapCtx, isLengthMax16, pty);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetProgrammeTypeString");
     return ret;
@@ -247,9 +247,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetProgrammeIdentificationCode(impl->adapCtx, pi);
-#endif
+
+    ret = XARDSItfAdapt_GetProgrammeIdentificationCode((XAAdaptationGstCtx*)impl->adapCtx, pi);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetProgrammeIdentificationCode");
     return ret;
@@ -275,9 +275,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetClockTime(impl->adapCtx, dateAndTime);
-#endif
+
+    ret = XARDSItfAdapt_GetClockTime((XAAdaptationGstCtx*)impl->adapCtx, dateAndTime);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetClockTime");
     return ret;
@@ -303,9 +303,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetTrafficAnnouncement(impl->adapCtx, ta);
-#endif
+
+    ret = XARDSItfAdapt_GetTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, ta);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetTrafficAnnouncement");
     return ret;
@@ -331,9 +331,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetTrafficProgramme(impl->adapCtx, tp);
-#endif
+
+    ret = XARDSItfAdapt_GetTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, tp);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetTrafficProgramme");
     return ret;
@@ -368,9 +368,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_SeekByProgrammeType(impl->adapCtx, pty, upwards);
-#endif
+
+    ret = XARDSItfAdapt_SeekByProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty, upwards);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_SeekByProgrammeType");
     return ret;
@@ -401,9 +401,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_SeekTrafficAnnouncement(impl->adapCtx, upwards);
-#endif
+
+    ret = XARDSItfAdapt_SeekTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, upwards);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_SeekTrafficAnnouncement");
     return ret;
@@ -434,9 +434,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_SeekTrafficProgramme(impl->adapCtx, upwards);
-#endif
+
+    ret = XARDSItfAdapt_SeekTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, upwards);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_SeekTrafficProgramme");
     return ret;
@@ -464,9 +464,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_SetAutomaticSwitching(impl->adapCtx, automatic);
-#endif
+
+    ret = XARDSItfAdapt_SetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_SetAutomaticSwitching");
     return ret;
@@ -492,9 +492,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetAutomaticSwitching(impl->adapCtx, automatic);
-#endif
+
+    ret = XARDSItfAdapt_GetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetAutomaticSwitching");
     return ret;
@@ -521,9 +521,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_SetAutomaticTrafficAnnouncement(impl->adapCtx, automatic);
-#endif
+
+    ret = XARDSItfAdapt_SetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_SetAutomaticTrafficAnnouncement");
     return ret;
@@ -551,9 +551,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_GetAutomaticTrafficAnnouncement(impl->adapCtx, automatic);
-#endif
+
+    ret = XARDSItfAdapt_GetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_GetAutomaticTrafficAnnouncement");
     return ret;
@@ -596,9 +596,9 @@
 
     if (callback)
     {
-#ifdef _GSTREAMER_BACKEND_
-        ret = XARDSItfAdapt_GetODAGroup(impl->adapCtx, AID);
-#endif
+
+        ret = XARDSItfAdapt_GetODAGroup((XAAdaptationGstCtx*)impl->adapCtx, AID);
+
     }
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
@@ -634,9 +634,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_SubscribeODAGroup(impl->adapCtx, group, useErrorCorrection);
-#endif
+
+    ret = XARDSItfAdapt_SubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group, useErrorCorrection);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_SubscribeODAGroup");
     return ret;
@@ -666,9 +666,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    ret = XARDSItfAdapt_UnsubscribeODAGroup(impl->adapCtx, group);
-#endif
+
+    ret = XARDSItfAdapt_UnsubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_UnsubscribeODAGroup");
     return ret;
@@ -698,9 +698,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
-    XARDSItfAdapt_ListODAGroupSubscriptions(impl->adapCtx, pGroups, pLength);
-#endif
+
+    XARDSItfAdapt_ListODAGroupSubscriptions((XAAdaptationGstCtx*)impl->adapCtx, pGroups, pLength);
+
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_ListODAGroupSubscriptions");
     return ret;
@@ -772,7 +772,7 @@
 /**
  * XARDSItfImpl -specific methods
  **/
-#ifdef _GSTREAMER_BACKEND_
+
 
 /**
  * XARDSItfImplImpl* XARDSItfImpl_Create()
@@ -859,7 +859,7 @@
     }
     DEBUG_API("<-XARDSItfImpl_AdaptCb");
 }
-#endif
+
 /**
  * void XARDSItfImpl_Free(XARDSItfImpl* self)
  * @param  XARDSItfImpl* self -
@@ -869,11 +869,11 @@
     DEBUG_API("->XARDSItfImpl_Free");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSRadio);
     assert(self==self->self);
-#ifdef _GSTREAMER_BACKEND_
+
     XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XARDSItfImpl_AdaptCb );
 
     XARDSItfAdapt_Free(self->adapCtx);
-#endif
+
     free(self);
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSRadio);
     DEBUG_API("<-XARDSItfImpl_Free");
--- a/khronosfws/openmax_al/src/radio/xardsitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xardsitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,12 +18,7 @@
 #ifndef XARDSITF_H
 #define XARDSITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAAdaptationContextBase.h"
-#include "XARDSItfAdaptation.h"
-#endif
+#include "xaadptbasectx.h"
 /** MACROS **/
 /** TYPES **/
 
@@ -52,10 +47,8 @@
     void                   *odaDataContext;
     XARDSItf               odaDataCbPtrToSelf;
 
-#ifdef _GSTREAMER_BACKEND_
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
 } XARDSItfImpl;
 
 /** METHODS **/
@@ -126,13 +119,12 @@
 XAresult XARDSItfImpl_RegisterODADataCallback(XARDSItf self,
                                               xaNewODADataCallback callback,
                                               void * pContext);
-#ifdef _GSTREAMER_BACKEND_
+
 
 /* XARDSItfImpl -specific methods */
 XARDSItfImpl* XARDSItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
 
 void XARDSItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-#endif
 void XARDSItfImpl_Free(XARDSItfImpl* self);
 
 #endif /* XARDSITF_H */
--- a/khronosfws/openmax_al/src/vibra/xavibradevice.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/vibra/xavibradevice.c	Fri Apr 30 19:18:45 2010 -0500
@@ -22,7 +22,7 @@
 #include "xavibraitf.h"
 #include "xaconfigextensionsitf.h"
 #include "xadynintmgmtitf.h"
-
+#include "xavibraadaptctx.h"
 
 /* Static mapping of enumeration XAVibraDeviceInterfaces to interface iids */
 static const XAInterfaceID* XAVibraDeviceItfIIDs[VIBRA_ITFCOUNT]=
@@ -41,7 +41,8 @@
  * XAresult XAVibraDeviceImpl_CreateVibraDevice
  * Description: Create object
  */
-XAresult XAVibraDeviceImpl_CreateVibraDevice(XAObjectItf* pDevice,
+XAresult XAVibraDeviceImpl_CreateVibraDevice(FrameworkMap* mapper,
+                                             XAObjectItf* pDevice,
                                              XAuint32 deviceID,
                                              XAuint32 numInterfaces,
                                              const XAInterfaceID * pInterfaceIds,
@@ -116,23 +117,22 @@
         }
     }
 
-    /* Initialize XAVibraDeviceImpl variables */
-    pImpl->deviceID = deviceID;
-
-#ifdef _GSTREAMER_BACKEND_
-    pImpl->adaptationCtx = XAVibraAdapt_Create(pImpl->deviceID);
-#endif
-    
     /* This code is put here to return Feature Not Supported since adaptation is not present*/
     /*************************************************/
+    DEBUG_ERR("Required interface not found - abort creation!");
     XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
-    DEBUG_ERR("Required interface not found - abort creation!");
     DEBUG_API("<-XAVibraDeviceImpl_CreateVibraDevice");
     return XA_RESULT_FEATURE_UNSUPPORTED;
     /*************************************************/
     
-    /* Set ObjectItf to point to newly created object */
-/*    *pDevice = (XAObjectItf)&(pBaseObj->self);
+/*    // Initialize XAVibraDeviceImpl variables 
+    pImpl->deviceID = deviceID;
+
+
+    pImpl->adaptationCtx = XAVibraAdapt_Create(pImpl->deviceID);
+
+     //Set ObjectItf to point to newly created object 
+    *pDevice = (XAObjectItf)&(pBaseObj->self);
 
     DEBUG_API("<-XAVibraDeviceImpl_Create");
     return XA_RESULT_SUCCESS;*/
@@ -205,9 +205,9 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-#ifdef _GSTREAMER_BACKEND_
+
     ret = XAVibraAdapt_PostInit( pObjImpl->adaptationCtx );
-#endif
+
     if( ret != XA_RESULT_SUCCESS )
     {
         DEBUG_API("<-XAVibraDeviceImpl_DoRealize");
@@ -224,9 +224,9 @@
             switch( itfIdx )
             {
                 case VIBRA_VIBRAITF:
-#ifdef _GSTREAMER_BACKEND_
+
                     pItf = XAVibraItfImpl_Create(pObjImpl->adaptationCtx);
-#endif
+
                     break;
                 case VIBRA_CONFIGEXTENSIONITF:
                     pItf = XAConfigExtensionsItfImpl_Create();
@@ -272,18 +272,18 @@
 void XAVibraDeviceImpl_FreeResources(XAObjectItf self)
 {
     XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
-    
+    XAVibraDeviceImpl* pImpl = (XAVibraDeviceImpl*) (*self);
     XAuint8 itfIdx = 0;
     DEBUG_API("->XAVibraDeviceImpl_FreeResources");
-#ifdef _GSTREAMER_BACKEND_
-    XAVibraDeviceImpl* pImpl = (XAVibraDeviceImpl*) (*self);
+
+    
     assert( pObj && pImpl && pObj == pObj->self );
     if (pImpl->adaptationCtx != NULL)
     {
         XAVibraAdapt_Destroy(pImpl->adaptationCtx);
         pImpl->adaptationCtx = NULL;
     }
-#endif
+
     /* free all allocated interfaces */
     for (itfIdx = 0; itfIdx < VIBRA_ITFCOUNT; itfIdx++)
     {
--- a/khronosfws/openmax_al/src/vibra/xavibradevice.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/vibra/xavibradevice.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,12 +18,8 @@
 #ifndef XAVIBRADEVICE_H
 #define XAVIBRADEVICE_H
 
-#include "openmaxalwrapper.h"
 #include "xaobjectitf.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "../adaptation/XAVibraAdaptCtx.h"
-#endif
+#include "xaadptbasectx.h"
 /** MACROS **/
 
 
@@ -51,9 +47,8 @@
     /* variables */
     XAuint32 deviceID;
 
-#ifdef _GSTREAMER_BACKEND_
     XAAdaptationBaseCtx* adaptationCtx;
-#endif
+
 } XAVibraDeviceImpl;
 
 /** METHODS **/
--- a/khronosfws/openmax_al/src/vibra/xavibraitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/vibra/xavibraitf.c	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,9 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xavibraitf.h"
-#ifdef _GSTREAMER_BACKEND_
-#include "XAVibraItfAdaptation.h"
-#endif
+
+#include "xavibraitfadaptation.h"
+
 #include "xathreadsafety.h"
 /* XAVibraItfImpl* GetImpl(XAVibraItf self)
  * Description: Validate interface pointer and cast it to implementation pointer.
@@ -66,9 +66,9 @@
     /* check is vibrate mode changed */
     if( impl->vibrate != vibrate )
     {
-#ifdef _GSTREAMER_BACKEND_
-        ret = XAVibraItfAdapt_Vibrate( impl->adapCtx, vibrate );
-#endif
+
+        ret = XAVibraItfAdapt_Vibrate( (XAAdaptationGstCtx*)impl->adapCtx, vibrate );
+
         if ( ret == XA_RESULT_SUCCESS )
         {
             impl->vibrate = vibrate;
@@ -135,9 +135,9 @@
     /* check is vibration frequency changed */
     if( impl->frequency != frequency )
     {
-#ifdef _GSTREAMER_BACKEND_
-        ret = XAVibraItfAdapt_SetFrequency( impl->adapCtx, frequency );
-#endif
+
+        ret = XAVibraItfAdapt_SetFrequency( (XAAdaptationGstCtx*)impl->adapCtx, frequency );
+
         if( ret == XA_RESULT_SUCCESS )
         {
             impl->frequency = frequency;
@@ -194,9 +194,9 @@
     /* check is vibration intensity changed */
     if( impl->intensity != intensity )
     {
-#ifdef _GSTREAMER_BACKEND_
-        ret = XAVibraItfAdapt_SetIntensity( impl->adapCtx, intensity );
-#endif
+
+        ret = XAVibraItfAdapt_SetIntensity( (XAAdaptationGstCtx*)impl->adapCtx, intensity );
+
         if( ret == XA_RESULT_SUCCESS )
         {
             impl->intensity = intensity;
@@ -232,7 +232,7 @@
     return ret;
 }
 
-#ifdef _GSTREAMER_BACKEND_
+
 
 /*****************************************************************************
  * XAVibraItfImpl -specific methods
@@ -266,7 +266,7 @@
     DEBUG_API("<-XAVibraItfImpl_Create");
     return self;
 }
-#endif
+
 /* void XAVibraItfImpl_Free(XAVibraItfImpl* self)
  * Description: Free all resources reserved at XAVibraItfImpl_Create
  */
--- a/khronosfws/openmax_al/src/vibra/xavibraitf.h	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/vibra/xavibraitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -18,11 +18,8 @@
 #ifndef XAVIBRAITF_H
 #define XAVIBRAITF_H
 
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAAdaptationContextBase.h"
-#endif
+#include "xaadptbasectx.h"
+
 /** MACROS **/
 #define MIN_INTENSITY 0
 #define MAX_INTENSITY 1000
@@ -47,10 +44,9 @@
     XAmilliHertz    frequency;
     XApermille      intensity;
 
-#ifdef _GSTREAMER_BACKEND_  
     /*Adaptation variables*/
     XAAdaptationBaseCtx *adapCtx;
-#endif
+
 } XAVibraItfImpl;
 
 /** METHODS **/
@@ -65,9 +61,9 @@
 XAresult XAVibraItfImpl_SetIntensity ( XAVibraItf self, XApermille intensity );
 XAresult XAVibraItfImpl_GetIntensity ( XAVibraItf self, XApermille * pIntensity );
 
-#ifdef _GSTREAMER_BACKEND_  
+ 
 /* XAVibraItfImpl -specific methods*/
 XAVibraItfImpl* XAVibraItfImpl_Create( XAAdaptationBaseCtx *adapCtx );
-#endif
+
 void XAVibraItfImpl_Free(XAVibraItfImpl* self);
 #endif /* XAVIBRAITF_H */
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -841,17 +841,6 @@
 
     // we need to block this until duration is calculated if using mmfplayutility
     iBlockDuration = EFalse;
-// ou1cimx1#205863
-    if (!iDataSourceAdapter->IsLocalPlayback()) 
-    	{
-	    DP0(_L("CAdvancedAudioPlayController::AddDataSourceL not file source"));        
-	    if (iSharedBufferMaxNum <= 2)
-	        {
-	        	iSharedBufferMaxNum = 3;
-	        }
-		 iSharedBufferMaxSize = iSharedBufferMaxSizeForNonSeekableSrc;
-	    DP2(_L("CAdvancedAudioPlayController::AddDataSourceL new iSharedBufferMaxNum[%d] iSharedBufferMaxSize[%d]"), iSharedBufferMaxNum, iSharedBufferMaxSize);
-    	}
     
     if ((!iEventsEnabled) && (!iDataSourceAdapter->OnlyHeaderPresent()))
         {
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioControllerUtility/Src/MP3AudioControllerUtility.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioControllerUtility/Src/MP3AudioControllerUtility.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -175,6 +175,8 @@
 	TInt frameBytes = 0;
 	TInt avgFrameLen = 0;
 	TInt frames = 0;
+	TInt scaling=0;
+	TInt round=0;
 	// We could have used the bitrate found above for CBR MP3 content and not continue to average
 	// the bitrate. However, some users can manipulated the file and append other bitrate content.
 	// Since it is not too difficult, we can update the bitrate above with an averaged bitrate.
@@ -203,6 +205,12 @@
 			frames++;    	        	
 			}	
 		avgFrameLen = frameBytes / frames; // frames is always non-zero here
+		scaling = frameBytes*10/frames;
+		round = scaling%10;
+		if(round > 5)
+		    {
+		     ++avgFrameLen;
+		    }
 		}
 	iBitRate = (avgFrameLen * 8 * iSamplingRate) / iSamplesPerFrame;
 	}
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Src/AACAudioPlayControllerPlugin.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Src/AACAudioPlayControllerPlugin.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -111,6 +111,18 @@
 void CAACAudioPlayControllerPlugin::DoAddDataSourceL()
     {
     DP0(_L("CAACAudioPlayControllerPlugin::DoAddDataSourceL"));
+        // ou1cimx1#205863
+    if (iSourceType != KUidMmfFileSource) 
+    	{
+	    DP0(_L("CAACAudioPlayControllerPlugin::DoAddDataSourceL not file source"));        
+	    if (iSharedBufferMaxNum <= 2)
+	        {
+	        	iSharedBufferMaxNum = 3;
+	        }
+		 iSharedBufferMaxSize = iSharedBufferMaxSizeForNonSeekableSrc;
+	    DP2(_L("CAACAudioPlayControllerPlugin::DoAddDataSourceL new iSharedBufferMaxNum[%d] iSharedBufferMaxSize[%d]"), iSharedBufferMaxNum, iSharedBufferMaxSize);
+    	}
+
 	}
 
 // -----------------------------------------------------------------------------
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Src/AMRAudioPlayControllerPlugin.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Src/AMRAudioPlayControllerPlugin.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -104,6 +104,18 @@
 void CAMRAudioPlayControllerPlugin::DoAddDataSourceL()
     {
     DP0(_L("CAMRAudioPlayControllerPlugin::DoAddDataSourceL"));
+        // ou1cimx1#205863
+    if (iSourceType != KUidMmfFileSource) 
+    	{
+	    DP0(_L("CAMRAudioPlayControllerPlugin::DoAddDataSourceL not file source"));        
+	    if (iSharedBufferMaxNum <= 2)
+	        {
+	        	iSharedBufferMaxNum = 3;
+	        }
+		 iSharedBufferMaxSize = iSharedBufferMaxSizeForNonSeekableSrc;
+	    DP2(_L("CAMRAudioPlayControllerPlugin::DoAddDataSourceL new iSharedBufferMaxNum[%d] iSharedBufferMaxSize[%d]"), iSharedBufferMaxNum, iSharedBufferMaxSize);
+    	}
+
     }
 
 // -----------------------------------------------------------------------------
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/awbaudioplaycontroller/Src/AWBAudioPlayControllerPlugin.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/awbaudioplaycontroller/Src/AWBAudioPlayControllerPlugin.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -103,6 +103,18 @@
 void CAWBAudioPlayControllerPlugin::DoAddDataSourceL()
     {
 DP0(_L("CAWBAudioPlayControllerPlugin::DoAddDataSourceL"));
+    // ou1cimx1#205863
+    if (iSourceType != KUidMmfFileSource) 
+    	{
+	    DP0(_L("CAWBAudioPlayControllerPlugin::DoAddDataSourceL not file source"));        
+	    if (iSharedBufferMaxNum <= 2)
+	        {
+	        	iSharedBufferMaxNum = 3;
+	        }
+		 iSharedBufferMaxSize = iSharedBufferMaxSizeForNonSeekableSrc;
+	    DP2(_L("CAWBAudioPlayControllerPlugin::DoAddDataSourceL new iSharedBufferMaxNum[%d] iSharedBufferMaxSize[%d]"), iSharedBufferMaxNum, iSharedBufferMaxSize);
+    	}
+
     }
 
 // -----------------------------------------------------------------------------
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Src/MP3AudioPlayControllerPlugin.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Src/MP3AudioPlayControllerPlugin.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -102,6 +102,18 @@
 void CMP3AudioPlayControllerPlugin::DoAddDataSourceL()
     {
     DP0(_L("CMP3AudioPlayControllerPlugin::DoAddDataSourceL"));
+    // ou1cimx1#205863
+    if (iSourceType != KUidMmfFileSource) 
+    	{
+	    DP0(_L("CMP3AudioPlayControllerPlugin::DoAddDataSourceL not file source"));        
+	    if (iSharedBufferMaxNum <= 2)
+	        {
+	        	iSharedBufferMaxNum = 3;
+	        }
+		 iSharedBufferMaxSize = iSharedBufferMaxSizeForNonSeekableSrc;
+	    DP2(_L("CMP3AudioPlayControllerPlugin::DoAddDataSourceL new iSharedBufferMaxNum[%d] iSharedBufferMaxSize[%d]"), iSharedBufferMaxNum, iSharedBufferMaxSize);
+    	}
+
     }
 
 // -----------------------------------------------------------------------------
Binary file mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/ActiveScheduledTestModule/data/mmc/metadata/DRM_NRTmeta.dcf has changed
Binary file mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/data/mmc/metadata/DRM_NRTmeta.dcf has changed
Binary file mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/data/mmc/metadata/DRM_NRTmeta.dcf has changed
Binary file mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioStreamTestModule/data/mmc/metadata/DRM_NRTmeta.dcf has changed
Binary file mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioToneTestModule/data/mmc/metadata/DRM_NRTmeta.dcf has changed
--- a/mmfenh/enhancedmediaclient/Client/EABI/EnhancedMediaClient.def	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Client/EABI/EnhancedMediaClient.def	Fri Apr 30 19:18:45 2010 -0500
@@ -12,92 +12,86 @@
 	_ZN10multimedia18CMultimediaFactory19DeleteStreamControlERPNS_14MStreamControlE @ 11 NONAME
 	_ZN10multimedia18CMultimediaFactoryD1Ev @ 12 NONAME
 	_ZN10multimedia18CMultimediaFactoryD2Ev @ 13 NONAME
-	_ZTIN10multimedia10CErrorCodeE @ 14 NONAME ; #<TI>#
-	_ZTIN10multimedia10CEventBaseE @ 15 NONAME ; #<TI>#
-	_ZTIN10multimedia11CSourceBaseE @ 16 NONAME ; #<TI>#
-	_ZTIN10multimedia13CVolumeEffectE @ 17 NONAME ; #<TI>#
-	_ZTIN10multimedia14CEventNotifierE @ 18 NONAME ; #<TI>#
-	_ZTIN10multimedia14CStreamControlE @ 19 NONAME ; #<TI>#
-	_ZTIN10multimedia15CEventQueueItemE @ 20 NONAME ; #<TI>#
-	_ZTIN10multimedia15CMCustomCommandE @ 21 NONAME ; #<TI>#
-	_ZTIN10multimedia16CDownloadGatewayE @ 22 NONAME ; #<TI>#
-	_ZTIN10multimedia16CObserverManagerE @ 23 NONAME ; #<TI>#
-	_ZTIN10multimedia17CClientDataBufferE @ 24 NONAME ; #<TI>#
-	_ZTIN10multimedia18CBufTypeSupEventAOE @ 25 NONAME ; #<TI>#
-	_ZTIN10multimedia18CEffectControlBaseE @ 26 NONAME ; #<TI>#
-	_ZTIN10multimedia18CStateChangedEventE @ 27 NONAME ; #<TI>#
-	_ZTIN10multimedia19CClientProgDLSourceE @ 28 NONAME ; #<TI>#
-	_ZTIN10multimedia19CMmfAudioOutputSinkE @ 29 NONAME ; #<TI>#
-	_ZTIN10multimedia20CDataBufferQueueItemE @ 30 NONAME ; #<TI>#
-	_ZTIN10multimedia22CEffectControlBaseImplE @ 31 NONAME ; #<TI>#
-	_ZTIN10multimedia22CMultimediaFactoryImplE @ 32 NONAME ; #<TI>#
-	_ZTIN10multimedia23CClientDataBufferSourceE @ 33 NONAME ; #<TI>#
-	_ZTIN10multimedia25CDataBufferProcessedEventE @ 34 NONAME ; #<TI>#
-	_ZTIN10multimedia25CMMFFindAndOpenController7CConfigE @ 35 NONAME ; #<TI>#
-	_ZTIN10multimedia8CEventAOE @ 36 NONAME ; #<TI>#
-	_ZTIN10multimedia9CSinkBaseE @ 37 NONAME ; #<TI>#
-	_ZTVN10multimedia10CErrorCodeE @ 38 NONAME ; #<VT>#
-	_ZTVN10multimedia10CEventBaseE @ 39 NONAME ; #<VT>#
-	_ZTVN10multimedia11CSourceBaseE @ 40 NONAME ; #<VT>#
-	_ZTVN10multimedia13CVolumeEffectE @ 41 NONAME ; #<VT>#
-	_ZTVN10multimedia14CEventNotifierE @ 42 NONAME ; #<VT>#
-	_ZTVN10multimedia14CStreamControlE @ 43 NONAME ; #<VT>#
-	_ZTVN10multimedia15CEventQueueItemE @ 44 NONAME ; #<VT>#
-	_ZTVN10multimedia15CMCustomCommandE @ 45 NONAME ; #<VT>#
-	_ZTVN10multimedia16CDownloadGatewayE @ 46 NONAME ; #<VT>#
-	_ZTVN10multimedia16CObserverManagerE @ 47 NONAME ; #<VT>#
-	_ZTVN10multimedia17CClientDataBufferE @ 48 NONAME ; #<VT>#
-	_ZTVN10multimedia18CBufTypeSupEventAOE @ 49 NONAME ; #<VT>#
-	_ZTVN10multimedia18CEffectControlBaseE @ 50 NONAME ; #<VT>#
-	_ZTVN10multimedia18CStateChangedEventE @ 51 NONAME ; #<VT>#
-	_ZTVN10multimedia19CClientProgDLSourceE @ 52 NONAME ; #<VT>#
-	_ZTVN10multimedia19CMmfAudioOutputSinkE @ 53 NONAME ; #<VT>#
-	_ZTVN10multimedia20CDataBufferQueueItemE @ 54 NONAME ; #<VT>#
-	_ZTVN10multimedia22CEffectControlBaseImplE @ 55 NONAME ; #<VT>#
-	_ZTVN10multimedia22CMultimediaFactoryImplE @ 56 NONAME ; #<VT>#
-	_ZTVN10multimedia23CClientDataBufferSourceE @ 57 NONAME ; #<VT>#
-	_ZTVN10multimedia25CDataBufferProcessedEventE @ 58 NONAME ; #<VT>#
-	_ZTVN10multimedia25CMMFFindAndOpenController7CConfigE @ 59 NONAME ; #<VT>#
-	_ZTVN10multimedia8CEventAOE @ 60 NONAME ; #<VT>#
-	_ZTVN10multimedia9CSinkBaseE @ 61 NONAME ; #<VT>#
-	_ZTIN10multimedia17CClientFileSourceE @ 62 NONAME ; #<TI>#
-	_ZTIN10multimedia23CClientDescriptorSourceE @ 63 NONAME ; #<TI>#
-	_ZTIN10multimedia8CAsyncAOE @ 64 NONAME ; #<TI>#
-	_ZTVN10multimedia17CClientFileSourceE @ 65 NONAME ; #<VT>#
-	_ZTVN10multimedia23CClientDescriptorSourceE @ 66 NONAME ; #<VT>#
-	_ZTVN10multimedia8CAsyncAOE @ 67 NONAME ; #<VT>#
-	_ZTI11CChildIntfc @ 68 NONAME ; #<TI>#
-	_ZTI12CParentIntfc @ 69 NONAME ; #<TI>#
-	_ZTI19CDRMConfigIntcfImpl @ 70 NONAME ; #<TI>#
-	_ZTV11CChildIntfc @ 71 NONAME ; #<VT>#
-	_ZTV12CParentIntfc @ 72 NONAME ; #<VT>#
-	_ZTV19CDRMConfigIntcfImpl @ 73 NONAME ; #<VT>#
-	_ZTIN10multimedia13CReverbEffectE @ 74 NONAME ; #<TI>#
-	_ZTIN10multimedia15CLoudnessEffectE @ 75 NONAME ; #<TI>#
-	_ZTIN10multimedia16CBassBoostEffectE @ 76 NONAME ; #<TI>#
-	_ZTIN10multimedia16CEqualizerEffectE @ 77 NONAME ; #<TI>#
-	_ZTIN10multimedia16CRoomLevelEffectE @ 78 NONAME ; #<TI>#
-	_ZTIN10multimedia20CSourceDopplerEffectE @ 79 NONAME ; #<TI>#
-	_ZTIN10multimedia21CSourceLocationEffectE @ 80 NONAME ; #<TI>#
-	_ZTIN10multimedia21CStereoWideningEffectE @ 81 NONAME ; #<TI>#
-	_ZTIN10multimedia22CListenerDopplerEffectE @ 82 NONAME ; #<TI>#
-	_ZTIN10multimedia23CListenerLocationEffectE @ 83 NONAME ; #<TI>#
-	_ZTIN10multimedia24CSourceOrientationEffectE @ 84 NONAME ; #<TI>#
-	_ZTIN10multimedia26CDistanceAttenuationEffectE @ 85 NONAME ; #<TI>#
-	_ZTIN10multimedia26CListenerOrientationEffectE @ 86 NONAME ; #<TI>#
-	_ZTVN10multimedia13CReverbEffectE @ 87 NONAME ; #<VT>#
-	_ZTVN10multimedia15CLoudnessEffectE @ 88 NONAME ; #<VT>#
-	_ZTVN10multimedia16CBassBoostEffectE @ 89 NONAME ; #<VT>#
-	_ZTVN10multimedia16CEqualizerEffectE @ 90 NONAME ; #<VT>#
-	_ZTVN10multimedia16CRoomLevelEffectE @ 91 NONAME ; #<VT>#
-	_ZTVN10multimedia20CSourceDopplerEffectE @ 92 NONAME ; #<VT>#
-	_ZTVN10multimedia21CSourceLocationEffectE @ 93 NONAME ; #<VT>#
-	_ZTVN10multimedia21CStereoWideningEffectE @ 94 NONAME ; #<VT>#
-	_ZTVN10multimedia22CListenerDopplerEffectE @ 95 NONAME ; #<VT>#
-	_ZTVN10multimedia23CListenerLocationEffectE @ 96 NONAME ; #<VT>#
-	_ZTVN10multimedia24CSourceOrientationEffectE @ 97 NONAME ; #<VT>#
-	_ZTVN10multimedia26CDistanceAttenuationEffectE @ 98 NONAME ; #<VT>#
-	_ZTVN10multimedia26CListenerOrientationEffectE @ 99 NONAME ; #<VT>#
-	_ZTIN10multimedia14CBalanceEffectE @ 100 NONAME
-	_ZTVN10multimedia14CBalanceEffectE @ 101 NONAME
+	_ZTI11CChildIntfc @ 14 NONAME
+	_ZTI12CParentIntfc @ 15 NONAME
+	_ZTI19CDRMConfigIntcfImpl @ 16 NONAME
+	_ZTIN10multimedia10CErrorCodeE @ 17 NONAME
+	_ZTIN10multimedia10CEventBaseE @ 18 NONAME
+	_ZTIN10multimedia11CSourceBaseE @ 19 NONAME
+	_ZTIN10multimedia13CReverbEffectE @ 20 NONAME
+	_ZTIN10multimedia13CVolumeEffectE @ 21 NONAME
+	_ZTIN10multimedia14CBalanceEffectE @ 22 NONAME
+	_ZTIN10multimedia14CEventNotifierE @ 23 NONAME
+	_ZTIN10multimedia14CStreamControlE @ 24 NONAME
+	_ZTIN10multimedia15CEventQueueItemE @ 25 NONAME
+	_ZTIN10multimedia15CLoudnessEffectE @ 26 NONAME
+	_ZTIN10multimedia15CMCustomCommandE @ 27 NONAME
+	_ZTIN10multimedia16CBassBoostEffectE @ 28 NONAME
+	_ZTIN10multimedia16CEqualizerEffectE @ 29 NONAME
+	_ZTIN10multimedia16CObserverManagerE @ 30 NONAME
+	_ZTIN10multimedia16CRoomLevelEffectE @ 31 NONAME
+	_ZTIN10multimedia17CClientDataBufferE @ 32 NONAME
+	_ZTIN10multimedia17CClientFileSourceE @ 33 NONAME
+	_ZTIN10multimedia18CBufTypeSupEventAOE @ 34 NONAME
+	_ZTIN10multimedia18CEffectControlBaseE @ 35 NONAME
+	_ZTIN10multimedia18CStateChangedEventE @ 36 NONAME
+	_ZTIN10multimedia19CMmfAudioOutputSinkE @ 37 NONAME
+	_ZTIN10multimedia20CDataBufferQueueItemE @ 38 NONAME
+	_ZTIN10multimedia20CSourceDopplerEffectE @ 39 NONAME
+	_ZTIN10multimedia21CSourceLocationEffectE @ 40 NONAME
+	_ZTIN10multimedia21CStereoWideningEffectE @ 41 NONAME
+	_ZTIN10multimedia22CEffectControlBaseImplE @ 42 NONAME
+	_ZTIN10multimedia22CListenerDopplerEffectE @ 43 NONAME
+	_ZTIN10multimedia22CMultimediaFactoryImplE @ 44 NONAME
+	_ZTIN10multimedia23CClientDataBufferSourceE @ 45 NONAME
+	_ZTIN10multimedia23CClientDescriptorSourceE @ 46 NONAME
+	_ZTIN10multimedia23CListenerLocationEffectE @ 47 NONAME
+	_ZTIN10multimedia24CSourceOrientationEffectE @ 48 NONAME
+	_ZTIN10multimedia25CDataBufferProcessedEventE @ 49 NONAME
+	_ZTIN10multimedia25CMMFFindAndOpenController7CConfigE @ 50 NONAME
+	_ZTIN10multimedia26CDistanceAttenuationEffectE @ 51 NONAME
+	_ZTIN10multimedia26CListenerOrientationEffectE @ 52 NONAME
+	_ZTIN10multimedia8CAsyncAOE @ 53 NONAME
+	_ZTIN10multimedia9CSinkBaseE @ 54 NONAME
+	_ZTV11CChildIntfc @ 55 NONAME
+	_ZTV12CParentIntfc @ 56 NONAME
+	_ZTV19CDRMConfigIntcfImpl @ 57 NONAME
+	_ZTVN10multimedia10CErrorCodeE @ 58 NONAME
+	_ZTVN10multimedia10CEventBaseE @ 59 NONAME
+	_ZTVN10multimedia11CSourceBaseE @ 60 NONAME
+	_ZTVN10multimedia13CReverbEffectE @ 61 NONAME
+	_ZTVN10multimedia13CVolumeEffectE @ 62 NONAME
+	_ZTVN10multimedia14CBalanceEffectE @ 63 NONAME
+	_ZTVN10multimedia14CEventNotifierE @ 64 NONAME
+	_ZTVN10multimedia14CStreamControlE @ 65 NONAME
+	_ZTVN10multimedia15CEventQueueItemE @ 66 NONAME
+	_ZTVN10multimedia15CLoudnessEffectE @ 67 NONAME
+	_ZTVN10multimedia15CMCustomCommandE @ 68 NONAME
+	_ZTVN10multimedia16CBassBoostEffectE @ 69 NONAME
+	_ZTVN10multimedia16CEqualizerEffectE @ 70 NONAME
+	_ZTVN10multimedia16CObserverManagerE @ 71 NONAME
+	_ZTVN10multimedia16CRoomLevelEffectE @ 72 NONAME
+	_ZTVN10multimedia17CClientDataBufferE @ 73 NONAME
+	_ZTVN10multimedia17CClientFileSourceE @ 74 NONAME
+	_ZTVN10multimedia18CBufTypeSupEventAOE @ 75 NONAME
+	_ZTVN10multimedia18CEffectControlBaseE @ 76 NONAME
+	_ZTVN10multimedia18CStateChangedEventE @ 77 NONAME
+	_ZTVN10multimedia19CMmfAudioOutputSinkE @ 78 NONAME
+	_ZTVN10multimedia20CDataBufferQueueItemE @ 79 NONAME
+	_ZTVN10multimedia20CSourceDopplerEffectE @ 80 NONAME
+	_ZTVN10multimedia21CSourceLocationEffectE @ 81 NONAME
+	_ZTVN10multimedia21CStereoWideningEffectE @ 82 NONAME
+	_ZTVN10multimedia22CEffectControlBaseImplE @ 83 NONAME
+	_ZTVN10multimedia22CListenerDopplerEffectE @ 84 NONAME
+	_ZTVN10multimedia22CMultimediaFactoryImplE @ 85 NONAME
+	_ZTVN10multimedia23CClientDataBufferSourceE @ 86 NONAME
+	_ZTVN10multimedia23CClientDescriptorSourceE @ 87 NONAME
+	_ZTVN10multimedia23CListenerLocationEffectE @ 88 NONAME
+	_ZTVN10multimedia24CSourceOrientationEffectE @ 89 NONAME
+	_ZTVN10multimedia25CDataBufferProcessedEventE @ 90 NONAME
+	_ZTVN10multimedia25CMMFFindAndOpenController7CConfigE @ 91 NONAME
+	_ZTVN10multimedia26CDistanceAttenuationEffectE @ 92 NONAME
+	_ZTVN10multimedia26CListenerOrientationEffectE @ 93 NONAME
+	_ZTVN10multimedia8CAsyncAOE @ 94 NONAME
+	_ZTVN10multimedia9CSinkBaseE @ 95 NONAME
 
--- a/mmfenh/enhancedmediaclient/Client/group/EnhancedMediaClient.mmp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Client/group/EnhancedMediaClient.mmp	Fri Apr 30 19:18:45 2010 -0500
@@ -13,7 +13,7 @@
 *
 * Description:  Project file for EnhancedMediaClient Utility
 *
-*  Version     : %version: bh1mmcf#10.1.7 %
+*  Version     : %version: 10.1.8 %
 */
 
 
@@ -48,11 +48,6 @@
 SOURCE          DRMConfigIntfcImpl.cpp
 SOURCE          ParentChildIntfc.cpp
 
-SOURCEPATH      ../src/Components/ClientProgDLSource
-SOURCE          EventAO.cpp
-SOURCE          ClientProgDLSource.cpp
-SOURCE          DownloadGateway.cpp
-
 SOURCEPATH      ../src/Components/CMMFAudioOutputSink
 SOURCE          CMMFAudioOutputSink.cpp
 
@@ -105,7 +100,6 @@
 USERINCLUDE     ../src/Components/StreamControl
 USERINCLUDE     ../src/Components/EventNotifier
 USERINCLUDE     ../src/Components/ClientDataBufferSource
-USERINCLUDE     ../src/Components/ClientProgDLSource
 USERINCLUDE     ../src/Components/ClientFileSource
 USERINCLUDE     ../src/Components/ClientDescriptorSource
 USERINCLUDE     ../src/Components/CMMFAudioOutputSink
@@ -113,12 +107,10 @@
 USERINCLUDE     ../src/Components/SinkBase
 USERINCLUDE     ../src/Components/SourceBase
 USERINCLUDE     ../../Plugins/DataBufferSource/inc
-USERINCLUDE     ../../Plugins/ProgDLSource/inc
 USERINCLUDE     ../src/Components/EffectBase
 USERINCLUDE     ../src/Components/VolumeEffect
 USERINCLUDE		../src/Components/BalanceEffect
 USERINCLUDE     ../src/Components/AudioEffects
-USERINCLUDE     ../../Plugins/TransferRateMonitor/inc
 USERINCLUDE     ../../../../inc
 USERINCLUDE     ../../inc
 USERINCLUDE     ../../Plugins/DescriptorSource/inc
@@ -138,8 +130,6 @@
 LIBRARY         cafutils.lib
 LIBRARY         ecom.lib
 LIBRARY         StreamControlCustomCommands.lib
-LIBRARY			downloadmgr.lib
-LIBRARY			transferratemonitor.lib
 LIBRARY         mmfstandardcustomcommands.lib
 
 LIBRARY			AudioEqualizerProxy.lib
--- a/mmfenh/enhancedmediaclient/Client/src/Components/ControlFactory/ControlFactoryImpl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Client/src/Components/ControlFactory/ControlFactoryImpl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -24,11 +24,9 @@
 #include "ControlFactoryImpl.h"
 #include "ClientStreamControl.h"
 #include "ClientDataBufferSource.h"
-#include "ClientProgDLSource.h"
 #include "ClientFileSource.h"
 #include "ClientDescriptorSource.h"
 #include "ClientDataBuffer.h"
-#include "DownloadGateway.h"
 #include "VolumeEffectImpl.h"
 #include "BalanceEffectImpl.h"
 #include "CMMFAudioOutputSink.h"
@@ -66,19 +64,10 @@
 void CMultimediaFactoryImpl::ConstructL()
     {
     // No impl
-    if(iGateway)
-        {
-        delete iGateway;
-        iGateway = NULL;        
-        }    
     }
 
 CMultimediaFactoryImpl::~CMultimediaFactoryImpl()
     {
-    if(iGateway)
-        {
-        delete iGateway;
-        }
     }
     
 TInt CMultimediaFactoryImpl::CreateStreamControl( TUid aType, MStreamControl*& aControl )
@@ -140,39 +129,6 @@
             }
         }
     
-    if(aType == KProgDLSourceControl)
-        {
-        if(!iGateway)
-            {
-            iGateway = new CDownloadGateway;
-            TInt status = iGateway->Initialize(TUid::Uid(0));
-            if(status != KErrNone)
-                {
-                return status;    
-                }
-            }
-            
-        CClientProgDLSource* srcControl = new CClientProgDLSource;
-        if ( !srcControl )
-            {
-            status = KErrNoMemory;
-            }
-        else
-            {
-            status = srcControl->PostConstructor();
-            }
-
-        if ( status == KErrNone )
-            {
-            srcControl->SetDownloadGateway(iGateway);
-            aControl = srcControl;
-            }
-        else
-            {
-            delete srcControl;
-            }
-        }
-    
     if(aType == KFileSourceControl)
         {
         CClientFileSource* srcControl = new CClientFileSource;
--- a/mmfenh/enhancedmediaclient/Client/src/Components/ControlFactory/ControlFactoryImpl.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Client/src/Components/ControlFactory/ControlFactoryImpl.h	Fri Apr 30 19:18:45 2010 -0500
@@ -30,7 +30,6 @@
     class MDataBuffer;
     class MSinkControl;
     class CMultimediaFactoryImpl;
-    class CDownloadGateway;
     
     /**
     *  Implements the MultimediaFactor Implementation
@@ -131,10 +130,6 @@
             CMultimediaFactoryImpl();
             void ConstructL();
                 
-        private:
-            // Pointer to the Download Gateway.
-            CDownloadGateway* iGateway;
-                        
         };
     } // namespace multimedia
 
--- a/mmfenh/enhancedmediaclient/Client/src/Components/StreamControl/ClientStreamControl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Client/src/Components/StreamControl/ClientStreamControl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -22,7 +22,6 @@
 #include <EffectControl.h>
 #include <SinkControl.h>
 #include <SourceControl.h>
-#include <ProgDLSource.h>
 #include <FileSource.h>
 #include <DescriptorSource.h>
 #include <SCCustomInterfaceUIDs.h>
@@ -778,53 +777,6 @@
                 }
             }
         }
-    else
-        if (iSourceControl->Type() == KProgDLSourceControl)
-            {
-            MProgDLSource* progDLSource =
-                    static_cast<MProgDLSource*>(iSourceControl);
-            HBufC* fileName = HBufC::NewLC(KMaxPath);
-            TPtr fileNamePtr = fileName->Des();
-
-            TInt err = progDLSource->FileName(fileNamePtr);
-
-            HBufC8* mimeType = HBufC8::NewLC(KMaxMimeLength);
-            TPtr8 mimeTypePtr = mimeType->Des();
-
-            status = iSourceControl->GetMimeType(mimeTypePtr);
-
-            iFindAndOpenController->ConfigureSourceSink(
-                    TMMFileSource(fileNamePtr,
-                            ContentAccess::KDefaultContentObject,
-                            ContentAccess::EPlay),
-                    CMMFFindAndOpenController::TSourceSink(/*KUidMmfAudioOutput*/sinkUID/*,fileHandle*/));
-
-            TMMFileSource source(fileNamePtr,
-                    ContentAccess::KDefaultContentObject,
-                    ContentAccess::EPlay);
-
-            // This Flag is defined so that if the Helix Controller Supports
-            // the playback of Local Media for WMA, then the Progressive Download
-            //  for WMA still goes through the Old WMA Controller( AdvancedAudioController)
-            // We are launching the Old WMA Controller using the UID.                
-
-#ifdef __WINDOWS_MEDIA        
-#ifndef RD_PD_FOR_AUDIO_CONTENT_VIA_HELIX_ENGINE       
-            if(!mimeTypePtr.Compare(KWMAMimeType()))
-                {
-                iFindAndOpenController->OpenByControllerUid(TUid::Uid(0x10207A9B),KNullUid);
-                }
-            else
-#endif        
-#endif
-                {
-                iFindAndOpenController->OpenByFileSource(source);
-                }
-
-            CleanupStack::PopAndDestroy(mimeType); // mimeType
-            CleanupStack::PopAndDestroy(fileName); // fileName
-            //fileHandle.Close();
-            }
 
     if (iSourceControl->Type() == KFileSourceControl)
         {
--- a/mmfenh/enhancedmediaclient/Client/src/Components/StreamControl/ClientUtility.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Client/src/Components/StreamControl/ClientUtility.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  Definition of the ClientUtility class.
-*  Version     : %version: bh1mmcf#11 %
+*  Version     : %version: 12 %
 *
 */
 
@@ -27,7 +27,6 @@
 #include <StreamControlCustomCommands.h>
 #include <mmf/server/mmfdrmpluginserverproxy.h>
 #include "../../../Plugins/FileSource/inc/FileDataSourceUid.hrh"
-#include "../../../Plugins/ProgDLSource/inc/ProgDLSourceUid.hrh"
 using namespace ContentAccess;
 using namespace multimedia;
 
@@ -2296,7 +2295,7 @@
     //need to proceed only in case of local playback mode
     TUid sourceUid = iCurrentConfig->iSource->SourceSinkUid();
     TBool localPlaybackMode;
-	if( mode == EPlayback && ( sourceUid.iUid == KFileDataSourcePlugin || sourceUid.iUid == KMmfProgDLSourceUid ) )
+	if( mode == EPlayback && ( sourceUid.iUid == KFileDataSourcePlugin ) )
 		{
 		localPlaybackMode = ETrue;
 		}
--- a/mmfenh/enhancedmediaclient/Plugins/FileSource/group/FileSource.mmp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Plugins/FileSource/group/FileSource.mmp	Fri Apr 30 19:18:45 2010 -0500
@@ -58,7 +58,6 @@
 LIBRARY         mmfserverbaseclasses.lib
 LIBRARY         caf.lib
 LIBRARY	        cafutils.lib
-LIBRARY         TransferRateMonitor.lib
 LIBRARY         centralrepository.lib
 
 DEFFILE         FileSource.def
--- a/mmfenh/enhancedmediaclient/Plugins/MultimediaDataSource/DataSourceFactory/group/MultimediaDataSourceFactory.mmp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Plugins/MultimediaDataSource/DataSourceFactory/group/MultimediaDataSourceFactory.mmp	Fri Apr 30 19:18:45 2010 -0500
@@ -31,7 +31,6 @@
 
 USERINCLUDE     ../inc
 USERINCLUDE	    ../../../../../../inc
-USERINCLUDE     ../../../ProgDLSource/inc
 USERINCLUDE     ../../../MultimediaDataSource/inc
 USERINCLUDE     ../../../DataBufferSource/inc
 USERINCLUDE     ../../../FileSource/inc
@@ -52,7 +51,6 @@
 LIBRARY         DataBufferSource.lib
 LIBRARY         DescriptorDataSource.lib
 LIBRARY         FileSource.lib
-LIBRARY         ProgDLSource.lib
 
 DEFFILE         MMDataSourceFactory.def
 NOSTRICTDEF
--- a/mmfenh/enhancedmediaclient/Plugins/MultimediaDataSource/DataSourceFactory/src/MultimediaDataSourceFactory.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/Plugins/MultimediaDataSource/DataSourceFactory/src/MultimediaDataSourceFactory.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -18,9 +18,7 @@
 
 #include <MultimediaDataSourceFactory.h>
 #include "DataBufferSourceUid.h"
-#include "ProgDLSourceUid.h"
 #include "DataBufferDataSource.h"
-#include "ProgDLMultimediaSource.h"  
 #include "FileDataSource.h"
 #include "DescriptorDataSource.h"
 #include "CacheSource.h"
@@ -39,10 +37,6 @@
         {
         TRAP(status,aMultimediaDataSource  = CDataBufferMultimediaSource::NewL(aMDataSource));
         }
-    else if ( aMDataSource.DataSourceType() == KMmfProgDLSource )
-        {
-        TRAP(status,aMultimediaDataSource  = CProgDLMultimediaSource::NewL(aMDataSource));
-        }        
     else if ( aMDataSource.DataSourceType() == KFileDataSourcePlugin )
         {
         TRAP(status,aMultimediaDataSource  = CFileMultimediaSource::NewL(aMDataSource));
@@ -71,15 +65,6 @@
         	TRAP(status,aMultimediaDataSource = CCacheSource::NewL(dataBufferSource,config));
         	}
         } 
-    else if ( aMDataSource.DataSourceType() == KMmfProgDLSource )
-        {
-        aMultimediaDataSource  = CProgDLMultimediaSource::NewL(aMDataSource);
-        TRAP(status,config =  CDataSourceConfigIntfcImpl::NewL());           
-		if(status == KErrNone)	        
-	        {
-        	aDataSourceConfigIntfc = config;
-	        }
-        } 
     return status;
     }
 // End of file
--- a/mmfenh/enhancedmediaclient/group/bld.inf	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -31,12 +31,10 @@
 PRJ_MMPFILES
 #include "../Plugins/StreamControlCustomCommands/group/bld.inf"
 #include "../Plugins/DataBufferSource/group/bld.inf"
-#include "../Plugins/ProgDLSource/group/bld.inf"
 #include "../Plugins/DescriptorSource/group/bld.inf"
 #include "../Plugins/FileSource/group/bld.inf"
 #include "../Plugins/CacheSource/group/bld.inf"
 #include "../Plugins/DataSourceConfigIntfc/group/bld.inf"
-#include "../Plugins/TransferRateMonitor/group/bld.inf"
 #include "../Client/group/bld.inf"
 #include "../Plugins/MultimediaDataSource/group/bld.inf"
 #include "../Plugins/MultimediaDataSource/DataSourceFactory/group/bld.inf"
--- a/mmfenh/enhancedmediaclient/rom/EnhancedMediaClient.iby	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/enhancedmediaclient/rom/EnhancedMediaClient.iby	Fri Apr 30 19:18:45 2010 -0500
@@ -29,9 +29,7 @@
 
 
 file=ABI_DIR\BUILD_DIR\EnhancedMediaClient.dll	            SHARED_LIB_DIR\EnhancedMediaClient.dll
-file=ABI_DIR\BUILD_DIR\TransferRateMonitor.dll		        SHARED_LIB_DIR\TransferRateMonitor.dll
 
-ECOM_PLUGIN(ProgDLSource.dll,ProgDLSource.rsc)
 ECOM_PLUGIN(DataBufferSource.DLL,DataBufferSource.rsc)
 ECOM_PLUGIN(FileSource.DLL,FileSource.rsc)
 ECOM_PLUGIN(DescriptorDataSource.DLL,DescriptorDataSource.rsc)
--- a/mmfenh/group/bld.inf	Mon May 03 12:59:52 2010 +0300
+++ b/mmfenh/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -28,8 +28,6 @@
 #include "../enhancedaudioplayerutility/Group/bld.inf"
 #include "../enhancedmediaclient/group/bld.inf"
 #include "../profilesettingsmonitor/group/bld.inf"
-#include "../progressivedownload/group/bld.inf"
-
 
 
 //  End of File
--- a/mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh	Fri Apr 30 19:18:45 2010 -0500
@@ -22,38 +22,40 @@
 
 // DATA TYPES
 enum TMetaDataFieldId		// Possible metadata fields
-	{
-	EUnknownMetaDataField = 0,
+    {
+    EUnknownMetaDataField = 0,
 
-	EMetaDataSongTitle = 1,
-	EMetaDataArtist,
-	EMetaDataAlbum,
-	EMetaDataYear,
-	EMetaDataComment,
-	EMetaDataAlbumTrack,
-	EMetaDataGenre,
-	EMetaDataComposer,
-	EMetaDataCopyright,
-	EMetaDataOriginalArtist,
-	EMetaDataUrl,
-	EMetaDataUserUrl,
-	EMetaDataJpeg,
-	EMetaDataVendor,
-	EMetaDataRating,
-	EMetaDataUniqueFileIdentifier,
-	EMetaDataDuration,
-	EMetaDataDate,
-	EMetaDataUnsyncLyrics
-	// More later...
-	};
+    EMetaDataSongTitle = 1,
+    EMetaDataArtist,
+    EMetaDataAlbum,
+    EMetaDataYear,
+    EMetaDataComment,
+    EMetaDataAlbumTrack,
+    EMetaDataGenre,
+    EMetaDataComposer,
+    EMetaDataCopyright,
+    EMetaDataOriginalArtist,
+    EMetaDataUrl,
+    EMetaDataUserUrl,
+    EMetaDataJpeg,
+    EMetaDataVendor,
+    EMetaDataRating,
+    EMetaDataUniqueFileIdentifier,
+    EMetaDataDuration,
+    EMetaDataDate,
+    EMetaDataUnsyncLyrics,
+    EMetaDataProtected        // get the Protected info, "0"=non protected, "1"=protected
+	
+    // More later...
+    };
 
 // ENUM for ID3 Version
 enum TID3Version
-	{
-	ENonID3,
-	EID3Version1,
-	EID3Version2
-	};
+    {
+    ENonID3,
+    EID3Version1,
+    EID3Version2
+    };
 
 #endif      // CMETADATAFIELD_HRH
 
--- a/mmmw_plat/audio_output_control_utility_api/tsrc/AudioOutputControlTestClass/inc/AudioOutputControlTestClass.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/audio_output_control_utility_api/tsrc/AudioOutputControlTestClass/inc/AudioOutputControlTestClass.h	Fri Apr 30 19:18:45 2010 -0500
@@ -42,7 +42,6 @@
 #include <StreamControl.h>
 #include <ControlObserver.h>
 #include <Events.h>
-#include <ProgDLSource.h>
 #include <DataBufferSource.h>
 #include <FileSource.h>
 #include <DataBuffer.h>
@@ -109,7 +108,6 @@
 
 using multimedia::MStreamControl;
 using multimedia::MControlObserver;
-using multimedia::MProgDLSource;
 using multimedia::MDataBufferSource;
 using multimedia::MDescriptorSource;
 using multimedia::MDataBuffer;
--- a/mmmw_plat/enhanced_media_client_api/tsrc/Conf/EnhanMediaTestClass.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/Conf/EnhanMediaTestClass.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -1231,82 +1231,6 @@
 [Endtest]
 
 
-
-#[Test]
-#title 22. MP3-PDLS EMC Download
-#create EnhanMediaTestClass AudioEnhs
-#AudioEnhs CreateFactory
-#AudioEnhs Gen_StartProgDL http:\/\/10.123.32.53/sugarsugar-50KB.mp3 "Ethernet with Daemon Dynamic IP" C:\test.mp3
-#AudioEnhs CreateStream
-#AudioEnhs AddObserver 3
-#AudioEnhs CreateSource 6
-#AudioEnhs AddObserver 6
-#AudioEnhs CreateSink 4
-#AudioEnhs AddObserver 4
-#AudioEnhs StreamAddSource 6
-#AudioEnhs StreamAddSink 4
-#AudioEnhs PDLSOpenL
-#AudioEnhs StreamOpen
-#waittestclass AudioEnhs
-#AudioEnhs StreamStart
-#pause 10000
-#AudioEnhs StreamPause
-#AudioEnhs PDLSGetCurFileSizeL
-#AudioEnhs PDLSGetExpFileSizeL
-#AudioEnhs PDLSGetDLStatusL
-#AudioEnhs PDLSIsDLCompleteL
-#AudioEnhs PDLSGetPerDownloadedL
-#AudioEnhs PDLSGetPerBufferedL
-#AudioEnhs PDLSGetDLRateL
-#AudioEnhs PDLSGetBitRateL
-#AudioEnhs PDLSResumeDownloadL
-#AudioEnhs Control_Type 6
-#AudioEnhs Control_ControlType 6
-#AudioEnhs PDLSGetSize
-#pause 10000
-#AudioEnhs StreamStart
-#AudioEnhs PDLSMoveFileL c:\testing\data\test1.mp3
-#//pause 7000
-#//AudioEnhs StreamStop
-#//pause 2000
-#AudioEnhs StreamClose
-#AudioEnhs RemoveObserver 4
-#AudioEnhs RemoveObserver 6
-#AudioEnhs RemoveObserver 3
-#AudioEnhs DeleteStream
-#AudioEnhs DeleteSink 
-#AudioEnhs DeleteSource
-#AudioEnhs DeleteFactory
-#delete AudioEnhs
-#[Endtest] 
-
-#[Test]
-#title 23 MP3-PDLS EMC CancelDownload
-#create EnhanMediaTestClass AudioEnhs
-#AudioEnhs CreateFactory
-#AudioEnhs Gen_StartProgDL http:\/\/10.123.32.53/sugarsugar-50KB.mp3 "Ethernet with Daemon Dynamic IP" C:\test.mp3
-#AudioEnhs CreateStream
-#AudioEnhs AddObserver 3
-#AudioEnhs CreateSource 6
-#AudioEnhs AddObserver 6
-#AudioEnhs CreateSink 4
-#AudioEnhs AddObserver 4
-#AudioEnhs StreamAddSource 6
-#AudioEnhs StreamAddSink 4
-#AudioEnhs PDLSOpenL
-#pause 3000
-#AudioEnhs PDLSCancelDownloadL
-#pause 4000
-#AudioEnhs RemoveObserver 4
-#AudioEnhs RemoveObserver 6
-#AudioEnhs RemoveObserver 3
-#AudioEnhs DeleteStream
-#AudioEnhs DeleteSink 
-#AudioEnhs DeleteSource
-#AudioEnhs DeleteFactory
-#delete AudioEnhs
-#[Endtest] 
-
 #[ER_DecayHFRatio]    		ERDecayHFRatioL = 50
 #[ER_DecayHFRatioRange]    	ERDecayHFRatioRangeL = Min[10] Max[200]
 #[ER_DecayTime]    		ERDecayTimeL = 1000
--- a/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/EABI/EnhanMediaTestClassu.def	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/EABI/EnhanMediaTestClassu.def	Fri Apr 30 19:18:45 2010 -0500
@@ -1,5 +1,5 @@
 EXPORTS
 	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-	_ZTI14CSimpleTimeout @ 2 NONAME ; #<TI>#
-	_ZTV14CSimpleTimeout @ 3 NONAME ; #<VT>#
+	_ZTI14CSimpleTimeout @ 2 NONAME
+	_ZTV14CSimpleTimeout @ 3 NONAME
 
--- a/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/EnhanMediaTestClass.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/EnhanMediaTestClass.h	Fri Apr 30 19:18:45 2010 -0500
@@ -37,7 +37,6 @@
 #include <SourceControl.h>
 #include <ControlObserver.h>
 #include <Events.h>
-#include <ProgDLSource.h>
 #include <DataBufferSource.h>
 #include <FileSource.h>
 #include <DataBuffer.h>
@@ -71,10 +70,8 @@
 
 #include "CEMCConstants.h"
 
-#include <DownloadMgrClientApiExt.h>
 using multimedia::MStreamControl;
 using multimedia::MControlObserver;
-using multimedia::MProgDLSource;
 using multimedia::MDataBufferSource;
 using multimedia::MDescriptorSource;
 using multimedia::MDataBuffer;
@@ -119,8 +116,7 @@
 */
 NONSHARABLE_CLASS(CEnhanMediaTestClass) : public CScriptBase,
 										  public MTimeoutObserver
-										  ,public MControlObserver,
-										  public MHttpDownloadMgrObserver
+										  ,public MControlObserver
 											//public MDevSoundObserver,
 											//public MMdaAudioOutputStreamCallback
 										//	public MRadioFmTunerObserver,
@@ -140,14 +136,6 @@
         virtual ~CEnhanMediaTestClass();
 
         void Event( MControl* aObject,TUint aEvent, TAny* aData );
-        /**
-        * From MhttpDownloadMgrObserver.
-        * Callback from the DownloadManager notifying Client Events.
-        * @since S60 v3.2
-        * @param aDownload Download for which the Event is meant
-        * @param aEvent Actual Event
-        */
-        void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
 
 		enum TAEnhsExpectedEvent
 		{
@@ -417,21 +405,6 @@
 
 	    TInt CreateSeekableData(CStifItemParser& aItem);
 
-	    TInt GeneralGen_StartProgDLL(CStifItemParser& aItem);
-	    TInt PDLSOpenL(CStifItemParser& aItem);
-	    TInt PDLSGetCurFileSizeL(CStifItemParser& aItem);
-	    TInt PDLSGetExpFileSizeL(CStifItemParser& aItem);
-	    TInt PDLSGetDLStatusL(CStifItemParser& aItem);
-	    TInt PDLSIsDLCompleteL(CStifItemParser& aItem);
-	    TInt PDLSGetPerDownloadedL(CStifItemParser& aItem);
-	    TInt PDLSGetPerBufferedL(CStifItemParser& aItem);
-	    TInt PDLSGetDLRateL(CStifItemParser& aItem);
-	    TInt PDLSGetBitRateL(CStifItemParser& aItem);
-	    TInt PDLSResumeDownloadL(CStifItemParser& aItem);
-	    TInt PDLSMoveFileL(CStifItemParser& aItem);
-	    TInt PDLSGetSize(CStifItemParser& aItem);
-	    TInt PDLSCancelDownloadL(CStifItemParser& aItem);
-
 	    TInt AudioEffectIsEnabled (CStifItemParser& aItem);
 
 	    TInt HandleAudioEffectEnableL(CStifItemParser& aItem);
@@ -557,7 +530,6 @@
         MSourceControl* iSourceControl;
         RPointerArray<MDataBuffer>  iBuffers;
         RArray<TInt> iAvailable;
-        MProgDLSource* iMProgDLSource;
         MEqualizerControl* iMEqualizerControl;
         MBassBoostControl* iMBassBoostControl;
         MVolumeControl* iMVolumeControl;
@@ -597,20 +569,6 @@
 
         TInt iAllowedDevice;
 
-        // Url used to Open the PDL
-        HBufC8*  iUrlName;
-        // Download Manager instance to which we connect
-        RHttpDownloadMgrApiExt  iDownloadMgr;
-        // Whether the DMgr is connected or not
-        TBool iDMgrConnected;
-        // Download for which we connect
-        RHttpDownload* iDownload;
-        // Current Download ID
-        TInt32 iDownloadId;
-        // Temp FileName
-        HBufC* iAccessPtName;
-
-
         CActiveSchedulerWait* iActive;
     	// ?one_line_short_description_of_data
         //?data_declaration;
--- a/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestCallbacks.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestCallbacks.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -94,14 +94,6 @@
  			    {
  			    switch (aEventType)
 			        {
-			        case MSourceControlObserver::KPercentageDownloadedChangedEvent:
-			        	{
-			        	TUint percent;
-			        	MProgDLSource* control1 = (MProgDLSource*)(aControl);
-			        	control1->GetPercentageBuffered(percent);
-			            iLog->Log(_L("KPercentageDownloadedChangedEvent"));
-			        	}
-			            break;
 			        case MSourceControlObserver::KBufferingTypesSupportChangedEvent:
 			        	{
 			            iLog->Log(_L("KBufferingTypesSupportChangedEvent"));
@@ -122,73 +114,12 @@
 			            iLog->Log(_L("CEnhanMediaTestClass::Event:BitRateChanged[%d]"),rate);
 			        	}
 			            break;
-			        case MSourceControlObserver::KDownloadStatusChangedEvent:
-			            {
-			            MProgDLSource* control1 = (MProgDLSource*)(aControl);
-			            RDebug::Print(_L("CMPlayerAudioUIController::Event:DownloadStatus[%d]"),control1->GetDownloadStatus());
-			            iLog->Log(_L("CMPlayerAudioUIController::Event:DownloadStatus[%d]"),control1->GetDownloadStatus());
-			            switch(control1->GetDownloadStatus())
-			            	{
-
-			            	case MProgDLSource::EConnecting:
-			            	    {
-			            	    RDebug::Print(_L("CEnhanMediaTestClass::Event:DownloadStatus [connecting]"));
-					            iLog->Log(_L("CEnhanMediaTestClass::Event:DownloadStatus [connecting]"));
-			            	    }
-			            	    break;
-
-			            	case MProgDLSource::EStarted:
-			            		{
-			            		RDebug::Print(_L("CEnhanMediaTestClass::Event:DownloadStatus [started]"));
-					            iLog->Log(_L("CEnhanMediaTestClass::Event:DownloadStatus [started]"));
-			            		}
-			            	    break;
-
-			            	case MProgDLSource::EPaused:
-			            		{
-			            	    RDebug::Print(_L("CEnhanMediaTestClass::Event:DownloadStatus [paused]"));
-					            iLog->Log(_L("CEnhanMediaTestClass::Event:DownloadStatus [paused]"));
-			            		}
-			            	    break;
-
-			            	case MProgDLSource::EDeleted:
-			            		{
-			            	    RDebug::Print(_L("CEnhanMediaTestClass::Event:DownloadStatus [deleted]"));
-					            iLog->Log(_L("CEnhanMediaTestClass::Event:DownloadStatus [deleted]"));
-			            		}
-			                    break;
-			            	case MProgDLSource::ECompleted:
-			            		{
-			            	    RDebug::Print(_L("CEnhanMediaTestClass::Event:DownloadStatus [completed]"));
-					            iLog->Log(_L("CEnhanMediaTestClass::Event:DownloadStatus [completed]"));
-			            		}
-			            	    break;
-			   	            case MProgDLSource::EFailed:
-			                    {
-			        	        RDebug::Print(_L("CEnhanMediaTestClass::Event:DownloadStatus [failed]"));
-					            iLog->Log(_L("CEnhanMediaTestClass::Event:DownloadStatus [failed]"));
-			                    break;
-			                    }
-			    	        case MProgDLSource::EUnknown:
-			        	        {
-			        	        RDebug::Print(_L("CEnhanMediaTestClass::Event:DownloadStatus [EUnknown]"));
-					            iLog->Log(_L("CEnhanMediaTestClass::Event:DownloadStatus [EUnknown]"));
-			        	        }
-			        	        break;
-			            	default:
-			            	  break;
-			            	}
-			            }
-			            break;
-
 			        case MSourceControlObserver::KFileMoveCompleteEvent:
 			            {
 				            RDebug::Print(_L("CEnhanMediaTestClass::Event:KFileMoveCompleteEvent"));
 				            iLog->Log(_L("CEnhanMediaTestClass::Event:KFileMoveCompleteEvent"));
 			            }
 			            break;
-
-
 			        };
 			    }
        			break;
@@ -213,54 +144,4 @@
 		};
 	}
 
-
-void CEnhanMediaTestClass::HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent )
-    {
-    RDebug::Print(_L("HandleDMgrEventL DownloadState[%d] ProgressState[%d]"),aEvent.iDownloadState,aEvent.iProgressState);
-    iLog->Log(_L("HandleDMgrEventL DownloadState[%d] ProgressState[%d]"),aEvent.iDownloadState,aEvent.iProgressState);
-
-    TInt32 downloadSize = 0;
-    TInt32 length = 0;
-    TInt status = aDownload.GetIntAttribute(EDlAttrDownloadedSize, downloadSize);
-    status = aDownload.GetIntAttribute(EDlAttrLength, length);
-
-
-    TInt percentageDL = (downloadSize*100/length);
-
-    if(percentageDL > 8 && iActive->IsStarted())
-        {
-        iActive->AsyncStop();
-        }
-
-    //iLog->Log(_L("iMProgDLSource->GetDownloadingRate = [%d]"),rate);
-   // RDebug::Print(_L("CEnhanMediaTestClass::Event:EStateChanged[Opened]"));
-
-
-    if(aEvent.iDownloadState == EHttpDlPaused)
-        {
-        iDownload->Start();
-        }
-
-    if(aEvent.iDownloadState == EHttpDlCreated)
-        {
-        iLog->Log(_L("EHttpDlCreated"));
-        }
-
-    if(aEvent.iDownloadState == EHttpDlInprogress)
-        {
-        iLog->Log(_L("EHttpDlInprogress "));
-        }
-    if(aEvent.iDownloadState == EHttpDlPaused)
-        {
-        iLog->Log(_L("EHttpDlPaused "));
-        }
-    if(aEvent.iDownloadState == EHttpDlCompleted)
-        {
-        iLog->Log(_L("EHttpDlCompleted "));
-        }
-    if(aEvent.iDownloadState == EHttpDlFailed)
-        {
-        iLog->Log(_L("EHttpDlFailed "));
-        }
-    }
 // End of File
--- a/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestClassBlocks.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/src/EnhanMediaTestClassBlocks.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -206,23 +206,6 @@
 
         ENTRY( "DSGetSize", CEnhanMediaTestClass::DSGetSize ),
 
-        ENTRY( "DSGetSize", CEnhanMediaTestClass::GeneralGen_StartProgDLL ),
-
-        ENTRY( "Gen_StartProgDL",CEnhanMediaTestClass::GeneralGen_StartProgDLL ),
-        ENTRY( "PDLSOpenL",CEnhanMediaTestClass::PDLSOpenL ),
-        ENTRY( "PDLSGetCurFileSizeL",CEnhanMediaTestClass::PDLSGetCurFileSizeL ),
-        ENTRY( "PDLSGetExpFileSizeL",CEnhanMediaTestClass::PDLSGetExpFileSizeL ),
-        ENTRY( "PDLSGetDLStatusL",CEnhanMediaTestClass::PDLSGetDLStatusL ),
-        ENTRY( "PDLSIsDLCompleteL",CEnhanMediaTestClass::PDLSIsDLCompleteL ),
-        ENTRY( "PDLSGetPerDownloadedL",CEnhanMediaTestClass::PDLSGetPerDownloadedL ),
-        ENTRY( "PDLSGetPerBufferedL",CEnhanMediaTestClass::PDLSGetPerBufferedL ),
-        ENTRY( "PDLSGetDLRateL",CEnhanMediaTestClass::PDLSGetDLRateL ),
-        ENTRY( "PDLSGetBitRateL",CEnhanMediaTestClass::PDLSGetBitRateL ),
-        ENTRY( "PDLSResumeDownloadL",CEnhanMediaTestClass::PDLSResumeDownloadL ),
-        ENTRY( "PDLSMoveFileL",CEnhanMediaTestClass::PDLSMoveFileL ),
-        ENTRY( "PDLSCancelDownloadL",CEnhanMediaTestClass::PDLSCancelDownloadL ),
-        ENTRY( "PDLSGetSize",CEnhanMediaTestClass::PDLSGetSize ),
-
         ENTRY( "AudioEffect_IsEnabled",CEnhanMediaTestClass::AudioEffectIsEnabled ),
         ENTRY( "AudioEffect_IsEnforced",CEnhanMediaTestClass::AudioEffectIsEnforced ),
         ENTRY( "AudioEffect_Uid",CEnhanMediaTestClass::AudioEffectUid ),
@@ -328,7 +311,6 @@
 		(TText*)L"EEStreamOpen",
 		(TText*)L"EEStreamPrime",
 		(TText*)L"EEStreamStart",
-		(TText*)L"EEPDLSOpen",
 
 	};
 	if( (TUint)aKey >= (sizeof( keywords )/sizeof(TText*)) )
@@ -625,15 +607,7 @@
         delete iDRMConfigIntfc;
         iDRMConfigIntfc = NULL;
         }
-    if(iUrlName)
-        {
-        delete iUrlName;
-        }
-
-    if(iAccessPtName)
-        {
-        delete iAccessPtName;
-        }
+
    // ProcessEvent(EECreateFactory, error);
 /*	for (TUint i =0; i < iExpectedEvents.Count() ; i++)
 		{
@@ -680,15 +654,6 @@
                 }
             break;
             }
-        case EPDLSOURCE:
-            {
-            status = iFactory->CreateSourceControl( KProgDLSourceControl, iSourceControl );
-            if(status == KErrNone)
-                {
-                iMProgDLSource = static_cast<MProgDLSource*>(iSourceControl);
-                }
-            break;
-            }
         default:
         	{
         	status = KErrNotSupported;
@@ -732,12 +697,6 @@
         iFactory->DeleteSourceControl(objPtr);
         iMFileSource = NULL;
         }
-    if(iMProgDLSource)
-        {
-        MSourceControl* objPtr = iMProgDLSource;
-        iFactory->DeleteSourceControl(objPtr);
-        iMProgDLSource = NULL;
-        }
     iLog->Log(_L("DeleteSourceControl OK"));
     //ProcessEvent(EECreateSource, status);
 	return status;
@@ -1563,18 +1522,6 @@
                 }
 	        break;
 	        }
-        case EPDLSOURCE:
-	        {
-	        if(iMProgDLSource)
-	            {
-                iMProgDLSource->AddObserver(*this);
-	            }
-            else
-                {
-                status = KErrNotFound;
-                }
-	        break;
-	        }
         case EVOLUMECONTROL:
 	        {
 	        if(iMVolumeControl)
@@ -2054,11 +2001,6 @@
             iSourceControl = iMDescriptorSource;
             }
             break;
-        case EPDLSOURCE:
-            {
-            iSourceControl = iMProgDLSource;
-            }
-            break;
         }
 
 	status = iMStreamControl->RemoveSource(*iSourceControl);
@@ -2099,11 +2041,6 @@
             iSourceControl = iMDescriptorSource;
             }
             break;
-        case EPDLSOURCE:
-            {
-            iSourceControl = iMProgDLSource;
-            }
-            break;
         }
 	status = iMStreamControl->AddSource(*iSourceControl);
     if (status == KErrNone)
@@ -2195,10 +2132,6 @@
 	else
 		{
 	        iLog->Log(_L("iMStreamControl->GetState() = %d"), state);
-	        if (iMProgDLSource)
-	        	{
-	        	status = iMProgDLSource->Close();
-	        	}
 			status = iMStreamControl->Close();
 	        iLog->Log(_L("iMStreamControl->GetState() = %d"), iMStreamControl->GetState());
 
@@ -2282,18 +2215,6 @@
                 }
 	        break;
 	        }
-        case EPDLSOURCE:
-	        {
-	        if(iMProgDLSource)
-	            {
-                iMProgDLSource->RemoveObserver(*this);
-	            }
-            else
-                {
-                status = KErrNotFound;
-                }
-	        break;
-	        }
         case EVOLUMECONTROL:
 	        {
 	        if(iMVolumeControl)
@@ -3628,18 +3549,6 @@
                 }
 	        break;
 	        }
-        case EPDLSOURCE:
-	        {
-	        if(iMProgDLSource)
-	            {
-                controlUid = iMProgDLSource->Type();
-	            }
-            else
-                {
-                status = KErrNotFound;
-                }
-	        break;
-	        }
 	    }
     iLog->Log(_L("CEnhanMediaTestClass::ControlTypeL  = [%d]"),control);
 	return status;
@@ -3737,18 +3646,6 @@
                 }
 	        break;
 	        }
-        case EPDLSOURCE:
-	        {
-	        if(iMProgDLSource)
-	            {
-				controlType = iMProgDLSource->ControlType();
-	            }
-            else
-              {
-              status = KErrNotFound;
-              }
-	        break;
-	        }
 	    }
     iLog->Log(_L("CEnhanMediaTestClass::ControlControlTypeL = [%d]"),control);
     return status;
@@ -3987,378 +3884,6 @@
     return status;
     }
 
-TInt CEnhanMediaTestClass::GeneralGen_StartProgDLL(CStifItemParser& aItem)
-    {
-    TInt status = KErrNone;
-    TPtrC string;
-	//AddExpectedEvent(EEStartDownload,KMediumTimeout);
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-
-    status = aItem.GetNextString ( string );
-
-    if ( status != KErrNone )
-        {
-        iLog->Log(_L("CHelixSTIFClient:: File name missing in config file "));
-        return status;
-        }
-    else
-        {
-        if(iUrlName)
-            {
-            delete iUrlName;
-            iUrlName = NULL;
-            }
-        iUrlName = HBufC8::NewL(string.Length());
-        TPtr8 des = iUrlName->Des();
-        des.Copy(string);
-        }
-
-    status = aItem.GetNextString ( string );
-
-    if ( status != KErrNone )
-        {
-        iLog->Log(_L("CHelixSTIFClient:: File name missing in config file "));
-        return status;
-        }
-    else
-        {
-        if(iAccessPtName)
-            {
-            delete iAccessPtName;
-            iAccessPtName = NULL;
-            }
-        iAccessPtName = HBufC::NewL(string.Length());
-        TPtr des = iAccessPtName->Des();
-        des.Copy(string);
-        }
-
-    status = aItem.GetNextString ( string );
-
-    if ( status != KErrNone )
-        {
-        iLog->Log(_L("CHelixSTIFClient:: File name missing in config file "));
-        return status;
-        }
-    else
-        {
-        if(iFileName)
-            {
-            delete iFileName;
-            iFileName = NULL;
-            }
-        iFileName = HBufC::NewL(string.Length());
-        TPtr des = iFileName->Des();
-        des.Copy(string);
-        }
-
-    if ( !iDMgrConnected )
-        {
-        TRAP(status,iDownloadMgr.ConnectL( TUid::Uid(1), *this, EFalse ));
-        if(!status)
-            {
-            iDMgrConnected = ETrue;
-            }
-        else
-            {
-            iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Connection failed to DlMgr "));
-            return status;
-            }
-        }
-
-    // Get IAP names and ids from the database
-    TInt res;
-    TBuf<40> name;
-    TUint32 id;
-
-    CCommsDatabase* TheDb = CCommsDatabase::NewL(EDatabaseTypeIAP);
-    CleanupStack::PushL(TheDb);
-
-    TheDb->ShowHiddenRecords();
-
-    CCommsDbTableView* view = TheDb->OpenTableLC(TPtrC(IAP));
-    res = view->GotoFirstRecord();
-
-    while(res == KErrNone)
-        {
-        view->ReadTextL(TPtrC(COMMDB_NAME), name);
-        view->ReadUintL(TPtrC(COMMDB_ID), id);
-
-				iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Name[%s] ID[%d] "),&name,id);
-        if(!iAccessPtName->Des().Compare(name))
-            {
-            break;
-            }
-
-        res = view->GotoNextRecord();
-        RDebug::Print(_L("IAP name, id: %S, %d"), &name, id);
-        }
-
-    CleanupStack::PopAndDestroy(); // view
-    CleanupStack::PopAndDestroy(); // TheDb
-
-    status = iDownloadMgr.SetIntAttribute( EDlMgrIap,id );
-    if(status != KErrNone)
-        {
-        return status;
-        }
-
-    status = iDownloadMgr.SetDefaultStringAttribute( EDlAttrDestFilename, *iFileName ) ;
-
-
-    TRAP(status,iDownload = &(iDownloadMgr.CreateDownloadL(*iUrlName)));
-    if(status != KErrNone)
-        {
-        return status;
-        }
-
-    status = iDownload->Start();
-    if(status != KErrNone)
-        {
-        iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Download Start Failed "));
-        return status;
-        }
-    status = iDownload->GetIntAttribute(EDlAttrId, iDownloadId);
-    if(status != KErrNone)
-        {
-        iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Getting DLId failed "));
-        return status;
-        }
-
-    if(iActive)
-        {
-        delete iActive;
-        iActive = NULL;
-        }
-
-    iActive = new CActiveSchedulerWait;
-    RDebug::Print(_L("Before"));
-    iLog->Log(_L("Before = %d"), status);
-    iActive->Start();
-    iLog->Log(_L("After = %d"), status);
-    RDebug::Print(_L("AFter"));
-    iLog->Log(_L("CEnhanMediaTestClass::GeneralGen_StartProgDLL = %d"), status);
-    return status;
-    }
-
-
-TInt CEnhanMediaTestClass::PDLSOpenL(CStifItemParser& /*aItem*/)
-	{
-	AddExpectedEvent(EEPDLSOpen,KMediumTimeout);
-	TInt status(KErrNone);
-	//TBool stateDL;
-	//TUint percent;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-    status = iMProgDLSource->Open(*iFileName,iDownloadId);
-//	iMProgDLSource->GetPercentageDownloaded(percent);
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetCurFileSizeL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	TUint fileSize;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-    status = iMProgDLSource->GetCurrentFileSize(fileSize);
-    iLog->Log(_L("PDLSGetCurFileSizeL = %d"), fileSize);
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetExpFileSizeL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	TUint fileSize;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-    status = iMProgDLSource->GetExpectedFileSize(fileSize);
-    iLog->Log(_L("PDLSGetExpFileSizeL = %d"), fileSize);
-
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetDLStatusL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	MProgDLSource::TDownloadStatus dlStatus;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-
-    dlStatus = iMProgDLSource->GetDownloadStatus();
-    iLog->Log(_L("PDLSGetDLStatusL = %d"), dlStatus);
-
-	return status;
-	}
-
-
-TInt CEnhanMediaTestClass::PDLSIsDLCompleteL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	TBool dlComplete;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-
-    status = iMProgDLSource->IsDownloadComplete(dlComplete);
-    iLog->Log(_L("PDLSIsDLCompleteL = %d"), dlComplete);
-
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetPerDownloadedL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	TUint perDl;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-
-    status = iMProgDLSource->GetPercentageDownloaded(perDl);
-    iLog->Log(_L("PDLSGetPerDownloadedL = %d"), perDl);
-
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetPerBufferedL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	TUint perBuf;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-
-    status = iMProgDLSource->GetPercentageBuffered(perBuf);
-    iLog->Log(_L("PDLSGetPerBufferedL = %d"), perBuf);
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetDLRateL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	TUint dlRate;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-
-    status = iMProgDLSource->GetDownloadingRate(dlRate);
-    iLog->Log(_L("PDLSGetDLRateL = %d"), dlRate);
-
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetBitRateL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	TUint bitRate;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-
-    status = iMProgDLSource->GetBitRate(bitRate);
-    iLog->Log(_L("PDLSGetBitRateL = %d"), bitRate);
-
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSResumeDownloadL(CStifItemParser& /*aItem*/)
-	{
-	TInt status(KErrNone);
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-
-    status = iMProgDLSource->ResumeDownload();
-    iLog->Log(_L("PDLSResumeDownloadL = %d"), status);
-
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSMoveFileL(CStifItemParser& aItem)
-	{
-	TInt status(KErrNone);
-    TPtrC string;
-    TFileName fileName;
-	if(!iMProgDLSource)
-	    {
-	    return status = KErrNotReady;
-	    }
-	status = 	aItem.GetNextString(string);
-	if ( status != KErrNone )
-		{
-		iLog->Log(_L("CEnhanMediaTestClass:: File name missing in config file "));
-		return status;
-		}
-	else
-		{
-		fileName.Copy(string);
-		}
-    if(iFileName)
-        {
-        delete iFileName;
-        iFileName = NULL;
-        }
-    iFileName = HBufC::NewL(fileName.Length());
-    iFileName->Des().Copy(fileName);
-
-
-    status = iMProgDLSource->MoveFile(*iFileName);
-    iLog->Log(_L("PDLSMoveFileL = %d"), status);
-
-	return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSGetSize(CStifItemParser& /*aItem*/)
-	{
-
-    iLog->Log(_L("CEnhanMediaTestClass::PDLSGetSize "));
-    TInt status(KErrNone);
-	TUint sizes = 0;
-	if(!iMProgDLSource)
-	    {
-	    status = KErrNotReady;
-	    }
-	else
-		{
-		status = iMProgDLSource->GetSize(sizes);
-		}
-    iLog->Log(_L("CEnhanMediaTestClass::PDLSGetSize [%d]"), status);
-
-    return status;
-	}
-
-TInt CEnhanMediaTestClass::PDLSCancelDownloadL(CStifItemParser& /*aItem*/)
-	{
-	TMediaId mediaId;
-	TFourCC dataType;
-    iLog->Log(_L("CEnhanMediaTestClass::PDLSCancelDownloadL "));
-    TInt status(KErrNone);
-	if(!iMProgDLSource)
-	    {
-	    status = KErrNotReady;
-	    }
-	else
-		{
-	    status = iMProgDLSource->CancelDownload();
-		}
-    iLog->Log(_L("CEnhanMediaTestClass::PDLSCancelDownloadL [%d]"), status);
-
-    return status;
-	}
-
 TInt CEnhanMediaTestClass::StreamCustomInterface(CStifItemParser& /*aItem*/)
 	{
     iLog->Log(_L("CEnhanMediaTestClass::StreamCustomInterface "));
@@ -5632,19 +5157,6 @@
                 }
 	        break;
 	        }
-        case EPDLSOURCE:
-	        {
-	        if(iMProgDLSource)
-	            {
-                controlUid = iMProgDLSource->Type();
-	            }
-            else
-                {
-                status = KErrNotFound;
-                }
-	        break;
-	        }
-
         case EVOLUMECONTROL:
 	        {
 	        if(iMVolumeControl)
@@ -5913,19 +5425,6 @@
               }
 	        break;
 	        }
-        case EPDLSOURCE:
-	        {
-	        if(iMProgDLSource)
-	            {
-				controlType = iMProgDLSource->ControlType();
-	            }
-            else
-              {
-              status = KErrNotFound;
-              }
-	        break;
-	        }
-
         case EVOLUMECONTROL:
 	        {
 	        if(iMVolumeControl)
--- a/mmmw_plat/group/bld.inf	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -19,14 +19,11 @@
 
 
 #include "../multimedia_data_source_api/group/bld.inf"
-#include "../progressive_download_api/group/bld.inf"
-#include "../equalizer_ui_api/group/bld.inf"
 #include "../enhanced_media_client_api/group/bld.inf"
 #include "../stream_control_custom_command_api/group/bld.inf"
 #include "../emc_buffer_source_api/group/bld.inf"
 #include "../emc_file_source_api/group/bld.inf"
 #include "../audio_metadata_reader_api/group/bld.inf"
-#include "../emc_progressive_download_source_api/group/bld.inf"
 #include "../emc_volume_effect_api/group/bld.inf"
 #include "../emc_balance_effect_api/group/bld.inf"
 #include "../emc_descriptor_source_api/group/bld.inf"
@@ -44,3 +41,4 @@
 #include "../telephony_multimedia_service_api/group/bld.inf"
 #include "../openmax_al_api/group/bld.inf"
 #include "../system_tone_service_api/group/bld.inf"
+#include "../openmax_al_ext_api/group/bld.inf"
--- a/mmmw_plat/openmax_al_api/openmax_al_api.metaxml	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/openmax_al_api.metaxml	Fri Apr 30 19:18:45 2010 -0500
@@ -8,7 +8,7 @@
   <libs>
     <lib name="openmaxal.lib"/>
   </libs>
-  <release category="platform" sinceversion="0"/>
+  <release category="platform" sinceversion="^4"/>
   <attributes>
     <htmldocprovided>no</htmldocprovided>
     <adaptation>no</adaptation>
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -49,6 +49,71 @@
 XA_RESULT_OPERATION_ABORTED         15
 XA_RESULT_CONTROL_LOST              16
 
+MO_ENGINE                           1
+MO_PLAYER                           4
+MO_RECORDER                         5
+
+XA_BOOLEAN_FALSE                    0
+XA_BOOLEAN_TRUE                     1
+
+// IID numbers for interfaces
+XA_IID_NULL                         1
+XA_IID_OBJECT                       2
+XA_IID_CONFIGEXTENSION              3
+XA_IID_DYNAMICINTERFACEMANAGEMENT   4
+XA_IID_ENGINE                       5
+XA_IID_THREADSYNC                   6
+XA_IID_PLAY                         7
+XA_IID_PLAYBACKRATE                 8
+XA_IID_PREFETCHSTATUS               9
+XA_IID_SEEK                         10
+XA_IID_VOLUME                       11
+XA_IID_IMAGECONTROLS                12
+XA_IID_IMAGEEFFECTS                 13
+XA_IID_VIDEOPOSTPROCESSING          14
+XA_IID_RECORD                       15
+XA_IID_SNAPSHOT                     16
+XA_IID_METADATAEXTRACTION           17
+XA_IID_METADATAINSERTION            18
+XA_IID_METADATATRAVERSAL            19
+XA_IID_DYNAMICSOURCE                20
+XA_IID_CAMERACAPABILITIES           21
+XA_IID_CAMERA                       22
+XA_IID_AUDIOIODEVICECAPABILITIES    23
+XA_IID_DEVICEVOLUME                 24
+XA_IID_EQUALIZER                    25
+XA_IID_OUTPUTMIX                    26
+XA_IID_RADIO                        27
+XA_IID_RDS                          28
+XA_IID_VIBRA                        29
+XA_IID_LED                          30
+XA_IID_AUDIODECODERCAPABILITIES     31
+XA_IID_AUDIOENCODER                 32
+XA_IID_AUDIOENCODERCAPABILITIES     33
+XA_IID_IMAGEENCODERCAPABILITIES     34
+XA_IID_IMAGEDECODERCAPABILITIES     35
+XA_IID_IMAGEENCODER                 36
+XA_IID_VIDEODECODERCAPABILITIES     37
+XA_IID_VIDEOENCODER                 38
+XA_IID_VIDEOENCODERCAPABILITIES     39
+XA_IID_STREAMINFORMATION            40
+XA_IID_NOKIAVOLUMEEXT               41
+XA_IID_NOKIALINEARVOLUME            42
+
+XA_OBJECT_STATE_UNREALIZED          1
+XA_OBJECT_STATE_REALIZED            2
+XA_OBJECT_STATE_SUSPENDED           3
+
+XA_PLAYSTATE_STOPPED                1
+XA_PLAYSTATE_PAUSED                 2
+XA_PLAYSTATE_PLAYING                3
+
+WinPtX                              0
+WinPtY                              300
+WinTopLeft                          0
+WinTopRight                         0
+WinBotLeft                          320
+WinBotRight                         240
 [Enddefine]
 
 //Constants for Data Source
@@ -112,44 +177,44 @@
 //-------------------------------------------------
 
 // IID numbers for interfaces to mention during object creation
-//	 XA_IID_NULL                    	1
-//	 XA_IID_OBJECT                    	2
-//	 XA_IID_CONFIGEXTENSION             3
-//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
-//	 XA_IID_ENGINE                    	5
-//	 XA_IID_THREADSYNC                  6
-//	 XA_IID_PLAY                    	7
-//	 XA_IID_PLAYBACKRATE                8
-//	 XA_IID_PREFETCHSTATUS              9
-//	 XA_IID_SEEK                    	10
-//	 XA_IID_VOLUME                    	11
-//	 XA_IID_IMAGECONTROLS               12
-//	 XA_IID_IMAGEEFFECTS                13
-//	 XA_IID_VIDEOPOSTPROCESSING         14
-//	 XA_IID_RECORD                    	15
-//	 XA_IID_SNAPSHOT                    16
-//	 XA_IID_METADATAEXTRACTION          17
-//	 XA_IID_METADATAINSERTION           18
-//	 XA_IID_METADATATRAVERSAL           19
-//	 XA_IID_DYNAMICSOURCE               20
-//	 XA_IID_CAMERACAPABILITIES          21
-//	 XA_IID_CAMERA                    	22
-//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
-//	 XA_IID_DEVICEVOLUME                24
-//	 XA_IID_EQUALIZER                   25
-//	 XA_IID_OUTPUTMIX                   26
-//	 XA_IID_RADIO                    	27
-//	 XA_IID_RDS                         28
-//	 XA_IID_VIBRA                    	29
-//	 XA_IID_LED                         30
-//	 XA_IID_AUDIODECODERCAPABILITIES    31
-//	 XA_IID_AUDIOENCODER                32
-//	 XA_IID_AUDIOENCODERCAPABILITIES    33
-//	 XA_IID_IMAGEENCODERCAPABILITIES    34
-//	 XA_IID_IMAGEDECODERCAPABILITIES    35
-//	 XA_IID_IMAGEENCODER                36
-//	 XA_IID_VIDEODECODERCAPABILITIES    37
-//	 XA_IID_VIDEOENCODER                38
-//	 XA_IID_VIDEOENCODERCAPABILITIES    39
-//	 XA_IID_STREAMINFORMATION           40
+//   XA_IID_NULL                        1
+//   XA_IID_OBJECT                      2
+//   XA_IID_CONFIGEXTENSION             3
+//   XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//   XA_IID_ENGINE                      5
+//   XA_IID_THREADSYNC                  6
+//   XA_IID_PLAY                        7
+//   XA_IID_PLAYBACKRATE                8
+//   XA_IID_PREFETCHSTATUS              9
+//   XA_IID_SEEK                        10
+//   XA_IID_VOLUME                      11
+//   XA_IID_IMAGECONTROLS               12
+//   XA_IID_IMAGEEFFECTS                13
+//   XA_IID_VIDEOPOSTPROCESSING         14
+//   XA_IID_RECORD                      15
+//   XA_IID_SNAPSHOT                    16
+//   XA_IID_METADATAEXTRACTION          17
+//   XA_IID_METADATAINSERTION           18
+//   XA_IID_METADATATRAVERSAL           19
+//   XA_IID_DYNAMICSOURCE               20
+//   XA_IID_CAMERACAPABILITIES          21
+//   XA_IID_CAMERA                      22
+//   XA_IID_AUDIOIODEVICECAPABILITIES   23
+//   XA_IID_DEVICEVOLUME                24
+//   XA_IID_EQUALIZER                   25
+//   XA_IID_OUTPUTMIX                   26
+//   XA_IID_RADIO                       27
+//   XA_IID_RDS                         28
+//   XA_IID_VIBRA                       29
+//   XA_IID_LED                         30
+//   XA_IID_AUDIODECODERCAPABILITIES    31
+//   XA_IID_AUDIOENCODER                32
+//   XA_IID_AUDIOENCODERCAPABILITIES    33
+//   XA_IID_IMAGEENCODERCAPABILITIES    34
+//   XA_IID_IMAGEDECODERCAPABILITIES    35
+//   XA_IID_IMAGEENCODER                36
+//   XA_IID_VIDEODECODERCAPABILITIES    37
+//   XA_IID_VIDEOENCODER                38
+//   XA_IID_VIDEOENCODERCAPABILITIES    39
+//   XA_IID_STREAMINFORMATION           40
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_dynsrcitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,169 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+[Test]
+title 13.1 DynSrcItf SetSource
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_DYNAMICSOURCE
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+request Event_XA_PLAYEVENT_HEADATEND
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 4
+ALImpl al_dynsrcitf_SetSource
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 13.2 DynSrcItf MediaPlayer MetadataExtraction GetValue MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 2 XA_IID_DYNAMICSOURCE XA_IID_METADATAEXTRACTION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 4
+ALImpl al_dynsrcitf_SetSource
+ALImpl al_metadataextractionitf_GetValue KhronosTitle JapJap
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 13.3 DynSrcItf MediaPlayer MetadataExtraction GetValue MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 2 XA_IID_DYNAMICSOURCE XA_IID_METADATAEXTRACTION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 4
+ALImpl al_dynsrcitf_SetSource
+ALImpl al_metadataextractionitf_GetValue KhronosTitle mp4_aac
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 13.4 DynSrcItf MetadataExtractor MetadataExtraction GetValue MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMetadataExtractor 2 17 XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 4
+ALImpl al_dynsrcitf_SetSource
+ALImpl al_metadataextractionitf_GetValue KhronosTitle JapJap
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 13.5 DynSrcItf MediaPlayer MetadataExtraction GetValue MP4 S60 Reset
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMetadataExtractor 2 17 XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 4
+ALImpl al_dynsrcitf_SetSource
+ALImpl al_metadataextractionitf_GetValue KhronosTitle mp4_aac
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 13.6 DynSrcItf MediaPlayer MetadataExtraction GetValue MP3 Helix Reset
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMetadataExtractor 2 17 XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 XA_IID_DYNAMICSOURCE
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 4
+ALImpl al_dynsrcitf_SetSource
+ALImpl al_metadataextractionitf_GetValue KhronosTitle JapJap
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_noklinvolitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,136 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 17.1 NokiaLinearVolumeItf SetVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIALINEARVOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokialinearvolumeitf_SetVolumeLevel 10
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 17.2 NokiaLinearVolumeItf GetVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIALINEARVOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokialinearvolumeitf_GetVolumeLevel
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 17.3 NokiaLinearVolumeItf GetStepCount
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIALINEARVOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokialinearvolumeitf_GetStepCount
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 17.4 NokiaLinearVolumeItf GetStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIALINEARVOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokialinearvolumeitf_RegisterVolumeCallback
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 17.5 NokiaLinearVolumeItf SetCallbackEventsMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIALINEARVOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokialinearvolumeitf_SetCallbackEventsMask 12
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 17.6 NokiaLinearVolumeItf GetCallbackEventsMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIALINEARVOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokialinearvolumeitf_GetCallbackEventsMask
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_nokvolextitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,273 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 16.1 NokiaVolumeExtItf SetVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_SetVolumeLevel 10
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.2 NokiaVolumeExtItf GetVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_GetVolumeLevel
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.3 NokiaVolumeExtItf GetMaxVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_GetMaxVolumeLevel
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.4 NokiaVolumeExtItf SetMute
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_nokiavolumeextitf_SetMute 1
+pause 5000
+ALImpl al_nokiavolumeextitf_SetMute 0
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.5 NokiaVolumeExtItf GetMute
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_nokiavolumeextitf_SetMute 1
+ALImpl al_nokiavolumeextitf_GetMute
+pause 5000
+ALImpl al_nokiavolumeextitf_SetMute 0
+ALImpl al_nokiavolumeextitf_GetMute
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.6 NokiaVolumeExtItf EnableStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.7 NokiaVolumeExtItf IsEnabledStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
+ALImpl al_nokiavolumeextitf_IsEnabledStereoPosition
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.8 NokiaVolumeExtItf SetStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
+ALImpl al_nokiavolumeextitf_SetStereoPosition 1000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.9 NokiaVolumeExtItf GetStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
+ALImpl al_nokiavolumeextitf_SetStereoPosition 1000
+ALImpl al_nokiavolumeextitf_GetStereoPosition
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.10 NokiaVolumeExtItf RegisterVolumeCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_RegisterVolumeCallback
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.11 NokiaVolumeExtItf SetCallbackEventsMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_SetCallbackEventsMask 12
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 16.12 NokiaVolumeExtItf GetCallbackEventsMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_nokiavolumeextitf_GetCallbackEventsMask
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_volumeitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,216 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 15.1 VolumeItf SetVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_volumeitf_SetVolumeLevel 10
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.2 VolumeItf GetVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_volumeitf_GetVolumeLevel
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.3 VolumeItf GetMaxVolumeLevel
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_volumeitf_GetMaxVolumeLevel
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.4 VolumeItf SetMute
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_volumeitf_SetMute 1
+pause 5000
+ALImpl al_volumeitf_SetMute 0
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.5 VolumeItf GetMute
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_volumeitf_SetMute 1
+ALImpl al_volumeitf_GetMute
+pause 5000
+ALImpl al_volumeitf_SetMute 0
+ALImpl al_volumeitf_GetMute
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.6 VolumeItf EnableStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_volumeitf_EnableStereoPosition 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.7 VolumeItf IsEnabledStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_volumeitf_EnableStereoPosition 1
+ALImpl al_volumeitf_IsEnabledStereoPosition
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.8 VolumeItf SetStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_volumeitf_EnableStereoPosition 1
+ALImpl al_volumeitf_SetStereoPosition 1000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 15.9 VolumeItf GetStereoPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+ALImpl al_volumeitf_EnableStereoPosition 1
+ALImpl al_volumeitf_SetStereoPosition 1000
+ALImpl al_volumeitf_GetStereoPosition
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_aiodcitf.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_aiodcitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -57,6 +57,11 @@
 //	 XA_IID_VIDEOENCODERCAPABILITIES    39
 //	 XA_IID_STREAMINFORMATION           40
 
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
 [Test]
 title 3.1 AudioIODevCapItf GetAvailableAudioInputs
 create openmaxaltestmodule ALImpl
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_audenccapitf.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_audenccapitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -57,6 +57,11 @@
 //	 XA_IID_VIDEOENCODERCAPABILITIES    39
 //	 XA_IID_STREAMINFORMATION           40
 
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
 [Test]
 title 4.1 AudioEncCapItf GetAudioEncoders
 create openmaxaltestmodule ALImpl
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_engineitf.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_engineitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -119,10 +119,9 @@
 ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.wav
 ALImpl al_SetDataFormat 1 audio/wav 15
 ALImpl al_SetDataSource 1 1 1
-ALImpl al_SetDataLocator 3 1 2910736386
+ALImpl al_SetDataLocator 3 1 2910736386 0
 ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 3 1 1
-allownextresult 0
+ALImpl al_SetDataSink 3 6 1
 ALImpl al_engitf_CreateMediaPlayer 0
 ALImpl al_objitf_Destroy 4
 ALImpl al_objitf_Destroy 1
@@ -135,10 +134,10 @@
 ALImpl al_createEngine 1 1 0 0
 ALImpl al_objitf_Realize 1 0
 ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.wav
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
 ALImpl al_SetDataFormat 1 audio/wav 15
 ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
+ALImpl al_SetDataLocator 3 1 2910736385 1
 ALImpl al_SetDataSource 3 1 1
 ALImpl al_engitf_CreateMediaRecorder
 ALImpl al_objitf_Destroy 5
@@ -165,12 +164,11 @@
 ALImpl al_createEngine 1 1 0 0
 ALImpl al_objitf_Realize 1 0
 ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
 ALImpl al_SetDataSource 1 1 3
-allownextresult 12
-ALImpl al_engitf_CreateMetadataExtractor
-//ALImpl al_objitf_Destroy 8
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Destroy 8
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest]
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_global.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_global.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -57,6 +57,10 @@
 //	 XA_IID_VIDEOENCODERCAPABILITIES    39
 //	 XA_IID_STREAMINFORMATION           40
 
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
 [Test]
 title 1.1 xaCreateEngine
 create openmaxaltestmodule ALImpl
@@ -86,4 +90,13 @@
 ALImpl al_createEngine 1 1 0 0
 ALImpl al_objitf_Destroy 1
 delete ALImpl
-[Endtest] 
\ No newline at end of file
+[Endtest] 
+
+[Test]
+title 1.5 xaCreateEngine ThreadSafety
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 1 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mo.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,155 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+// IID numbers for interfaces to mention during object creation
+//	 XA_IID_NULL                    	1
+//	 XA_IID_OBJECT                    	2
+//	 XA_IID_CONFIGEXTENSION             3
+//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//	 XA_IID_ENGINE                    	5
+//	 XA_IID_THREADSYNC                  6
+//	 XA_IID_PLAY                    	7
+//	 XA_IID_PLAYBACKRATE                8
+//	 XA_IID_PREFETCHSTATUS              9
+//	 XA_IID_SEEK                    	10
+//	 XA_IID_VOLUME                    	11
+//	 XA_IID_IMAGECONTROLS               12
+//	 XA_IID_IMAGEEFFECTS                13
+//	 XA_IID_VIDEOPOSTPROCESSING         14
+//	 XA_IID_RECORD                    	15
+//	 XA_IID_SNAPSHOT                    16
+//	 XA_IID_METADATAEXTRACTION          17
+//	 XA_IID_METADATAINSERTION           18
+//	 XA_IID_METADATATRAVERSAL           19
+//	 XA_IID_DYNAMICSOURCE               20
+//	 XA_IID_CAMERACAPABILITIES          21
+//	 XA_IID_CAMERA                    	22
+//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
+//	 XA_IID_DEVICEVOLUME                24
+//	 XA_IID_EQUALIZER                   25
+//	 XA_IID_OUTPUTMIX                   26
+//	 XA_IID_RADIO                    	27
+//	 XA_IID_RDS                         28
+//	 XA_IID_VIBRA                    	29
+//	 XA_IID_LED                         30
+//	 XA_IID_AUDIODECODERCAPABILITIES    31
+//	 XA_IID_AUDIOENCODER                32
+//	 XA_IID_AUDIOENCODERCAPABILITIES    33
+//	 XA_IID_IMAGEENCODERCAPABILITIES    34
+//	 XA_IID_IMAGEDECODERCAPABILITIES    35
+//	 XA_IID_IMAGEENCODER                36
+//	 XA_IID_VIDEODECODERCAPABILITIES    37
+//	 XA_IID_VIDEOENCODER                38
+//	 XA_IID_VIDEOENCODERCAPABILITIES    39
+//	 XA_IID_STREAMINFORMATION           40
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 20.1 MetadataExtractor QueryNumSupportedInterfaces
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_engitf_QueryNumSupportedInterfaces 8
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 20.2 MetadataExtractor QuerySupportedInterfaces
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_engitf_QuerySupportedInterfaces 8 0
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 20.3 MetadataExtractor DynItf AddItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 4
+ALImpl al_dimitf_AddInterface 3 0
+ALImpl al_dimitf_RemoveInterface 3 
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 20.4 MetadataExtractor Resume Itf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+allownextresult 1
+ALImpl al_objitf_Resume 8 0
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 20.5 MetadataExtractor ResumeInterface Itf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 4
+ALImpl al_dimitf_ResumeInterface 3 0
+ALImpl al_dimitf_RemoveInterface 3
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mo_mdextractionitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,352 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+// IID numbers for interfaces to mention during object creation
+//	 XA_IID_NULL                    	1
+//	 XA_IID_OBJECT                    	2
+//	 XA_IID_CONFIGEXTENSION             3
+//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//	 XA_IID_ENGINE                    	5
+//	 XA_IID_THREADSYNC                  6
+//	 XA_IID_PLAY                    	7
+//	 XA_IID_PLAYBACKRATE                8
+//	 XA_IID_PREFETCHSTATUS              9
+//	 XA_IID_SEEK                    	10
+//	 XA_IID_VOLUME                    	11
+//	 XA_IID_IMAGECONTROLS               12
+//	 XA_IID_IMAGEEFFECTS                13
+//	 XA_IID_VIDEOPOSTPROCESSING         14
+//	 XA_IID_RECORD                    	15
+//	 XA_IID_SNAPSHOT                    16
+//	 XA_IID_METADATAEXTRACTION          17
+//	 XA_IID_METADATAINSERTION           18
+//	 XA_IID_METADATATRAVERSAL           19
+//	 XA_IID_DYNAMICSOURCE               20
+//	 XA_IID_CAMERACAPABILITIES          21
+//	 XA_IID_CAMERA                    	22
+//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
+//	 XA_IID_DEVICEVOLUME                24
+//	 XA_IID_EQUALIZER                   25
+//	 XA_IID_OUTPUTMIX                   26
+//	 XA_IID_RADIO                    	27
+//	 XA_IID_RDS                         28
+//	 XA_IID_VIBRA                    	29
+//	 XA_IID_LED                         30
+//	 XA_IID_AUDIODECODERCAPABILITIES    31
+//	 XA_IID_AUDIOENCODER                32
+//	 XA_IID_AUDIOENCODERCAPABILITIES    33
+//	 XA_IID_IMAGEENCODERCAPABILITIES    34
+//	 XA_IID_IMAGEDECODERCAPABILITIES    35
+//	 XA_IID_IMAGEENCODER                36
+//	 XA_IID_VIDEODECODERCAPABILITIES    37
+//	 XA_IID_VIDEOENCODER                38
+//	 XA_IID_VIDEOENCODERCAPABILITIES    39
+//	 XA_IID_STREAMINFORMATION           40
+
+//Container Type
+// XA_CONTAINERTYPE_UNSPECIFIED 1
+// XA_CONTAINERTYPE_RAW 2
+// XA_CONTAINERTYPE_ASF 3
+// XA_CONTAINERTYPE_AVI 4
+// XA_CONTAINERTYPE_BMP 5
+// XA_CONTAINERTYPE_JPG 6
+// XA_CONTAINERTYPE_JPG2000 7
+// XA_CONTAINERTYPE_M4A 8
+// XA_CONTAINERTYPE_MP3 9
+// XA_CONTAINERTYPE_MP4 10
+// XA_CONTAINERTYPE_MPEG_ES 11
+// XA_CONTAINERTYPE_MPEG_PS 12
+// XA_CONTAINERTYPE_MPEG_TS 13
+// XA_CONTAINERTYPE_QT 14
+// XA_CONTAINERTYPE_WAV 15
+// XA_CONTAINERTYPE_XMF_0 16
+// XA_CONTAINERTYPE_XMF_1 17
+// XA_CONTAINERTYPE_XMF_2 18
+// XA_CONTAINERTYPE_XMF_3 19
+// XA_CONTAINERTYPE_XMF_GENERIC 20
+// XA_CONTAINERTYPE_AMR 21
+// XA_CONTAINERTYPE_AAC 22
+// XA_CONTAINERTYPE_3GPP 23
+// XA_CONTAINERTYPE_3GA 24
+// XA_CONTAINERTYPE_RM 25
+// XA_CONTAINERTYPE_DMF 26
+// XA_CONTAINERTYPE_SMF 27
+// XA_CONTAINERTYPE_MOBILE_DLS 28
+// XA_CONTAINERTYPE_0GG 29
+
+//Data Locator
+// XA_DATALOCATOR_URI 1
+// XA_DATALOCATOR_ADDRESS 2
+// XA_DATALOCATOR_IODEVICE 3
+// XA_DATALOCATOR_OUTPUTMIX 4
+// XA_DATALOCATOR_NATIVEDISPLAY 5
+
+//MDU KEYS 
+//KhronosTitle
+//KhronosArtist
+//KhronosAlbum
+//KhronosYear
+//KhronosComment
+//KhronosTrackNumber
+//KhronosGenre
+//Composer
+//KhronosCopyright
+//KhronosContentURL
+//attachedpicture
+//Vendor
+//KhronosRating
+//Duration
+
+[Test]
+title 18.1 MetadataExtractionItf GetItemCount MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetItemCount
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.2 MetadataExtractionItf GetKeySize 1 MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetKeySize 1
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.3 MetadataExtractionItf GetKey 1 MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+//ALImpl al_metadataextractionitf_GetKey 1 40
+ALImpl al_metadataextractionitf_GetKey KhronosTitle
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.4 MetadataExtractionItf GetValueSize 1 MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetValueSize 1
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.5 MetadataExtractionItf GetValue 1 MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+//ALImpl al_metadataextractionitf_GetValue 1 59
+ALImpl al_metadataextractionitf_GetValue KhronosTitle JapJap
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.6 MetadataExtractionItf GetCoverArt MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetCoverArt
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.7 MetadataExtractionItf GetItemCount MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetItemCount
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.8 MetadataExtractionItf GetKeySize 1 MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetKeySize 1
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.9 MetadataExtractionItf GetKey 1 MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetKey KhronosTitle
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.10 MetadataExtractionItf GetValueSize 1 MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetValueSize 1
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.11 MetadataExtractionItf GetValue 1 MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+ALImpl al_metadataextractionitf_GetValue KhronosTitle mp4_aac
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.12 MetadataExtractionItf AddKeyFilter
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+allownextresult 2
+ALImpl al_metadataextractionitf_AddKeyFilter
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 18.13 MetadataExtractionItf ClearKeyFilter
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 3
+ALImpl al_engitf_CreateMetadataExtractor 1 17
+ALImpl al_objitf_Realize 8 0
+ALImpl al_objitf_GetInterface 8 17
+allownextresult 2
+ALImpl al_metadataextractionitf_ClearKeyFilter
+ALImpl al_objitf_Destroy 8
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,194 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+// IID numbers for interfaces to mention during object creation
+//	 XA_IID_NULL                    	1
+//	 XA_IID_OBJECT                    	2
+//	 XA_IID_CONFIGEXTENSION             3
+//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//	 XA_IID_ENGINE                    	5
+//	 XA_IID_THREADSYNC                  6
+//	 XA_IID_PLAY                    	7
+//	 XA_IID_PLAYBACKRATE                8
+//	 XA_IID_PREFETCHSTATUS              9
+//	 XA_IID_SEEK                    	10
+//	 XA_IID_VOLUME                    	11
+//	 XA_IID_IMAGECONTROLS               12
+//	 XA_IID_IMAGEEFFECTS                13
+//	 XA_IID_VIDEOPOSTPROCESSING         14
+//	 XA_IID_RECORD                    	15
+//	 XA_IID_SNAPSHOT                    16
+//	 XA_IID_METADATAEXTRACTION          17
+//	 XA_IID_METADATAINSERTION           18
+//	 XA_IID_METADATATRAVERSAL           19
+//	 XA_IID_DYNAMICSOURCE               20
+//	 XA_IID_CAMERACAPABILITIES          21
+//	 XA_IID_CAMERA                    	22
+//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
+//	 XA_IID_DEVICEVOLUME                24
+//	 XA_IID_EQUALIZER                   25
+//	 XA_IID_OUTPUTMIX                   26
+//	 XA_IID_RADIO                    	27
+//	 XA_IID_RDS                         28
+//	 XA_IID_VIBRA                    	29
+//	 XA_IID_LED                         30
+//	 XA_IID_AUDIODECODERCAPABILITIES    31
+//	 XA_IID_AUDIOENCODER                32
+//	 XA_IID_AUDIOENCODERCAPABILITIES    33
+//	 XA_IID_IMAGEENCODERCAPABILITIES    34
+//	 XA_IID_IMAGEDECODERCAPABILITIES    35
+//	 XA_IID_IMAGEENCODER                36
+//	 XA_IID_VIDEODECODERCAPABILITIES    37
+//	 XA_IID_VIDEOENCODER                38
+//	 XA_IID_VIDEOENCODERCAPABILITIES    39
+//	 XA_IID_STREAMINFORMATION           40
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 9.1 MediaPlayer CreateAudioMediaPlayer
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 9.2 PlayItf CreateVideoMediaPlayer
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 9.3 MediaPlayer QueryNumSupportedInterfaces
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_engitf_QueryNumSupportedInterfaces 4
+ALImpl al_engitf_QueryNumSupportedInterfaces 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 9.4 MediaPlayer QuerySupportedInterfaces
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_engitf_QuerySupportedInterfaces 4 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 9.5 MediaPlayer DynItf AddItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 4
+ALImpl al_dimitf_AddInterface 17 0
+ALImpl al_dimitf_RemoveInterface 17 
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 9.6 MediaPlayer Resume Itf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+allownextresult 1
+ALImpl al_objitf_Resume 4 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 9.7 MediaPlayer DynItf ResumeItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 4
+ALImpl al_dimitf_ResumeInterface 17 0
+ALImpl al_dimitf_RemoveInterface 17 
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_mdextractionitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,223 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+[Test]
+title 19.1 MediaPlayer MetadataExtractionItf GetItemCount MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetItemCount
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 19.2 MediaPlayer MetadataExtractionItf GetKeySize MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetKeySize 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+[Test]
+title 19.3 MediaPlayer MetadataExtractionItf GetKey MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetKey KhronosTitle
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 19.4 MediaPlayer MetadataExtractionItf GetValueSize MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetValueSize 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 19.5 MediaPlayer MetadataExtractionItf GetValue MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetValue KhronosTitle JapJap
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 19.6 MediaPlayer MetadataExtractionItf GetCoverArt MP3
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/JapJap.mp3
+ALImpl al_SetDataFormat 1 audio/mp3 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetCoverArt
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 19.7 MediaPlayer MetadataExtractionItf GetItemCount MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetItemCount
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 19.8 MediaPlayer MetadataExtractionItf GetKeySize MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetKeySize 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+[Test]
+title 19.9 MediaPlayer MetadataExtractionItf GetKey MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetKey KhronosTitle
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 19.10 MediaPlayer MetadataExtractionItf GetValueSize MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetValueSize 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 19.11 MediaPlayer MetadataExtractionItf GetValue MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/testmp4.mp4
+ALImpl al_SetDataFormat 1 video/mp4 10
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 17
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER 17
+ALImpl al_metadataextractionitf_GetValue KhronosTitle mp4_aac
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_objectitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,178 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 10.1 ObjectItf Realize
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.2 ObjectItf Resume
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_objitf_Resume MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.3 ObjectItf GetStateUnrealized
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_GetState MO_PLAYER XA_OBJECT_STATE_UNREALIZED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.4 ObjectItf GetStateRealized
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetState MO_PLAYER XA_OBJECT_STATE_REALIZED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.5 ObjectItf GetInterafcePlayItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.6 ObjectItf RegisterCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_RegisterCallback MO_PLAYER
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.7 ObjectItf AbortAsyncOperation
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_RegisterCallback MO_PLAYER
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_AbortAsyncOperation MO_PLAYER
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.8 ObjectItf Destroy
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 10.9 ObjectItf SetPriority
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_SetPriority MO_PLAYER 3456789 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_playitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,1435 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 11.1 PlayItf GetInterafcePlayItfFailure
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.2 PlayItf GetInterafcePlayItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.3 PlayItf SetStatePlayStop
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 11.4 PlayItf SetStatePlayPausePlayStop
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+pause 2000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.5 PlayItf SetStatePause
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.6 PlayItf GetState
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.7 PlayItf GetDurationNullParam
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetDurationNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.8 PlayItf GetDuration
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetDuration 19000 21000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.9 PlayItf GetPositionNullParam
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetPositionNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.10 PlayItf GetPositionZero
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetPosition 0 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.11 PlayItf GetPosition5Sec
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_GetPosition
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.12 PlayItf RegisterCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.13 PlayItf SetCallbackEventMaskInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_SetCallbackEventMask 32
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.14 PlayItf SetCallbackEventMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.15 PlayItf GetCallbackEventMaskInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetCallbackEventMaskNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 11.16 PlayItf GetCallbackEventMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_playitf_GetCallbackEventMask 31
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.17 PlayItf SetMarkerPositionInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_SetMarkerPosition 300000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.18 PlayItf SetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.19 PlayItf ClearMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_playitf_ClearMarkerPosition
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.20 PlayItf GetMarkerPositionInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetMarkerPositionNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.21 PlayItf GetMarkerPositionPreConditionViolation
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_playitf_GetMarkerPosition 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.22 PlayItf SetGetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_playitf_GetMarkerPosition 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.23 PlayItf SetClearGetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_playitf_GetMarkerPosition 10000
+ALImpl al_playitf_ClearMarkerPosition
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_playitf_GetMarkerPosition 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.24 PlayItf SetPositionUpdatePeriod
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPositionUpdatePeriod 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.25 PlayItf GetPositionUpdatePeriodInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetPositionUpdatePeriodNullParam 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.26 PlayItf GetPositionUpdatePeriod
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetPositionUpdatePeriod 1000
+ALImpl al_playitf_SetPositionUpdatePeriod 10000
+ALImpl al_playitf_GetPositionUpdatePeriod 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.27 PlayItf PlayEventHeadMoving
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.28 PlayItf PlayEventHeadAtEnd
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+request Event_XA_PLAYEVENT_HEADATEND
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADATEND
+release Event_XA_PLAYEVENT_HEADATEND
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.29 PlayItf PlayEventHeadAtMarker
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 2
+ALImpl al_playitf_SetMarkerPosition 3000
+request Event_XA_PLAYEVENT_HEADATMARKER
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADATMARKER
+release Event_XA_PLAYEVENT_HEADATMARKER
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.30 PlayItf PlayEventHeadAtMarkerPlayPausePlay
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 2
+ALImpl al_playitf_SetMarkerPosition 15000
+request Event_XA_PLAYEVENT_HEADATMARKER
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+pause 2000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADATMARKER
+release Event_XA_PLAYEVENT_HEADATMARKER
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.31 PlayItf PlayEventHeadAtNewPos
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 5
+ALImpl al_playitf_SetPositionUpdatePeriod 2000
+request Event_XA_PLAYEVENT_HEADATEND
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADATEND
+release Event_XA_PLAYEVENT_HEADATEND
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.32 PlayItf GetInterafcePlayItfFailure
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.33 PlayItf GetInterafcePlayItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.34 PlayItf SetStatePlayStop
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 11.35 PlayItf SetStatePlayPausePlayStop
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+pause 2000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.36 PlayItf SetStatePause
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.37 PlayItf GetState
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.38 PlayItf GetDurationNullParam
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetDurationNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.39 PlayItf GetDuration
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetDuration 140000 142000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.40 PlayItf GetPositionNullParam
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetPositionNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.41 PlayItf GetPositionZero
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetPosition 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.42 PlayItf GetPosition5Sec
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 5000
+ALImpl al_playitf_GetPosition
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.43 PlayItf RegisterCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.44 PlayItf SetCallbackEventMaskInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_SetCallbackEventMask 32
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.45 PlayItf SetCallbackEventMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.46 PlayItf GetCallbackEventMaskInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetCallbackEventMaskNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 11.47 PlayItf GetCallbackEventMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_playitf_GetCallbackEventMask 31
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.48 PlayItf SetMarkerPositionInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_SetMarkerPosition 300000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.49 PlayItf SetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.50 PlayItf ClearMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_playitf_ClearMarkerPosition
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.51 PlayItf GetMarkerPositionInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetMarkerPositionNullParam
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.52 PlayItf GetMarkerPositionPreConditionViolation
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_playitf_GetMarkerPosition 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.53 PlayItf SetGetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_playitf_GetMarkerPosition 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.54 PlayItf SetClearGetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetMarkerPosition 10000
+ALImpl al_playitf_GetMarkerPosition 10000
+ALImpl al_playitf_ClearMarkerPosition
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_playitf_GetMarkerPosition 0
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.55 PlayItf SetPositionUpdatePeriod
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPositionUpdatePeriod 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.56 PlayItf GetPositionUpdatePeriodInvalid
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+allownextresult XA_RESULT_PARAMETER_INVALID
+ALImpl al_playitf_GetPositionUpdatePeriodNullParam 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.58 PlayItf GetPositionUpdatePeriod
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_GetPositionUpdatePeriod 1000
+ALImpl al_playitf_SetPositionUpdatePeriod 10000
+ALImpl al_playitf_GetPositionUpdatePeriod 10000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.60 PlayItf PlayEventHeadMoving
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.61 PlayItf PlayEventHeadAtEnd
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+request Event_XA_PLAYEVENT_HEADATEND
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADATEND
+release Event_XA_PLAYEVENT_HEADATEND
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 11.62 PlayItf PlayEventHeadAtMarker
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 2
+ALImpl al_playitf_SetMarkerPosition 3000
+request Event_XA_PLAYEVENT_HEADATMARKER
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADATMARKER
+release Event_XA_PLAYEVENT_HEADATMARKER
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+//[Test]
+//title 11.63 PlayItf PlayEventHeadAtMarkerPlayPausePlay
+//create openmaxaltestmodule ALImpl
+//ALImpl al_createEngine 1 1 0 0
+//ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+//ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+//ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+//ALImpl al_SetDataFormat 1 vdieo/3gp 17
+//ALImpl al_SetDataSource 1 1 1
+//ALImpl al_SetDataSink 3 6 1
+//ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+//ALImpl al_SetDataSink 5 3 2
+//ALImpl al_engitf_CreateMediaPlayer 0
+//ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+//ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+//ALImpl al_playitf_RegisterCallback
+//ALImpl al_playitf_SetCallbackEventMask 2
+//ALImpl al_playitf_SetMarkerPosition 15000
+//request Event_XA_PLAYEVENT_HEADATMARKER
+//ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+//ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+//pause 10000
+//ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PAUSED
+//ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+//pause 2000
+//ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+//ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+//wait Event_XA_PLAYEVENT_HEADATMARKER
+//release Event_XA_PLAYEVENT_HEADATMARKER
+//ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+//ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+//ALImpl al_objitf_Destroy MO_PLAYER
+//ALImpl al_objitf_Destroy MO_ENGINE
+//ALImpl al_DeleteWindow
+//delete ALImpl
+//[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_preemption.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+[Test]
+title 12.1 PlayItf AudioPreemption
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+request Event_XA_OBJECT_EVENT_RESOURCES_LOST
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_OBJECT_EVENT_RESOURCES_LOST
+release Event_XA_OBJECT_EVENT_RESOURCES_LOST
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 12.2 PlayItf VideoPreemption
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow 0 0 WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+request Event_XA_OBJECT_EVENT_RESOURCES_LOST
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_OBJECT_EVENT_RESOURCES_LOST
+release Event_XA_OBJECT_EVENT_RESOURCES_LOST
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PAUSED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_seekitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,157 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 12.1 SeekItf SetPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_SEEK
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 15000
+ALImpl al_seekitf_SetPosition 10000 1
+pause 15000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 12.2 SeekItf SetLoop
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_SEEK
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_seekitf_SetLoop 1 10000 20000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 35000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 12.3 SeekItf GetLoop
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_SEEK
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+ALImpl al_seekitf_SetLoop 1 10000 20000
+ALImpl al_seekitf_GetLoop
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 25000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 12.4 SeekItf SetPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer  1 XA_IID_SEEK
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_seekitf_SetPosition 60000 1
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 12.5 SeekItf SetLoop
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer  1 XA_IID_SEEK
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_SEEK
+ALImpl al_playitf_RegisterCallback
+ALImpl al_playitf_SetCallbackEventMask 31
+allownextresult 13
+ALImpl al_seekitf_SetLoop 1 10000 20000
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_strminfoitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,310 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+[StifSettings]
+CheckHeapBalance=on
+[EndStifSettings]
+
+[Test]
+title 14.1 StrmInfoItf QueryMediaContainerInformation
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryMediaContainerInformation
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.2 StrmInfoItf QueryStreamType
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryStreamType 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.3 StrmInfoItf QueryStreamInformation
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryStreamInformation 1 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.4 StrmInfoItf QueryStreamName
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryStreamName 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.5 StrmInfoItf RegisterStreamChangeCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_RegisterStreamChangeCallback
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.6 StrmInfoItf QueryActiveStreams
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryActiveStreams
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.7 StrmInfoItf SetActiveStream
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.mp3
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+allownextresult XA_RESULT_FEATURE_UNSUPPORTED KErrNotSupported
+ALImpl al_strminfoitf_SetActiveStream 1 1 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.8 StrmInfoItf QueryMediaContainerInformation
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryMediaContainerInformation
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.9 StrmInfoItf QueryStreamType
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryStreamType 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.10 StrmInfoItf QueryStreamInformation
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryStreamInformation 1 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.11 StrmInfoItf QueryStreamName
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryStreamName 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.12 StrmInfoItf RegisterStreamChangeCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_RegisterStreamChangeCallback
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.13 StrmInfoItf QueryActiveStreams
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+ALImpl al_strminfoitf_QueryActiveStreams
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 14.14 StrmInfoItf SetActiveStream
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.3gp
+ALImpl al_SetDataFormat 1 video/3gp 23
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_STREAMINFORMATION
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_STREAMINFORMATION
+allownextresult XA_RESULT_FEATURE_UNSUPPORTED KErrNotSupported
+ALImpl al_strminfoitf_SetActiveStream 1 1 1
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_variousformats.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,800 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+[Test]
+title 21.1 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.wav
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.2 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.wav
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.3 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/128k_H264_AAC24M22_320x240_15fps.3gp
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.4 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/128k_H264_AAC24M22_320x240_15fps.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.5 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/145k_H263_NB12_352x288_15fps.3gp
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.6 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/145k_H263_NB12_352x288_15fps.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.7 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/200k_RV9_COOK21_320x240_15fps.rm
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.8 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/200k_RV9_COOK21_320x240_15fps.rm
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.9 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/30k_MPEG4_AAC_352x288_15fps.3gp
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.10 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/30k_MPEG4_AAC_352x288_15fps.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.11 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/30s_MID_Generic.mid
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.12 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/30s_MID_Generic.mid
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.13 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/384k_CBR_WMV9_CBR_WMA9_CIF_15fps.wmv
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.14 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/384k_CBR_WMV9_CBR_WMA9_CIF_15fps.wmv
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.15 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/3GP_AAC+_8kbps_16khz_mono.3gp
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.16 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/3GP_AAC+_8kbps_16khz_mono.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.17 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/3gp_AAC-LC_16kbps_24kHz_mono.3gp
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.18 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/3gp_AAC-LC_16kbps_24kHz_mono.3gp
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.19 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/3Mbps_864x480_25fps_AAC_128_short.MP4
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.20 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/3Mbps_864x480_25fps_AAC_128_short.MP4
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.21 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/768Kbps_H264_VGA_24fps_AAC44_128kbps.MKV
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.22 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/768Kbps_H264_VGA_24fps_AAC44_128kbps.MKV
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.23 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/AAC_LC_16kbps_8khz_mono.aac
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.24 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/AAC_LC_16kbps_8khz_mono.aac
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.25 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/AMR-WB-23kb.awb
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.26 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/AMR-WB-23kb.awb
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.27 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/AMR_NB_12.2kbps.amr
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.28 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/AMR_NB_12.2kbps.amr
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.29 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/DivX_MP3_1MBps_320X240_25fps.avi
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.30 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/DivX_MP3_1MBps_320X240_25fps.avi
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.31 PlayItf Play10SecWithAudioSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/MP4_24kbps_16khz_mono.mp4
+ALImpl al_SetDataFormat 1 audio/mpeg 9
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.32 PlayItf Play10SecWithAudioVideoSink
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 file:/\/\/f:/testing/data/omxaltestdata/MP4_24kbps_16khz_mono.mp4
+ALImpl al_SetDataFormat 1 vdieo/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 10000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,180 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+// IID numbers for interfaces to mention during object creation
+//	 XA_IID_NULL                    	1
+//	 XA_IID_OBJECT                    	2
+//	 XA_IID_CONFIGEXTENSION             3
+//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//	 XA_IID_ENGINE                    	5
+//	 XA_IID_THREADSYNC                  6
+//	 XA_IID_PLAY                    	7
+//	 XA_IID_PLAYBACKRATE                8
+//	 XA_IID_PREFETCHSTATUS              9
+//	 XA_IID_SEEK                    	10
+//	 XA_IID_VOLUME                    	11
+//	 XA_IID_IMAGECONTROLS               12
+//	 XA_IID_IMAGEEFFECTS                13
+//	 XA_IID_VIDEOPOSTPROCESSING         14
+//	 XA_IID_RECORD                    	15
+//	 XA_IID_SNAPSHOT                    16
+//	 XA_IID_METADATAEXTRACTION          17
+//	 XA_IID_METADATAINSERTION           18
+//	 XA_IID_METADATATRAVERSAL           19
+//	 XA_IID_DYNAMICSOURCE               20
+//	 XA_IID_CAMERACAPABILITIES          21
+//	 XA_IID_CAMERA                    	22
+//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
+//	 XA_IID_DEVICEVOLUME                24
+//	 XA_IID_EQUALIZER                   25
+//	 XA_IID_OUTPUTMIX                   26
+//	 XA_IID_RADIO                    	27
+//	 XA_IID_RDS                         28
+//	 XA_IID_VIBRA                    	29
+//	 XA_IID_LED                         30
+//	 XA_IID_AUDIODECODERCAPABILITIES    31
+//	 XA_IID_AUDIOENCODER                32
+//	 XA_IID_AUDIOENCODERCAPABILITIES    33
+//	 XA_IID_IMAGEENCODERCAPABILITIES    34
+//	 XA_IID_IMAGEDECODERCAPABILITIES    35
+//	 XA_IID_IMAGEENCODER                36
+//	 XA_IID_VIDEODECODERCAPABILITIES    37
+//	 XA_IID_VIDEOENCODER                38
+//	 XA_IID_VIDEOENCODERCAPABILITIES    39
+//	 XA_IID_STREAMINFORMATION           40
+
+
+[StifSettings]
+CheckHeapBalance=off
+[EndStifSettings]
+
+[Test]
+title 25.1 MediaRecorder CreateAudioMediaRecorder
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 25.2 MediaRecorder QueryNumSupportedInterfaces
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_engitf_QueryNumSupportedInterfaces 5
+ALImpl al_engitf_QueryNumSupportedInterfaces 1
+ALImpl al_objitf_Destroy MO_RECORDER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 25.3 MediaRecorder QuerySupportedInterfaces
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_engitf_QuerySupportedInterfaces 5 0
+ALImpl al_objitf_Destroy MO_RECORDER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 25.4 MediaRecorder DynItf AddItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_objitf_Realize MO_RECORDER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0
+ALImpl al_dimitf_RemoveInterface 18 
+ALImpl al_objitf_Destroy MO_RECORDER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 25.5 MediaRecorder Resume Itf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_objitf_Realize MO_RECORDER XA_BOOLEAN_FALSE
+allownextresult 1
+ALImpl al_objitf_Resume 5 0
+ALImpl al_objitf_Destroy MO_RECORDER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 25.6 MediaRecorder DynItf AddItf
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_objitf_Realize MO_RECORDER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_ResumeInterface 18 0
+ALImpl al_dimitf_RemoveInterface 18 
+ALImpl al_objitf_Destroy MO_RECORDER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr_audioencoderitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,99 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+// IID numbers for interfaces to mention during object creation
+//	 XA_IID_NULL                    	1
+//	 XA_IID_OBJECT                    	2
+//	 XA_IID_CONFIGEXTENSION             3
+//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//	 XA_IID_ENGINE                    	5
+//	 XA_IID_THREADSYNC                  6
+//	 XA_IID_PLAY                    	7
+//	 XA_IID_PLAYBACKRATE                8
+//	 XA_IID_PREFETCHSTATUS              9
+//	 XA_IID_SEEK                    	10
+//	 XA_IID_VOLUME                    	11
+//	 XA_IID_IMAGECONTROLS               12
+//	 XA_IID_IMAGEEFFECTS                13
+//	 XA_IID_VIDEOPOSTPROCESSING         14
+//	 XA_IID_RECORD                    	15
+//	 XA_IID_SNAPSHOT                    16
+//	 XA_IID_METADATAEXTRACTION          17
+//	 XA_IID_METADATAINSERTION           18
+//	 XA_IID_METADATATRAVERSAL           19
+//	 XA_IID_DYNAMICSOURCE               20
+//	 XA_IID_CAMERACAPABILITIES          21
+//	 XA_IID_CAMERA                    	22
+//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
+//	 XA_IID_DEVICEVOLUME                24
+//	 XA_IID_EQUALIZER                   25
+//	 XA_IID_OUTPUTMIX                   26
+//	 XA_IID_RADIO                    	27
+//	 XA_IID_RDS                         28
+//	 XA_IID_VIBRA                    	29
+//	 XA_IID_LED                         30
+//	 XA_IID_AUDIODECODERCAPABILITIES    31
+//	 XA_IID_AUDIOENCODER                32
+//	 XA_IID_AUDIOENCODERCAPABILITIES    33
+//	 XA_IID_IMAGEENCODERCAPABILITIES    34
+//	 XA_IID_IMAGEDECODERCAPABILITIES    35
+//	 XA_IID_IMAGEENCODER                36
+//	 XA_IID_VIDEODECODERCAPABILITIES    37
+//	 XA_IID_VIDEOENCODER                38
+//	 XA_IID_VIDEOENCODERCAPABILITIES    39
+//	 XA_IID_STREAMINFORMATION           40
+
+[Test]
+title 7.1 AudioEncoderItf GetEncoderSettings
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 32
+ALImpl al_audioencoderitf_GetEncoderSettings
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 7.2 AudioEncoderItf SetEncoderSettings
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 32
+ALImpl al_audioencoderitf_SetEncoderSettings 13 1 2 2 44100 128 8 0 0 0 0 0 0 0
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr_mdinsertionitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,309 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+// IID numbers for interfaces to mention during object creation
+//	 XA_IID_NULL                    	1
+//	 XA_IID_OBJECT                    	2
+//	 XA_IID_CONFIGEXTENSION             3
+//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//	 XA_IID_ENGINE                    	5
+//	 XA_IID_THREADSYNC                  6
+//	 XA_IID_PLAY                    	7
+//	 XA_IID_PLAYBACKRATE                8
+//	 XA_IID_PREFETCHSTATUS              9
+//	 XA_IID_SEEK                    	10
+//	 XA_IID_VOLUME                    	11
+//	 XA_IID_IMAGECONTROLS               12
+//	 XA_IID_IMAGEEFFECTS                13
+//	 XA_IID_VIDEOPOSTPROCESSING         14
+//	 XA_IID_RECORD                    	15
+//	 XA_IID_SNAPSHOT                    16
+//	 XA_IID_METADATAEXTRACTION          17
+//	 XA_IID_METADATAINSERTION           18
+//	 XA_IID_METADATATRAVERSAL           19
+//	 XA_IID_DYNAMICSOURCE               20
+//	 XA_IID_CAMERACAPABILITIES          21
+//	 XA_IID_CAMERA                    	22
+//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
+//	 XA_IID_DEVICEVOLUME                24
+//	 XA_IID_EQUALIZER                   25
+//	 XA_IID_OUTPUTMIX                   26
+//	 XA_IID_RADIO                    	27
+//	 XA_IID_RDS                         28
+//	 XA_IID_VIBRA                    	29
+//	 XA_IID_LED                         30
+//	 XA_IID_AUDIODECODERCAPABILITIES    31
+//	 XA_IID_AUDIOENCODER                32
+//	 XA_IID_AUDIOENCODERCAPABILITIES    33
+//	 XA_IID_IMAGEENCODERCAPABILITIES    34
+//	 XA_IID_IMAGEDECODERCAPABILITIES    35
+//	 XA_IID_IMAGEENCODER                36
+//	 XA_IID_VIDEODECODERCAPABILITIES    37
+//	 XA_IID_VIDEOENCODER                38
+//	 XA_IID_VIDEOENCODERCAPABILITIES    39
+//	 XA_IID_STREAMINFORMATION           40
+
+[Test]
+title 6.1 MetadataInsertionItf CreateChildNode
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0 
+ALImpl al_objitf_GetInterface 5 18
+allownextresult 12 0
+ALImpl al_metadatainsertionitf_CreateChildNode 2147483647 2 audio/amr
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 6.2 MetadataInsertionItf GetSupportedKeysCount
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0 
+ALImpl al_objitf_GetInterface 5 18
+allownextresult 2 0
+ALImpl al_metadatainsertionitf_GetSupportedKeysCount 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 6.3 MetadataInsertionItf GetKeySize
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0 
+ALImpl al_objitf_GetInterface 5 18
+allownextresult 2 0
+ALImpl al_metadatainsertionitf_GetKeySize 1 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 6.4 MetadataInsertionItf GetKey
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0 
+ALImpl al_objitf_GetInterface 5 18
+allownextresult 2 0
+ALImpl al_metadatainsertionitf_GetKey 1 1 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 6.5 MetadataInsertionItf GetFreeKeysEncoding
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0 
+ALImpl al_objitf_GetInterface 5 18
+allownextresult 2 1
+ALImpl al_metadatainsertionitf_GetFreeKeysEncoding 1 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 6.6 MetadataInsertionItf InsertMetadataItem
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0 
+ALImpl al_objitf_GetInterface 5 18
+allownextresult 12 2
+ALImpl al_metadatainsertionitf_InsertMetadataItem 1 2 3 english 4 5 chinese 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 6.7 MetadataInsertionItf RegisterCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0 
+ALImpl al_objitf_GetInterface 5 18
+ALImpl al_metadatainsertionitf_RegisterCallback
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 6.8 MetadataInsertionItf DynItfMgmt
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0
+ALImpl al_objitf_GetInterface 5 18
+ALImpl al_dimitf_RegisterCallback
+ALImpl al_dimitf_RemoveInterface 18  
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 6.9 MetadataInsertionItf RegisterCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 1 
+ALImpl al_objitf_GetInterface 5 18
+ALImpl al_metadatainsertionitf_RegisterCallback
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 6.11 MetadataInsertionItf DynItf ASyncResume
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0
+ALImpl al_objitf_GetInterface 5 18
+ALImpl al_dimitf_ResumeInterface 18 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 6.12 MetadataInsertionItf DynItf Resume
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 4
+ALImpl al_dimitf_AddInterface 18 0
+ALImpl al_objitf_GetInterface 5 18
+allownextresult 1
+ALImpl al_dimitf_ResumeInterface 18 0
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mr_recorditf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,353 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: 
+//
+//
+
+
+// IID numbers for interfaces to mention during object creation
+//	 XA_IID_NULL                    	1
+//	 XA_IID_OBJECT                    	2
+//	 XA_IID_CONFIGEXTENSION             3
+//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
+//	 XA_IID_ENGINE                    	5
+//	 XA_IID_THREADSYNC                  6
+//	 XA_IID_PLAY                    	7
+//	 XA_IID_PLAYBACKRATE                8
+//	 XA_IID_PREFETCHSTATUS              9
+//	 XA_IID_SEEK                    	10
+//	 XA_IID_VOLUME                    	11
+//	 XA_IID_IMAGECONTROLS               12
+//	 XA_IID_IMAGEEFFECTS                13
+//	 XA_IID_VIDEOPOSTPROCESSING         14
+//	 XA_IID_RECORD                    	15
+//	 XA_IID_SNAPSHOT                    16
+//	 XA_IID_METADATAEXTRACTION          17
+//	 XA_IID_METADATAINSERTION           18
+//	 XA_IID_METADATATRAVERSAL           19
+//	 XA_IID_DYNAMICSOURCE               20
+//	 XA_IID_CAMERACAPABILITIES          21
+//	 XA_IID_CAMERA                    	22
+//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
+//	 XA_IID_DEVICEVOLUME                24
+//	 XA_IID_EQUALIZER                   25
+//	 XA_IID_OUTPUTMIX                   26
+//	 XA_IID_RADIO                    	27
+//	 XA_IID_RDS                         28
+//	 XA_IID_VIBRA                    	29
+//	 XA_IID_LED                         30
+//	 XA_IID_AUDIODECODERCAPABILITIES    31
+//	 XA_IID_AUDIOENCODER                32
+//	 XA_IID_AUDIOENCODERCAPABILITIES    33
+//	 XA_IID_IMAGEENCODERCAPABILITIES    34
+//	 XA_IID_IMAGEDECODERCAPABILITIES    35
+//	 XA_IID_IMAGEENCODER                36
+//	 XA_IID_VIDEODECODERCAPABILITIES    37
+//	 XA_IID_VIDEOENCODER                38
+//	 XA_IID_VIDEOENCODERCAPABILITIES    39
+//	 XA_IID_STREAMINFORMATION           40
+
+[Test]
+title 8.1 RecordItf SetRecordState
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetCallbackEventsMask 7
+ALImpl al_recorditf_SetRecordState 3
+pause 5000
+ALImpl al_recorditf_SetRecordState 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 8.2 RecordItf GetRecordState
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_GetRecordState
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 8.3 RecordItf SetDurationLimit
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetDurationLimit 100000
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]  
+
+[Test]
+title 8.4 RecordItf GetPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_GetPosition
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 8.5 RecordItf RegisterCallback
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_RegisterCallback
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 8.6 RecordItf SetCallbackEventsMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetCallbackEventsMask 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 8.7 RecordItf GetCallbackEventsMask
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_GetCallbackEventsMask
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 8.8 RecordItf SetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetMarkerPosition 1000
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 8.9 RecordItf ClearMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetMarkerPosition 1000
+ALImpl al_recorditf_ClearMarkerPosition
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 8.10 RecordItf SetMarkerPosition
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetMarkerPosition 1000
+ALImpl al_recorditf_GetMarkerPosition
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 8.11 RecordItf SetPositionUpdatePeriod
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetPositionUpdatePeriod 1000
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 8.12 RecordItf GetPositionUpdatePeriod
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
+ALImpl al_SetDataFormat 1 audio/wav 15
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetPositionUpdatePeriod 1000
+ALImpl al_recorditf_GetPositionUpdatePeriod
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 8.13 RecordItf SetRecordState AMR
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.amr
+ALImpl al_SetDataFormat 1 audio/amr 21
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetRecordState 3
+pause 5000
+ALImpl al_recorditf_SetRecordState 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 8.14 RecordItf SetRecordState MP4
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_GetInterface 1 5
+ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.mp4
+ALImpl al_SetDataFormat 1 audio/mpeg 10
+ALImpl al_SetDataSink 1 1 5
+ALImpl al_SetDataLocator 3 1 2910736385 1
+ALImpl al_SetDataSource 3 1 1
+ALImpl al_engitf_CreateMediaRecorder 1 15
+ALImpl al_objitf_Realize 5 0
+ALImpl al_objitf_GetInterface 5 15
+ALImpl al_recorditf_SetCallbackEventsMask 7
+ALImpl al_recorditf_SetRecordState 3
+pause 10000
+ALImpl al_recorditf_SetRecordState 1
+ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_objectitf.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_objectitf.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -14,26 +14,16 @@
 // Description: 
 //
 //
+[StifSettings]
+CheckHeapBalance=off
+[EndStifSettings]
 
 [Test]
 title 5.1 ObjectItf SetPriority
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_objitf_SetPriority 1 100 100
-ALImpl al_objitf_GetPriority 1
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
+ALImpl al_objitf_SetPriority 1 100 XA_BOOLEAN_FALSE
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest] 
@@ -42,21 +32,9 @@
 title 5.2 ObjectItf GetPriority
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_objitf_SetPriority 1 100 100
-ALImpl al_objitf_GetPriority 1
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
+ALImpl al_objitf_SetPriority 1 100 XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetPriority 1 100 XA_BOOLEAN_FALSE
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest] 
@@ -65,20 +43,8 @@
 title 5.3 ObjectItf SetLossOfControlInterfaces
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
 ALImpl al_objitf_SetLossOfControlInterfaces 1 0 1
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest] 
@@ -87,20 +53,8 @@
 title 5.4 ObjectItf RegisterCallback
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
 ALImpl al_objitf_RegisterCallback 1
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest] 
@@ -109,65 +63,67 @@
 title 5.5 ObjectItf GetState
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetState 1 XA_OBJECT_STATE_REALIZED
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest]
+
+[Test]
+title 5.6 ObjectItf Realize
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
 ALImpl al_objitf_GetInterface 1 5
-ALImpl al_objitf_GetState 1
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+
+[Test]
+title 5.7 ObjectItf Resume
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
+allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
+ALImpl al_objitf_Resume 1 XA_BOOLEAN_FALSE
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest]
 
 [Test]
-title 5.6 ObjectItf Resume
+title 5.8 ObjectItf AbortAsyncOperation
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-allownextresult XA_RESULT_PRECONDITIONS_VIOLATED
-ALImpl al_objitf_Resume 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
+ALImpl al_objitf_AbortAsyncOperation 1
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest]
 
 [Test]
-title 5.7 ObjectItf AbortAsyncOperation
+title 5.9 ObjectItf Realize Async
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_AbortAsyncOperation 5
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
+ALImpl al_objitf_RegisterCallback 1
+request Event_XA_OBJECT_EVENT_ASYNC_TERMINATION
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_TRUE
+wait Event_XA_OBJECT_EVENT_ASYNC_TERMINATION
+release Event_XA_OBJECT_EVENT_ASYNC_TERMINATION
+ALImpl al_objitf_Destroy 1
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 5.10 ObjectItf Resume
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_RegisterCallback 1
+ALImpl al_objitf_Realize 1 XA_BOOLEAN_FALSE
+request Event_XA_OBJECT_EVENT_ASYNC_TERMINATION
+ALImpl al_objitf_Resume 1 XA_BOOLEAN_TRUE
+wait Event_XA_OBJECT_EVENT_ASYNC_TERMINATION
+release Event_XA_OBJECT_EVENT_ASYNC_TERMINATION
 ALImpl al_objitf_Destroy 1
 delete ALImpl
 [Endtest]
\ No newline at end of file
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_ro_audioencoderitf.cfg	Mon May 03 12:59:52 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-//
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description: 
-//
-//
-
-// IID numbers for interfaces to mention during object creation
-//	 XA_IID_NULL                    	1
-//	 XA_IID_OBJECT                    	2
-//	 XA_IID_CONFIGEXTENSION             3
-//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
-//	 XA_IID_ENGINE                    	5
-//	 XA_IID_THREADSYNC                  6
-//	 XA_IID_PLAY                    	7
-//	 XA_IID_PLAYBACKRATE                8
-//	 XA_IID_PREFETCHSTATUS              9
-//	 XA_IID_SEEK                    	10
-//	 XA_IID_VOLUME                    	11
-//	 XA_IID_IMAGECONTROLS               12
-//	 XA_IID_IMAGEEFFECTS                13
-//	 XA_IID_VIDEOPOSTPROCESSING         14
-//	 XA_IID_RECORD                    	15
-//	 XA_IID_SNAPSHOT                    16
-//	 XA_IID_METADATAEXTRACTION          17
-//	 XA_IID_METADATAINSERTION           18
-//	 XA_IID_METADATATRAVERSAL           19
-//	 XA_IID_DYNAMICSOURCE               20
-//	 XA_IID_CAMERACAPABILITIES          21
-//	 XA_IID_CAMERA                    	22
-//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
-//	 XA_IID_DEVICEVOLUME                24
-//	 XA_IID_EQUALIZER                   25
-//	 XA_IID_OUTPUTMIX                   26
-//	 XA_IID_RADIO                    	27
-//	 XA_IID_RDS                         28
-//	 XA_IID_VIBRA                    	29
-//	 XA_IID_LED                         30
-//	 XA_IID_AUDIODECODERCAPABILITIES    31
-//	 XA_IID_AUDIOENCODER                32
-//	 XA_IID_AUDIOENCODERCAPABILITIES    33
-//	 XA_IID_IMAGEENCODERCAPABILITIES    34
-//	 XA_IID_IMAGEDECODERCAPABILITIES    35
-//	 XA_IID_IMAGEENCODER                36
-//	 XA_IID_VIDEODECODERCAPABILITIES    37
-//	 XA_IID_VIDEOENCODER                38
-//	 XA_IID_VIDEOENCODERCAPABILITIES    39
-//	 XA_IID_STREAMINFORMATION           40
-
-[Test]
-title 7.1 AudioEncoderItf GetEncoderSettings
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 32
-ALImpl al_audioencoderitf_GetEncoderSettings
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 7.2 AudioEncoderItf SetEncoderSettings
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 32
-ALImpl al_audioencoderitf_SetEncoderSettings 1 1 1 8000 128000 16 1 1 0 0 0 0 0
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
\ No newline at end of file
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_ro_mdinsertionitf.cfg	Mon May 03 12:59:52 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-//
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description: 
-//
-//
-
-// IID numbers for interfaces to mention during object creation
-//	 XA_IID_NULL                    	1
-//	 XA_IID_OBJECT                    	2
-//	 XA_IID_CONFIGEXTENSION             3
-//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
-//	 XA_IID_ENGINE                    	5
-//	 XA_IID_THREADSYNC                  6
-//	 XA_IID_PLAY                    	7
-//	 XA_IID_PLAYBACKRATE                8
-//	 XA_IID_PREFETCHSTATUS              9
-//	 XA_IID_SEEK                    	10
-//	 XA_IID_VOLUME                    	11
-//	 XA_IID_IMAGECONTROLS               12
-//	 XA_IID_IMAGEEFFECTS                13
-//	 XA_IID_VIDEOPOSTPROCESSING         14
-//	 XA_IID_RECORD                    	15
-//	 XA_IID_SNAPSHOT                    16
-//	 XA_IID_METADATAEXTRACTION          17
-//	 XA_IID_METADATAINSERTION           18
-//	 XA_IID_METADATATRAVERSAL           19
-//	 XA_IID_DYNAMICSOURCE               20
-//	 XA_IID_CAMERACAPABILITIES          21
-//	 XA_IID_CAMERA                    	22
-//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
-//	 XA_IID_DEVICEVOLUME                24
-//	 XA_IID_EQUALIZER                   25
-//	 XA_IID_OUTPUTMIX                   26
-//	 XA_IID_RADIO                    	27
-//	 XA_IID_RDS                         28
-//	 XA_IID_VIBRA                    	29
-//	 XA_IID_LED                         30
-//	 XA_IID_AUDIODECODERCAPABILITIES    31
-//	 XA_IID_AUDIOENCODER                32
-//	 XA_IID_AUDIOENCODERCAPABILITIES    33
-//	 XA_IID_IMAGEENCODERCAPABILITIES    34
-//	 XA_IID_IMAGEDECODERCAPABILITIES    35
-//	 XA_IID_IMAGEENCODER                36
-//	 XA_IID_VIDEODECODERCAPABILITIES    37
-//	 XA_IID_VIDEOENCODER                38
-//	 XA_IID_VIDEOENCODERCAPABILITIES    39
-//	 XA_IID_STREAMINFORMATION           40
-
-[Test]
-title 6.1 MetadataInsertionItf CreateChildNode
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 4
-ALImpl al_dimitf_AddInterface 18 0 
-ALImpl al_objitf_GetInterface 5 18
-allownextresult 12 0
-ALImpl al_metadatainsertionitf_CreateChildNode 2147483647 2 audio/amr
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 6.2 MetadataInsertionItf GetSupportedKeysCount
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 4
-ALImpl al_dimitf_AddInterface 18 0 
-ALImpl al_objitf_GetInterface 5 18
-allownextresult 2 0
-ALImpl al_metadatainsertionitf_GetSupportedKeysCount 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 6.3 MetadataInsertionItf GetKeySize
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 4
-ALImpl al_dimitf_AddInterface 18 0 
-ALImpl al_objitf_GetInterface 5 18
-allownextresult 2 0
-ALImpl al_metadatainsertionitf_GetKeySize 1 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 6.4 MetadataInsertionItf GetKey
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 4
-ALImpl al_dimitf_AddInterface 18 0 
-ALImpl al_objitf_GetInterface 5 18
-allownextresult 2 0
-ALImpl al_metadatainsertionitf_GetKey 1 1 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 6.5 MetadataInsertionItf GetFreeKeysEncoding
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 4
-ALImpl al_dimitf_AddInterface 18 0 
-ALImpl al_objitf_GetInterface 5 18
-allownextresult 2 1
-ALImpl al_metadatainsertionitf_GetFreeKeysEncoding 1 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 6.6 MetadataInsertionItf InsertMetadataItem
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 4
-ALImpl al_dimitf_AddInterface 18 0 
-ALImpl al_objitf_GetInterface 5 18
-allownextresult 12 2
-ALImpl al_metadatainsertionitf_InsertMetadataItem 1 2 3 english 4 5 chinese 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 6.7 MetadataInsertionItf RegisterCallback
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/test.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 4
-ALImpl al_dimitf_AddInterface 18 0 
-ALImpl al_objitf_GetInterface 5 18
-ALImpl al_metadatainsertionitf_RegisterCallback
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_ro_recorditf.cfg	Mon May 03 12:59:52 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,350 +0,0 @@
-//
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description: 
-//
-//
-
-// IID numbers for interfaces to mention during object creation
-//	 XA_IID_NULL                    	1
-//	 XA_IID_OBJECT                    	2
-//	 XA_IID_CONFIGEXTENSION             3
-//	 XA_IID_DYNAMICINTERFACEMANAGEMENT  4
-//	 XA_IID_ENGINE                    	5
-//	 XA_IID_THREADSYNC                  6
-//	 XA_IID_PLAY                    	7
-//	 XA_IID_PLAYBACKRATE                8
-//	 XA_IID_PREFETCHSTATUS              9
-//	 XA_IID_SEEK                    	10
-//	 XA_IID_VOLUME                    	11
-//	 XA_IID_IMAGECONTROLS               12
-//	 XA_IID_IMAGEEFFECTS                13
-//	 XA_IID_VIDEOPOSTPROCESSING         14
-//	 XA_IID_RECORD                    	15
-//	 XA_IID_SNAPSHOT                    16
-//	 XA_IID_METADATAEXTRACTION          17
-//	 XA_IID_METADATAINSERTION           18
-//	 XA_IID_METADATATRAVERSAL           19
-//	 XA_IID_DYNAMICSOURCE               20
-//	 XA_IID_CAMERACAPABILITIES          21
-//	 XA_IID_CAMERA                    	22
-//	 XA_IID_AUDIOIODEVICECAPABILITIES   23
-//	 XA_IID_DEVICEVOLUME                24
-//	 XA_IID_EQUALIZER                   25
-//	 XA_IID_OUTPUTMIX                   26
-//	 XA_IID_RADIO                    	27
-//	 XA_IID_RDS                         28
-//	 XA_IID_VIBRA                    	29
-//	 XA_IID_LED                         30
-//	 XA_IID_AUDIODECODERCAPABILITIES    31
-//	 XA_IID_AUDIOENCODER                32
-//	 XA_IID_AUDIOENCODERCAPABILITIES    33
-//	 XA_IID_IMAGEENCODERCAPABILITIES    34
-//	 XA_IID_IMAGEDECODERCAPABILITIES    35
-//	 XA_IID_IMAGEENCODER                36
-//	 XA_IID_VIDEODECODERCAPABILITIES    37
-//	 XA_IID_VIDEOENCODER                38
-//	 XA_IID_VIDEOENCODERCAPABILITIES    39
-//	 XA_IID_STREAMINFORMATION           40
-
-[Test]
-title 8.1 RecordItf SetRecordState
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder 1 15
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetRecordState 3
-pause 5000
-ALImpl al_recorditf_SetRecordState 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 8.2 RecordItf GetRecordState
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_GetRecordState
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-[Test]
-title 8.3 RecordItf SetDurationLimit
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetDurationLimit 100000
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]  
-
-[Test]
-title 8.4 RecordItf GetPosition
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_GetPosition
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 8.5 RecordItf RegisterCallback
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_RegisterCallback
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 8.6 RecordItf SetCallbackEventsMask
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetCallbackEventsMask 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-[Test]
-title 8.7 RecordItf GetCallbackEventsMask
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_GetCallbackEventsMask
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-
-[Test]
-title 8.8 RecordItf SetMarkerPosition
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetMarkerPosition 1000
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-
-[Test]
-title 8.9 RecordItf ClearMarkerPosition
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetMarkerPosition 1000
-ALImpl al_recorditf_ClearMarkerPosition
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-[Test]
-title 8.10 RecordItf SetMarkerPosition
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetMarkerPosition 1000
-ALImpl al_recorditf_GetMarkerPosition
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-[Test]
-title 8.11 RecordItf SetPositionUpdatePeriod
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-[Test]
-title 8.12 RecordItf GetPositionUpdatePeriod
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.wav
-ALImpl al_SetDataFormat 1 audio/wav 15
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetPositionUpdatePeriod 1000
-ALImpl al_recorditf_GetPositionUpdatePeriod
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest]
-
-[Test]
-title 8.13 RecordItf SetRecordState AMR
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.amr
-ALImpl al_SetDataFormat 1 audio/amr 21
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder 1 15
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetRecordState 3
-pause 5000
-ALImpl al_recorditf_SetRecordState 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 8.14 RecordItf SetRecordState MP4
-create openmaxaltestmodule ALImpl
-ALImpl al_createEngine 1 1 0 0
-ALImpl al_objitf_Realize 1 0
-ALImpl al_objitf_GetInterface 1 5
-ALImpl al_SetDataLocator 1 file:/\/\/c:/testing/data/omxaltestdata/record.mp4
-ALImpl al_SetDataFormat 1 audio/mpeg 10
-ALImpl al_SetDataSink 1 1 5
-ALImpl al_SetDataLocator 3 1 2910736385
-ALImpl al_SetDataSource 3 1 1
-ALImpl al_engitf_CreateMediaRecorder 1 15
-ALImpl al_objitf_Realize 5 0
-ALImpl al_objitf_GetInterface 5 15
-ALImpl al_recorditf_SetRecordState 3
-pause 10000
-ALImpl al_recorditf_SetRecordState 1
-ALImpl al_objitf_Destroy 5
-ALImpl al_objitf_Destroy 1
-delete ALImpl
-[Endtest] 
-
Binary file mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/JapJap.mp3 has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/readme.txt	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,2 @@
+test.3gp - http://10.48.2.51/Copyright_Free_Test_Content/Clips/Video/3GP/176x144/h263/index_http.html - 15fps_384kbps_AAC-LC_128kbps_stereo_32kHz.3gp
+test.mp3 - http://10.48.2.51/Copyright_Free_Test_Content/Clips/Audio/Complete_Clips/Content/MP3/MPEG2.5/index_tmp.html - MP3_MPEG2.5_96kbps_11.025khz_stereo.mp3
\ No newline at end of file
Binary file mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/test.3gp has changed
Binary file mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/test.mp3 has changed
Binary file mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/data/c/omxaltestdata/testmp4.mp4 has changed
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/bld.inf	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -20,15 +20,34 @@
 
 PRJ_TESTEXPORTS
 ../conf/openmaxaltestmodule_common.cfg              /epoc32/winscw/c/testframework/openmaxaltestmodule_common.cfg
+../conf/openmaxaltestmodule_common_noklinvolitf.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_common_noklinvolitf.cfg
+../conf/openmaxaltestmodule_common_nokvolextitf.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_common_nokvolextitf.cfg
+../conf/openmaxaltestmodule_common_volumeitf.cfg    /epoc32/winscw/c/testframework/openmaxaltestmodule_common_volumeitf.cfg
 ../conf/openmaxaltestmodule_objectitf.cfg           /epoc32/winscw/c/testframework/openmaxaltestmodule_objectitf.cfg
-../conf/openmaxaltestmodule_ro_mdinsertionitf.cfg   /epoc32/winscw/c/testframework/openmaxaltestmodule_ro_mdinsertionitf.cfg
-../conf/openmaxaltestmodule_ro_recorditf.cfg        /epoc32/winscw/c/testframework/openmaxaltestmodule_ro_recorditf.cfg
-../conf/openmaxaltestmodule_ro_audioencoderitf.cfg  /epoc32/winscw/c/testframework/openmaxaltestmodule_ro_audioencoderitf.cfg
+../conf/openmaxaltestmodule_mr.cfg   					/epoc32/winscw/c/testframework/openmaxaltestmodule_mr.cfg
+../conf/openmaxaltestmodule_mr_mdinsertionitf.cfg   	/epoc32/winscw/c/testframework/openmaxaltestmodule_mr_mdinsertionitf.cfg
+../conf/openmaxaltestmodule_mr_recorditf.cfg        	/epoc32/winscw/c/testframework/openmaxaltestmodule_mr_recorditf.cfg
+../conf/openmaxaltestmodule_mr_audioencoderitf.cfg  	/epoc32/winscw/c/testframework/openmaxaltestmodule_mr_audioencoderitf.cfg
 ../conf/openmaxaltestmodule_engine_audenccapitf.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_engine_audenccapitf.cfg
 ../conf/openmaxaltestmodule_global.cfg              /epoc32/winscw/c/testframework/openmaxaltestmodule_global.cfg
 ../conf/openmaxaltestmodule_engine_engineitf.cfg    /epoc32/winscw/c/testframework/openmaxaltestmodule_engine_engineitf.cfg
 ../conf/openmaxaltestmodule_engine_aiodcitf.cfg     /epoc32/winscw/c/testframework/openmaxaltestmodule_engine_aiodcitf.cfg
+../conf/openmaxaltestmodule_mp.cfg 		    /epoc32/winscw/c/testframework/openmaxaltestmodule_mp.cfg
+../conf/openmaxaltestmodule_mo.cfg 		    /epoc32/winscw/c/testframework/openmaxaltestmodule_mo.cfg
+../conf/openmaxaltestmodule_mp_objectitf.cfg 	    /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_objectitf.cfg
+../conf/openmaxaltestmodule_mp_playitf.cfg 	    /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_playitf.cfg
+../conf/openmaxaltestmodule_mp_seekitf.cfg 	    /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_seekitf.cfg
+../conf/openmaxaltestmodule_mp_variousformats.cfg   /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_variousformats.cfg
+../conf/openmaxaltestmodule_common_dynsrcitf.cfg    /epoc32/winscw/c/testframework/openmaxaltestmodule_common_dynsrcitf.cfg
+../conf/openmaxaltestmodule_mp_strminfoitf.cfg 	    /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_strminfoitf.cfg
+../conf/openmaxaltestmodule_mp_preemption.cfg       /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_preemption.cfg
+../conf/openmaxaltestmodule_mo_mdextractionitf.cfg  /epoc32/winscw/c/testframework/openmaxaltestmodule_mo_mdextractionitf.cfg
+../conf/openmaxaltestmodule_mp_mdextractionitf.cfg  /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_mdextractionitf.cfg
 ../data/c/omxaltestdata/test.wav                    /epoc32/winscw/c/testing/data/omxaltestdata/test.wav
+../data/c/omxaltestdata/test.mp3                    /epoc32/winscw/c/testing/data/omxaltestdata/test.mp3
+../data/c/omxaltestdata/test.3gp                    /epoc32/winscw/c/testing/data/omxaltestdata/test.3gp
+../data/c/omxaltestdata/JapJap.mp3                  /epoc32/winscw/c/testing/data/omxaltestdata/JapJap.mp3
+../data/c/omxaltestdata/testmp4.mp4                 /epoc32/winscw/c/testing/data/omxaltestdata/testmp4.mp4
 ../init/testframework.ini                           /epoc32/winscw/c/testframework/testframework.ini
 
 PRJ_EXPORTS
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.mmp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.mmp	Fri Apr 30 19:18:45 2010 -0500
@@ -32,10 +32,15 @@
 //TARGETPATH      ?target_path
 DEFFILE         openmaxaltestmodule.def
 
+//MACRO           PROFILE_TIME
+//MACRO           PRINT_TO_CONSOLE_TIME_DIFF
+
 USERINCLUDE     ../inc 
 OS_LAYER_LIBC_SYSTEMINCLUDE
+OS_LAYER_GLIB_SYSTEMINCLUDE
 OS_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE 	/epoc32/include/platform/mw/khronos/ 
+MW_LAYER_SYSTEMINCLUDE
 
 SOURCEPATH      ../src/common
 SOURCE          openmaxaltestmodule.cpp
@@ -45,30 +50,46 @@
 SOURCE          openmaxalobjectcallbacks.cpp 
 SOURCE          openmaxaldynitfmgmtitftests.cpp
 SOURCE          openmaxaldynitfmgmtitfcallbacks.cpp
+SOURCE		 	openmaxaldynsrcitftests.cpp
+SOURCE			openmaxalstrminfoitftests.cpp
+SOURCE			openmaxalvolumeitftests.cpp
+SOURCE			openmaxalnokiavolumeextitftests.cpp
+SOURCE			openmaxalnokialinearvolumeitftests.cpp
+SOURCE 			TimeoutController.cpp
+
 
 SOURCEPATH      ../src/engine
-SOURCE			openmaxalenginetests.cpp 
-SOURCE 			openmaxalengineitftests.cpp
-SOURCE 			openmaxalaudioiodevicecapabilitiesitftests.cpp
-SOURCE 			openmaxalaudioencodercapabiltiesitftests.cpp
+SOURCE		openmaxalenginetests.cpp 
+SOURCE 		openmaxalengineitftests.cpp
+SOURCE 		openmaxalaudioiodevicecapabilitiesitftests.cpp
+SOURCE 		openmaxalaudioencodercapabiltiesitftests.cpp
 SOURCE          openmaxalaudioiodevicecapabilitiesitfcallbacks.cpp 
 
 SOURCEPATH      ../src/recorder
-SOURCE 			openmaxalrecorditftests.cpp
-SOURCE 			openmaxalaudioencoderitftests.cpp
-SOURCE 			openmaxalmetadatainsertionitftests.cpp 
+SOURCE 		openmaxalrecorditftests.cpp
+SOURCE 		openmaxalaudioencoderitftests.cpp
+SOURCE 		openmaxalmetadatainsertionitftests.cpp 
 SOURCE          openmaxalrecorditfcallbacks.cpp 
 SOURCE          openmaxalmetadatainsertionitfcallbacks.cpp
 
+SOURCEPATH 	../src/player
+SOURCE 		openmaxalplayitftests.cpp
+SOURCE 		openmaxalseekitftests.cpp
+
+SOURCEPATH      ../src/metadata
+SOURCE		openmaxalmetadataextractionitftests.cpp
 
 LIBRARY         euser.lib
+LIBRARY			libglib.lib
 LIBRARY         stiftestinterface.lib
 LIBRARY         stiftestengine.lib
-LIBRARY			ecom.lib
+LIBRARY		ecom.lib
 LIBRARY         openmaxal.lib
-LIBRARY			libc.lib
+LIBRARY		libc.lib
+LIBRARY		ws32.lib
 LANG            SC
 
 
 
 // End of File
+
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.pkg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.pkg	Fri Apr 30 19:18:45 2010 -0500
@@ -20,7 +20,7 @@
 &EN
 
 ; Provide value for uid
-#{"STIF"},(0x10207CA4),1,1,0,TYPE=SA
+#{"OpenMAXALTestModule"},(0x10207CA4),1,1,0,TYPE=SA
 
 ; Series60 product id for S60 3.0
 [0x101F7961], 0, 0, 0, {"Series60ProductID"}
@@ -49,17 +49,34 @@
 "\epoc32\release\armv5\udeb\openmaxaltestmodule.dll"                -   "!:\sys\bin\openmaxaltestmodule.dll"
 "..\conf\openmaxaltestmodule_global.cfg"                            -   "!:\testframework\openmaxaltestmodule_global.cfg"
 "..\conf\openmaxaltestmodule_common.cfg"                            -   "!:\testframework\openmaxaltestmodule_common.cfg"
+"..\conf\openmaxaltestmodule_common_noklinvolitf.cfg"               -   "!:\testframework\openmaxaltestmodule_common_noklinvolitf.cfg"
+"..\conf\openmaxaltestmodule_common_nokvolextitf.cfg"               -   "!:\testframework\openmaxaltestmodule_common_nokvolextitf.cfg"
+"..\conf\openmaxaltestmodule_common_volumeitf.cfg"                  -   "!:\testframework\openmaxaltestmodule_common_volumeitf.cfg"
 "..\conf\openmaxaltestmodule_objectitf.cfg"                         -   "!:\testframework\openmaxaltestmodule_objectitf.cfg"
 "..\conf\openmaxaltestmodule_engine_engineitf.cfg"                  -   "!:\testframework\openmaxaltestmodule_engine_engineitf.cfg"
 "..\conf\openmaxaltestmodule_engine_audenccapitf.cfg"               -   "!:\testframework\openmaxaltestmodule_engine_audenccapitf.cfg"
 "..\conf\openmaxaltestmodule_engine_aiodcitf.cfg"                   -   "!:\testframework\openmaxaltestmodule_engine_aiodcitf.cfg"
-"..\conf\openmaxaltestmodule_ro_recorditf.cfg"                      -   "!:\testframework\openmaxaltestmodule_ro_recorditf.cfg"
-"..\conf\openmaxaltestmodule_ro_mdinsertionitf.cfg"                 -   "!:\testframework\openmaxaltestmodule_ro_mdinsertionitf.cfg"
-"..\conf\openmaxaltestmodule_ro_audioencoderitf.cfg"                -   "!:\testframework\openmaxaltestmodule_ro_audioencoderitf.cfg"
-
+"..\conf\openmaxaltestmodule_mr.cfg"                      			-   "!:\testframework\openmaxaltestmodule_mr.cfg"
+"..\conf\openmaxaltestmodule_mr_recorditf.cfg"                      -   "!:\testframework\openmaxaltestmodule_mr_recorditf.cfg"
+"..\conf\openmaxaltestmodule_mr_mdinsertionitf.cfg"                 -   "!:\testframework\openmaxaltestmodule_mr_mdinsertionitf.cfg"
+"..\conf\openmaxaltestmodule_mr_audioencoderitf.cfg"                -   "!:\testframework\openmaxaltestmodule_mr_audioencoderitf.cfg"
+"..\conf\openmaxaltestmodule_mp.cfg"                                -   "!:\testframework\openmaxaltestmodule_mp.cfg"
+"..\conf\openmaxaltestmodule_mo.cfg"                                -   "!:\testframework\openmaxaltestmodule_mo.cfg"
+"..\conf\openmaxaltestmodule_mp_objectitf.cfg"                      -   "!:\testframework\openmaxaltestmodule_mp_objectitf.cfg"
+"..\conf\openmaxaltestmodule_mp_playitf.cfg"                        -   "!:\testframework\openmaxaltestmodule_mp_playitf.cfg"
+"..\conf\openmaxaltestmodule_mp_seekitf.cfg"                        -   "!:\testframework\openmaxaltestmodule_mp_seekitf.cfg"
+"..\conf\openmaxaltestmodule_common_dynsrcitf.cfg"                      -   "!:\testframework\openmaxaltestmodule_common_dynsrcitf.cfg"
+"..\conf\openmaxaltestmodule_mp_strminfoitf.cfg"                    -   "!:\testframework\openmaxaltestmodule_mp_strminfoitf.cfg"
+"..\conf\openmaxaltestmodule_mp_preemption.cfg"                     -   "!:\testframework\openmaxaltestmodule_mp_preemption.cfg"
+"..\conf\openmaxaltestmodule_mo_mdextractionitf.cfg"                -   "!:\testframework\openmaxaltestmodule_mo_mdextractionitf.cfg"
+"..\conf\openmaxaltestmodule_mp_mdextractionitf.cfg"                -   "!:\testframework\openmaxaltestmodule_mp_mdextractionitf.cfg"
+"..\conf\openmaxaltestmodule_mp_variousformats.cfg"                 -   "!:\testframework\openmaxaltestmodule_mp_variousformats.cfg"
 ;data files
 "..\data\c\omxaltestdata\test.wav"                                  -   "!:\testing\data\omxaltestdata\test.wav"
-
+"..\data\c\omxaltestdata\test.mp3"                                  -  "!:\testing\data\omxaltestdata\test.mp3"
+"..\data\c\omxaltestdata\test.3gp"                                  -  "!:\testing\data\omxaltestdata\test.3gp"
+"..\data\c\omxaltestdata\JapJap.mp3"                                -   "!:\testing\data\omxaltestdata\JapJap.mp3"
+"..\data\c\omxaltestdata\testmp4.mp4"                               -   "!:\testing\data\omxaltestdata\testmp4.mp4"
 ; Embedded SIS 
 ; None
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/TimeoutController.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*
+*/
+
+
+
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifLogger.h>
+#include <StifTestInterface.h>
+
+
+/* This class is used to notify the observer 
+*  about the timeout 
+*/
+class MTimeoutObserver
+{
+    public: // New functions
+    
+    /**
+    * Timeout 
+    */
+    virtual void HandleTimeout(TInt error) = 0;
+};
+    
+
+_LIT(KFormatTimeStamp, "%:0%J%:1%T%:2%S%.%*C4%:3%+B");
+
+
+/* This class is used for extra time controlling
+*  The STIF timeout isn't enough
+*/
+NONSHARABLE_CLASS(CSimpleTimeout) : public CActive
+{
+    public:     // Enumerations
+    // None
+
+    private:    // Enumerations
+    // None
+
+    public:     // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    */
+    static CSimpleTimeout* NewL( MTimeoutObserver* aObserver, CStifLogger* aLogger);
+
+    /**
+    * Destructor.
+    */
+    ~CSimpleTimeout();
+
+    public:     // New functions
+
+    /**
+    * Starts timeout counting
+    */
+    void Start(TTimeIntervalMicroSeconds aTimeout);
+
+    /**
+    * Cancel timeout counting
+    */
+    void Stop();
+
+
+    public:     // Functions from base classes
+
+    /**
+    * RunL derived from CActive handles the completed requests.
+    */
+    void RunL();
+
+    /**
+    * DoCancel derived from CActive handles the cancel
+    */
+    void DoCancel();
+
+    /**
+    * RunError derived from CActive handles errors from active handler.
+    */
+    TInt RunError( TInt aError );
+
+    protected:  // New functions
+    // None
+
+    protected:  // Functions from base classes
+    // None
+
+    private:
+
+    /**
+    * By default Symbian OS constructor is private.
+    */
+    void ConstructL(MTimeoutObserver* aObserver, CStifLogger* aLogger);
+
+    /**
+    * C++ constructor.
+    */
+    CSimpleTimeout();
+
+    public:     // Data
+    // None
+
+    protected:  // Data
+    // None
+
+    private:    // Data
+    MTimeoutObserver*   iObserver;
+    RTimer 						  iTimer;
+
+    // Storage for testcase timeout.
+    TTime 						iTestCaseTimeout;
+    CStifLogger*				iLog;
+
+    public:     // Friend classes
+    // None
+
+    protected:  // Friend classes
+    // None
+
+    private:    // Friend classes
+    // None
+
+};
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/openmaxaltestmodule.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/openmaxaltestmodule.h	Fri Apr 30 19:18:45 2010 -0500
@@ -24,9 +24,28 @@
 #include <StifTestModule.h>
 #include <TestclassAssert.h>
 #include <OpenMAXAL.h>
+#include <xanokialinearvolumeitf.h>
+#include <xanokiavolumeextitf.h>
+#include <e32msgqueue.h>
+#include "TimeoutController.h"
+#include <w32std.h>
+
 // CONSTANTS
 //const ?type ?constant_var = ?constant;
+// CONSTANTS
+const TInt KErrBadTestParameter= -1000;         // Error on configuration file
 
+const TInt KErrEventPending =-2000;             // Timeout and not callback 
+const TInt KErrCallbackErrorCode = -2001;       // Callback return error code
+const TInt KErrUnexpectedValue =-2002;          // Unexpected value at setting    
+const TInt KErrTimeoutController = -2007;       // Unexpected notification
+
+const TInt KShortTimeout = 1000;
+const TInt KMediumTimeout = 4000;
+const TInt KLongTimeout = 100000;
+
+
+_LIT( KMsgBadTestParameters, "[Error] No valid test case parameters");
 // MACROS
 #define RET_ERR_IF_ERR(err) if (err!=KErrNone) return err;
 //#define ?macro ?macro_def
@@ -63,7 +82,8 @@
 *  @lib ?library
 *  @since ?Series60_version
 */
-NONSHARABLE_CLASS(COpenMAXALTestModule) : public CScriptBase
+NONSHARABLE_CLASS(COpenMAXALTestModule) : public CScriptBase,
+                                            public MTimeoutObserver
     {
     public:  // Constructors and destructor
 
@@ -77,6 +97,15 @@
         */
         virtual ~COpenMAXALTestModule();
 
+        virtual void HandlePlayItfCallback( XAPlayItf caller, XAuint32 event );
+        virtual void HandleObjectCallback(XAObjectItf caller,XAuint32 event,
+                                XAresult result,XAuint32 param, void * pInterface);
+     
+        enum TOMXExpectedEvent
+            {
+            EEOSReceived = 1
+            };
+    
     public: // New functions
 
         /**
@@ -97,6 +126,21 @@
         */
         virtual TInt RunMethodL( CStifItemParser& aItem );
 
+        // From MTimeoutObserver
+
+        /**
+        * @since ?Series60_version
+        * @param none
+        * Review if all the expected events have ocurred once the time is over
+        */
+        void HandleTimeout(TInt error);
+
+        /**
+        * Verify that the event was expected, removes it from the list
+        * Signal the TestScripter with the returned error code
+        * @since ?Series60_version
+        */
+        void ProcessEvent(TOMXExpectedEvent aEvent, TInt aError);        
     protected:  // New functions
 
         /**
@@ -138,6 +182,63 @@
         void Delete();
 
         /**
+        * Set an event as expected and set default timeout
+        * @since ?Series60_version
+        */
+        void AddExpectedEvent(TOMXExpectedEvent event, TInt ms);
+
+
+        /**
+        * Unset an event as expected
+        * @since ?Series60_version
+        */
+        TBool RemoveExpectedEvent(TOMXExpectedEvent event);
+
+
+        /**
+        * @since ?Series60_version
+        * @param none
+        * Removes all expected events
+        */
+        void RemoveAllExpectedEvents();
+
+
+
+        /**
+        * Maps a event with a descriptor with its name
+        * @since ?Series60_version
+        */
+        TPtrC EventName( TInt aKey );
+
+        /*
+        * Test methods are listed below.
+        */
+
+        /**
+        * Sets a timeout different since the default
+        * @since Series60_3_2
+        * @param aItem Script line containing parameters.
+        * @return Symbian OS error code.
+        */
+        TInt SetTimeout( CStifItemParser& aItem );
+
+        /**
+        *
+        * @since Series60_3_2
+        * @param aItem Script line containing parameters.
+        * @return Symbian OS error code.
+        */
+        TInt SetExpectedEvents( CStifItemParser& aItem );
+
+        /**
+        *
+        * @since Series60_3_2
+        * @param aItem Script line containing parameters.
+        * @return Symbian OS error code.
+        */
+        TInt SetAllowedPanic( CStifItemParser& aItem );
+        
+        /**
         * Test methods are listed below. 
         */
 
@@ -153,7 +254,9 @@
         virtual TInt al_SetDataSink( CStifItemParser& aItem );        
         virtual TInt al_SetDataLocator( CStifItemParser& aItem );        
         virtual TInt al_SetDataFormat( CStifItemParser& aItem );        
-        
+        virtual TInt al_CreateWindow( CStifItemParser& aItem );
+        virtual TInt al_DeleteWindow( CStifItemParser& aItem );        
+
         virtual TInt al_createEngine( CStifItemParser& aItem );
         virtual TInt al_queryNumSupportedEngineInterfaces( CStifItemParser& aItem );
         virtual TInt al_querySupportedEngineInterfaces( CStifItemParser& aItem );
@@ -227,6 +330,77 @@
         virtual TInt al_metadatainsertionitf_InsertMetadataItem( CStifItemParser& aItem );
         virtual TInt al_metadatainsertionitf_RegisterCallback( CStifItemParser& aItem );
         
+        virtual TInt al_playitf_SetPlayState( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetPlayState( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetDurationNullParam( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetDuration( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetPositionNullParam( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetPosition( CStifItemParser& aItem );
+        virtual TInt al_playitf_RegisterCallback( CStifItemParser& aItem );
+        virtual TInt al_playitf_SetCallbackEventMask( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetCallbackEventMaskNullParam( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetCallbackEventMask( CStifItemParser& aItem );
+        virtual TInt al_playitf_SetMarkerPosition( CStifItemParser& aItem );
+        virtual TInt al_playitf_ClearMarkerPosition( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetMarkerPositionNullParam( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetMarkerPosition( CStifItemParser& aItem );
+        virtual TInt al_playitf_SetPositionUpdatePeriod( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetPositionUpdatePeriodNullParam( CStifItemParser& aItem );
+        virtual TInt al_playitf_GetPositionUpdatePeriod( CStifItemParser& aItem );
+
+        virtual TInt al_seekitf_SetPosition( CStifItemParser& aItem );
+        virtual TInt al_seekitf_SetLoop( CStifItemParser& aItem );
+        virtual TInt al_seekitf_GetLoop( CStifItemParser& aItem );
+        
+        virtual TInt al_dynsrcitf_SetSource( CStifItemParser& aItem );
+        
+        virtual TInt al_strminfoitf_QueryMediaContainerInformation( CStifItemParser& aItem );
+        virtual TInt al_strminfoitf_QueryStreamType( CStifItemParser& aItem );
+        virtual TInt al_strminfoitf_QueryStreamInformation( CStifItemParser& aItem );
+        virtual TInt al_strminfoitf_QueryStreamName( CStifItemParser& aItem );
+        virtual TInt al_strminfoitf_RegisterStreamChangeCallback( CStifItemParser& aItem );
+        virtual TInt al_strminfoitf_QueryActiveStreams( CStifItemParser& aItem );
+        virtual TInt al_strminfoitf_SetActiveStream( CStifItemParser& aItem );        
+        
+        virtual TInt al_volumeitf_SetVolumeLevel( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_GetVolumeLevel( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_GetMaxVolumeLevel( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_SetMute( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_GetMute( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_EnableStereoPosition( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_IsEnabledStereoPosition( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_SetStereoPosition( CStifItemParser& aItem );
+        virtual TInt al_volumeitf_GetStereoPosition( CStifItemParser& aItem );
+
+        virtual TInt al_nokiavolumeextitf_SetVolumeLevel( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_GetVolumeLevel( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_GetMaxVolumeLevel( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_SetMute( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_GetMute( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_EnableStereoPosition( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_IsEnabledStereoPosition( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_SetStereoPosition( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_GetStereoPosition( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_RegisterVolumeCallback( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_SetCallbackEventsMask( CStifItemParser& aItem ); 
+        virtual TInt al_nokiavolumeextitf_GetCallbackEventsMask( CStifItemParser& aItem ); 
+
+        virtual TInt al_nokialinearvolumeitf_SetVolumeLevel( CStifItemParser& aItem );
+        virtual TInt al_nokialinearvolumeitf_GetVolumeLevel( CStifItemParser& aItem );
+        virtual TInt al_nokialinearvolumeitf_GetStepCount( CStifItemParser& aItem );
+        virtual TInt al_nokialinearvolumeitf_RegisterVolumeCallback( CStifItemParser& aItem );
+        virtual TInt al_nokialinearvolumeitf_SetCallbackEventsMask( CStifItemParser& aItem );
+        virtual TInt al_nokialinearvolumeitf_GetCallbackEventsMask( CStifItemParser& aItem );
+
+        virtual TInt al_metadataextractionitf_GetItemCount( CStifItemParser& aItem );
+		virtual TInt al_metadataextractionitf_GetKeySize( CStifItemParser& aItem );
+		virtual TInt al_metadataextractionitf_GetKey( CStifItemParser& aItem );
+		virtual TInt al_metadataextractionitf_GetValueSize( CStifItemParser& aItem );
+		virtual TInt al_metadataextractionitf_GetValue( CStifItemParser& aItem );
+		virtual TInt al_metadataextractionitf_AddKeyFilter( CStifItemParser& aItem );
+		virtual TInt al_metadataextractionitf_ClearKeyFilter( CStifItemParser& aItem );
+		virtual TInt al_metadataextractionitf_GetCoverArt( CStifItemParser& aItem );
+
         /**
          * Method used to log version of test class
          */
@@ -242,8 +416,11 @@
             {
             EEngine = 1,
             EMediaRecorder,
+/*
             ERecordItf,
             EEngineItf
+*/
+            EMediaPlayer = 4
             };
 
     protected:  // Data
@@ -256,6 +433,22 @@
         //?data_declaration;
 
     private:    // Data
+        
+        // reference to TestModuleIf
+        CTestModuleIf& iTestModuleIf;
+        // Active object with a timer to timeout the test case
+        CSimpleTimeout * iTimeoutController;
+
+        // Indicates if the test case use a normal exit reason
+        TBool iNormalExitReason;
+
+        // List of expected events
+        RArray<TOMXExpectedEvent> iExpectedEvents;
+
+        // List of notification event (by the callback)
+        RArray<TOMXExpectedEvent> iOcurredEvents;
+        
+        
         XAboolean     required[MAX_NUMBER_INTERFACES]; 
         XAInterfaceID iidArray[MAX_NUMBER_INTERFACES]; 
         XAEngineOption EngineOption[MAX_NUMBER_OPTIONS];
@@ -271,31 +464,44 @@
         XAObjectItf m_MOLEDObject;
         XAObjectItf m_MORadioObject;
         XAObjectItf m_MOCameraObject;
+
+        XAPlayItf m_PlayItf;
+        XASeekItf m_SeekItf;
+        XADynamicSourceItf m_DynSrcItf;
         
+        XAVolumeItf m_VolumeItf;
+        XANokiaLinearVolumeItf  m_NokiaLinearVolumeItf;
+        XANokiaVolumeExtItf m_NokiaVolumeExtItf;
         
         XADynamicInterfaceManagementItf m_DIMItf;
-        
+        XAStreamInformationItf m_StrInfoItf;
         
         XAEngineItf m_EngineItf;
         XAAudioIODeviceCapabilitiesItf m_AIODevCapItf;
         XAAudioEncoderCapabilitiesItf m_AEncCapItf;
         XAAudioEncoderItf m_AudEncItf;
         XAMetadataInsertionItf m_MetadataInsertionItf;
+        XAMetadataExtractionItf m_MetadataExtractionItf;
         
         /*Audio Source*/
         XADataSource m_AudioSource;
-        XADataLocator_IODevice  m_IODevice;
+        XADataLocator_IODevice  m_SrcIODevice;
+        XADataLocator_IODevice  m_SinkIODevice;
 
         /*Image/Video Source*/
         XADataSource m_VideoSource;
        
         /*MetadataExtractor Source*/
         XADataSource m_MOMetadataExtractorSource;
+
+        /*Dynamic Source*/
+        XADataSource m_DynamicSource;
         
         /*Data Sink*/
         XADataSink m_DataSink;
         XADataSink m_AudioSink;
         XADataSink m_VideoSink;
+        XADataLocator_NativeDisplay m_NativeDisplay;
         XADataSink m_LEDSink;
         XADataSink m_VibraSink;
         
@@ -305,7 +511,12 @@
         
         XADataFormat_MIME m_Mime;
         HBufC8* m_MimeType;
-        
+
+        RWsSession iRwSession;
+        RWindowGroup iRwGroup;
+        RWindow iRWindow;
+        CWsScreenDevice* iDevice;
+
         // ?one_line_short_description_of_data
         //?data_declaration;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/profileutilmacro.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*
+*/
+
+
+#ifndef PROFILEUTILMACRO_H
+#define PROFILEUTILMACRO_H
+
+/*
+// MACROS to be defined to use profiling
+PROFILE_TIME
+PROFILE_RAM_USAGE
+PROFILE_HEAP_USAGE
+PRINT_TO_CONSOLE_TIME_DIFF
+PRINT_TO_CONSOLE_RAM_DIFF
+PRINT_TO_CONSOLE_HEAP_DIFF
+*/
+
+#if defined(PROFILE_TIME) || defined(PROFILE_RAM_USAGE) || defined(PROFILE_HEAP_USAGE)
+#include <e32debug.h>
+#include <hal.h>
+#endif
+
+#ifdef PROFILE_TIME
+#define TAG_TIME_PROFILING_BEGIN \
+    TTime beginProfilingTime; \
+    beginProfilingTime.HomeTime()
+
+#define TAG_TIME_PROFILING_END \
+    TTime endProfilingTime; \
+    endProfilingTime.HomeTime(); \
+    TTimeIntervalMicroSeconds diffInMicroSecs = endProfilingTime.MicroSecondsFrom(beginProfilingTime)
+
+#define PRINT_TO_CONSOLE_TIME_DIFF \
+    RDebug::Printf("VPROFILEDAT: %s : Time taken[%u]microseconds ", __PRETTY_FUNCTION__, diffInMicroSecs.Int64())
+#else /* Empty macros */
+#define TAG_TIME_PROFILING_BEGIN
+#define TAG_TIME_PROFILING_END
+#define PRINT_TO_CONSOLE_TIME_DIFF
+#endif /*PROFILE_TIME*/
+
+#ifdef PROFILE_RAM_USAGE
+#define TAG_RAM_PROFILING_BEGIN \
+    TInt beginProfilingRAM; \
+    TInt err1 = HAL::Get(HALData::EMemoryRAMFree, beginProfilingRAM)
+
+#define TAG_RAM_PROFILING_END \
+    TInt endProfilingRAM; \
+    TInt err2 = HAL::Get(HALData::EMemoryRAMFree, endProfilingRAM)
+
+#define PRINT_TO_CONSOLE_RAM_DIFF \
+    if ((err1 == KErrNone) && (err2 == KErrNone)) \
+        { \
+        TInt diffRAM = (beginProfilingRAM - endProfilingRAM); \
+        if ( diffRAM > 0 ) \
+            { \
+            RDebug::Printf("VPROFILEDAT: %s : RAM used[%u]bytes ", __PRETTY_FUNCTION__, diffRAM); \
+            } \
+        else \
+            { \
+            RDebug::Printf("VPROFILEDAT: %s : RAM freed[%u]bytes ", __PRETTY_FUNCTION__, (-diffRAM)); \
+            } \
+        } \
+    else \
+        { \
+        RDebug::Printf("VPROFILEDAT: %s : Error1[%d] Error2[%d] ", __PRETTY_FUNCTION__, err1, err2); \
+        }
+
+#else /* Empty macros */
+#define TAG_RAM_PROFILING_BEGIN
+#define TAG_RAM_PROFILING_END
+#define PRINT_TO_CONSOLE_RAM_DIFF
+#endif /*PROFILE_RAM_USAGE*/
+
+#ifdef PROFILE_HEAP_USAGE
+#define TAG_DEFAULT_HEAP_PROFILING_BEGIN \
+    TInt beginProfilingHEAPBiggestBlock; \
+    TInt beginProfilingHEAP = User::Available(beginProfilingHEAPBiggestBlock) \
+
+#define TAG_DEFAULT_HEAP_PROFILING_END \
+    TInt endProfilingHEAPBiggestBlock; \
+    TInt endProfilingHEAP = User::Available(endProfilingHEAPBiggestBlock) \
+
+#define PRINT_TO_CONSOLE_HEAP_DIFF \
+    TInt diffHEAP = beginProfilingHEAP - endProfilingHEAP; \
+    if ( diffHEAP > 0 ) \
+        { \
+        RDebug::Printf("VPROFILEDAT: %s : HEAP used[%u]bytes ", __PRETTY_FUNCTION__, diffHEAP); \
+        } \
+    else \
+        { \
+        RDebug::Printf("VPROFILEDAT: %s : HEAP freed[%u]bytes ", __PRETTY_FUNCTION__, (-diffHEAP)); \
+        }
+#else /* Empty macros */
+#define TAG_DEFAULT_HEAP_PROFILING_BEGIN
+#define TAG_DEFAULT_HEAP_PROFILING_END
+#define PRINT_TO_CONSOLE_HEAP_DIFF
+#endif /*PROFILE_HEAP_USAGE*/
+
+#endif /* PROFILEUTILMACRO_H */
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/init/testframework.ini	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/init/testframework.ini	Fri Apr 30 19:18:45 2010 -0500
@@ -66,7 +66,7 @@
 
 TestReportFormat= TXT			# Possible values: TXT or HTML
 TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE	# Possible values: OVERWRITE or APPEND
+TestReportFileCreationMode= APPEND	# Possible values: OVERWRITE or APPEND
 
 DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
 
@@ -108,14 +108,29 @@
 [New_Module]
 ModuleName= TestScripter
 IniFile = c:\testframework\openmaxaltestmodule_common.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_common_noklinvolitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_common_nokvolextitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_common_volumeitf.cfg
 TestCaseFile= c:\testframework\openmaxaltestmodule_objectitf.cfg
-TestCaseFile= c:\testframework\openmaxaltestmodule_ro_mdinsertionitf.cfg
-TestCaseFile= c:\testframework\openmaxaltestmodule_ro_recorditf.cfg
-TestCaseFile= c:\testframework\openmaxaltestmodule_ro_audioencoderitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mr.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mr_mdinsertionitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mr_recorditf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mr_audioencoderitf.cfg
 TestCaseFile= c:\testframework\openmaxaltestmodule_engine_audenccapitf.cfg
 TestCaseFile= c:\testframework\openmaxaltestmodule_global.cfg
 TestCaseFile= c:\testframework\openmaxaltestmodule_engine_engineitf.cfg
 TestCaseFile= c:\testframework\openmaxaltestmodule_engine_aiodcitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mp.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mp_objectitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mp_playitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_common_dynsrcitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mp_seekitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mp_strminfoitf.cfg
+#TestCaseFile= c:\testframework\openmaxaltestmodule_mp_preemption.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mo_mdextractionitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mp_mdextractionitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mo.cfg
+#TestCaseFile= c:\testframework\openmaxaltestmodule_mp_variousformats.cfg
 [End_Module]
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/TimeoutController.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,328 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*
+*/
+
+
+
+#include "openmaxaltestmodule.h"
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: CSimpleTimeout
+
+Description: Default constructor
+
+C++ default constructor can NOT contain any code, that
+might leave.
+
+Parameters: None
+
+Return Values: None
+
+Errors/Exceptions: None
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+CSimpleTimeout::CSimpleTimeout() : CActive (CActive::EPriorityStandard)
+{
+   iLog->Log(_L("CSimpleTimeout::CSimpleTimeout"));
+}
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: ConstructL
+
+Description: Symbian OS second phase constructor
+
+Symbian OS default constructor can leave.
+
+Parameters:
+
+Return Values: None
+
+Errors/Exceptions:
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+void CSimpleTimeout::ConstructL( MTimeoutObserver* aObserver,
+CStifLogger* aLogger)
+{
+   iLog->Log(_L("CSimpleTimeout::ConstructL"));
+    iObserver = aObserver;
+    iLog = aLogger;
+    iTimer.CreateLocal();
+    iTestCaseTimeout = 0;  // Initialize
+
+    // Add to active scheduler
+    CActiveScheduler::Add ( this );
+}
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: NewL
+
+Description: Two-phased constructor.
+
+Parameters: const TTestReportOutput aReportOutput: in: Report output type
+
+Return Values: CSimpleTimeout* : pointer to created object
+
+Errors/Exceptions: Leaves if memory allocation for object fails
+Leaves if ConstructL leaves
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+CSimpleTimeout* CSimpleTimeout::NewL( MTimeoutObserver* aTestClass,
+CStifLogger* aLogger)
+{
+    CSimpleTimeout* self = new ( ELeave ) CSimpleTimeout();
+    CleanupStack::PushL( self );
+    self->ConstructL( aTestClass, aLogger);
+    CleanupStack::Pop( self );
+    return self;
+
+}
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: ~CSimpleTimeout
+
+Description: Destructor.
+
+Cancel request
+
+Parameters: None
+
+Return Values: None
+
+Errors/Exceptions: None
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+CSimpleTimeout::~CSimpleTimeout()
+{
+   iLog->Log(_L("CSimpleTimeout::~CSimpleTimeout"));
+    Cancel();
+    iTimer.Close();
+}
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: Start
+
+Description: Start timeout counting
+
+Parameters: None
+
+Return Values: None
+
+Errors/Exceptions: None
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+void CSimpleTimeout::Start(TTimeIntervalMicroSeconds aTimeout)
+{
+   iLog->Log(_L("CSimpleTimeout::Start"));
+    if (IsActive())
+    {
+        Cancel();
+    }
+
+    // Request timer
+    TTime endTime;
+    endTime.HomeTime();
+    endTime = endTime + aTimeout;
+
+    TInt64 miliseconds = aTimeout.Int64();
+    miliseconds /= 1000;
+
+    TBuf<30> dateString;
+    endTime.FormatL(dateString, KFormatTimeStamp);
+    iLog->Log(_L("Timer=%LD ms, EndTime=%S"), miliseconds, &dateString);
+
+    // Store absolute timeout
+    iTestCaseTimeout = endTime;
+
+    // Taken from STIF engine
+    // Note: iTimer.After() method cannot use because there needed
+    // TTimeIntervalMicroSeconds32 and it is 32 bit. So then cannot create
+    // timeout time that is long enough. At() uses 64 bit value=>Long enough.
+    iTimer.At( iStatus, endTime );
+    SetActive();
+}
+
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: Start
+
+Description: Start timeout counting
+
+Parameters: None
+
+Return Values: None
+
+Errors/Exceptions: None
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+void CSimpleTimeout::Stop()
+{
+   iLog->Log(_L("CSimpleTimeout::Stop"));
+    if (IsActive())
+    {
+        Cancel();
+    }
+}
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: RunL
+
+Description: RunL handles completed timeouts.
+
+Parameters: None
+
+Return Values: None
+
+Errors/Exceptions: None
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+void CSimpleTimeout::RunL()
+{
+   iLog->Log(_L("CSimpleTimeout::RunL"));
+	iLog->Log(_L("CSimpleTimeout::RunL"));
+    TTime timeout;
+    timeout.HomeTime();
+    // Handle the abort case when system time gets changed, but timeout is
+    // still valid. All other cases should timeout since they invalidate the
+    // logic of the timers.
+    if ( iStatus == KErrAbort)
+    {
+        if ( iTestCaseTimeout > timeout )
+        {
+            RDebug::Print( _L( "Absolute timer still valid. Restaring timer. iStatus: %d" ), iStatus.Int() );
+            // Start new timer
+            iStatus = KErrNone; // reset value
+            iTimer.At ( iStatus, iTestCaseTimeout );  // restart timer
+            SetActive();
+        }
+        else
+        {
+            // Absolute timer no longer valid. Must timeout.
+            iLog->Log(_L("Absolute timeout no longer valid"));
+            iObserver->HandleTimeout(KErrNone);
+        }
+
+    }
+    else
+    {
+        // Status was not KErrAbort. Timing out!
+        // iLog->Log(_L("CSimpleTimeout::RunL - Timeout !!"), iTimeout);
+        iLog->Log(_L("Timing out"));
+        iObserver->HandleTimeout(KErrNone);
+    }
+
+}
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: DoCancel
+
+Description: Cancel active request
+
+Parameters: None
+
+Return Values: None
+
+Errors/Exceptions: None
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+void CSimpleTimeout::DoCancel()
+{
+   iLog->Log(_L("CSimpleTimeout::DoCancel"));
+    iTimer.Cancel();
+}
+
+/*
+-------------------------------------------------------------------------------
+
+Class: CSimpleTimeout
+
+Method: RunError
+
+Description: Handle errors. Just let framework handle errors because
+RunL does not leave.
+
+Parameters: TInt aError: in: Symbian OS error: Error code
+
+Return Values: TInt: Symbian OS error code
+
+Errors/Exceptions: None
+
+Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CSimpleTimeout::RunError( TInt aError )
+{
+   iLog->Log(_L("CSimpleTimeout::RunError"));
+    iLog->Log(_L("Timeout error %d"), aError);
+    iObserver->HandleTimeout(aError);
+    return aError;
+}
+
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalcommontests.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalcommontests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -20,6 +20,7 @@
 #include <StifParser.h>
 #include <StifTestInterface.h>
 #include "openmaxaltestmodule.h"
+#include <coedef.h>
 
 // EXTERNAL DATA STRUCTURES
 //extern  ?external_data;
@@ -92,11 +93,19 @@
             case XA_DATALOCATOR_ADDRESS:
             case XA_DATALOCATOR_IODEVICE:
                 {
-                commonSink.pLocator = &m_IODevice;
+                m_SinkIODevice.locatorType = XA_DATALOCATOR_IODEVICE;
+                commonSink.pLocator = &m_SinkIODevice;
                 }
+                break;
+            case XA_DATALOCATOR_NATIVEDISPLAY:
+                {
+                m_NativeDisplay.locatorType = XA_DATALOCATOR_NATIVEDISPLAY;
+                m_NativeDisplay.hWindow = (void*)&iRWindow;
+                m_NativeDisplay.hDisplay = (void*)&iRwSession;
+                commonSink.pLocator = &m_NativeDisplay;
+                }
+                break;
             case XA_DATALOCATOR_OUTPUTMIX:
-            case XA_DATALOCATOR_NATIVEDISPLAY:
-                break;
             default:
                 status = KErrGeneral;
                 break;
@@ -106,22 +115,33 @@
     if(!status)
         {
         status = aItem.GetNextInt(formattype);
-        
-        switch(formattype)
-            {
-            case XA_DATAFORMAT_MIME:
+        if (type == XA_DATALOCATOR_IODEVICE)
+            { /* Sink IO device can only be audio output*/
+            if (formattype == 6)
                 {
-                commonSink.pFormat = &m_Mime;
+                m_SinkIODevice.deviceType = formattype;
+                }
+            else
+                {
+                status = KErrGeneral;
                 }
-                break;
-            case XA_DATAFORMAT_PCM:
-            case XA_DATAFORMAT_RAWIMAGE:
-                break;
-            default:
-                status = KErrGeneral;
-                break;
             }
-
+        else
+            {
+            switch(formattype)
+                {
+                case XA_DATAFORMAT_MIME:
+                    {
+                    commonSink.pFormat = &m_Mime;
+                    }
+                    break;
+                case XA_DATAFORMAT_PCM:
+                case XA_DATAFORMAT_RAWIMAGE:
+                    break;
+                default:
+                    break;
+                }
+            }
         }
 
     if(!status)
@@ -176,7 +196,7 @@
             case XA_DATALOCATOR_ADDRESS:
             case XA_DATALOCATOR_IODEVICE:
                 {
-                commonSource.pLocator = &m_IODevice;
+                commonSource.pLocator = &m_SrcIODevice;
                 }
             case XA_DATALOCATOR_OUTPUTMIX:
             case XA_DATALOCATOR_NATIVEDISPLAY:
@@ -203,7 +223,6 @@
                 case XA_DATAFORMAT_RAWIMAGE:
                     break;
                 default:
-                    status = KErrGeneral;
                     break;
                 }
             }
@@ -226,6 +245,10 @@
                 case 3:
                     m_MOMetadataExtractorSource = commonSource;
                     break;
+                case 4:
+                    m_DynamicSource = commonSource;
+                    break;
+                    
                 default:
                     status = KErrGeneral;
                     break;
@@ -280,9 +303,27 @@
                 status = aItem.GetNextInt(deviceId);
                 if(!status)
                     {
-                    m_IODevice.deviceID = deviceId;
-                    m_IODevice.deviceType = devicetype;
-                    m_IODevice.locatorType = XA_DATALOCATOR_IODEVICE;
+                    TInt srcsinktype(0);
+                    status = aItem.GetNextInt(srcsinktype);
+                    if(!status)
+                        {
+                        if(srcsinktype == 1)
+                            {
+                            m_SrcIODevice.deviceID = deviceId;
+                            m_SrcIODevice.deviceType = devicetype;
+                            m_SrcIODevice.locatorType = XA_DATALOCATOR_IODEVICE;                    
+                            }
+                        else
+                            {
+                            m_SinkIODevice.deviceID = deviceId;
+                            m_SinkIODevice.deviceType = devicetype;
+                            m_SinkIODevice.locatorType = XA_DATALOCATOR_IODEVICE;                    
+                            }
+                        }
+                    else
+                        {
+                        status = KErrGeneral;
+                        }
                     }
                 else
                     {
@@ -357,3 +398,76 @@
     return status;   
     }
 
+TInt COpenMAXALTestModule::al_CreateWindow( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    if (iRwSession.Handle())
+        User::Leave(KErrAlreadyExists);
+
+    TInt topX;
+    TInt topY ;
+    TInt bottomX;
+    TInt bottomY;
+    TInt posX;
+    TInt posY;
+    
+    status = aItem.GetNextInt(posX);
+    RET_ERR_IF_ERR(status);
+    status = aItem.GetNextInt(posY);
+    RET_ERR_IF_ERR(status);
+
+    status = aItem.GetNextInt(topX);
+    RET_ERR_IF_ERR(status);
+    status = aItem.GetNextInt(topY);
+    RET_ERR_IF_ERR(status);
+    status = aItem.GetNextInt(bottomX);
+    RET_ERR_IF_ERR(status);
+    status = aItem.GetNextInt(bottomY);
+    RET_ERR_IF_ERR(status);
+
+    /* Create resources needed for video play back*/
+    status = iRwSession.Connect();
+    RET_ERR_IF_ERR(status);
+
+    TInt groupId = iRwSession.GetFocusWindowGroup();
+    iRwGroup = RWindowGroup(iRwSession);
+    status = iRwGroup.Construct(groupId, ETrue);
+    RET_ERR_IF_ERR(status);
+    _LIT(KXASTIFWindowGroupName,"XASTIF");
+    iRwGroup.SetName(KXASTIFWindowGroupName);
+    iRwGroup.SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
+
+    iRWindow = RWindow(iRwSession);
+    status = iRWindow.Construct(iRwGroup, (TUint32) this + 1);
+    RET_ERR_IF_ERR(status);
+
+    TPoint point(posX, posY);
+    iRWindow.SetPosition(point);
+    TRect rect(topX, topY, bottomX, bottomY);
+    TSize size(rect.Size());
+    iRWindow.SetSize(size);
+    iRWindow.Activate();
+    iRWindow.SetVisible(ETrue);
+    iRwSession.Flush();
+    iDevice = NULL;
+    iDevice = new CWsScreenDevice(iRwSession);
+    if (!iDevice)
+        {
+        status = KErrNoMemory;
+        }
+    RET_ERR_IF_ERR(status);
+
+    status = iDevice->Construct(0);
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_DeleteWindow( CStifItemParser& /*aItem*/ )
+    {
+    delete iDevice;
+    iDevice = NULL;
+    iRWindow.SetVisible(EFalse);
+    iRWindow.Close();
+    iRwGroup.Close();
+    iRwSession.Close();
+    return KErrNone;
+    }
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaldynitfmgmtitftests.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaldynitfmgmtitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -117,7 +117,6 @@
     {
     TInt status(KErrNone);
     XAresult res;
-    TInt async(0);
     TInt interface(0);
     XAInterfaceID id(NULL);
 
@@ -132,22 +131,14 @@
         status = KErrGeneral;
         }
 
-    status = aItem.GetNextInt(async);
-    if(!status)
+    if(m_DIMItf)
         {
-        if(m_DIMItf)
-            {
-            res = (*m_DIMItf)->RemoveInterface(m_DIMItf,id);
-            status = res;
-            }
-        else
-            {
-            status = KErrNotFound;
-            }
+        res = (*m_DIMItf)->RemoveInterface(m_DIMItf,id);
+        status = res;
         }
     else
         {
-        status = KErrGeneral;
+        status = KErrNotFound;
         }
     return status;            
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaldynsrcitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include "openmaxaltestmodule.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+TInt COpenMAXALTestModule::al_dynsrcitf_SetSource( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    XADataSource* dynamicSrc(NULL);
+
+    if(m_DynamicSource.pFormat && m_DynamicSource.pLocator)
+        {
+        dynamicSrc = &m_DynamicSource;
+        }
+    
+    if(m_DynSrcItf)
+        {
+        res = (*m_DynSrcItf)->SetSource(m_DynSrcItf,dynamicSrc);
+        status = res;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;    
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalnokialinearvolumeitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,190 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include "openmaxaltestmodule.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+void NokiaLinearVolumeCallback(
+    XANokiaLinearVolumeItf caller,
+    void * pContext,
+    XAuint32 event,
+    XAboolean eventBooleanData
+);
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+TInt COpenMAXALTestModule::al_nokialinearvolumeitf_SetVolumeLevel( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt volume(0);
+    XAuint32 alvol;
+    status = aItem.GetNextInt(volume);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_NokiaLinearVolumeItf)
+        {
+        alvol = volume;
+        status = (*m_NokiaLinearVolumeItf)->SetVolumeLevel(m_NokiaLinearVolumeItf, &alvol);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokialinearvolumeitf_GetVolumeLevel( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAuint32 volume(0);
+    if(m_NokiaLinearVolumeItf)
+        {
+        status = (*m_NokiaLinearVolumeItf)->GetVolumeLevel(m_NokiaLinearVolumeItf, &volume);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokialinearvolumeitf_GetStepCount( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAuint32 value(0);
+    if(m_NokiaLinearVolumeItf)
+        {
+        status = (*m_NokiaLinearVolumeItf)->GetStepCount(m_NokiaLinearVolumeItf, &value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokialinearvolumeitf_RegisterVolumeCallback( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    if(m_NokiaLinearVolumeItf)
+        {
+        status = (*m_NokiaLinearVolumeItf)->RegisterVolumeCallback(m_NokiaLinearVolumeItf, NokiaLinearVolumeCallback, this);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokialinearvolumeitf_SetCallbackEventsMask( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt value(0);
+    
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_NokiaLinearVolumeItf)
+        {
+        status = (*m_NokiaLinearVolumeItf)->SetCallbackEventsMask(m_NokiaLinearVolumeItf, value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokialinearvolumeitf_GetCallbackEventsMask( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAuint32 value(0);
+    
+    if(m_NokiaLinearVolumeItf)
+        {
+        status = (*m_NokiaLinearVolumeItf)->GetCallbackEventsMask(m_NokiaLinearVolumeItf, &value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+void NokiaLinearVolumeCallback(
+    XANokiaLinearVolumeItf caller,
+    void * pContext,
+    XAuint32 event,
+    XAboolean eventBooleanData
+)
+    {
+    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalnokiavolumeextitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,303 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include "openmaxaltestmodule.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+void NokiaVolumeExtCallback(
+    XANokiaVolumeExtItf caller,
+    void * pContext,
+    XAuint32 event,
+    XAboolean eventBooleanData
+);
+
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_SetVolumeLevel( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt volume(0);
+    
+    status = aItem.GetNextInt(volume);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->SetVolumeLevel(m_NokiaVolumeExtItf, volume);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_GetVolumeLevel( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAmillibel volume(0);
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->GetVolumeLevel(m_NokiaVolumeExtItf, &volume);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_GetMaxVolumeLevel( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAmillibel volume(0);
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->GetMaxVolumeLevel(m_NokiaVolumeExtItf, &volume);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_SetMute( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt mute(0);
+    
+    status = aItem.GetNextInt(mute);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->SetMute(m_NokiaVolumeExtItf, mute);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_GetMute( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAboolean mute(0);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->GetMute(m_NokiaVolumeExtItf, &mute);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_EnableStereoPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt value(0);
+    
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->EnableStereoPosition(m_NokiaVolumeExtItf, value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_IsEnabledStereoPosition( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAboolean value(0);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->IsEnabledStereoPosition(m_NokiaVolumeExtItf, &value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_SetStereoPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt value(0);
+    
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->SetStereoPosition(m_NokiaVolumeExtItf, value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_GetStereoPosition( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XApermille value(0);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->GetStereoPosition(m_NokiaVolumeExtItf, &value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_RegisterVolumeCallback( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->RegisterVolumeCallback(m_NokiaVolumeExtItf, NokiaVolumeExtCallback, this);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_SetCallbackEventsMask( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt value(0);
+    
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->SetCallbackEventsMask(m_NokiaVolumeExtItf, value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_nokiavolumeextitf_GetCallbackEventsMask( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAuint32 value(0);
+    
+    if(m_NokiaVolumeExtItf)
+        {
+        status = (*m_NokiaVolumeExtItf)->GetCallbackEventsMask(m_NokiaVolumeExtItf, &value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+
+void NokiaVolumeExtCallback(
+    XANokiaVolumeExtItf caller,
+    void * pContext,
+    XAuint32 event,
+    XAboolean eventBooleanData
+)
+    {
+
+    }
+
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalobjectcallbacks.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalobjectcallbacks.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -19,6 +19,7 @@
 #include <e32svr.h>
 #include <StifParser.h>
 #include <StifTestInterface.h>
+#include <StifTestEventInterface.h>
 #include "openmaxaltestmodule.h"
 
 // EXTERNAL DATA STRUCTURES
@@ -50,12 +51,6 @@
         XAuint32 param,
         void * pInterface);
 
-void MediaRecorderCallback(XAObjectItf caller,
-        const void * pContext,
-        XAuint32 event,
-        XAresult result,
-        XAuint32 param,
-        void * pInterface);
 // FORWARD DECLARATIONS
 //class ?FORWARD_CLASSNAME;
 
@@ -91,7 +86,10 @@
             func = ObjectCallback;
             break;
         case EMediaRecorder:
-            func = MediaRecorderCallback;
+            func = ObjectCallback;
+            break;
+        case EMediaPlayer:
+            func = ObjectCallback;
             break;
         default:
             func = NULL;
@@ -101,6 +99,58 @@
     
     }
 
+void COpenMAXALTestModule::HandleObjectCallback(XAObjectItf caller,XAuint32 event,
+                        XAresult result,XAuint32 param, void * pInterface)
+    {
+    switch(event)
+        {
+        case XA_OBJECT_EVENT_RUNTIME_ERROR:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_RUNTIME_ERROR") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_OBJECT_EVENT_ASYNC_TERMINATION:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_ASYNC_TERMINATION") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_OBJECT_EVENT_RESOURCES_LOST:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_RESOURCES_LOST") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_OBJECT_EVENT_RESOURCES_AVAILABLE:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_RESOURCES_AVAILABLE") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_OBJECT_EVENT_ITF_CONTROL_TAKEN:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_ITF_CONTROL_TAKEN") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_OBJECT_EVENT_ITF_CONTROL_RETURNED:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_ITF_CONTROL_RETURNED") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_OBJECT_EVENT_ITF_PARAMETERS_CHANGED:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_ITF_PARAMETERS_CHANGED") );
+            TestModuleIf().Event( event );
+
+            }
+            break;
+        default:
+            break;
+        }
+    }
 
 void ObjectCallback(XAObjectItf caller,
         const void * pContext,
@@ -109,16 +159,9 @@
         XAuint32 param,
         void * pInterface)
     {
-    
+    if (pContext)
+        {
+        ((COpenMAXALTestModule*)pContext)->HandleObjectCallback(caller, event, result, param, pInterface);
+        }
     }
 
-void MediaRecorderCallback(XAObjectItf caller,
-        const void * pContext,
-        XAuint32 event,
-        XAresult result,
-        XAuint32 param,
-        void * pInterface)
-    {
-    
-    }
-
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalobjectitftests.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalobjectitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -20,6 +20,7 @@
 #include <StifParser.h>
 #include <StifTestInterface.h>
 #include "openmaxaltestmodule.h"
+#include "profileutilmacro.h"
 
 // EXTERNAL DATA STRUCTURES
 //extern  ?external_data;
@@ -86,7 +87,17 @@
             status = aItem.GetNextInt(async);
             if(!status)
                 {
-                res = (*itf)->Realize(itf, async);
+                if (object == XA_OBJECTID_MEDIAPLAYER)
+                    {
+                    TAG_TIME_PROFILING_BEGIN;
+                    res = (*itf)->Realize(itf, async);
+                    TAG_TIME_PROFILING_END;
+                    PRINT_TO_CONSOLE_TIME_DIFF;
+                    }
+                else
+                    {
+                    res = (*itf)->Realize(itf, async);
+                    }
                 status = res;
                 }
             else
@@ -196,7 +207,7 @@
             func = GetCallbackFunc(object);
             if(func)
                 {
-                res = (*itf)->RegisterCallback(itf, func, NULL);
+                res = (*itf)->RegisterCallback(itf, func, this);
                 status = res;
                 }
             else
@@ -238,7 +249,17 @@
         XAObjectItf itf = GetObject(object);
         if(itf != NULL)
             {
-            (*itf)->Destroy(itf);
+            if (object == XA_OBJECTID_MEDIAPLAYER)
+                {
+                TAG_TIME_PROFILING_BEGIN;
+                (*itf)->Destroy(itf);
+                TAG_TIME_PROFILING_END;
+                PRINT_TO_CONSOLE_TIME_DIFF;
+                }
+            else
+                {
+                (*itf)->Destroy(itf);
+                }
             }
         else
             {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalstrminfoitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,300 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include "openmaxaltestmodule.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+void StreamEventChangeCallback (
+        XAStreamInformationItf caller,
+        XAuint32 eventId,
+        XAuint32 streamIndex,
+        void * pEventData,
+        void * pContext
+);
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+ 
+TInt COpenMAXALTestModule::al_strminfoitf_QueryMediaContainerInformation( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    XAMediaContainerInformation info;
+    
+    if(m_StrInfoItf)
+        {
+        res = (*m_StrInfoItf)->QueryMediaContainerInformation(m_StrInfoItf,&info);
+        status = res;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;    
+    }
+
+TInt COpenMAXALTestModule::al_strminfoitf_QueryStreamType( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    TInt async(0);
+    TInt index(0);
+    XAuint32 streamType;
+
+    status = aItem.GetNextInt(index);
+    if(!status)
+        {
+        if(m_StrInfoItf)
+            {
+            res = (*m_StrInfoItf)->QueryStreamType(m_StrInfoItf,index, &streamType);
+            status = res;
+            }
+        else
+            {
+            status = KErrNotFound;
+            }
+        }
+    else
+        {
+        status = KErrGeneral;
+        }
+    return status;            
+    }
+
+TInt COpenMAXALTestModule::al_strminfoitf_QueryStreamInformation( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    TInt streamindex(0);
+    void* info = NULL;
+    XAuint32 domain;
+    XAAudioStreamInformation audioinfo;
+    XAVideoStreamInformation videoinfo;
+    
+    status = aItem.GetNextInt(streamindex);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_StrInfoItf)
+        {
+        res = (*m_StrInfoItf)->QueryStreamType(m_StrInfoItf,streamindex, &domain);
+        status = res;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    if(domain == XA_DOMAINTYPE_AUDIO)
+        {
+        info = &audioinfo;
+        }
+    else if ( domain == XA_DOMAINTYPE_VIDEO)
+        {
+        info = &videoinfo;
+        }
+    
+    if(!status)
+        {
+        if(m_StrInfoItf)
+            {
+            res = (*m_StrInfoItf)->QueryStreamInformation(m_StrInfoItf,streamindex, info);
+            status = res;
+            }
+        else
+            {
+            status = KErrNotFound;
+            }
+        }
+    else
+        {
+        status = KErrGeneral;
+        }
+    return status;        
+    }
+
+TInt COpenMAXALTestModule::al_strminfoitf_QueryStreamName( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    TInt streamindex(0);
+    XAuint16 size;
+
+    status = aItem.GetNextInt(streamindex);
+    if(!status)
+        {
+        if(m_StrInfoItf)
+            {
+            res = (*m_StrInfoItf)->QueryStreamName(m_StrInfoItf,streamindex, &size, NULL);
+            status = res;
+            }
+        else
+            {
+            status = KErrNotFound;
+            }
+        }
+    else
+        {
+        status = KErrGeneral;
+        }
+    return status;       
+    }
+
+TInt COpenMAXALTestModule::al_strminfoitf_RegisterStreamChangeCallback( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    if(m_StrInfoItf)
+        {
+        res = (*m_StrInfoItf)->RegisterStreamChangeCallback(m_StrInfoItf,StreamEventChangeCallback,(void*)this);
+        status = res;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;    
+    }
+
+TInt COpenMAXALTestModule::al_strminfoitf_QueryActiveStreams( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    TInt streamindex(0);
+    XAuint32 size(0);
+    TInt inpsize;
+    XAboolean arr[2];
+    
+    status = aItem.GetNextInt(inpsize);
+    if(!status)
+        {
+        if(m_StrInfoItf)
+            {
+            size = inpsize;
+            res = (*m_StrInfoItf)->QueryActiveStreams(m_StrInfoItf, &size, arr);
+            status = res;
+            }
+        else
+            {
+            status = KErrNotFound;
+            }
+        }
+    else
+        {
+        if(m_StrInfoItf)
+            {
+            res = (*m_StrInfoItf)->QueryActiveStreams(m_StrInfoItf,&size, NULL);
+            status = res;
+            }
+        else
+            {
+            status = KErrNotFound;
+            }
+        }
+    return status;     
+    }
+
+TInt COpenMAXALTestModule::al_strminfoitf_SetActiveStream( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+    TInt streamindex(0);
+    XAboolean active;
+    XAboolean commitnow;
+    TInt value;
+    
+    status = aItem.GetNextInt(streamindex);
+    RET_ERR_IF_ERR(status);
+    
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    active = value;
+
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    commitnow = value;
+    
+    if(m_StrInfoItf)
+        {
+        res = (*m_StrInfoItf)->SetActiveStream(m_StrInfoItf,streamindex, active, commitnow);
+        status = res;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;          
+    }
+
+void StreamEventChangeCallback (
+        XAStreamInformationItf caller,
+        XAuint32 eventId,
+        XAuint32 streamIndex,
+        void * pEventData,
+        void * pContext
+)
+    {
+    
+    }
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmodule.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmodule.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -19,7 +19,7 @@
 #include <StifTestInterface.h>
 #include "openmaxaltestmodule.h"
 #include <SettingServerClient.h>
-
+#include <glib.h>
 // EXTERNAL DATA STRUCTURES
 //extern  ?external_data;
 
@@ -79,7 +79,8 @@
 //
 COpenMAXALTestModule::COpenMAXALTestModule( 
     CTestModuleIf& aTestModuleIf ):
-        CScriptBase( aTestModuleIf )
+        CScriptBase( aTestModuleIf ), 
+        iTestModuleIf(aTestModuleIf)
     {
     }
 
@@ -129,6 +130,7 @@
                           EFalse );
     
     SendTestClassVersion();
+    g_setenv("G_SLICE", "always-malloc", 1);
     }
 
 // -----------------------------------------------------------------------------
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -113,6 +113,8 @@
         ENTRY( "al_SetDataSink", COpenMAXALTestModule::al_SetDataSink ),
         ENTRY( "al_SetDataLocator", COpenMAXALTestModule::al_SetDataLocator ),
         ENTRY( "al_SetDataFormat", COpenMAXALTestModule::al_SetDataFormat ),
+        ENTRY( "al_CreateWindow", COpenMAXALTestModule::al_CreateWindow ),
+        ENTRY( "al_DeleteWindow", COpenMAXALTestModule::al_DeleteWindow ),
         /* Common Utility Functions ends*/
         
         ENTRY( "al_createEngine", COpenMAXALTestModule::al_createEngine ),
@@ -212,6 +214,94 @@
         ENTRY( "al_metadatainsertionitf_InsertMetadataItem", COpenMAXALTestModule::al_metadatainsertionitf_InsertMetadataItem ),
         ENTRY( "al_metadatainsertionitf_RegisterCallback", COpenMAXALTestModule::al_metadatainsertionitf_RegisterCallback ),
         /*MetadataInsertionItf ends*/
+
+        /*PlayItf begins*/
+        ENTRY( "al_playitf_SetPlayState", COpenMAXALTestModule::al_playitf_SetPlayState ),
+        ENTRY( "al_playitf_GetPlayState", COpenMAXALTestModule::al_playitf_GetPlayState ),
+        ENTRY( "al_playitf_GetDurationNullParam", COpenMAXALTestModule::al_playitf_GetDurationNullParam ),
+        ENTRY( "al_playitf_GetDuration", COpenMAXALTestModule::al_playitf_GetDuration ),
+        ENTRY( "al_playitf_GetPositionNullParam", COpenMAXALTestModule::al_playitf_GetPositionNullParam ),
+        ENTRY( "al_playitf_GetPosition", COpenMAXALTestModule::al_playitf_GetPosition ),
+        ENTRY( "al_playitf_RegisterCallback", COpenMAXALTestModule::al_playitf_RegisterCallback ),
+        ENTRY( "al_playitf_SetCallbackEventMask", COpenMAXALTestModule::al_playitf_SetCallbackEventMask ),
+        ENTRY( "al_playitf_GetCallbackEventMaskNullParam", COpenMAXALTestModule::al_playitf_GetCallbackEventMaskNullParam ),
+        ENTRY( "al_playitf_GetCallbackEventMask", COpenMAXALTestModule::al_playitf_GetCallbackEventMask ),
+        ENTRY( "al_playitf_SetMarkerPosition", COpenMAXALTestModule::al_playitf_SetMarkerPosition ),
+        ENTRY( "al_playitf_ClearMarkerPosition", COpenMAXALTestModule::al_playitf_ClearMarkerPosition ),
+        ENTRY( "al_playitf_GetMarkerPositionNullParam", COpenMAXALTestModule::al_playitf_GetMarkerPositionNullParam ),
+        ENTRY( "al_playitf_GetMarkerPosition", COpenMAXALTestModule::al_playitf_GetMarkerPosition ),
+        ENTRY( "al_playitf_SetPositionUpdatePeriod", COpenMAXALTestModule::al_playitf_SetPositionUpdatePeriod ),
+        ENTRY( "al_playitf_GetPositionUpdatePeriodNullParam", COpenMAXALTestModule::al_playitf_GetPositionUpdatePeriodNullParam ),
+        ENTRY( "al_playitf_GetPositionUpdatePeriod", COpenMAXALTestModule::al_playitf_GetPositionUpdatePeriod ),
+        /*PlayItf ends*/
+
+        /*SeekItf begins*/
+        ENTRY( "al_seekitf_SetPosition", COpenMAXALTestModule::al_seekitf_SetPosition ),
+        ENTRY( "al_seekitf_SetLoop", COpenMAXALTestModule::al_seekitf_SetLoop ),
+        ENTRY( "al_seekitf_GetLoop", COpenMAXALTestModule::al_seekitf_GetLoop ),
+        /*SeekItf ends*/
+
+        /*DynamicSourceItf begins*/
+        ENTRY( "al_dynsrcitf_SetSource", COpenMAXALTestModule::al_dynsrcitf_SetSource ),
+        /*DynamicSourceItf ends*/
+        
+        /*StreamInformationItf begins*/
+        ENTRY( "al_strminfoitf_QueryMediaContainerInformation", COpenMAXALTestModule::al_strminfoitf_QueryMediaContainerInformation ),
+        ENTRY( "al_strminfoitf_QueryStreamType", COpenMAXALTestModule::al_strminfoitf_QueryStreamType ),
+        ENTRY( "al_strminfoitf_QueryStreamInformation", COpenMAXALTestModule::al_strminfoitf_QueryStreamInformation ),
+        ENTRY( "al_strminfoitf_QueryStreamName", COpenMAXALTestModule::al_strminfoitf_QueryStreamName ),
+        ENTRY( "al_strminfoitf_RegisterStreamChangeCallback", COpenMAXALTestModule::al_strminfoitf_RegisterStreamChangeCallback ),
+        ENTRY( "al_strminfoitf_QueryActiveStreams", COpenMAXALTestModule::al_strminfoitf_QueryActiveStreams ),
+        ENTRY( "al_strminfoitf_SetActiveStream", COpenMAXALTestModule::al_strminfoitf_SetActiveStream ),
+        /*StreamInformationItf ends*/
+        
+        /*VolumeItf begins*/
+        ENTRY( "al_volumeitf_SetVolumeLevel", COpenMAXALTestModule::al_volumeitf_SetVolumeLevel ),
+        ENTRY( "al_volumeitf_GetVolumeLevel", COpenMAXALTestModule::al_volumeitf_GetVolumeLevel ),
+        ENTRY( "al_volumeitf_GetMaxVolumeLevel", COpenMAXALTestModule::al_volumeitf_GetMaxVolumeLevel ),
+        ENTRY( "al_volumeitf_SetMute", COpenMAXALTestModule::al_volumeitf_SetMute ),
+        ENTRY( "al_volumeitf_GetMute", COpenMAXALTestModule::al_volumeitf_GetMute ),
+        ENTRY( "al_volumeitf_EnableStereoPosition", COpenMAXALTestModule::al_volumeitf_EnableStereoPosition ),
+        ENTRY( "al_volumeitf_IsEnabledStereoPosition", COpenMAXALTestModule::al_volumeitf_IsEnabledStereoPosition ),
+        ENTRY( "al_volumeitf_SetStereoPosition", COpenMAXALTestModule::al_volumeitf_SetStereoPosition ),
+        ENTRY( "al_volumeitf_GetStereoPosition", COpenMAXALTestModule::al_volumeitf_GetStereoPosition ),
+        /*VolumeItf ends*/        
+        
+        /*NokiaVolumeExtItf begins*/
+        ENTRY( "al_nokiavolumeextitf_SetVolumeLevel", COpenMAXALTestModule::al_nokiavolumeextitf_SetVolumeLevel ),
+        ENTRY( "al_nokiavolumeextitf_GetVolumeLevel", COpenMAXALTestModule::al_nokiavolumeextitf_GetVolumeLevel ),
+        ENTRY( "al_nokiavolumeextitf_GetMaxVolumeLevel", COpenMAXALTestModule::al_nokiavolumeextitf_GetMaxVolumeLevel ),
+        ENTRY( "al_nokiavolumeextitf_SetMute", COpenMAXALTestModule::al_nokiavolumeextitf_SetMute ),
+        ENTRY( "al_nokiavolumeextitf_GetMute", COpenMAXALTestModule::al_nokiavolumeextitf_GetMute ),
+        ENTRY( "al_nokiavolumeextitf_EnableStereoPosition", COpenMAXALTestModule::al_nokiavolumeextitf_EnableStereoPosition ),
+        ENTRY( "al_nokiavolumeextitf_IsEnabledStereoPosition", COpenMAXALTestModule::al_nokiavolumeextitf_IsEnabledStereoPosition ),
+        ENTRY( "al_nokiavolumeextitf_SetStereoPosition", COpenMAXALTestModule::al_nokiavolumeextitf_SetStereoPosition ),
+        ENTRY( "al_nokiavolumeextitf_GetStereoPosition", COpenMAXALTestModule::al_nokiavolumeextitf_GetStereoPosition ),
+        ENTRY( "al_nokiavolumeextitf_RegisterVolumeCallback", COpenMAXALTestModule::al_nokiavolumeextitf_RegisterVolumeCallback ),
+        ENTRY( "al_nokiavolumeextitf_SetCallbackEventsMask", COpenMAXALTestModule::al_nokiavolumeextitf_SetCallbackEventsMask ),
+        ENTRY( "al_nokiavolumeextitf_GetCallbackEventsMask", COpenMAXALTestModule::al_nokiavolumeextitf_GetCallbackEventsMask ),
+        /*NokiaVolumeExtItf ends*/        
+        
+        /*NokiaLinearVolumeItf begins*/
+        ENTRY( "al_nokialinearvolumeitf_SetVolumeLevel", COpenMAXALTestModule::al_nokialinearvolumeitf_SetVolumeLevel ),
+        ENTRY( "al_nokialinearvolumeitf_GetVolumeLevel", COpenMAXALTestModule::al_nokialinearvolumeitf_GetVolumeLevel ),
+        ENTRY( "al_nokialinearvolumeitf_GetStepCount", COpenMAXALTestModule::al_nokialinearvolumeitf_GetStepCount ),
+        ENTRY( "al_nokialinearvolumeitf_RegisterVolumeCallback", COpenMAXALTestModule::al_nokialinearvolumeitf_RegisterVolumeCallback ),
+        ENTRY( "al_nokialinearvolumeitf_SetCallbackEventsMask", COpenMAXALTestModule::al_nokialinearvolumeitf_SetCallbackEventsMask ),
+        ENTRY( "al_nokialinearvolumeitf_GetCallbackEventsMask", COpenMAXALTestModule::al_nokialinearvolumeitf_GetCallbackEventsMask ),
+        /*NokiaLinearVolumeItf ends*/        
+
+        /*MetadataExtractionItf*/
+        ENTRY( "al_metadataextractionitf_GetItemCount", COpenMAXALTestModule::al_metadataextractionitf_GetItemCount ),
+        ENTRY( "al_metadataextractionitf_GetKeySize", COpenMAXALTestModule::al_metadataextractionitf_GetKeySize ),
+        ENTRY( "al_metadataextractionitf_GetKey", COpenMAXALTestModule::al_metadataextractionitf_GetKey ),
+  	    ENTRY( "al_metadataextractionitf_GetValueSize", COpenMAXALTestModule::al_metadataextractionitf_GetValueSize ),
+        ENTRY( "al_metadataextractionitf_GetValue", COpenMAXALTestModule::al_metadataextractionitf_GetValue ),
+        ENTRY( "al_metadataextractionitf_AddKeyFilter", COpenMAXALTestModule::al_metadataextractionitf_AddKeyFilter ),
+        ENTRY( "al_metadataextractionitf_ClearKeyFilter", COpenMAXALTestModule::al_metadataextractionitf_ClearKeyFilter ),
+        ENTRY( "al_metadataextractionitf_GetCoverArt", COpenMAXALTestModule::al_metadataextractionitf_GetCoverArt ),        
+         /*MetadataExtractionItf ends*/
+        
         
         //ADD NEW ENTRY HERE
         // [test cases entries] - Do not remove
@@ -226,6 +316,244 @@
     }
 
 // -----------------------------------------------------------------------------
+// COpenMAXALTestModule::EventName
+// Return descriptor with the notification description
+// -----------------------------------------------------------------------------
+TPtrC COpenMAXALTestModule::EventName( TInt aKey )
+{
+    static TText* const badKeyword = (TText*)L"BadKeyword";
+    static TText* const keywords[] =
+    {
+
+        (TText*)L"EEOSReceived",
+        
+    };
+
+            
+
+    if( (TUint)aKey >= (sizeof( keywords )/sizeof(TText*)) )
+        {
+        iLog->Log(_L("Keyword out of bounds"));
+        TPtrC keyword( badKeyword );
+        return keyword;
+        }
+    else
+        {
+        TPtrC keyword( keywords[aKey] );
+        return keyword;
+        }
+}
+
+// -----------------------------------------------------------------------------
+// COpenMAXALTestModule::AddExpectedEvent
+// Add an event to the expected events' list
+// -----------------------------------------------------------------------------
+void COpenMAXALTestModule::AddExpectedEvent(TOMXExpectedEvent event, TInt ms)
+{
+   iLog->Log(_L("COpenMAXALTestModule::AddExpectedEvent"));
+    iExpectedEvents.Append(event);
+    TPtrC eventName = EventName(event);
+    iLog->Log(_L("Adding expected event:(0x%02x)%S Total=%d"), event, &eventName, iExpectedEvents.Count() );
+
+    if ( iTimeoutController && !iTimeoutController->IsActive() )
+        {
+        if (ms > 0)
+            {
+            iTimeoutController->Start( TTimeIntervalMicroSeconds(ms * 1000) );
+            }
+        else
+            {
+            iLog->Log(_L("Timeout with default value (1s)"));
+            iTimeoutController->Start( TTimeIntervalMicroSeconds(1000000) );
+            }
+        }
+}
+
+// -----------------------------------------------------------------------------
+// COpenMAXALTestModule::RemoveExpectedEvent
+// Remove the indicated event from the expected events' list
+// -----------------------------------------------------------------------------
+TBool COpenMAXALTestModule::RemoveExpectedEvent(TOMXExpectedEvent aEvent)
+{
+   iLog->Log(_L("COpenMAXALTestModule::RemoveExpectedEvent"));
+    TBool match = EFalse;
+    for (TUint i=0; i < iExpectedEvents.Count() ; i++)
+        {
+        if (iExpectedEvents[i] == aEvent)
+            {
+            iExpectedEvents.Remove(i);
+            match = ETrue;
+            break;
+            }
+        }
+
+    return match;
+}
+
+
+// -----------------------------------------------------------------------------
+// COpenMAXALTestModule::RemoveAllExpectedEvents
+// Remove the indicated event from the expected events' list
+// -----------------------------------------------------------------------------
+void COpenMAXALTestModule::RemoveAllExpectedEvents()
+{
+   iLog->Log(_L("COpenMAXALTestModule::RemoveAllExpectedEvents"));
+    iLog->Log(_L("Removing all expected events"));
+    
+    iExpectedEvents.Reset();
+    iOcurredEvents.Reset();
+}
+
+
+// -----------------------------------------------------------------------------
+// COpenMAXALTestModule::ProcessEvent
+// -----------------------------------------------------------------------------
+void COpenMAXALTestModule::ProcessEvent(TOMXExpectedEvent aEvent, TInt aError)
+{
+   iLog->Log(_L("COpenMAXALTestModule::ProcessExpectedEvent"));
+    TPtrC nameEvent = EventName(aEvent);
+
+    // Check for error
+    if (aError == KErrNone)
+        {
+        // Remove the event
+        if (RemoveExpectedEvent(aEvent))
+            {
+            iLog->Log(_L("Expected Event: (0x%02x)%S has ocurred Total=%d"), aEvent, &nameEvent,iExpectedEvents.Count());
+            }
+        else
+            {
+            iLog->Log(_L("Event: (0x%02x)%S has ocurred"), aEvent, &nameEvent);
+            return;
+            }
+
+        
+
+        // All expected events have ocurred
+        if (iExpectedEvents.Count() == 0 )
+            {
+            Signal();
+            iTimeoutController->Cancel();
+            }
+        
+        
+        }
+    else
+        {
+        iLog->Log(_L("[Error] Event: (0x%02x)%S return with error code=%d"), aEvent, &nameEvent, aError);
+        if (iExpectedEvents.Count() != 0 )
+            {
+            RemoveExpectedEvent(aEvent);
+            }
+        iTimeoutController->Cancel();
+        Signal(KErrCallbackErrorCode);
+        }
+}
+
+// -----------------------------------------------------------------------------
+// COpenMAXALTestModule::HandleTimeout
+// Review if all the expected events have ocurred once the time is over
+// -----------------------------------------------------------------------------
+
+void COpenMAXALTestModule::HandleTimeout(TInt aError)
+{
+   iLog->Log(_L("COpenMAXALTestModule::HandleTimeout"));
+    // All expected events have ocurred
+    if (aError != KErrNone)
+        {
+        if (iExpectedEvents.Count() == 0 )
+            {
+            iLog->Log(_L("Timing out but events have ocurred"));
+            Signal();
+            }
+        else
+            {
+            RemoveAllExpectedEvents();
+            iLog->Log(_L("Timing out and events still pending"));
+            Signal(KErrEventPending);
+            }
+        }
+    else
+        {
+        iLog->Log(_L("Timing out return a error %d"), aError);
+        Signal(aError);
+        }
+}
+
+// -----------------------------------------------------------------------------
+// COpenMAXALTestModule::SetTimeout
+// Create a timer and set a timeout
+// When the timeout is reached the test case is marked as failed
+// It's used rather than the "timeout" keyword in the configuration file
+// because in this way the log continues
+// -----------------------------------------------------------------------------
+TInt COpenMAXALTestModule::SetTimeout( CStifItemParser& aItem )
+{
+   iLog->Log(_L("COpenMAXALTestModule::SetTimeout"));
+    TInt timeout=0;
+    TInt error = aItem.GetNextInt(timeout) ;
+    if ( iTimeoutController )
+        {
+        if ( timeout > 0 )
+            {
+            iTimeoutController->Start( TTimeIntervalMicroSeconds(timeout*1000) );
+            }
+        else
+            {
+            iTimeoutController->Start( TTimeIntervalMicroSeconds(1000000) );
+            }
+        }
+    else
+        {
+        iLog->Log(_L("Timeout Controller doesn't exist"));
+        error = KErrTimeoutController;
+        }
+    return error;
+}
+
+
+// -----------------------------------------------------------------------------
+// Uses the TestModuleBase API to allow a panic as exit reason for a test case
+// -----------------------------------------------------------------------------
+TInt COpenMAXALTestModule::SetAllowedPanic( CStifItemParser& aItem )
+{
+   iLog->Log(_L("COpenMAXALTestModule::SetAllowedPanic"));
+    TInt error = KErrNone;
+    TInt panicCode;
+    TPtrC panicType;
+    if (  ( KErrNone == aItem.GetNextString(panicType) ) &&
+    ( KErrNone == aItem.GetNextInt(panicCode) )  )
+        {
+        iLog->Log(_L("Allowing panic: %S %d"), &panicType, panicCode);
+        iTestModuleIf.SetExitReason( CTestModuleIf::EPanic, panicCode );
+        iNormalExitReason = EFalse;
+        }
+    else
+        {
+        iLog->Log(KMsgBadTestParameters);
+        error = KErrBadTestParameter;
+        }
+    return error;
+}
+
+// -----------------------------------------------------------------------------
+// COpenMAXALTestModule::SetExpectedEvents()
+// -----------------------------------------------------------------------------
+TInt COpenMAXALTestModule::SetExpectedEvents( CStifItemParser& aItem )
+{
+   iLog->Log(_L("COpenMAXALTestModule::SetExpectedEvents"));
+    TInt error = KErrNone;
+    TInt event=0;
+    while ( KErrNone == aItem.GetNextInt(event))
+        {
+        TInt timeout=0;
+        aItem.GetNextInt(timeout);
+        AddExpectedEvent(static_cast<TOMXExpectedEvent>(event), timeout); // Default timeout value
+        }
+    return error;
+}
+
+// -----------------------------------------------------------------------------
 // COpenMAXALTestModule::ExampleL
 // Example test method function.
 // (other items were commented in a header).
@@ -444,6 +772,12 @@
         case 40:
             id = XA_IID_STREAMINFORMATION;
             break;
+        case 41:
+            id = XA_IID_NOKIAVOLUMEEXT;
+            break;
+        case 42:
+            id = XA_IID_NOKIALINEARVOLUME;
+            break;
         default:
             break;
         }
@@ -519,6 +853,7 @@
             break;
         case 7:
 /*            XA_IID_PLAY;*/
+            m_PlayItf = XAPlayItf(id);
             break;
         case 8:
 /*            XA_IID_PLAYBACKRATE;*/
@@ -528,9 +863,11 @@
             break;
         case 10:
 /*            XA_IID_SEEK;*/
+            m_SeekItf = XASeekItf(id);
             break;
         case 11:
 /*            XA_IID_VOLUME;*/
+            m_VolumeItf = XAVolumeItf(id);
             break;
         case 12:
 /*            XA_IID_IMAGECONTROLS;*/
@@ -549,6 +886,7 @@
             break;
         case 17:
 /*            XA_IID_METADATAEXTRACTION;*/
+            m_MetadataExtractionItf = XAMetadataExtractionItf(id);
             break;
         case 18:
             m_MetadataInsertionItf = XAMetadataInsertionItf(id);
@@ -559,6 +897,7 @@
             break;
         case 20:
 /*            XA_IID_DYNAMICSOURCE;*/
+            m_DynSrcItf = XADynamicSourceItf(id);
             break;
         case 21:
 /*            XA_IID_CAMERACAPABILITIES;*/
@@ -622,7 +961,17 @@
             break;
         case 40:
 /*            XA_IID_STREAMINFORMATION;*/
+            m_StrInfoItf = XAStreamInformationItf(id);
             break;
+        case 41:
+/*            XA_IID_NOKIAVOLUMEEXTITF;*/
+            m_NokiaVolumeExtItf = XANokiaVolumeExtItf(id);
+            break;
+        case 42:
+/*            XA_IID_NOKIALINEARVOLUMEITF;*/
+            m_NokiaLinearVolumeItf = XANokiaLinearVolumeItf(id);
+            break;
+            
         default:
             break;
             
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalvolumeitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,238 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include "openmaxaltestmodule.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+TInt COpenMAXALTestModule::al_volumeitf_SetVolumeLevel( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt volume(0);
+    
+    status = aItem.GetNextInt(volume);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->SetVolumeLevel(m_VolumeItf, volume);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_GetVolumeLevel( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAmillibel volume(0);
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->GetVolumeLevel(m_VolumeItf, &volume);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_GetMaxVolumeLevel( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAmillibel volume(0);
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->GetMaxVolumeLevel(m_VolumeItf, &volume);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_SetMute( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt mute(0);
+    
+    status = aItem.GetNextInt(mute);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->SetMute(m_VolumeItf, mute);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_GetMute( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAboolean mute(0);
+    
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->GetMute(m_VolumeItf, &mute);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_EnableStereoPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt value(0);
+    
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->EnableStereoPosition(m_VolumeItf, value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_IsEnabledStereoPosition( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAboolean value(0);
+    
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->IsEnabledStereoPosition(m_VolumeItf, &value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_SetStereoPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt value(0);
+    
+    status = aItem.GetNextInt(value);
+    RET_ERR_IF_ERR(status);
+    
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->SetStereoPosition(m_VolumeItf, value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+TInt COpenMAXALTestModule::al_volumeitf_GetStereoPosition( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XApermille value(0);
+    
+    if(m_VolumeItf)
+        {
+        status = (*m_VolumeItf)->GetStereoPosition(m_VolumeItf, &value);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    
+    return status;
+    }
+    
+
+
+
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/engine/openmaxalengineitftests.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/engine/openmaxalengineitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -20,6 +20,7 @@
 #include <StifParser.h>
 #include <StifTestInterface.h>
 #include "openmaxaltestmodule.h"
+#include "profileutilmacro.h"
 
 // EXTERNAL DATA STRUCTURES
 //extern  ?external_data;
@@ -284,8 +285,7 @@
 TInt COpenMAXALTestModule::al_engitf_CreateMediaPlayer( CStifItemParser& aItem )
     {
     TInt status(KErrNone);
-    XADataSource* audioSource(NULL);
-    XADataSource* videoSource(NULL);
+    XADataSource* dataSource(NULL);
     XADataSink* audioSink(NULL);
     XADataSink* videoSink(NULL);
     XADataSink* ledSink(NULL);
@@ -321,14 +321,14 @@
             }
         }
     
-    if(m_AudioSource.pFormat && m_AudioSource.pLocator)
+    /*pFormat is not mandatory for RadioSrc*/
+    if(/*m_AudioSource.pFormat &&*/ m_AudioSource.pLocator)
         {
-        audioSource = &m_AudioSource;
+        dataSource = &m_AudioSource;
         }
-    
-    if(m_VideoSource.pFormat && m_VideoSource.pLocator)
+    else if(m_VideoSource.pFormat && m_VideoSource.pLocator)
         {
-        videoSource = &m_VideoSource;
+        dataSource = &m_VideoSource;
         }
     
     if(m_VibraSink.pFormat && m_VibraSink.pLocator)
@@ -340,23 +340,26 @@
         {
         ledSink = &m_LEDSink;
         }
-    
-    if(m_AudioSink.pFormat && m_AudioSink.pLocator)
+    /*pFormat is not mandatory for IODevice*/
+    if(/*m_AudioSink.pFormat && */m_AudioSink.pLocator)
         {
         audioSink = &m_AudioSink;
         }
-    
-    if(m_VideoSink.pFormat && m_VideoSink.pLocator)
+    /*pFormat is not mandatory for NativeDisplay*/
+    if(/*m_VideoSink.pFormat && */m_VideoSink.pLocator)
         {
         videoSink = &m_VideoSink;
         }    
     
     if(m_EngineItf)
         {
+        TAG_TIME_PROFILING_BEGIN;
         res = (*m_EngineItf)->CreateMediaPlayer(
-                m_EngineItf, &m_MOPlayer, audioSource, videoSource,
+                m_EngineItf, &m_MOPlayer, dataSource, NULL,
                 audioSink,videoSink, ledSink, vibraSink,
                 numInterfaces, iidArray, required);
+        TAG_TIME_PROFILING_END;
+        PRINT_TO_CONSOLE_TIME_DIFF;
         status = res;
         }
     else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/metadata/openmaxalmetadataextractionitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,505 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include "openmaxaltestmodule.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_GetItemCount( CStifItemParser& aItem )
+{
+    iLog->Log( _L("al_metadataextractionitf_GetItemCount >>") );
+    
+    TInt status(KErrNotFound);
+    XAresult res;
+    XAuint32 numItems = 0;
+    if(m_MetadataExtractionItf)
+    {
+        res = (*m_MetadataExtractionItf)->GetItemCount(
+                 m_MetadataExtractionItf, &numItems);              
+        status = MapErr(res);
+            
+        TInt expectedNum = 0;
+        if(aItem.GetNextInt(expectedNum) == KErrNone)
+        {				
+			if((status==KErrNone) && (expectedNum != numItems))
+			{
+                status = KErrGeneral;
+			}
+		}
+			
+		iLog->Log( _L("The number of Metadata Items:%d Expected: %d"), numItems, expectedNum );
+  }
+	
+  iLog->Log( _L("al_metadataextractionitf_GetItemCount (%d) <<"), status );
+  return status;
+}
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_GetKeySize( CStifItemParser& aItem )
+{
+    iLog->Log( _L("al_metadataextractionitf_GetKeySize >>") );
+    
+    TInt status(KErrNotFound);
+    XAresult res;
+    XAuint32 keySize = 0;
+    if(m_MetadataExtractionItf)
+    {
+        TInt index;
+        if(aItem.GetNextInt(index) == KErrNone)
+        {
+            res     = (*m_MetadataExtractionItf)->GetKeySize(
+                        m_MetadataExtractionItf, index, &keySize);              
+            status  = MapErr(res);
+  			
+            TInt expectedSize = 0;
+            if(aItem.GetNextInt(expectedSize) == KErrNone)
+			{	      
+                if((status==KErrNone) && (expectedSize != keySize))
+                {
+                    status = KErrNotFound;
+                }
+			}
+			iLog->Log( _L("KeySize[%d]: %d Expected Size:%d"), index, keySize, expectedSize);				
+		}
+	}
+	
+	iLog->Log( _L("al_metadataextractionitf_GetKeySize (%d) <<"), status );
+  return status;
+}
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_GetKey( CStifItemParser& aItem )
+{
+    iLog->Log( _L("al_metadataextractionitf_GetKey >>") );
+    
+    TInt status(KErrNotFound);
+    XAresult res;
+    XAMetadataInfo *key = NULL;
+    
+    if(m_MetadataExtractionItf)
+    {
+        TPtrC keyToFind;
+        if(aItem.GetNextString(keyToFind) == KErrNone)
+        {
+            HBufC *pB = HBufC16::NewL(keyToFind.Size());
+            TPtr tP = pB->Des();
+            tP.Copy(keyToFind);
+            iLog->Log( _L("Expected Key: %S"), pB);
+            delete pB;
+  		
+            XAuint32 numItems = 0;
+            res = (*m_MetadataExtractionItf)->GetItemCount(m_MetadataExtractionItf, &numItems);              
+
+            for(int i = 0; (i < numItems) && (MapErr(res) == KErrNone) && (status == KErrNotFound); i++)
+            {
+                XAuint32 keySize = 0;
+                res = (*m_MetadataExtractionItf)->GetKeySize(
+                       m_MetadataExtractionItf, i, &keySize);  
+      
+                if(MapErr(res) == KErrNone)
+                {
+                    key = (XAMetadataInfo *)calloc(keySize,1);
+                    if(key)
+                    {
+                        res = (*m_MetadataExtractionItf)->GetKey(
+                                        m_MetadataExtractionItf, i , keySize, key);              
+                        status = MapErr(res);
+                        if(status==KErrNone)
+                        {
+                            HBufC*   temp  = NULL;
+                            if(key->encoding == XA_CHARACTERENCODING_ASCII)
+                            {
+                                TPtrC8 des((TUint8*)(key->data), key->size-1 );
+                                temp = HBufC16::NewL(key->size-1);
+                                TPtr tempPtr = temp->Des();
+                                tempPtr.Copy(des);                        
+                                iLog->Log( _L("Key[%d]: %S"), i, temp);
+							}
+							else if(key->encoding == XA_CHARACTERENCODING_UTF16LE)
+							{
+                                TPtrC des((const TUint16*)key->data, key->size/2 - 1);
+                                temp = HBufC16::NewL(key->size/2 - 1);
+                                TPtr tempPtr = temp->Des();
+                                tempPtr.Copy(des);                        
+                                iLog->Log( _L("Key[%d]: %S"), i, temp);
+							}
+									
+							if(temp && !keyToFind.Compare(temp->Des()))
+							{
+								status = KErrNone;
+							}
+							else
+							{
+								status = KErrNotFound;
+							}
+							
+							if(temp)
+							{
+								delete temp;
+							}
+						}//end if(status==KErrNone)
+						
+						free(key);
+                    }//end if(key)
+                }//end if(MapErr(res) == KErrNone)
+            }//end for
+        }//end if(aItem.GetNextString(index) == KErrNone)
+    }//end if(m_MetadataExtractionItf)
+        
+    iLog->Log( _L("al_metadataextractionitf_GetKey (%d)<<"), status );
+    return status;
+}
+
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_GetValueSize( CStifItemParser& aItem )
+{
+    iLog->Log( _L("al_metadataextractionitf_GetValueSize >>") );
+    
+    TInt status(KErrNotFound);
+    XAresult res;
+    XAuint32 valueSize = 0;
+    if(m_MetadataExtractionItf)
+    {
+        TInt index;
+        if(aItem.GetNextInt(index) == KErrNone)
+        {
+            res     = (*m_MetadataExtractionItf)->GetValueSize(
+                            m_MetadataExtractionItf, index, &valueSize);              
+            status  = MapErr(res);
+			iLog->Log( _L("ValueSize[%d]: %d"), index, valueSize);
+        }
+    }
+   
+   iLog->Log( _L("al_metadataextractionitf_GetValueSize (%d) <<"), status );
+   return status;
+}
+
+
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_GetValue( CStifItemParser& aItem )
+{
+    iLog->Log( _L("al_metadataextractionitf_GetValue >>") );
+    
+    TInt status(KErrNotFound);
+    XAresult res;
+    
+    XAMetadataInfo *key = NULL;
+    
+    if(m_MetadataExtractionItf)
+    {
+        TInt index;
+        
+        //Find Key Index
+        TPtrC keyToFind;
+        if(aItem.GetNextString(keyToFind) == KErrNone)
+        {
+            HBufC *pB = HBufC16::NewL(keyToFind.Size());
+            TPtr tP = pB->Des();
+            tP.Copy(keyToFind);
+            iLog->Log( _L("Expected Key: %S"), pB);
+            delete pB;
+            
+            XAuint32 numItems = 0;
+            res = (*m_MetadataExtractionItf)->GetItemCount(m_MetadataExtractionItf, &numItems);              
+    
+            for(index = 0; (index < numItems) && (MapErr(res) == KErrNone) && (status == KErrNotFound); index++)
+            {
+                XAuint32 keySize = 0;
+                res = (*m_MetadataExtractionItf)->GetKeySize(
+                       m_MetadataExtractionItf, index, &keySize);  
+          
+                if(MapErr(res) == KErrNone)
+                {
+                    key = (XAMetadataInfo *)calloc(keySize,1);
+                    if(key)
+                    {
+                        res = (*m_MetadataExtractionItf)->GetKey(
+                                        m_MetadataExtractionItf, index , keySize, key);              
+                        status = MapErr(res);
+                        if(status==KErrNone)
+                        {
+                            HBufC*   temp  = NULL;
+                            TDesC16* pdesc = NULL;
+                                    
+                            if(key->encoding == XA_CHARACTERENCODING_ASCII)
+                            {
+                                TPtrC8 des((TUint8*)(key->data), key->size - 1 );
+                                temp = HBufC16::NewL(key->size - 1);
+                                TPtr tempPtr = temp->Des();
+                                tempPtr.Copy(des);                        
+                                iLog->Log( _L("Key[%d]: %S"), index, temp);
+                                pdesc = &tempPtr;
+                            }
+                            else if(key->encoding == XA_CHARACTERENCODING_UTF16LE)
+                            {
+                                TPtrC des((const TUint16*)key->data, key->size/2 - 1);
+                                temp = HBufC16::NewL(key->size/2 - 1);
+                                TPtr tempPtr = temp->Des();
+                                tempPtr.Copy(des);                        
+                                iLog->Log( _L("Key[%d]: %S"), index, temp);
+                                pdesc = &tempPtr;
+                            }
+                                        
+                            if(!keyToFind.Compare(*pdesc))
+                            {
+                                status = KErrNone;
+                            }
+                            else
+                            {
+                                status = KErrNotFound;
+                            }
+                            
+                            if(temp)
+                            {
+                                delete temp;
+                            }
+                        }//end if(status==KErrNone)
+                            
+                        free(key);
+                    }//end if(key)
+                }//end if(MapErr(res) == KErrNone)
+            }//end for
+        }//end if(aItem.GetNextString(index) == KErrNone)
+            
+        if((status == KErrNone) && (--index >= 0))
+        {
+            XAMetadataInfo *value = NULL;
+            XAuint32 valueSize;
+        
+            res = (*m_MetadataExtractionItf)->GetValueSize(
+                                   m_MetadataExtractionItf, index, &valueSize);  
+                
+            if(MapErr(res) == KErrNone)
+            {
+                value = (XAMetadataInfo *)calloc(valueSize,1);
+                if(value)
+                {
+                    res = (*m_MetadataExtractionItf)->GetValue(
+                            m_MetadataExtractionItf, index, valueSize, value);              
+                    status = MapErr(res);
+
+                    HBufC*   temp  = NULL;
+                    if(status == KErrNone)
+                    {
+                        if(value->encoding == XA_CHARACTERENCODING_ASCII)
+                        {
+                            TPtrC8 des((TUint8*)(value->data), value->size - 1 );
+                            temp = HBufC16::NewL(value->size - 1);
+                            TPtr tempPtr = temp->Des();
+                            tempPtr.Copy(des);
+                            iLog->Log( _L("Value[%d]: %S"), index, temp);
+                        }
+                        else if(value->encoding == XA_CHARACTERENCODING_UTF16LE)
+                        {
+                            TPtrC des((const TUint16*)value->data, value->size/2 - 1);
+                            temp = HBufC16::NewL(value->size/2 - 1);
+                            TPtr tempPtr = temp->Des();
+                            tempPtr.Copy(des);
+                            iLog->Log( _L("Value[%d]: %S"), index, temp);
+                       }
+                        else
+                        {
+                            iLog->Log( _L("Value[%d]: <Binary Value>"), index);
+                        }					
+
+                        if(value->encoding != XA_CHARACTERENCODING_BINARY)
+                        {            
+                            TPtrC expectedValue;
+                            if(aItem.GetNextString(expectedValue) == KErrNone)
+                            {            
+                                HBufC *pB = HBufC16::NewL(expectedValue.Size());
+                                TPtr tP = pB->Des();
+                                tP.Copy(expectedValue);
+                                iLog->Log( _L("Expected Value: %S"), pB);
+								iLog->Log(_L("Size: Expected(%d), Actual(%d)"),expectedValue.Size(), temp->Des().Size());
+                                delete pB;
+                                if(temp && !expectedValue.Compare(temp->Des()))
+                                {
+                                    status = KErrNone;
+                                }
+                                else
+                                {
+                                    status = KErrNotFound;
+                                }
+                            }
+                        }
+                               
+                        if(temp)
+                        {
+                            delete temp;
+                        }
+                    }//end if(status == KErrNone)
+                    delete value;
+                }//end if(value)
+            }//end if(MapErr(res) == KErrNone)
+        }//end if(status == KErrNone)   
+    }//end   if(m_MetadataExtractionItf)
+	
+    iLog->Log( _L("al_metadataextractionitf_GetValue (%d)<<"), status );
+    return status;
+}
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_AddKeyFilter( CStifItemParser& /*aItem */)
+{
+    iLog->Log( _L("al_metadataextractionitf_AddKeyFilter >>") );
+    TInt status(KErrNotFound);
+    if(m_MetadataExtractionItf)
+    {
+		XAresult res = (*m_MetadataExtractionItf)->AddKeyFilter(m_MetadataExtractionItf,
+			        		                                       0, NULL, 0, NULL, 0, 0);
+		status = res;
+    }
+
+	iLog->Log( _L("al_metadataextractionitf_AddKeyFilter (%d)<<"), status );	
+
+	return status;
+}
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_ClearKeyFilter( CStifItemParser& /*aItem*/ )
+{
+    iLog->Log( _L("al_metadataextractionitf_ClearKeyFilter >>") );
+    TInt status(KErrNotFound);
+    if(m_MetadataExtractionItf)
+    {
+	    XAresult res    = (*m_MetadataExtractionItf)->ClearKeyFilter(m_MetadataExtractionItf);
+
+		status = res;
+    }
+
+	iLog->Log( _L("al_metadataextractionitf_ClearKeyFilter (%d)<<"), status );
+
+	return status;
+}
+
+TInt COpenMAXALTestModule::al_metadataextractionitf_GetCoverArt( CStifItemParser& /*aItem*/ )
+{
+    iLog->Log( _L("al_metadataextractionitf_GetCoverArt >>") );
+
+    TInt status(KErrNotFound);
+    XAresult res;
+    
+    if(m_MetadataExtractionItf)
+    {
+        XAuint32 numItems = 0;
+        res = (*m_MetadataExtractionItf)->GetItemCount(
+                    m_MetadataExtractionItf, &numItems);              
+
+        for(int i = 0; (i < numItems) && (MapErr(res) == KErrNone) ; i++)
+        {
+            XAuint32 keySize = 0;
+            res = (*m_MetadataExtractionItf)->GetKeySize(
+                        m_MetadataExtractionItf, i, &keySize);  
+                     
+            if(MapErr(res) == KErrNone)
+            {
+                XAMetadataInfo* key = (XAMetadataInfo *)calloc(keySize,1);
+                if(key)
+                {
+                    res = (*m_MetadataExtractionItf)->GetKey(
+                             m_MetadataExtractionItf, i, keySize, key);              
+
+                    if(MapErr(res) == KErrNone)
+                    {
+                        if( key->encoding == XA_CHARACTERENCODING_ASCII)
+                        {
+                            if(!strcmp((const char*)key->data, "attachedpicture"))
+                            {
+                                XAuint32 valueSize;
+                                res = (*m_MetadataExtractionItf)->GetValueSize(
+                                              m_MetadataExtractionItf, i, &valueSize);  
+                                if(MapErr(res) == KErrNone)
+                                {
+                                    XAMetadataInfo* value = (XAMetadataInfo *)calloc(valueSize,1);
+                                    if(value)
+                                    {
+                                        res = (*m_MetadataExtractionItf)->GetValue(
+                                                m_MetadataExtractionItf, i, valueSize, value);              
+                                        if((MapErr(res) == KErrNone) && 
+                                           (value->encoding == XA_CHARACTERENCODING_BINARY))
+                                        {
+                                            iLog->Log( _L("CoverArt[%d] Size: %d"), i, value->size );
+                                        }
+                                        free(value);
+                                    }
+                                
+                                    break;
+                                }
+                            }            
+                        }
+                        free(key);
+                    }
+                }
+             }
+        }// end for
+        
+        status = MapErr(res);
+    }//end if(m_MetadataExtractionItf)
+    
+    return status;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/player/openmaxalplayitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,497 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include <StifTestEventInterface.h>
+#include "openmaxaltestmodule.h"
+#include "profileutilmacro.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+void PlayItfCallback (
+    XAPlayItf caller,
+    void * pContext,
+    XAuint32 event);
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+TInt COpenMAXALTestModule::al_playitf_SetPlayState( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt state(0);
+    status = aItem.GetNextInt(state);
+    RET_ERR_IF_ERR(status);
+
+    if(m_PlayItf)
+        {
+        TAG_TIME_PROFILING_BEGIN;
+        status = (*m_PlayItf)->SetPlayState(
+                m_PlayItf, state);              
+        TAG_TIME_PROFILING_END;
+        PRINT_TO_CONSOLE_TIME_DIFF;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetPlayState( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAuint32 state;
+    TInt expectedState;
+    status = aItem.GetNextInt(expectedState);
+    RET_ERR_IF_ERR(status);
+
+    if (m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetPlayState(
+                m_PlayItf, &state);              
+        if (!status)
+            {
+            if (state != expectedState)
+                {
+                status = KErrCompletion;
+                }
+            }
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetDurationNullParam( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    if (m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetDuration(
+                m_PlayItf, NULL);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetDuration( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAmillisecond duration;
+    TInt expectedDurationLowLimit;
+    TInt expectedDurationHighLimit;
+    TBool expectedRangeDefined(EFalse);
+    status = aItem.GetNextInt(expectedDurationLowLimit);
+    if (status == KErrNone)
+        {
+        status = aItem.GetNextInt(expectedDurationHighLimit);
+        if (status == KErrNone)
+            {
+            expectedRangeDefined = ETrue;
+            }
+        }
+    if (m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetDuration(
+                m_PlayItf, &duration);              
+        if (status == XA_RESULT_SUCCESS)
+            {
+            iLog->Log(_L("COpenMAXALTestModule::al_playitf_GetDuration:Duration[%u]"), duration);
+            /* If duration does not fall between the range we expected fail the case */
+            if (expectedRangeDefined &&
+                    !((expectedDurationLowLimit <= duration) && (duration <= expectedDurationHighLimit)))
+                {
+                status = KErrCompletion;
+                }
+            }
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetPositionNullParam( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    if (m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetPosition(
+                m_PlayItf, NULL);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt expectedPos;
+    TBool expectedPosDefined(EFalse);
+    XAmillisecond position;
+    status = aItem.GetNextInt(expectedPos);
+    if (status == KErrNone)
+        {
+        expectedPosDefined = ETrue;
+        }
+
+    if (m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetPosition(
+                m_PlayItf, &position);
+        if (status == XA_RESULT_SUCCESS)
+            {
+            if (expectedPosDefined &&
+                (expectedPos != position))
+                {
+                status = KErrCompletion;
+                }
+            iLog->Log(_L("COpenMAXALTestModule::al_playitf_GetPosition:Position[%u]"), position);
+            }
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_RegisterCallback( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAresult res;
+
+    if(m_PlayItf)
+        {
+        res = (*m_PlayItf)->RegisterCallback(
+                m_PlayItf, &PlayItfCallback, (void*)this);              
+        status = res;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_SetCallbackEventMask( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt eventMask;
+    status = aItem.GetNextInt(eventMask);
+    RET_ERR_IF_ERR(status);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->SetCallbackEventsMask(
+                m_PlayItf, eventMask);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetCallbackEventMaskNullParam( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetCallbackEventsMask(
+                m_PlayItf, NULL);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetCallbackEventMask( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    XAuint32 eventMask;
+    TInt expectedEventMask;
+    status = aItem.GetNextInt(expectedEventMask);
+    RET_ERR_IF_ERR(status);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetCallbackEventsMask(
+                m_PlayItf, &eventMask);              
+        if (!status)
+            {
+            /* Fail if position is not expected*/
+            if (eventMask != expectedEventMask)
+                {
+                status = KErrCompletion;
+                }
+            }
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+
+    return status;
+    }
+TInt COpenMAXALTestModule::al_playitf_SetMarkerPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt pos(0);
+    status = aItem.GetNextInt(pos);
+    RET_ERR_IF_ERR(status);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->SetMarkerPosition(
+                m_PlayItf, (XAmillisecond)pos);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_ClearMarkerPosition( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->ClearMarkerPosition(
+                m_PlayItf);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetMarkerPositionNullParam( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetMarkerPosition(
+                m_PlayItf, NULL);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetMarkerPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt expectedMarkerPos(0);
+    status = aItem.GetNextInt(expectedMarkerPos);
+    XAmillisecond markerPos;
+    RET_ERR_IF_ERR(status);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetMarkerPosition(
+                m_PlayItf, &markerPos);
+        if (!status && (markerPos != expectedMarkerPos))
+            {
+            status = KErrCompletion;
+            }
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_SetPositionUpdatePeriod( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt pos(0);
+    status = aItem.GetNextInt(pos);
+    RET_ERR_IF_ERR(status);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->SetPositionUpdatePeriod(
+                m_PlayItf, (XAmillisecond)pos);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetPositionUpdatePeriodNullParam( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetPositionUpdatePeriod(
+                m_PlayItf, NULL);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_playitf_GetPositionUpdatePeriod( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt expectedMarkerPos(0);
+    status = aItem.GetNextInt(expectedMarkerPos);
+    XAmillisecond markerPos;
+    RET_ERR_IF_ERR(status);
+
+    if(m_PlayItf)
+        {
+        status = (*m_PlayItf)->GetPositionUpdatePeriod(
+                m_PlayItf, &markerPos);
+        if (!status && (markerPos != expectedMarkerPos))
+            {
+            status = KErrCompletion;
+            }
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+void COpenMAXALTestModule::HandlePlayItfCallback( XAPlayItf /*caller*/, XAuint32 event )
+    {
+    switch (event)
+        {
+        case XA_PLAYEVENT_HEADATEND:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_PLAYEVENT_HEADATEND") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_PLAYEVENT_HEADATMARKER:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_PLAYEVENT_HEADATMARKER") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_OBJECT_EVENT_RESOURCES_LOST:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_OBJECT_EVENT_RESOURCES_LOST") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_PLAYEVENT_HEADATNEWPOS:
+            {
+            iLog->Log(_L("COpenMAXALTestModule::HandlePlayItfCallback:XA_PLAYEVENT_HEADATNEWPOS"));
+            }
+            break;
+        case XA_PLAYEVENT_HEADMOVING:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_PLAYEVENT_HEADMOVING") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        case XA_PLAYEVENT_HEADSTALLED:
+            {
+            TEventIf event( TEventIf::ESetEvent, _L("Event_XA_PLAYEVENT_HEADSTALLED") );
+            TestModuleIf().Event( event );
+            }
+            break;
+        default:
+            break;
+        }
+    }
+
+void PlayItfCallback (
+    XAPlayItf caller,
+    void * pContext,
+    XAuint32 event)
+    {
+    if (pContext)
+        {
+        ((COpenMAXALTestModule*)pContext)->HandlePlayItfCallback(caller, event);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/player/openmaxalseekitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include <StifTestEventInterface.h>
+#include "openmaxaltestmodule.h"
+#include "profileutilmacro.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+TInt COpenMAXALTestModule::al_seekitf_SetPosition( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt seekMode(0);
+    TInt position(0);
+
+    status = aItem.GetNextInt(position);
+    RET_ERR_IF_ERR(status);
+        
+    status = aItem.GetNextInt(seekMode);
+    RET_ERR_IF_ERR(status);
+
+    if(m_SeekItf)
+        {
+        TAG_TIME_PROFILING_BEGIN;
+        status = (*m_SeekItf)->SetPosition(
+                m_SeekItf, position, seekMode);              
+        TAG_TIME_PROFILING_END;
+        PRINT_TO_CONSOLE_TIME_DIFF;
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_seekitf_SetLoop( CStifItemParser& aItem )
+    {
+    TInt status(KErrNone);
+    TInt loopEnable(0);
+    TInt startPos(0);
+    TInt endPos(0);
+    
+    status = aItem.GetNextInt(loopEnable);
+    RET_ERR_IF_ERR(status);
+        
+    status = aItem.GetNextInt(startPos);
+    RET_ERR_IF_ERR(status);    
+    
+    status = aItem.GetNextInt(endPos);
+    RET_ERR_IF_ERR(status);
+
+    if (m_SeekItf)
+        {
+        status = (*m_SeekItf)->SetLoop(
+                m_SeekItf, loopEnable, startPos, endPos );              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
+TInt COpenMAXALTestModule::al_seekitf_GetLoop( CStifItemParser& /*aItem*/ )
+    {
+    TInt status(KErrNone);
+    XAboolean loopEnable;
+    XAuint32 startPos(0);
+    XAuint32 endPos(0);
+    
+    if (m_SeekItf)
+        {
+        status = (*m_SeekItf)->GetLoop(
+                m_SeekItf, &loopEnable, &startPos, &endPos);
+        iLog->Log(_L("al_seekitf_GetLoop loopEnable[%d]"),loopEnable);
+        iLog->Log(_L("al_seekitf_GetLoop startPos[%d]"),startPos);
+        iLog->Log(_L("al_seekitf_GetLoop endPos[%d]"),endPos);
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }
+
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/recorder/openmaxalaudioencoderitftests.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/recorder/openmaxalaudioencoderitftests.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -77,54 +77,62 @@
     XAAudioEncoderSettings setting;
     TUint value(0);
     TInt i(0);
+    TInt numItems;
     
-    while(aItem.GetNextInt(value) == KErrNone)
+    status = aItem.GetNextInt(numItems);
+    
+    while((numItems != 0) && (status == KErrNone))
         {
-        switch(i)
+        status = aItem.GetNextInt(value);
+        if(!status)
             {
-            case 0:
-                setting.encoderId = value;
-                break;
-            case 1:
-                setting.channelsIn = value;
-                break;
-            case 2:
-                setting.channelsOut = value;
-                break;
-            case 3:
-                setting.sampleRate = value;
-                break;
-            case 4:
-                setting.bitRate = value;
-                break;
-            case 5:
-                setting.bitsPerSample = value;
-                break;
-            case 6:
-                setting.rateControl = value;
-                break;
-            case 7:
-                setting.profileSetting = value;
-                break;
-            case 8:
-                setting.levelSetting = value;
-                break;
-            case 9:
-                setting.channelMode = value;
-                break;
-            case 10:
-                setting.streamFormat = value;
-                break;
-            case 11:
-                setting.encodeOptions = value;
-                break;
-            case 12:
-                setting.blockAlignment = value;
-                break;
-            default:
-                break;
+            switch(i)
+                {
+                case 0:
+                    setting.encoderId = value;
+                    break;
+                case 1:
+                    setting.channelsIn = value;
+                    break;
+                case 2:
+                    setting.channelsOut = value;
+                    break;
+                case 3:
+                    setting.sampleRate = value;
+                    break;
+                case 4:
+                    setting.bitRate = value;
+                    break;
+                case 5:
+                    setting.bitsPerSample = value;
+                    break;
+                case 6:
+                    setting.rateControl = value;
+                    break;
+                case 7:
+                    setting.profileSetting = value;
+                    break;
+                case 8:
+                    setting.levelSetting = value;
+                    break;
+                case 9:
+                    setting.channelMode = value;
+                    break;
+                case 10:
+                    setting.streamFormat = value;
+                    break;
+                case 11:
+                    setting.encodeOptions = value;
+                    break;
+                case 12:
+                    setting.blockAlignment = value;
+                    break;
+                default:
+                    break;
+                }
             }
         i++;
+        numItems--;
         }
 
     if(m_AudEncItf)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_ext_api/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Exports OpenMAX AL Extension headers
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+#ifdef FF_OPENMAX_AL
+../inc/xanokiavolumeextitf.h        MW_LAYER_PLATFORM_EXPORT_PATH(khronos/xanokiavolumeextitf.h)
+../inc/xanokialinearvolumeitf.h     MW_LAYER_PLATFORM_EXPORT_PATH(khronos/xanokialinearvolumeitf.h)
+../readme_ext.txt                   MW_LAYER_PLATFORM_EXPORT_PATH(khronos/readme_ext.txt)
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_ext_api/inc/xanokialinearvolumeitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef _XANOKIALINEARVOLUMEITF_H_
+#define _XANOKIALINEARVOLUMEITF_H_
+
+#include "OpenMAXAL.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* NOKIA LINEAR VOLUME */
+
+#define XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED          ((XAuint32) 0x00000001)
+
+XA_API extern const XAInterfaceID XA_IID_NOKIALINEARVOLUME;
+
+struct XANokiaLinearVolumeItf_;
+typedef const struct XANokiaLinearVolumeItf_ * const * XANokiaLinearVolumeItf;
+
+typedef void (XAAPIENTRY * xaNokiaLinearVolumeCallback) (
+    XANokiaLinearVolumeItf caller,
+    void * pContext,
+    XAuint32 event,
+    XAboolean eventBooleanData
+);
+
+struct XANokiaLinearVolumeItf_ {
+    XAresult (*SetVolumeLevel) (
+        XANokiaLinearVolumeItf self,
+        XAuint32 * pPercentage
+    );
+    XAresult (*GetVolumeLevel) (
+        XANokiaLinearVolumeItf self,
+        XAuint32 * pPercentage
+    );
+    XAresult (*GetStepCount) (
+        XANokiaLinearVolumeItf self,
+        XAuint32 * pStepCount
+    );
+    XAresult (*RegisterVolumeCallback) (
+        XANokiaLinearVolumeItf self,
+        xaNokiaLinearVolumeCallback callback, 
+        void * pContext
+    );
+    XAresult (*SetCallbackEventsMask) (
+        XANokiaLinearVolumeItf self,
+        XAuint32 eventFlags
+    );
+    XAresult (*GetCallbackEventsMask) (
+        XANokiaLinearVolumeItf self,
+        XAuint32 * pEventFlags
+    );
+};
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _XANOKIALINEARVOLUMEITF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_ext_api/inc/xanokiavolumeextitf.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef _XANOKIAVOLUMEEXTITF_H_
+#define _XANOKIAVOLUMEEXTITF_H_
+
+#include "OpenMAXAL.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* NOKIA VOLUME */
+
+#define XA_NOKIAVOLUMEEXT_EVENT_VOLUME_CHANGED          ((XAuint32) 0x00000001)
+#define XA_NOKIAVOLUMEEXT_EVENT_MUTE_CHANGED      		((XAuint32) 0x00000002)
+#define XA_NOKIAVOLUMEEXT_EVENT_STEREO_POSITION_CHANGED ((XAuint32) 0x00000004)
+
+XA_API extern const XAInterfaceID XA_IID_NOKIAVOLUMEEXT;
+
+struct XANokiaVolumeExtItf_;
+typedef const struct XANokiaVolumeExtItf_ * const * XANokiaVolumeExtItf;
+
+typedef void (XAAPIENTRY * xaNokiaVolumeExtCallback) (
+    XANokiaVolumeExtItf caller,
+    void * pContext,
+    XAuint32 event,
+    XAboolean eventBooleanData
+);
+
+struct XANokiaVolumeExtItf_ {
+    XAresult (*SetVolumeLevel) (
+        XANokiaVolumeExtItf self,
+        XAmillibel level
+    );
+    XAresult (*GetVolumeLevel) (
+        XANokiaVolumeExtItf self,
+        XAmillibel * pLevel
+    );
+    XAresult (*GetMaxVolumeLevel) (
+        XANokiaVolumeExtItf self,
+        XAmillibel * pMaxLevel
+    );
+    XAresult (*SetMute) (
+        XANokiaVolumeExtItf self,
+        XAboolean mute
+    );
+    XAresult (*GetMute) (
+        XANokiaVolumeExtItf self,
+        XAboolean * pMute
+    );
+    XAresult (*EnableStereoPosition) (
+        XANokiaVolumeExtItf self,
+        XAboolean enable
+    );
+    XAresult (*IsEnabledStereoPosition) (
+        XANokiaVolumeExtItf self,
+        XAboolean * pEnable
+    );
+    XAresult (*SetStereoPosition) (
+        XANokiaVolumeExtItf self,
+        XApermille stereoPosition
+    );
+    XAresult (*GetStereoPosition) (
+        XANokiaVolumeExtItf self,
+        XApermille * pStereoPosition
+    );
+    XAresult (*RegisterVolumeCallback) (
+        XANokiaVolumeExtItf self,
+        xaNokiaVolumeExtCallback callback, 
+        void * pContext
+    );
+    XAresult (*SetCallbackEventsMask) (
+        XANokiaVolumeExtItf self,
+        XAuint32 eventFlags
+    );
+    XAresult (*GetCallbackEventsMask) (
+        XANokiaVolumeExtItf self,
+        XAuint32 * pEventFlags
+    );
+};
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _XANOKIAVOLUMEEXTITF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_ext_api/openmax_al_ext_api.metaxml	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="429a389f5c9afb70c9b789bc52ebaa7d" dataversion="2.0">
+  <name>openmax_al_ext_api</name>
+  <description>This API provides extension to Khronos OpenMAX AL.</description>
+  <type>c++</type>
+  <collection>khronosfws</collection>
+  <libs>
+    <lib name="openmaxal.lib"/>
+  </libs>
+  <release category="platform" sinceversion="^4"/>
+  <attributes>
+    <htmldocprovided>no</htmldocprovided>
+    <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_ext_api/readme_ext.txt	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+The partial implementation of the Khronos OpenMAX AL API in this distribution has implemented the following features:
+
+* Audio recording
+
+As such, it is NOT a *conformant* OpenMAX AL implementation, as defined by Khronos. That is, it has NOT passed the OpenMAX AL conformance tests. It is to be noted however, that Nokia has signed the Adopter's Agreement and paid the requisite adopter fees for OpenMAX AL v1.0. It is our intention to apply for conformance once we have a complete OpenMAX AL implementation in either the Media Player or Media Player/Recorder profiles.
+
+For now, Nokia has gone ahead with distribution of this partial implementation to facilitate use of this implementation by Symbian Foundation members for evaluation/prototyping purposes. Nokia will be adding to this partial implementation in the coming months, as more and more parts of OpenMAX AL are implemented. Our objective is to eventually have a fully conformant implementation of OpenMAX AL as part of the Symbian Foundation code base. 
+
+
+Useful Links:
+* Khronos Consortium: http://www.khronos.org
+* Khronos FAQ for API Adopters: http://www.khronos.org/faq/category/C80
+* OpenMAX AL: http://www.khronos.org/openmax
--- a/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h	Fri Apr 30 19:18:45 2010 -0500
@@ -20,8 +20,8 @@
  *
  */
 
-#ifndef __SYSTEMTONESERVICE_H__
-#define __SYSTEMTONESERVICE_H__
+#ifndef SYSTEMTONESERVICE_H_
+#define SYSTEMTONESERVICE_H_
 
 // System includes
 #include <e32base.h>
@@ -29,6 +29,27 @@
 // Forward declarations
 NONSHARABLE_CLASS( CStsImplementation);
 
+//Observer declaration
+/**
+ *  Play Alarm Observer API definition.
+ *  This defines the interface that must be implemented by Play Alarm
+ *  Observers.
+ *
+ */
+class MStsPlayAlarmObserver
+    {
+public:
+    /**
+     * Informs the observer when the play alarm as indicated by the alarm
+     * context is complete.  This method will not be called when this alarm
+     * associated with the alarm context has been stopped with the StopAlarm
+     * method.
+     *
+     * @param aAlarmContext The context of the alarm that has completed.
+     */
+    virtual void PlayAlarmComplete(unsigned int aAlarmContext) = 0;
+    };
+
 // Class declaration
 /**
  *  System Tone Service API definition.
@@ -44,12 +65,12 @@
  *       ...
  *       sts->PlayTone(CSystemToneService::EWarningTone);
  *       ...
- *       sts->Playtone(CSystemToneService::ECalendarAlarm, &calendarAlarmContext);
+ *       sts->PlayAlarm(CSystemToneService::ECalendarAlarm, &calendarAlarmContext);
+ *       ...
+ *       sts->StopAlarm(calendarAlarmContext);
  *       ...
  *   }
  *   ...
- *   sts->StopTone(calendarAlarmContext);
- *   ...
  *   CSystemToneService::Delete(sts);
  *  @endcode
  *
@@ -68,59 +89,65 @@
     /** The type of System Tones that are supported by this API. */
     enum TToneType
         {
-        // Calendar Tones
-        ECalendarAlarm = 0x0001,
-        EClockAlarm = 0x0002,
-        EToDoAlarm = 0x0003,
-
         // Capture Tones
-        EBurstMode = 0x1001,
-        ECapture = 0x1002,
-        ECallRecording = 0x1003,
-        ERecordingStart = 0x1004,
-        ERecordingStop = 0x1005,
-        ESelfTimer = 0x1006,
+        EBurstMode = 0x0001,
+        ECapture = 0x0002,
+        ECallRecording = 0x0003,
+        ERecordingStart = 0x0004,
+        ERecordingStop = 0x0005,
+        ESelfTimer = 0x0006,
 
         // General Tones
-        EConfirmationBeep = 0x2001,
-        EDefaultBeep = 0x2002,
-        EErrorBeep = 0x2003,
-        EInformationBeep = 0x2004,
-        EWarningBeep = 0x2005,
-        EIntegratedHandsFreeActivated = 0x2006,
+        EConfirmationBeep = 0x0101,
+        EDefaultBeep = 0x0102,
+        EErrorBeep = 0x0103,
+        EInformationBeep = 0x0104,
+        EWarningBeep = 0x0105,
+        EIntegratedHandsFreeActivated = 0x0106,
 
         // Key Tones
-        ETouchScreen = 0x3001,
+        ETouchScreen = 0x0201,
 
         // Location Tones
-        ELocationRequest = 0x4001,
+        ELocationRequest = 0x0301,
 
         // Messaging Tones
-        EChatAlert = 0x5001,
-        EEmailAlert = 0x5002,
-        EMmsAlert = 0x5003,
-        ESmsAlert = 0x5004,
-        EDeliveryReport = 0x5005,
-        EMessageSendFailure = 0x5006,
+        EChatAlert = 0x0401,
+        EEmailAlert = 0x0402,
+        EMmsAlert = 0x0403,
+        ESmsAlert = 0x0404,
+        EDeliveryReport = 0x0405,
+        EMessageSendFailure = 0x0406,
 
         // Power Tones
-        EBatteryLow = 0x6001,
-        EBatteryRecharged = 0x6002,
-        EPowerOn = 0x6003,
-        EPowerOff = 0x6004,
-        EWakeUp = 0x6005,
-        EWrongCharger = 0x6006,
+        EBatteryLow = 0x0501,
+        EBatteryRecharged = 0x0502,
+        EPowerOn = 0x0503,
+        EPowerOff = 0x0504,
+        EWakeUp = 0x0505,
+        EWrongCharger = 0x0506,
 
         // Telephony Tones
-        EIncomingCall = 0x7001,
-        EIncomingCallLine2 = 0x7002,
-        EIncomingDataCall = 0x7003,
-        EAutomaticRedialComplete = 0x7004,
+        EAutomaticRedialComplete = 0x0604,
 
         // Voice Recognition Tones
-        EVoiceStart = 0x8001,
-        EVoiceError = 0x8002,
-        EVoiceAbort = 0x8003
+        EVoiceStart = 0x0701,
+        EVoiceError = 0x0702,
+        EVoiceAbort = 0x0703
+        };
+
+    /** The type of System Alarms that are supported by this API. */
+    enum TAlarmType
+        {
+        // Calendar Alarms
+        ECalendarAlarm = 0x8001,
+        EClockAlarm = 0x8002,
+        EToDoAlarm = 0x8003,
+
+        // Telephony Alarms
+        EIncomingCall = 0x8101,
+        EIncomingCallLine2 = 0x8102,
+        EIncomingDataCall = 0x8103
         };
 
     /**
@@ -129,30 +156,28 @@
      * to play to completion and do not need to be stopped by the client.
      *
      * @param aTone An input parameter that indicates the type of tone to play.
-     * @return description
      */
     IMPORT_C void PlayTone(TToneType aTone);
 
     /**
-     * Plays the specified tone.  If the tone type is not recognized a default tone will
-     * be played.  This method is used for tones that may not be fixed duration such as
-     * infinitely looping tones, or for tones that can be manually stopped by the client.
+     * Plays the specified alarm.  If the alarm type is not recognized a default alarm will
+     * be played.  Alarms are tones that are not fixed duration such as a calendar alarm
+     * that can be manually stopped by the client, or the client needs to know when the alarm
+     * has completed playing.
      *
-     * @param aTone An input parameter that indicates the type of tone to play.
-     * @param aPlayToneContext An output parameter that provides back a unique context to
-     *  the client for this tone play that can be used for stopping the playback.
-     * @return description
+     * @param aAlarn An input parameter that indicates the type of alarm to play.
+     * @param aAlarmContext An output parameter that provides back a unique context to
+     *  the client for this alarm that can be used for stopping the alarm.
      */
-    IMPORT_C void PlayTone(TToneType aTone, unsigned int& aPlayToneContext);
+    IMPORT_C void PlayAlarm(TAlarmType aAlarm, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 
     /**
-     * Stops the specified tone playback.  If the playback has already completed or the
-     * context is not recognized, this method does nothing.
+     * Stops the specified alarm playback.  If the playback has already completed or the
+     * context is not valid, this method does nothing.
      *
-     * @param aPlayToneContext The context to the Tone Playing that is to be stopped.
-     * @return description
+     * @param aAlarmContext The context to the alarm that is to be stopped.
      */
-    IMPORT_C void StopTone(unsigned int aPlayToneContext);
+    IMPORT_C void StopAlarm(unsigned int aAlarmContext);
 
 protected:
     // Protected constructors and destructors
@@ -167,4 +192,4 @@
     CStsImplementation& iImplementation;
     };
 
-#endif  // __SYSTEMTONESERVICE_H__
+#endif  // SYSTEMTONESERVICE_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/system_tone_service_api/system_tone_service_api.metaxml	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="80ba9722d6ed1f7c0d543739e4709a6a" dataversion="2.0">
+  <name>System Tone Service API</name>
+  <description>Native API for applications and middleware to easily play system tones and alarms.</description>
+  <type>c++</type>
+  <collection>mmserv</collection>
+  <libs>
+    <lib name="systemtoneservice.lib"/>
+  </libs>
+  <release category="platform" sinceversion="^4"/>
+  <attributes>
+    <htmldocprovided>no</htmldocprovided>
+    <adaptation>no</adaptation>
+  </attributes>
+</api>
--- a/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -1,49 +1,72 @@
+//
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+// Description: Example test case for calendar alarm
+//
+//
+
 [Define]
-CalendarAlarm 								1
-ClockAlarm 										2
-ToDoAlarm 										3
-BurstMode 			  						4097
-Capture  											4098
-CallRecording  								4099
-RecordingStart  							4100
-RecordingStop  								4101
-SelfTimer  										4102
-ConfirmationBeep 							8193
-DefaultBeep   								8194
-ErrorBeep  										8195
-InformationBeep  							8196
-WarningBeep  									8197
-IntegratedHandsFreeActivated 	8198
-TouchScreen  									12289
-LocationRequest  							16395
-ChatAlert  										20481
-EmailAlert  									20482
-MmsAlert  										20483
-SmsAlert  										20484
-DeliveryReport  							20485
-MessageSendFailure  					20486
-BatteryLow  									24577
-BatteryRecharged 							24578
-PowerOn  											24579
-PowerOff  										24580
-WakeUp  											24581
-WrongCharger  								24582
-IncomingCall  								28673
-IncomingCallLine2  						28674
-IncomingDataCall  						28675
-AutomaticRedialComplete  			28676
-VoiceStart  									32769
-VoiceError  									32770
-VoiceAbort  									32771
+CalendarAlarm 									32769			
+ClockAlarm 											32770			
+ToDoAlarm 											32771			
+
+BurstMode 			  							1			
+Capture  												2			
+CallRecording  									3			
+RecordingStart  								4			
+RecordingStop  									5			
+SelfTimer  											6			
+
+ConfirmationBeep 								257			
+DefaultBeep   									258			
+ErrorBeep  											259			
+InformationBeep  								260			
+WarningBeep  										261			
+IntegratedHandsFreeActivated 		262
+
+TouchScreen  									  513
+
+LocationRequest  							  769 
+
+ChatAlert  										  1025
+EmailAlert  									  1026
+MmsAlert  										  1027
+SmsAlert  										  1028
+DeliveryReport  							  1029
+MessageSendFailure  					  1030 
+
+BatteryLow  									  1281
+BatteryRecharged 							  1282
+PowerOn  											  1283
+PowerOff  										  1284
+WakeUp  											  1285
+WrongCharger  								  1286
+
+IncomingCall  								  33025
+IncomingCallLine2  						  33026 
+IncomingDataCall  						  33027
+
+AutomaticRedialComplete  			  1540
+
+VoiceStart  									  1793 
+VoiceError  									  1794
+VoiceAbort  									  1795
 [Enddefine]
 
 [Test]
 title NFT
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayToneWithContext ClockAlarm
+STSSTIF PlayAlarm ClockAlarm
 pause 10000
-STSSTIF StopTone True
+STSSTIF StopAlarm True
 STSSTIF Delete
 delete STSSTIF
 [Endtest]
@@ -63,7 +86,7 @@
 title 02 Play ClockAlarm Ringtone
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayTone  ClockAlarm
+STSSTIF PlayAlarm  ClockAlarm
 pause 5000
 STSSTIF Delete
 delete STSSTIF
@@ -74,7 +97,7 @@
 title 03 Play ClockAlarmContext Ringtone
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayToneWithContext ClockAlarm
+STSSTIF PlayAlarm ClockAlarm
 pause 10000
 STSSTIF Delete
 delete STSSTIF
@@ -84,9 +107,9 @@
 title 04 Stop ClockAlarm with recognized Context
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayToneWithContext ClockAlarm
+STSSTIF PlayAlarm ClockAlarm
 pause 10000
-STSSTIF StopTone True
+STSSTIF StopAlarm True
 pause 5000
 STSSTIF Delete
 delete STSSTIF
@@ -97,9 +120,9 @@
 title 05 Stop ClockAlarm with non-recognized Context
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayToneWithContext ClockAlarm
+STSSTIF PlayAlarm ClockAlarm
 pause 10000
-STSSTIF StopTone False
+STSSTIF StopAlarm False
 pause 5000
 STSSTIF Delete
 delete STSSTIF
@@ -110,11 +133,11 @@
 title 06 Play two tones
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayToneWithContext ClockAlarm
+STSSTIF PlayAlarm ClockAlarm
 pause 10000
 STSSTIF PlayTone CalendarAlarm
 pause 10000
-STSSTIF StopTone True
+STSSTIF StopAlarm True
 STSSTIF Delete
 delete STSSTIF
 [Endtest]
@@ -124,10 +147,10 @@
 title 07 Stop tone after tone complete
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayToneWithContext ClockAlarm
+STSSTIF PlayAlarm ClockAlarm
 pause 10000
-STSSTIF StopTone True
-STSSTIF StopTone True
+STSSTIF StopAlarm True
+STSSTIF StopAlarm True
 STSSTIF Delete
 delete STSSTIF
 [Endtest]
\ No newline at end of file
--- a/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif_calendaralarm.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif_calendaralarm.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -13,13 +13,13 @@
 //
 
 
-
 [Test]
 title 1.1 Test CalendarAlarm Ringtone
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayTone  CalendarAlarm
+STSSTIF PlayAlarm  CalendarAlarm
 pause 5000
+STSSTIF StopAlarm  True
 STSSTIF Delete
 delete STSSTIF
 [Endtest]
@@ -29,9 +29,11 @@
 title 1.2 Test CalendarAlarmContext Ringtone
 create systemtoneservicestif STSSTIF
 STSSTIF Create
-STSSTIF PlayToneWithContext  CalendarAlarm
-pause 2000
-STSSTIF StopTone True
+request Event_PlayAlarmComplete
+STSSTIF PlayAlarm  CalendarAlarm
+wait Event_PlayAlarmComplete
+release Event_PlayAlarmComplete
+STSSTIF StopAlarm
 STSSTIF Delete
 delete STSSTIF
 [Endtest]
--- a/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif_common.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif_common.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -13,44 +13,51 @@
 //
 
 [Define]
-CalendarAlarm 								1
-ClockAlarm 							 	2
-ToDoAlarm 								3
-BurstMode 			  					4097
-Capture  								4098
-CallRecording  								4099
-RecordingStart  							4100
-RecordingStop  								4101
-SelfTimer  								4102
-ConfirmationBeep 							8193
-DefaultBeep   								8194
-ErrorBeep  								8195
-InformationBeep  							8196
-WarningBeep  								8197
-IntegratedHandsFreeActivated 						8198
-TouchScreen  								12289
-LocationRequest  							16395
-ChatAlert  								20481
-EmailAlert  								20482
-MmsAlert  								20483
-SmsAlert  								20484
-DeliveryReport  							20485
-MessageSendFailure  							20486
-BatteryLow  								24577
-BatteryRecharged 							24578
-PowerOn  								24579
-PowerOff  								24580
-WakeUp  								24581
-WrongCharger  								24582
-IncomingCall  								28673
-IncomingCallLine2  							28674
-IncomingDataCall  							28675
-AutomaticRedialComplete  						28676
-VoiceStart  								32769
-VoiceError  								32770
-VoiceAbort  								32771
+CalendarAlarm 									32769			
+ClockAlarm 											32770			
+ToDoAlarm 											32771			
+
+BurstMode 			  							1			
+Capture  												2			
+CallRecording  									3			
+RecordingStart  								4			
+RecordingStop  									5			
+SelfTimer  											6			
+
+ConfirmationBeep 								257			
+DefaultBeep   									258			
+ErrorBeep  											259			
+InformationBeep  								260			
+WarningBeep  										261			
+IntegratedHandsFreeActivated 		262
+
+TouchScreen  									  513
+
+LocationRequest  							  769 
+
+ChatAlert  										  1025
+EmailAlert  									  1026
+MmsAlert  										  1027
+SmsAlert  										  1028
+DeliveryReport  							  1029
+MessageSendFailure  					  1030 
+
+BatteryLow  									  1281
+BatteryRecharged 							  1282
+PowerOn  											  1283
+PowerOff  										  1284
+WakeUp  											  1285
+WrongCharger  								  1286
+
+IncomingCall  								  33025
+IncomingCallLine2  						  33026 
+IncomingDataCall  						  33027
+
+AutomaticRedialComplete  			  1540
+
+VoiceStart  									  1793 
+VoiceError  									  1794
+VoiceAbort  									  1795
 [Enddefine]
 
 
-
-
--- a/mmmw_plat/system_tone_service_api/tsrc/group/systemtoneservicestif.mmp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/group/systemtoneservicestif.mmp	Fri Apr 30 19:18:45 2010 -0500
@@ -46,7 +46,7 @@
 SOURCEPATH      ../src
 
 SOURCE          systemtoneservicestif.cpp
-SOURCE          systemtoneservicestifBlocks.cpp
+SOURCE          systemtoneservicestifblocks.cpp
 
 
 LIBRARY         euser.lib
--- a/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h	Fri Apr 30 19:18:45 2010 -0500
@@ -23,6 +23,7 @@
 #include <TestScripterInternal.h>
 #include <StifTestModule.h>
 #include <TestclassAssert.h>
+#include <systemtoneservice.h>
 
 
 // CONSTANTS
@@ -46,7 +47,7 @@
 // FORWARD DECLARATIONS
 
 class CSystemToneServiceStif;
-class CSystemToneService;
+
 
 enum TPlayState
     {
@@ -63,7 +64,7 @@
 *  CSystemToneServiceStif test class for STIF Test Framework TestScripter.
 
 */
-NONSHARABLE_CLASS(CSystemToneServiceStif) : public CScriptBase
+NONSHARABLE_CLASS(CSystemToneServiceStif) : public CScriptBase, MStsPlayAlarmObserver
     {
     public:  // Constructors and destructor
 
@@ -128,15 +129,19 @@
       
         virtual TInt  DeleteSystemToneService(  );
         
-        virtual TInt  PlaySystemToneService( CStifItemParser& aItem);
+        virtual TInt  PlayTone( CStifItemParser& aItem);
         
-        virtual TInt  PlaySystemToneServiceWithContext( CStifItemParser& aItem );
+        virtual TInt  PlayAlarm( CStifItemParser& aItem );
         
-        virtual TInt  StopSystemToneService( CStifItemParser& aItem  );
+        virtual TInt  StopAlarm( CStifItemParser& aItem );
 
 
 
-    private:    // Data
+    private:  
+    	 // inherited from MPlayAlarmObserver
+       virtual void PlayAlarmComplete(unsigned int aAlarmContext);
+    	
+    	  // Data
         TPlayState            iPlayState;
         CSystemToneService*   iSts;
         TUint                 iCurrentContext;
--- a/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -19,7 +19,7 @@
 #include <e32svr.h>
 #include <StifParser.h>
 #include <StifTestInterface.h>
-#include <systemtoneservice.h>
+#include <StifTestEventInterface.h>
 #include "systemtoneservicestif.h"
 
 
@@ -34,9 +34,9 @@
         // Second is the actual implementation member function.
         ENTRY( "Create", CSystemToneServiceStif::CreateSystemToneService ),
         ENTRY( "Delete", CSystemToneServiceStif::DeleteSystemToneService ),
-        ENTRY( "PlayTone", CSystemToneServiceStif::PlaySystemToneService ),
-        ENTRY( "PlayToneWithContext", CSystemToneServiceStif::PlaySystemToneServiceWithContext ),
-        ENTRY( "StopTone", CSystemToneServiceStif::StopSystemToneService ),
+        ENTRY( "PlayTone", CSystemToneServiceStif::PlayTone ),
+        ENTRY( "PlayAlarm", CSystemToneServiceStif::PlayAlarm ),
+        ENTRY( "StopAlarm", CSystemToneServiceStif::StopAlarm ),
         
 
 
@@ -119,7 +119,7 @@
     }
     
     
-TInt CSystemToneServiceStif::PlaySystemToneService( CStifItemParser& aItem )
+TInt CSystemToneServiceStif::PlayTone( CStifItemParser& aItem )
     {
         // Print to UI
             _LIT( Ksystemtoneservicestif, "systemtoneservicestif" );
@@ -150,7 +150,7 @@
 }
 
 
-TInt CSystemToneServiceStif::PlaySystemToneServiceWithContext( CStifItemParser& aItem )
+TInt CSystemToneServiceStif::PlayAlarm( CStifItemParser& aItem )
     {
         // Print to UI
             _LIT( Ksystemtoneservicestif, "systemtoneservicestif" );
@@ -160,22 +160,22 @@
             iLog->Log( KPrint );
             
                TInt lRetVal = KErrNone;
-               TInt toneType = 0;
+               TInt alarmType = 0;
 
-               lRetVal = aItem.GetNextInt(toneType);
+               lRetVal = aItem.GetNextInt(alarmType);
 
                if ( lRetVal != KErrNone )
                 {
                    iLog->Log(_L("CSystemToneServiceStif::PlaySystemToneService tone type missing in config file "));
                    iLog->Log(_L("Playing Default Tone"));
                    
-            iSts->PlayTone(CSystemToneService::EDefaultBeep, iCurrentContext);
+            iSts->PlayAlarm(CSystemToneService::EClockAlarm, iCurrentContext, *this);
         }
 			  else
         {
             //iSts->PlayTone(CSystemToneService::EClockAlarm, iCurrentContext);
-            iSts->PlayTone(CSystemToneService::TToneType(toneType), iCurrentContext);
-            iLog->Log(_L("CSystemToneService::TToneType(toneType) %d"),CSystemToneService::TToneType(toneType) );
+            iSts->PlayAlarm(CSystemToneService::TAlarmType(alarmType), iCurrentContext, *this);
+            iLog->Log(_L("CSystemToneService::TAlarmType(alarmType) %d"),CSystemToneService::TAlarmType(alarmType) );
         }
         
         return lRetVal;       
@@ -183,8 +183,15 @@
         }
 
 
-TInt  CSystemToneServiceStif::StopSystemToneService(CStifItemParser& aItem  )
+TInt  CSystemToneServiceStif::StopAlarm(CStifItemParser& aItem  )
     {
+    // Print to UI
+          _LIT( Ksystemtoneservicestif, "systemtoneservicestif" );
+          _LIT( KPrint, "In StopSystemToneService" );
+          TestModuleIf().Printf( 0, Ksystemtoneservicestif, KPrint );
+          // Print to log file
+          iLog->Log( KPrint );
+          
     TPtrC StopType;
 		TInt error = KErrNone;
 		
@@ -195,15 +202,26 @@
     {
 				iLog->Log(_L("Stop Tone with recognized context number"));
           
-        iSts->StopTone(iCurrentContext);
+        iSts->StopAlarm(iCurrentContext);
 		}
 		else
 		{
 		    iLog->Log(_L("Stop Tone with unrecognized context number"));
           
-        iSts->StopTone(iCurrentContext+1);
+        iSts->StopAlarm(iCurrentContext+1);
     }
     
     return error;
 }
+    
+void CSystemToneServiceStif::PlayAlarmComplete(unsigned int aAlarmContext)
+    {
+    if (aAlarmContext == iCurrentContext)
+        {
+        iPlayState = EStopped;
+        TEventIf event( TEventIf::ESetEvent, _L("Event_PlayAlarmComplete") );
+        TestModuleIf().Event( event );
+        
+        }
+    }  
 
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmssource.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmssource.h	Fri Apr 30 19:18:45 2010 -0500
@@ -48,22 +48,6 @@
     virtual gint GetType(TMSSourceType& sourcetype) = 0;
     };
 
-/*class TMSDeviceMic:public TMSSource
-    {
-public:
-    virtual gint GetType(TMSSourceType& sourcetype){return iSourceType};
-private:
-    TMSSourceType iSourceType;
-    };*/
-
-/*class TMSModem:public TMSSource
-    {
-public:
-    virtual gint GetType(TMSSourceType& sourcetype){return iSourceType};
-private:
-    TMSSourceType iSourceType;
-    };*/
-
 } //namespace TMS
 
 #endif //TMS_SOURCE_H
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/Conf/TMSAudioServicesTestClass.cfg	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/Conf/TMSAudioServicesTestClass.cfg	Fri Apr 30 19:18:45 2010 -0500
@@ -700,12 +700,12 @@
 Tms CreateDownlinkStream
 Tms CreateEffect 9
 allownextresult TMS_RESULT_DOES_NOT_EXIST
-Tms RemoveGlobleVolumeEffectToStream
-Tms AddGlobleVolumeEffectToStream
+Tms RemoveGlobalVolumeEffectToStream
+Tms AddGlobalVolumeEffectToStream
 allownextresult TMS_RESULT_ALREADY_EXIST
-Tms AddGlobleVolumeEffectToStream
-Tms RemoveGlobleVolumeEffectToStream
-Tms AddGlobleVolumeEffectToStream
+Tms AddGlobalVolumeEffectToStream
+Tms RemoveGlobalVolumeEffectToStream
+Tms AddGlobalVolumeEffectToStream
 delete Tms
 [Endtest]
 
@@ -717,12 +717,12 @@
 Tms CreateUplinkStream
 Tms CreateEffect 10
 allownextresult TMS_RESULT_DOES_NOT_EXIST
-Tms RemoveGlobleGainEffectToStream
-Tms AddGlobleGainEffectToStream
+Tms RemoveGlobalGainEffectToStream
+Tms AddGlobalGainEffectToStream
 allownextresult TMS_RESULT_ALREADY_EXIST
-Tms AddGlobleGainEffectToStream
-Tms RemoveGlobleGainEffectToStream
-Tms AddGlobleGainEffectToStream
+Tms AddGlobalGainEffectToStream
+Tms RemoveGlobalGainEffectToStream
+Tms AddGlobalGainEffectToStream
 delete Tms
 [Endtest]
 
@@ -1702,25 +1702,407 @@
 delete Tms
 [Endtest]
 
-//[Test]
-//title  09. TMSCall - 01. Create and Delete DTMF Dnlink
-//create TmsAudioServicesTestClass Tms
-//Tms CreateFactory
-//Tms CreateCall 2
-//allownextresult TMS_RESULT_FEATURE_NOT_SUPPORTED
-//Tms CreateDTMFTonePlayer Dnlink
-//Tms DeleteDTMFTonePlayer Dnlink
-//delete Tms
-//[Endtest]
+[Test]
+title  10. TMSRingTone - 01. CreateRingTonePlayer
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 02. InitRingTonePlayer - Default
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTDefault
+waittestclass Tms
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 03. InitRingTonePlayer - File
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTFile
+waittestclass Tms
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 04. PlayRingTone - Default
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTDefault
+waittestclass Tms
+Tms PlayRingTone
+waittestclass Tms
+Tms StopRingTone
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 05. PlayRingTone - File
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTFile
+waittestclass Tms
+Tms PlayRingTone
+waittestclass Tms
+Tms MuteRingTone
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 06. PlayRingTone - BeepOnce
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTBeepOnce
+waittestclass Tms
+Tms PlayRingTone
+waittestclass Tms
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 07. PlayRingTone - Silent
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTSilent
+waittestclass Tms
+Tms PlayRingTone
+waittestclass Tms
+Tms StopRingTone
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 08. PlayRingTone - UnsecureVoIP
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTUnsecureVoIP
+waittestclass Tms
+Tms PlayRingTone
+waittestclass Tms
+Tms MuteRingTone
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 09. PlayRingTone - Sequence
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTSequence
+waittestclass Tms
+Tms PlayRingTone
+waittestclass Tms
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 10. PlayRingTone - TTS
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTTts
+waittestclass Tms
+Tms PlayRingTone
+waittestclass Tms
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  10. TMSRingTone - 11. PlayRingTone - Play BKP tone
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateRingTonePlayer
+Tms InitRingTonePlayer RTSequence
+waittestclass Tms
+Tms PlayRingToneNoEvent
+Tms PauseRingTone   //will cancel sequence RT
+Tms PlayRingTone    //will play default RT
+waittestclass Tms
+Tms CloseRingTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 01. CreateInbandTonePlayer
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 02. StartInbandTone - UserBusy
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone UserBusy
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 03. StartInbandTone - RadioPathNotFound
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone RadioPathNotFound
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 04. StartInbandTone - Congestion
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone Congestion
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 05. StartInbandTone - SpecialInfo
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone SpecialInfo
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
 
-//[Test]
-//title  09. TMSCall - 02. Create and Delete DTMF Uplink
-//create TmsAudioServicesTestClass Tms
-//Tms CreateFactory
-//Tms CreateCall 2
-//allownextresult TMS_RESULT_FEATURE_NOT_SUPPORTED
-//Tms CreateDTMFTonePlayer Uplink
-//Tms DeleteDTMFTonePlayer Uplink
-//delete Tms
-//[Endtest]
+[Test]
+title  11. TMSInbandTone - 06. StartInbandTone - Reorder
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone Reorder
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 07. StartInbandTone - Alerting
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone Alerting
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 08. StartInbandTone - Waiting
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone Waiting
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 09. StartInbandTone - DataCall
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone DataCall
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 10. StartInbandTone - NoSequence
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone NoSequence
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  11. TMSInbandTone - 11. StartInbandTone - BeepSequence
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateInbandTonePlayer
+Tms StartInbandTone BeepSequence
+waittestclass Tms
+Tms StopInbandTone
+Tms CloseInbandTonePlayer
+delete Tms
+[Endtest]
+
+[Test]
+title  12. TMSDTMFTone - 01. CreateDTMFTonePlayer Dnlink
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateDTMFTonePlayer Dnlink
+Tms CloseDTMFPlayer Dnlink
+delete Tms
+[Endtest]
+
+[Test]
+title  12. TMSDTMFTone - 02. CreateDTMFTonePlayer Uplink
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateDTMFTonePlayer Uplink
+Tms CloseDTMFPlayer Uplink
+delete Tms
+[Endtest]
 
+[Test]
+title  12. TMSDTMFTone - 03. DTMFTonePlay - Dnlink IP
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateCall 2
+Tms CreateDownlinkStream
+Tms CreateFormat PCM16 Dnlink
+Tms SetDownlinkFormat
+Tms CreateSource 3  //CLIENT
+Tms AddSourceObserver
+Tms AddClientSrcToDnlStream
+Tms CreateSink 8    //SPKR
+Tms AddSinkObserver
+Tms AddSpkrSinkToDnlStream
+Tms OpenDownlink
+waittestclass Tms
+Tms CreateDTMFTonePlayer Dnlink
+Tms DTMFTonePlay Dnlink
+waittestclass Tms
+Tms StopDTMFTonePlayer Dnlink
+Tms CloseDTMFPlayer Dnlink
+Tms RemoveSinkObserver
+Tms RemoveSourceObserver
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveClientSrcFromDnlStream
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveSpkrSinkFromDnlStream
+Tms Close Dnlink
+delete Tms
+[Endtest]
+
+[Test]
+title  12. TMSDTMFTone - 04. DTMFTonePlay - Uplink IP
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateCall 2
+Tms CreateUplinkStream
+Tms CreateFormat PCM16
+Tms SetUplinkFormat
+Tms CreateSource 5  //MIC
+Tms AddMicSrcToUplStream
+Tms CreateSink 6    //CLIENT
+Tms AddClientSinkToUplStream
+Tms OpenUplink
+waittestclass Tms
+Tms CreateDTMFTonePlayer Uplink
+allownextresult TMS_RESULT_FEATURE_NOT_SUPPORTED
+Tms ContinueDTMFStringSending Uplink
+Tms DTMFTonePlay Uplink
+waittestclass Tms
+Tms StopDTMFTonePlayer Uplink
+Tms CloseDTMFPlayer Uplink
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveMicSrcFromUplStream
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveClientSinkFromUplStream
+Tms Close Uplink
+delete Tms
+[Endtest]
+
+[Test]
+title  12. TMSDTMFTone - 05. DTMFTonePlay - Dnlink CS
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateCall 0    //CS
+Tms CreateDownlinkStream
+Tms CreateSource 4  //MODEM
+Tms AddModemSrcToDnlStream
+Tms CreateSink 8    //SPKR
+Tms AddSpkrSinkToDnlStream
+Tms OpenDownlink
+waittestclass Tms
+Tms CreateDTMFTonePlayer Dnlink
+Tms DTMFTonePlay Dnlink
+waittestclass Tms
+Tms StopDTMFTonePlayer Dnlink
+Tms CloseDTMFPlayer Dnlink
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveModemSrcFromDnlStream
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveSpkrSinkFromDnlStream
+Tms Close Dnlink
+delete Tms
+[Endtest]
+
+[Test]
+title  12. TMSDTMFTone - 06. DTMFTonePlay - Uplink CS
+create TmsAudioServicesTestClass Tms
+Tms CreateFactory
+Tms CreateCall 0    //CS
+Tms CreateUplinkStream
+Tms CreateSource 5  //MIC
+Tms AddMicSrcToUplStream
+Tms CreateSink 7    //MODEM
+Tms AddModemSinkToUplStream
+Tms OpenUplink
+waittestclass Tms
+Tms CreateDTMFTonePlayer Uplink
+Tms DTMFTonePlay Uplink
+waittestclass Tms
+Tms StopDTMFTonePlayer Uplink
+Tms CloseDTMFPlayer Uplink
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveMicSrcFromUplStream
+//Client must call DeInit() otherwise return TMS_RESULT_INVALID_STATE
+allownextresult TMS_RESULT_INVALID_STATE
+Tms RemoveModemSinkFromUplStream
+Tms Close Uplink
+delete Tms
+[Endtest]
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/inc/TMSAudioServicesTestClass.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/inc/TMSAudioServicesTestClass.h	Fri Apr 30 19:18:45 2010 -0500
@@ -31,8 +31,6 @@
 #include <tmscall.h>
 #include <tmsstream.h>
 #include <tmsformat.h>
-#include <tmsdtmf.h>
-#include <tmsringtone.h>
 #include <tmsclientsink.h>
 #include <tmsclientsource.h>
 #include <tmsclientsourceobsrvr.h>
@@ -51,6 +49,12 @@
 #include <tmsilbcformat.h>
 #include <tmspcmformat.h>
 #include <tmsamrformat.h>
+#include <tmsdtmf.h>
+#include <tmsdtmfobsrvr.h>
+#include <tmsringtone.h>
+#include <tmsringtoneobsrvr.h>
+#include <tmsinbandtone.h>
+#include <tmsinbandtoneobsrvr.h>
 
 #include "TimeoutController.h"
 
@@ -63,6 +67,7 @@
 const TInt KErrUnexpectedValue = -2002; // Unexpected value at setting
 const TInt KErrTimeoutController = -2007; // Unexpected notification
 
+const TInt KMicroTimeout = 1000;
 const TInt KShortTimeout = 2000;
 const TInt KMediumTimeout = 10000;
 const TInt KLongTimeout = 100000;
@@ -105,20 +110,43 @@
 _LIT( KTagPublic, "Public");
 _LIT( KTagPrivate, "Private");
 
+_LIT( KTagRTDefault, "RTDefault");
+_LIT( KTagRTFile, "RTFile");
+_LIT( KTagRTBeepOnce, "RTBeepOnce");
+_LIT( KTagRTSilent, "RTSilent");
+_LIT( KTagRTUnsecureVoIP, "RTUnsecureVoIP");
+_LIT( KTagRTSequence, "RTSequence");
+_LIT( KTagRTTts, "RTTts");
+
+_LIT( KTagUserBusy, "UserBusy" );
+_LIT( KTagRadioPathNotFound, "RadioPathNotFound" );
+_LIT( KTagCongestion, "Congestion" );
+_LIT( KTagSpecialInfo, "SpecialInfo" );
+_LIT( KTagReorder, "Reorder" );
+_LIT( KTagAlerting, "Alerting" );
+_LIT( KTagWaiting, "Waiting" );
+_LIT( KTagDataCall, "DataCall" );
+_LIT( KTagNoSequence, "NoSequence" );
+_LIT( KTagBeepSequence, "BeepSequence" );
+
 // MACROS
-//#define ?macro ?macro_def
-// Logging path
+
 #ifdef __WINSCW__
 _LIT( KTmsAudioServicesTestClassLogPath, "\\logs\\testframework\\" );
 _LIT16(KTestFile1, "\\testing\\data\\alarm 1.aac");
 _LIT16(KTestFile2, "\\testing\\data\\alarm.aac");
-_LIT16(KTestFile3, "\\testing\\data\\test_8khz.wav");
+//_LIT16(KTestFile3, "\\testing\\data\\test_8khz.wav");
+_LIT16(KTestFile3, "c:\\data\\sounds\\digital\\test_8khz.wav");
 #else
 _LIT( KTmsAudioServicesTestClassLogPath, "c:\\testing\\Log\\" );
 _LIT16(KTestFile1, "c:\\testing\\data\\alarm 1.aac");
 _LIT16(KTestFile2, "c:\\testing\\data\\alarm.aac");
-_LIT16(KTestFile3, "c:\\testing\\data\\test_8khz.wav");
+//_LIT16(KTestFile3, "c:\\testing\\data\\test_8khz.wav");
+_LIT16(KTestFile3, "c:\\data\\sounds\\digital\\test_8khz.wav");
 #endif
+_LIT8(KRTBeepSequence, "\x00\x11\x0A\x0A\x08\x73\x0A\x40\x28\x0A\xF7\
+\x05\xFC\x40\x64\x0A\x08\x40\x32\x0A\xF7\x06\x0B");
+_LIT16(KTextToSpeak, "THE PHONE IS RINGING");
 
 // Log file
 _LIT( KTmsAudioServicesTestClassLogFile, "CTmsAudioServicesTestClass.txt" );
@@ -150,7 +178,10 @@
     public TMSClientSourceObserver,
     public TMSClientSinkObserver,
     public TMSEffectObserver,
-    public TMSGlobalRoutingObserver
+    public TMSGlobalRoutingObserver,
+    public TMSRingToneObserver,
+    public TMSDTMFObserver,
+    public TMSInbandToneObserver
     {
     enum StreamState
         {
@@ -188,6 +219,13 @@
         EFillBuffer,
         EOutputChanged,
         ESetOutputComplete,
+        ERTInitComplete,
+        ERTPlayComplete,
+        ERTDeinitComplete,
+        EInbToneStarted,
+        EInbToneStopped,
+        EDTMFToneStarted,
+        EDTMFToneStopped
         };
 
 public:
@@ -227,6 +265,15 @@
     void GlobalRoutingEvent(const TMSGlobalRouting& /*routing*/,
             TMSSignalEvent event, TMSAudioOutput output);
 
+    // from TMSRingToneObserver
+    void RingtoneEvent(const TMSRingTone& rt, TMSSignalEvent event);
+
+    // from TMSDTMFObserver
+    void DTMFEvent(const TMSDTMF& dtmf, TMSSignalEvent event);
+
+    // from TMSInbandToneObserver
+    void InbandToneEvent(const TMSInbandTone& inbandtone, TMSSignalEvent event);
+
 private:
 
     /**
@@ -333,10 +380,8 @@
     TInt GetDownlinkVersion(CStifItemParser& aItem);
     TInt CreateUplinkStream(CStifItemParser& aItem);
     TInt GetUplinkVersion(CStifItemParser& aItem);
-    TInt CreateDTMFTonePlayer(CStifItemParser& aItem);
-    TInt DeleteDTMFTonePlayer(CStifItemParser& aItem);
-    TInt CreateRingTonePlayer(CStifItemParser& aItem);
     TInt GetSupportedFormats(CStifItemParser& aItem);
+
     TInt IsCallTypeSupported(CStifItemParser& aItem);
     TInt SetDownlinkFormat(CStifItemParser& aItem);
     TInt SetUplinkFormat(CStifItemParser& aItem);
@@ -352,18 +397,25 @@
     TInt Gain(CStifItemParser& aItem);
     TInt Volume(CStifItemParser& aItem);
 
-    TInt InitDTMFTonePlayer(CStifItemParser& aItem);
+    TInt CreateDTMFTonePlayer(CStifItemParser& aItem);
     TInt DTMFTonePlay(CStifItemParser& aItem);
+    TInt StopDTMFTonePlayer(CStifItemParser& aItem);
+    TInt ContinueDTMFStringSending(CStifItemParser& aItem);
     TInt CloseDTMFPlayer(CStifItemParser& aItem);
-    TInt StopDTMFTonePlayer(CStifItemParser& aItem);
 
+    TInt CreateRingTonePlayer(CStifItemParser& aItem);
     TInt InitRingTonePlayer(CStifItemParser& aItem);
+    TInt PlayRingTone(CStifItemParser& aItem);
+    TInt PlayRingToneNoEvent(CStifItemParser& aItem);
+    TInt PauseRingTone(CStifItemParser& aItem); //IP video call only (10.2)
+    TInt StopRingTone(CStifItemParser& aItem);
+    TInt MuteRingTone(CStifItemParser& aItem);
     TInt CloseRingTonePlayer(CStifItemParser& aItem);
-    TInt PlayRingTone(CStifItemParser& aItem);
-    TInt PauseRingTone(CStifItemParser& aItem);
-    TInt ResumeRingTone(CStifItemParser& aItem);
-    TInt StopRingTone(CStifItemParser& aItem);
-    TInt GetBufferType(CStifItemParser& aItem);
+
+    TInt CreateInbandTonePlayer(CStifItemParser& aItem);
+    TInt StartInbandTone(CStifItemParser& aItem);
+    TInt StopInbandTone(CStifItemParser& aItem);
+    TInt CloseInbandTonePlayer(CStifItemParser& aItem);
 
     //  TInt GetSupportedBitrates( CStifItemParser& aItem );
 
@@ -385,6 +437,7 @@
     void DisplayFormat(TMSFormatType aFormat);
     void GetSupportedBitrates(RArray<TUint>& aBrArr);
     void DisplayDevice(TMSAudioOutput device);
+    TInt GetBufferType(CStifItemParser& aItem);
 
     TInt ConfigEncAudDevice(CStifItemParser& aItem);
 
@@ -407,15 +460,15 @@
     TInt RemoveSinkObserver(CStifItemParser& aItem);
 
     gint CreateVolumeEffect();
-    gint CreateVolumeGlobleEffect();
+    gint CreateVolumeGlobalEffect();
     TInt AddVolumeEffectToStream(CStifItemParser& aItem);
-    TInt AddGlobleVolumeEffectToStream(CStifItemParser& aItem);
-    TInt RemoveGlobleVolumeEffectToStream(CStifItemParser& aItem);
+    TInt AddGlobalVolumeEffectToStream(CStifItemParser& aItem);
+    TInt RemoveGlobalVolumeEffectToStream(CStifItemParser& aItem);
     gint CreateGainEffect();
-    gint CreateGlobleGainEffect();
+    gint CreateGlobalGainEffect();
     TInt AddGainEffectToStream(CStifItemParser& aItem);
-    TInt AddGlobleGainEffectToStream(CStifItemParser& aItem);
-    TInt RemoveGlobleGainEffectToStream(CStifItemParser& aItem);
+    TInt AddGlobalGainEffectToStream(CStifItemParser& aItem);
+    TInt RemoveGlobalGainEffectToStream(CStifItemParser& aItem);
     TInt GetStreamType(CStifItemParser& aItem);
     TInt GetStreamState(CStifItemParser& aItem);
 
@@ -439,6 +492,7 @@
     TMSDTMF* iDTMFTonePlayerDn;
     TMSDTMF* iDTMFTonePlayerUp;
     TMSRingTone* iRingTonePlayer;
+    TMSInbandTone* iInbandTonePlayer;
     TMSAudioOutput iDevice;
 
     // Codec format APIs
@@ -486,8 +540,8 @@
     TBool iRecBufReady;
 
     // For ring tone playback
-    RFile iRTFile;
-    RFs iFs;
+    GString* iRTStr;
+    GString* iTTSStr;
 
     // Active object with a timer to timeout the test case
     CSimpleTimeout * iTimeoutController;
@@ -502,7 +556,6 @@
     RArray<TTmsExpectedEvent> iOcurredEvents;
 
     CActiveSchedulerWait* iActive;
-
     };
 
 #endif //__TMSAUDIOSERVICESTESTCLASS_H
Binary file mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/sis/TmsAudioServicesTestClass.sis has changed
Binary file mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/sis/TmsAudioServicesTestClass.sisx has changed
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocks.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocks.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -119,6 +119,7 @@
     delete iRingTonePlayer;
     delete iDTMFTonePlayerDn;
     delete iDTMFTonePlayerUp;
+    delete iInbandTonePlayer;
 
     // delete iPlayBuf;
 
@@ -152,8 +153,7 @@
 //
 TInt CTmsAudioServicesTestClass::RunMethodL(CStifItemParser& aItem)
     {
-    static TStifFunctionInfo const
-    KFunctions[] =
+    static TStifFunctionInfo const KFunctions[] =
         {
         // Copy this line for every implemented function.
         // First string is the function name used in TestScripter script file.
@@ -175,9 +175,6 @@
         ENTRY( "GetEffectType", CTmsAudioServicesTestClass::GetEffectType ),
         ENTRY( "CreateDownlinkStream", CTmsAudioServicesTestClass::CreateDownlinkStream ),
         ENTRY( "CreateUplinkStream", CTmsAudioServicesTestClass::CreateUplinkStream ),
-        ENTRY( "CreateDTMFTonePlayer", CTmsAudioServicesTestClass::CreateDTMFTonePlayer ),
-        ENTRY( "DeleteDTMFTonePlayer", CTmsAudioServicesTestClass::DeleteDTMFTonePlayer ),
-        ENTRY( "CreateRingTonePlayer", CTmsAudioServicesTestClass::CreateRingTonePlayer ),
         ENTRY( "GetSupportedFormats", CTmsAudioServicesTestClass::GetSupportedFormats ),
         ENTRY( "IsCallTypeSupported", CTmsAudioServicesTestClass::IsCallTypeSupported ),
         ENTRY( "SetDownlinkFormat", CTmsAudioServicesTestClass::SetDownlinkFormat ),
@@ -187,12 +184,12 @@
         ENTRY( "OpenDownlink", CTmsAudioServicesTestClass::OpenDownlink ),
         ENTRY( "OpenUplink", CTmsAudioServicesTestClass::OpenUplink ),
         ENTRY( "Gain", CTmsAudioServicesTestClass::Gain ),
-        ENTRY( "AddGlobleGainEffectToStream", CTmsAudioServicesTestClass::AddGlobleGainEffectToStream),
-        ENTRY( "RemoveGlobleGainEffectToStream", CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream),
+        ENTRY( "AddGlobalGainEffectToStream", CTmsAudioServicesTestClass::AddGlobalGainEffectToStream),
+        ENTRY( "RemoveGlobalGainEffectToStream", CTmsAudioServicesTestClass::RemoveGlobalGainEffectToStream),
         ENTRY( "Volume", CTmsAudioServicesTestClass::Volume ),
-        ENTRY( "AddGlobleVolumeEffectToStream", CTmsAudioServicesTestClass::AddGlobleVolumeEffectToStream),
-        ENTRY( "RemoveGlobleVolumeEffectToStream", CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream),
-        ENTRY( "CreateGlobleGainEffect", CTmsAudioServicesTestClass::CreateGlobleGainEffect),
+        ENTRY( "AddGlobalVolumeEffectToStream", CTmsAudioServicesTestClass::AddGlobalVolumeEffectToStream),
+        ENTRY( "RemoveGlobalVolumeEffectToStream", CTmsAudioServicesTestClass::RemoveGlobalVolumeEffectToStream),
+        ENTRY( "CreateGlobalGainEffect", CTmsAudioServicesTestClass::CreateGlobalGainEffect),
         ENTRY( "Close", CTmsAudioServicesTestClass::Close ),
         ENTRY( "Start", CTmsAudioServicesTestClass::Start ),
         ENTRY( "Pause", CTmsAudioServicesTestClass::Pause ),
@@ -200,18 +197,25 @@
         ENTRY( "GetBitRateList", CTmsAudioServicesTestClass::GetBitRateList ),
         ENTRY( "SetBitrates", CTmsAudioServicesTestClass::SetBitrates ),
         ENTRY( "GetBitrates", CTmsAudioServicesTestClass::GetBitrates ),
-        ENTRY( "InitDTMFTonePlayer", CTmsAudioServicesTestClass::InitDTMFTonePlayer ),
+        ENTRY( "CreateDTMFTonePlayer", CTmsAudioServicesTestClass::CreateDTMFTonePlayer ),
         ENTRY( "DTMFTonePlay", CTmsAudioServicesTestClass::DTMFTonePlay ),
+        ENTRY( "StopDTMFTonePlayer", CTmsAudioServicesTestClass::StopDTMFTonePlayer ),
+        ENTRY( "ContinueDTMFStringSending", CTmsAudioServicesTestClass::ContinueDTMFStringSending ),
         ENTRY( "CloseDTMFPlayer", CTmsAudioServicesTestClass::CloseDTMFPlayer ),
-        ENTRY( "StopDTMFPlayer", CTmsAudioServicesTestClass::StopDTMFTonePlayer ),
+        ENTRY( "CreateRingTonePlayer", CTmsAudioServicesTestClass::CreateRingTonePlayer ),
+        ENTRY( "InitRingTonePlayer", CTmsAudioServicesTestClass::InitRingTonePlayer ),
+        ENTRY( "PlayRingTone", CTmsAudioServicesTestClass::PlayRingTone ),
+        ENTRY( "PlayRingToneNoEvent", CTmsAudioServicesTestClass::PlayRingToneNoEvent ),
+        ENTRY( "PauseRingTone", CTmsAudioServicesTestClass::PauseRingTone ),
+        ENTRY( "MuteRingTone", CTmsAudioServicesTestClass::MuteRingTone ),
+        ENTRY( "StopRingTone", CTmsAudioServicesTestClass::StopRingTone ),
+        ENTRY( "CloseRingTonePlayer", CTmsAudioServicesTestClass::CloseRingTonePlayer ),
+        ENTRY( "CreateInbandTonePlayer", CTmsAudioServicesTestClass::CreateInbandTonePlayer ),
+        ENTRY( "StartInbandTone", CTmsAudioServicesTestClass::StartInbandTone ),
+        ENTRY( "StopInbandTone", CTmsAudioServicesTestClass::StopInbandTone ),
+        ENTRY( "CloseInbandTonePlayer", CTmsAudioServicesTestClass::CloseInbandTonePlayer ),
         ENTRY( "GetDownlinkVersion", CTmsAudioServicesTestClass::GetDownlinkVersion ),
         ENTRY( "GetUplinkVersion", CTmsAudioServicesTestClass::GetUplinkVersion ),
-        ENTRY( "InitRingTonePlayer", CTmsAudioServicesTestClass::InitRingTonePlayer ),
-        ENTRY( "CloseRingTonePlayer", CTmsAudioServicesTestClass::CloseRingTonePlayer ),
-        ENTRY( "PlayRingTone", CTmsAudioServicesTestClass::PlayRingTone ),
-        ENTRY( "PauseRingTone", CTmsAudioServicesTestClass::PauseRingTone ),
-        ENTRY( "ResumeRingTone", CTmsAudioServicesTestClass::ResumeRingTone ),
-        ENTRY( "StopRingTone", CTmsAudioServicesTestClass::StopRingTone ),
         ENTRY( "GetType", CTmsAudioServicesTestClass::GetType ),
         ENTRY( "GetVAD", CTmsAudioServicesTestClass::GetVAD ),
         ENTRY( "ToggleVAD", CTmsAudioServicesTestClass::ToggleVAD ),
@@ -276,6 +280,13 @@
         (TText*)L"EFillBuffer",
         (TText*)L"EOutputChanged",
         (TText*)L"ESetOutputComplete",
+        (TText*)L"ERTInitComplete",
+        (TText*)L"ERTPlayComplete",
+        (TText*)L"ERTDeinitComplete",
+        (TText*)L"EInbToneStarted",
+        (TText*)L"EInbToneStopped",
+        (TText*)L"EDTMFToneStarted",
+        (TText*)L"EDTMFToneStopped",
         };
 
     if( (TUint)aKey >= (sizeof( keywords )/sizeof(TText*)) )
@@ -692,8 +703,8 @@
                 break;
             case TMS_EFFECT_GLOBAL_VOL:
                 {
-                error = CreateVolumeGlobleEffect();
-                //       AddGlobleVolumeEffectToStream();
+                error = CreateVolumeGlobalEffect();
+                //       AddGlobalVolumeEffectToStream();
                 }
                 break;
             case TMS_EFFECT_GAIN:
@@ -704,8 +715,8 @@
                 break;
             case TMS_EFFECT_GLOBAL_GAIN:
                 {
-                error = CreateGlobleGainEffect();
-                //        AddGlobleGainEffectToStream();
+                error = CreateGlobalGainEffect();
+                //        AddGlobalGainEffectToStream();
                 }
                 break;
             default:
@@ -1051,7 +1062,8 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::CreateDownlinkStream(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::CreateDownlinkStream(
+        CStifItemParser& /*aItem*/)
     {
     FTRACE(FPrint(_L("CTmsAudioServicesTestClass::CreateDownlinkStream")));
     iLog->Log(_L("CTmsAudioServicesTestClass::CreateDownlinkStream"));
@@ -1099,88 +1111,6 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::CreateDTMFTonePlayer(CStifItemParser& aItem)
-    {
-    iLog->Log(_L("CTmsAudioServicesTestClass::CreateDTMFTonePlayer"));
-    TInt error = KErrNone;
-    TPtrC StreamType;
-    error = aItem.GetNextString(StreamType);
-
-    if (error == KErrNone)
-        {
-        if (StreamType == KTagDnlink)
-            {
-            if (iTmsCall)
-                {
-                error = iFactory->CreateDTMF(0, iDTMFTonePlayerDn);
-                FTRACE(FPrint(_L("CreateDTMF Error [%d]"),error));
-                }
-            }
-        else if (StreamType == KTagUplink)
-            {
-            if (iTmsCall)
-                {
-                error = iFactory->CreateDTMF(0, iDTMFTonePlayerUp);
-                }
-            }
-        else
-            {
-            iLog->Log(KMsgBadTestParameters);
-            error = KErrBadTestParameter;}
-        }
-    iLog->Log(_L("CTmsAudioServicesTestClass::CreateDTMFTonePlayer Error [%d]"),
-            error);
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::DeleteDTMFTonePlayer(CStifItemParser& aItem)
-    {
-    iLog->Log(_L("CTmsAudioServicesTestClass::DeleteDTMFTonePlayer"));
-    TInt error = KErrNone;
-    TPtrC StreamType;
-    error = aItem.GetNextString(StreamType);
-
-    if (error == KErrNone)
-        {
-        if (StreamType == KTagDnlink)
-            {
-            if (iTmsCall && iDTMFTonePlayerDn)
-                {
-                error = iFactory->DeleteDTMF(iDTMFTonePlayerDn);
-                FTRACE(FPrint(_L("DeleteDTMF Error [%d]"),error));
-                }
-            }
-        else if (StreamType == KTagUplink)
-            {
-            if (iTmsCall && iDTMFTonePlayerUp)
-                {
-                error = iFactory->DeleteDTMF(iDTMFTonePlayerUp);
-                }
-            }
-        else
-            {
-            iLog->Log(KMsgBadTestParameters);
-            error = KErrBadTestParameter;
-            }
-        }
-    iLog->Log(_L("CTmsAudioServicesTestClass::DeleteDTMFTonePlayer Error [%d]"),
-            error);
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::CreateRingTonePlayer(CStifItemParser& /*aItem */)
-    {
-    iLog->Log(_L("CTmsAudioServicesTestClass::CreateRingTonePlayer"));
-    TInt error = KErrNone;
-    if (iFactory)
-        {
-        error = iFactory->CreateRingTonePlayer(iRingTonePlayer);
-        }
-    iLog->Log(_L("CTmsAudioServicesTestClass::CreateRingTonePlayer Error [%d]"),
-            error);
-    return error;
-    }
-
 TInt CTmsAudioServicesTestClass::GetSupportedFormats(CStifItemParser& aItem)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::GetSupportedFormats"));
@@ -1295,8 +1225,7 @@
 
         if (error != KErrNone)
             {
-            iLog->Log(_L("CTmsAudioServicesTestClass::SetDownlinkFormat - failed, return error = %d" ),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetDownlinkFormat - failed, return error = %d" ), error);
             return error;
             }
         }
@@ -1320,8 +1249,7 @@
         error = iTmsDnlink->ResetFormat(iTmsFormatDn);
         if (error != KErrNone)
             {
-            iLog->Log(_L("CTmsAudioServicesTestClass::ReSetDownlinkFormat - failed, return error = %d" ),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::ReSetDownlinkFormat - failed, return error = %d" ), error);
             return error;
             }
         }
@@ -1372,8 +1300,7 @@
         {
         if (iTmsFormatUp)
             {
-            iLog->Log(
-                    _L("CTmsAudioServicesTestClass::SetUplinkFormat - iTmsFormatUp"));
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetUplinkFormat - iTmsFormatUp"));
             error = iTmsUplink->SetFormat(iTmsFormatUp);
             }
         else
@@ -1384,8 +1311,7 @@
 
         if (error != KErrNone)
             {
-            iLog->Log(_L("CTmsAudioServicesTestClass::SetUplinkFormat - failed, return error = %d" ),
-                    error);
+            iLog->Log(_L("CTmsAudioServicesTestClass::SetUplinkFormat - failed, return error = %d" ), error);
             return error;
             }
         }
@@ -1496,6 +1422,7 @@
             iRecBufReady = EFalse;
             //iUpLinkCodec = ENULL;
             iTmsUplink->Deinit();
+            iTmsUplink->RemoveObserver(*this);
             iUpLinkStatus = UNINITIALIZED;
             iLog->Log(_L("Close Uplink"));
             AddExpectedEvent(EUplinkClosed, KMediumTimeout);
@@ -1504,6 +1431,7 @@
             {
             //iPlayBufPtr.Set(NULL, 0, 0);
             iTmsDnlink->Deinit();
+            iTmsDnlink->RemoveObserver(*this);
             iDnLinkStatus = UNINITIALIZED;
             iPlayBufReady = EFalse;
             // iDnLinkCodec = ENULL;
@@ -1690,7 +1618,7 @@
     if (effecttype == TMS_EFFECT_GAIN)
         {
         RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel");
-        ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetMaxLevel(
+        ret = static_cast<TMSGainEffect*> (iTmsUplinkEffect)->GetMaxLevel(
                 iMaxGain);
         RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret);
         RDebug::Printf("[TMS STIF] GAIN, SetLevel to [%d]", iMaxGain);
@@ -1698,7 +1626,7 @@
         RDebug::Printf("[TMS STIF] GAIN, SetLevel ret [%d]", ret);
         iLog->Log(_L("SetMaxGain: %d"), iMaxGain);
         RDebug::Printf("[TMS STIF] GAIN, GetLevel");
-        ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetLevel(iGain);
+        ret = static_cast<TMSGainEffect*> (iTmsUplinkEffect)->GetLevel(iGain);
         RDebug::Printf("[TMS STIF] GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret);
         if (iGain != iMaxGain)
             {
@@ -1706,9 +1634,9 @@
             return KErrUnexpectedValue;
             }
 
-        static_cast<TMSGainEffect*>(iTmsUplinkEffect)->SetLevel(0);
+        static_cast<TMSGainEffect*> (iTmsUplinkEffect)->SetLevel(0);
         iLog->Log(_L("MuteMic"));
-        static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetLevel(iGain);
+        static_cast<TMSGainEffect*> (iTmsUplinkEffect)->GetLevel(iGain);
 
         if (iGain != 0)
             {
@@ -1719,26 +1647,26 @@
     else if (effecttype == TMS_EFFECT_GLOBAL_GAIN)
         {
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel");
-        ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetMaxLevel(
+        ret = static_cast<TMSGlobalGainEffect*> (iGlobalGain)->GetMaxLevel(
                 iMaxGain);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel to [%d]", iMaxGain);
-        ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->SetLevel(
+        ret = static_cast<TMSGlobalGainEffect*> (iGlobalGain)->SetLevel(
                 iMaxGain);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel ret [%d]", ret);
-        iLog->Log(_L("SetGlobleMaxGain: %d"), iMaxGain);
+        iLog->Log(_L("SetGlobalMaxGain: %d"), iMaxGain);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetLevel");
         ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetLevel(iGain);
         RDebug::Printf("[TMS STIF] GLOBAL GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret);
         if (iGain != iMaxGain)
             {
-            iLog->Log(_L("GetGain doesn't return expected Globle MaxGain!!! returned Gain = %d"), iGain);
+            iLog->Log(_L("GetGain doesn't return expected Global MaxGain!!! returned Gain = %d"), iGain);
             return KErrUnexpectedValue;
             }
 
-        static_cast<TMSGlobalGainEffect*>(iGlobalGain)->SetLevel(0);
+        static_cast<TMSGlobalGainEffect*> (iGlobalGain)->SetLevel(0);
         iLog->Log(_L("MuteMic"));
-        static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetLevel(iGain);
+        static_cast<TMSGlobalGainEffect*> (iGlobalGain)->GetLevel(iGain);
 
         if (iGain != 0)
             {
@@ -1764,16 +1692,16 @@
     if (effecttype == TMS_EFFECT_VOLUME)
         {
         RDebug::Printf("[TMS STIF] Volume, GetMaxLevel");
-        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetMaxLevel(
+        ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->GetMaxLevel(
                 iMaxVolume);
         RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret);
         RDebug::Printf("[TMS STIF] Volume, SetLevel to MaxLevel [%d]", iMaxVolume);
-        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->SetLevel(
+        ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->SetLevel(
                 iMaxVolume);
         RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret);
         iLog->Log(_L("SetMaxVolume: %d"), iMaxVolume);
         RDebug::Printf("[TMS STIF] GetLevel");
-        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetLevel(
+        ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->GetLevel(
                 iVolume);
         RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret);
         if (iVolume != iMaxVolume)
@@ -1783,10 +1711,10 @@
             }
 
         RDebug::Printf("[TMS STIF] Volume, SetLevel to 0 ");
-        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->SetLevel(0);
+        ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->SetLevel(0);
         RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret);
         iLog->Log(_L("Mute Volume"));
-        ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetLevel(
+        ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->GetLevel(
                 iVolume);
         RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret);
         if (iVolume != 0)
@@ -1798,34 +1726,34 @@
     else if (effecttype == TMS_EFFECT_GLOBAL_VOL)
         {
         RDebug::Printf("[TMS STIF] GLOBAL_VOL, Get Current Level");
-        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume);
+        ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetLevel(iVolume);
         RDebug::Printf("[TMS STIF] Current Vol Level [%d] Ret Error [%d]", iVolume, ret);
         RDebug::Printf("[TMS STIF] GLOBAL_VOL, GetMaxLevel");
-        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetMaxLevel(
+        ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetMaxLevel(
                 iMaxVolume);
         RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret);
         RDebug::Printf("[TMS STIF] GLOBAL_VOL, SetLevel to [%d]", iMaxVolume);
-        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->SetLevel(
+        ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->SetLevel(
                 iMaxVolume);
         RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret);
-        iLog->Log(_L("SetMaxGlobleVolume: %d"), iMaxVolume);
+        iLog->Log(_L("SetMaxGlobalVolume: %d"), iMaxVolume);
         RDebug::Printf("[TMS STIF] GLOBAL_VOL,GetLevel");
-        ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume);
+        ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetLevel(iVolume);
         RDebug::Printf("[TMS STIF] Expected Level [%d] Ret Level [%d] Ret Error [%d]", iMaxVolume, iVolume, ret);
-        iLog->Log(_L("GetMaxGlobleVolume: %d"), iVolume);
+        iLog->Log(_L("GetMaxGlobalVolume: %d"), iVolume);
         if (iVolume != iMaxVolume)
             {
-            iLog->Log(_L("GetGlobleVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume);
+            iLog->Log(_L("GetGlobalVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume);
             return KErrUnexpectedValue;
             }
 
-        static_cast<TMSGlobalVolEffect*>(iGlobalVol)->SetLevel(0);
-        iLog->Log(_L("Mute Globle Volume"));
-        static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume);
+        static_cast<TMSGlobalVolEffect*> (iGlobalVol)->SetLevel(0);
+        iLog->Log(_L("Mute Global Volume"));
+        static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetLevel(iVolume);
 
         if (iVolume != 0)
             {
-            iLog->Log(_L("GetGlobleVolume does not return expected Mute value!!! returned Volume = %d"), iVolume);
+            iLog->Log(_L("GetGlobalVolume does not return expected Mute value!!! returned Volume = %d"), iVolume);
             return KErrUnexpectedValue;
             }
         }
@@ -1907,7 +1835,8 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::AddGlobalRoutingObserver(CStifItemParser& /*aItem */)
+TInt CTmsAudioServicesTestClass::AddGlobalRoutingObserver(
+        CStifItemParser& /*aItem */)
     {
     iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobalRoutingObserver"));
     TInt error = KErrNone;
@@ -1924,7 +1853,8 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::DeleteGlobalRoutingObserver(CStifItemParser& /*aItem*/)
+TInt CTmsAudioServicesTestClass::DeleteGlobalRoutingObserver(
+        CStifItemParser& /*aItem*/)
     {
     iLog->Log(_L("CTmsAu dioServicesTestClass::DeleteGlobalRoutingObserver"));
     TInt error = KErrNone;
@@ -1997,7 +1927,7 @@
             return error;
             }
 
-        AddExpectedEvent(ESetOutputComplete, KLongTimeout);
+        AddExpectedEvent(ESetOutputComplete, KShortTimeout);
         }
 
     return error;
@@ -2224,91 +2154,6 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::InitDTMFTonePlayer(CStifItemParser& /*aItem */)
-    {
-    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::InitDTMFTonePlayer")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::InitDTMFTonePlayer"));
-    TInt error = KErrNone;
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::DTMFTonePlay(CStifItemParser& /*aItem */)
-    {
-    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::DTMFTonePlay")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::DTMFTonePlay"));
-    TInt error = KErrNone;
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::CloseDTMFPlayer(CStifItemParser& /*aItem */)
-    {
-    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::CloseDTMFPlayer")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::CloseDTMFPlayer"));
-    TInt error = KErrNone;
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::StopDTMFTonePlayer(CStifItemParser& /*aItem */)
-    {
-    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::StopDTMFTonePlayer")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::StopDTMFTonePlay"));
-    TInt error = KErrNone;
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::InitRingTonePlayer(CStifItemParser& /*aItem */)
-    {
-    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::InitRingTonePlayer")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::InitRingTonePlayer"));
-    TInt error = KErrNone;
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::CloseRingTonePlayer(CStifItemParser& /*aItem*/)
-    {
-    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::CloseRingTonePlayer")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::CloseRingTonePlayer"));
-    TInt error = KErrNone;
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::PlayRingTone(CStifItemParser& /*aItem*/)
-    {
-    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::PlayRingTone")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::PlayRingTone"));
-    TInt error = KErrNone;
-
-    if (iRingTonePlayer)
-        {
-        //iRingTonePlayer->Play();
-        AddExpectedEvent(EPlaybackComplete, KLongTimeout);
-        // Played ringing tone file has to be shorter than KLongTimeout
-        }
-    else
-        {
-        iLog->Log(_L("RT PLR Not Ready: error = %d"), KErrNotFound);
-        error = KErrNotFound;
-        }
-
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::PauseRingTone(CStifItemParser& /*aItem*/)
-    {
-    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::PauseRingTone")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::PauseRingTone"));
-    TInt error = KErrNone;
-    return error;
-    }
-
-TInt CTmsAudioServicesTestClass::ResumeRingTone(CStifItemParser& /*aItem*/)
-    {
-    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::ResumeRingTone")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::ResumeRingTone"));
-    TInt error = KErrNone;
-    return error;
-    }
-
 TInt CTmsAudioServicesTestClass::GetBitRateList(CStifItemParser& /*aItem*/)
     {
     iLog ->Log(_L("CTmsAudioServicesTestClass::GetBitRateList"));
@@ -2343,8 +2188,7 @@
             {
             if (iBitratesVector.size() > 0)
                 {
-                std::vector<guint>::iterator iBitrate =
-                        iBitratesVector.begin();
+                std::vector<guint>::iterator iBitrate = iBitratesVector.begin();
                 error = iTmsFormatUp -> SetBitRate(*iBitrate);
                 iLog->Log(_L("BR set %d"), *iBitrate);
                 }
@@ -2425,13 +2269,16 @@
     switch (iUpLinkCodec)
         {
         case TMS_FORMAT_G711:
-            error = static_cast<TMSG711Format*>(iTmsFormatUp)->GetVADMode(aVad);
+            error = static_cast<TMSG711Format*> (iTmsFormatUp)->GetVADMode(
+                    aVad);
             break;
         case TMS_FORMAT_G729:
-            error = static_cast<TMSG729Format*>(iTmsFormatUp)->GetVADMode(aVad);
+            error = static_cast<TMSG729Format*> (iTmsFormatUp)->GetVADMode(
+                    aVad);
             break;
         case TMS_FORMAT_ILBC:
-            error = static_cast<TMSILBCFormat*>(iTmsFormatUp)->GetVADMode(aVad);
+            error = static_cast<TMSILBCFormat*> (iTmsFormatUp)->GetVADMode(
+                    aVad);
             break;
         default:
             break;
@@ -2456,13 +2303,16 @@
     switch (iUpLinkCodec)
         {
         case TMS_FORMAT_G711:
-            error = static_cast<TMSG711Format*>(iTmsFormatUp)->SetVADMode(iVad);
+            error = static_cast<TMSG711Format*> (iTmsFormatUp)->SetVADMode(
+                    iVad);
             break;
         case TMS_FORMAT_G729:
-            error = static_cast<TMSG729Format*>(iTmsFormatUp)->SetVADMode(iVad);
+            error = static_cast<TMSG729Format*> (iTmsFormatUp)->SetVADMode(
+                    iVad);
             break;
         case TMS_FORMAT_ILBC:
-            error = static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetVADMode(iVad);
+            error = static_cast<TMSILBCFormat*> (iTmsFormatUp)->SetVADMode(
+                    iVad);
             break;
         default:
             break;
@@ -2482,7 +2332,7 @@
         if ((linkType == KTagUplink) && (iUpLinkCodec == TMS_FORMAT_G711))
             {
             TMSG711CodecMode aMode;
-            static_cast<TMSG711Format*>(iTmsFormatUp)->GetMode(aMode);
+            static_cast<TMSG711Format*> (iTmsFormatUp)->GetMode(aMode);
 
             if (aMode == TMS_G711_CODEC_MODE_ALAW)
                 {
@@ -2501,7 +2351,7 @@
                 && (iUpLinkCodec == TMS_FORMAT_ILBC))
             {
             TMSILBCCodecMode aMode;
-            static_cast<TMSILBCFormat*>(iTmsFormatUp)->GetMode(aMode);
+            static_cast<TMSILBCFormat*> (iTmsFormatUp)->GetMode(aMode);
 
             if (aMode == TMS_ILBC_CODEC_MODE_20MS_FRAME)
                 {
@@ -2520,7 +2370,7 @@
                 && (iDnLinkCodec == TMS_FORMAT_G711))
             {
             TMSG711CodecMode aMode;
-            static_cast<TMSG711Format*>(iTmsFormatDn)->GetMode(aMode);
+            static_cast<TMSG711Format*> (iTmsFormatDn)->GetMode(aMode);
 
             if (aMode == TMS_G711_CODEC_MODE_ALAW)
                 {
@@ -2539,7 +2389,7 @@
                 && (iDnLinkCodec == TMS_FORMAT_ILBC))
             {
             TMSILBCCodecMode aMode;
-            static_cast<TMSILBCFormat*>(iTmsFormatDn)->GetMode(aMode);
+            static_cast<TMSILBCFormat*> (iTmsFormatDn)->GetMode(aMode);
 
             if (aMode == TMS_ILBC_CODEC_MODE_20MS_FRAME)
                 {
@@ -2582,56 +2432,56 @@
                 && (mode == KTagALaw))
             {
             iLog->Log(_L("UPL Mode Set: aLaw"));
-            static_cast<TMSG711Format*>(iTmsFormatUp)->SetMode(
+            static_cast<TMSG711Format*> (iTmsFormatUp)->SetMode(
                     TMS_G711_CODEC_MODE_ALAW);
             }
         else if ((linkType == KTagUplink)
                 && (iUpLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw))
             {
             iLog->Log(_L("UPL Mode Set: uLaw"));
-            static_cast<TMSG711Format*>(iTmsFormatUp)->SetMode(
+            static_cast<TMSG711Format*> (iTmsFormatUp)->SetMode(
                     TMS_G711_CODEC_MODE_MULAW);
             }
         else if ((linkType == KTagUplink)
                 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms))
             {
             iLog->Log(_L("UPL Mode Set: 20ms frame"));
-            static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetMode(
+            static_cast<TMSILBCFormat*> (iTmsFormatUp)->SetMode(
                     TMS_ILBC_CODEC_MODE_20MS_FRAME);
             }
         else if ((linkType == KTagUplink)
                 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms))
             {
             iLog->Log(_L("UPL Mode Set: 30ms frame"));
-            static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetMode(
+            static_cast<TMSILBCFormat*> (iTmsFormatUp)->SetMode(
                     TMS_ILBC_CODEC_MODE_30MS_FRAME);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagALaw))
             {
             iLog->Log(_L("DNL Mode Set: aLaw"));
-            static_cast<TMSG711Format*>(iTmsFormatDn)->SetMode(
+            static_cast<TMSG711Format*> (iTmsFormatDn)->SetMode(
                     TMS_G711_CODEC_MODE_ALAW);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw))
             {
             iLog->Log(_L("DNL Mode Set: uLaw"));
-            static_cast<TMSG711Format*>(iTmsFormatDn)->SetMode(
+            static_cast<TMSG711Format*> (iTmsFormatDn)->SetMode(
                     TMS_G711_CODEC_MODE_MULAW);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms))
             {
             iLog->Log(_L("DNL Mode Set: 20ms frame"));
-            static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetMode(
+            static_cast<TMSILBCFormat*> (iTmsFormatDn)->SetMode(
                     TMS_ILBC_CODEC_MODE_20MS_FRAME);
             }
         else if ((linkType == KTagDnlink)
                 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms))
             {
             iLog->Log(_L("DNL Mode Set: 30ms frame"));
-            static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetMode(
+            static_cast<TMSILBCFormat*> (iTmsFormatDn)->SetMode(
                     TMS_ILBC_CODEC_MODE_30MS_FRAME);
             }
         else
@@ -2652,11 +2502,11 @@
     switch (iDnLinkCodec)
         {
         case TMS_FORMAT_G711:
-            error = static_cast<TMSG711Format*>(iTmsFormatDn)->GetCNG(aCng);
+            error = static_cast<TMSG711Format*> (iTmsFormatDn)->GetCNG(aCng);
             iLog->Log(_L("CNG: %d"), aCng);
             break;
         case TMS_FORMAT_ILBC:
-            error = static_cast<TMSILBCFormat*>(iTmsFormatDn)->GetCNG(aCng);
+            error = static_cast<TMSILBCFormat*> (iTmsFormatDn)->GetCNG(aCng);
             iLog->Log(_L("CNG: %d"), aCng);
             break;
         default:
@@ -2673,18 +2523,17 @@
 
 TInt CTmsAudioServicesTestClass::ToggleCNG(CStifItemParser & /*aItem*/)
     {
-
     iLog ->Log(_L("CTmsAudioServicesTestClass::ToggleCNG"));
     TInt error = KErrNone;
     iCng = (iCng) ? EFalse : ETrue;
     switch (iDnLinkCodec)
         {
         case TMS_FORMAT_G711:
-            static_cast<TMSG711Format*>(iTmsFormatDn)->SetCNG(iCng);
+            static_cast<TMSG711Format*> (iTmsFormatDn)->SetCNG(iCng);
             iLog->Log(_L("CNG set: %d"), iCng);
             break;
         case TMS_FORMAT_ILBC:
-            static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetCNG(iCng);
+            static_cast<TMSILBCFormat*> (iTmsFormatDn)->SetCNG(iCng);
             iLog->Log(_L("CNG set: %d"), iCng);
             break;
         default:
@@ -2700,7 +2549,7 @@
     TBool aPlc = EFalse;
     if (iDnLinkCodec == TMS_FORMAT_G711)
         {
-        static_cast<TMSG711Format*>(iTmsFormatDn)->GetPlc(aPlc);
+        static_cast<TMSG711Format*> (iTmsFormatDn)->GetPlc(aPlc);
         iLog->Log(_L("PLC: %d"), aPlc);
         }
 
@@ -2720,31 +2569,13 @@
     iPlc = (iPlc) ? EFalse : ETrue;
     if (iDnLinkCodec == TMS_FORMAT_G711)
         {
-        error = static_cast<TMSG711Format*>(iTmsFormatDn)->SetPlc(iPlc);
+        error = static_cast<TMSG711Format*> (iTmsFormatDn)->SetPlc(iPlc);
         iLog->Log(_L("PLC set: %d"), iPlc);
         }
 
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::StopRingTone(CStifItemParser& /*aItem*/)
-    {
-    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::StopRingTone")));
-    iLog->Log(_L("CTmsAudioServicesTestClass::StopRingTone"));
-    TInt error = KErrNone;
-    if (iRingTonePlayer)
-        {
-        //    iRingTonePlayer->Stop();
-        RemoveExpectedEvent(EPlaybackComplete);
-        }
-    else
-        {
-        iLog->Log(_L("RT PLR Not Ready: error = %d"), KErrNotFound);
-        error = KErrNotFound;
-        }
-    return error;
-    }
-
 TInt CTmsAudioServicesTestClass::GetBufferType(CStifItemParser& /*aItem*/)
     {
     FTRACE (FPrint(_L("CTmsAudioServicesTestClass::GetBufferType")));
@@ -2762,9 +2593,7 @@
         {
         error = iTmsDnlink->AddSource(iTmsClientSource);
         }
-    iLog->Log(
-            _L("CTmsAudioServicesTestClass::AddClientSrcToDnlStream Error [%d]"),
-            error);
+    iLog->Log(_L("CTmsAudioServicesTestClass::AddClientSrcToDnlStream Error [%d]"), error);
     return error;
     }
 
@@ -2842,7 +2671,7 @@
     TInt error = KErrNone;
     if (iTmsClientSource)
         {
-        error = static_cast<TMSClientSource*>(iTmsClientSource)->AddObserver(
+        error = static_cast<TMSClientSource*> (iTmsClientSource)->AddObserver(
                 *this, NULL);
         }
     return error;
@@ -2855,8 +2684,7 @@
     TInt error = KErrNone;
     if (iTmsClientSource)
         {
-        error = static_cast<TMSClientSource*>(iTmsClientSource)->RemoveObserver(
-                *this);
+        error = static_cast<TMSClientSource*> (iTmsClientSource)->RemoveObserver(*this);
         }
     return error;
     }
@@ -2941,8 +2769,8 @@
     TInt error = KErrNone;
     if (iTmsUplink && iTmsClientSink)
         {
-        error = static_cast<TMSClientSink*>(iTmsClientSink)->AddObserver(*this,
-                NULL);
+        error = static_cast<TMSClientSink*> (iTmsClientSink)->AddObserver(
+                *this, NULL);
         }
     return error;
     }
@@ -2953,7 +2781,7 @@
     TInt error = KErrNone;
     if (iTmsUplink && iTmsClientSink)
         {
-        error = static_cast<TMSClientSink*>(iTmsClientSink)->RemoveObserver(
+        error = static_cast<TMSClientSink*> (iTmsClientSink)->RemoveObserver(
                 *this);
         }
     return error;
@@ -2968,30 +2796,29 @@
         status = iFactory->CreateEffect(TMS_EFFECT_VOLUME, iTmsDnlinkEffect);
         if (status == KErrNone)
             {
-            static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->AddObserver(*this,
-                    NULL);
+            static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->AddObserver(
+                    *this, NULL);
             }
         }
     RDebug::Printf("[TMS STIF] CreateVolumeEffect Return [%d]", status);
     return status;
     }
 
-gint CTmsAudioServicesTestClass::CreateVolumeGlobleEffect()
+gint CTmsAudioServicesTestClass::CreateVolumeGlobalEffect()
     {
-    iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobleEffect"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobalEffect"));
     gint status(KErrNone);
     if (iFactory && !iGlobalVol)
         {
         status = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_VOL, iGlobalVol);
-
         if (status == KErrNone)
             {
-            static_cast<TMSGlobalVolEffect*>(iGlobalVol)->AddObserver(*this,
+            static_cast<TMSGlobalVolEffect*> (iGlobalVol)->AddObserver(*this,
                     NULL);
-            iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobleEffect - AddObserver"));
+            iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobalEffect - AddObserver"));
             }
         }
-    RDebug::Printf("[TMS STIF] CreateVolumeGlobleEffect Return [%d]", status);
+    RDebug::Printf("[TMS STIF] CreateVolumeGlobalEffect Return [%d]", status);
     return status;
     }
 
@@ -3007,10 +2834,10 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::AddGlobleVolumeEffectToStream(
+TInt CTmsAudioServicesTestClass::AddGlobalVolumeEffectToStream(
         CStifItemParser& /*aItem*/)
     {
-    iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobleVolumeEffectToStream"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobalVolumeEffectToStream"));
     TInt error = KErrNone;
     if (iTmsDnlink && iGlobalVol)
         {
@@ -3019,10 +2846,10 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream(
+TInt CTmsAudioServicesTestClass::RemoveGlobalVolumeEffectToStream(
         CStifItemParser& /*aItem*/)
     {
-    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobalVolumeEffectToStream"));
     TInt error = KErrNone;
     if (iTmsDnlink && iGlobalVol)
         {
@@ -3041,28 +2868,28 @@
         status = iFactory->CreateEffect(TMS_EFFECT_GAIN, iTmsUplinkEffect);
         if (status == KErrNone)
             {
-            static_cast<TMSGainEffect*>(iTmsUplinkEffect)->AddObserver(*this,
-                    NULL);
+            static_cast<TMSGainEffect*> (iTmsUplinkEffect)->AddObserver(
+                    *this, NULL);
             }
         }
     RDebug::Printf("[TMS STIF] CreateGainEffect Return [%d]", status);
     return status;
     }
 
-gint CTmsAudioServicesTestClass::CreateGlobleGainEffect()
+gint CTmsAudioServicesTestClass::CreateGlobalGainEffect()
     {
-    iLog->Log(_L("CTmsAudioServicesTestClass::CreateGlobleGainEffect"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateGlobalGainEffect"));
     gint status(KErrNone);
     if (iFactory && !iGlobalGain)
         {
         status = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_GAIN, iGlobalGain);
         if (status == KErrNone)
             {
-            static_cast<TMSGlobalGainEffect*>(iGlobalGain)->AddObserver(*this,
-                    NULL);
+            static_cast<TMSGlobalGainEffect*> (iGlobalGain)->AddObserver(
+                    *this, NULL);
             }
         }
-    RDebug::Printf("[TMS STIF] CreateGlobleGainEffect Return [%d]", status);
+    RDebug::Printf("[TMS STIF] CreateGlobalGainEffect Return [%d]", status);
     return status;
     }
 
@@ -3078,10 +2905,10 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::AddGlobleGainEffectToStream(
+TInt CTmsAudioServicesTestClass::AddGlobalGainEffectToStream(
         CStifItemParser& /*aItem*/)
     {
-    iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobleGainEffectToStream"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobalGainEffectToStream"));
     TInt error = KErrNone;
     if (iTmsUplink && iGlobalGain)
         {
@@ -3090,10 +2917,10 @@
     return error;
     }
 
-TInt CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream(
+TInt CTmsAudioServicesTestClass::RemoveGlobalGainEffectToStream(
         CStifItemParser& /*aItem*/)
     {
-    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream"));
+    iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobalGainEffectToStream"));
     TInt error = KErrNone;
     if (iTmsUplink && iGlobalGain)
         {
@@ -3102,6 +2929,509 @@
     return error;
     }
 
+TInt CTmsAudioServicesTestClass::CreateDTMFTonePlayer(CStifItemParser& aItem)
+    {
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateDTMFTonePlayer"));
+    TInt error = TMS_RESULT_SUCCESS;
+    TPtrC StreamType;
+    error = aItem.GetNextString(StreamType);
+
+    if (error == TMS_RESULT_SUCCESS)
+        {
+        if (StreamType == KTagDnlink)
+            {
+            if (iFactory && !iDTMFTonePlayerDn)
+                {
+                error = iFactory->CreateDTMF(TMS_STREAM_DOWNLINK,
+                        iDTMFTonePlayerDn);
+                error |= iDTMFTonePlayerDn->AddObserver(*this, NULL);
+                }
+            FTRACE(FPrint(_L("CreateDTMF-DNL Error [%d]"), error));
+            }
+        else if (StreamType == KTagUplink)
+            {
+            if (iFactory && !iDTMFTonePlayerUp)
+                {
+                error = iFactory->CreateDTMF(TMS_STREAM_UPLINK,
+                        iDTMFTonePlayerUp);
+                error |= iDTMFTonePlayerUp->AddObserver(*this, NULL);
+                }
+            FTRACE(FPrint(_L("CreateDTMF-UPL Error [%d]"), error));
+            }
+        else
+            {
+            iLog->Log(KMsgBadTestParameters);
+            error = KErrBadTestParameter;
+            }
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateDTMFTonePlayer Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::DTMFTonePlay(CStifItemParser& aItem)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::DTMFTonePlay")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::DTMFTonePlay"));
+    GString* dtmfstring;
+    TInt error = TMS_RESULT_SUCCESS;
+    TPtrC StreamType;
+    error = aItem.GetNextString(StreamType);
+
+    if (error == TMS_RESULT_SUCCESS)
+        {
+        if (StreamType == KTagDnlink)
+            {
+            if (iDTMFTonePlayerDn)
+                {
+                // NOTE: UpLink Status must be READY or STREAMING
+                dtmfstring = g_string_new("4723");
+                dtmfstring = g_string_append_c(dtmfstring, '4');
+                error = iDTMFTonePlayerDn->SetTone(dtmfstring);
+                if (error == TMS_RESULT_SUCCESS)
+                    {
+                    error = iDTMFTonePlayerDn->Start();
+                    }
+                g_string_free(dtmfstring, TRUE);
+                }
+            }
+        else if (StreamType == KTagUplink)
+            {
+            if (iDTMFTonePlayerUp)
+                {
+                // NOTE: UpLink Status must be READY or STREAMING
+                dtmfstring = g_string_new("987");
+                dtmfstring = g_string_append_c(dtmfstring, '4');
+                error = iDTMFTonePlayerUp->SetTone(dtmfstring);
+                if (error == TMS_RESULT_SUCCESS)
+                    {
+                    error = iDTMFTonePlayerUp->Start();
+                    }
+                g_string_free(dtmfstring, TRUE);
+                }
+            }
+        else
+            {
+            iLog->Log(KMsgBadTestParameters);
+            error = KErrBadTestParameter;
+            }
+        }
+
+    if (error == TMS_RESULT_SUCCESS)
+        {
+        AddExpectedEvent(EDTMFToneStopped, KMediumTimeout);
+        }
+
+    iLog->Log(_L("CTmsAudioServicesTestClass::DTMFTonePlay Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::StopDTMFTonePlayer(CStifItemParser& aItem)
+    {
+    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::StopDTMFTonePlayer")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::StopDTMFTonePlay"));
+    TInt error = TMS_RESULT_SUCCESS;
+    TPtrC StreamType;
+    error = aItem.GetNextString(StreamType);
+
+    if (error == TMS_RESULT_SUCCESS)
+        {
+        if (StreamType == KTagDnlink)
+            {
+            if (iFactory && iDTMFTonePlayerDn)
+                {
+                iDTMFTonePlayerDn->Stop();
+                RemoveExpectedEvent(EDTMFToneStopped);
+                }
+            }
+        else if (StreamType == KTagUplink)
+            {
+            if (iFactory && iDTMFTonePlayerUp)
+                {
+                iDTMFTonePlayerUp->Stop();
+                RemoveExpectedEvent(EDTMFToneStopped);
+                }
+            }
+        else
+            {
+            iLog->Log(KMsgBadTestParameters);
+            error = KErrBadTestParameter;
+            }
+        }
+
+    iLog->Log(_L("CTmsAudioServicesTestClass::StopDTMFTonePlayer Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::ContinueDTMFStringSending(
+        CStifItemParser& aItem)
+    {
+    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::ContinueDTMFStringSending")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::ContinueDTMFStringSending"));
+    TInt error = TMS_RESULT_SUCCESS;
+    TPtrC StreamType;
+    error = aItem.GetNextString(StreamType);
+
+    if (error == TMS_RESULT_SUCCESS)
+        {
+        if (StreamType == KTagDnlink)
+            {
+            if (iFactory && iDTMFTonePlayerDn)
+                {
+                //case not supported for DNL, should return valid error
+                error = iDTMFTonePlayerDn->ContinueDTMFStringSending(TRUE);
+                }
+            }
+        else if (StreamType == KTagUplink)
+            {
+            if (iFactory && iDTMFTonePlayerUp)
+                {
+                error = iDTMFTonePlayerUp->ContinueDTMFStringSending(TRUE);
+                }
+            }
+        else
+            {
+            iLog->Log(KMsgBadTestParameters);
+            error = KErrBadTestParameter;
+            }
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::ContinueDTMFStringSending Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::CloseDTMFPlayer(CStifItemParser& aItem)
+    {
+    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::CloseDTMFPlayer")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::CloseDTMFPlayer"));
+    TInt error = TMS_RESULT_SUCCESS;
+    TPtrC StreamType;
+    error = aItem.GetNextString(StreamType);
+
+    if (error == TMS_RESULT_SUCCESS)
+        {
+        if (StreamType == KTagDnlink)
+            {
+            if (iFactory && iDTMFTonePlayerDn)
+                {
+                iDTMFTonePlayerDn->RemoveObserver(*this);
+                iFactory->DeleteDTMF(iDTMFTonePlayerDn);
+                }
+            }
+        else if (StreamType == KTagUplink)
+            {
+            if (iFactory && iDTMFTonePlayerUp)
+                {
+                iDTMFTonePlayerUp->RemoveObserver(*this);
+                iFactory->DeleteDTMF(iDTMFTonePlayerUp);
+                }
+            }
+        else
+            {
+            iLog->Log(KMsgBadTestParameters);
+            error = KErrBadTestParameter;
+            }
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::StopDTMFTonePlayer Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::CreateRingTonePlayer(
+        CStifItemParser& /*aItem */)
+    {
+    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::CreateRingTonePlayer")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateRingTonePlayer"));
+    TInt error = TMS_RESULT_SUCCESS;
+    if (iFactory)
+        {
+        error = iFactory->CreateRingTonePlayer(iRingTonePlayer);
+        if (error == TMS_RESULT_SUCCESS)
+            {
+            iRingTonePlayer->AddObserver(*this, NULL);
+            }
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateRingTonePlayer Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::InitRingTonePlayer(CStifItemParser& aItem)
+    {
+    FTRACE(FPrint(_L("CTmsAudioServicesTestClass::InitRingTonePlayer")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::InitRingTonePlayer"));
+
+    TInt error = TMS_RESULT_SUCCESS;
+    TPtrC StreamType;
+    error = aItem.GetNextString(StreamType);
+
+    if (error == TMS_RESULT_SUCCESS && iRingTonePlayer)
+        {
+        if (StreamType == KTagRTDefault)
+            {
+            error = iRingTonePlayer->Init(TMS_RINGTONE_DEFAULT);
+            }
+        else if (StreamType == KTagRTFile)
+            {
+            TBuf<sizeof(KTestFile3)> buf(KTestFile3);
+            iRTStr = g_string_new_len((gchar*) buf.Ptr(), buf.Length() * 2);
+            error = iRingTonePlayer->Init(TMS_RINGTONE_FILE, iRTStr);
+            g_string_free(iRTStr, TRUE);
+            iRTStr = NULL;
+            }
+        else if (StreamType == KTagRTBeepOnce)
+            {
+            error = iRingTonePlayer->Init(TMS_RINGTONE_BEEP_ONCE);
+            }
+        else if (StreamType == KTagRTSilent)
+            {
+            error = iRingTonePlayer->Init(TMS_RINGTONE_SILENT);
+            }
+        else if (StreamType == KTagRTUnsecureVoIP)
+            {
+            error = iRingTonePlayer->Init(TMS_RINGTONE_UNSECURE_VOIP);
+            }
+        else if (StreamType == KTagRTSequence)
+            {
+            TBuf8<sizeof(KRTBeepSequence)> buf(KRTBeepSequence);
+            iRTStr = g_string_new_len((gchar*) buf.Ptr(), buf.Length());
+            error = iRingTonePlayer->Init(TMS_RINGTONE_SEQUENCE, iRTStr);
+            g_string_free(iRTStr, TRUE);
+            }
+        else if (StreamType == KTagRTTts)
+            {
+            TBuf<sizeof(KTextToSpeak)> buf(KTextToSpeak);
+            iTTSStr = g_string_new_len((gchar*) buf.Ptr(), buf.Length() * 2);
+            error = iRingTonePlayer->Init(TMS_RINGTONE_DEFAULT, NULL,
+                    iTTSStr);
+            g_string_free(iTTSStr, TRUE);
+            iTTSStr = NULL;
+            }
+        else
+            {
+            iLog->Log(KMsgBadTestParameters);
+            error = KErrBadTestParameter;
+            }
+
+        if (error == TMS_RESULT_SUCCESS)
+            {
+            AddExpectedEvent(ERTInitComplete, KMediumTimeout);
+            }
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::InitRingTonePlayer Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::PlayRingTone(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::PlayRingTone")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::PlayRingTone"));
+    TInt error = KErrNone;
+
+    if (iRingTonePlayer)
+        {
+        iRingTonePlayer->Play();
+        AddExpectedEvent(ERTPlayComplete, KMediumTimeout);
+        }
+    else
+        {
+        error = KErrNotFound;
+        }
+
+    iLog->Log(_L("CTmsAudioServicesTestClass::PlayRingTone Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::PlayRingToneNoEvent(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::PlayRingToneNoEvent")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::PlayRingToneNoEvent"));
+    TInt error = KErrNone;
+
+    if (iRingTonePlayer)
+        {
+        iRingTonePlayer->Play();
+        // Not expecting any event - will allow to cancel
+        }
+    else
+        {
+        error = KErrNotFound;
+        }
+
+    iLog->Log(_L("CTmsAudioServicesTestClass::PlayRingToneNoEvent Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::PauseRingTone(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::PauseRingTone")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::PauseRingTone"));
+    TInt error = KErrNone;
+
+    if (iRingTonePlayer)
+        {
+        iRingTonePlayer->Pause();
+        RemoveExpectedEvent(ERTPlayComplete);
+        }
+    else
+        {
+        error = KErrNotFound;
+        }
+
+    iLog->Log(_L("CTmsAudioServicesTestClass::PauseRingTone Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::StopRingTone(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::StopRingTone")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::StopRingTone"));
+    TInt error = KErrNotFound;
+    if (iRingTonePlayer)
+        {
+        error = iRingTonePlayer->Stop();
+        RemoveExpectedEvent(ERTPlayComplete);
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::StopRingTone Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::MuteRingTone(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::MuteRingTone")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::MuteRingTone"));
+    TInt error = KErrNotFound;
+    if (iRingTonePlayer)
+        {
+        error = iRingTonePlayer->Mute();
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::MuteRingTone Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::CloseRingTonePlayer(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::CloseRingTonePlayer")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::CloseRingTonePlayer"));
+    TInt error = KErrNotFound;
+    if (iFactory && iRingTonePlayer)
+        {
+        error = iRingTonePlayer->Deinit();
+        error |= iRingTonePlayer->RemoveObserver(*this);
+        error |= iFactory->DeleteRingTonePlayer(iRingTonePlayer);
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::CloseRingTonePlayer Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::CreateInbandTonePlayer(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::CreateInbandTonePlayer")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateInbandTonePlayer"));
+    TInt error = KErrNotFound;
+
+    if (iFactory && !iInbandTonePlayer)
+        {
+        error = iFactory->CreateInbandTonePlayer(iInbandTonePlayer);
+        if (iInbandTonePlayer)
+            {
+            iInbandTonePlayer->AddObserver(*this, NULL);
+            }
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::CreateInbandTonePlayer Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::StartInbandTone(CStifItemParser& aItem)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::StartInbandTone")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::StartInbandTone"));
+    TInt error = TMS_RESULT_SUCCESS;
+    TPtrC StreamType;
+    error = aItem.GetNextString(StreamType);
+
+    if (error == TMS_RESULT_SUCCESS && iInbandTonePlayer)
+        {
+        if (StreamType == KTagUserBusy)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_USER_BUSY);
+            }
+        else if (StreamType == KTagRadioPathNotFound)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_RADIO_PATH_NOT_AVAIL);
+            }
+        else if (StreamType == KTagCongestion)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_CONGESTION);
+            }
+        else if (StreamType == KTagSpecialInfo)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_SPECIAL_INFO);
+            }
+        else if (StreamType == KTagReorder)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_REORDER);
+            }
+        else if (StreamType == KTagAlerting)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_REMOTE_ALEARTING);
+            }
+        else if (StreamType == KTagWaiting)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_CALL_WAITING);
+            }
+        else if (StreamType == KTagDataCall)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_DATA_CALL);
+            }
+        else if (StreamType == KTagNoSequence)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_NO_SEQUENCE);
+            }
+        else if (StreamType == KTagBeepSequence)
+            {
+            error = iInbandTonePlayer->Start(TMS_INBAND_BEEP_SEQUENCE);
+            }
+        else
+            {
+            iLog->Log(KMsgBadTestParameters);
+            error = KErrBadTestParameter;
+            }
+        }
+
+    if (error == TMS_RESULT_SUCCESS)
+        {
+        AddExpectedEvent(EInbToneStarted, KShortTimeout);
+        }
+
+    iLog->Log(_L("CTmsAudioServicesTestClass::StartInbandTone Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::StopInbandTone(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::StopInbandTone")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::StopInbandTone"));
+    TInt error = KErrNotFound;
+    if (iFactory && iInbandTonePlayer)
+        {
+        error = iInbandTonePlayer->Stop();
+        RemoveExpectedEvent(EInbToneStarted);
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::StopInbandTone Error [%d]"), error);
+    return error;
+    }
+
+TInt CTmsAudioServicesTestClass::CloseInbandTonePlayer(CStifItemParser& /*aItem*/)
+    {
+    FTRACE (FPrint(_L("CTmsAudioServicesTestClass::CloseInbandTonePlayer")));
+    iLog->Log(_L("CTmsAudioServicesTestClass::CloseInbandTonePlayer"));
+    TInt error = KErrNotFound;
+    if (iFactory && iInbandTonePlayer)
+        {
+        error = iInbandTonePlayer->RemoveObserver(*this);
+        error |= iFactory->DeleteInbandTonePlayer(iInbandTonePlayer);
+        }
+    iLog->Log(_L("CTmsAudioServicesTestClass::CloseInbandTonePlayer Error [%d]"), error);
+    return error;
+    }
+
 // ----------------------------------------------------------------------------
 // CTmsTestEngine::DoLoopback
 //
@@ -3127,12 +3457,12 @@
 
         Mem::Copy(desptr, srcptr, srcsize);
 
-        static_cast<TMSClientSource*>(iTmsClientSource)->BufferFilled(
+        static_cast<TMSClientSource*> (iTmsClientSource)->BufferFilled(
                 *iPlayBuf);
-        static_cast<TMSClientSink*>(iTmsClientSink)->BufferProcessed(iRecBuf);
+        static_cast<TMSClientSink*> (iTmsClientSink)->BufferProcessed(iRecBuf);
 
         iPlayBufReady = EFalse; // buf filled, ready for FillBuffer
-        iRecBufReady = EFalse; // buf consumed, ready for EmptyBuffer
+        iRecBufReady = EFalse;  // buf consumed, ready for EmptyBuffer
         }
 
     iLog->Log(_L("CTmsAudioServicesTestClass::DoLoopback END"));
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocksCallbacks.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocksCallbacks.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -144,6 +144,7 @@
 void CTmsAudioServicesTestClass::EffectsEvent(const TMSEffect& tmseffect,
         TMSSignalEvent /*event*/)
     {
+    iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::EffectsEvent"));
     TMSEffectType effecttype;
     const_cast<TMSEffect&>(tmseffect).GetType(effecttype);
     switch (effecttype)
@@ -179,3 +180,71 @@
             break;
         }
     }
+
+// From TMSRingToneObserver
+void CTmsAudioServicesTestClass::RingtoneEvent(const TMSRingTone& /*rt*/,
+        TMSSignalEvent event)
+    {
+    iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::RingtoneEvent"));
+    gint reason = event.reason;
+    switch (event.type)
+        {
+        case TMS_EVENT_RINGTONE_OPEN_COMPLETE:
+            iLog->Log(_L("[tms cb]RingtoneEvent ERTInitComplete"));
+            ProcessEvent(ERTInitComplete, KErrNone);
+            break;
+        case TMS_EVENT_RINGTONE_PLAY_COMPLETE:
+            iLog->Log(_L("[tms cb]RingtoneEvent ERTPlayComplete"));
+            ProcessEvent(ERTPlayComplete, KErrNone);
+            break;
+        case TMS_EVENT_RINGTONE_DEINIT_COMPLETE:
+            iLog->Log(_L("[tms cb]RingtoneEvent ERTDeinitComplete"));
+            ProcessEvent(ERTDeinitComplete, KErrNone);
+            break;
+        default:
+            break;
+        }
+    }
+
+// From TMSDTMFObserver
+void CTmsAudioServicesTestClass::DTMFEvent(const TMSDTMF& /*dtmf*/,
+        TMSSignalEvent event)
+    {
+    iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::DTMFEvent"));
+    gint reason = event.reason;
+    switch (event.type)
+        {
+        case TMS_EVENT_DTMF_TONE_STARTED:
+            //ProcessEvent(EDTMFToneStarted, KErrNone);
+            iLog->Log(_L("DTMF Tone Started"));
+            break;
+        case TMS_EVENT_DTMF_TONE_STOPPED:
+            ProcessEvent(EDTMFToneStopped, KErrNone);
+            iLog->Log(_L("DTMF Tone Stopped"));
+            break;
+        default:
+            break;
+        }
+    }
+
+// From TMSInbandToneObserver
+void CTmsAudioServicesTestClass::InbandToneEvent(
+        const TMSInbandTone& /*inbandtone*/, TMSSignalEvent event)
+    {
+    iLog->Log(_L("[tms cb]CTmsAudioServicesTestClass::InbandToneEvent"));
+    gint reason = event.reason;
+    switch (event.type)
+        {
+        case TMS_EVENT_INBAND_TONE_STARTED:
+            //ProcessEvent(EInbToneStarted, KErrNone);
+            iLog->Log(_L("Inband Tone Started"));
+            break;
+        case TMS_EVENT_INBAND_TONE_STOPPED:
+            //ProcessEvent(EInbToneStopped, KErrNone);
+            iLog->Log(_L("Inband Tone Stopped"));
+            break;
+        default:
+            break;
+        }
+    }
+
--- a/mmserv/group/bld.inf	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -23,7 +23,6 @@
 
 PRJ_MMPFILES
 
-#include "../audioeffectsui/group/bld.inf"
 #include "../callaudiocontrol/group/bld.inf"
 #include "../metadatautility/Group/bld.inf"
 #include "../radioutility/group/bld.inf"
--- a/mmserv/metadatautility/Src/MetaDataParser.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/metadatautility/Src/MetaDataParser.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -19,13 +19,16 @@
 
 
 // INCLUDE FILES
-#include "MetaDataParser.h"
 #include <syslangutil.h>
 #include <languages.hrh>
 #include <TopCharacterSet.rsg>
 #include <data_caging_path_literals.hrh>
 #include <bautils.h>
 
+#include "MetaDataParser.h"
+#include "MetaDataSourceFile.h"
+#include "MetaDataFieldContainer.h"
+
 _LIT(KCharacterSetRscFile, "TopCharacterSet.rsc");
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -121,6 +124,10 @@
 TInt CMetaDataParser::UnicodeBOM(
 	const TDesC8& aUnicode )
 	{
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::UnicodeBOM"));
+#endif
+    
 	TPtrC8 bomData( aUnicode.Left( 2 ) );
 
 	TBuf8<2> BEbom; // Big endian BOM
@@ -162,6 +169,10 @@
 //
 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes& aGenrePtr)
 {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
+#endif
+    
 	if(aNum < 0 || aNum > 125 && aNum != 199)
 		{
 		return;
@@ -560,6 +571,10 @@
 //
 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes8& aGenrePtr)
 {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
+#endif
+
 	if(aNum < 0 || aNum > 125 && aNum != 199)
 		{
 		return;
@@ -1242,4 +1257,46 @@
 		}
 	return EFalse;
 	}
+
+
+// -----------------------------------------------------------------------------
+// CMetaDataParser::CommonParseL
+// -----------------------------------------------------------------------------
+//
+void CMetaDataParser::CommonParseL(
+    CMetaDataSourceFile* aSource,
+    const RArray<TMetaDataFieldId>& aWantedFields,
+    CMetaDataFieldContainer& aContainer )
+    {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::CommonParseL"));
+#endif
+
+    GetProtectedL(aSource, aContainer);
+    ParseL(aWantedFields, aContainer);
+    }
+
+// -----------------------------------------------------------------------------
+// CMetaDataParser::GetProtectedL
+// -----------------------------------------------------------------------------
+//
+void CMetaDataParser::GetProtectedL( CMetaDataSourceFile* aSource,
+        CMetaDataFieldContainer& aContainer )
+    {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::GetProtectedL"));
+#endif
+
+    TBool fileProtected = aSource->FileProtected();
+    TBuf16<5> desc16;
+    desc16.AppendNum(fileProtected);
+
+    aContainer.AppendL( EMetaDataProtected, desc16 );
+    
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::GetProtectedL, Protected=%S "), &desc16);
+#endif
+    
+    }
+
 //  End of File
--- a/mmserv/metadatautility/Src/MetaDataParser.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/metadatautility/Src/MetaDataParser.h	Fri Apr 30 19:18:45 2010 -0500
@@ -26,13 +26,14 @@
 #include <MetaDataField.hrh>
 #include <f32file.h>
 #include <charconv.h>
-#include "MetaDataID3v1Genre.h"
 #include <barsc.h>
 #include <barsread.h>
 
+#include "MetaDataID3v1Genre.h"
 
 // FORWARD DECLARATION
 class CMetaDataFieldContainer;
+class CMetaDataSourceFile;
 
 // CONSTANTS
 const TInt KUnicodeBOMNotFound		= 0;
@@ -97,7 +98,7 @@
         * @since 3.0
         * @return void
         */
-		void MapID3GenreToStringL(TInt aNum, TDes& aGenrePtr);
+		void MapID3GenreToStringL( TInt aNum, TDes& aGenrePtr );
 
 		/**
         * Maps ID3v2 genre integer to string
@@ -107,11 +108,33 @@
         * @return void
         */
 
-		void MapID3GenreToStringL(TInt aNum, TDes8& aGenrePtr);
+		void MapID3GenreToStringL( TInt aNum, TDes8& aGenrePtr );
 		void GenerateTopCharacterSetsL();
-		void SelectCharacterSetsForLanguageL(TInt aLanguage);
-		void ReadCharacterSetResourceL(TInt aResourceId);
-		TBool IsInTopCharacterSet(TUint aCharacterSetId);
+		void SelectCharacterSetsForLanguageL( TInt aLanguage );
+		void ReadCharacterSetResourceL( TInt aResourceId );
+		TBool IsInTopCharacterSet( TUint aCharacterSetId );
+
+		/**
+        * Parses the common metadata, the metadata fields are
+        * inserted into the container.
+        * @since 9.2
+        * @param aSource a Metadata source file.
+        * @param aWantedFields An array of TMetaDataFieldId's. Empty array is interpreted as all fields.
+        * @param aContainer On return, metadata found in aSource is stored here
+        * @return void
+        */
+        void CommonParseL( CMetaDataSourceFile* aSource,
+                const RArray<TMetaDataFieldId>& aWantedFields, 
+                CMetaDataFieldContainer& aContainer );
+
+        /**
+        * Append DRM Protected data to the container.
+        * @param aSource a Metadata source file.
+        * @param aContainer On return, metadata ptotected data is stored here
+        * @return void
+        */
+		void GetProtectedL( CMetaDataSourceFile* aSource,
+		        CMetaDataFieldContainer& aContainer );
 
     protected:
 
@@ -121,8 +144,8 @@
         * @param aDesc The original descriptor
         * @return Pointer to descriptor without whitespace
         */
-        TPtrC8 StripTrailingZeroes( const TDesC8& aDesc, TInt encoding = 0);
-        TPtrC StripTrailingZeroes( const TDesC& aDesc);
+        TPtrC8 StripTrailingZeroes( const TDesC8& aDesc, TInt encoding = 0 );
+        TPtrC StripTrailingZeroes( const TDesC& aDesc );
 
         /**
         * Returns BOM indication in the provided unicode.
--- a/mmserv/metadatautility/Src/MetaDataUtilityBody.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/metadatautility/Src/MetaDataUtilityBody.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -108,7 +108,7 @@
 	iParser = FindParserFileL(aFileName);
 	if ( iParser )
 		{
-		iParser->ParseL(aWantedFields, *iContainer);
+		iParser->CommonParseL((CMetaDataSourceFile*)iSource, aWantedFields, *iContainer);
 		}
 	}
 
@@ -130,7 +130,7 @@
 	iParser = FindParserFileL(aFile);
 	if ( iParser )
 		{
-		iParser->ParseL(aWantedFields, *iContainer);
+		iParser->CommonParseL((CMetaDataSourceFile*)iSource, aWantedFields, *iContainer);
 		}
 	}
 
@@ -152,7 +152,7 @@
 	iParser = FindParserDesL(aDes);
 	if ( iParser )
 		{
-		iParser->ParseL(aWantedFields, *iContainer);
+		iParser->CommonParseL((CMetaDataSourceFile*)iSource, aWantedFields, *iContainer);
 		}
 	}
 
@@ -467,10 +467,7 @@
 		{
 		User::Leave(KErrAlreadyExists);
 		}
-	
-	// iParser = FindParserFileL(aFileName);	
-		
-	if(KErrNone == IsSupportedMimeType(aMimeType))	
+		if(KErrNone == IsSupportedMimeType(aMimeType))	
 	{
 		iParser = FindParserFileL(aFileName, aMimeType);
 	}
@@ -481,7 +478,7 @@
 	
 	if ( iParser )
 	{
-		iParser->ParseL(aWantedFields, *iContainer);
+		iParser->CommonParseL((CMetaDataSourceFile*)iSource, aWantedFields, *iContainer);
 	}	
 	}
 // -----------------------------------------------------------------------------
@@ -501,8 +498,6 @@
 		User::Leave(KErrAlreadyExists);
 	}
 		
-	//iParser = FindParserFileL(aFile);	
-	
 	if(KErrNone == IsSupportedMimeType(aMimeType))	
 	{
 		iParser = FindParserFileL(aFile, aMimeType);
@@ -512,10 +507,9 @@
 		User::Leave(KErrNotSupported);		
 	}
 	
-	//iParser = FindParserFileL(aFile);
 	if ( iParser )
 	{
-		iParser->ParseL(aWantedFields, *iContainer);
+		iParser->CommonParseL((CMetaDataSourceFile*)iSource, aWantedFields, *iContainer);
 	}
 	}
 
@@ -703,7 +697,7 @@
 		}
 	if ( iParser )
 		{
-		iParser->ParseL(aWantedFields, *iContainer);
+		iParser->CommonParseL((CMetaDataSourceFile*)iSource, aWantedFields, *iContainer);
 		}
 	}	
 	
--- a/mmserv/radioutility/radio_utility/group/Radio_Utility.mmp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/group/Radio_Utility.mmp	Fri Apr 30 19:18:45 2010 -0500
@@ -46,3 +46,4 @@
 LIBRARY		euser.lib 
 LIBRARY		RadioSession.lib
 LIBRARY		CustomInterfaceUtility.lib 
+LIBRARY		flogger.lib 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/inc/trace.h	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,596 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Trace macro definitions.
+*
+*/
+
+#ifndef TRACE_H
+#define TRACE_H
+
+#include <e32base.h> // TCleanupItem
+#include "traceconfiguration.hrh"
+
+#ifdef TRACE_INTO_FILE
+#include <flogger.h> // RFileLogger
+#else
+#include <e32debug.h> // RDebug
+#endif
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+//
+
+// NOTE!
+// Replace all COMPONENT_NAME occurnaces with your own component / module name.
+
+/**
+* Prefix trace macro to complete tracing with component name.
+* Returns TDesC which can be used directly with RDebug or RFileLogger.
+*/
+#define _PREFIX_TRACE( aMsg ) TPtrC( (const TText*)L"[Radio_Utility]: " L##aMsg )
+
+/**
+* Prefix error trace
+*/
+#define _PREFIX_ERROR( aMsg ) _PREFIX_TRACE( "[ERROR: %d]: " L##aMsg )
+
+/**
+* Prefix info trace.
+*/
+#define _PREFIX_INFO( aMsg ) _PREFIX_TRACE( "[INFO]: " L##aMsg )
+
+/**
+* Prefix macro for strings
+*/
+#define _PREFIX_CHAR( aMsg ) (const char*)"[Radio_Utility]: " ##aMsg
+
+/**
+* Define needed directories if TRACE_INTO_FILE macro in use
+*/
+#ifdef TRACE_INTO_FILE
+
+    _LIT( KDir, "radio" );
+    _LIT( KFile, "radio.txt" );
+    _LIT( KFullPath, "c:\\logs\\radio\\" );
+
+#endif
+
+//-----------------------------------------------------------------------------
+// Error trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef ERROR_TRACE
+
+    /**
+    * Error trace definitions.
+    */
+    #ifdef TRACE_INTO_FILE
+
+        #define ERROR( aErr, aMsg )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr );\
+                }\
+            }
+        #define ERROR_1( aErr, aMsg, aP1 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1 );\
+                }\
+            }
+        #define ERROR_2( aErr, aMsg, aP1, aP2 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
+                }\
+            }
+        #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
+                }\
+            }
+        #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4 );\
+                }\
+            }
+        #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
+                }\
+            }
+        #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
+                }\
+            }
+            
+    #else//TRACE_INTO_FILE not defined
+    
+        #define ERROR( aErr, aMsg )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr );\
+                }\
+            }
+        #define ERROR_1( aErr, aMsg, aP1 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1 );\
+                }\
+            }
+        #define ERROR_2( aErr, aMsg, aP1, aP2 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
+                }\
+            }
+        #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
+                }\
+            }
+        #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4 );\
+                }\
+            }
+        #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
+                }\
+            }
+        #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
+            {\
+            if( aErr < KErrNone )\
+                {\
+                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5, aP6 );\
+                }\
+            }
+    
+    #endif//TRACE_INTO_FILE
+
+    #define ERROR_GEN( aMsg ) ERROR( KErrGeneral, aMsg )
+    #define ERROR_GEN_1( aMsg, aP1 ) ERROR_1( KErrGeneral, aMsg, aP1 )
+    #define ERROR_GEN_2( aMsg, aP1, aP2 ) ERROR_2( KErrGeneral, aMsg, aP1, aP2 )
+    #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) ERROR_3( KErrGeneral, aMsg, aP1, aP3 )
+    #define ERROR_GEN_4( aMsg, aP1, aP2, aP3, aP4 ) ERROR_4( KErrGeneral, aMsg, aP1, aP3, aP4 )
+    #define ERROR_GEN_5( aMsg, aP1, aP2, aP3, aP4, aP5 ) ERROR_5( KErrGeneral, aMsg, aP1, aP3, aP4, aP5 )
+    #define ERROR_GEN_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 ) ERROR_6( KErrGeneral, aMsg, aP1, aP3, aP4, aP5, aP6 )
+
+#else//ERROR_TRACE not defined
+
+    #define ERROR( aErr, aMsg )
+    #define ERROR_1( aErr, aMsg, aP1 )
+    #define ERROR_2( aErr, aMsg, aP1, aP2 )
+    #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )
+    #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )
+    #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )
+    #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
+
+    #define ERROR_GEN( aMsg )
+    #define ERROR_GEN_1( aMsg, aP1 )
+    #define ERROR_GEN_2( aMsg, aP1, aP2 )
+    #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 )
+    #define ERROR_GEN_4( aMsg, aP1, aP2, aP3, aP4 )
+    #define ERROR_GEN_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
+    #define ERROR_GEN_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
+
+#endif//ERROR_TRACE
+
+//-----------------------------------------------------------------------------
+// TRAP and trace with error macro
+//-----------------------------------------------------------------------------
+//
+#define TRAP_ERROR( aErr, aFunction )\
+    {\
+    TRAP( aErr, aFunction );\
+    TPtrC8 file( ( TText8* )__FILE__ );\
+    ERROR_2( aErr, "Trapped leave in '%S' line %d", &file, __LINE__);\
+    }
+
+//-----------------------------------------------------------------------------
+// Info trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef INFO_TRACE
+
+    /**
+    * Info log message definitions.
+    */
+    #ifdef TRACE_INTO_FILE
+    
+        #define INFO( aMsg )\
+            {\
+            RFileLogger::Write( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ) );\
+            }
+        #define INFO_1( aMsg, aP1 )\
+            {\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1 );\
+            }
+        #define INFO_2( aMsg, aP1, aP2 )\
+            {\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2 );\
+            }
+        #define INFO_3( aMsg, aP1, aP2, aP3 )\
+            {\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\
+            }
+        #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
+            {\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4 );\
+            }
+        #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
+            {\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
+            }
+        #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
+            {\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5, aP6 );\
+            }
+
+    #else//TRACE_INTO_FILE not defined
+
+        #define INFO( aMsg )\
+            {\
+            RDebug::Print( _PREFIX_INFO( aMsg ) );\
+            }
+        #define INFO_1( aMsg, aP1 )\
+            {\
+            RDebug::Print( _PREFIX_INFO( aMsg ), aP1 );\
+            }
+        #define INFO_2( aMsg, aP1, aP2 )\
+            {\
+            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2 );\
+            }
+        #define INFO_3( aMsg, aP1, aP2, aP3 )\
+            {\
+            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\
+            }
+        #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
+            {\
+            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4 );\
+            }
+        #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
+            {\
+            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
+            }
+        #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
+            {\
+            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5, aP6 );\
+            }
+
+    #endif//TRACE_INTO_FILE
+        
+#else//INFO_TRACE not defined
+
+    #define INFO( aMsg )
+    #define INFO_1( aMsg, aP1 )
+    #define INFO_2( aMsg, aP1, aP2 )
+    #define INFO_3( aMsg, aP1, aP2, aP3 )
+    #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )
+    #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
+    #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
+
+#endif//INFO_TRACE
+
+//-----------------------------------------------------------------------------
+// Trace current client thread name and process id
+//-----------------------------------------------------------------------------
+//
+#ifdef CLIENT_TRACE
+
+    #define CLIENT_PROCESS\
+        {\
+        CLIENT_PROCESS_PREFIX( "" );\
+        }        
+
+    #define CLIENT_PROCESS_PREFIX( aPrefix )\
+        {\
+        RProcess process;\
+        TPtrC name( process.Name() );\
+        TSecureId sid( process.SecureId() );\
+        TPtrC prefix( _S( aPrefix ) );\
+        if( prefix.Length() )\
+            {\
+            INFO_3( "%S: CLIENT - Name: [%S], Sid: [0x%x]", &prefix, &name, sid.iId );\
+            }\
+        else\
+            {\
+            INFO_2( "CLIENT - Name: [%S], Sid: [0x%x]", &name, sid.iId );\
+            }\
+        process.Close();\
+        }        
+
+    #define CLIENT_MESSAGE( aMsg )\
+        {\
+        CLIENT_MESSAGE_PREFIX( "", aMsg );\
+        }
+
+    #define CLIENT_MESSAGE_PREFIX( aPrefix, aMsg )\
+        {\
+        RThread thread;\
+        TInt err = aMsg.Client( thread );\
+        if( err == KErrNone )\
+            {\
+            RProcess process;\
+            err = thread.Process( process );\
+            if( err == KErrNone )\
+                {\
+                TPtrC threadName( thread.Name() );\
+                TUid processUid( process.SecureId() );\
+                TPtrC prefix( _S( aPrefix ) );\
+                if( prefix.Length() )\
+                    {\
+                    INFO_4( "%S: MSG - Name: [%S], Sid: [0x%x], Message ID: [%d]",\
+                        &prefix,\
+                        &threadName,\
+                        processUid,\
+                        aMsg.Function() );\
+                    }\
+                else\
+                    {\
+                    INFO_3( "MSG - Name: [%S], Sid: [0x%x], Message ID: [%d]",\
+                        &threadName,\
+                        processUid,\
+                        aMsg.Function() );\
+                    }\
+                }\
+            process.Close();\
+            }\
+        thread.Close();\
+        }
+
+#else
+
+    #define CLIENT_PROCESS
+    #define CLIENT_PROCESS_PREFIX( aPrefix )
+    #define CLIENT_MESSAGE( aMsg )
+    #define CLIENT_MESSAGE_PREFIX( aPrefix, aMsg )
+
+#endif
+
+//-----------------------------------------------------------------------------
+// Function trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef FUNC_TRACE
+
+    /**
+    * Function logging definitions.
+    */
+    #ifdef TRACE_INTO_FILE
+    
+        #define FUNC( aMsg, aP1 )\
+            {\
+            TPtrC8 trace( _S8( aMsg ) );\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, trace, aP1 );\
+            }\
+    
+    #else//TRACE_INTO_FILE not defined
+    
+        #define FUNC( aMsg, aP1 )\
+            {\
+            RDebug::Printf( aMsg, aP1 );\
+            }\
+    
+    #endif//TRACE_INTO_FILE
+        
+    /**
+    * Function trace helper class.
+    * 
+    * NOTE:
+    * LC -methods cannot be trapped. Therefore if LC -method leaves
+    * END trace is used instead of LEAVE trace.
+    * If you have an idea how to round this problem please tell.
+    */
+    _LIT8( KFuncNameTerminator, "(" );
+    _LIT8( KFuncLeavePatternL, "L" );
+    class TFuncLog
+        {
+        public:
+            static void Cleanup( TAny* aPtr )
+                {
+                TFuncLog* self = static_cast< TFuncLog* >( aPtr );
+                self->iLeft = ETrue;
+                FUNC( _PREFIX_CHAR("%S-LEAVE"), &self->iFunc ); // Leave detected
+                }
+            inline TFuncLog( const char* aFunc ) :
+                    iFunc( aFunc ? _S8( aFunc ) : _S8("") ),
+                    iLeft( EFalse ),
+                    iCleanupItem( Cleanup, this ),
+                    iCanLeave( EFalse )
+                {
+                TInt pos( iFunc.Find( KFuncNameTerminator ) );
+                if( pos != KErrNotFound )
+                    {
+                    iFunc.Set( iFunc.Left( pos ) );
+                    iCanLeave = !iFunc.Right( KFuncLeavePatternL().Length() ).Compare( KFuncLeavePatternL );
+                    if ( iCanLeave )
+                        {
+                        CleanupStack::PushL( iCleanupItem ); // Ignore warnings
+                        }
+                    }
+                FUNC( _PREFIX_CHAR("%S-START"), &iFunc );
+                }
+
+            inline ~TFuncLog()
+                {
+                if ( !iLeft )
+                    {
+                    if ( iCanLeave )
+                        {
+                        CleanupStack::Pop( this ); // Pop the cleanup item
+                        }
+                    FUNC( _PREFIX_CHAR("%S-END"), &iFunc ); // Normally finished
+                    }
+                }
+
+        private: // Data
+            TPtrC8 iFunc;
+            TBool iLeft;
+            TCleanupItem iCleanupItem;
+            TBool iCanLeave;
+        };
+    #define FUNC_LOG TFuncLog _fl( __PRETTY_FUNCTION__ );
+    
+#else//FUNC_TRACE not defined
+
+    #define FUNC_LOG
+
+#endif//FUNC_TRACE
+
+//-----------------------------------------------------------------------------
+// Timestamp trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef TIMESTAMP_TRACE
+
+    #ifdef TRACE_INTO_FILE
+    
+        #define TIMESTAMP( aCaption )\
+            {\
+            TTime t;\
+            t.HomeTime();\
+            TDateTime dt = t.DateTime();\
+            _LIT( KCaption, aCaption );\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend,\
+                _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\
+                    &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
+            }
+
+    #else//TRACE_INTO_FILE not defined
+    
+        #define TIMESTAMP( aCaption )\
+            {\
+            TTime t;\
+            t.HomeTime();\
+            TDateTime dt = t.DateTime();\
+            _LIT( KCaption, aCaption );\
+            RDebug::Print( _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\
+                &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
+            }
+
+    #endif//TRACE_INTO_FILE
+
+#else//TIMESTAMP_TRACE not defined
+
+    #define TIMESTAMP( aCaption )
+
+#endif//TIMESTAMP_TRACE
+
+#ifdef HEAP_TRACE
+
+    #ifdef TRACE_INTO_FILE
+
+        #define HEAP( aMsg )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace );\
+            }
+        #define HEAP_1( aMsg, aP1 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
+            }
+        #define HEAP_2( aMsg, aP1, aP2 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
+            }
+        #define HEAP_3( aMsg, aP1, aP2, aP3 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
+            }
+        #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
+            }
+
+    #else//TRACE_INTO_FILE not defined
+
+        #define HEAP( aMsg )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace );\
+            }
+        #define HEAP_1( aMsg, aP1 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
+            }
+        #define HEAP_2( aMsg, aP1, aP2 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
+            }
+        #define HEAP_3( aMsg, aP1, aP2, aP3 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
+            }
+        #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
+            {\
+            TInt totalAllocSpace = 0;\
+            User::AllocSize( totalAllocSpace );\
+            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
+            }
+
+    #endif//TRACE_INTO_FILE
+
+#else//HEAP_TRACE not defined
+
+    #define HEAP( aMsg )
+    #define HEAP_1( aMsg, aP1 )
+    #define HEAP_2( aMsg, aP1, aP2 )
+    #define HEAP_3( aMsg, aP1, aP2, aP3 )
+    #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )
+
+#endif//HEAP_TRACE
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/inc/traceconfiguration.hrh	Fri Apr 30 19:18:45 2010 -0500
@@ -0,0 +1,78 @@
+/*
+* Copyright (C) 2009 Nokia Corporation And/Or Its Subsidiary(-Ies).
+* All Rights Reserved.
+* This Component And The Accompanying Materials Are Made Available
+* Under The Terms Of The License "Symbian Foundation License V1.0"
+* Which Accompanies This Distribution, And Is Available
+* At The Url "Http://Www.Symbianfoundation.Org/Legal/Sfl-V10.Html".
+*
+* Initial Contributors:
+* Nokia Corporation - Initial Contribution.
+*
+* Contributors:
+*
+* Description:
+* Trace Macro Configurations.
+*
+*/
+
+#ifndef TRACECONFIGURATION_HRH
+#define TRACECONFIGURATION_HRH
+
+//-----------------------------------------------------------------------------
+// Trace definitions
+//-----------------------------------------------------------------------------
+//
+
+/**
+* Error trace enabled
+*/
+#ifdef _DEBUG
+    #define ERROR_TRACE
+#else
+    #undef ERROR_TRACE
+#endif
+
+/**
+* Info trace enabled
+*/
+#ifdef _DEBUG
+    #define INFO_TRACE
+#else
+    #undef INFO_TRACE
+#endif
+
+/**
+* Timestamp tracing on
+*/
+#ifdef _DEBUG
+    #define TIMESTAMP_TRACE
+#else
+    #undef TIMESTAMP_TRACE
+#endif
+
+/**
+* Tracing current client process and thread
+*/
+#ifdef _DEBUG
+    #define CLIENT_TRACE
+#else
+    #undef CLIENT_TRACE
+#endif
+
+/**
+* Function trace enabled
+*/
+#ifdef _DEBUG
+    #define FUNC_TRACE
+#else
+    #undef FUNC_TRACE
+#endif
+
+/**
+* Tracing into file enabled, default RDebug
+*/
+#undef TRACE_INTO_FILE
+
+#endif
+
--- a/mmserv/radioutility/radio_utility/src/RadioFmTunerUtility.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioFmTunerUtility.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -18,6 +18,7 @@
 
 #include <RadioFmTunerUtility.h>
 #include "RadioFmTunerUtilityBody.h"
+#include "trace.h"
 
 // -----------------------------------------------------------------------------
 // CRadioFmTunerUtility::NewL
@@ -28,6 +29,7 @@
     RRadioSession& aRadioSession,
     MRadioFmTunerObserver& aObserver)
     {
+    FUNC_LOG;
     CRadioFmTunerUtility* self = new(ELeave) CRadioFmTunerUtility;
     CleanupStack::PushL(self);
     self->iBody = CRadioFmTunerUtility::CBody::NewL(aRadioSession, aObserver);
@@ -42,6 +44,7 @@
 //
 EXPORT_C CRadioFmTunerUtility::~CRadioFmTunerUtility()
     {
+    FUNC_LOG;
     delete iBody;
     }
 
@@ -52,6 +55,7 @@
 //
 CRadioFmTunerUtility::CRadioFmTunerUtility()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -61,6 +65,7 @@
 //
 EXPORT_C void CRadioFmTunerUtility::RequestTunerControl()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->RequestTunerControl();
     }
@@ -72,6 +77,7 @@
 //
 EXPORT_C void CRadioFmTunerUtility::Close()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->Close();
     }
@@ -84,6 +90,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::GetCapabilities(
     TFmTunerCapabilities& aCaps)
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetCapabilities(aCaps);
     }
@@ -97,6 +104,7 @@
     TBool aEnable )
 
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->EnableTunerInOfflineMode(aEnable);
     }
@@ -109,6 +117,7 @@
 EXPORT_C void CRadioFmTunerUtility::SetFrequency(
     TInt aFrequency )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->SetFrequency(aFrequency);
     }
@@ -120,6 +129,7 @@
 //
 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequency()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelSetFrequency();
     }
@@ -132,6 +142,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::GetFrequency(
     TInt& aFrequency ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetFrequency(aFrequency);
     }
@@ -144,6 +155,7 @@
 EXPORT_C void CRadioFmTunerUtility::SetFrequencyRange(
     TFmRadioFrequencyRange aRange )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->SetFrequencyRange(aRange);
     }
@@ -155,6 +167,7 @@
 //
 EXPORT_C void CRadioFmTunerUtility::CancelSetFrequencyRange()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelSetFrequencyRange();
     }
@@ -169,6 +182,7 @@
     TInt& aMinFreq,
     TInt& aMaxFreq ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetFrequencyRange(aRange, aMinFreq, aMaxFreq);
     }
@@ -181,6 +195,7 @@
 EXPORT_C void CRadioFmTunerUtility::StationSeek(
     TBool aUpwards )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->StationSeek(aUpwards);
     }
@@ -192,6 +207,7 @@
 //
 EXPORT_C void CRadioFmTunerUtility::CancelStationSeek()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelStationSeek();
     }
@@ -204,6 +220,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::GetSignalStrength(
     TInt& aSignalStrength ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetSignalStrength(aSignalStrength);
     }
@@ -216,6 +233,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::GetMaxSignalStrength(
     TInt& aMaxSignalStrength ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetMaxSignalStrength(aMaxSignalStrength);
     }
@@ -228,6 +246,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::GetStereoMode(
     TBool& aStereo ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetStereoMode(aStereo);
     }
@@ -240,6 +259,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::ForceMonoReception(
     TBool aForcedMono )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->ForceMonoReception(aForcedMono);
     }
@@ -252,6 +272,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::GetForcedMonoReception(
     TBool& aForcedMono ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetForcedMonoReception(aForcedMono);
     }
@@ -264,6 +285,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::SetSquelch(
     TBool aSquelch )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->SetSquelch(aSquelch);
     }
@@ -276,6 +298,7 @@
 EXPORT_C TInt CRadioFmTunerUtility::GetSquelch(
     TBool& aSquelch ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetSquelch(aSquelch);
     }
--- a/mmserv/radioutility/radio_utility/src/RadioFmTunerUtilityBody.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioFmTunerUtilityBody.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -18,6 +18,7 @@
 
 #include "RadioFmTunerUtilityBody.h"
 #include "RadioUtilityBody.h"
+#include "trace.h"
 
 // -----------------------------------------------------------------------------
 // CRadioFmTunerUtility::CBody::NewL
@@ -28,9 +29,8 @@
     RRadioSession& aRadioSession,
     MRadioFmTunerObserver& aObserver )
     {
-    CRadioFmTunerUtility::CBody* s = new(ELeave) CRadioFmTunerUtility::CBody();
-    s->iRadioFmTunerUtilityClient = &aObserver;
-    s->iRadioSession = &aRadioSession;
+    FUNC_LOG;
+    CRadioFmTunerUtility::CBody* s = new(ELeave) CRadioFmTunerUtility::CBody( aRadioSession, aObserver );
     CleanupStack::PushL(s);
     s->ConstructL();
     CleanupStack::Pop();
@@ -44,14 +44,21 @@
 //
 void CRadioFmTunerUtility::CBody::ConstructL()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
 // CRadioFmTunerUtility::CBody::CBody
 // -----------------------------------------------------------------------------
 //
-CRadioFmTunerUtility::CBody::CBody()
+CRadioFmTunerUtility::CBody::CBody( 
+        RRadioSession& aRadioSession,
+        MRadioFmTunerObserver& aObserver )
+    : iRadioSession(aRadioSession),
+    iRadioFmTunerUtilityClient(aObserver)
+   
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -60,6 +67,7 @@
 //
 CRadioFmTunerUtility::CBody::~CBody()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -69,7 +77,8 @@
 //
 void CRadioFmTunerUtility::CBody::RequestTunerControl()
     {
-    iRadioSession->RequestTunerControl( ERsTunerFm );
+    FUNC_LOG;
+    iRadioSession.RequestTunerControl( ERsTunerFm );
     }
 
 // -----------------------------------------------------------------------------
@@ -79,6 +88,7 @@
 //
 void CRadioFmTunerUtility::CBody::Close()
     {
+    FUNC_LOG;
     // Consider releasing tuner control here.
     }
 
@@ -90,8 +100,9 @@
 TInt CRadioFmTunerUtility::CBody::GetCapabilities(
     TFmTunerCapabilities& aCaps ) const
     {
+    FUNC_LOG;
     TRsTunerCapabilities caps;
-    TInt error = iRadioSession->GetTunerCapabilities( caps );
+    TInt error = iRadioSession.GetTunerCapabilities( caps );
 
     if ( !error )
         {
@@ -112,7 +123,8 @@
 TInt CRadioFmTunerUtility::CBody::EnableTunerInOfflineMode(
     TBool aEnable )
     {
-    return iRadioSession->EnableTunerInOfflineMode( aEnable );
+    FUNC_LOG;
+    return iRadioSession.EnableTunerInOfflineMode( aEnable );
     }
 
 // -----------------------------------------------------------------------------
@@ -125,9 +137,10 @@
     TInt& aMinFreq,
     TInt& aMaxFreq ) const
     {
+    FUNC_LOG;
 
     TRsFrequencyRange range;
-    TInt error = iRadioSession->GetFrequencyRange( range, aMinFreq, aMaxFreq );
+    TInt error = iRadioSession.GetFrequencyRange( range, aMinFreq, aMaxFreq );
     if ( !error )
         {
     switch ( range )
@@ -142,10 +155,7 @@
             break;
             }
         }
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioFmTunerUtility::CBody::GetFrequencyRange, aRange = %d, aMinFreq = %d, aMaxFreq = %d"),
-        aRange, aMinFreq, aMaxFreq);
-#endif
+    INFO_3("aRange = %d, aMinFreq = %d, aMaxFreq = %d", aRange, aMinFreq, aMaxFreq);
     return error;
     }
 
@@ -158,9 +168,8 @@
 void CRadioFmTunerUtility::CBody::SetFrequencyRange(
     TFmRadioFrequencyRange aRange )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioFmTunerUtility::CBody::SetFrequencyRange, aRange = %d"), aRange);
-#endif
+    FUNC_LOG;
+    INFO_1("aRange = %d", aRange);
     TRsFrequencyRange range = ERsRangeFmEuroAmerica;    //default
     switch (aRange)
         {
@@ -173,7 +182,7 @@
         default:
             break;
         }
-    iRadioSession->SetFrequencyRange( range );
+    iRadioSession.SetFrequencyRange( range );
     }
 
 
@@ -184,7 +193,8 @@
 //
 void CRadioFmTunerUtility::CBody::CancelSetFrequencyRange()
     {
-    iRadioSession->CancelSetFrequencyRange();
+    FUNC_LOG;
+    iRadioSession.CancelSetFrequencyRange();
     }
 
 // -----------------------------------------------------------------------------
@@ -195,10 +205,9 @@
 void CRadioFmTunerUtility::CBody::SetFrequency(
     TInt aFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioFmTunerUtility::CBody::SetFrequency, aFrequency = %d"), aFrequency);
-#endif
-    iRadioSession->SetFrequency(aFrequency);
+    FUNC_LOG;
+    INFO_1("aFrequency = %d", aFrequency);
+    iRadioSession.SetFrequency(aFrequency);
     }
 
 // -----------------------------------------------------------------------------
@@ -209,7 +218,8 @@
 //
 void CRadioFmTunerUtility::CBody::CancelSetFrequency()
     {
-    iRadioSession->CancelSetFrequency();
+    FUNC_LOG;
+    iRadioSession.CancelSetFrequency();
     }
 
 // -----------------------------------------------------------------------------
@@ -220,7 +230,8 @@
 TInt CRadioFmTunerUtility::CBody::GetFrequency(
     TInt& aFrequency ) const
     {
-    return iRadioSession->GetFrequency(aFrequency);
+    FUNC_LOG;
+    return iRadioSession.GetFrequency(aFrequency);
     }
 
 // -----------------------------------------------------------------------------
@@ -231,10 +242,9 @@
 void CRadioFmTunerUtility::CBody::StationSeek(
     TBool aUpwards )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioFmTunerUtility::CBody::StationSeek, aUpwards = %d"), aUpwards);
-#endif
-    iRadioSession->StationSeek(aUpwards);
+    FUNC_LOG;
+    INFO_1("aUpwards = %d", aUpwards);
+    iRadioSession.StationSeek(aUpwards);
     }
 
 // -----------------------------------------------------------------------------
@@ -244,7 +254,8 @@
 //
 void CRadioFmTunerUtility::CBody::CancelStationSeek()
     {
-    iRadioSession->CancelStationSeek();
+    FUNC_LOG;
+    iRadioSession.CancelStationSeek();
     }
 
 // -----------------------------------------------------------------------------
@@ -255,7 +266,8 @@
 TInt CRadioFmTunerUtility::CBody::GetSignalStrength(
     TInt& aSignalStrength ) const
     {
-    return iRadioSession->GetSignalStrength(aSignalStrength);
+    FUNC_LOG;
+    return iRadioSession.GetSignalStrength(aSignalStrength);
     }
 
 // -----------------------------------------------------------------------------
@@ -266,7 +278,8 @@
 TInt CRadioFmTunerUtility::CBody::GetMaxSignalStrength(
     TInt& aMaxSignalStrength ) const
     {
-    return iRadioSession->GetMaxSignalStrength(aMaxSignalStrength);
+    FUNC_LOG;
+    return iRadioSession.GetMaxSignalStrength(aMaxSignalStrength);
     }
 
 // -----------------------------------------------------------------------------
@@ -277,7 +290,8 @@
 TInt CRadioFmTunerUtility::CBody::GetStereoMode(
     TBool& aStereo ) const
     {
-    return iRadioSession->GetStereoMode(aStereo);
+    FUNC_LOG;
+    return iRadioSession.GetStereoMode(aStereo);
     }
 
 // -----------------------------------------------------------------------------
@@ -288,7 +302,8 @@
 TInt CRadioFmTunerUtility::CBody::ForceMonoReception(
     TBool aForcedMono)
     {
-    return iRadioSession->ForceMonoReception(aForcedMono);
+    FUNC_LOG;
+    return iRadioSession.ForceMonoReception(aForcedMono);
     }
 
 // -----------------------------------------------------------------------------
@@ -299,7 +314,8 @@
 TInt CRadioFmTunerUtility::CBody::GetForcedMonoReception(
     TBool& aForcedMono ) const
     {
-    return iRadioSession->GetForceMonoReception(aForcedMono);
+    FUNC_LOG;
+    return iRadioSession.GetForceMonoReception(aForcedMono);
     }
 
 // -----------------------------------------------------------------------------
@@ -310,7 +326,8 @@
 TInt CRadioFmTunerUtility::CBody::SetSquelch(
     TBool aSquelch )
     {
-    return iRadioSession->SetSquelch(aSquelch);
+    FUNC_LOG;
+    return iRadioSession.SetSquelch(aSquelch);
     }
 
 // -----------------------------------------------------------------------------
@@ -321,7 +338,8 @@
 TInt CRadioFmTunerUtility::CBody::GetSquelch(
     TBool& aSquelch ) const
     {
-    return iRadioSession->GetSquelch(aSquelch);
+    FUNC_LOG;
+    return iRadioSession.GetSquelch(aSquelch);
     }
 
 // End of File
--- a/mmserv/radioutility/radio_utility/src/RadioFmTunerUtilityBody.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioFmTunerUtilityBody.h	Fri Apr 30 19:18:45 2010 -0500
@@ -233,14 +233,14 @@
 private:
 
     void ConstructL();
-    CBody();
+    CBody( RRadioSession& aRadioSession, MRadioFmTunerObserver& aObserver );
 
 private: // data
 
     // The radio server session
-    RRadioSession* iRadioSession; // not own
+    RRadioSession& iRadioSession;
     // Tuner utility observer
-    MRadioFmTunerObserver* iRadioFmTunerUtilityClient; // not own
+    MRadioFmTunerObserver& iRadioFmTunerUtilityClient;
     };
 
 #endif  // C_RADIOFMTUNERUTILITY_H
--- a/mmserv/radioutility/radio_utility/src/RadioMonitor.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioMonitor.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -17,6 +17,7 @@
 
 
 #include "RadioMonitorBody.h"
+#include "trace.h"
 
 
 // ======== MEMBER FUNCTIONS ========
@@ -29,6 +30,7 @@
 EXPORT_C CRadioMonitor* CRadioMonitor::NewL(
     MRadioMonitorObserver& aObserver )
     {
+    FUNC_LOG;
     CRadioMonitor* self = new(ELeave) CRadioMonitor( aObserver );
     CleanupStack::PushL(self);
     self->iBody = CRadioMonitor::CBody::NewL( aObserver );
@@ -42,6 +44,7 @@
 //
 EXPORT_C CRadioMonitor::~CRadioMonitor()
     {
+    FUNC_LOG;
     delete iBody;
     }
 
@@ -53,6 +56,7 @@
 CRadioMonitor::CRadioMonitor(
     MRadioMonitorObserver& /*aObserver*/ )
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -63,6 +67,7 @@
 //
 EXPORT_C TBool CRadioMonitor::IsRadioOn() const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->IsRadioOn();
     }
--- a/mmserv/radioutility/radio_utility/src/RadioMonitorBody.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioMonitorBody.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -19,6 +19,13 @@
 #include <RadioMonitor.h>
 #include "RadioMonitorBody.h"
 #include "RadioServerData.h"
+#include "trace.h"
+
+// This has to be the last include. 
+#ifdef STUB_CONSTELLATION
+#   include "RadioStubManager.h"
+#   define KRadioServerPropertyCategory KStub_KRadioServerPropertyCategory
+#endif //STUB_CONSTELLATION
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -30,8 +37,8 @@
 CRadioMonitor::CBody* CRadioMonitor::CBody::NewL(
     MRadioMonitorObserver& aObserver )
     {
-    CRadioMonitor::CBody* s = new(ELeave) CRadioMonitor::CBody();
-    s->iRadioMonitorClient = &aObserver;
+    FUNC_LOG;
+    CRadioMonitor::CBody* s = new(ELeave) CRadioMonitor::CBody( aObserver );
     CleanupStack::PushL(s);
     s->ConstructL();
     CleanupStack::Pop();
@@ -44,6 +51,7 @@
 //
 CRadioMonitor::CBody::~CBody()
     {
+    FUNC_LOG;
     Cancel();
     iProperty.Close();
     }
@@ -53,9 +61,11 @@
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
-CRadioMonitor::CBody::CBody() :
-    CActive(EPriorityStandard)
+CRadioMonitor::CBody::CBody( MRadioMonitorObserver& aObserver ) :
+    CActive(EPriorityStandard),
+    iRadioMonitorClient(aObserver)
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -65,6 +75,7 @@
 //
 void CRadioMonitor::CBody::ConstructL()
     {
+    FUNC_LOG;
     CActiveScheduler::Add(this);
 
     // Attach property
@@ -82,6 +93,7 @@
 //
 TBool CRadioMonitor::CBody::IsRadioOn() const
     {
+    FUNC_LOG;
     TBool radioState = ERadioStateOff;
     RProperty::Get(KRadioServerPropertyCategory,
                    KRadioServPsMonitorState,
@@ -97,6 +109,7 @@
 //
 void CRadioMonitor::CBody::RunL()
     {
+    FUNC_LOG;
     TBool radioState = ERadioStateOff;
 
     // Resubscribe before processing new value to prevent missing updates
@@ -106,11 +119,11 @@
     TInt error = iProperty.Get(radioState);
     if ( error == KErrNone )
         {
-        iRadioMonitorClient->MrmEvent((TRadioMonitorEvent)radioState);
+        iRadioMonitorClient.MrmEvent((TRadioMonitorEvent)radioState);
         }
     else if ( error == KErrNotFound )
         {
-        iRadioMonitorClient->MrmEvent(ERadioStateOff);
+        iRadioMonitorClient.MrmEvent(ERadioStateOff);
         }
     else
         {
@@ -125,6 +138,7 @@
 //
 void CRadioMonitor::CBody::DoCancel()
     {
+    FUNC_LOG;
     iProperty.Cancel();
     }
 
--- a/mmserv/radioutility/radio_utility/src/RadioMonitorBody.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioMonitorBody.h	Fri Apr 30 19:18:45 2010 -0500
@@ -78,14 +78,14 @@
 private:
 
     void ConstructL();
-    CBody();
+    CBody( MRadioMonitorObserver& aObserver  );
 
 private:
 
     // The monitored P&S key
     RProperty iProperty;
     // Radio monitoring client
-    MRadioMonitorObserver* iRadioMonitorClient;
+    MRadioMonitorObserver& iRadioMonitorClient;
 
     };
 
--- a/mmserv/radioutility/radio_utility/src/RadioPlayerUtility.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioPlayerUtility.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -19,6 +19,7 @@
 #include <RadioPlayerUtility.h>
 #include "RadioPlayerUtilityBody.h"
 #include "RadioSession.h"
+#include "trace.h"
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -31,6 +32,7 @@
      RRadioSession& aRadioSession,
      MRadioPlayerObserver& aObserver)
     {
+    FUNC_LOG;
     CRadioPlayerUtility* self = new(ELeave) CRadioPlayerUtility;
     CleanupStack::PushL(self);
     self->iBody = CRadioPlayerUtility::CBody::NewL(aRadioSession, aObserver);
@@ -45,6 +47,7 @@
 //
 EXPORT_C CRadioPlayerUtility::~CRadioPlayerUtility()
     {
+    FUNC_LOG;
     delete iBody;
     }
 
@@ -55,6 +58,7 @@
 //
 CRadioPlayerUtility::CRadioPlayerUtility()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -64,6 +68,7 @@
 //
 EXPORT_C TPlayerState CRadioPlayerUtility::PlayerState() const
     {
+    FUNC_LOG;
     TPlayerState playerState;
     ASSERT(iBody);
     iBody->PlayerState(playerState);
@@ -79,6 +84,7 @@
 //
 EXPORT_C void CRadioPlayerUtility::Close()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->Close();
     }
@@ -91,6 +97,7 @@
 //
 EXPORT_C void CRadioPlayerUtility::Play()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->Play();
     }
@@ -103,6 +110,7 @@
 //
 EXPORT_C void CRadioPlayerUtility::Stop()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->Stop();
     }
@@ -115,6 +123,7 @@
 //
 EXPORT_C TInt CRadioPlayerUtility::Mute(TBool aMute)
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->Mute(aMute);
     }
@@ -127,6 +136,7 @@
 //
 EXPORT_C TBool CRadioPlayerUtility::IsMute()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->IsMute();
     }
@@ -140,6 +150,7 @@
 //
 EXPORT_C TInt CRadioPlayerUtility::SetVolume(TInt aVolume)
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->SetVolume(aVolume);
     }
@@ -152,6 +163,7 @@
 //
 EXPORT_C TInt CRadioPlayerUtility::GetVolume(TInt& aVolume) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetVolume(aVolume);
     }
@@ -165,6 +177,7 @@
 EXPORT_C TInt CRadioPlayerUtility::SetVolumeRamp(
     const TTimeIntervalMicroSeconds& aRampInterval)
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->SetVolumeRamp(aRampInterval);
     }
@@ -178,6 +191,7 @@
 EXPORT_C TInt CRadioPlayerUtility::GetMaxVolume(
     TInt& aMaxVolume ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetMaxVolume(aMaxVolume);
     }
@@ -192,6 +206,7 @@
     TInt aLeftPercentage,
     TInt aRightPercentage )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->SetBalance(aLeftPercentage, aRightPercentage);
     }
@@ -206,6 +221,7 @@
     TInt& aLeftPercentage,
     TInt& aRightPercentage ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetBalance(aLeftPercentage, aRightPercentage);
     }
@@ -219,6 +235,7 @@
 EXPORT_C TAny* CRadioPlayerUtility::CustomInterface(
     TUid aInterfaceId )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->CustomInterface(aInterfaceId);
     }
--- a/mmserv/radioutility/radio_utility/src/RadioPlayerUtilityBody.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioPlayerUtilityBody.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -20,6 +20,7 @@
 #include "RadioServerData.h"
 #include "RadioPlayerUtilityBody.h"
 #include "RadioSession.h"
+#include "trace.h"
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -33,9 +34,8 @@
     RRadioSession& aRadioSession,
     MRadioPlayerObserver& aObserver )
     {
-    CRadioPlayerUtility::CBody* s = new(ELeave) CRadioPlayerUtility::CBody();
-    s->iRadioPlayerUtilityClient = &aObserver;
-    s->iRadioSession = &aRadioSession;
+    FUNC_LOG;
+    CRadioPlayerUtility::CBody* s = new(ELeave) CRadioPlayerUtility::CBody( aRadioSession, aObserver );
     CleanupStack::PushL(s);
     s->ConstructL();
     CleanupStack::Pop();
@@ -49,14 +49,20 @@
 //
 void CRadioPlayerUtility::CBody::ConstructL()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
 // CRadioPlayerUtility::CBody::CBody
 // -----------------------------------------------------------------------------
 //
-CRadioPlayerUtility::CBody::CBody()
+CRadioPlayerUtility::CBody::CBody(
+        RRadioSession& aRadioSession,
+        MRadioPlayerObserver& aObserver )
+    :iRadioSession(aRadioSession),
+    iRadioPlayerUtilityClient(aObserver)
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -65,6 +71,7 @@
 //
 CRadioPlayerUtility::CBody::~CBody()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -77,9 +84,10 @@
 void CRadioPlayerUtility::CBody::PlayerState(
     TPlayerState& aPlayerState ) const
     {
+    FUNC_LOG;
     TRsPlayerState playerState;
 
-    if ( !iRadioSession->PlayerState( playerState ) )
+    if ( !iRadioSession.PlayerState( playerState ) )
         {
         aPlayerState = (TPlayerState)playerState;
         }
@@ -98,7 +106,8 @@
 //
 void CRadioPlayerUtility::CBody::Close()
     {
-    iRadioSession->Stop( ETrue );
+    FUNC_LOG;
+    iRadioSession.Stop( ETrue );
     }
 
 // -----------------------------------------------------------------------------
@@ -108,7 +117,8 @@
 //
 void CRadioPlayerUtility::CBody::Play()
     {
-    iRadioSession->Play();
+    FUNC_LOG;
+    iRadioSession.Play();
     }
 
 // -----------------------------------------------------------------------------
@@ -118,7 +128,8 @@
 //
 void CRadioPlayerUtility::CBody::Stop()
     {
-    iRadioSession->Stop();
+    FUNC_LOG;
+    iRadioSession.Stop();
     }
 
 // -----------------------------------------------------------------------------
@@ -129,7 +140,8 @@
 TInt CRadioPlayerUtility::CBody::Mute(
     TBool aMute )
     {
-    return iRadioSession->Mute( aMute );
+    FUNC_LOG;
+    return iRadioSession.Mute( aMute );
     }
 
 // -----------------------------------------------------------------------------
@@ -139,8 +151,9 @@
 //
 TBool CRadioPlayerUtility::CBody::IsMute()
     {
+    FUNC_LOG;
     TBool Mute = EFalse;
-    iRadioSession->GetMuteStatus( Mute );
+    iRadioSession.GetMuteStatus( Mute );
     return Mute;
     }
 
@@ -152,7 +165,8 @@
 TInt CRadioPlayerUtility::CBody::SetVolume(
     TInt aVolume )
     {
-    return iRadioSession->SetVolume( aVolume );
+    FUNC_LOG;
+    return iRadioSession.SetVolume( aVolume );
     }
 
 // -----------------------------------------------------------------------------
@@ -163,7 +177,8 @@
 TInt CRadioPlayerUtility::CBody::GetVolume(
     TInt& aVolume ) const
     {
-    return iRadioSession->GetVolume( aVolume );
+    FUNC_LOG;
+    return iRadioSession.GetVolume( aVolume );
     }
 
 // -----------------------------------------------------------------------------
@@ -174,10 +189,8 @@
 TInt CRadioPlayerUtility::CBody::SetVolumeRamp(
     const TTimeIntervalMicroSeconds& aRampInterval )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioPlayerUtility::CBody::SetVolumeRamp"));
-#endif
-    return iRadioSession->SetVolumeRamp( aRampInterval );
+    FUNC_LOG;
+    return iRadioSession.SetVolumeRamp( aRampInterval );
     }
 
 // -----------------------------------------------------------------------------
@@ -188,7 +201,8 @@
 TInt CRadioPlayerUtility::CBody::GetMaxVolume(
     TInt& aMaxVolume ) const
     {
-    return iRadioSession->GetMaxVolume( aMaxVolume );
+    FUNC_LOG;
+    return iRadioSession.GetMaxVolume( aMaxVolume );
     }
 
 // -----------------------------------------------------------------------------
@@ -200,11 +214,9 @@
     TInt aLeftPercentage,
     TInt aRightPercentage )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioPlayerUtility::CBody::SetBalance, aLeftPercentage = %d, aRightPercentage = %d"),
-        aLeftPercentage, aRightPercentage);
-#endif
-    return iRadioSession->SetBalance( aLeftPercentage, aRightPercentage );
+    FUNC_LOG;
+    INFO_2("aLeftPercentage = %d, aRightPercentage = %d", aLeftPercentage, aRightPercentage);
+    return iRadioSession.SetBalance( aLeftPercentage, aRightPercentage );
     }
 
 // -----------------------------------------------------------------------------
@@ -216,7 +228,8 @@
     TInt& aLeftPercentage,
     TInt& aRightPercentage ) const
     {
-    return iRadioSession->GetBalance( aLeftPercentage, aRightPercentage );
+    FUNC_LOG;
+    return iRadioSession.GetBalance( aLeftPercentage, aRightPercentage );
     }
 
 // -----------------------------------------------------------------------------
@@ -228,13 +241,12 @@
 TAny* CRadioPlayerUtility::CBody::CustomInterface(
     TUid aInterfaceId )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioPlayerUtility::CBody::CustomInterface, aInterfaceId = %d"), aInterfaceId);
-#endif
+    FUNC_LOG;
+    INFO_1("aInterfaceId = %d", aInterfaceId);
     TAny* ci = NULL;
     CCustomInterfaceUtility* customInterfaceUtil = NULL;
 
-    TRAPD( error, customInterfaceUtil = CCustomInterfaceUtility::NewL( *iRadioSession ) );
+    TRAPD( error, customInterfaceUtil = CCustomInterfaceUtility::NewL( iRadioSession ) );
 
     if ( !error )
         {
--- a/mmserv/radioutility/radio_utility/src/RadioPlayerUtilityBody.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioPlayerUtilityBody.h	Fri Apr 30 19:18:45 2010 -0500
@@ -185,14 +185,14 @@
 private:
 
     void ConstructL();
-    CBody();
+    CBody( RRadioSession& aRadioSession, MRadioPlayerObserver& aObserver );
 
 private: // data
 
     // The radio server session
-    RRadioSession* iRadioSession; // not own
+    RRadioSession& iRadioSession;
     // Player utility observer
-    MRadioPlayerObserver* iRadioPlayerUtilityClient; // not own
+    MRadioPlayerObserver& iRadioPlayerUtilityClient;
     };
 
 #endif  // C_RADIOPLAYERUTILITY_H
--- a/mmserv/radioutility/radio_utility/src/RadioRdsUtility.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioRdsUtility.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -17,6 +17,7 @@
 
 
 #include "RadioRdsUtilityBody.h"
+#include "trace.h"
 
 // -----------------------------------------------------------------------------
 // CRadioRdsUtility::NewL
@@ -27,6 +28,7 @@
     RRadioSession& aRadioSession,
     MRadioRdsObserver& aObserver)
     {
+    FUNC_LOG;
     CRadioRdsUtility* self = new(ELeave) CRadioRdsUtility;
     CleanupStack::PushL(self);
     self->iBody = CRadioRdsUtility::CBody::NewL(aRadioSession, aObserver);
@@ -41,7 +43,8 @@
 //
 CRadioRdsUtility::~CRadioRdsUtility()
     {
-        delete iBody;
+    FUNC_LOG;
+    delete iBody;
     }
 
 // -----------------------------------------------------------------------------
@@ -51,6 +54,7 @@
 //
 CRadioRdsUtility::CRadioRdsUtility()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -59,6 +63,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::Close()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->Close();
     }
@@ -70,6 +75,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetCapabilities(
     TRdsCapabilities& aCaps ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetCapabilities(aCaps);
     }
@@ -81,6 +87,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetRdsSignalStatus(
     TBool& aRdsSignal ) const
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetRdsSignalStatus( aRdsSignal );
     }
@@ -92,6 +99,7 @@
 EXPORT_C TInt CRadioRdsUtility::NotifyRdsDataChange(
     TRdsData aRdsData )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->NotifyRdsDataChange( aRdsData );
     }
@@ -102,6 +110,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::CancelNotifyRdsDataChange()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelNotifyRdsDataChange();
     }
@@ -113,6 +122,7 @@
 EXPORT_C TInt CRadioRdsUtility::SetAutomaticSwitching(
     TBool aAuto )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->SetAutomaticSwitching(aAuto);
     }
@@ -124,6 +134,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetAutomaticSwitching(
     TBool& aAuto )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetAutomaticSwitching(aAuto);
     }
@@ -134,6 +145,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::CancelAFSearch()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelAFSearch();
     }
@@ -145,6 +157,7 @@
 EXPORT_C TInt CRadioRdsUtility::SetAutomaticTrafficAnnouncement(
     TBool aAuto )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->SetAutomaticTrafficAnnouncement(aAuto);
     }
@@ -156,6 +169,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetAutomaticTrafficAnnouncement(
     TBool& aAuto )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetAutomaticTrafficAnnouncement(aAuto);
     }
@@ -168,6 +182,7 @@
     TRdsProgrammeType aPty,
     TBool aUpwards )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->StationSeekByPTY(aPty, aUpwards);
     }
@@ -179,6 +194,7 @@
 EXPORT_C void CRadioRdsUtility::StationSeekByTA(
     TBool aSeekUp )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->StationSeekByTA(aSeekUp);
     }
@@ -190,6 +206,7 @@
 EXPORT_C void CRadioRdsUtility::StationSeekByTP(
     TBool aSeekUp )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->StationSeekByTP(aSeekUp);
     }
@@ -200,6 +217,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::CancelRdsStationSeek()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelRdsStationSeek();
     }
@@ -211,6 +229,7 @@
 EXPORT_C void CRadioRdsUtility::GetFreqByPTY(
     TRdsProgrammeType aPty )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->GetFreqByPTY( aPty );
     }
@@ -221,6 +240,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::CancelGetFreqByPTY()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelGetFreqByPTY();
     }
@@ -231,6 +251,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::GetFreqByTA()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->GetFreqByTA();
     }
@@ -241,6 +262,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::CancelGetFreqByTA()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelGetFreqByTA();
     }
@@ -252,6 +274,7 @@
 EXPORT_C void CRadioRdsUtility::GetPSByPTY(
     TRdsProgrammeType aPty )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->GetPSByPTY( aPty );
     }
@@ -262,6 +285,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::CancelGetPSByPTY()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelGetPSByPTY();
     }
@@ -272,6 +296,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::GetPSByTA()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->GetPSByTA();
     }
@@ -282,6 +307,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CRadioRdsUtility::CancelGetPSByTA()
     {
+    FUNC_LOG;
     ASSERT(iBody);
     iBody->CancelGetPSByTA();
     }
@@ -293,6 +319,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetProgrammeIdentification(
     TInt& aPi )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetProgrammeIdentification( aPi );
     }
@@ -304,6 +331,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetProgrammeType(
     TRdsProgrammeType& aPty )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetProgrammeType( aPty );
     }
@@ -315,6 +343,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetProgrammeService(
     TRdsPSName& aPs )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetProgrammeService( aPs );
     }
@@ -326,6 +355,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetRadioText(
     TRdsRadioText& aRt )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetRadioText( aRt );
     }
@@ -338,6 +368,7 @@
     TRdsRTplusClass aRtPlusClass,
     TRdsRadioText& aRtPlusData )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetRadioTextPlus( aRtPlusClass,aRtPlusData );
     }
@@ -349,6 +380,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetClockTime(
     TDateTime& aCt )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetClockTime( aCt );
     }
@@ -360,6 +392,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetTrafficAnnouncementStatus(
     TBool& aTaStatus )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetTrafficAnnouncementStatus( aTaStatus );
     }
@@ -371,6 +404,7 @@
 EXPORT_C TInt CRadioRdsUtility::GetTrafficProgrammeStatus(
     TBool& aTpStatus )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->GetTrafficProgrammeStatus( aTpStatus );
     }
--- a/mmserv/radioutility/radio_utility/src/RadioRdsUtilityBody.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioRdsUtilityBody.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -19,6 +19,7 @@
 #include "RadioRdsUtilityBody.h"
 #include "RadioServerData.h"
 #include "RadioSession.h"
+#include "trace.h"
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -31,9 +32,8 @@
     RRadioSession& aRadioSession,
     MRadioRdsObserver& aObserver )
     {
-    CRadioRdsUtility::CBody* s = new(ELeave) CRadioRdsUtility::CBody();
-    s->iRadioRdsUtilityClient = &aObserver;
-    s->iRadioSession = &aRadioSession;
+    FUNC_LOG;
+    CRadioRdsUtility::CBody* s = new(ELeave) CRadioRdsUtility::CBody( aRadioSession, aObserver );
     CleanupStack::PushL(s);
     s->ConstructL();
     CleanupStack::Pop();
@@ -47,14 +47,20 @@
 //
 void CRadioRdsUtility::CBody::ConstructL()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
 // CRadioRdsUtility::CBody::CBody
 // -----------------------------------------------------------------------------
 //
-CRadioRdsUtility::CBody::CBody()
+CRadioRdsUtility::CBody::CBody(
+        RRadioSession& aRadioSession,
+        MRadioRdsObserver& aObserver )
+    :iRadioSession(aRadioSession),
+    iRadioRdsUtilityClient(aObserver)
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -63,6 +69,7 @@
 //
 CRadioRdsUtility::CBody::~CBody()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -73,10 +80,11 @@
 //
 void CRadioRdsUtility::CBody::Close()
     {
+    FUNC_LOG;
     if ( iRdsDataReq.iRdsFunctions || iRdsDataReq.iAdditionalFunctions1 ||
          iRdsDataReq.iAdditionalFunctions2 )
         {
-        iRadioSession->CancelNotifyRdsDataChange();
+        iRadioSession.CancelNotifyRdsDataChange();
         }
     }
 
@@ -88,8 +96,9 @@
 TInt CRadioRdsUtility::CBody::GetCapabilities(
     TRdsCapabilities& aCaps ) const
     {
+    FUNC_LOG;
     TRsRdsCapabilities Caps;
-    TInt error = iRadioSession->GetRdsCapabilities(Caps);
+    TInt error = iRadioSession.GetRdsCapabilities(Caps);
     if ( !error )
         {
         aCaps.iRdsFunctions = Caps.iRdsFunctions;
@@ -107,7 +116,8 @@
 TInt CRadioRdsUtility::CBody::GetRdsSignalStatus(
     TBool& aRdsSignal ) const
     {
-    return iRadioSession->GetRdsSignalStatus( aRdsSignal );
+    FUNC_LOG;
+    return iRadioSession.GetRdsSignalStatus( aRdsSignal );
     }
 
 // -----------------------------------------------------------------------------
@@ -118,10 +128,11 @@
 TInt CRadioRdsUtility::CBody::NotifyRdsDataChange(
     TRdsData aRdsData )
     {
+    FUNC_LOG;
     iRdsDataReq.iRdsFunctions = aRdsData.iRdsFunctions;
     iRdsDataReq.iAdditionalFunctions1 = aRdsData.iAdditionalFunctions1;
     iRdsDataReq.iAdditionalFunctions2 = aRdsData.iAdditionalFunctions2;
-    return iRadioSession->NotifyRdsDataChange( iRdsDataReq );
+    return iRadioSession.NotifyRdsDataChange( iRdsDataReq );
     }
 
 // -----------------------------------------------------------------------------
@@ -131,7 +142,8 @@
 //
 void CRadioRdsUtility::CBody::CancelNotifyRdsDataChange()
     {
-    iRadioSession->CancelNotifyRdsDataChange();
+    FUNC_LOG;
+    iRadioSession.CancelNotifyRdsDataChange();
     }
 
 // -----------------------------------------------------------------------------
@@ -142,7 +154,8 @@
 TInt CRadioRdsUtility::CBody::SetAutomaticSwitching(
     TBool aAuto )
     {
-    return iRadioSession->SetAutomaticSwitching( aAuto );
+    FUNC_LOG;
+    return iRadioSession.SetAutomaticSwitching( aAuto );
     }
 
 // -----------------------------------------------------------------------------
@@ -153,7 +166,8 @@
 TInt CRadioRdsUtility::CBody::GetAutomaticSwitching(
     TBool& aAuto )
     {
-    return iRadioSession->GetAutomaticSwitching( aAuto );
+    FUNC_LOG;
+    return iRadioSession.GetAutomaticSwitching( aAuto );
     }
 
 // -----------------------------------------------------------------------------
@@ -163,7 +177,8 @@
 //
 void CRadioRdsUtility::CBody::CancelAFSearch()
     {
-    iRadioSession->CancelAFSearch();
+    FUNC_LOG;
+    iRadioSession.CancelAFSearch();
     }
 
 // -----------------------------------------------------------------------------
@@ -174,7 +189,8 @@
 TInt CRadioRdsUtility::CBody::SetAutomaticTrafficAnnouncement(
     TBool aAuto )
     {
-    return iRadioSession->SetAutomaticTrafficAnnouncement( aAuto );
+    FUNC_LOG;
+    return iRadioSession.SetAutomaticTrafficAnnouncement( aAuto );
     }
 
 // -----------------------------------------------------------------------------
@@ -185,7 +201,8 @@
 TInt CRadioRdsUtility::CBody::GetAutomaticTrafficAnnouncement(
     TBool& aAuto )
     {
-    return iRadioSession->GetAutomaticTrafficAnnouncement( aAuto );
+    FUNC_LOG;
+    return iRadioSession.GetAutomaticTrafficAnnouncement( aAuto );
     }
 
 // -----------------------------------------------------------------------------
@@ -197,7 +214,8 @@
     TRdsProgrammeType aPty,
     TBool aUpwards )
     {
-    iRadioSession->StationSeekByPTY( aPty, aUpwards );
+    FUNC_LOG;
+    iRadioSession.StationSeekByPTY( aPty, aUpwards );
     }
 
 // -----------------------------------------------------------------------------
@@ -208,7 +226,8 @@
 void CRadioRdsUtility::CBody::StationSeekByTA(
     TBool aSeekUp )
     {
-    iRadioSession->StationSeekByTA( aSeekUp );
+    FUNC_LOG;
+    iRadioSession.StationSeekByTA( aSeekUp );
     }
 
 // -----------------------------------------------------------------------------
@@ -219,7 +238,8 @@
 void CRadioRdsUtility::CBody::StationSeekByTP(
     TBool aSeekUp )
     {
-    iRadioSession->StationSeekByTP( aSeekUp );
+    FUNC_LOG;
+    iRadioSession.StationSeekByTP( aSeekUp );
     }
 
 // -----------------------------------------------------------------------------
@@ -229,7 +249,8 @@
 //
 void CRadioRdsUtility::CBody::CancelRdsStationSeek()
     {
-    iRadioSession->CancelRdsStationSeek();
+    FUNC_LOG;
+    iRadioSession.CancelRdsStationSeek();
     }
 
 // -----------------------------------------------------------------------------
@@ -240,7 +261,8 @@
 void CRadioRdsUtility::CBody::GetFreqByPTY(
     TRdsProgrammeType aPty )
     {
-    iRadioSession->GetFreqByPTY( aPty );
+    FUNC_LOG;
+    iRadioSession.GetFreqByPTY( aPty );
     }
 
 // -----------------------------------------------------------------------------
@@ -250,7 +272,8 @@
 //
 void CRadioRdsUtility::CBody::CancelGetFreqByPTY()
     {
-    iRadioSession->CancelGetFreqByPTY();
+    FUNC_LOG;
+    iRadioSession.CancelGetFreqByPTY();
     }
 
 // -----------------------------------------------------------------------------
@@ -260,7 +283,8 @@
 //
 void CRadioRdsUtility::CBody::GetFreqByTA()
     {
-    iRadioSession->GetFreqByTA();
+    FUNC_LOG;
+    iRadioSession.GetFreqByTA();
     }
 
 // -----------------------------------------------------------------------------
@@ -270,7 +294,8 @@
 //
 void CRadioRdsUtility::CBody::CancelGetFreqByTA()
     {
-    iRadioSession->CancelGetFreqByTA();
+    FUNC_LOG;
+    iRadioSession.CancelGetFreqByTA();
     }
 
 // -----------------------------------------------------------------------------
@@ -281,7 +306,8 @@
 void CRadioRdsUtility::CBody::GetPSByPTY(
     TRdsProgrammeType aPty )
     {
-    iRadioSession->GetPSByPTY( aPty );
+    FUNC_LOG;
+    iRadioSession.GetPSByPTY( aPty );
     }
 
 // -----------------------------------------------------------------------------
@@ -291,7 +317,8 @@
 //
 void CRadioRdsUtility::CBody::CancelGetPSByPTY()
     {
-    iRadioSession->CancelGetPSByPTY();
+    FUNC_LOG;
+    iRadioSession.CancelGetPSByPTY();
     }
 
 // -----------------------------------------------------------------------------
@@ -301,7 +328,8 @@
 //
 void CRadioRdsUtility::CBody::GetPSByTA()
     {
-    iRadioSession->GetPSByTA();
+    FUNC_LOG;
+    iRadioSession.GetPSByTA();
     }
 
 // -----------------------------------------------------------------------------
@@ -311,7 +339,8 @@
 //
 void CRadioRdsUtility::CBody::CancelGetPSByTA()
     {
-    iRadioSession->CancelGetPSByTA();
+    FUNC_LOG;
+    iRadioSession.CancelGetPSByTA();
     }
 
 // -----------------------------------------------------------------------------
@@ -322,7 +351,8 @@
 TInt CRadioRdsUtility::CBody::GetProgrammeIdentification(
     TInt& aPi )
     {
-    return iRadioSession->GetProgrammeIdentification( aPi );
+    FUNC_LOG;
+    return iRadioSession.GetProgrammeIdentification( aPi );
     }
 
 // -----------------------------------------------------------------------------
@@ -333,7 +363,8 @@
 TInt CRadioRdsUtility::CBody::GetProgrammeType(
     TRdsProgrammeType& aPty )
     {
-    return iRadioSession->GetProgrammeType( aPty );
+    FUNC_LOG;
+    return iRadioSession.GetProgrammeType( aPty );
     }
 
 // -----------------------------------------------------------------------------
@@ -344,8 +375,9 @@
 TInt CRadioRdsUtility::CBody::GetProgrammeService(
     TRdsPSName& aPs )
     {
+    FUNC_LOG;
     TRsRdsPSName ps;
-    TInt error = iRadioSession->GetProgrammeService( ps );
+    TInt error = iRadioSession.GetProgrammeService( ps );
 
     if ( aPs.Length() )
         {
@@ -363,8 +395,9 @@
 TInt CRadioRdsUtility::CBody::GetRadioText(
     TRdsRadioText& aRt )
     {
+    FUNC_LOG;
     TRsRdsRadioText rt;
-    TInt error = iRadioSession->GetRadioText( rt );
+    TInt error = iRadioSession.GetRadioText( rt );
 
     if ( rt.Length() )
        {
@@ -383,10 +416,11 @@
     TRdsRTplusClass aRtPlusClass,
     TRdsRadioText& aRtPlusData )
     {
+    FUNC_LOG;
     aRtPlusClass = aRtPlusClass; // for compiler warning
     TRsRdsRadioText rt;
     TRsRdsRTplusClass rtPlusClass = ERsRTplusItemDummy;
-    TInt error = iRadioSession->GetRadioTextPlus( rtPlusClass, rt );
+    TInt error = iRadioSession.GetRadioTextPlus( rtPlusClass, rt );
 
     if ( rt.Length() )
         {
@@ -405,7 +439,8 @@
 TInt CRadioRdsUtility::CBody::GetClockTime(
     TDateTime& aCt )
     {
-    return iRadioSession->GetClockTime( aCt );
+    FUNC_LOG;
+    return iRadioSession.GetClockTime( aCt );
     }
 
 // -----------------------------------------------------------------------------
@@ -416,7 +451,8 @@
 TInt CRadioRdsUtility::CBody::GetTrafficAnnouncementStatus(
     TBool& aTaStatus )
     {
-    return iRadioSession->GetTrafficAnnouncementStatus( aTaStatus );
+    FUNC_LOG;
+    return iRadioSession.GetTrafficAnnouncementStatus( aTaStatus );
     }
 
 // -----------------------------------------------------------------------------
@@ -427,7 +463,8 @@
 TInt CRadioRdsUtility::CBody::GetTrafficProgrammeStatus(
     TBool& aTpStatus )
     {
-    return iRadioSession->GetTrafficProgrammeStatus( aTpStatus );
+    FUNC_LOG;
+    return iRadioSession.GetTrafficProgrammeStatus( aTpStatus );
     }
 
 
--- a/mmserv/radioutility/radio_utility/src/RadioRdsUtilityBody.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioRdsUtilityBody.h	Fri Apr 30 19:18:45 2010 -0500
@@ -415,14 +415,14 @@
 private:
 
     void ConstructL();
-    CBody();
+    CBody( RRadioSession& aRadioSession, MRadioRdsObserver& aObserver );
 
 private: // data
 
     // The radio server session
-    RRadioSession* iRadioSession; // not own
+    RRadioSession& iRadioSession;
     // RDS Utility Observer
-    MRadioRdsObserver* iRadioRdsUtilityClient; // not own
+    MRadioRdsObserver& iRadioRdsUtilityClient;
     // RDS notification reqs
     TRsRdsData iRdsDataReq;
     };
--- a/mmserv/radioutility/radio_utility/src/RadioUtility.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioUtility.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -17,6 +17,7 @@
 
 
 #include "RadioUtilityBody.h"
+#include "trace.h"
 
 
 // ======== MEMBER FUNCTIONS ========
@@ -29,10 +30,11 @@
 EXPORT_C CRadioUtility* CRadioUtility::NewL(
     TBool aPrimaryClient )
     {
+    FUNC_LOG;
     CRadioUtility* self = new(ELeave) CRadioUtility();
     CleanupStack::PushL(self);
     self->iBody = CRadioUtility::CBody::NewL(aPrimaryClient);
-    CleanupStack::Pop();
+    CleanupStack::Pop(self);
     return self;
     }
 
@@ -42,6 +44,7 @@
 //
 EXPORT_C CRadioUtility::~CRadioUtility()
     {
+    FUNC_LOG;
     delete iBody;
     }
 
@@ -52,6 +55,7 @@
 //
 CRadioUtility::CRadioUtility()
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -62,6 +66,7 @@
 EXPORT_C CRadioFmTunerUtility& CRadioUtility::RadioFmTunerUtilityL(
     MRadioFmTunerObserver& aObserver )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->RadioFmTunerUtilityL(aObserver);
     }
@@ -74,6 +79,7 @@
 EXPORT_C CRadioPlayerUtility& CRadioUtility::RadioPlayerUtilityL(
     MRadioPlayerObserver& aObserver )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->RadioPlayerUtilityL(aObserver);
     }
@@ -86,6 +92,7 @@
 EXPORT_C CRadioRdsUtility& CRadioUtility::RadioRdsUtilityL(
     MRadioRdsObserver& aObserver )
     {
+    FUNC_LOG;
     ASSERT(iBody);
     return iBody->RadioRdsUtilityL(aObserver);
     }
--- a/mmserv/radioutility/radio_utility/src/RadioUtilityBody.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radio_utility/src/RadioUtilityBody.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -21,6 +21,7 @@
 #include <RadioRdsUtility.h>
 #include "RadioUtilityBody.h"
 #include "RadioServerData.h"
+#include "trace.h"
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -32,10 +33,11 @@
 CRadioUtility::CBody* CRadioUtility::CBody::NewL(
     TBool aPrimaryClient )
     {
+    FUNC_LOG;
     CRadioUtility::CBody* self = new (ELeave) CRadioUtility::CBody();
     CleanupStack::PushL(self);
     self->ConstructL(aPrimaryClient);
-    CleanupStack::Pop();
+    CleanupStack::Pop(self);
     return self;
     }
 
@@ -47,6 +49,8 @@
 void CRadioUtility::CBody::ConstructL(
     TBool aPrimaryClient )
     {
+    FUNC_LOG;
+    INFO_1("Size of RRadioSession: %i", sizeof(RRadioSession) );
     iRadioSession = new (ELeave) RRadioSession();
     User::LeaveIfError(iRadioSession->Connect(*this, aPrimaryClient));
     }
@@ -62,6 +66,7 @@
         iPlayerUtility(NULL),
         iRdsUtility(NULL)
     {
+    FUNC_LOG;
     }
 
 // -----------------------------------------------------------------------------
@@ -70,9 +75,7 @@
 //
 CRadioUtility::CBody::~CBody()
     {
-#ifdef _DEBUG
-   RDebug::Print(_L("CRadioUtility::CBody::~CBody"));
-#endif
+    FUNC_LOG;
     delete iFmTunerUtility;
     delete iPlayerUtility;
     delete iRdsUtility;
@@ -91,9 +94,7 @@
 CRadioFmTunerUtility& CRadioUtility::CBody::RadioFmTunerUtilityL(
     MRadioFmTunerObserver& aObserver)
     {
-#ifdef _DEBUG
-   RDebug::Print(_L("CRadioUtility::CBody::RadioFmTunerUtilityL"));
-#endif
+    FUNC_LOG;
 
     if ( !iFmTunerUtility )
         {
@@ -116,9 +117,7 @@
 CRadioPlayerUtility& CRadioUtility::CBody::RadioPlayerUtilityL(
     MRadioPlayerObserver& aObserver)
     {
-#ifdef _DEBUG
-   RDebug::Print(_L("CRadioUtility::CBody::RadioPlayerUtilityL"));
-#endif
+    FUNC_LOG;
 
     if ( !iPlayerUtility )
         {
@@ -141,9 +140,7 @@
 CRadioRdsUtility& CRadioUtility::CBody::RadioRdsUtilityL(
     MRadioRdsObserver& aObserver)
     {
-#ifdef _DEBUG
-   RDebug::Print(_L("CRadioUtility::CBody::RadioRdsUtility"));
-#endif
+    FUNC_LOG;
 
     if ( !iRdsUtility )
         {
@@ -167,9 +164,7 @@
 void CRadioUtility::CBody::RequestTunerControlComplete(
     TRadioServerError aError )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RequestTunerControlComplete"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoRequestTunerControlComplete( aError );
@@ -184,9 +179,7 @@
 void CRadioUtility::CBody::SetFrequencyRangeComplete(
     TRadioServerError aError )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::SetFrequencyRangeComplete"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoSetFrequencyRangeComplete( aError );
@@ -201,9 +194,7 @@
 void CRadioUtility::CBody::SetFrequencyComplete(
     TRadioServerError aError )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::SetFrequencyComplete"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoSetFrequencyComplete( aError );
@@ -219,9 +210,7 @@
     TRadioServerError aError,
     TInt aFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::StationSeekComplete"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoStationSeekComplete( aError, aFrequency );
@@ -236,9 +225,7 @@
 void CRadioUtility::CBody::RadioEventTransmitterStatusChange(
     TBool aActive )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::TransmitterStatusChange"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoFmTransmitterStatusChange( aActive );
@@ -253,9 +240,7 @@
 void CRadioUtility::CBody::RadioEventAntennaStatusChange(
     TBool aAttached )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventAntennaStatusChange"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoAntennaStatusChange( aAttached );
@@ -270,9 +255,7 @@
 void CRadioUtility::CBody::RadioEventOfflineModeChange(
     TBool aOfflineMode )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventOfflineModeChange Start offline mode = %d"), aOfflineMode);
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoOfflineModeStatusChange( aOfflineMode );
@@ -287,9 +270,7 @@
 void CRadioUtility::CBody::RadioEventFrequencyRangeChanged(
     TRsFrequencyRange aNewRange )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventFrequencyRangeChanged"));
-#endif
+    FUNC_LOG;
 
     if ( iTunerObserver )
         {
@@ -318,9 +299,7 @@
 void CRadioUtility::CBody::RadioEventFrequencyChange(
     TInt aNewFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventFrequencyChange"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoFrequencyChange( aNewFrequency );
@@ -335,9 +314,7 @@
 void CRadioUtility::CBody::RadioEventForcedMonoChanged(
     TBool aForceMono )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventForcedMonoChanged"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoForcedMonoChange( aForceMono );
@@ -352,9 +329,7 @@
 void CRadioUtility::CBody::RadioEventSquelchChanged(
     TBool aSquelch )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventSquelchChanged"));
-#endif
+    FUNC_LOG;
     if ( iTunerObserver )
         {
         iTunerObserver->MrftoSquelchChange( aSquelch );
@@ -370,9 +345,7 @@
     TBool aRadioOn,
     TRadioServerError aError )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventStateChange"));
-#endif
+    FUNC_LOG;
     if ( iPlayerObserver )
         {
         TPlayerState state = ERadioPlayerIdle;
@@ -393,9 +366,7 @@
 void CRadioUtility::CBody::RadioEventVolumeChange(
     TInt aVolume )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventVolumeChange"));
-#endif
+    FUNC_LOG;
     if ( iPlayerObserver )
         {
         iPlayerObserver->MrpoVolumeChange( aVolume );
@@ -410,9 +381,7 @@
 void CRadioUtility::CBody::RadioEventMuteChange(
     TBool aMute )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventMuteChange"));
-#endif
+    FUNC_LOG;
     if ( iPlayerObserver )
         {
         iPlayerObserver->MrpoMuteChange( aMute );
@@ -428,9 +397,7 @@
     TInt aLeftPercentage,
     TInt aRightPercentage )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventBalanceChange"));
-#endif
+    FUNC_LOG;
     if ( iPlayerObserver )
         {
         iPlayerObserver->MrpoBalanceChange( aLeftPercentage, aRightPercentage );
@@ -446,9 +413,7 @@
     TInt aError,
     TInt aFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::StationSeekByPTYComplete"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroStationSeekByPTYComplete(aError, aFrequency );
@@ -465,9 +430,7 @@
     TInt aError,
     TInt aFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::StationSeekByTAComplete"));
-#endif
+    FUNC_LOG;
 
     if ( iRdsObserver )
         {
@@ -484,9 +447,7 @@
     TInt aError,
     TInt aFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::StationSeekByTPComplete"));
-#endif
+    FUNC_LOG;
 
     if ( iRdsObserver )
         {
@@ -503,9 +464,7 @@
     TInt aError,
     RArray<TInt>& aFreqList )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::GetFreqByPTYComplete"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroGetFreqByPTYComplete( aError, aFreqList );
@@ -521,9 +480,7 @@
     TInt aError,
     RArray<TInt>& aFreqList )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::GetFreqByTAComplete"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroGetFreqByTAComplete( aError, aFreqList );
@@ -539,9 +496,7 @@
     TInt aError,
     RArray<TRsRdsPSName>& aPsList )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::GetPSByPTYComplete"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         RArray<TRdsPSName> psList;
@@ -569,9 +524,7 @@
     TInt aError,
     RArray<TRsRdsPSName>& aPsList )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::GetPSByTAComplete"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         RArray<TRdsPSName> psList;
@@ -598,9 +551,7 @@
 void CRadioUtility::CBody::RadioEventRdsDataPI(
     TInt aPi )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataPI"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsDataPI( aPi );
@@ -615,9 +566,7 @@
 void CRadioUtility::CBody::RadioEventRdsDataPTY(
     TRsRdsProgrammeType aPty )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataPTY"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsDataPTY( aPty );
@@ -632,9 +581,7 @@
 void CRadioUtility::CBody::RadioEventRdsDataPS(
     TRsRdsPSName& aPs )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataPS"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         TRdsPSName ps;
@@ -655,9 +602,7 @@
 void CRadioUtility::CBody::RadioEventRdsDataRT(
     TRsRdsRadioText& aRt )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataRT"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         TRdsRadioText rt;
@@ -680,9 +625,7 @@
     TRsRdsRTplusClass aRtPlusClass,
     TRsRdsRadioText& aRtPlusData )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataRTplus"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         TRdsRTplusClass rtPlusClass;
@@ -706,9 +649,7 @@
 void CRadioUtility::CBody::RadioEventRdsDataCT(
     TDateTime& aCt )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataCT"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsDataCT( aCt );
@@ -723,9 +664,7 @@
 void CRadioUtility::CBody::RadioEventRdsDataTA(
     TBool aTaOn )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsDataTA"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsDataTA( aTaOn );
@@ -739,9 +678,7 @@
 //
 void CRadioUtility::CBody::RadioEventRdsSearchBeginAF()
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsSearchBeginAF"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsSearchBeginAF();
@@ -758,9 +695,7 @@
     TInt aError,
     TInt aFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsSearchEndAF"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsSearchEndAF( aError, aFrequency );
@@ -775,9 +710,7 @@
 void CRadioUtility::CBody::RadioEventRdsStationChangeTA(
     TInt aFrequency )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsStationChangeTA"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsStationChangeTA( aFrequency );
@@ -792,9 +725,7 @@
 void CRadioUtility::CBody::RadioEventRdsAutomaticSwitchingChange(
     TBool aAuto )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsAutomaticSwitchingChange"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsEventAutomaticSwitchingChange( aAuto );
@@ -809,9 +740,7 @@
 void CRadioUtility::CBody::RadioEventRdsAutomaticTrafficAnnouncement(
     TBool aAuto )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsAutomaticTrafficAnnouncement"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsEventAutomaticTrafficAnnouncement( aAuto );
@@ -826,9 +755,7 @@
 void CRadioUtility::CBody::RadioEventRdsSignalChange(
     TBool aSignal )
     {
-#ifdef _DEBUG
-    RDebug::Print(_L("CRadioUtility::CBody::RadioEventRdsSignalChange"));
-#endif
+    FUNC_LOG;
     if ( iRdsObserver )
         {
         iRdsObserver->MrroRdsEventSignalChange( aSignal );
--- a/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -491,6 +491,8 @@
     {
     RADIO_RDEBUG_INT3(_L("[RADIO-SVR] TunerOnComplete(%d) State[%d] Trigger[%d]"), aError, iState, iTunerOnTrigger);
     TFourCC radioFourCC;
+    // TBool antennaStatus = iSettings->IsAntennaAttached();
+    
     switch ( iTunerOnTrigger )
         {
         case ETriggerTunerControl:
@@ -559,10 +561,13 @@
             if ( aError == KErrNone )
                 {
                 iState = EStateTunerOn;
-                // AK - begin: to cause publishing (CPHU-73YTQW)
-                iSettings->SetAntennaStatus(EFalse, EFalse);
-                // - end
-                iSettings->SetAntennaStatus(ETrue);
+                if ( iSettings->IsAntennaAttached() )
+                    {
+                    // AK - begin: to cause publishing (CPHU-73YTQW)
+                    iSettings->SetAntennaStatus(EFalse, EFalse);
+                    // - end
+                    iSettings->SetAntennaStatus(ETrue);
+                    }
                 }
             // else
                 // Unable to turn the tuner back on. It's possible that after TunerOn request
@@ -594,6 +599,14 @@
         default:
             break;
         }
+    
+    if ( iSettings->IsAntennaAttached() == EFalse )
+        {
+        // antenna removed during TunerOn sequence, request TunerOff
+        // can not shutdown totally in TunerOffComplete thus set iState to EStateTunerOff
+        iState = EStateTunerOff;
+        iTunerControl->TunerOff();    
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -648,13 +661,14 @@
                     CompleteAsyncRequest(aError);
                     }
                 }
+            else if( aError == KRadioServErrDuplicateRequest )
+                {
+                // tuner off and duplicate request going on, trace it out
+                RADIO_RDEBUG(_L("[RADIO-SVR] TunerOffComplete() - EStateTunerOff - KRadioServErrDuplicateRequest"));
+                }
             else
                 {
-                if( aError == KRadioServErrDuplicateRequest )
-                    {
-                    // tuner off and duplicate request going on, trace it out
-                    RADIO_RDEBUG(_L("[RADIO-SVR] TunerOffComplete() - EStateTunerOff - KRadioServErrDuplicateRequest"));
-                    }
+                RADIO_RDEBUG(_L("[RADIO-SVR] TunerOffComplete() - iState = EStateTunerOff;"));
                 }
             break;
         default:
--- a/mmserv/radioutility/radioserver/Server/Src/RadioServerShutdown.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radioserver/Server/Src/RadioServerShutdown.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -86,14 +86,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CRadioServerShutdown::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CRadioServerShutdown::DoCancel()
-    {
-    }
-
-// -----------------------------------------------------------------------------
 // CRadioServerShutdown::RunL
 // -----------------------------------------------------------------------------
 //
--- a/mmserv/radioutility/radioserver/Server/Src/RadioServerShutdown.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/radioutility/radioserver/Server/Src/RadioServerShutdown.h	Fri Apr 30 19:18:45 2010 -0500
@@ -58,12 +58,6 @@
 
 	/**
 	 * From CTimer
-	 * Cancel the shutdown timer.
-	 */
-	void DoCancel();
-
-	/**
-	 * From CTimer
 	 * Timer has expired, stop the RadioServer.
 	 **/
 	void RunL();
--- a/mmserv/sts/bwins/systemtoneservice.def	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/bwins/systemtoneservice.def	Fri Apr 30 19:18:45 2010 -0500
@@ -1,7 +1,7 @@
 EXPORTS
-	?Delete@CSystemToneService@@SAXPAV1@@Z @ 1 NONAME ; void CSystemToneService::Delete(class CSystemToneService *)
-	?StopTone@CSystemToneService@@QAEXI@Z @ 2 NONAME ; void CSystemToneService::StopTone(unsigned int)
-	?PlayTone@CSystemToneService@@QAEXW4TToneType@1@AAI@Z @ 3 NONAME ; void CSystemToneService::PlayTone(enum CSystemToneService::TToneType, unsigned int &)
+	?StopAlarm@CSystemToneService@@QAEXI@Z @ 1 NONAME ; void CSystemToneService::StopAlarm(unsigned int)
+	?Delete@CSystemToneService@@SAXPAV1@@Z @ 2 NONAME ; void CSystemToneService::Delete(class CSystemToneService *)
+	?PlayAlarm@CSystemToneService@@QAEXW4TAlarmType@1@AAIAAVMStsPlayAlarmObserver@@@Z @ 3 NONAME ; void CSystemToneService::PlayAlarm(enum CSystemToneService::TAlarmType, unsigned int &, class MStsPlayAlarmObserver &)
 	?Create@CSystemToneService@@SAPAV1@XZ @ 4 NONAME ; class CSystemToneService * CSystemToneService::Create(void)
 	?PlayTone@CSystemToneService@@QAEXW4TToneType@1@@Z @ 5 NONAME ; void CSystemToneService::PlayTone(enum CSystemToneService::TToneType)
 
--- a/mmserv/sts/eabi/systemtoneservice.def	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/eabi/systemtoneservice.def	Fri Apr 30 19:18:45 2010 -0500
@@ -2,6 +2,6 @@
 	_ZN18CSystemToneService6CreateEv @ 1 NONAME
 	_ZN18CSystemToneService6DeleteEPS_ @ 2 NONAME
 	_ZN18CSystemToneService8PlayToneENS_9TToneTypeE @ 3 NONAME
-	_ZN18CSystemToneService8PlayToneENS_9TToneTypeERj @ 4 NONAME
-	_ZN18CSystemToneService8StopToneEj @ 5 NONAME
+	_ZN18CSystemToneService9PlayAlarmENS_10TAlarmTypeERjR21MStsPlayAlarmObserver @ 4 NONAME
+	_ZN18CSystemToneService9StopAlarmEj @ 5 NONAME
 
--- a/mmserv/sts/inc/sts.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/inc/sts.h	Fri Apr 30 19:18:45 2010 -0500
@@ -32,9 +32,10 @@
 public:
     static CSts* Create();
     static void Delete(CSts* aSts);
-    void PlayTone(CSystemToneService::TToneType aToneType,
-            unsigned int& aPlayToneContext);
-    void StopTone(unsigned int aPlayToneContext);
+    void PlayTone(CSystemToneService::TToneType aTone);
+    void PlayAlarm(CSystemToneService::TAlarmType aAlarm,
+            unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
+    void StopAlarm(unsigned int aAlarmContext);
 
 protected:
     CSts();
@@ -45,12 +46,13 @@
     void CleanUpPlayers();
 
     // inherited from MPlayerObserver
-    virtual void PlayToneComplete(unsigned int aPlayToneContext);
+    virtual void PlayComplete(unsigned int aContext);
 
 private:
     unsigned int iNextContext;
-    typedef std::map<unsigned int, CStsPlayer*> TPlayerMap;
-    TPlayerMap iMap;
+    class CPlayerNode;
+    typedef std::map<unsigned int, CPlayerNode*> TPlayerMap;
+    TPlayerMap iPlayerMap;
     };
 
 #endif //STS_H
--- a/mmserv/sts/inc/stsclientservercommon.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/inc/stsclientservercommon.h	Fri Apr 30 19:18:45 2010 -0500
@@ -34,12 +34,27 @@
 // This type enumerates the client/server messages for the STS server.
 enum TStsServerCommandType
     {
+    StsMsg_RegisterMsgQueue,
     StsMsg_PlayTone,
-    StsMsg_StopTone,
+    StsMsg_PlayAlarm,
+    StsMsg_StopAlarm,
     StsMsg_ENDMARKER
     };
 
 const TStsServerCommandType KStsCmdLast =
         (TStsServerCommandType) ((int) StsMsg_ENDMARKER - 1);
 
+enum TStsCallBackType
+    {
+    EStsShutdown,
+    EStsPlayAlarmComplete
+    };
+
+struct TStsCallBack
+    {
+    TStsCallBackType callBackType;
+    MStsPlayAlarmObserver* observer;
+    unsigned int alarmContext;
+    };
+
 #endif // STSCLIENTSERVERCOMMON_H_
--- a/mmserv/sts/inc/stsimplementation.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/inc/stsimplementation.h	Fri Apr 30 19:18:45 2010 -0500
@@ -31,8 +31,9 @@
 public:
     void PlayTone(CSystemToneService::TToneType aTone);
     void
-    PlayTone(CSystemToneService::TToneType aTone, unsigned int& aPlayToneContext);
-    void StopTone(unsigned int aPlayToneContext);
+    PlayAlarm(CSystemToneService::TAlarmType aAlarm,
+            unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
+    void StopAlarm(unsigned int aAlarmContext);
 private:
     CStsImplementation();
     bool Init();
--- a/mmserv/sts/inc/stsplayer.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/inc/stsplayer.h	Fri Apr 30 19:18:45 2010 -0500
@@ -24,21 +24,23 @@
 class MStsPlayerObserver
     {
 public:
-    virtual void PlayToneComplete(unsigned int aPlayToneContext) = 0;
+    virtual void PlayComplete(unsigned int aContext) = 0;
     };
 
 class CStsPlayer : private MMdaAudioPlayerCallback
     {
 public:
-    static CStsPlayer* Create(MStsPlayerObserver& aObserver,
-            CSystemToneService::TToneType aToneType, unsigned int aPlayToneContext);
+    static CStsPlayer* CreateTonePlayer(MStsPlayerObserver& aObserver,
+            CSystemToneService::TToneType aTone, unsigned int aContext);
+    static CStsPlayer* CreateAlarmPlayer(MStsPlayerObserver& aObserver,
+            CSystemToneService::TAlarmType aAlarm, unsigned int aContext);
     virtual ~CStsPlayer();
     void Play();
     void Stop();
 
 protected:
     CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName,
-            int aRepeatNumberOfTimes, unsigned int aPlayToneContext);
+            int aRepeatNumberOfTimes, unsigned int aContext);
     bool Init();
 
 private:
@@ -50,7 +52,7 @@
     CMdaAudioPlayerUtility* iPlayer;
     TPtrC iFileName;
     int iRepeatNumberOfTimes;
-    unsigned int iPlayToneContext;
+    unsigned int iContext;
     };
 
 #endif // STSPLAYER_H_
--- a/mmserv/sts/src/systemtoneservice.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/src/systemtoneservice.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -58,13 +58,13 @@
     iImplementation.PlayTone(aTone);
     }
 
-EXPORT_C void CSystemToneService::PlayTone(TToneType aTone,
-        unsigned int& aPlayToneContext)
+EXPORT_C void CSystemToneService::PlayAlarm(TAlarmType aAlarm,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
     {
-    iImplementation.PlayTone(aTone, aPlayToneContext);
+    iImplementation.PlayAlarm(aAlarm, aAlarmContext, aObserver);
     }
 
-EXPORT_C void CSystemToneService::StopTone(unsigned int aPlayToneContext)
+EXPORT_C void CSystemToneService::StopAlarm(unsigned int aAlarmContext)
     {
-    iImplementation.StopTone(aPlayToneContext);
+    iImplementation.StopAlarm(aAlarmContext);
     }
--- a/mmserv/sts/stsimplementation/src/rstssession.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsimplementation/src/rstssession.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -21,6 +21,62 @@
 
 const TUint KNumSlots = 30;
 
+/*static*/TInt RStsSession::CallBackThreadMain(TAny* aSession)
+    {
+    TInt err = KErrNoMemory;
+
+    RThread myThread;
+    myThread.SetPriority(EPriorityAbsoluteHigh);
+    myThread.Close();
+
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    if (cleanup)
+        {
+        // Run the server and request a thread rendezvous.
+        TRAP( err, ((RStsSession*)aSession)->RunThreadL() );
+        delete cleanup;
+        }
+
+    return err;
+    }
+
+void RStsSession::RunThreadL()
+    {
+    // Initialisation complete, now signal the client, if requested.
+    RThread::Rendezvous(KErrNone);
+
+    while (true)
+        {
+        TStsCallBack message;
+        iMsgQueue.ReceiveBlocking(message);
+        TStsCallBackType type = message.callBackType;
+        if (type == EStsPlayAlarmComplete)
+            {
+            message.observer->PlayAlarmComplete(message.alarmContext);
+            }
+        else if (type == EStsShutdown)
+            {
+            break;
+            }
+        else
+            {
+            //TODO: Log error message
+            }
+        }
+    }
+
+TInt RStsSession::StartMsgQueue()
+    {
+    // Create a nameless global message queue, then pass the handle to the queue to the server.
+    TInt err = iMsgQueue.CreateGlobal(KNullDesC, 30);
+    if (err == KErrNone)
+        {
+        err = SendReceive(StsMsg_RegisterMsgQueue, TIpcArgs(iMsgQueue));
+        }
+    return err;
+    }
+
 TInt RStsSession::StartServer()
     {
     TInt err = KErrNone;
@@ -37,36 +93,67 @@
         {
         TRequestStatus rendezvousStatus;
         server.Rendezvous(rendezvousStatus);
+        server.Resume();
 
-        if (rendezvousStatus != KRequestPending)
-            {
-            server.Kill(0); // abort startup
-            }
-        else
-            {
-            server.Resume(); // logon OK - start the server thread
-            } // end if
-
-        User::WaitForRequest(rendezvousStatus); // wait for start or death
+        // wait for start or death
+        User::WaitForRequest(rendezvousStatus);
 
         // we can't use the 'exit reason' if the server panicked as this
         // is the panic 'reason' and may be '0' which cannot be distinguished
         // from KErrNone  
-        err = (server.ExitType() == EExitPanic)
-                                                ? KErrGeneral
-                                                   : rendezvousStatus.Int();
-        server.Close();
+        if (server.ExitType() == EExitPanic)
+            {
+            err = KErrGeneral;
+            }
+        else
+            {
+            err = rendezvousStatus.Int();
+            }
         }
 
+    server.Close();
+
     return err;
     }
 
+TInt RStsSession::StartThread()
+    {
+    TInt result = iThread.Create(KNullDesC,
+            RStsSession::CallBackThreadMain, KDefaultStackSize,
+            &User::Heap(), (TAny*) this);
+
+    if (result == KErrNone)
+        {
+        TRequestStatus rendezvousStatus = KRequestPending;
+
+        //  Register for rendezvous notification when thread is started.
+        iThread.Rendezvous(rendezvousStatus);
+
+        // Start the thread execution
+        iThread.Resume();
+
+        // Wait for thread to start.
+        User::WaitForRequest(rendezvousStatus);
+
+        result = rendezvousStatus.Int();
+
+        if (result != KErrNone)
+            {
+            iThread.Kill(result);
+            }
+        }
+
+    return result;
+    }
+
 TInt RStsSession::Connect()
     {
+    // Try to create a session with the server
     TInt result = CreateSession(KStsServerName, TVersion(
             KStsServerMajorVersion, KStsServerMinorVersion, KStsServerBuild),
             KNumSlots, EIpcSession_Sharable);
 
+    // If the server wasn't found, start the server and try creating a session again
     if (result == KErrNotFound)
         {
         result = StartServer();
@@ -74,17 +161,17 @@
             {
             result = CreateSession(KStsServerName, TVersion(
                     KStsServerMajorVersion, KStsServerMinorVersion,
-                    KStsServerBuild), KNumSlots);
+                    KStsServerBuild), KNumSlots, EIpcSession_Sharable);
             }
         }
 
+    // Create thread for receiving asynch callbacks from the server
     if (result == KErrNone)
         {
-        result = ShareAuto();
-
-        if (result != KErrNone)
+        result = StartMsgQueue();
+        if (result == KErrNone)
             {
-            Close();
+            result = StartThread();
             }
         }
 
@@ -93,18 +180,28 @@
 
 void RStsSession::Close()
     {
+    TRequestStatus logonStatus = KRequestPending;
+    iThread.Logon(logonStatus);
     RSessionBase::Close();
+    User::WaitForRequest(logonStatus);
+    iThread.Close();
+    iMsgQueue.Close();
+    }
+
+TInt RStsSession::SendPlayTone(CSystemToneService::TToneType aTone)
+    {
+    return SendReceive(StsMsg_PlayTone, TIpcArgs(aTone));
     }
 
-TInt RStsSession::SendPlayTone(CSystemToneService::TToneType aToneType,
-        unsigned int& aPlayToneContext)
+TInt RStsSession::SendPlayAlarm(CSystemToneService::TAlarmType aAlarm,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
     {
-    TPckg<unsigned int> playToneContextPckg(aPlayToneContext);
-    return SendReceive(StsMsg_PlayTone, TIpcArgs((TInt) aToneType,
-            &playToneContextPckg));
+    TPckg<unsigned int> alarmContextPckg(aAlarmContext);
+    return SendReceive(StsMsg_PlayAlarm, TIpcArgs(aAlarm, &alarmContextPckg,
+            &aObserver));
     }
 
-TInt RStsSession::SendStopTone(unsigned int aPlayToneContext)
+TInt RStsSession::SendStopAlarm(unsigned int aAlarmContext)
     {
-    return SendReceive(StsMsg_StopTone, TIpcArgs(aPlayToneContext));
+    return SendReceive(StsMsg_StopAlarm, TIpcArgs(aAlarmContext));
     }
--- a/mmserv/sts/stsimplementation/src/rstssession.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsimplementation/src/rstssession.h	Fri Apr 30 19:18:45 2010 -0500
@@ -19,9 +19,11 @@
 #ifndef RSTSSESSION_H_
 #define RSTSSESSION_H_
 
-#include <e32std.h>
+#include <e32msgqueue.h>
 #include <systemtoneservice.h>
 
+#include "stsclientservercommon.h"
+
 class RStsSession : public RSessionBase
     {
 public:
@@ -30,15 +32,24 @@
 
     void Close();
 
-    TInt SendPlayTone(CSystemToneService::TToneType aToneType,
-            unsigned int& aPlayToneContext);
+    TInt SendPlayTone(CSystemToneService::TToneType aTone);
 
-    TInt SendStopTone(unsigned int aPlayToneContext);
+    TInt SendPlayAlarm(CSystemToneService::TAlarmType aAlarm,
+            unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
+
+    TInt SendStopAlarm(unsigned int aAlarmContext);
 
 private:
 
+    static TInt CallBackThreadMain(TAny* aSession);
+    void RunThreadL();
+    
+    TInt StartMsgQueue();
     TInt StartServer();
+    TInt StartThread();
 
+    RThread iThread;
+    RMsgQueue<TStsCallBack> iMsgQueue;
     };
 
 #endif // RSTSSESSION_H_
--- a/mmserv/sts/stsimplementation/src/stsimplementation.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsimplementation/src/stsimplementation.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -63,19 +63,18 @@
 
 void CStsImplementation::PlayTone(CSystemToneService::TToneType aTone)
     {
-    unsigned int playToneContext;
-    PlayTone(aTone, playToneContext);
+    iSession->SendPlayTone(aTone);
     }
 
-void CStsImplementation::PlayTone(CSystemToneService::TToneType aTone,
-        unsigned int& aPlayToneContext)
+void CStsImplementation::PlayAlarm(CSystemToneService::TAlarmType aAlarm,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
     {
     //TODO: Add logging and error checking
-    iSession->SendPlayTone(aTone, aPlayToneContext);
+    iSession->SendPlayAlarm(aAlarm, aAlarmContext, aObserver);
     }
 
-void CStsImplementation::StopTone(unsigned int aPlayToneContext)
+void CStsImplementation::StopAlarm(unsigned int aAlarmContext)
     {
     //TODO: Add logging and error checking
-    iSession->SendStopTone(aPlayToneContext);
+    iSession->SendStopAlarm(aAlarmContext);
     }
--- a/mmserv/sts/stsplayer/src/sts.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsplayer/src/sts.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -18,6 +18,51 @@
 
 #include "sts.h"
 
+class CSts::CPlayerNode
+    {
+public:
+    CPlayerNode(CStsPlayer* aPlayer);
+    CPlayerNode(CStsPlayer* aPlayer, MStsPlayAlarmObserver& aObserver);
+    ~CPlayerNode();
+    bool HasObserver();
+    CStsPlayer* Player();
+    MStsPlayAlarmObserver& Observer();
+private:
+    CStsPlayer* iPlayer;
+    MStsPlayAlarmObserver* iObserver;
+    };
+
+CSts::CPlayerNode::CPlayerNode(CStsPlayer* aPlayer) :
+    iPlayer(aPlayer), iObserver(0)
+    {
+    }
+
+CSts::CPlayerNode::CPlayerNode(CStsPlayer* aPlayer,
+        MStsPlayAlarmObserver& aObserver) :
+    iPlayer(aPlayer), iObserver(&aObserver)
+    {
+    }
+
+CSts::CPlayerNode::~CPlayerNode()
+    {
+    delete iPlayer;
+    }
+
+bool CSts::CPlayerNode::HasObserver()
+    {
+    return iObserver != 0;
+    }
+
+CStsPlayer* CSts::CPlayerNode::Player()
+    {
+    return iPlayer;
+    }
+
+MStsPlayAlarmObserver& CSts::CPlayerNode::Observer()
+    {
+    return *iObserver;
+    }
+
 /*static*/CSts* CSts::Create()
     {
     CSts* self = new CSts();
@@ -53,47 +98,84 @@
     CleanUpPlayers();
     }
 
-void CSts::PlayTone(CSystemToneService::TToneType aToneType,
-        unsigned int& aPlayToneContext)
+void CSts::PlayTone(CSystemToneService::TToneType aTone)
     {
-    CStsPlayer* player = CStsPlayer::Create(*this, aToneType, iNextContext);
+    CStsPlayer* player = CStsPlayer::CreateTonePlayer(*this, aTone,
+            iNextContext);
     if (player != 0)
         {
-        iMap[iNextContext] = player;
-        aPlayToneContext = iNextContext;
+        iPlayerMap[iNextContext] = new CPlayerNode(player);
         iNextContext++;
+        if (iNextContext == 0)
+            iNextContext++;
         player->Play();
         }
     else
         {
-        aPlayToneContext = 0;
+        //TODO: Add trace here
         }
     }
 
-void CSts::StopTone(unsigned int aPlayToneContext)
+void CSts::PlayAlarm(CSystemToneService::TAlarmType aAlarm,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
     {
-    CStsPlayer* player = iMap[aPlayToneContext];
-    if (player)
+    CStsPlayer* player = CStsPlayer::CreateAlarmPlayer(*this, aAlarm,
+            iNextContext);
+    if (player != 0)
+        {
+        iPlayerMap[iNextContext] = new CPlayerNode(player, aObserver);
+        aAlarmContext = iNextContext;
+        iNextContext++;
+        if (iNextContext == 0)
+            iNextContext++;
+        player->Play();
+        }
+    else
         {
-        player->Stop();
-        PlayToneComplete(aPlayToneContext);
+        //TODO: Add trace here
+        aAlarmContext = 0;
+        }
+    }
+
+void CSts::StopAlarm(unsigned int aAlarmContext)
+    {
+    CPlayerNode* node = iPlayerMap[aAlarmContext];
+    iPlayerMap.erase(aAlarmContext);
+    if (node)
+        {
+        node->Player()->Stop();
+        delete node;
+        }
+    else
+        {
+        //TODO: Add trace here
         }
     }
 
 void CSts::CleanUpPlayers()
     {
-    for (TPlayerMap::iterator i = iMap.begin(); i != iMap.end(); i++)
-        {
-        StopTone(i->first);
-        }
+        while (!iPlayerMap.empty())
+            {
+            //TODO: Add trace here
+            StopAlarm(iPlayerMap.begin()->first);
+            }
     }
 
-void CSts::PlayToneComplete(unsigned int aPlayToneContext)
+void CSts::PlayComplete(unsigned int aContext)
     {
-    CStsPlayer* player = iMap[aPlayToneContext];
-    iMap[aPlayToneContext] = 0;
-    if (player)
+    CPlayerNode* node = iPlayerMap[aContext];
+    iPlayerMap.erase(aContext);
+    if (node)
         {
-        delete player;
+        CStsPlayer* player = node->Player();
+        if (node->HasObserver())
+            {
+            node->Observer().PlayAlarmComplete(aContext);
+            }
+        delete node;
+        }
+    else
+        {
+        // TODO: log unexpected error
         }
     }
--- a/mmserv/sts/stsplayer/src/stsplayer.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsplayer/src/stsplayer.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -15,20 +15,46 @@
  * This file provides the implementation for creating and deleting a
  * an MMF based player for playing and stopping a tone playback.
  */
+
 #include "stsplayer.h"
+
 _LIT(KDefaultFile,"z:\\data\\sounds\\digital\\clock.aac");
 
-/*static*/CStsPlayer* CStsPlayer::Create(MStsPlayerObserver& aObserver,
-        CSystemToneService::TToneType aToneType, unsigned int aPlayToneContext)
+/*static*/CStsPlayer* CStsPlayer::CreateTonePlayer(
+        MStsPlayerObserver& aObserver, CSystemToneService::TToneType aTone,
+        unsigned int aContext)
     {
     CStsPlayer* self = 0;
-    switch (aToneType)
+    switch (aTone)
+        {
+        default:
+            self = new CStsPlayer(aObserver, KDefaultFile, 0, aContext);
+            break;
+        }
+    if (self != 0)
+        {
+        bool successful = self->Init();
+        if (!successful)
+            {
+            delete self;
+            self = 0;
+            }
+        }
+    return self;
+    }
+
+/*static*/CStsPlayer* CStsPlayer::CreateAlarmPlayer(
+        MStsPlayerObserver& aObserver, CSystemToneService::TAlarmType aAlarm,
+        unsigned int aContext)
+    {
+    CStsPlayer* self = 0;
+    switch (aAlarm)
         {
         case CSystemToneService::EClockAlarm:
-            self = new CStsPlayer(aObserver, KDefaultFile, 10, aPlayToneContext);
+            self = new CStsPlayer(aObserver, KDefaultFile, 10, aContext);
             break;
         default:
-            self = new CStsPlayer(aObserver, KDefaultFile, 0, aPlayToneContext);
+            self = new CStsPlayer(aObserver, KDefaultFile, 10, aContext);
             break;
         }
     if (self != 0)
@@ -44,10 +70,9 @@
     }
 
 CStsPlayer::CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName,
-        int aRepeatNumberOfTimes, unsigned int aPlayToneContext) :
+        int aRepeatNumberOfTimes, unsigned int aContext) :
     iObserver(aObserver), iPlayer(0), iFileName(aFileName),
-            iRepeatNumberOfTimes(aRepeatNumberOfTimes), iPlayToneContext(
-                    aPlayToneContext)
+            iRepeatNumberOfTimes(aRepeatNumberOfTimes), iContext(aContext)
     {
     }
 
@@ -64,7 +89,15 @@
 
 void CStsPlayer::Play()
     {
-    TRAP_IGNORE(iPlayer->OpenFileL(iFileName));
+    // Play the tone
+    TRAPD(err, iPlayer->OpenFileL(iFileName));
+
+    // If there is an error, indicate that the playback is complete. 
+    if (err)
+        {
+        //TODO: Add trace here
+        iObserver.PlayComplete(iContext);
+        }
     }
 
 void CStsPlayer::Stop()
@@ -72,7 +105,8 @@
     iPlayer->Stop();
     }
 
-void CStsPlayer::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/)
+void CStsPlayer::MapcInitComplete(TInt aError,
+        const TTimeIntervalMicroSeconds& /*aDuration*/)
     {
     if (aError == KErrNone)
         {
@@ -83,6 +117,8 @@
     else
         {
         //TODO: add trace
+        // Since there is an error, indicate that the playback is complete
+        iObserver.PlayComplete(iContext);
         }
     }
 
@@ -92,5 +128,5 @@
         {
         //TODO: add trace
         }
-    iObserver.PlayToneComplete(iPlayToneContext);
+    iObserver.PlayComplete(iContext);
     }
--- a/mmserv/sts/stsserver/src/stsserver.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsserver/src/stsserver.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -20,7 +20,6 @@
 
 #include "stsserver.h"
 
-#include <ecom/ecom.h>
 #include "stsserversession.h"
 #include "sts.h"
 
@@ -80,7 +79,6 @@
     {
     iSessions.ResetAndDestroy();
     CSts::Delete(iSts);
-    REComSession::FinalClose();
     }
 
 CSession2* CStsServer::NewSessionL(const TVersion& aVersion, const RMessage2& /*aMessage*/) const
@@ -89,13 +87,18 @@
             != KStsServerMinorVersion || aVersion.iBuild != KStsServerBuild)
         {
         User::Leave(KErrNotSupported);
-        } // end if
+        }
+    else
+        {
+        //TODO: Add trace here
+        }// end if
 
     CStsServer& nonConstThis = *const_cast<CStsServer*> (this);
 
     // Construct a new session, passing it a pointer to the server object.  This function
     // is const, so the const-ness must be cast away from the this pointer.
-    CSession2* returnValue = new (ELeave) CStsServerSession(nonConstThis, *iSts);
+    CSession2* returnValue = new (ELeave) CStsServerSession(nonConstThis,
+            *iSts);
 
     return returnValue;
     }
@@ -114,6 +117,10 @@
         {
         // Remove the session from the list of sessions.
         iSessions.Remove(index);
+        }
+    else
+        {
+        //TODO: Add trace here
         } // end if
 
     if (iSessions.Count() == 0)
@@ -125,8 +132,7 @@
 
 // SERVER LAUNCHING FUNCTIONALITY
 
-EXPORT_C void CStsServer::RunServerL(bool aPerformProcessRendezvous,
-        bool aPerformThreadRendezvous)
+EXPORT_C void CStsServer::RunServerL()
     {
     // naming the server thread after the server helps to debug panics
     User::LeaveIfError(User::RenameThread(KStsServerName));
@@ -139,17 +145,8 @@
     // create the server (leave it on the cleanup stack)
     CStsServer* server = CStsServer::NewLC();
 
-    // Initialisation complete, now signal the client, if requested.
-
-    if (aPerformProcessRendezvous)
-        {
-        RProcess::Rendezvous(KErrNone);
-        }
-
-    if (aPerformThreadRendezvous)
-        {
-        RThread::Rendezvous(KErrNone);
-        }
+    // Initialisation complete, now signal the client.
+    RProcess::Rendezvous(KErrNone);
 
     // Ready to run
     // Start wait loop, will return when server is shutdown
--- a/mmserv/sts/stsserver/src/stsserver.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsserver/src/stsserver.h	Fri Apr 30 19:18:45 2010 -0500
@@ -28,8 +28,7 @@
 public:
 
     // Runs the server on the current thread, and blocks until the server exits.
-    IMPORT_C static void RunServerL(bool aPerformProcessRendezvous = EFalse,
-            bool aPerformThreadRendezvous = EFalse);
+    IMPORT_C static void RunServerL();
 
     void AddSession(CStsServerSession* aSession);
 
--- a/mmserv/sts/stsserver/src/stsserverexe.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsserver/src/stsserverexe.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -15,26 +15,27 @@
  * The file containt the main method of the STS Server.
  */
 
+#include <ecom/ecom.h>
 #include "stsserver.h"
-#include "stsclientservercommon.h"
 
 TInt E32Main()
     {
+    __UHEAP_MARK;
     TInt returnValue = KErrNoMemory;
 
     RThread myThread;
     myThread.SetPriority(EPriorityAbsoluteRealTime1);
-
-    __UHEAP_MARK;
-
+    myThread.Close();
+    
     CTrapCleanup* cleanup = CTrapCleanup::New();
 
     if (cleanup)
         {
         // Run the server and request a process rendezvous.
-        TRAP( returnValue, CStsServer::RunServerL( ETrue ) );
+        TRAP( returnValue, CStsServer::RunServerL() );
         delete cleanup;
         }
+    REComSession::FinalClose();
     __UHEAP_MARKEND;
 
     return returnValue;
--- a/mmserv/sts/stsserver/src/stsserversession.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsserver/src/stsserversession.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -29,7 +29,11 @@
 
 CStsServerSession::~CStsServerSession()
     {
+    TStsCallBack callBack;
+    callBack.callBackType = EStsShutdown;
+    iMsgQueue.SendBlocking(callBack);
     iServer.DropSession(this);
+    iMsgQueue.Close();
     }
 
 void CStsServerSession::CreateL()
@@ -41,11 +45,17 @@
     {
     switch (aMessage.Function())
         {
+        case StsMsg_RegisterMsgQueue:
+            DoRegisterMsgQueueL(aMessage);
+            break;
         case StsMsg_PlayTone:
             DoPlayToneL(aMessage);
             break;
-        case StsMsg_StopTone:
-            DoStopToneL(aMessage);
+        case StsMsg_PlayAlarm:
+            DoPlayAlarmL(aMessage);
+            break;
+        case StsMsg_StopAlarm:
+            DoStopAlarmL(aMessage);
             break;
         default:
             break;
@@ -57,20 +67,54 @@
     CSession2::ServiceError(aMessage, aError);
     }
 
+void CStsServerSession::DoRegisterMsgQueueL(const RMessage2& aMessage)
+    {
+    TInt result = iMsgQueue.Open(aMessage, 0);
+
+    aMessage.Complete(result);
+    }
+
 void CStsServerSession::DoPlayToneL(const RMessage2& aMessage)
     {
-    CSystemToneService::TToneType toneType =
+    CSystemToneService::TToneType tone =
             (CSystemToneService::TToneType) aMessage.Int0();
+    aMessage.Complete(KErrNone);
+    iSts.PlayTone(tone);
+    }
+
+void CStsServerSession::DoPlayAlarmL(const RMessage2& aMessage)
+    {
+    CSystemToneService::TAlarmType alarm =
+            (CSystemToneService::TAlarmType) aMessage.Int0();
     unsigned int context = 0;
-    iSts.PlayTone(toneType, context);
+    iSts.PlayAlarm(alarm, context, *this);
+    iObserverMap[context] = (MStsPlayAlarmObserver*) aMessage.Ptr2();
     TPckg<unsigned int> contextPckg(context);
     TRAPD(err,aMessage.WriteL(1,contextPckg));
     aMessage.Complete(err);
+    // if the context is 0 there was a problem with the PlayAlarm,
+    // so trigger the PlayAlarmComplete callback.
+    if (context == 0)
+        {
+        PlayAlarmComplete(0);
+        }
     }
 
-void CStsServerSession::DoStopToneL(const RMessage2& aMessage)
+void CStsServerSession::DoStopAlarmL(const RMessage2& aMessage)
     {
     unsigned int context = aMessage.Int0();
     aMessage.Complete(KErrNone);
-    iSts.StopTone(context);
+    iObserverMap.erase(context);
+    iSts.StopAlarm(context);
     }
+
+void CStsServerSession::PlayAlarmComplete(unsigned int aAlarmContext)
+    {
+    //TODO: Trigger play complete callback to RSession
+    TStsCallBack callBack =
+        {
+        EStsPlayAlarmComplete, iObserverMap[aAlarmContext], aAlarmContext
+        };
+    iMsgQueue.SendBlocking(callBack);
+    iObserverMap.erase(aAlarmContext);
+    }
--- a/mmserv/sts/stsserver/src/stsserversession.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/stsserver/src/stsserversession.h	Fri Apr 30 19:18:45 2010 -0500
@@ -20,13 +20,15 @@
 
 #include <e32base.h>
 #include <e32msgqueue.h>
+#include <map>
 
 #include "stsclientservercommon.h"
 
 class CSts;
 class CStsServer;
+class CStsPlayAlarmObserver;
 
-class CStsServerSession : public CSession2
+class CStsServerSession : public CSession2, private MStsPlayAlarmObserver
     {
 public:
 
@@ -41,12 +43,20 @@
 
 private:
 
+    void DoRegisterMsgQueueL(const RMessage2& aMessage);
     void DoPlayToneL(const RMessage2& aMessage);
-    void DoStopToneL(const RMessage2& aMessage);
+    void DoPlayAlarmL(const RMessage2& aMessage);
+    void DoStopAlarmL(const RMessage2& aMessage);
+
+    // inherited from MPlayAlarmObserver
+    virtual void PlayAlarmComplete(unsigned int aAlarmContext);
 
     CStsServer& iServer;
     CSts& iSts;
 
+    typedef std::map<unsigned int, MStsPlayAlarmObserver*> TObserverMap;
+    TObserverMap iObserverMap;
+    RMsgQueue<TStsCallBack> iMsgQueue;
     };
 
 #endif // STSSERVERSESSION_H_
--- a/mmserv/sts/tsrc/ststester/sis/ststester.pkg	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/tsrc/ststester/sis/ststester.pkg	Fri Apr 30 19:18:45 2010 -0500
@@ -31,7 +31,7 @@
 :"Nokia"
 
 ;Add System Tone Service package
-@"../../../sis/systemtoneservice.sisx",(0x10207C90)
+;@"../../../sis/systemtoneservice.sisx",(0x10207C90)
 
 ;Files To Copy...<src> <destination>
 "/epoc32/release/armv5/udeb/ststester.exe"		         -"!:/sys/bin/ststester.exe"
--- a/mmserv/sts/tsrc/ststester/src/ststester.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/tsrc/ststester/src/ststester.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -27,27 +27,61 @@
 
 const TOperationsPage KKeyMap[KKeyMapPageCount] =
     {
-        {STR("Standard controls"), 5, // default softkey index
-           {
-               // Enter
-               {STR(""),                   KOperation_ExecuteOption},
-               // Up / Down / Left / Right
-               {STR(""),                   KOperation_PreviousOption},
-               {STR(""),                   KOperation_NextOption},
-               {STR(""),                   KOperation_PreviousOptionPage},
-               {STR(""),                   KOperation_NextOptionPage},
-               // 0 - 9
-               {STR("Play Default Beep"),  EOperation_PlayDefaultBeep},
-               {STR("Play Clock Alarm"),   EOperation_PlayClockAlarm},
-               {STR("Stop Clock Alarm"),   EOperation_StopClockAlarm},
-               {STR(""),                   KOperation_None},
-               {STR(""),                   KOperation_None},
-               {STR(""),                   KOperation_None},
-               {STR(""),                   KOperation_None},
-               {STR(""),                   KOperation_None},
-               {STR(""),                   KOperation_None},
-               {STR("Exit"),               KOperation_Exit}
-           }
+        {
+        STR("Standard controls"), 5, // default softkey index
+                    {
+                    // Enter
+                                {
+                                STR(""), KOperation_ExecuteOption
+                                },
+                            // Up / Down / Left / Right
+                                {
+                                STR(""), KOperation_PreviousOption
+                                },
+                                {
+                                STR(""), KOperation_NextOption
+                                },
+                                {
+                                STR(""), KOperation_PreviousOptionPage
+                                },
+                                {
+                                STR(""), KOperation_NextOptionPage
+                                },
+                            // 0 - 9
+                                {
+                                        STR("Play Default Beep"),
+                                        EOperation_PlayDefaultBeep
+                                },
+                                {
+                                        STR("Play Clock Alarm"),
+                                        EOperation_PlayClockAlarm
+                                },
+                                {
+                                        STR("Stop Clock Alarm"),
+                                        EOperation_StopClockAlarm
+                                },
+                                {
+                                STR(""), KOperation_None
+                                },
+                                {
+                                STR(""), KOperation_None
+                                },
+                                {
+                                STR(""), KOperation_None
+                                },
+                                {
+                                STR(""), KOperation_None
+                                },
+                                {
+                                STR(""), KOperation_None
+                                },
+                                {
+                                STR(""), KOperation_None
+                                },
+                                {
+                                STR("Exit"), KOperation_Exit
+                                }
+                    }
         }
     };
 
@@ -67,7 +101,7 @@
 
 CStsTester::~CStsTester()
     {
-    CSystemToneService::Delete( iSts);
+    CSystemToneService::Delete(iSts);
     }
 
 void CStsTester::InitL()
@@ -78,15 +112,15 @@
 
 void CStsTester::Main()
     {
-    TRAP_IGNORE( MainL() );
+    TRAP_IGNORE(MainL());
     }
 
 void CStsTester::MainL()
     {
-    _LIT( KPlayDefault, "Play Default Beep" );
-    _LIT( KPlayClockAlarm, "Play Clock Alarm" );
-    _LIT( KStopClockAlarm, "Stop Clock Alarm" );
-    _LIT( KExit, "Exit");
+    _LIT(KPlayDefault, "Play Default Beep");
+    _LIT(KPlayClockAlarm, "Play Clock Alarm");
+    _LIT(KStopClockAlarm, "Stop Clock Alarm");
+    _LIT(KExit, "Exit");
 
     bool done = false;
 
@@ -98,8 +132,8 @@
         operations.Append(&KStopClockAlarm);
         operations.Append(&KExit);
 
-        TInt index = SelectFromListL(TPoint(0, 0), iDisplaySize,
-                _L("Select STS operation to perform:"), operations);
+        TInt index = SelectFromListL(TPoint(0, 0), iDisplaySize, _L(
+                "Select STS operation to perform:"), operations);
 
         operations.Reset();
 
@@ -144,8 +178,8 @@
             if (iPlayState != EPlaying)
                 {
                 TAG_TIME_PROFILING_BEGIN;
-                iSts->PlayTone(CSystemToneService::EClockAlarm,
-                        iCurrentContext);
+                iSts->PlayAlarm(CSystemToneService::EClockAlarm,
+                        iCurrentContext, *this);
                 TAG_TIME_PROFILING_END;
                 PRINT_TO_CONSOLE_TIME_DIFF;
                 iPlayState = EPlaying;
@@ -155,7 +189,7 @@
         case EOperation_StopClockAlarm:
             {
             TAG_TIME_PROFILING_BEGIN;
-            iSts->StopTone(iCurrentContext);
+            iSts->StopAlarm(iCurrentContext);
             TAG_TIME_PROFILING_END;
             PRINT_TO_CONSOLE_TIME_DIFF;
             iPlayState = EStopped;
@@ -167,3 +201,11 @@
             }
         }
     }
+
+void CStsTester::PlayAlarmComplete(unsigned int aAlarmContext)
+    {
+    if (aAlarmContext == iCurrentContext)
+        {
+        iPlayState = EStopped;
+        }
+    }
--- a/mmserv/sts/tsrc/ststester/src/ststester.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/sts/tsrc/ststester/src/ststester.h	Fri Apr 30 19:18:45 2010 -0500
@@ -19,8 +19,7 @@
 #define STSTESTER_H_
 
 #include "testappbase.h"
-
-class CSystemToneService;
+#include <systemtoneservice.h>
 
 enum TOperations
     {
@@ -29,7 +28,7 @@
     EOperation_StopClockAlarm
     };
 
-class CStsTester : public CTestAppBase
+class CStsTester : public CTestAppBase, MStsPlayAlarmObserver
     {
 public:
     // Methods
@@ -54,6 +53,9 @@
             const TDesC& aOperationText);
 
 private:
+    // inherited from MPlayAlarmObserver
+    virtual void PlayAlarmComplete(unsigned int aAlarmContext);
+    
     // Attributes
 
     enum TPlayState
--- a/mmserv/thumbnailengine/TneAPISrc/HXTneserver.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/thumbnailengine/TneAPISrc/HXTneserver.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -21,6 +21,8 @@
 #include"HXTneclientservercommon.h"
 #include <flogger.h>
 #include <f32file64.h>
+#include <e32math.h> // Sqrt
+#include <stdlib.h> // abs
 static const TInt kDefaultStack = 0x4000;
 
 
@@ -57,7 +59,7 @@
 
 
 
-const TInt KMaxPacketToDecode = 32;
+const TInt KMaxPacketToDecode = 160; // Many clips begin with several seconds of logos / MPAA rating which need to be skipped
 
 //////////////Server///////////////
 
@@ -688,51 +690,126 @@
         }
 }
 
+/* Determines whether a frame contains sufficient data to be considered an useful frame.
+ * The logic scans a set of pixels to confirm:
+ * too bright or too dark pixels are not taken into account. Only mid brightness pixels will be considered
+ * if less than minSamples valid samples the frame is rejected. 
+ * if the mode is more frequent than maxModePrct% the frame is rejected. This is useful to reject the MPAA rating or other simple logos
+ * if the contrast is too low (max - min) frame is rejected
+ * if the standard deviation is too low frame is rejected.
+ */
+
 TBool CTneSession::IsGoodFrame(TUint8* aYUVDataPtr)
 {
-	
  	TInt i;
+    TInt ySize = iWidth*iHeight; 
+    TUint8 * resetYUVPtr = aYUVDataPtr;
+
+    // only these luminances are taken into account
+    TInt minSamples = 5;
+    TInt tooDark = 30;
+    TInt tooBright = 240;
+
+    // Defines how much data we analyze from the image to analyze its validity
+    TInt pixelSkips = iHeight;  // scans about 1 to 3 pixels per line depending on aspect ratio 
+
+    // average luminance profiling
+    TInt runningSum = 0;
+    TInt numberOfSamples = 0;
+    TInt averageValue = 0;
+
+    // contrast profiling
     TInt minValue = 255;
     TInt maxValue = 0;
+    TInt minMaxDeltaThreshold = 20;
+
+    // mode profiling
+    int mode = 0;
+    int modeSamples = 0;
+    int histogram[255] = {0};
+    int maxModePrct = 69;
+
+    // standard deviation profiling
+    TInt minStdDeviation = 5;
+    TUint32 residualsum = 0;
+    TReal stdDeviation = 0;
+
+    // Exit value
     TBool goodFrame = ETrue;
-    TInt runningSum=0;
-    TInt averageValue=0;
-    TInt pixelSkips = 4;
-    TInt numberOfSamples=0;
-    TInt minMaxDeltaThreshold = 20; 
-    TInt extremeRegionThreshold = 20; 
-    TInt ySize = iWidth*iHeight; 
-    
-    // gather image statistics
-    for(i=0, numberOfSamples=0; i<ySize; i+=pixelSkips, aYUVDataPtr+=pixelSkips, numberOfSamples++)
+
+    for(i=0, numberOfSamples=0; i<ySize; i+=pixelSkips, aYUVDataPtr+=pixelSkips)
     {
-        
-        
-        runningSum += *aYUVDataPtr;
-        if(*aYUVDataPtr > maxValue)
-            maxValue = *aYUVDataPtr;
-        if(*aYUVDataPtr < minValue)
-            minValue = *aYUVDataPtr;
+        if ( (*aYUVDataPtr>tooDark) && (*aYUVDataPtr<tooBright) )
+        {
+            runningSum += *aYUVDataPtr;
+            if(*aYUVDataPtr > maxValue)
+                maxValue = *aYUVDataPtr;
+            if(*aYUVDataPtr < minValue)
+                minValue = *aYUVDataPtr;
+            histogram[*aYUVDataPtr]++;
+            numberOfSamples++;
+        }
+    }
+
+    if (numberOfSamples < minSamples)
+    {
+        //FLOG(_L("CTneSession::IsGoodFrame too few good samples"));
+        goodFrame = EFalse;
     }
-    //VDASSERT(numberOfSamples,10);
-    if (numberOfSamples == 0)
+    else
     {
-        FLOG(_L("CTneSession::IsGoodFrame numberOfSamples is zero")); 
-    }
-    else 
-    {
-        averageValue = runningSum/numberOfSamples;
-    }
+        // Find the mode
+        for (i=0; i<255; i++)
+        {
+            if (histogram[i] > modeSamples)
+            {
+                modeSamples = histogram[i];
+                mode = i;
+            }
+        }
+        // Add the mode and most immediate values, as compression may add artifacts that disperse its value
+        for (i = mode-2, modeSamples = 0; i < mode+3; i++)
+        {
+            modeSamples += histogram[i];
+        }
     
-    // make decision based statistics
-    if((maxValue - minValue) < minMaxDeltaThreshold)
-        goodFrame = EFalse;
-    else 
-    {
-        if(averageValue < (minValue + extremeRegionThreshold) || 
-            averageValue > (maxValue - extremeRegionThreshold))
-            goodFrame = EFalse;
+        if (modeSamples * 100 / numberOfSamples > maxModePrct)
+        {
+            //FLOG(_L("Mode (%d) in over %d%% of the image\n", mode, modeSamples * 100 / numberOfSamples);
+            goodFrame = false;
+        }
+        else 
+        {
+            averageValue = runningSum / numberOfSamples;
+            // Rescan the frame now that we the average value is known
+            aYUVDataPtr = resetYUVPtr;
+    
+    
+            // Calculate the sum of residuals: (pixel - avgpixel)^2
+            for(i=0; i<ySize; i+=pixelSkips, aYUVDataPtr+=pixelSkips)
+            {
+                if ( (*aYUVDataPtr>tooDark) && (*aYUVDataPtr<tooBright) )
+                {
+                    residualsum += (*aYUVDataPtr - averageValue) * (*aYUVDataPtr - averageValue);
+                }
+            }
+    
+            // Get the standard deviation
+            Math::Sqrt(stdDeviation , residualsum / numberOfSamples);
+    
+            if (stdDeviation < minStdDeviation)
+            {
+                //FLOG(_L("CTneSession::IsGoodFrame too low StdDeviation: %f"), stdDeviation);
+                goodFrame = EFalse;
+            }
+            else if((maxValue - minValue) < minMaxDeltaThreshold)
+            {
+                //FLOG(_L("CTneSession::IsGoodFrame too little difference between brightest and darkest pixel"));
+                goodFrame = EFalse;
+            }
+        }
     }
+
     return goodFrame;
 }
 
--- a/mmserv/tms/inc/tmsbufferimpl.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/inc/tmsbufferimpl.h	Fri Apr 30 19:18:45 2010 -0500
@@ -29,13 +29,9 @@
 class TMSBufferImpl
     {
 public:
-    ~TMSBufferImpl();
     IMPORT_C static gint Create(TMSBufferType ctype, guint size,
             TMSBuffer*& tmsbuffer);
     IMPORT_C static gint Delete(TMSBuffer*& tmsbuffer);
-
-private:
-    TMSBufferImpl();
     };
 
 } //namespace TMS
--- a/mmserv/tms/inc/tmseffectimpl.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/inc/tmseffectimpl.h	Fri Apr 30 19:18:45 2010 -0500
@@ -29,13 +29,9 @@
 class TMSEffectImpl
     {
 public:
-    ~TMSEffectImpl();
     IMPORT_C static gint Create(TMSEffectType effecttype,
             TMSEffect*& tmseffect);
     IMPORT_C static gint Delete(TMSEffect*& tmseffect);
-
-private:
-    TMSEffectImpl();
     };
 
 } //namespace TMS
--- a/mmserv/tms/inc/tmsformatimpl.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/inc/tmsformatimpl.h	Fri Apr 30 19:18:45 2010 -0500
@@ -30,15 +30,9 @@
 class TMSFormatImpl : public TMSFormat
     {
 public:
-    virtual ~TMSFormatImpl();
     IMPORT_C static gint Create(TMSFormatType formattype,
             TMSFormat*& tmsformat);
     IMPORT_C static gint Delete(TMSFormat*& tmsformat);
-
-    gint SetProxy(TMSCallProxy* aProxy, gpointer queuehandler);
-
-private:
-    TMSFormatImpl();
     };
 
 } //namespace TMS
--- a/mmserv/tms/inc/tmssinkimpl.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/inc/tmssinkimpl.h	Fri Apr 30 19:18:45 2010 -0500
@@ -29,12 +29,8 @@
 class TMSSinkImpl
     {
 public:
-    ~TMSSinkImpl();
     IMPORT_C static gint Create(TMSSinkType sinktype, TMSSink*& tmssink);
     IMPORT_C static gint Delete(TMSSink*& tmssink);
-
-private:
-    TMSSinkImpl();
     };
 
 } //namespace TMS
--- a/mmserv/tms/tmscallserver/inc/tmscsdownlink.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscsdownlink.h	Fri Apr 30 19:18:45 2010 -0500
@@ -15,8 +15,8 @@
  *
  */
 
-#ifndef CSDOWNLINK_H
-#define CSDOWNLINK_H
+#ifndef TMSCSDOWNLINK_H
+#define TMSCSDOWNLINK_H
 
 #include <glib.h>
 #include "tmscsdevsound.h"
@@ -89,4 +89,4 @@
 
 } //namespace TMS
 
-#endif // CSDOWNLINK_H
+#endif // TMSCSDOWNLINK_H
--- a/mmserv/tms/tmscallserver/inc/tmscsuplink.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscsuplink.h	Fri Apr 30 19:18:45 2010 -0500
@@ -15,8 +15,8 @@
  *
  */
 
-#ifndef CS_UPLINK_H
-#define CS_UPLINK_H
+#ifndef TMSCSUPLINK_H
+#define TMSCSUPLINK_H
 
 #include <glib.h>
 #include "tmscsdevsound.h"
@@ -101,4 +101,4 @@
 
 } //namespace TMS
 
-#endif // CS_UPLINK_H
+#endif // TMSCSUPLINK_H
--- a/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -1017,7 +1017,7 @@
 gint TMSCallCSAdpt::ContinueDTMF(TBool continuesending)
     {
     TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_SUCCESS);
+    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
 
     if (iDTMFUplinkPlayer)
         {
--- a/mmserv/tms/tmsimpl/eabi/tmsimpl.def	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsimpl/eabi/tmsimpl.def	Fri Apr 30 19:18:45 2010 -0500
@@ -23,95 +23,93 @@
 	_ZTIN3TMS11TMSCallImplE @ 22 NONAME
 	_ZTIN3TMS11TMSDTMFImplE @ 23 NONAME
 	_ZTIN3TMS12TMSMemBufferE @ 24 NONAME
-	_ZTIN3TMS13TMSFormatImplE @ 25 NONAME
-	_ZTIN3TMS13TMSStreamImplE @ 26 NONAME
-	_ZTIN3TMS15TMSCallBodyImplE @ 27 NONAME
-	_ZTIN3TMS15TMSDTMFBodyImplE @ 28 NONAME
-	_ZTIN3TMS15TMSRingToneImplE @ 29 NONAME
-	_ZTIN3TMS16TMSAMRFormatImplE @ 30 NONAME
-	_ZTIN3TMS16TMSMicSourceImplE @ 31 NONAME
-	_ZTIN3TMS16TMSModemSinkImplE @ 32 NONAME
-	_ZTIN3TMS16TMSPCMFormatImplE @ 33 NONAME
-	_ZTIN3TMS17TMSCSCallBodyImplE @ 34 NONAME
-	_ZTIN3TMS17TMSClientSinkImplE @ 35 NONAME
-	_ZTIN3TMS17TMSFormatBodyImplE @ 36 NONAME
-	_ZTIN3TMS17TMSG711FormatImplE @ 37 NONAME
-	_ZTIN3TMS17TMSG729FormatImplE @ 38 NONAME
-	_ZTIN3TMS17TMSGainEffectImplE @ 39 NONAME
-	_ZTIN3TMS17TMSILBCFormatImplE @ 40 NONAME
-	_ZTIN3TMS17TMSIPCallBodyImplE @ 41 NONAME
-	_ZTIN3TMS17TMSInbandToneImplE @ 42 NONAME
-	_ZTIN3TMS17TMSStreamBodyImplE @ 43 NONAME
-	_ZTIN3TMS18TMSModemSourceImplE @ 44 NONAME
-	_ZTIN3TMS18TMSSpeakerSinkImplE @ 45 NONAME
-	_ZTIN3TMS19TMSClientSourceImplE @ 46 NONAME
-	_ZTIN3TMS19TMSRingToneBodyImplE @ 47 NONAME
-	_ZTIN3TMS19TMSVolumeEffectImplE @ 48 NONAME
-	_ZTIN3TMS20TMSAMRFormatBodyImplE @ 49 NONAME
-	_ZTIN3TMS20TMSGlobalRoutingImplE @ 50 NONAME
-	_ZTIN3TMS20TMSMicSourceBodyImplE @ 51 NONAME
-	_ZTIN3TMS20TMSModemSinkBodyImplE @ 52 NONAME
-	_ZTIN3TMS20TMSPCMFormatBodyImplE @ 53 NONAME
-	_ZTIN3TMS21TMSClientSinkBodyImplE @ 54 NONAME
-	_ZTIN3TMS21TMSG711FormatBodyImplE @ 55 NONAME
-	_ZTIN3TMS21TMSG729FormatBodyImplE @ 56 NONAME
-	_ZTIN3TMS21TMSGainEffectBodyImplE @ 57 NONAME
-	_ZTIN3TMS21TMSILBCFormatBodyImplE @ 58 NONAME
-	_ZTIN3TMS21TMSInbandToneBodyImplE @ 59 NONAME
-	_ZTIN3TMS22TMSGlobalVolEffectImplE @ 60 NONAME
-	_ZTIN3TMS22TMSModemSourceBodyImplE @ 61 NONAME
-	_ZTIN3TMS22TMSSpeakerSinkBodyImplE @ 62 NONAME
-	_ZTIN3TMS23TMSClientSourceBodyImplE @ 63 NONAME
-	_ZTIN3TMS23TMSGlobalGainEffectImplE @ 64 NONAME
-	_ZTIN3TMS23TMSVolumeEffectBodyImplE @ 65 NONAME
-	_ZTIN3TMS24TMSGlobalRoutingBodyImplE @ 66 NONAME
-	_ZTIN3TMS26TMSGlobalVolEffectBodyImplE @ 67 NONAME
-	_ZTIN3TMS27TMSGlobalGainEffectBodyImplE @ 68 NONAME
-	_ZTVN3TMS11TMSCallImplE @ 69 NONAME
-	_ZTVN3TMS11TMSDTMFImplE @ 70 NONAME
-	_ZTVN3TMS12TMSMemBufferE @ 71 NONAME
-	_ZTVN3TMS13TMSFormatImplE @ 72 NONAME
-	_ZTVN3TMS13TMSStreamImplE @ 73 NONAME
-	_ZTVN3TMS15TMSCallBodyImplE @ 74 NONAME
-	_ZTVN3TMS15TMSDTMFBodyImplE @ 75 NONAME
-	_ZTVN3TMS15TMSRingToneImplE @ 76 NONAME
-	_ZTVN3TMS16TMSAMRFormatImplE @ 77 NONAME
-	_ZTVN3TMS16TMSMicSourceImplE @ 78 NONAME
-	_ZTVN3TMS16TMSModemSinkImplE @ 79 NONAME
-	_ZTVN3TMS16TMSPCMFormatImplE @ 80 NONAME
-	_ZTVN3TMS17TMSCSCallBodyImplE @ 81 NONAME
-	_ZTVN3TMS17TMSClientSinkImplE @ 82 NONAME
-	_ZTVN3TMS17TMSFormatBodyImplE @ 83 NONAME
-	_ZTVN3TMS17TMSG711FormatImplE @ 84 NONAME
-	_ZTVN3TMS17TMSG729FormatImplE @ 85 NONAME
-	_ZTVN3TMS17TMSGainEffectImplE @ 86 NONAME
-	_ZTVN3TMS17TMSILBCFormatImplE @ 87 NONAME
-	_ZTVN3TMS17TMSIPCallBodyImplE @ 88 NONAME
-	_ZTVN3TMS17TMSInbandToneImplE @ 89 NONAME
-	_ZTVN3TMS17TMSStreamBodyImplE @ 90 NONAME
-	_ZTVN3TMS18TMSModemSourceImplE @ 91 NONAME
-	_ZTVN3TMS18TMSSpeakerSinkImplE @ 92 NONAME
-	_ZTVN3TMS19TMSClientSourceImplE @ 93 NONAME
-	_ZTVN3TMS19TMSRingToneBodyImplE @ 94 NONAME
-	_ZTVN3TMS19TMSVolumeEffectImplE @ 95 NONAME
-	_ZTVN3TMS20TMSAMRFormatBodyImplE @ 96 NONAME
-	_ZTVN3TMS20TMSGlobalRoutingImplE @ 97 NONAME
-	_ZTVN3TMS20TMSMicSourceBodyImplE @ 98 NONAME
-	_ZTVN3TMS20TMSModemSinkBodyImplE @ 99 NONAME
-	_ZTVN3TMS20TMSPCMFormatBodyImplE @ 100 NONAME
-	_ZTVN3TMS21TMSClientSinkBodyImplE @ 101 NONAME
-	_ZTVN3TMS21TMSG711FormatBodyImplE @ 102 NONAME
-	_ZTVN3TMS21TMSG729FormatBodyImplE @ 103 NONAME
-	_ZTVN3TMS21TMSGainEffectBodyImplE @ 104 NONAME
-	_ZTVN3TMS21TMSILBCFormatBodyImplE @ 105 NONAME
-	_ZTVN3TMS21TMSInbandToneBodyImplE @ 106 NONAME
-	_ZTVN3TMS22TMSGlobalVolEffectImplE @ 107 NONAME
-	_ZTVN3TMS22TMSModemSourceBodyImplE @ 108 NONAME
-	_ZTVN3TMS22TMSSpeakerSinkBodyImplE @ 109 NONAME
-	_ZTVN3TMS23TMSClientSourceBodyImplE @ 110 NONAME
-	_ZTVN3TMS23TMSGlobalGainEffectImplE @ 111 NONAME
-	_ZTVN3TMS23TMSVolumeEffectBodyImplE @ 112 NONAME
-	_ZTVN3TMS24TMSGlobalRoutingBodyImplE @ 113 NONAME
-	_ZTVN3TMS26TMSGlobalVolEffectBodyImplE @ 114 NONAME
-	_ZTVN3TMS27TMSGlobalGainEffectBodyImplE @ 115 NONAME
+	_ZTIN3TMS13TMSStreamImplE @ 25 NONAME
+	_ZTIN3TMS15TMSCallBodyImplE @ 26 NONAME
+	_ZTIN3TMS15TMSDTMFBodyImplE @ 27 NONAME
+	_ZTIN3TMS15TMSRingToneImplE @ 28 NONAME
+	_ZTIN3TMS16TMSAMRFormatImplE @ 29 NONAME
+	_ZTIN3TMS16TMSMicSourceImplE @ 30 NONAME
+	_ZTIN3TMS16TMSModemSinkImplE @ 31 NONAME
+	_ZTIN3TMS16TMSPCMFormatImplE @ 32 NONAME
+	_ZTIN3TMS17TMSCSCallBodyImplE @ 33 NONAME
+	_ZTIN3TMS17TMSClientSinkImplE @ 34 NONAME
+	_ZTIN3TMS17TMSFormatBodyImplE @ 35 NONAME
+	_ZTIN3TMS17TMSG711FormatImplE @ 36 NONAME
+	_ZTIN3TMS17TMSG729FormatImplE @ 37 NONAME
+	_ZTIN3TMS17TMSGainEffectImplE @ 38 NONAME
+	_ZTIN3TMS17TMSILBCFormatImplE @ 39 NONAME
+	_ZTIN3TMS17TMSIPCallBodyImplE @ 40 NONAME
+	_ZTIN3TMS17TMSInbandToneImplE @ 41 NONAME
+	_ZTIN3TMS17TMSStreamBodyImplE @ 42 NONAME
+	_ZTIN3TMS18TMSModemSourceImplE @ 43 NONAME
+	_ZTIN3TMS18TMSSpeakerSinkImplE @ 44 NONAME
+	_ZTIN3TMS19TMSClientSourceImplE @ 45 NONAME
+	_ZTIN3TMS19TMSRingToneBodyImplE @ 46 NONAME
+	_ZTIN3TMS19TMSVolumeEffectImplE @ 47 NONAME
+	_ZTIN3TMS20TMSAMRFormatBodyImplE @ 48 NONAME
+	_ZTIN3TMS20TMSGlobalRoutingImplE @ 49 NONAME
+	_ZTIN3TMS20TMSMicSourceBodyImplE @ 50 NONAME
+	_ZTIN3TMS20TMSModemSinkBodyImplE @ 51 NONAME
+	_ZTIN3TMS20TMSPCMFormatBodyImplE @ 52 NONAME
+	_ZTIN3TMS21TMSClientSinkBodyImplE @ 53 NONAME
+	_ZTIN3TMS21TMSG711FormatBodyImplE @ 54 NONAME
+	_ZTIN3TMS21TMSG729FormatBodyImplE @ 55 NONAME
+	_ZTIN3TMS21TMSGainEffectBodyImplE @ 56 NONAME
+	_ZTIN3TMS21TMSILBCFormatBodyImplE @ 57 NONAME
+	_ZTIN3TMS21TMSInbandToneBodyImplE @ 58 NONAME
+	_ZTIN3TMS22TMSGlobalVolEffectImplE @ 59 NONAME
+	_ZTIN3TMS22TMSModemSourceBodyImplE @ 60 NONAME
+	_ZTIN3TMS22TMSSpeakerSinkBodyImplE @ 61 NONAME
+	_ZTIN3TMS23TMSClientSourceBodyImplE @ 62 NONAME
+	_ZTIN3TMS23TMSGlobalGainEffectImplE @ 63 NONAME
+	_ZTIN3TMS23TMSVolumeEffectBodyImplE @ 64 NONAME
+	_ZTIN3TMS24TMSGlobalRoutingBodyImplE @ 65 NONAME
+	_ZTIN3TMS26TMSGlobalVolEffectBodyImplE @ 66 NONAME
+	_ZTIN3TMS27TMSGlobalGainEffectBodyImplE @ 67 NONAME
+	_ZTVN3TMS11TMSCallImplE @ 68 NONAME
+	_ZTVN3TMS11TMSDTMFImplE @ 69 NONAME
+	_ZTVN3TMS12TMSMemBufferE @ 70 NONAME
+	_ZTVN3TMS13TMSStreamImplE @ 71 NONAME
+	_ZTVN3TMS15TMSCallBodyImplE @ 72 NONAME
+	_ZTVN3TMS15TMSDTMFBodyImplE @ 73 NONAME
+	_ZTVN3TMS15TMSRingToneImplE @ 74 NONAME
+	_ZTVN3TMS16TMSAMRFormatImplE @ 75 NONAME
+	_ZTVN3TMS16TMSMicSourceImplE @ 76 NONAME
+	_ZTVN3TMS16TMSModemSinkImplE @ 77 NONAME
+	_ZTVN3TMS16TMSPCMFormatImplE @ 78 NONAME
+	_ZTVN3TMS17TMSCSCallBodyImplE @ 79 NONAME
+	_ZTVN3TMS17TMSClientSinkImplE @ 80 NONAME
+	_ZTVN3TMS17TMSFormatBodyImplE @ 81 NONAME
+	_ZTVN3TMS17TMSG711FormatImplE @ 82 NONAME
+	_ZTVN3TMS17TMSG729FormatImplE @ 83 NONAME
+	_ZTVN3TMS17TMSGainEffectImplE @ 84 NONAME
+	_ZTVN3TMS17TMSILBCFormatImplE @ 85 NONAME
+	_ZTVN3TMS17TMSIPCallBodyImplE @ 86 NONAME
+	_ZTVN3TMS17TMSInbandToneImplE @ 87 NONAME
+	_ZTVN3TMS17TMSStreamBodyImplE @ 88 NONAME
+	_ZTVN3TMS18TMSModemSourceImplE @ 89 NONAME
+	_ZTVN3TMS18TMSSpeakerSinkImplE @ 90 NONAME
+	_ZTVN3TMS19TMSClientSourceImplE @ 91 NONAME
+	_ZTVN3TMS19TMSRingToneBodyImplE @ 92 NONAME
+	_ZTVN3TMS19TMSVolumeEffectImplE @ 93 NONAME
+	_ZTVN3TMS20TMSAMRFormatBodyImplE @ 94 NONAME
+	_ZTVN3TMS20TMSGlobalRoutingImplE @ 95 NONAME
+	_ZTVN3TMS20TMSMicSourceBodyImplE @ 96 NONAME
+	_ZTVN3TMS20TMSModemSinkBodyImplE @ 97 NONAME
+	_ZTVN3TMS20TMSPCMFormatBodyImplE @ 98 NONAME
+	_ZTVN3TMS21TMSClientSinkBodyImplE @ 99 NONAME
+	_ZTVN3TMS21TMSG711FormatBodyImplE @ 100 NONAME
+	_ZTVN3TMS21TMSG729FormatBodyImplE @ 101 NONAME
+	_ZTVN3TMS21TMSGainEffectBodyImplE @ 102 NONAME
+	_ZTVN3TMS21TMSILBCFormatBodyImplE @ 103 NONAME
+	_ZTVN3TMS21TMSInbandToneBodyImplE @ 104 NONAME
+	_ZTVN3TMS22TMSGlobalVolEffectImplE @ 105 NONAME
+	_ZTVN3TMS22TMSModemSourceBodyImplE @ 106 NONAME
+	_ZTVN3TMS22TMSSpeakerSinkBodyImplE @ 107 NONAME
+	_ZTVN3TMS23TMSClientSourceBodyImplE @ 108 NONAME
+	_ZTVN3TMS23TMSGlobalGainEffectImplE @ 109 NONAME
+	_ZTVN3TMS23TMSVolumeEffectBodyImplE @ 110 NONAME
+	_ZTVN3TMS24TMSGlobalRoutingBodyImplE @ 111 NONAME
+	_ZTVN3TMS26TMSGlobalVolEffectBodyImplE @ 112 NONAME
+	_ZTVN3TMS27TMSGlobalGainEffectBodyImplE @ 113 NONAME
 
--- a/mmserv/tms/tmsimpl/src/tmsbufferimpl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsbufferimpl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -21,18 +21,6 @@
 
 using namespace TMS;
 
-TMSBufferImpl::TMSBufferImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
-TMSBufferImpl::~TMSBufferImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
 EXPORT_C gint TMSBufferImpl::Create(TMSBufferType buffertype, guint size,
         TMSBuffer*& tmsbuffer)
     {
--- a/mmserv/tms/tmsimpl/src/tmseffectimpl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmseffectimpl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -24,18 +24,6 @@
 
 using namespace TMS;
 
-TMSEffectImpl::TMSEffectImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
-TMSEffectImpl::~TMSEffectImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
 EXPORT_C gint TMSEffectImpl::Create(TMSEffectType effecttype,
         TMSEffect*& tmseffect)
     {
--- a/mmserv/tms/tmsimpl/src/tmsformatimpl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsformatimpl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -26,18 +26,6 @@
 
 using namespace TMS;
 
-TMSFormatImpl::TMSFormatImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
-TMSFormatImpl::~TMSFormatImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
 EXPORT_C gint TMSFormatImpl::Create(TMSFormatType fmttype, TMSFormat*& tmsfmt)
     {
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
--- a/mmserv/tms/tmsimpl/src/tmssinkimpl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmssinkimpl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -23,18 +23,6 @@
 
 using namespace TMS;
 
-TMSSinkImpl::TMSSinkImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
-TMSSinkImpl::~TMSSinkImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
 EXPORT_C gint TMSSinkImpl::Create(TMSSinkType sinktype, TMSSink*& tmssink)
     {
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
--- a/mmserv/tms/tmsimpl/src/tmssourceimpl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmssourceimpl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -23,18 +23,6 @@
 
 using namespace TMS;
 
-TMSSourceImpl::TMSSourceImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
-TMSSourceImpl::~TMSSourceImpl()
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
 EXPORT_C gint TMSSourceImpl::Create(TMSSourceType sourcetype,
         TMSSource*& tmssource)
     {
--- a/mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h	Fri Apr 30 19:18:45 2010 -0500
@@ -47,7 +47,7 @@
     /**
      * Destructor.
      */
-    ~TMSAudioInbandTonePlayer();
+    virtual ~TMSAudioInbandTonePlayer();
 
     /**
      * Plays given tone. Originates from CCP plugin.
--- a/mmserv/tms/tmsserver/inc/tmsaudiotoneutility.h	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsaudiotoneutility.h	Fri Apr 30 19:18:45 2010 -0500
@@ -15,8 +15,8 @@
  *
  */
 
-#ifndef CPEAUDIOTONEUTILITY_H
-#define CPEAUDIOTONEUTILITY_H
+#ifndef TMSAUDIOTONEUTILITY_H
+#define TMSAUDIOTONEUTILITY_H
 
 #include <mdaaudiotoneplayer.h>
 
@@ -28,12 +28,11 @@
  */
 class TMSAudioToneUtility
     {
-
 public:
     /**
      * See CMdaAudioToneUtility::PrepareToPlayDesSequence.
      */
-    virtual void PrepareToPlayDesSequence(const TDesC8& aSequence ) = 0;
+    virtual void PrepareToPlayDesSequence(const TDesC8& aSequence) = 0;
 
     /**
      * See CMdaAudioToneUtility::State.
@@ -53,27 +52,24 @@
     /**
      * See CMdaAudioToneUtility::SetVolume.
      */
-    virtual void SetVolume( TInt aVolume ) = 0;
+    virtual void SetVolume(TInt aVolume) = 0;
 
     /**
      * See CMdaAudioToneUtility::SetRepeats.
      */
-    virtual void SetRepeats(
-        TInt aRepeatNumberOfTimes,
-        const TTimeIntervalMicroSeconds& aTrailingSilence ) = 0;
+    virtual void SetRepeats(TInt aRepeatNumberOfTimes,
+            const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;
 
     /**
      * See CMdaAudioToneUtility::SetPriority.
      */
-    virtual void SetPriority(
-        TInt aPriority,
-        TMdaPriorityPreference aPref) = 0;
+    virtual void SetPriority(TInt aPriority, TMdaPriorityPreference aPref) = 0;
 
     /**
      * See CMdaAudioToneUtility::SetVolumeRamp.
      */
     virtual void SetVolumeRamp(
-        const TTimeIntervalMicroSeconds& aRampDuration) = 0;
+            const TTimeIntervalMicroSeconds& aRampDuration) = 0;
 
     /**
      * See CMdaAudioToneUtility::SetVolumeRamp.
@@ -89,4 +85,4 @@
 
 } //namespace TMS
 
-#endif // CPEAUDIOTONEUTILITY_H
+#endif // TMSAUDIOTONEUTILITY_H
--- a/mmserv/tms/tmsserver/src/tmsaudioinbandtoneplayer.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsaudioinbandtoneplayer.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -58,6 +58,9 @@
     {
     TRACE_PRN_FN_ENT;
     iFsSession.Close();
+    iCurrent->CancelPlay();
+    delete iCurrent;
+
     delete iPlayBeepSequence;
     delete iPlayNoSoundSequence;
     delete iPlayDataSequence;
@@ -68,7 +71,6 @@
     delete iResourceCongestionSeq;
     delete iResourceReorderSeq;
     delete iResourceBusySeq;
-    delete iCurrent;
     TRACE_PRN_FN_EXT;
     }
 
--- a/mmserv/tms/tmsserver/src/tmsaudiotoneutilityimpl.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsaudiotoneutilityimpl.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -25,6 +25,7 @@
 //
 TMSAudioToneUtilityImpl::TMSAudioToneUtilityImpl()
     {
+    iToneUtility = NULL;
     }
 
 // ---------------------------------------------------------------------------
--- a/mmserv/tms/tmsserver/src/tmsserver.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsserver.cpp	Fri Apr 30 19:18:45 2010 -0500
@@ -83,8 +83,8 @@
     iUplCodecs.Close();
     delete iEffectSettings;
     delete iTarHandler;
-    CancelCenRepHandler();
-    CancelDTMFNotifier();
+    delete iAudioCenRepHandler;
+    delete iDTMFHandler;
     DeinitRingTonePlayer();
     delete iTMSRtPlayer;
 
--- a/tsrc/group/bld.inf	Mon May 03 12:59:52 2010 +0300
+++ b/tsrc/group/bld.inf	Fri Apr 30 19:18:45 2010 -0500
@@ -33,7 +33,6 @@
 #include "../../mmmw_plat/call_audio_control_api/tsrc/Group/bld.inf"
 #include "../../mmmw_plat/radio_utilities_api/tsrc/Group/bld.inf"
 #include "../../mmmw_plat/thumbnail_engine_api/tsrc/group/bld.inf"
-#include "../../mmmw_plat/equalizer_ui_api/tsrc/group/bld.inf"
 #include "../../mmmw_plat/telephony_multimedia_service_api/tsrc/Group/Bld.inf"
 
 PRJ_MMPFILES