Revision: 201031
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 18 Aug 2010 10:17:22 +0300
changeset 42 1fa3fb47b1e3
parent 32 94fc26b6e006
child 47 c2e43643db4c
Revision: 201031 Kit: 201033
inc/AmrCodec.h
inc/DebugMacros.h
inc/EAacPlusFrameParser.h
inc/EAacPlusUtil.h
inc/FrameTable.h
inc/Mp3Codec.h
khronosfws/openmax_al/data/openmaxal.cfg
khronosfws/openmax_al/group/openmaxal.mmp
khronosfws/openmax_al/inc/openmaxalwrapper.h
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/xaframeworkmgr.c
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/xadynamicsourceitf.c
khronosfws/openmax_al/src/common/xadynintmgmtitf.c
khronosfws/openmax_al/src/common/xaequalizeritf.c
khronosfws/openmax_al/src/common/xaequalizeritf.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/xametadatatraversalitf.c
khronosfws/openmax_al/src/common/xametadatatraversalitf.h
khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c
khronosfws/openmax_al/src/common/xanokiavolumeextitf.c
khronosfws/openmax_al/src/common/xaobjectitf.c
khronosfws/openmax_al/src/common/xastreaminformationitf.c
khronosfws/openmax_al/src/common/xathreadsafety.c
khronosfws/openmax_al/src/common/xathreadsafety.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/engine/xaaudiodecodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.h
khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c
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/xaengineitf.c
khronosfws/openmax_al/src/engine/xaimagedecodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xaimagedecodercapabilitiesitf.h
khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.h
khronosfws/openmax_al/src/engine/xathreadsyncitf.c
khronosfws/openmax_al/src/engine/xavideodecodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xavideodecodercapabilitiesitf.h
khronosfws/openmax_al/src/engine/xavideoencodercapabilitiesitf.c
khronosfws/openmax_al/src/engine/xavideoencodercapabilitiesitf.h
khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c
khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c
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/xaequalizeritfadaptation.c
khronosfws/openmax_al/src/gst_adaptation/xaequalizeritfadaptation.h
khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.c
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/xametadataadaptation.c
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/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/xaplayitf.c
khronosfws/openmax_al/src/mediaplayer/xaseekitf.c
khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c
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/xarecorditf.c
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/cmmfradiobackendengine.cpp
khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.h
khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.c
khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xaradioitfadaptation.c
khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c
khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c
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/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/rom/AudioControllerPluginsVariant.iby
mmfenh/profilesettingsmonitor/inc/ProfileSettingsMonitorServerImpl.h
mmfenh/profilesettingsmonitor/src/ProfileSettingsMonitorServerImpl.cpp
mmmw_info/mmmw_metadata/mmmw_metadata.mrp
mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh
mmmw_plat/openmax_al_api/inc/OpenMAXAL_Platform.h
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_radioitf.cfg
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/openmaxaltestmodule.h
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp
mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/radio/openmaxalradioitftests.cpp
mmmw_plat/system_tone_service_api/inc/systemtoneservice.h
mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg
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/tsrc/TmsAudioServicesTestClass/group/TmsAudioServicesTestClass.pkg
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
mmserv/metadatautility/Src/MetaDataParserWMA.cpp
mmserv/metadatautility/Src/MetaDataParserWMA.h
mmserv/radioutility/radio_utility/stub/bwins/Radio_Utility_Stubu.def
mmserv/radioutility/radio_utility/stub/eabi/Radio_Utility_Stubu.def
mmserv/radioutility/radio_utility/stub/group/Radio_Utility_Stub.mmp
mmserv/radioutility/radio_utility/stub/group/bld.inf
mmserv/radioutility/radio_utility/stub/rom/Radio_Utility_Stub.iby
mmserv/radioutility/radio_utility/stub/src/StubRadioFmTunerUtilityBody.cpp
mmserv/radioutility/radio_utility/stub/src/StubRadioPlayerUtilityBody.cpp
mmserv/radioutility/radio_utility/stub/src/StubRadioRdsUtilityBody.cpp
mmserv/radioutility/radioserver/Session/stub/bwins/RadioSession_Stubu.def
mmserv/radioutility/radioserver/Session/stub/eabi/RadioSession_Stubu.def
mmserv/radioutility/radioserver/Session/stub/group/RadioSession_Stub.mmp
mmserv/radioutility/radioserver/Session/stub/group/bld.inf
mmserv/radioutility/radioserver/Session/stub/src/RadioStubManager.h
mmserv/radioutility/radioserver/Session/stub/src/StubRadioSession.cpp
mmserv/radioutility/radioserver/Session/stub/src/StubRadioSession.h
mmserv/radioutility/tsrc/bld.inf
mmserv/sts/bwins/systemtoneservice.def
mmserv/sts/eabi/systemtoneservice.def
mmserv/sts/rom/mmmwsystemtoneservice.iby
mmserv/sts/src/systemtoneservice.cpp
mmserv/sts/sts/inc/sts.h
mmserv/sts/sts/inc/stsplayer.h
mmserv/sts/sts/src/sts.cpp
mmserv/sts/sts/src/stsplayer.cpp
mmserv/sts/stsproxy/inc/stsimplementation.h
mmserv/sts/stsproxy/src/rstssession.cpp
mmserv/sts/stsproxy/src/rstssession.h
mmserv/sts/stsproxy/src/stsimplementation.cpp
mmserv/sts/stsserver/group/stsserver.mmp
mmserv/sts/stsserver/inc/stsclientservercommon.h
mmserv/sts/stsserver/src/stsserversession.cpp
mmserv/sts/stsserver/src/stsserversession.h
mmserv/tms/inc/tmscallclisrv.h
mmserv/tms/inc/tmsclientserver.h
mmserv/tms/inc/tmsdtmfbody.h
mmserv/tms/inc/tmsdtmfimpl.h
mmserv/tms/inc/tmsproxy.h
mmserv/tms/inc/tmsstreambody.h
mmserv/tms/inc/tmsstreamimpl.h
mmserv/tms/inc/tmsutility.h
mmserv/tms/rom/tms.iby
mmserv/tms/tmscallserver/eabi/tmscallserver.def
mmserv/tms/tmscallserver/group/tmscallserver.mmp
mmserv/tms/tmscallserver/inc/tmscalladpt.h
mmserv/tms/tmscallserver/inc/tmscallcsadpt.h
mmserv/tms/tmscallserver/inc/tmscallipadpt.h
mmserv/tms/tmscallserver/inc/tmscallsession.h
mmserv/tms/tmscallserver/inc/tmsdtmfnotifier.h
mmserv/tms/tmscallserver/inc/tmsdtmfobserver.h
mmserv/tms/tmscallserver/inc/tmsdtmfprovider.h
mmserv/tms/tmscallserver/inc/tmsdtmftoneplayer.h
mmserv/tms/tmscallserver/inc/tmsdtmftoneplayerobserver.h
mmserv/tms/tmscallserver/inc/tmseteldtmfmonitor.h
mmserv/tms/tmscallserver/inc/tmseteldtmfstopmonitor.h
mmserv/tms/tmscallserver/inc/tmssyncvol.h
mmserv/tms/tmscallserver/src/tmscalladpt.cpp
mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp
mmserv/tms/tmscallserver/src/tmscallipadpt.cpp
mmserv/tms/tmscallserver/src/tmscallsession.cpp
mmserv/tms/tmscallserver/src/tmscsdevsound.cpp
mmserv/tms/tmscallserver/src/tmscsdownlink.cpp
mmserv/tms/tmscallserver/src/tmscsuplink.cpp
mmserv/tms/tmscallserver/src/tmsdtmfnotifier.cpp
mmserv/tms/tmscallserver/src/tmsdtmfprovider.cpp
mmserv/tms/tmscallserver/src/tmsdtmftoneplayer.cpp
mmserv/tms/tmscallserver/src/tmseteldtmfmonitor.cpp
mmserv/tms/tmscallserver/src/tmseteldtmfstopmonitor.cpp
mmserv/tms/tmscallserver/src/tmsipcalldownlinkds.cpp
mmserv/tms/tmscallserver/src/tmsipcalluplinkds.cpp
mmserv/tms/tmscallserver/src/tmsyncvol.cpp
mmserv/tms/tmsfactory/src/tmsfactoryimpl.cpp
mmserv/tms/tmsimpl/bwins/tmsimpl.def
mmserv/tms/tmsimpl/group/tmsimpl.mmp
mmserv/tms/tmsimpl/inc/tmsdtmfbodyimpl.h
mmserv/tms/tmsimpl/inc/tmsstreambodyimpl.h
mmserv/tms/tmsimpl/src/tmscallimpl.cpp
mmserv/tms/tmsimpl/src/tmscscallbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsdtmfbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsdtmfimpl.cpp
mmserv/tms/tmsimpl/src/tmseffectimpl.cpp
mmserv/tms/tmsimpl/src/tmsg711impl.cpp
mmserv/tms/tmsimpl/src/tmsipcallbodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsringtonebodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp
mmserv/tms/tmsimpl/src/tmsstreamimpl.cpp
mmserv/tms/tmsproxy/bwins/tmsproxy.def
mmserv/tms/tmsproxy/eabi/tmsproxy.def
mmserv/tms/tmsproxy/src/tmsproxy.cpp
mmserv/tms/tmsserver/group/tmsserver.mmp
mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h
mmserv/tms/tmsserver/inc/tmsdtmfeventhandler.h
mmserv/tms/tmsserver/inc/tmsdtmfobserver.h
mmserv/tms/tmsserver/inc/tmsdtmfprovider.h
mmserv/tms/tmsserver/inc/tmsdtmftoneplayer.h
mmserv/tms/tmsserver/inc/tmsdtmftoneplayerobserver.h
mmserv/tms/tmsserver/inc/tmseteldtmfmonitor.h
mmserv/tms/tmsserver/inc/tmseteldtmfstopmonitor.h
mmserv/tms/tmsserver/inc/tmsglobaleffectssettings.h
mmserv/tms/tmsserver/inc/tmsrtplayer.h
mmserv/tms/tmsserver/inc/tmsserver.h
mmserv/tms/tmsserver/inc/tmstareventhandler.h
mmserv/tms/tmsserver/src/tmsaudioinbandtoneplayer.cpp
mmserv/tms/tmsserver/src/tmsdtmfeventhandler.cpp
mmserv/tms/tmsserver/src/tmsdtmfprovider.cpp
mmserv/tms/tmsserver/src/tmsdtmftoneplayer.cpp
mmserv/tms/tmsserver/src/tmseteldtmfmonitor.cpp
mmserv/tms/tmsserver/src/tmseteldtmfstopmonitor.cpp
mmserv/tms/tmsserver/src/tmsglobaleffectssettings.cpp
mmserv/tms/tmsserver/src/tmsrtaudiohdlr.cpp
mmserv/tms/tmsserver/src/tmsrtplayer.cpp
mmserv/tms/tmsserver/src/tmsserver.cpp
mmserv/tms/tmsserver/src/tmsserversession.cpp
mmserv/tms/tmsserver/src/tmstareventhandler.cpp
mmserv/tms/tmsutility/bwins/tmsutility.def
mmserv/tms/tmsutility/eabi/tmsutility.def
mmserv/tms/tmsutility/src/tmsutility.cpp
mmserv/voipaudioservices/VoIPIntfc/src/VoIPUtilityFactoryImpl.cpp
mmserv/voipaudioservices/VoIPServer/inc/VoIPQueueHandlerSrv.h
mmserv/voipaudioservices/VoIPServer/inc/VoIPServerThread.h
package_definition.xml
package_map.xml
--- a/inc/AmrCodec.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,364 +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: Telephony Multimedia Service
- *
- */
-
-
-#ifndef __AMRCODEC_H__
-#define __AMRCODEC_H__
-
-// INCLUDES
-
-#include <E32Base.h>
-
-
-// FORWARD DECLARATIONS
-
-class CAmrToPcmDecoderImpl;
-class CPcmToAmrEncoderImpl;
-
-
-// CLASS DECLARATION
-
-/**
-*    TAmrDecParams
-*    AMR decoding parameters.
-*/
-class TAmrDecParams
-    {
-public:
-    /**
-    * Default constructor.
-    */
-    inline TAmrDecParams();
-public:
-    // error concealment level (0 none, 1 default)
-    TInt iConcealment;
-    };
-
-TAmrDecParams::TAmrDecParams() :
-iConcealment(1) {}
-
-/**
-*    TAmrEncParams
-*    AMR encoding parameters.
-*/
-class TAmrEncParams
-    {
-public:
-    /**
-    * Default constructor.
-    */
-    inline TAmrEncParams();
-public:
-    // encoding mode 0-7 (0=MR475,1=MR515,...,7=MR122, default 7)
-    TInt iMode;
-    // DTX flag (TRUE or default FALSE)
-    TInt iDTX;
-    };
-
-TAmrEncParams::TAmrEncParams() :
-iMode(7), iDTX(0) {}
-
-
-// CLASS DEFINITIONS
-
-/**
-*    TAmrFrameInfo
-*    AMR frame info struct.
-*/
-class TAmrFrameInfo
-    {
-public:
-    /**
-    * Default constructor.
-    */
-    TAmrFrameInfo() {};
-public:
-    /**
-    * Returns the size of smallest AMR audio frame, i.e., the size of one DTX
-    * frame. NO DATA frames (size 1 byte) are not taken into account here.
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return TInt
-    */
-    IMPORT_C static TInt MinFrameSize();
-
-    /**
-    * Returns the size of biggest AMR audio frame, i.e., the size of one EFR
-    * frame.
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return TInt
-    */
-    IMPORT_C static TInt MaxFrameSize();
-
-    /**
-    * Returns the maximum number of samples per one audio channel in one
-    * AMR audio frame.
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return TInt
-    */
-    IMPORT_C static TInt MaxFrameSamples();
-
-    /**
-    * Returns the maximum number audio channels in one frame.
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return TInt
-    */
-    IMPORT_C static TInt MaxChannels();
-
-    /**
-    * Returns the size of one AMR frame header. The header must include
-    * all bits needed for determining the actual frame length.
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return TInt Size of AMR frame header
-    */
-    IMPORT_C static TInt FrameHeaderSize();
-
-    /**
-    * Returns the size of frame described by given coding parameters. The only
-    * parameter used in calculation is the coding mode (iMode).
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return TInt AMR frame size
-    */
-    IMPORT_C static TInt FrameSize(const TAmrFrameInfo& aInfo);
-public:
-    TInt iMode;            // encoding mode
-    TInt iBitrate;         // bitrate (kbit/s)
-    TInt iSamplingRate;    // sampling frequency (Hz)
-    TInt iChannels;        // number of channels
-    TInt iFrameSize;       // encoded size (bytes)
-    TInt iFrameSamples;    // decoded size (samples per channel)
-public:
-    TInt iSamplingRateOut; // sampling frequency after conversion (Hz)
-    TInt iChannelsOut;     // number of audio channels after conversion (1 or 2)
-    TInt iFrameSamplesOut; // decoded size after conversion (samples per channel)
-    };
-
-/**
-*    CAmrToPcmDecoder
-*    Low level AMR decoding API.
-*/
-class CAmrToPcmDecoder : public CBase
-    {
-protected:
-    /**
-    * Default constructor.
-    */
-    IMPORT_C CAmrToPcmDecoder();
-
-    /**
-    * 2nd phase constructor. Constructs the decoder.
-    */
-    IMPORT_C void ConstructL();
-public:
-    /**
-    * Two-phased constructor. First allocates and constructs decoder 
-    * and then resets it according to the given configuration.
-    *
-    * @since ?Series60_version
-    * @param aConf Decoder configuration params
-    * @return CAmrToPcmDecoder* Pointer to constructed decoder
-    */
-    IMPORT_C static CAmrToPcmDecoder* NewL(const TAmrDecParams& aConf);
-
-    /**
-    * Destructor
-    */
-    IMPORT_C virtual ~CAmrToPcmDecoder();
-
-    /**
-    * Initializes decoder and resets it into the default decoding state.
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return void
-    */
-    IMPORT_C void Reset();
-
-    /**
-    * Initializes decoder and resets it according to the given configuration.
-    *
-    * @since ?Series60_version
-    * @param aConf Decoder configuration params
-    * @return void
-    */
-    IMPORT_C void Reset(const TAmrDecParams& aConf);
-
-    /**
-    * Calculates the frame size and returns information about the frame which
-    * starts from the beginning of aBuf. Returns 0, if the frame bit syntax is
-    * incorrect or not enough bits are available for calculating the frame size
-    * and the frame parameters (aBufLen < TAmrCodecParams::FrameHeaderSize).
-    *
-    * The frame parameters returned via aInfo are: mode, sampling frequency,
-    * number of channels, frame size (same as return value) and number of
-    * samples in this frame. See also TMdaRawAmrAudioCodec class.
-    *
-    * @since ?Series60_version
-    * @param aBuf Pointer to frame buffer
-    * @param aBufLen Length of frame buffer
-    * @param aInfo Reference to frame parameters
-    * @return TInt Length of frame in bytes
-    */
-    IMPORT_C static TInt FrameInfo(const TUint8* aBuf, TInt aBufLen, TAmrFrameInfo& aInfo);
-
-    /**
-    * A variation of the FrameInfo above, which takes into account the
-    * decoding switches in calculating iSampligRateOut, iChannelsOut
-    * and iFrameSamplesOut.Initializes decoder and resets it according 
-    * to the given configuration.
-    *
-    * @since ?Series60_version
-    * @param aBuf Pointer to frame buffer
-    * @param aBufLen Length of frame buffer
-    * @param aInfo Reference to fram parameters
-    * @param aConf Reference to decoding switches
-    * @return TInt Length of frame in bytes
-    */
-    IMPORT_C static TInt FrameInfo(const TUint8* aBuf, TInt aBufLen, TAmrFrameInfo& aInfo, const TAmrDecParams& aConf);
-
-    /**
-    * This routine seeks the start position of the next frame and returns
-    * the byte position of its header. Returns aBufLen, if no valid frame
-    * can not be found (see FrameInfo). The seek progresses from the start
-    * of aBuf (0) toward the end of aBuf(aBufLen - 1).
-    *    
-    * The level of syntax check depends on the number of bits available. At
-    * minimum the first frame header bits are checked only, but if more
-    * bits are available, they can be used to make the sync seek more robust.
-    * For succesful seek the whole frame does not need to exist in aBuf.    
-    *
-    * @since ?Series60_version
-    * @param aBuf Pointer to frame buffer
-    * @param aBufLen Length of frame buffer
-    * @return TInt Frame position or aBufLen
-    */
-    IMPORT_C static TInt SeekSync(const TUint8* aBuf, TInt aBufLen);
-
-    /**
-    * Decodes one frame.    
-    *
-    * @since ?Series60_version
-    * @param aSrc Pointer to bit stream buffer
-    * @param aSrcUsed Number of consumed bytes
-    * @param aDst Pointer to PCM buffer
-    * @param aDstLen Number of produced bytes
-    * @param aMuteFlag If ETrue this frame is muted
-    * @return TInt Non-zero if decoding failed
-    */
-    IMPORT_C TInt Decode(TUint8* aSrc, TInt& aSrcUsed, TUint8* aDst, TInt& aDstLen, TBool aMuteFlag);
-
-    /**
-    * Decodes one frame from aSrc to aDst1 and aDst2. NOTE: aDst1 or
-    * aDst2 can be NULL and in that case decoding to that buffer is not
-    * requested.
-    *
-    * @since ?Series60_version
-    * @param aSrc Pointer to bit stream buffer
-    * @param aSrcUsed Number of consumed bytes
-    * @param aDst1 Pointer to PCM sample buffer (time domain sample)
-    * @param aDst2 Pointer to frequency sample buffer (frequency domain sample)
-    * @param aDstLen1 Number of produced bytes in aDst1
-    * @param aDstLen2 Number of produced bytes in aDst2
-    * @param aMuteFlag If ETrue this frame is muted
-    * @return TInt Non-zero if decoding failed
-    */
-    IMPORT_C TInt Decode(TUint8* aSrc, TInt& aSrcUsed, TUint8* aDst1, TUint8* aDst2, TInt& aDstLen1, TInt& aDstLen2, TInt aMuteFlag);
-private:
-    CAmrToPcmDecoderImpl* iState;
-    };
-
-/**
-*    CPcmToAmrEncoder
-*    Low level AMR encoding API.
-*/
-class CPcmToAmrEncoder : public CBase
-    {
-protected:
-
-    /**
-    * Default constructor.
-    */
-    IMPORT_C CPcmToAmrEncoder();
-
-    /**
-    * 2nd phase constructor. Constructs the encoder.
-    */
-   IMPORT_C void ConstructL();
-public:
-
-    /**
-    * Two-phased constructor. First allocates and constructs encoder 
-    * and then resets it according to the given configuration.
-    *
-    * @since ?Series60_version
-    * @param aConf Encoder configuration params
-    * @return CPcmToAmrEncoder* Pointer to constructed encoder
-    */
-    IMPORT_C static CPcmToAmrEncoder* NewL(const TAmrEncParams& aConf);
-
-    /**
-    * Destructor
-    */
-    IMPORT_C virtual ~CPcmToAmrEncoder();
-
-    /**
-    * Initializes encoder and resets encoder state.
-    *
-    * @since ?Series60_version
-    * @param none
-    * @return void
-    */
-    IMPORT_C void Reset();
-
-    /**
-    * Initializes encoder and resets it according to the given configuration.
-    *
-    * @since ?Series60_version
-    * @param aConf Encoder configuration params
-    * @return void
-    */
-    IMPORT_C void Reset(const TAmrEncParams& aConf);
-
-    /**
-    * Encodes one frame.
-    *
-    * @since ?Series60_version
-    * @param aSrc Pointer to PCM buffer
-    * @param aSrcUsed Number of consumed bytes
-    * @param aDst Pointer to bit stream buffer
-    * @param aDstLen Length of resulting frame
-    * @return TInt Non-zero if encoding failed
-    */
-    IMPORT_C TInt Encode(TUint8* aSrc, TInt& aSrcUsed, TUint8* aDst, TInt& aDstLen);
-private:
-    CPcmToAmrEncoderImpl* iState;
-    };
-
-#endif //__AMRCODEC_H__
-
-//  End of File
--- a/inc/DebugMacros.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2007 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:  Debug Macros used by AdvancedAudioController
-*
-*/
-
-
-#ifndef __DEBUGMACROS_H__
-#define __DEBUGMACROS_H__
-
-// MACROS
-#ifdef _DEBUG
-#define DP0(string)                                 RDebug::Print(string)
-#define DP1(string,arg1)                            RDebug::Print(string,arg1)
-#define DP2(string,arg1,arg2)                       RDebug::Print(string,arg1,arg2)
-#define DP3(string,arg1,arg2,arg3)                  RDebug::Print(string,arg1,arg2,arg3)
-#define DP4(string,arg1,arg2,arg3,arg4)             RDebug::Print(string,arg1,arg2,arg3,arg4)
-#define DP5(string,arg1,arg2,arg3,arg4,arg5)        RDebug::Print(string,arg1,arg2,arg3,arg4,arg5)
-#define DP6(string,arg1,arg2,arg3,arg4,arg5,arg6)   RDebug::Print(string,arg1,arg2,arg3,arg4,arg5,arg6)
-#else
-#define DP0(string)                            
-#define DP1(string,arg1)                       
-#define DP2(string,arg1,arg2)                  
-#define DP3(string,arg1,arg2,arg3)             
-#define DP4(string,arg1,arg2,arg3,arg4)             
-#define DP5(string,arg1,arg2,arg3,arg4,arg5)
-#define DP6(string,arg1,arg2,arg3,arg4,arg5,arg6)
-#endif
-
-#endif //__DEBUGMACROS_H__
--- a/inc/EAacPlusFrameParser.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +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: Telephony Multimedia Service
- *
- */
-
-
-#ifndef 	EAACPLUSFRAMEPARSER_H
-#define 	EAACPLUSFRAMEPARSER_H
-
-// INCLUDES
-#include <e32base.h>
-#include "EAacPlusUtil.h"
-
-class CFrameTable;
-class CMMFBuffer;
-
-// CLASS DECLARATION
-
-/**
-*  This class implements utility functions to extract AAC frame
-*  information.
-*
-*  @lib MmfEAacPlusUtil.lib
-*  @since 3.2
-*/
-class CEAacPlusFrameParser : public CBase
-	{
-	public:
-	
-    class TEAacPlusParserConfig
-        {
-    public:
-		CEAacPlusUtil::TEAacPlusFrameLenConfig iFrameLenConfig; // config info needed by util for frame length.
-        TInt    	iOutSamplingFrequency;		 // output sampling freq of decoder
-      	TInt		iNumOfSamples;				 // samples per frame
-      	CFrameTable* iFrameTable;				 // the frame table
-        };
-
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        IMPORT_C static CEAacPlusFrameParser* NewL();
-
-        /**
-        * Destructor.
-        */
-        IMPORT_C virtual ~CEAacPlusFrameParser();
-
-    public: // New functions
-
-		/**
-        * Used to parse the aac frames and populate the seek table.
-        * @since 3.2
-        * @param	aBuf                 buffer of AAC data from start of aac content
-        * @param	aBufLen              length of aBuf
-        * @return   status
-        */
-        IMPORT_C TInt Parse(const CMMFBuffer& aSrc, TInt& aSrcUsed);
-
-		/**
-        * Used to configure the utility with information needed to enable the apis.
-        * This api can be used if GetAacFrameInfo is not used to initialize the utility.
-        * @since 3.2
-        * @param	aFormatType format type
-        * @param	aSamplingFrequency sampling frequency
-        * @return   status
-        */
-		IMPORT_C TInt Config(TEAacPlusParserConfig& aParserConfig);
-		IMPORT_C TInt ReConfig();
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CEAacPlusFrameParser();
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
- 	private:	// Data
- 		CEAacPlusUtil* iAacUtil;
- 		CFrameTable* iFrameTable;
-	
-		// local input buffer
-        TUint8* iTmpBuf;
-        const TUint8* iTmpBufPtr;
-        TInt 	iTmpBufBytes;
-        TInt	iBytesCopied;
-        
-        TBool   iUsingTmpBuf;
-        
-        TInt iPos;
-//		CEAacPlusUtil::TEAacPlusFormatType iFormatType;
-//		TInt iInSamplingFrequency;
-//		TInt iOutSamplingFrequency;
-//		TInt iNumOfSamples;
-		TEAacPlusParserConfig iParserConfig;
-        
-	};
-
-#endif      // EAACPLUSFRAMEPARSER_H
-
-// End of File
--- a/inc/EAacPlusUtil.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
-* Copyright (c) 2007 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:  Header file for EAacPlusUtil.cpp
-*
-*/
-
-
-#ifndef 	EAACPLUSUTIL_H
-#define 	EAACPLUSUTIL_H
-
-// INCLUDES
-#include <e32base.h>
-
-// CLASS DECLARATION
-class EAacpAudioFrameInfo;
-
-/**
-*  This class implements utility functions to extract AAC frame
-*  information.
-*
-*  @lib MmfEAacPlusUtil.lib
-*  @since 3.2
-*/
-class CEAacPlusUtil : public CBase
-	{
-	public:
-        // CONSTANTS
-        enum TEAacPlusFormatType
-	        {
-		    EAacPlusFormatRaw=0,
-		    EAacPlusFormatAdif=1,
-		    EAacPlusFormatAdts=2
-        	};
-        /**
-        *  EAAC+ frame info struct.
-        *
-        *  @lib MmfEAacPlusUtil.lib
-        *  @since 3.2
-        */
-        class TEAacPlusFrameInfo
-            {
-        public:
-	        TInt    	iOutFrameSize;			// Size of PCM Samples generated by decoder
-            TInt    	iNoOfSamples;			// Number of PCM Samples generated by decoder per frame
-            TInt    	iSamplingFrequency;		// Sampling freq of AAC Code decoder
-            TInt		iNoOfChannels;			// No of output channel 1=Mono; 2=Stereo
-        	TInt		iObjectType;			// MPEG Audio Object Type 2=AAC-LC; 4=AAC-LTP
-        	TInt		iOutSamplingFrequency;  // Sampling Frequence for the output samples
-        	TInt		iDownSampledMode;    	// 0=Normal Mode; 1=Down Sampled mode
-        	TInt		iSbr;	                // 0=SBR not present; 1=SBR present
-        	TInt		iPs;	                // 0=PS not present; 1=PS present
-            };
-
-        class TEAacPlusFrameLenConfig
-            {
-        public:
-			TEAacPlusFormatType iFormatType;	// Container type.
-            TInt    	iSamplingFrequency;		// Sampling freq of AAC core decoder
-        	TInt		iObjectType;			// MPEG Audio Object Type 2=AAC-LC; 4=AAC-LTP
-            };
-
-
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        IMPORT_C static CEAacPlusUtil* NewL();
-
-        /**
-        * Destructor.
-        */
-        IMPORT_C virtual ~CEAacPlusUtil();
-
-    public: // New functions
-
-		/**
-        * Used to get the format type.
-        * @since 3.2
-        * @param	aBuf                 buffer of AAC data from start of aac content
-        * @param	aBufLen              length of aBuf
-        * @param	TEAacPlusFormatType  returned format type 0=raw; 1=ADIF; 2=ADTS
-        * @return   status
-        */
-        IMPORT_C TInt GetAacFormatType(const TUint8* aBuf, TInt aBufLen, TEAacPlusFormatType& aFormatType);
-
-		/**
-        * Used to get the audio format information for ADIF and ADTS content.
-        * Data should be provided beginning with start of aac content including header.
-        * Enough data should follow the header to determine SBR and PS if needed.
-        * Can be used with mpeg data where aHdrBuf will contain the AudioSpecificConfig. Implicit SBR and PS
-        * will not be determined.
-        * @since 3.2
-        * @param	aHdrBuf buffer with AAC data beginning at start of aac content including ADIF or ADTS header
-        * @param	aHdrLen length of aHdrBuf; header length is returned in this parameter
-        * @param	aFrameInfo returns the format information
-        * @return	status
-        */
-		IMPORT_C TInt GetAacFrameInfo (const TUint8* aHdrBuf, TInt& aHdrLen, TEAacPlusFrameInfo& aFrameInfo);
-		
-		/**
-        * Used to get the audio format information for mpeg aac.
-        * aHdrBuf will contain the AudioSpecificConfig. aDataBuf will contain data at beginning of raw audio frames.
-        * Implicit SBR and PS can be determined.
-        * @since 3.2
-        * @param	aHdrBuf buffer with AudioSpecificConfig data.
-        * @param	aHdrLen length of aHdrBuf
-        * @param	aFrameInfo returns the format information
-        * @param	aDataBuf buffer with raw audio frames
-        * @param	aDataBufLen length of aDataBuf
-        * @return	status
-        */
-		IMPORT_C TInt GetAacFrameInfo (const TUint8* aHdrBuf, TInt& aHdrLen, TEAacPlusFrameInfo& aFrameInfo,
-									TUint8* aDataBuf, TInt aDataBufLen);
-									
-		/**
-        * Used to get the size in bytes of the frame found at the start of aBuf.
-        * @since 3.2
-        * @param	aBuf buffer with AAC data frame
-        * @param	aBufLen length of aBuf
-        * @param	aFrameLen returns the frame size in bytes
-        * @return   status
-        */
-		IMPORT_C TInt GetAacFrameLength(const TUint8* aBuf, TInt aBufLen, TInt& aFrameLen);
-
-		/**
-        * Used to configure the utility with information needed to enable the apis.
-        * This api can be used if GetAacFrameInfo is not used to initialize the utility.
-        * @since 3.2
-        * @param	aFormatType format type
-        * @param	aSamplingFrequency sampling frequency
-        * @return   status
-        */
-		IMPORT_C TInt Config(TEAacPlusFrameLenConfig& aFrameLenConfig);
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CEAacPlusUtil();
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
- 	private:	// Data
-		TEAacPlusFormatType iFormat;
-		EAacpAudioFrameInfo* iGetFrameLenParam;
-		TBool iInitialized;
-	};
-
-#endif      // EAACPLUSUTIL_H
-
-// End of File
--- a/inc/FrameTable.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +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: Telephony Multimedia Service
- *
- */
-
-
-#ifndef CFRAMETABLE_H
-#define CFRAMETABLE_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class MFrameTableEventObserver;
-
-// CLASS DEFINITIONS
-
-/**
- *  This class provides AAC utility functions.
- *
- *  @lib AACAudioControllerUtility.lib
- *  @since 3.0
- */
-class CFrameTable : public CBase
-    {
-public:
-    // Constructors and destructor
-
-    enum TFrameTableEvent
-        {
-        EPosReached,
-        EDecodeInterval,
-        EPlayWindowEndPosReached
-        };
-
-    /**
-     * Two-phased constructor.
-     */
-    IMPORT_C static CFrameTable* NewL();
-
-    /**
-     * Destructor.
-     */
-    IMPORT_C virtual ~CFrameTable();
-
-public:
-    // New functions
-
-    IMPORT_C TInt InitFrameTable(TInt aSampleRate, TInt aSamplesPerFrame);
-    IMPORT_C TInt SubmitTableEntry(TUint aPos);
-
-    IMPORT_C TInt FindFramePosFromTime(TUint& aTimeMs, TUint& aPos);
-    IMPORT_C TInt FindFrameTimeFromPos(TUint& aTimeMs, TUint& aPos);
-    IMPORT_C TInt LastFramePos(TUint& aPos);
-    IMPORT_C TInt LastFrameTime(TUint& aTimeMs);
-
-    IMPORT_C void ShrinkTable();
-    IMPORT_C void ResetTable();
-
-    IMPORT_C TInt SetSourceReference(TUint aTimeMs, TUint aPos);
-
-    IMPORT_C TInt RegisterForEvent(TFrameTableEvent aEvent,
-            MFrameTableEventObserver* aObserver, TUint aParam);
-    IMPORT_C TInt UnRegisterForEvent(TFrameTableEvent aEvent,
-            MFrameTableEventObserver* aObserver);
-    IMPORT_C TInt Bitrate();
-    IMPORT_C TInt IsSeeking(TBool& aIsSeeking);
-    IMPORT_C TInt GetLastPosEvent(TUint& aPos);
-
-private:
-
-    class TBufRefPosEntry
-        {
-public:
-        TUint iPos;
-        TUint iFrameNum;
-        };
-
-    /**
-     * C++ default constructor.
-     */
-    CFrameTable();
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-    TUint CalcFrameFromTimeMs(TUint aTimeMs);
-    TInt SubmitLowResTableEntry(TBufRefPosEntry& aEntry);
-
-private:
-    // Data
-
-    RArray<TBufRefPosEntry> iFrameTable;
-    RArray<TBufRefPosEntry> iLowResFrameTable;
-    TUint iSampleRate;
-    TUint iSamplesPerFrame;
-    TUint iMsecPerFrame;
-    TUint iLastBytePos;
-    TUint iAvgBitrate;
-    TUint iOffset;
-    TUint iTimeRefMs;
-    TUint iPosEventMs;
-    TUint iPlayWindowEndPosEventMs;
-    TInt iIntervalRef;
-    TUint iIntervalEvent;
-    MFrameTableEventObserver* iObserver;
-    TUint iEventPos;
-    TUint iCurrentFrameCount;
-    TUint iFramesPerLowResInterval;
-    TUint iLowResIntervalMs;
-    TUint iFrameNum;
-    TBool iOkToShrink;
-    };
-
-class MFrameTableEventObserver
-    {
-public:
-    virtual TInt
-            HandleFrameTableEvent(CFrameTable::TFrameTableEvent aEvent) = 0;
-    };
-
-#endif 		// CFRAMETABLE_H
-// End of File
--- a/inc/Mp3Codec.h	Tue Jul 06 14:50:35 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: Telephony Multimedia Service
- *
- */
-
-
-#ifndef __MP3CODEC_H__
-#define __MP3CODEC_H__
-
-// INCLUDES
-#include <E32Base.h>
-
-// CONSTANTS
-
-// DATA TYPES
-
-// FORWARD DECLARATION
-class CMp3ToPcmDecoderImpl;
-
-// CLASS DEFINITIONS
-/*
------------------------------------------------------------------------------
-
-    TMp3DecParams
-
-    MP3 decoding parameters.
-
-    @since 2.1
-
------------------------------------------------------------------------------
-*/
-class TMp3DecParams
-    {
-public:
-    inline TMp3DecParams();
-public:
-    TInt iStereoToMono;    // stereo to mono switch (TRUE or default FALSE)
-    TInt iLeftRight;       // decode left or right channel (1 left, 2 right, 0 default all)
-    TInt iDecimFactor;     // decimation factor (2, 4 or default 1)
-    TInt iConcealment;     // error concealment level (0 none, default 1)
-    TInt iSampleLength;    // resolution of PCM samples (default 16 bits)
-    TInt iSamplingFrequency; //Output sampling frequency
-    };
-
-TMp3DecParams::TMp3DecParams() :
-iStereoToMono(0), iLeftRight(0), iDecimFactor(1), iConcealment(1), iSampleLength(16), iSamplingFrequency(0) {}
-
-
-
-/*
------------------------------------------------------------------------------
-
-    TMp3FrameInfo
-
-    MP3 frame info struct.
-
-    @since 2.1
-
------------------------------------------------------------------------------
-*/
-class TMp3FrameInfo
-    {
-public:
-    inline TMp3FrameInfo();
-public:
-    IMPORT_C static TInt MinFrameSize();
-    IMPORT_C static TInt MaxFrameSize();
-    IMPORT_C static TInt MaxFrameSamples();
-    IMPORT_C static TInt MaxChannels();
-    IMPORT_C static TInt MaxAncillaryBits();
-    IMPORT_C static TInt FrameHeaderSize();
-    IMPORT_C static TInt FrameSize(const TMp3FrameInfo& aInfo);
-public:
-    TInt iId;              // id of algorithm (1 MPEG-1, 0 MPEG-2)
-    TInt iLayer;           // layer number (1, 2, 3 or 4)
-    TInt iErrorProtection; // err prot flag (TRUE or FALSE, TRUE if err protected)
-    TInt iBitrate;         // bitrate (kbit/s)
-    TInt iSamplingRate;    // sampling frequency (Hz)
-    TInt iPadding;         // padding flag (TRUE or FALSE, TRUE if p slot exists)
-    TInt iPrivateBit;      // bit for private use
-    TInt iMode;            // audio mode (0 stereo, 1 jstereo, 2 dual, 3 mono)
-    TInt iChannels;        // number of audio channels (1 for mono, otherwise 2)
-    TInt iCopyright;       // copyright flag (TRUE or FALSE, TRUE if copyrighted)
-    TInt iOrigCopy;        // original flag (TRUE or FALSE, TRUE if original)
-    TInt iFrameSize;       // size of encoded frame (bytes)
-    TInt iFrameSamples;    // length of decoded frame (samples per channel)
-public:
-    TInt iSamplingRateOut; // sampling frequency after conversion(s) (Hz)
-    TInt iChannelsOut;     // number of audio channels after conversion(s) (1 or 2)
-    TInt iFrameSamplesOut; // length of decoded frame after conversion(s) (samples per channel)
-    };
-
-TMp3FrameInfo::TMp3FrameInfo() {}
-
-
-
-/*
------------------------------------------------------------------------------
-
-    CMp3ToPcmDecoder
-
-    Low level MP3 decoding API.
-
-    @since 2.1
-
------------------------------------------------------------------------------
-*/
-class CMp3ToPcmDecoder : public CBase
-    {
-protected:
-    IMPORT_C CMp3ToPcmDecoder();
-    IMPORT_C void ConstructL();
-
-public:
-    IMPORT_C static CMp3ToPcmDecoder* NewL(const TMp3DecParams& aConf);
-    IMPORT_C virtual ~CMp3ToPcmDecoder();
-    IMPORT_C void Reset();
-    IMPORT_C void Reset(const TMp3DecParams& aConf);
-    IMPORT_C static TInt FrameInfo(const TUint8* aBuf, TInt aBufLen, TMp3FrameInfo& aInfo);
-    IMPORT_C static TInt FrameInfo(const TUint8* aBuf, TInt aBufLen, TMp3FrameInfo& aInfo, const TMp3DecParams& aConf);
-    IMPORT_C static TInt SeekSync(const TUint8* aBuf, TInt aBufLen);
-    IMPORT_C TInt Decode(TUint8* aSrc, TInt& aSrcUsed, TUint8* aDst, TInt& aDstLen, TInt aMuteFlag);
-    IMPORT_C TInt Decode(TUint8* aSrc, TInt& aSrcUsed, TUint8* aDst1, TUint8* aDst2, TUint8* aDst3, TInt& aDstLen1,  TInt& aDstLen2,  TInt& aDstLen3, TInt aMuteFlag);
-private:
-    CMp3ToPcmDecoderImpl* iState;
-    };
-
-#endif //__MP3CODEC_H__
-//-----------------------------------------------------------------------------
-//  End of File
-//-----------------------------------------------------------------------------
--- a/khronosfws/openmax_al/data/openmaxal.cfg	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/data/openmaxal.cfg	Wed Aug 18 10:17:22 2010 +0300
@@ -21,7 +21,7 @@
 <mmf>
 <urischeme>
 # Num of entries followed by actual entries all ending with a comma
-3,file,http,rtsp,
+6,file,http,rtsp,rtspu,rtspt,mms,
 </urischeme>
 <fileext>
 15,3gp,wma,wmv,wav,amr,mp3,mp4,rm,ra,avi,mkv,aac,mid,awb,3g2,
@@ -40,15 +40,15 @@
 </mediaplayer>
 
 <mediarecorder>
-#<mmf>
-#<urischeme>
+<mmf>
+<urischeme>
 # Num of entries followed by actual entries all ending with a comma
-#1,file,
-#</urischeme>
-#<fileext>
-#2,amr,mp4,
-#</fileext>
-#</mmf>
+0,
+</urischeme>
+<fileext>
+0,
+</fileext>
+</mmf>
 
 <gst>
 <urischeme>
--- a/khronosfws/openmax_al/group/openmaxal.mmp	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/group/openmaxal.mmp	Wed Aug 18 10:17:22 2010 +0300
@@ -31,6 +31,8 @@
 CAPABILITY ALL -TCB
 
 MACRO   USE_NGA_SURFACES
+MACRO 	XA_API=EXPORT_C
+
 //MACRO 	MARKERPOSITIONTIMERLOG
 //MACRO		POSITIONUPDATETIMERLOG
 //MACRO 	USE_LOCAL_WINDOW_RESOURCES
@@ -41,93 +43,37 @@
 SOURCE	        xaadaptationgst.c
 SOURCE 	        xagstcapabilitiesmgr.c
 SOURCE	        xaaudioencoderitfadaptation.c
-SOURCE	        xadevicevolumeitfadaptation.c
-SOURCE	        xadynamicsourceitfadaptation.c
 SOURCE	        xaengineadaptctx.c
-SOURCE	        xaequalizeritfadaptation.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	        xardsitfadaptation.c
 SOURCE	        xarecorditfadaptation.c
-SOURCE	        xaseekitfadaptation.c
-SOURCE	        xavibraadaptctx.c
-SOURCE	        xavibraitfadaptation.c
-SOURCE	        xavolumeitfadaptation.c
-SOURCE 	        xastreaminformationitfadaptation.c
-#ifdef OMAX_CAMERABIN
-SOURCE	        xacameraadaptctx.c
-SOURCE	        xacameraitfadaptation.c
-SOURCE	        xaimagecontrolsitfadaptation.c
-SOURCE	        xaimageeffectsitfadaptation.c
-SOURCE	        xaimageencoderitfadaptation.c
-SOURCE	        xasnapshotitfadaptation.c
-SOURCE	        xastaticcameracapsadaptation.c
-SOURCE	        xavideoencoderitfadaptation.c
-SOURCE	        xavideopostprosessingitfadaptation.c
-#endif
 
 SOURCEPATH ../src/adptcommon
 SOURCE 	        xaframeworkmgr.c
 SOURCE 	        xacapabilitiesmgr.c
 SOURCE 	        xaadptbasectx.c
 
-#ifdef OMAX_CAMERABIN
-SOURCEPATH      ../src/camera
-SOURCE          xacameradevice.c
-SOURCE          xacameraitf.c
-#endif
-
 SOURCEPATH      ../src/common
 SOURCE          openmaxal.c
 SOURCE          xacommon.c
 SOURCE          xaconfigextensionsitf.c
 SOURCE          xadynamicsourceitf.c
 SOURCE          xadynintmgmtitf.c
-SOURCE          xaequalizeritf.c
 SOURCE          xametadataextractionitf.c
-SOURCE          xametadatatraversalitf.c
 SOURCE          xaobjectitf.c
 SOURCE          xaplatform.c
 SOURCE          xathreadsafety.c
 SOURCE          xavolumeitf.c
 SOURCE 		xastreaminformationitf.c
-SOURCE          xanokialinearvolume_iid.c
-SOURCE          xanokiavolumeext_iid.c
 SOURCE          xanokialinearvolumeitf.c
 SOURCE          xanokiavolumeextitf.c
-#ifdef OMAX_CAMERABIN
-SOURCE          xaimagecontrolsitf.c
-SOURCE          xaimageeffectsitf.c
-SOURCE          xavideopostprocessingitf.c
-#endif
 
 SOURCEPATH      ../src/engine
-SOURCE          xaaudiodecodercapabilitiesitf.c
 SOURCE          xaaudioencodercapabilitiesitf.c
 SOURCE          xaaudioiodevicecapabilitiesitf.c
-SOURCE          xadevicevolumeitf.c
 SOURCE          xaengine.c
 SOURCE          xaengineitf.c
 SOURCE          xathreadsyncitf.c
-#ifdef OMAX_CAMERABIN
-SOURCE          xacameracapabilitiesitf.c
-SOURCE          xaimagedecodercapabilitiesitf.c
-SOURCE          xaimageencodercapabilitiesitf.c
-SOURCE          xavideodecodercapabilitiesitf.c
-SOURCE          xavideoencodercapabilitiesitf.c
-#endif
-SOURCEPATH      ../src/ledarray
-SOURCE          xaledarraydevice.c
-SOURCE          xaledarrayitf.c
 
 SOURCEPATH      ../src/mediaplayer
 SOURCE          xamediaplayer.c
@@ -141,27 +87,13 @@
 SOURCE          xamediarecorder.c
 SOURCE          xametadatainsertionitf.c
 SOURCE          xarecorditf.c
-#ifdef OMAX_CAMERABIN
-SOURCE          xaimageencoderitf.c
-SOURCE          xasnapshotitf.c
-SOURCE          xavideoencoderitf.c
-#endif
 
 SOURCEPATH      ../src/metadataextractor
 SOURCE          xametadataextractor.c
 
-SOURCEPATH      ../src/outputmix
-SOURCE          xaoutputmix.c
-SOURCE		xaoutputmixitf.c
-
 SOURCEPATH      ../src/radio
 SOURCE          xaradiodevice.c
 SOURCE		xaradioitf.c
-SOURCE		xardsitf.c
-
-SOURCEPATH      ../src/vibra
-SOURCE          xavibradevice.c
-SOURCE		xavibraitf.c
 
 SOURCEPATH      ../src/mmf_adaptation
 //	Removing below file since currently there is no Engine related
@@ -180,7 +112,6 @@
 SOURCE          xanokialinearvolumeitfadaptationmmf.c
 SOURCE          xanokiavolumeextitfadaptationmmf.c
 SOURCE 	        xammfcapabilitiesmgr.c
-//SOURCE          xangavideosink.cpp
 SOURCE          markerpositiontimer.cpp
 SOURCE          positionupdatetimer.cpp 
 SOURCE          xaseekitfadaptationmmf.c
@@ -195,15 +126,11 @@
 USERINCLUDE     ../src/khronos
 USERINCLUDE     ../src/mmf_adaptation
 USERINCLUDE     ../src/gst_adaptation
-USERINCLUDE     ../src/camera
 USERINCLUDE     ../src/common
 USERINCLUDE     ../src/engine
-USERINCLUDE     ../src/ledarray
 USERINCLUDE     ../src/mediaplayer
 USERINCLUDE     ../src/mediarecorder
-USERINCLUDE     ../src/outputmix
 USERINCLUDE     ../src/radio
-USERINCLUDE     ../src/vibra
 USERINCLUDE	../src/adptcommon
 
 MW_LAYER_SYSTEMINCLUDE
@@ -235,9 +162,5 @@
 LIBRARY 	libgstcoreelements.lib
 LIBRARY		libgstcoreindexers.lib
 LIBRARY 	MetaDataUtility.lib
-#ifdef OMAX_CAMERABIN
-LIBRARY		libgstphotography.lib
-LIBRARY		libgstvideo.lib
-#endif
 STATICLIBRARY   hxmetadatautil.lib
 
--- a/khronosfws/openmax_al/inc/openmaxalwrapper.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/inc/openmaxalwrapper.h	Wed Aug 18 10:17:22 2010 +0300
@@ -16,16 +16,14 @@
 *               to DEF files.
 *
 */
-#ifndef _OPENMAXAL_WRAPPER_H_
-#define _OPENMAXAL_WRAPPER_H_
+#ifndef OPENMAXAL_WRAPPER_H_
+#define OPENMAXAL_WRAPPER_H_
 
-#include <OpenMAXAL_Platform.h>
-#undef XA_API
-
-#define XA_API __declspec(dllexport)
- 
+#include <e32def.h>
 #include <OpenMAXAL.h>
 #include <xanokiavolumeextitf.h>
 #include <xanokialinearvolumeitf.h>
+#include <xaradioitfext.h>
 
-#endif
+#endif //ends OPENMAXAL_WRAPPER_H_
+
--- a/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.c	Wed Aug 18 10:17:22 2010 +0300
@@ -161,7 +161,8 @@
     DEBUG_API("->XAAdaptationBase_ThreadEntry");
     if (!adaptCtx)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAAdaptationBase_ThreadEntry");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAAdaptationBase_ThreadEntry");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -169,44 +170,22 @@
     switch (adaptCtx->ctxId)
         {
         case XAMediaPlayerAdaptation:
-            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer)
-            ;
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer);
             break;
         case XAMediaRecorderAdaptation:
-            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder)
-            ;
+            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)
-            ;
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
             break;
         case XAMDAdaptation:
-            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMetaDataExtractor)
-            ;
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSMetaDataExtractor);
             break;
         case XAEngineAdaptation:
-            XA_IMPL_THREAD_SAFETY_ENTRY(XATSEngine)
-            ;
+            XA_IMPL_THREAD_SAFETY_ENTRY(XATSEngine);
             break;
         default:
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID")
-            ;
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
             /* invalid parameter */
             res = XA_RESULT_PARAMETER_INVALID;
             break;
@@ -225,7 +204,8 @@
     DEBUG_API("->XAAdaptationBase_ThreadExit");
     if (!adaptCtx)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAAdaptationBase_ThreadExit");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAAdaptationBase_ThreadExit");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -233,44 +213,22 @@
     switch (adaptCtx->ctxId)
         {
         case XAMediaPlayerAdaptation:
-            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer)
-            ;
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
             break;
         case XAMediaRecorderAdaptation:
-            XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder)
-            ;
+            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)
-            ;
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
             break;
         case XAMDAdaptation:
-            XA_IMPL_THREAD_SAFETY_EXIT(XATSMetaDataExtractor)
-            ;
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSMetaDataExtractor);
             break;
         case XAEngineAdaptation:
-            XA_IMPL_THREAD_SAFETY_EXIT(XATSEngine)
-            ;
+            XA_IMPL_THREAD_SAFETY_EXIT(XATSEngine);
             break;
         default:
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID")
-            ;
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
             /* invalid parameter */
             res = XA_RESULT_PARAMETER_INVALID;
             break;
--- a/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.h	Wed Aug 18 10:17:22 2010 +0300
@@ -63,6 +63,8 @@
 
 #define RADIO_DEFAULT_FREQ_RANGE XA_FREQRANGE_FMEUROAMERICA
 #define RADIO_DEFAULT_FREQ 88000000
+#define RADIO_DEFAULT_MIN_FREQ 87500000
+#define RADIO_DEFAULT_MAX_FREQ 108000000
 
 /* TYPEDEFS */
 
--- a/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.c	Wed Aug 18 10:17:22 2010 +0300
@@ -99,7 +99,8 @@
     if (!(*ppListHead))
         {
         *ppListHead = firstNode;
-        }DEBUG_API("<-XACapabilitiesMgr_UpdateAudioIOCapabilitieList");
+        }
+    DEBUG_API("<-XACapabilitiesMgr_UpdateAudioIOCapabilitieList");
     return res;
     }
 
--- a/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c	Wed Aug 18 10:17:22 2010 +0300
@@ -62,9 +62,6 @@
 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
@@ -82,13 +79,11 @@
     FrameworkMap *curNode = NULL;
     FWMgrBool newNode;
     FrameworkMap *frameworkMap = NULL;
-    FILE* fp = fopen(configFileLocationZ, "r");
 
+    FILE* fp = fopen(configFileLocationC, "r");
     if (fp == NULL)
         {
-        createDefaultRules(configFileLocationC);
-
-        fp = fopen(configFileLocationC, "r");
+        fp = fopen(configFileLocationZ, "r");
         }
 
     if (fp != NULL)
@@ -553,70 +548,4 @@
         }
     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("6,file,http,rtsp,rtspu,rtspt,mms,\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;
-    }
+	
--- a/khronosfws/openmax_al/src/camera/xacameradevice.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,462 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xacameradevice.h"
-#include "xacameraitf.h"
-#include "xaconfigextensionsitf.h"
-#include "xadynintmgmtitf.h"
-#include "xaimagecontrolsitf.h"
-#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]=
-{
-    &XA_IID_OBJECT,
-    &XA_IID_CAMERA,
-    &XA_IID_CONFIGEXTENSION,
-    &XA_IID_DYNAMICINTERFACEMANAGEMENT,
-    &XA_IID_IMAGECONTROLS,
-    &XA_IID_IMAGEEFFECTS,
-    &XA_IID_VIDEOPOSTPROCESSING
-};
-
-
-/*****************************************************************************
- * Global methods
- *****************************************************************************/
-
-/* XAResult XACameraDeviceImpl_Create
- * Description: Create object
- */
-XAresult XACameraDeviceImpl_CreateCameraDevice(FrameworkMap* mapper,
-                                                XACapabilities* capabilities,   
-                                               XAObjectItf* pDevice,
-                                               XAuint32 deviceID,
-                                               XAuint32 numInterfaces,
-                                               const XAInterfaceID * pInterfaceIds,
-                                               const XAboolean * pInterfaceRequired)
-{
-    XACameraDeviceImpl* pImpl = NULL;
-    XAObjectItfImpl* pBaseObj = NULL;
-    XAuint8 itfIndex = 0;
-
-    DEBUG_API("->XACameraDeviceImpl_Create");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-
-    if( !pDevice )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraDeviceImpl_Create");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* instantiate object implementation */
-    pImpl = (XACameraDeviceImpl*)calloc(1,sizeof(XACameraDeviceImpl));
-    if( !pImpl )
-    {
-        /* memory allocation failed */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-        DEBUG_API("<-XACameraDeviceImpl_Create");
-        return XA_RESULT_MEMORY_FAILURE;
-    }
-    pBaseObj = &pImpl->baseObj;
-
-    /* Initialize base object default implementation */
-    XAObjectItfImpl_Init(pBaseObj,
-                         CAMERA_ITFCOUNT,
-                         XACameraDeviceItfIIDs,
-                         XACameraDeviceImpl_DoRealize,
-                         XACameraDeviceImpl_DoResume,
-                         XACameraDeviceImpl_FreeResources);
-
-    /* Mark interfaces that need to be exposed */
-    /* Implicit and mandated interfaces */
-    pBaseObj->interfaceMap[CAMERA_CAMERAITF].required = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[CAMERA_DIMITF].required = XA_BOOLEAN_TRUE;
-
-    /* Explicit interfaces */
-    if( (numInterfaces != 0) && pInterfaceIds && pInterfaceRequired )
-    {
-        /* Check required interfaces */
-        for( itfIndex = 0; itfIndex < numInterfaces; itfIndex++ )
-        {
-            /* If mapEntry is null then required interface is not supported.*/
-            XAObjItfMapEntry *entry =
-                XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIndex]);
-            if( !entry  )
-            {
-                if( pInterfaceRequired[itfIndex] )
-                {
-                    /* required interface cannot be accommodated - fail creation */
-                    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;
-                }
-                else
-                {
-                    DEBUG_INFO("Requested (not required) interface not found - continue creation");
-                }
-            }
-            else
-            {
-                entry->required = XA_BOOLEAN_TRUE;
-            }
-        }
-    }
-
-    /* Mark interfaces that can be handled dynamically */
-    /* Mandated dynamic itfs */
-    pBaseObj->interfaceMap[CAMERA_IMAGEEFFECTSITF].isDynamic = XA_BOOLEAN_TRUE;
-
-    /* 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;
-    /*************************************************/
-    
-/*     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;*/
-}
-
-/* XAResult XACameraDeviceImpl_QueryNumSupportedInterfaces
- * Description: Statically query number of supported interfaces
- */
-XAresult XACameraDeviceImpl_QueryNumSupportedInterfaces( XAuint32 *pNumSupportedInterfaces )
-{
-    DEBUG_API("->XACameraDeviceImpl_QueryNumSupportedInterfaces");
-    if( pNumSupportedInterfaces )
-    {
-        *pNumSupportedInterfaces = CAMERA_ITFCOUNT;
-
-        DEBUG_API_A1("<-XACameraDeviceImpl_QueryNumSupportedInterfaces - %i", (int)(*pNumSupportedInterfaces) );
-        return XA_RESULT_SUCCESS;
-    }
-    else
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraDeviceImpl_QueryNumSupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-}
-/* XAResult XACameraDeviceImpl_QuerySupportedInterfaces
- * Description: Statically query supported interfaces
- */
-XAresult XACameraDeviceImpl_QuerySupportedInterfaces( XAuint32 index,
-                                                      XAInterfaceID * pInterfaceId )
-{
-    DEBUG_API("->XACameraDeviceImpl_QuerySupportedInterfaces");
-
-    if( index >= CAMERA_ITFCOUNT || !pInterfaceId )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraDeviceImpl_QuerySupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        *pInterfaceId = *(XACameraDeviceItfIIDs[index]);
-
-        DEBUG_API("<-XACameraDeviceImpl_QuerySupportedInterfaces");
-        return XA_RESULT_SUCCESS;
-    }
-}
-
-
-/*****************************************************************************
- * base object XAObjectItfImpl methods
- *****************************************************************************/
-
-/* XAresult XACameraDeviceImpl_DoRealize( XAObjectItf self )
- * Description: Realize all implicit and explicitly wanted interfaces.
- * Create and initialize implementation-specific variables.
- * Called from base object XAObjectItfImpl
- */
-XAresult XACameraDeviceImpl_DoRealize( XAObjectItf self )
-{
-    XAuint8 itfIdx = 0;
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XACameraDeviceImpl* pObjImpl = (XACameraDeviceImpl*)(pObj);
-    XAresult ret = XA_RESULT_SUCCESS;
-
-
-    DEBUG_API("->XACameraDeviceImpl_DoRealize");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-
-    /* check casting from correct pointer type */
-    if( !pObjImpl || pObj != pObjImpl->baseObj.self )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraDeviceImpl_DoRealize");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
- 
-    ret = XACameraAdapt_PostInit( pObjImpl->adaptationCtx );
-
-    if( ret != XA_RESULT_SUCCESS )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR_A1("Camera adapt postinit - %d", ret);
-        DEBUG_API("<-XACameraDeviceImpl_DoRealize");
-        return ret;
-    }
-
-    /* Realize all implicit and explicitly wanted interfaces */
-    for( itfIdx = 0; itfIdx < CAMERA_ITFCOUNT; itfIdx++)
-    {
-        if( !(pObj->interfaceMap[itfIdx].pItf) &&
-            pObj->interfaceMap[itfIdx].required )
-        {
-            void *pItf = NULL;
-            switch( itfIdx )
-            {
-                case CAMERA_DIMITF:
-                    pItf = XADIMItfImpl_Create();
-                    if(pItf)
-                    {
-                        XADIMItfImpl_Init(pItf, self,
-                                XACameraDeviceImpl_DoAddItf,
-                                XACameraDeviceImpl_DoResumeItf,
-                                XACameraDeviceImpl_DoRemoveItf);
-                    }
-                    break;
-  
-                case CAMERA_CAMERAITF:
-                    pItf = XACameraItfImpl_Create( pObjImpl->adaptationCtx );
-                    break;
-                case CAMERA_CONFIGEXTENSIONITF:
-                    pItf = XAConfigExtensionsItfImpl_Create();
-                    break;
-                case CAMERA_IMAGECONTROLSITF:
-                   pItf = XAImageControlsItfImpl_Create( pObjImpl->adaptationCtx );
-                   break;
-                case CAMERA_IMAGEEFFECTSITF:
-                   pItf = XAImageEffectsItfImpl_Create( pObjImpl->adaptationCtx );
-                   break;
-                case CAMERA_VIDEOPOSTPROCESSINGITF:
-                     pItf = XAVideoPostProcessingItfImpl_Create( pObjImpl->adaptationCtx );
-                     break;
-                  
-                default:
-                    break;
-            }
-            if( !pItf )
-            {
-                /* memory allocation failed */
-                XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-                DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-                DEBUG_API("<-XACameraDeviceImpl_DoRealize");
-                return XA_RESULT_MEMORY_FAILURE;
-            }
-            else
-            {
-                pObj->interfaceMap[itfIdx].pItf = pItf;
-            }
-        }
-    }
-
-    pObj->state = XA_OBJECT_STATE_REALIZED;
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraDeviceImpl_DoRealize");
-    return XA_RESULT_SUCCESS;
-}
-
-/* XAresult XACameraDeviceImpl_DoResume
- * Description: Resume object from suspended state
- */
-XAresult XACameraDeviceImpl_DoResume(XAObjectItf self)
-{
-    DEBUG_API("->XACameraDeviceImpl_DoResume");
-    DEBUG_API("<-XACameraDeviceImpl_DoResume");
-    /* This implementation does not support suspended state */
-    return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
-
-/* void XACameraDeviceImpl_FreeResources
- * Description: Free all resources reserved at XACameraDeviceImpl_DoRealize()
- */
-void XACameraDeviceImpl_FreeResources(XAObjectItf self)
-{
-    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);
-    
-
-    
-
-    /* free all allocated interfaces */
-    for(itfIdx = 0; itfIdx < CAMERA_ITFCOUNT; itfIdx++)
-    {
-        void *pItf = pObj->interfaceMap[itfIdx].pItf;
-        if(pItf)
-        {
-            switch(itfIdx)
-            {
-                case CAMERA_CAMERAITF:
-                    XACameraItfImpl_Free( pItf );
-                    break;
-                case CAMERA_CONFIGEXTENSIONITF:
-                    XAConfigExtensionsItfImpl_Free( pItf );
-                    break;
-                case CAMERA_DIMITF:
-                    XADIMItfImpl_Free( pItf );
-                    break;
-                case CAMERA_IMAGECONTROLSITF:
-                    XAImageControlsItfImpl_Free( pItf );
-                    break;
-                case CAMERA_IMAGEEFFECTSITF:
-                    XAImageEffectsItfImpl_Free( pItf );
-                    break;
-                case CAMERA_VIDEOPOSTPROCESSINGITF:
-                    XAVideoPostProcessingItfImpl_Free( pItf );
-                    break;
-                default:
-                    break;
-            }
-            pObj->interfaceMap[itfIdx].pItf = NULL;
-        }
-    }
-  
-    if ( pImpl->adaptationCtx != NULL )
-    {
-        XACameraAdapt_Destroy( pImpl->adaptationCtx );
-        pImpl->adaptationCtx = NULL;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSCamera);
-    DEBUG_API("<-XACameraDeviceImpl_FreeResources");
-    return;
-}
-
-/*****************************************************************************
- * CameraDeviceImpl -specific methods
- *****************************************************************************/
-
-/* XACameraDeviceImpl_DoAddItf
- * Dynamically add an interface, object specific parts
- */
-XAresult XACameraDeviceImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
-{
-
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XACameraDeviceImpl* pImpl = (XACameraDeviceImpl*)(pObj);
-
-    XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XACameraDeviceImpl_DoAddItf");
-    if(mapEntry)
-    {
-        switch( mapEntry->mapIdx )
-        {
-        case CAMERA_IMAGEEFFECTSITF:
-            mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->adaptationCtx );
-            break;
-        default:
-            DEBUG_ERR("XACameraDeviceImpl_DoAddItf unknown id");
-            ret = XA_RESULT_FEATURE_UNSUPPORTED;
-            break;
-        }
-
-        if( !mapEntry->pItf && ret == XA_RESULT_SUCCESS)
-            {
-                DEBUG_ERR("XACameraDeviceImpl_DoAddItf itf creation failed");
-                ret = XA_RESULT_MEMORY_FAILURE;
-            }
-    }
-    else
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        ret = XA_RESULT_PARAMETER_INVALID;
-    }
-
-    DEBUG_API("<-XACameraDeviceImpl_DoAddItf");
-    return ret;
-}
-
-/* XACameraDeviceImpl_DoResumeItf
- * Try to resume lost interface, object specific parts
- */
-XAresult XACameraDeviceImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XACameraDeviceImpl_DoResumeItf");
-    /* For now, no difference between suspended and unrealised itfs */
-    ret = XACameraDeviceImpl_DoAddItf(self,mapEntry);
-    DEBUG_API("<-XACameraDeviceImpl_DoResumeItf");
-    return ret;
-}
-
-/* XACameraDeviceImpl_DoRemoveItf
- * Dynamically remove an interface, object specific parts
- */
-XAresult XACameraDeviceImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XACameraDeviceImpl_DoRemoveItf");
-    if(mapEntry)
-    {
-        switch( mapEntry->mapIdx )
-        {
-        case CAMERA_IMAGEEFFECTSITF:
-            XAImageEffectsItfImpl_Free( mapEntry->pItf );
-            break;
-        default:
-            DEBUG_ERR("XACameraDeviceImpl_DoRemoveItf unknown id");
-            ret = XA_RESULT_FEATURE_UNSUPPORTED;
-            break;
-        }
-        mapEntry->pItf = NULL;
-    }
-    else
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        ret = XA_RESULT_PARAMETER_INVALID;
-    }
-
-    DEBUG_API("<-XACameraDeviceImpl_DoRemoveItf");
-    return ret;
-}
-/* END OF FILE */
--- a/khronosfws/openmax_al/src/camera/xacameradevice.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +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 XACAMERADEVICE_H
-#define XACAMERADEVICE_H
-
-#include "openmaxalwrapper.h"
-#include "xaobjectitf.h"
-#include "xaglobals.h"
-#include "xaadptbasectx.h"
-/** MACROS **/
-
-
-/** TYPES **/
-
-
-/** ENUMERATIONS **/
-/* Enumeration for interfaces that CameraDevice supports.  */
-typedef enum
-{
-    CAMERA_OBJECTITF,
-    CAMERA_CAMERAITF,
-    CAMERA_CONFIGEXTENSIONITF,
-    CAMERA_DIMITF,
-    CAMERA_IMAGECONTROLSITF,
-    CAMERA_IMAGEEFFECTSITF,
-    CAMERA_VIDEOPOSTPROCESSINGITF,
-    CAMERA_ITFCOUNT
-} XACameraDeviceInterfaces;
-
-/** STRUCTURES **/
-/* Specification for CameraDeviceImpl. */
-typedef struct XACameraDeviceImpl_
-{
-    /* Parent for XACameraDeviceImpl */
-    XAObjectItfImpl baseObj;
-
-    /* variables */
-    XAuint32 deviceID;
-
-    XAAdaptationBaseCtx* adaptationCtx;
-  
-} XACameraDeviceImpl;
-
-
-/** METHODS **/
-
-/* base object XAObjectItfImpl methods */
-XAresult    XACameraDeviceImpl_DoRealize(XAObjectItf self);
-XAresult    XACameraDeviceImpl_DoResume(XAObjectItf self);
-void        XACameraDeviceImpl_FreeResources(XAObjectItf self);
-
-/* CameraDeviceImpl -specific methods*/
-/* DynamicInterfaceManagement object-specific methods */
-XAresult XACameraDeviceImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  );
-XAresult XACameraDeviceImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-XAresult XACameraDeviceImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-
-
-
-#endif /* XACAMERADEVICE_H */
--- a/khronosfws/openmax_al/src/camera/xacameraitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1139 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xacameraitf.h"
-
-#include "xacameraitfadaptation.h"
-
-#include "xathreadsafety.h"
-
-/* XACameraItfImpl* GetImpl(XACameraItf self)
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XACameraItfImpl* GetImpl(XACameraItf self)
-{
-    if( self )
-    {
-        XACameraItfImpl* impl = (XACameraItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/*****************************************************************************
- * Base interface XACameraItf implementation
- *****************************************************************************/
-
-/**
- * XAresult XACameraItfImpl_RegisterCallback( XACameraItf self,
- *                                            xaCameraCallback callback,
- *                                            void *pContext )
- * Description: Sets callback for camera event notification.
- **/
-XAresult XACameraItfImpl_RegisterCallback( XACameraItf self,
-                                           xaCameraCallback callback,
-                                           void *pContext )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_RegisterCallback");
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_RegisterCallback");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->callback = callback;
-    impl->context = pContext;
-    impl->cbPtrToSelf = self;
-
-    DEBUG_API("<-XACameraItfImpl_RegisterCallback");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetFlashMode( XACameraItf self, XAuint32 flashMode )
- * Description: Sets the camera flash setting.
- **/
-XAresult XACameraItfImpl_SetFlashMode( XACameraItf self, XAuint32 flashMode )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_SetFlashMode");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-
-    if( !impl || flashMode > XA_CAMERA_FLASHMODE_TORCH || flashMode < XA_CAMERA_FLASHMODE_OFF )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetFlashMode");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is flash mode changed */
-    if( impl->flashMode != flashMode )
-    {
-    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;
-        }
-        /* wait for adaptation */
-        impl->flashReady = XA_BOOLEAN_FALSE;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetFlashMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetFlashMode( XACameraItf self, XAuint32 *pFlashMode )
- * Description: Gets the camera flash setting.
- **/
-XAresult XACameraItfImpl_GetFlashMode( XACameraItf self, XAuint32 *pFlashMode )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_GetFlashMode");
-    if( !impl || !pFlashMode )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetFlashMode");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pFlashMode = impl->flashMode;
-
-    DEBUG_API("<-XACameraItfImpl_GetFlashMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_IsFlashReady( XACameraItf self, XAboolean *pReady )
- * Description: Queries whether the flash is ready for use.
- **/
-XAresult XACameraItfImpl_IsFlashReady( XACameraItf self, XAboolean *pReady )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_IsFlashReady");
-    if( !impl || !pReady )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_IsFlashReady");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    *pReady = impl->flashReady;
-
-    DEBUG_API("<-XACameraItfImpl_IsFlashReady");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetFocusMode( XACameraItf self, XAuint32 focusMode,
- *                                        XAmillimeter manualSetting,
- *                                        XAboolean macroEnabled )
- * Description: Sets the camera focus mode.
- **/
-XAresult XACameraItfImpl_SetFocusMode( XACameraItf self, XAuint32 focusMode,
-                                       XAmillimeter manualSetting,
-                                       XAboolean macroEnabled )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_SetFocusMode");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-
-    if( !impl || focusMode < XA_CAMERA_FOCUSMODE_MANUAL || focusMode > XA_CAMERA_FOCUSMODE_CONTINUOUS_CENTROID )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetFocusMode");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is focus mode changed */
-    if( impl->focusMode != focusMode )
-    {
-    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;
-            impl->macroEnabled = macroEnabled;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetFocusMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetFocusMode( XACameraItf self,
- *                                        XAuint32 *pFocusMode,
- *                                        XAmillimeter *pManualSetting,
- *                                        XAboolean *pMacroEnabled )
- * Description: Gets the camera focus mode.
- **/
-XAresult XACameraItfImpl_GetFocusMode( XACameraItf self,
-                                       XAuint32 *pFocusMode,
-                                       XAmillimeter *pManualSetting,
-                                       XAboolean *pMacroEnabled )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_GetFocusMode");
-    if( !impl || !pFocusMode || !pManualSetting || !pMacroEnabled )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetFocusMode");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pFocusMode = impl->focusMode;
-    *pMacroEnabled = impl->macroEnabled;
-
-    if( impl->focusMode & XA_CAMERA_FOCUSMODE_MANUAL )
-    {
-        *pManualSetting = impl->focusManualSetting;
-    }
-
-    DEBUG_API("<-XACameraItfImpl_GetFocusMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetFocusRegionPattern( XACameraItf self,
- *                                                 XAuint32 focusPattern,
- *                                                 XAuint32 activePoints1,
- *                                                 XAuint32 activePoints2 )
- * Description: Set the camera focus region pattern.
- **/
-XAresult XACameraItfImpl_SetFocusRegionPattern( XACameraItf self,
-                                                XAuint32 focusPattern,
-                                                XAuint32 activePoints1,
-                                                XAuint32 activePoints2 )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_SetFocusRegionPattern");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-
-    if( !impl || focusPattern < XA_FOCUSPOINTS_ONE || focusPattern > XA_FOCUSPOINTS_CUSTOM )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetFocusRegionPattern");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is focus pattern changed */
-    if( focusPattern == impl->focusPattern )
-    {
-    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) )
-            {
-                impl->activePoints1 = activePoints1;
-                impl->activePoints2 = activePoints2;
-            }
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetFocusRegionPattern");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetFocusRegionPattern( XACameraItf self,
- *                                                 XAuint32 *pFocusPattern,
- *                                                 XAuint32 *pActivePoints1,
- *                                                 XAuint32 *pActivePoints2 )
- * Description: Gets the camera focus region pattern.
- **/
-XAresult XACameraItfImpl_GetFocusRegionPattern( XACameraItf self,
-                                                XAuint32 *pFocusPattern,
-                                                XAuint32 *pActivePoints1,
-                                                XAuint32 *pActivePoints2 )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_GetFocusRegionPattern");
-    if( !impl || !pFocusPattern || !pActivePoints1 || !pActivePoints2 )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetFocusRegionPattern");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pFocusPattern = impl->focusPattern;
-
-    if( !(impl->focusMode & XA_CAMERA_FOCUSMODE_MANUAL) &&
-        (impl->focusPattern == XA_FOCUSPOINTS_CUSTOM) )
-    {
-        *pActivePoints1 = impl->activePoints1;
-        *pActivePoints2 = impl->activePoints2;
-    }
-
-    DEBUG_API("<-XACameraItfImpl_GetFocusRegionPattern");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetFocusRegionPositions( XACameraItf self,
- *                                                   XAuint32 *pNumPositionEntries,
- *                                                   XAFocusPointPosition *pFocusPosition )
- * Description: Get the camera focus region pattern's positioning and size for each
- * point in the active focus pattern.
- **/
-XAresult XACameraItfImpl_GetFocusRegionPositions( XACameraItf self,
-                                                  XAuint32 *pNumPositionEntries,
-                                                  XAFocusPointPosition *pFocusPosition )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_GetFocusRegionPositions");
-    if( !impl || !pNumPositionEntries || !pFocusPosition )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetFocusRegionPositions");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    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;
-}
-
-/**
- * XAresult XACameraItfImpl_GetFocusModeStatus( XACameraItf self,
- *                                              XAuint32 *pFocusStatus,
- *                                              XAuint32 *pRegionStatus1,
- *                                              XAuint32 *pRegionStatus2 )
- * Description: Gets the camera focus status.
- **/
-XAresult XACameraItfImpl_GetFocusModeStatus( XACameraItf self,
-                                             XAuint32 *pFocusStatus,
-                                             XAuint32 *pRegionStatus1,
-                                             XAuint32 *pRegionStatus2 )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_GetFocusModeStatus");
-    if( !impl || !*pFocusStatus )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetFocusModeStatus");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    *pFocusStatus = impl->focusStatus;
-
-    DEBUG_API("<-XACameraItfImpl_GetFocusModeStatus");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetMeteringMode( XACameraItf self, XAuint32 meteringMode )
- * Description: Sets the camera metering mode for exposure.
- **/
-XAresult XACameraItfImpl_SetMeteringMode( XACameraItf self, XAuint32 meteringMode )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraItfImpl_SetMeteringMode");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-
-    if( !impl || meteringMode < XA_CAMERA_METERINGMODE_AVERAGE || meteringMode >XA_CAMERA_METERINGMODE_MATRIX )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetMeteringMode");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    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;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetMeteringMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetMeteringMode( XACameraItf self, XAuint32 *pMeteringMode )
- * Description: Gets the camera metering mode for exposure.
- **/
-XAresult XACameraItfImpl_GetMeteringMode( XACameraItf self, XAuint32 *pMeteringMode )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraItfImpl_GetMeteringMode");
-
-    if( !impl || !pMeteringMode )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetMeteringMode");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pMeteringMode = impl->meteringMode;
-
-    DEBUG_API("<-XACameraItfImpl_GetMeteringMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetExposureMode( XACameraItf self, XAuint32 exposure,
- *                                           XAuint32 compensation )
- * Description: Sets the camera exposure mode.
- **/
-XAresult XACameraItfImpl_SetExposureMode( XACameraItf self, XAuint32 exposure,
-                                          XAuint32 compensation )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_SetExposureMode");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-    impl = GetImpl(self);
-    if( !impl || exposure < XA_CAMERA_EXPOSUREMODE_MANUAL || exposure > XA_CAMERA_EXPOSUREMODE_NIGHTPORTRAIT )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetExposureMode");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is focus mode changed */
-    if( impl->exposureMode != exposure || impl->compensation != compensation )
-    {
-    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;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetExposureMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetExposureMode( XACameraItf self, XAuint32 *pExposure,
- *                                           XAuint32 *pCompensation )
- * Description: Gets the camera exposure mode.
- **/
-XAresult XACameraItfImpl_GetExposureMode( XACameraItf self, XAuint32 *pExposure,
-                                          XAuint32 *pCompensation )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_GetExposureMode");
-    impl = GetImpl(self);
-    if( !impl || !pExposure || !pCompensation )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetExposureMode");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pExposure = impl->exposureMode;
-    *pCompensation = impl->compensation;
-
-    DEBUG_API("<-XACameraItfImpl_GetExposureMode");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetISOSensitivity( XACameraItf self, XAuint32 isoSensitivity,
- *                                             XAuint32 manualSetting )
- * Description: Sets the camera ISO sensitivity.
- **/
-XAresult XACameraItfImpl_SetISOSensitivity( XACameraItf self, XAuint32 isoSensitivity,
-                                            XAuint32 manualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_SetISOSensitivity");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-    impl = GetImpl(self);
-    if( !impl || isoSensitivity<XA_CAMERA_ISOSENSITIVITYMODE_MANUAL || isoSensitivity>XA_CAMERA_ISOSENSITIVITYMODE_AUTO )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetISOSensitivity");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is focus mode changed */
-    if( impl->isoSensitivity != isoSensitivity || impl->isoManualSetting != manualSetting )
-    {
-    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;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetISOSensitivity");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetISOSensitivity( XACameraItf self, XAuint32 *pIsoSensitivity,
- *                                             XAuint32 *pManualSetting )
- * Description: Gets the camera ISO sensitivity.
- **/
-XAresult XACameraItfImpl_GetISOSensitivity( XACameraItf self, XAuint32 *pIsoSensitivity,
-                                            XAuint32 *pManualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_GetISOSensitivity");
-    impl = GetImpl(self);
-    if( !impl || !pIsoSensitivity || !pManualSetting )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetISOSensitivity");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pIsoSensitivity = impl->isoSensitivity;
-
-    if( impl->isoSensitivity == XA_CAMERA_ISOSENSITIVITYMODE_MANUAL )
-    {
-        *pManualSetting = impl->isoManualSetting;
-    }
-    if( impl->isoSensitivity == XA_CAMERA_ISOSENSITIVITYMODE_AUTO )
-    {
-        *pManualSetting = 0;
-    }
-
-    DEBUG_API("<-XACameraItfImpl_GetISOSensitivity");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetAperture( XACameraItf self, XAuint32 aperture,
- *                                       XAuint32 manualSetting )
- * Description: Sets the camera aperture.
- **/
-XAresult XACameraItfImpl_SetAperture( XACameraItf self, XAuint32 aperture,
-                                      XAuint32 manualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_SetAperture");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-    impl = GetImpl(self);
-    if( !impl || aperture<XA_CAMERA_APERTUREMODE_MANUAL || aperture>XA_CAMERA_APERTUREMODE_AUTO )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetAperture");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is aperture mode or value changed */
-    if( impl->aperture != aperture || impl->apertureManualSetting != manualSetting )
-    {
-    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;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetAperture");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetAperture( XACameraItf self, XAuint32 *pAperture,
- *                                       XAuint32 *pManualSetting )
- * Description: Gets the camera aperture.
- **/
-XAresult XACameraItfImpl_GetAperture( XACameraItf self, XAuint32 *pAperture,
-                                      XAuint32 *pManualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_GetAperture");
-    impl = GetImpl(self);
-    if( !impl || !pAperture || !pManualSetting )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetAperture");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pAperture = impl->aperture;
-
-    if( impl->aperture == XA_CAMERA_APERTUREMODE_MANUAL )
-    {
-        *pManualSetting = impl->apertureManualSetting;
-    }
-    if( impl->aperture == XA_CAMERA_APERTUREMODE_AUTO )
-    {
-          *pManualSetting = 0;
-    }
-
-    DEBUG_API("<-XACameraItfImpl_GetAperture");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetShutterSpeed( XACameraItf self, XAuint32 shutterSpeed,
- *                                           XAmicrosecond manualSetting )
- * Description: Sets the camera shutter speed.
- **/
-XAresult XACameraItfImpl_SetShutterSpeed( XACameraItf self, XAuint32 shutterSpeed,
-                                          XAmicrosecond manualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_SetShutterSpeed");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-    impl = GetImpl(self);
-    if( !impl || shutterSpeed < XA_CAMERA_SHUTTERSPEEDMODE_MANUAL || shutterSpeed > XA_CAMERA_SHUTTERSPEEDMODE_AUTO )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetShutterSpeed");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    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;
-        impl->shutterSpeed = shutterSpeed;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetShutterSpeed");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetShutterSpeed( XACameraItf self, XAuint32 *pShutterSpeed,
- *                                           XAmicrosecond *pManualSetting )
- * Description: Gets the camera shutter speed.
- **/
-XAresult XACameraItfImpl_GetShutterSpeed( XACameraItf self, XAuint32 *pShutterSpeed,
-                                          XAmicrosecond *pManualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_GetShutterSpeed");
-    impl = GetImpl(self);
-    if( !impl || !pShutterSpeed || !pManualSetting )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetShutterSpeed");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pShutterSpeed = impl->shutterSpeed;
-
-    if( impl->shutterSpeed == XA_CAMERA_SHUTTERSPEEDMODE_MANUAL )
-    {
-        *pManualSetting = impl->shutterManualSetting;
-    }
-    if( impl->shutterSpeed == XA_CAMERA_SHUTTERSPEEDMODE_AUTO )
-    {
-        *pManualSetting = 0;
-    }
-
-    DEBUG_API("<-XACameraItfImpl_GetShutterSpeed");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetWhiteBalance( XACameraItf self, XAuint32 whiteBalance,
- *                                           XAuint32 manualSetting )
- * Description: Sets the camera white balance.
- **/
-XAresult XACameraItfImpl_SetWhiteBalance( XACameraItf self, XAuint32 whiteBalance,
-                                          XAuint32 manualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_SetWhiteBalance");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-    impl = GetImpl(self);
-    if( !impl )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetWhiteBalance");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is whitebalance mode or value changed */
-    if( impl->whiteBalance != whiteBalance || impl->whiteBalManualSetting != manualSetting )
-    {
-    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;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetWhiteBalance");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetWhiteBalance( XACameraItf self, XAuint32 *pWhiteBalance,
- *                                           XAuint32 *pManualSetting )
- * Description: Gets the camera white balance.
- **/
-XAresult XACameraItfImpl_GetWhiteBalance( XACameraItf self, XAuint32 *pWhiteBalance,
-                                          XAuint32 *pManualSetting )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_GetWhiteBalance");
-    impl = GetImpl(self);
-    if( !impl || !pWhiteBalance || !pManualSetting )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetWhiteBalance");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pWhiteBalance = impl->whiteBalance;
-
-    if( impl->whiteBalance == XA_CAMERA_WHITEBALANCEMODE_MANUAL )
-    {
-        *pManualSetting = impl->whiteBalManualSetting;
-    }
-
-    DEBUG_API("<-XACameraItfImpl_GetWhiteBalance");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetAutoLocks( XACameraItf self, XAuint32 locks )
- * Description: Locks the given automatic camera settings. This method is typically
- * called when the camera trigger is half-pressed.
- **/
-XAresult XACameraItfImpl_SetAutoLocks( XACameraItf self, XAuint32 locks )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-    DEBUG_API("->XACameraItfImpl_SetAutoLocks");
-    impl = GetImpl(self);
-    if( !impl || locks < XA_CAMERA_LOCK_AUTOFOCUS ||
-        (locks > (  XA_CAMERA_LOCK_AUTOFOCUS & XA_CAMERA_LOCK_AUTOEXPOSURE & XA_CAMERA_LOCK_AUTOWHITEBALANCE )))
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetAutoLocks");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    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;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetAutoLocks");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetAutoLocks( XACameraItf self, XAuint32 *locks )
- * Description: Gets the current state of the automatic camera settings locks.
- **/
-XAresult XACameraItfImpl_GetAutoLocks( XACameraItf self, XAuint32 *locks )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_GetAutoLocks");
-    impl = GetImpl(self);
-    if( !impl || !locks )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetAutoLocks");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *locks = impl->locks;
-
-    DEBUG_API("<-XACameraItfImpl_GetAutoLocks");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_SetZoom( XACameraItf self, XAuint32 zoom,
- *                                   XAboolean digitalEnabled, XAuint32 speed,
- *                                   XAboolean async )
- * Description: Sets the new zoom factor.
- **/
-XAresult XACameraItfImpl_SetZoom( XACameraItf self, XApermille zoom,
-                                  XAboolean digitalEnabled, XAuint32 speed,
-                                  XAboolean async )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_SetZoom");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
-    impl = GetImpl(self);
-    if( !impl || !( speed == XA_CAMERA_ZOOM_FASTEST ||  speed == XA_CAMERA_ZOOM_FAST
-        || speed == XA_CAMERA_ZOOM_NORMAL || speed == XA_CAMERA_ZOOM_SLOW ) )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_SetZoom");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    if(impl->adapCtx->fwtype == FWMgrFWGST)
-        {
-        ret = XACameraItfAdapt_SetZoom( (XAAdaptationGstCtx*)impl->adapCtx, zoom, digitalEnabled, speed, async );
-
-        }
-    else
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        ret = XA_RESULT_FEATURE_UNSUPPORTED;
-        }
-    
-    if ( ret == XA_RESULT_SUCCESS )
-    {
-        impl->zoom = zoom;
-        impl->digitalEnabled = digitalEnabled;
-        impl->speed = speed;
-        impl->async = async;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
-    DEBUG_API("<-XACameraItfImpl_SetZoom");
-    return ret;
-}
-
-/**
- * XAresult XACameraItfImpl_GetZoom( XACameraItf self, XAuint32 *pZoom,
- *                                   XAboolean *pDigital )
- * Description: Gets the current zoom factor.
- **/
-XAresult XACameraItfImpl_GetZoom( XACameraItf self, XApermille *pZoom,
-                                  XAboolean *pDigital )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraItfImpl* impl = NULL;
-
-    DEBUG_API("->XACameraItfImpl_GetZoom");
-    impl = GetImpl(self);
-    if( !impl || !pZoom || !pDigital )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraItfImpl_GetZoom");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pZoom = impl->zoom;
-    *pDigital = impl->digitalEnabled;
-
-    DEBUG_API("<-XACameraItfImpl_GetZoom");
-    return ret;
-}
-
-
-/*****************************************************************************
- * XACameraItfImpl -specific methods
- *****************************************************************************/
-
-/* XACameraItfImpl* XACameraItfImpl_Create()
- * Description: Allocate and initialize CameraItfImpl
- */
-
-XACameraItfImpl* XACameraItfImpl_Create( XAAdaptationBaseCtx *adapCtx )
-{
-    XACameraItfImpl* self = (XACameraItfImpl*)
-        calloc(1,sizeof(XACameraItfImpl));
-    DEBUG_API("->XACameraItfImpl_Create");
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.RegisterCallback = XACameraItfImpl_RegisterCallback;
-        self->itf.SetFlashMode = XACameraItfImpl_SetFlashMode;
-        self->itf.GetFlashMode = XACameraItfImpl_GetFlashMode;
-        self->itf.IsFlashReady = XACameraItfImpl_IsFlashReady;
-        self->itf.SetFocusMode = XACameraItfImpl_SetFocusMode;
-        self->itf.GetFocusMode = XACameraItfImpl_GetFocusMode;
-        self->itf.SetFocusRegionPattern = XACameraItfImpl_SetFocusRegionPattern;
-        self->itf.GetFocusRegionPattern = XACameraItfImpl_GetFocusRegionPattern;
-        self->itf.GetFocusRegionPositions = XACameraItfImpl_GetFocusRegionPositions;
-        self->itf.GetFocusModeStatus = XACameraItfImpl_GetFocusModeStatus;
-        self->itf.SetMeteringMode = XACameraItfImpl_SetMeteringMode;
-        self->itf.GetMeteringMode = XACameraItfImpl_GetMeteringMode;
-        self->itf.SetExposureMode = XACameraItfImpl_SetExposureMode;
-        self->itf.GetExposureMode = XACameraItfImpl_GetExposureMode;
-        self->itf.SetISOSensitivity = XACameraItfImpl_SetISOSensitivity;
-        self->itf.GetISOSensitivity = XACameraItfImpl_GetISOSensitivity;
-        self->itf.SetAperture = XACameraItfImpl_SetAperture;
-        self->itf.GetAperture = XACameraItfImpl_GetAperture;
-        self->itf.SetShutterSpeed = XACameraItfImpl_SetShutterSpeed;
-        self->itf.GetShutterSpeed = XACameraItfImpl_GetShutterSpeed;
-        self->itf.SetWhiteBalance = XACameraItfImpl_SetWhiteBalance;
-        self->itf.GetWhiteBalance = XACameraItfImpl_GetWhiteBalance;
-        self->itf.SetAutoLocks = XACameraItfImpl_SetAutoLocks;
-        self->itf.GetAutoLocks = XACameraItfImpl_GetAutoLocks;
-        self->itf.SetZoom = XACameraItfImpl_SetZoom;
-        self->itf.GetZoom = XACameraItfImpl_GetZoom;
-
-
-        /* init variables */
-        self->flashReady = XA_BOOLEAN_TRUE;
-        self->adapCtx = adapCtx;
-        self->cbPtrToSelf = NULL;
-        XAAdaptationBase_AddEventHandler( adapCtx, &XACameraItfImp_AdaptCb, XA_CAMERAITFEVENTS, self );
-        self->self = self;
-    }
-
-    DEBUG_API("<-XACameraItfImpl_Create");
-    return self;
-}
-
-
-/* void XACameraItfImpl_Free(XACameraItfImpl* self)
- * Description: Free all resources reserved at XACameraItfImpl_Create
- */
-void XACameraItfImpl_Free(XACameraItfImpl* self)
-{
-    DEBUG_API("->XACameraItfImpl_Free");
-    assert( self==self->self );
-    XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XACameraItfImp_AdaptCb );
-    free( self );
-    DEBUG_API("<-XACameraItfImpl_Free");
-}
-
-/* void XACameraItfAdapt_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
- * @param void *pHandlerCtx - pointer to cb context (XACameraItfImpl)
- * @param XAAdaptEvent *event  - Event
- * Description: Event handler for adaptation events
- */
-void XACameraItfImp_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
-    XACameraItfImpl* impl =(XACameraItfImpl*)pHandlerCtx;
-    XAuint32 eventData=0;
-
-    DEBUG_API("->XACameraItfImp_AdaptCb");
-    if(!impl)
-    {
-        DEBUG_ERR("XACameraItfAdapt_AdaptCb, invalid context pointer!");
-        DEBUG_API("<-XACameraItfImp_AdaptCb");
-        return;
-    }
-    assert(event);
-
-    if( event->data )
-    {
-        eventData = *(XAuint32*)event->data;
-    }
-    switch( event->eventid )
-    {
-        case XA_CAMERACBEVENT_FOCUSSTATUS:
-            impl->focusStatus = eventData;
-            break;
-        case XA_CAMERACBEVENT_ZOOMSTATUS:
-            impl->zoom = eventData;
-            break;
-        case XA_CAMERACBEVENT_EXPOSURESTATUS:
-            impl->focusStatus = eventData;
-            break;
-        case XA_CAMERACBEVENT_FLASHREADY:
-            impl->flashReady = XA_BOOLEAN_TRUE;
-            break;
-        case XA_CAMERACBEVENT_WHITEBALANCELOCKED:
-        case XA_CAMERACBEVENT_ROTATION:
-        default:
-            break;
-    }
-
-    if( impl->callback )
-    {
-        impl->callback( impl->cbPtrToSelf, impl->context, event->eventid, eventData );
-    }
-    DEBUG_API("<-XACameraItfImp_AdaptCb");
-}
-
--- a/khronosfws/openmax_al/src/camera/xacameraitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +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 XACAMERAITF_H
-#define XACAMERAITF_H
-
-#include "xaadptbasectx.h"
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XACameraItf implementation */
-typedef struct XACameraItfImpl_
-{
-    /* parent interface */
-    struct XACameraItf_ itf;
-    /* pointer to self */
-    struct XACameraItfImpl_* self;
-
-    /* variables */
-    XAuint32            flashMode;
-    XAboolean           flashReady;
-    XAuint32            focusMode;
-    XAuint32            focusStatus;
-    XAmillimeter        focusManualSetting;
-    XAboolean           macroEnabled;
-    XAuint32            focusPattern;
-    XAuint32            activePoints1;
-    XAuint32            activePoints2;
-    XAuint32            meteringMode;
-    XAuint32            exposureMode;
-    XAuint32            compensation;
-    XAuint32            isoSensitivity;
-    XAuint32            isoManualSetting;
-    XAuint32            aperture;
-    XAuint32            apertureManualSetting;
-    XAuint32            shutterSpeed;
-    XAmicrosecond       shutterManualSetting;
-    XAuint32            whiteBalance;
-    XAuint32            whiteBalManualSetting;
-    XAuint32            locks;
-    XApermille          zoom;
-    XAboolean           digitalEnabled;
-    XAuint32            speed;
-    XAuint32            async;
-
-    xaCameraCallback    callback;
-    void                *context;
-    XACameraItf         cbPtrToSelf;
-
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-} XACameraItfImpl;
-
-/** METHODS **/
-
-/* Base interface XACameraItf implementation
- *See API Specification for method documentation
- */
-XAresult XACameraItfImpl_RegisterCallback( XACameraItf self,
-                                           xaCameraCallback callback,
-                                           void *pContext );
-
-XAresult XACameraItfImpl_SetFlashMode( XACameraItf self, XAuint32 flashMode );
-
-XAresult XACameraItfImpl_GetFlashMode( XACameraItf self, XAuint32 *pFlashMode );
-
-XAresult XACameraItfImpl_IsFlashReady( XACameraItf self, XAboolean *pReady );
-
-XAresult XACameraItfImpl_SetFocusMode( XACameraItf self, XAuint32 focusMode,
-                                       XAmillimeter manualSetting,
-                                       XAboolean macroEnabled );
-
-XAresult XACameraItfImpl_GetFocusMode( XACameraItf self,
-                                       XAuint32 *pFocusMode,
-                                       XAmillimeter *pManualSetting,
-                                       XAboolean *pMacroEnabled );
-
-XAresult XACameraItfImpl_SetFocusRegionPattern( XACameraItf self,
-                                                XAuint32 focusPattern,
-                                                XAuint32 activePoints1,
-                                                XAuint32 activePoints2 );
-
-XAresult XACameraItfImpl_GetFocusRegionPattern( XACameraItf self,
-                                                XAuint32 *pFocusPattern,
-                                                XAuint32 *pActivePoints1,
-                                                XAuint32 *pActivePoints2 );
-
-XAresult XACameraItfImpl_GetFocusRegionPositions( XACameraItf self,
-                                                  XAuint32 *pNumPositionEntries,
-                                                  XAFocusPointPosition *pFocusPosition );
-
-XAresult XACameraItfImpl_GetFocusModeStatus( XACameraItf self,
-                                             XAuint32 *pFocusStatus,
-                                             XAuint32 *pRegionStatus1,
-                                             XAuint32 *pRegionStatus2 );
-
-XAresult XACameraItfImpl_SetMeteringMode( XACameraItf self, XAuint32 meteringMode );
-
-XAresult XACameraItfImpl_GetMeteringMode( XACameraItf self, XAuint32 *pMeteringMode );
-
-XAresult XACameraItfImpl_SetExposureMode( XACameraItf self, XAuint32 exposure,
-                                          XAuint32 compensation );
-
-XAresult XACameraItfImpl_GetExposureMode( XACameraItf self, XAuint32 *pExposure,
-                                          XAuint32 *pCompensation );
-
-XAresult XACameraItfImpl_SetISOSensitivity( XACameraItf self, XAuint32 isoSensitivity,
-                                            XAuint32 manualSetting );
-
-XAresult XACameraItfImpl_GetISOSensitivity( XACameraItf self, XAuint32 *pIsoSensitivity,
-                                            XAuint32 *pManualSetting );
-
-XAresult XACameraItfImpl_SetAperture( XACameraItf self, XAuint32 aperture,
-                                      XAuint32 manualSetting );
-
-XAresult XACameraItfImpl_GetAperture( XACameraItf self, XAuint32 *pAperture,
-                                      XAuint32 *pManualSetting );
-
-XAresult XACameraItfImpl_SetShutterSpeed( XACameraItf self, XAuint32 shutterSpeed,
-                                          XAmicrosecond manualSetting );
-
-XAresult XACameraItfImpl_GetShutterSpeed( XACameraItf self, XAuint32 *pShutterSpeed,
-                                          XAmicrosecond *pManualSetting );
-
-XAresult XACameraItfImpl_SetWhiteBalance( XACameraItf self, XAuint32 whiteBalance,
-                                          XAuint32 manualSetting );
-
-XAresult XACameraItfImpl_GetWhiteBalance( XACameraItf self, XAuint32 *pWhiteBalance,
-                                          XAuint32 *pManualSetting );
-
-XAresult XACameraItfImpl_SetAutoLocks( XACameraItf self, XAuint32 locks );
-
-XAresult XACameraItfImpl_GetAutoLocks( XACameraItf self, XAuint32 *locks );
-
-XAresult XACameraItfImpl_SetZoom( XACameraItf self, XApermille zoom,
-                                  XAboolean digitalEnabled, XAuint32 speed,
-                                  XAboolean async );
-
-XAresult XACameraItfImpl_GetZoom( XACameraItf self, XApermille *pZoom,
-                                  XAboolean *pDigital );
-
-/* XACameraItfImpl -specific methods */
-XACameraItfImpl* XACameraItfImpl_Create( XAAdaptationBaseCtx *adapCtx );
-void XACameraItfImp_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-void XACameraItfImpl_Free(XACameraItfImpl* self);
-
-#endif /* XACAMERAITF_H */
--- a/khronosfws/openmax_al/src/common/openmaxal.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/openmaxal.c	Wed Aug 18 10:17:22 2010 +0300
@@ -23,6 +23,9 @@
 
 #include "openmaxalwrapper.h"
 #include "openmaxal_iid.c"
+#include "xanokialinearvolume_iid.c"
+#include "xanokiavolumeext_iid.c"
+
 #include "xaglobals.h"
 #include "xaobjects.h"
 
--- a/khronosfws/openmax_al/src/common/xadynamicsourceitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynamicsourceitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -20,7 +20,6 @@
 #include <assert.h>
 #include "xadynamicsourceitf.h"
 
-#include "xadynamicsourceitfadaptation.h"
 #include "xadynamicsourceitfadaptationmmf.h"
 
 /*****************************************************************************
@@ -39,13 +38,16 @@
     /* check casting */
     if (!impl || impl != impl->self || !pDataSource)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
     if (!impl->adaptCtx)
         {
-        DEBUG_ERR("Adaptation not ready!!");DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
+        DEBUG_ERR("Adaptation not ready!!");
+        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
+        DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
         res = XA_RESULT_INTERNAL_ERROR;
         }
     else
@@ -53,12 +55,7 @@
         res = XACommon_CheckDataSource(pDataSource, NULL);
         if (res == XA_RESULT_SUCCESS)
             {
-            if (impl->adaptCtx->fwtype == FWMgrFWGST)
-                {
-                res = XADynamicSourceItfAdapt_SetSource(
-                        (XAAdaptationGstCtx*) impl->adaptCtx, pDataSource);
-                }
-            else
+            if (impl->adaptCtx->fwtype == FWMgrFWMMF)
                 {
                 res = XADynamicSourceItfAdaptMMF_SetSource(
                         (XAAdaptationMMFCtx*) impl->adaptCtx, pDataSource);
@@ -91,7 +88,8 @@
         /* init variables */
         self->adaptCtx = adaptCtx;
         self->self = self;
-        }DEBUG_API("<-XADynamicSourceItfImpl_Create");
+        }
+    DEBUG_API("<-XADynamicSourceItfImpl_Create");
     return self;
     }
 
--- a/khronosfws/openmax_al/src/common/xadynintmgmtitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynintmgmtitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -53,7 +53,8 @@
     DEBUG_API("->XADIMItfImpl_AddInterface");
     if (!impl)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADIMItfImpl_AddInterface");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XADIMItfImpl_AddInterface");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -154,7 +155,8 @@
 
     if (!impl)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADIMItfImpl_ResumeInterface");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XADIMItfImpl_ResumeInterface");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -201,7 +203,8 @@
 
     if (!impl)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADIMItfImpl_RegisterCallback");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XADIMItfImpl_RegisterCallback");
         return XA_RESULT_PARAMETER_INVALID;
         }
     impl->dimCb = callback;
@@ -242,7 +245,8 @@
             free(self);
             self = NULL;
             }
-        }DEBUG_API("<-XADIMItfImpl_Create");
+        }
+    DEBUG_API("<-XADIMItfImpl_Create");
     return self;
     }
 
@@ -288,7 +292,8 @@
         {
         self->dimCb((XADynamicInterfaceManagementItf) (self),
                 self->dimCbContext, event, result, iid);
-        }DEBUG_API("<-XADIMItfImpl_SendCbEvent");
+        }
+    DEBUG_API("<-XADIMItfImpl_SendCbEvent");
     }
 
 /* void* XADIMItfImpl_AsyncAddItf
--- a/khronosfws/openmax_al/src/common/xaequalizeritf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,605 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xaequalizeritf.h"
-
-#include "xaequalizeritfadaptation.h"
-
-static const XAuint16 equalizerNumOfPresets = 0;
-
-/**
- * XAEqualizerItfImpl* GetImpl(XAEqualizerItf self)
- * Description: Validated interface pointer and cast it to implementations pointer.
- **/
-static XAEqualizerItfImpl* GetImpl(XAEqualizerItf self)
-{
-    if(self)
-    {
-        XAEqualizerItfImpl *impl = (XAEqualizerItfImpl*)(*self);
-        if(impl && impl == impl->self)
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAEqualizerItf implementation
- */
-
-/**
- * XAresult XAEqualizerItfImpl_SetEnabled(XAEqualizerItf self,XAboolean enabled)
- * Description: Enables the effect.
- **/
-XAresult XAEqualizerItfImpl_SetEnabled(XAEqualizerItf self,XAboolean enabled)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    XAuint16 index = 0;
-    DEBUG_API("->XAEqualizerItfImpl_SetEnabled");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_SetEnabled");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    if(enabled && !(impl->enabled))
-    {
-        for(index = 0; index < EQUALIZER_NUM_OF_BANDS; index++)
-        {
-            if(impl->changeLevel[index])
-            {
-                ret = XAEqualizerItfAdapt_SetBandLevel((XAAdaptationGstCtx*)impl->adapCtx, index, impl->levels[index]);
-
-                if(XA_RESULT_SUCCESS == ret)
-                {
-                    impl->changeLevel[index] = XA_BOOLEAN_FALSE;
-                }
-            }
-        }
-    }
-    else if(!enabled && impl->enabled)
-    {
-        for(index = 0; index < EQUALIZER_NUM_OF_BANDS; index++)
-        {
-            ret = XAEqualizerItfAdapt_SetBandLevel((XAAdaptationGstCtx*)impl->adapCtx, index, EQUALIZER_DEFAULT_BAND_LEVEL);
-
-            if(XA_RESULT_SUCCESS == ret)
-            {
-                impl->changeLevel[index] = XA_BOOLEAN_FALSE;
-            }
-        }
-    }
-    else
-    {
-        /* do nothing */
-    }
-
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        impl->enabled = enabled;
-    }
-
-    DEBUG_API("<-XAEqualizerItfImpl_SetEnabled");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_IsEnabled(XAEqualizerItf self, XAboolean *pEnabled)
- * Description: Gets the enabled status of the effect.
- **/
-XAresult XAEqualizerItfImpl_IsEnabled(XAEqualizerItf self, XAboolean *pEnabled)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_IsEnabled");
-
-    if(!impl || !pEnabled)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_IsEnabled");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pEnabled = impl->enabled;
-
-    DEBUG_API("<-XAEqualizerItfImpl_IsEnabled");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetNumberOfBands(XAEqualizerItf self,
- *                                              XAuint16 *pNumBands)
- * Description: Gets the number of frequency bands that the equalizer supports.
- * A valid equalizer must have at least two bands.
- **/
-XAresult XAEqualizerItfImpl_GetNumberOfBands(XAEqualizerItf self,
-                                             XAuint16 *pNumBands)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetNumberOfBands");
-
-    if(!impl || !pNumBands)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetNumberOfBands");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pNumBands = EQUALIZER_NUM_OF_BANDS;
-
-    DEBUG_API("<-XAEqualizerItfImpl_GetNumberOfBands");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetBandLevelRange(XAEqualizerItf self,
- *                                               XAmillibel *pMin,
- *                                               XAmillibel *pMax)
- * Description: Returns the minimun and maximun band levels supported.
- **/
-XAresult XAEqualizerItfImpl_GetBandLevelRange(XAEqualizerItf self,
-                                              XAmillibel *pMin,
-                                              XAmillibel *pMax)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetBandLevelRange");
-
-    if(!impl || (!pMin && !pMax)) /* other may be NULL */
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetBandLevelRange");
-        /* 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("<-XAEqualizerItfImpl_GetBandLevelRange");
-        return ret;
-    }
-    ret = XAEqualizerItfAdapt_GetBandLevelRange((XAAdaptationGstCtx*)impl->adapCtx, pMin, pMax);
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAEqualizerItfImpl_GetBandLevelRange");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_SetBandLevel(XAEqualizerItf self, XAuint16 band,
- *                                          XAmillibel level)
- * Description: Sets the given equalizer band to the given gain value.
- **/
-XAresult XAEqualizerItfImpl_SetBandLevel(XAEqualizerItf self, XAuint16 band,
-                                         XAmillibel level)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAuint16 numOfBands = 0;
-    XAmillibel minLevel = 0;
-    XAmillibel maxLevel = 0;
-    XAEqualizerItfImpl* impl = NULL;
-
-    DEBUG_API("->XAEqualizerItfImpl_SetBandLevel");
-    impl = GetImpl(self);
-
-    /* Get number of bands */
-    if(XA_RESULT_SUCCESS != XAEqualizerItfImpl_GetNumberOfBands(self, &numOfBands))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_SetBandLevel");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* Get minimum and maximum level */
-    if(XA_RESULT_SUCCESS != XAEqualizerItfImpl_GetBandLevelRange(self, &minLevel, &maxLevel))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_SetBandLevel");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    if(!impl || band > (numOfBands-1) || level < minLevel || level > maxLevel)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_SetBandLevel");
-        /* 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("<-XAEqualizerItfImpl_SetBandLevel");
-        return ret;
-    }
-
-    if(impl->enabled)
-    {
-        ret = XAEqualizerItfAdapt_SetBandLevel((XAAdaptationGstCtx*)impl->adapCtx, band, level);
-        if(XA_RESULT_SUCCESS == ret)
-        {
-            impl->levels[band] = level;
-        }
-    }
-    else
-    {
-        impl->changeLevel[band] = XA_BOOLEAN_TRUE;
-        impl->levels[band] = level;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAEqualizerItfImpl_SetBandLevel");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetBandLevel(XAEqualizerItf self, XAuint16 band,
- *                                          XAmillibel *pLevel)
- * Description: Gets the gain set for the given equalizer band.
- **/
-XAresult XAEqualizerItfImpl_GetBandLevel(XAEqualizerItf self, XAuint16 band,
-                                         XAmillibel *pLevel)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetBandLevel");
-
-    if(!impl || !pLevel ||  band >= EQUALIZER_NUM_OF_BANDS)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetBandLevel");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pLevel = impl->levels[band];
-    DEBUG_API("<-XAEqualizerItfImpl_GetBandLevel");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetCenterFreq(XAEqualizerItf self, XAuint16 band,
- *                                           XAmilliHertz *pCenter)
- * Description: Gets the center frequency of the given band.
- **/
-XAresult XAEqualizerItfImpl_GetCenterFreq(XAEqualizerItf self, XAuint16 band,
-                                          XAmilliHertz *pCenter)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetCenterFreq");
-
-    if(!impl || !pCenter)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetCenterFreq");
-        /* 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("<-XAEqualizerItfImpl_GetCenterFreq");
-        return ret;
-    }
-    ret = XAEqualizerItfAdapt_GetCenterFreq((XAAdaptationGstCtx*)impl->adapCtx, band, pCenter);
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAEqualizerItfImpl_GetCenterFreq");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetBandFreqRange(XAEqualizerItf self, XAuint16 band,
- *                                              XAmilliHertz *pMin,
- *                                              XAmilliHertz *pMax)
- * Description: Gets the frequency range of the given frequency band.
- **/
-XAresult XAEqualizerItfImpl_GetBandFreqRange(XAEqualizerItf self, XAuint16 band,
-                                             XAmilliHertz *pMin,
-                                             XAmilliHertz *pMax)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAuint16 numOfBands = 0;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetBandFreqRange");
-
-    /* Get number of bands */
-    if(XA_RESULT_SUCCESS != XAEqualizerItfImpl_GetNumberOfBands(self, &numOfBands))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetBandFreqRange");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    if(!impl || (!pMin && !pMax) || band > numOfBands) /* pMin or pMax may be NULL */
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetBandFreqRange");
-        /* 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("<-XAEqualizerItfImpl_GetBandFreqRange");
-        return ret;
-    }
-    ret = XAEqualizerItfAdapt_GetBandFreqRange((XAAdaptationGstCtx*)impl->adapCtx, band, pMin, pMax);
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-  
-    DEBUG_API("<-XAEqualizerItfImpl_GetBandFreqRange");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetBand(XAEqualizerItf self, XAmilliHertz frequency,
- *                                     XAuint16 *pBand)
- *
- * Description: Gets the band that has the most effect on the given frequency.
- * If no band has an effect on the given frequency, XA_EQUALIZER_UNDEFINED is returned.
- **/
-XAresult XAEqualizerItfImpl_GetBand(XAEqualizerItf self, XAmilliHertz frequency,
-                                    XAuint16 *pBand)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetBand");
-
-    if(!impl || !pBand)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetBand");
-        /* 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("<-XAEqualizerItfImpl_GetBand");
-        return ret;
-    }
-    ret = XAEqualizerItfAdapt_GetBand((XAAdaptationGstCtx*)impl->adapCtx, frequency, pBand);
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAEqualizerItfImpl_GetBand");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetCurrentPreset(XAEqualizerItf self,
- *                                              XAuint16 *pPreset)
- * Description: Gets the current preset.
- **/
-XAresult XAEqualizerItfImpl_GetCurrentPreset(XAEqualizerItf self,
-                                             XAuint16 *pPreset)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetCurrentPreset");
-
-    if(!impl || !pPreset)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetCurrentPreset");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* no presets defined */
-
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        *pPreset = impl->preset;
-    }
-
-    DEBUG_API("<-XAEqualizerItfImpl_GetCurrentPreset");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_UsePreset(XAEqualizerItf self, XAuint16 index)
- * Description: Sets the equalizer according to the given preset
- **/
-XAresult XAEqualizerItfImpl_UsePreset(XAEqualizerItf self, XAuint16 index)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAuint16 numOfPresets = 0;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XAEqualizerItfImpl_UsePreset");
-
-    /* get number of presets */
-    if( XA_RESULT_SUCCESS != XAEqualizerItfImpl_GetNumberOfPresets(self, &numOfPresets))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_UsePreset");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    if(!impl || index >= numOfPresets )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_UsePreset");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->preset = index;
-
-    DEBUG_API("<-XAEqualizerItfImpl_UsePreset");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetNumberOfPresets(XAEqualizerItf self,
- *                                                XAuint16 *pNumPresets)
- * Description: Gets the total number of presets the equalizer supports.
- **/
-XAresult XAEqualizerItfImpl_GetNumberOfPresets(XAEqualizerItf self,
-                                               XAuint16 *pNumPresets)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAEqualizerItfImpl_GetNumberOfPresets");
-
-    if(!impl || !pNumPresets)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetNumberOfPresets");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* No presets defined. */
-    *pNumPresets = equalizerNumOfPresets;
-
-    DEBUG_API("<-XAEqualizerItfImpl_GetNumberOfPresets");
-    return ret;
-}
-
-/**
- * XAresult XAEqualizerItfImpl_GetPresetName(XAEqualizerItf self, XAuint16 index,
- *                                           const XAchar **ppName)
- * Description: Gets the preset name based on the index.
- **/
-XAresult XAEqualizerItfImpl_GetPresetName(XAEqualizerItf self, XAuint16 index,
-                                          const XAchar **ppName)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAuint16 numOfPresets = 0;
-    XAEqualizerItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XAEqualizerItfImpl_GetPresetName");
-
-    /* get number of presets */
-    if( XA_RESULT_SUCCESS != XAEqualizerItfImpl_GetNumberOfPresets(self, &numOfPresets))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetPresetName");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    if(!impl || !ppName || index > (numOfPresets-1))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAEqualizerItfImpl_GetPresetName");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* Implementation placeholder here for presets when defined.
-       Currently always return XA_RESULT_PARAMETER_INVALID */
-
-    DEBUG_API("<-XAEqualizerItfImpl_GetPresetName");
-    return ret;
-}
-
-/**
- * XAEqualizerItfImpl -specific methods
- **/
- 
-
-/**
- * XAEqualizerItfImplImpl* XAEqualizerItfImpl_Create()
- * @return  XAEqualizerItfImplImpl* - Pointer to  EqualizerItf interface implementation
- **/
-XAEqualizerItfImpl* XAEqualizerItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
-{
-    XAuint16 index = 0;
-
-    XAEqualizerItfImpl *self = (XAEqualizerItfImpl*)
-        calloc(1,sizeof(XAEqualizerItfImpl));
-
-    DEBUG_API("->XAEqualizerItfImpl_Create");
-
-    if(self)
-    {
-        /* init itf default implementation */
-        self->itf.GetBand = XAEqualizerItfImpl_GetBand;
-        self->itf.GetBandFreqRange = XAEqualizerItfImpl_GetBandFreqRange;
-        self->itf.GetBandLevel = XAEqualizerItfImpl_GetBandLevel;
-        self->itf.GetBandLevelRange = XAEqualizerItfImpl_GetBandLevelRange;
-        self->itf.GetCenterFreq = XAEqualizerItfImpl_GetCenterFreq;
-        self->itf.GetCurrentPreset = XAEqualizerItfImpl_GetCurrentPreset;
-        self->itf.GetNumberOfBands = XAEqualizerItfImpl_GetNumberOfBands;
-        self->itf.GetNumberOfPresets = XAEqualizerItfImpl_GetNumberOfPresets;
-        self->itf.GetPresetName = XAEqualizerItfImpl_GetPresetName;
-        self->itf.IsEnabled = XAEqualizerItfImpl_IsEnabled;
-        self->itf.SetBandLevel = XAEqualizerItfImpl_SetBandLevel;
-        self->itf.SetEnabled = XAEqualizerItfImpl_SetEnabled;
-        self->itf.UsePreset = XAEqualizerItfImpl_UsePreset;
-
-        /* init variables */
-        self->enabled = XA_BOOLEAN_FALSE;
-        self->preset = XA_EQUALIZER_UNDEFINED;
-
-        for(index = 0; index < EQUALIZER_NUM_OF_BANDS; index++)
-        {
-            self->levels[index] = EQUALIZER_DEFAULT_BAND_LEVEL;
-            self->changeLevel[index] = XA_BOOLEAN_FALSE;
-        }
-
-        self->adapCtx = adapCtx;
-
-        self->self = self;
-    }
-
-    DEBUG_API("<-XAEqualizerItfImpl_Create");
-    return self;
-}
-
-/**
- * void XAEqualizerItfImpl_Free(XAEqualizerItfImpl* self)
- * @param  XAEqualizerItfImpl* self -
- **/
-void XAEqualizerItfImpl_Free(XAEqualizerItfImpl* self)
-{
-    DEBUG_API("->XAEqualizerItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAEqualizerItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/common/xaequalizeritf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +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 XAEQUALIZERITF_H
-#define XAEQUALIZERITF_H
-
-#include "xaadptbasectx.h"
-#include "xaequalizeritfadaptation.h"
-
-/** MACROS **/
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAEqualizerItf implementation */
-typedef struct XAEqualizerItfImpl_
-{
-    /* parent interface */
-    struct XAEqualizerItf_ itf;
-    /* pointer to self */
-    struct XAEqualizerItfImpl_* self;
-
-    /* variables */
-    XAboolean   enabled;
-    XAuint16    preset;
-   
-    XAmillibel  levels[EQUALIZER_NUM_OF_BANDS];
-    XAboolean   changeLevel[EQUALIZER_NUM_OF_BANDS];
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-
-} XAEqualizerItfImpl;
-
-/** METHODS **/
-
-/* Base interface XAEqualizerItf implementation */
-XAresult XAEqualizerItfImpl_SetEnabled(XAEqualizerItf self,XAboolean enabled);
-
-XAresult XAEqualizerItfImpl_IsEnabled(XAEqualizerItf self, XAboolean *pEnabled);
-
-XAresult XAEqualizerItfImpl_GetNumberOfBands(XAEqualizerItf self,
-                                             XAuint16 *pNumBands);
-
-XAresult XAEqualizerItfImpl_GetBandLevelRange(XAEqualizerItf self,
-                                              XAmillibel *pMin,
-                                              XAmillibel *pMax);
-
-XAresult XAEqualizerItfImpl_SetBandLevel(XAEqualizerItf self, XAuint16 band,
-                                         XAmillibel level);
-
-XAresult XAEqualizerItfImpl_GetBandLevel(XAEqualizerItf self, XAuint16 band,
-                                         XAmillibel *pLevel);
-
-XAresult XAEqualizerItfImpl_GetCenterFreq(XAEqualizerItf self, XAuint16 band,
-                                          XAmilliHertz *pCenter);
-
-XAresult XAEqualizerItfImpl_GetBandFreqRange(XAEqualizerItf self, XAuint16 band,
-                                             XAmilliHertz *pMin,
-                                             XAmilliHertz *pMax);
-
-XAresult XAEqualizerItfImpl_GetBand(XAEqualizerItf self, XAmilliHertz frequency,
-                                    XAuint16 *pBand);
-
-XAresult XAEqualizerItfImpl_GetCurrentPreset(XAEqualizerItf self,
-                                             XAuint16 *pPreset);
-
-XAresult XAEqualizerItfImpl_UsePreset(XAEqualizerItf self, XAuint16 index);
-
-XAresult XAEqualizerItfImpl_GetNumberOfPresets(XAEqualizerItf self,
-                                               XAuint16 *pNumPresets);
-
-XAresult XAEqualizerItfImpl_GetPresetName(XAEqualizerItf self, XAuint16 index,
-                                          const XAchar **ppName);
-
-
-/* XAEqualizerItfImpl -specific methods */
-XAEqualizerItfImpl* XAEqualizerItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-
-void XAEqualizerItfImpl_Free(XAEqualizerItfImpl* self);
-
-#endif /* XAEQUALIZERITF_H */
--- a/khronosfws/openmax_al/src/common/xaimagecontrolsitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xaimagecontrolsitf.h"
-#include "xaimagecontrolsitfadaptation.h"
-
-/**
- * XAImageControlsItfImpl* GetImpl(XAVolumeItf self)
- * Description: Validated interface pointer and cast it to implementations pointer.
- **/
-static XAImageControlsItfImpl* GetImpl(XAImageControlsItf self)
-{
-    if(self)
-    {
-        XAImageControlsItfImpl* impl = (XAImageControlsItfImpl*)(*self);
-        if(impl && (impl == impl->self))
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAImageControlsItf implementation
- */
-
-/**
- * XAresult XAImageControlsItfImpl_SetBrightness(XAImageControlsItf self,
- *                                               XAuint32 brightness)
- * Description: Sets the brightness level.
- **/
-XAresult XAImageControlsItfImpl_SetBrightness(XAImageControlsItf self,
-                                              XAuint32 brightness)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageControlsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageControlsItfImpl_SetBrightness");
-
-    if(!impl || brightness > MAX_BRIGHTNESS_VALUE)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageControlsItfImpl_SetBrightness");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    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((XAAdaptationGstCtx*)impl->adapCtx, brightness);
-
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        impl->brightness = brightness;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAImageControlsItfImpl_SetBrightness");
-    return ret;
-}
-
-/**
- * XAresult XAImageControlsItfImpl_SetBrightness(XAImageControlsItf self,
- *                                               XAuint32 *pBrightness)
- * Description: Gets the current brightness level.
- **/
-XAresult XAImageControlsItfImpl_GetBrightness(XAImageControlsItf self,
-                                              XAuint32 *pBrightness)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageControlsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageControlsItfImpl_GetBrightness");
-
-    if(!impl || !pBrightness)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageControlsItfImpl_GetBrightness");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pBrightness = impl->brightness;
-
-    DEBUG_API("<-XAImageControlsItfImpl_GetBrightness");
-    return ret;
-}
-
-/**
- * XAresult XAImageControlsItfImpl_SetContrast(XAImageControlsItf self,
- *                                             XAint32 contrast)
- * Description: Sets the contrast level.
- **/
-XAresult XAImageControlsItfImpl_SetContrast(XAImageControlsItf self,
-                                            XAint32 contrast)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageControlsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageControlsItfImpl_SetContrast");
-
-    if(!impl || (contrast < MIN_CONTRAST_VALUE || contrast > MAX_CONTRAST_VALUE))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageControlsItfImpl_SetContrast");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    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((XAAdaptationGstCtx*)impl->adapCtx, contrast);
-
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        impl->contrast = contrast;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-   
-    DEBUG_API("<-XAImageControlsItfImpl_SetContrast");
-    return ret;
-}
-
-/**
- * XAresult XAImageControlsItfImpl_GetContrast(XAImageControlsItf self,
- *                                             XAint32 *pContrast)
- * Description: Gets the contrast level.
- **/
-XAresult XAImageControlsItfImpl_GetContrast(XAImageControlsItf self,
-                                            XAint32 *pContrast)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageControlsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageControlsItfImpl_GetContrast");
-
-    if(!impl || !pContrast)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageControlsItfImpl_GetContrast");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pContrast = impl->contrast;
-
-    DEBUG_API("<-XAImageControlsItfImpl_GetContrast");
-    return ret;
-}
-
-/**
- * XAresult XAImageControlsItfImpl_SetGamma(XAImageControlsItf self,
- *                                          XApermille gamma)
- * Description: Sets the gamma level.
- **/
-XAresult XAImageControlsItfImpl_SetGamma(XAImageControlsItf self,
-                                         XApermille gamma)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageControlsItfImpl* impl = GetImpl(self);
-    XApermille  minGammaValue = 0;
-    XApermille  maxGammaValue = 0;
-    XAuint32    numSettings = 0;
-    DEBUG_API("->XAImageControlsItfImpl_SetGamma");
-
-    /* check supported min and max gamma levels */
-    ret = XAImageControlsItfImpl_GetSupportedGammaSettings(self, &minGammaValue,
-                                                           &maxGammaValue, &numSettings, NULL);
-
-    if(!impl || (gamma < minGammaValue || gamma > maxGammaValue) ||
-       ret != XA_RESULT_SUCCESS)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageControlsItfImpl_SetGamma");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    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((XAAdaptationGstCtx*)impl->adapCtx, gamma);
-
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        impl->gamma = gamma;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAImageControlsItfImpl_SetGamma");
-    return ret;
-}
-
-/**
- * XAresult XAImageControlsItfImpl_GetGamma(XAImageControlsItf self,
- *                                          XApermille *pGamma)
- * Description: Gets the gamma level.
- **/
-XAresult XAImageControlsItfImpl_GetGamma(XAImageControlsItf self,
-                                         XApermille *pGamma)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageControlsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageControlsItfImpl_GetGamma");
-
-    if(!impl || !pGamma)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageControlsItfImpl_GetGamma");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pGamma = impl->gamma;
-
-    DEBUG_API("<-XAImageControlsItfImpl_GetGamma");
-    return ret;
-}
-
-/**
- * XAresult XAImageControlsItfImpl_GetSupportedGammaSettings(XAImageControlsItf self,
- *                                                           XApermille *pMinValue,
- *                                                           XApermille *pMaxValue,
- *                                                           XAuint32 *pNumSettings,
- *                                                           XApermille **ppSettings)
- * Description: This method gets the supported gamma settings.
- **/
-XAresult XAImageControlsItfImpl_GetSupportedGammaSettings(XAImageControlsItf self,
-                                                          XApermille *pMinValue,
-                                                          XApermille *pMaxValue,
-                                                          XAuint32 *pNumSettings,
-                                                          XApermille **ppSettings)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageControlsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageControlsItfImpl_GetSupportedGammaSettings");
-
-    if(!impl || !pMinValue || !pMaxValue || !pNumSettings)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageControlsItfImpl_GetSupportedGammaSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
- 
-    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
-    if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
-    {
-        DEBUG_API("<-XAImageControlsItfImpl_GetSupportedGammaSettings");
-        return ret;
-    }
-    /* if ppSettings is non-null and non-continuos from min and max gamma value is
-     * supported then pnunSettings is length of the ppSettings array. Else
-     * pNumSettings returns the number of supported gamma settings. */
-    if( ppSettings && pNumSettings != 0 )
-    {
-        /* solve array of supported gamma settings */
-        ret = XAImageControlsItfAdapt_GetSupportedGammaSettings((XAAdaptationGstCtx*)impl->adapCtx,
-                                                                pMinValue, pMaxValue,
-                                                                pNumSettings, ppSettings);
-    }
-    else
-    {
-        /* Solve min and max values and numSettings */
-        ret = XAImageControlsItfAdapt_GetSupportedGammaSettings((XAAdaptationGstCtx*)impl->adapCtx,
-                                                                pMinValue, pMaxValue,
-                                                                pNumSettings, NULL);
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAImageControlsItfImpl_GetSupportedGammaSettings");
-    return ret;
-}
-
-/**
- * XAImageControlsItfImpl -specific methods
- **/
-
-/**
- * XAImageControlsItfImplImpl* XAImageControlsItfImpl_Create()
- * @return  XAImageControlsItfImplImpl* - Pointer to  ImageControlsItf interface implementation
- **/
-XAImageControlsItfImpl* XAImageControlsItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
-{
-    XAImageControlsItfImpl* self = (XAImageControlsItfImpl*)
-        calloc(1,sizeof(XAImageControlsItfImpl));
-    DEBUG_API("->XAImageControlsItfImpl_Create");
-
-    if(self)
-    {
-        /* init itf default implementation */
-        self->itf.GetBrightness = XAImageControlsItfImpl_GetBrightness;
-        self->itf.GetContrast = XAImageControlsItfImpl_GetContrast;
-        self->itf.GetGamma = XAImageControlsItfImpl_GetGamma;
-        self->itf.GetSupportedGammaSettings = XAImageControlsItfImpl_GetSupportedGammaSettings;
-        self->itf.SetBrightness = XAImageControlsItfImpl_SetBrightness;
-        self->itf.SetContrast = XAImageControlsItfImpl_SetContrast;
-        self->itf.SetGamma = XAImageControlsItfImpl_SetGamma;
-
-        /* init variables */
-        self->brightness = DEFAULT_BRIGHTNESS_VALUE;
-        self->contrast = DEFAULT_CONTRAST_VALUE;
-        self->gamma = DEFAULT_GAMMA_VALUE;
-
-        self->adapCtx = adapCtx;
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAImageControlsItfImpl_Create");
-    return self;
-}
-
-/**
- * void XAImageControlsItfImpl_Free(XAImageControlsItfImpl* self)
- * @param  XAImageControlsItfImpl* self -
- **/
-void XAImageControlsItfImpl_Free(XAImageControlsItfImpl* self)
-{
-    DEBUG_API("->XAImageControlsItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAImageControlsItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/common/xaimagecontrolsitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +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 XAIMAGECONTROLSITF_H
-#define XAIMAGECONTROLSITF_H
-
-#include "xaadptbasectx.h"
-
-
-/** MACROS **/
-#define DEFAULT_BRIGHTNESS_VALUE    50
-#define DEFAULT_CONTRAST_VALUE      0
-#define DEFAULT_GAMMA_VALUE         1000
-#define MAX_BRIGHTNESS_VALUE        100
-#define MAX_CONTRAST_VALUE          100
-#define MIN_CONTRAST_VALUE         -100
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAImageControlsItf implementation */
-typedef struct XAImageControlsItfImpl_
-{
-    /* parent interface */
-    struct XAImageControlsItf_ itf;
-    /* pointer to self */
-    struct XAImageControlsItfImpl_* self;
-
-    /* variables */
-    XAuint32    brightness;
-    XAint32     contrast;
-    XApermille  gamma;
-
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-   
-
-} XAImageControlsItfImpl;
-
-/** METHODS **/
-
-XAresult XAImageControlsItfImpl_SetBrightness(XAImageControlsItf self,
-                                              XAuint32 brightness);
-
-XAresult XAImageControlsItfImpl_GetBrightness(XAImageControlsItf self,
-                                              XAuint32 *pBrightness);
-
-XAresult XAImageControlsItfImpl_SetContrast(XAImageControlsItf self,
-                                            XAint32 contrast);
-
-XAresult XAImageControlsItfImpl_GetContrast(XAImageControlsItf self,
-                                            XAint32 *pContrast);
-
-XAresult XAImageControlsItfImpl_SetGamma(XAImageControlsItf self,
-                                         XApermille gamma);
-
-XAresult XAImageControlsItfImpl_GetGamma(XAImageControlsItf self,
-                                         XApermille *pGamma);
-
-XAresult XAImageControlsItfImpl_GetSupportedGammaSettings(XAImageControlsItf self,
-                                                          XApermille *pMinValue,
-                                                          XApermille *pMaxValue,
-                                                          XAuint32 *pNumSettings,
-                                                          XApermille **ppSettings);
-
-/* XAImageControlsItfImpl -specific methods */
-XAImageControlsItfImpl* XAImageControlsItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-void XAImageControlsItfImpl_Free(XAImageControlsItfImpl* self);
-
-#endif /* XAIMAGECONTROLSITF_H */
--- a/khronosfws/openmax_al/src/common/xaimageeffectsitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xaimageeffectsitf.h"
-
-#include "xaimageeffectsitfadaptation.h"
-
-static XAImageEffectsItfImpl* GetImpl(XAImageEffectsItf self)
-{
-    if(self)
-    {
-        XAImageEffectsItfImpl* impl = (XAImageEffectsItfImpl*)(*self);
-        if(impl && (impl == impl->self))
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAImageEffectsItf implementation
- */
-
-/**
- * XAresult XAImageEffectsItfImpl_QuerySupportedImageEffects(XAImageEffectsItf self,
- *                                                           XAuint32 index,
- *                                                           XAuint32 *pImageEffectId)
- * Description: Queries image effects supported.
- **/
-XAresult XAImageEffectsItfImpl_QuerySupportedImageEffects(XAImageEffectsItf self,
-                                                          XAuint32 index,
-                                                          XAuint32 *pImageEffectId)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageEffectsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageEffectsItfImpl_QuerySupportedImageEffects");
-
-    if(!impl || !pImageEffectId)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageEffectsItfImpl_QuerySupportedImageEffects");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    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((XAAdaptationGstCtx*)impl->adapCtx, index,
-                                                            pImageEffectId);
-
-    if( ret == XA_RESULT_SUCCESS )
-    {
-        impl->index = index;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAImageEffectsItfImpl_QuerySupportedImageEffects");
-    return ret;
-}
-
-/**
- * XAresult XAImageEffectsItfImpl_EnableImageEffect(XAImageEffectsItf self,
- *                                                  XAuint32 imageEffectID
- * Description: Enables an image effect.
- **/
-XAresult XAImageEffectsItfImpl_EnableImageEffect(XAImageEffectsItf self,
-                                                 XAuint32 imageEffectID)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageEffectsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageEffectsItfImpl_EnableImageEffect");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageEffectsItfImpl_EnableImageEffect");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
- 
-    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((XAAdaptationGstCtx*)impl->adapCtx, imageEffectID);
-
-    if( ret == XA_RESULT_SUCCESS )
-    {
-        impl->imageEffectID = imageEffectID;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAImageEffectsItfImpl_EnableImageEffect");
-    return ret;
-}
-
-/**
- * XAresult XAImageEffectsItfImpl_DisableImageEffect(XAImageEffectsItf self,
- *                                                   XAuint32 imageEffectID)
- * Description: Disable an image effect.
- **/
-XAresult XAImageEffectsItfImpl_DisableImageEffect(XAImageEffectsItf self,
-                                                  XAuint32 imageEffectID)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageEffectsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageEffectsItfImpl_DisableImageEffect");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageEffectsItfImpl_DisableImageEffect");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    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((XAAdaptationGstCtx*)impl->adapCtx, imageEffectID);
-
-    if( ret == XA_RESULT_SUCCESS )
-    {
-        impl->imageEffectID = NO_IMAGE_EFFECTS;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAImageEffectsItfImpl_DisableImageEffect");
-    return ret;
-}
-
-/**
- * XAresult XAImageEffectsItfImpl_IsImageEffectEnabled(XAImageEffectsItf self,
- *                                                     XAuint32 imageEffectID,
- *                                                     XAboolean *pEnabled)
- * Description: Checks to see if an image effect is enabled.
- **/
-XAresult XAImageEffectsItfImpl_IsImageEffectEnabled(XAImageEffectsItf self,
-                                                    XAuint32 imageEffectID,
-                                                    XAboolean *pEnabled)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAImageEffectsItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAImageEffectsItfImpl_IsImageEffectEnabled");
-
-    if(!impl || !pEnabled)
-    {
-        DEBUG_ERR("XA_RESUT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XAImageEffectsItfImpl_IsImageEffectEnabled");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    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((XAAdaptationGstCtx*)impl->adapCtx, imageEffectID,
-                                                      pEnabled);
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAImageEffectsItfImpl_IsImageEffectEnabled");
-    return ret;
-}
-
-/**
- * XAImageEffectsItfImpl -specific methods
- **/
-
-/**
- * XAImageEffectsItfImplImpl* XAImageEffectsItfImpl_Create()
- * @return  XAImageEffectsItfImplImpl* - Pointer to  ImageEffectsItf interface implementation
- **/
-XAImageEffectsItfImpl* XAImageEffectsItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
-{
-    XAImageEffectsItfImpl* self = (XAImageEffectsItfImpl*)
-        calloc(1,sizeof(XAImageEffectsItfImpl));
-    DEBUG_API("->XAImageEffectsItfImpl_Create");
-    if(self)
-    {
-        /* init itf default implementation */
-        self->itf.DisableImageEffect = XAImageEffectsItfImpl_DisableImageEffect;
-        self->itf.EnableImageEffect = XAImageEffectsItfImpl_EnableImageEffect;
-        self->itf.IsImageEffectEnabled = XAImageEffectsItfImpl_IsImageEffectEnabled;
-        self->itf.QuerySupportedImageEffects = XAImageEffectsItfImpl_QuerySupportedImageEffects;
-
-        /* init variables */
-        self->enabled = XA_BOOLEAN_FALSE;
-        self->index = 0;
-        self->imageEffectID = NO_IMAGE_EFFECTS;
-        self->adapCtx = adapCtx;
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAImageEffectsItfImpl_Create");
-    return self;
-}
-
-/**
- * void XAImageEffectsItfImpl_Free(XAImageEffectsItfImpl* self)
- * @param  XAImageEffectsItfImpl* self -
- **/
-void XAImageEffectsItfImpl_Free(XAImageEffectsItfImpl* self)
-{
-    DEBUG_API("->XAImageEffectsItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAImageEffectsItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/common/xaimageeffectsitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +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 XAIMAGEEFFECTSITF_H
-#define XAIMAGEEFFECTSITF_H
-
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-#define NO_IMAGE_EFFECTS 0
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAImageEffectsItf implementation */
-typedef struct XAImageEffectsItfImpl_
-{
-    /* parent interface */
-    struct XAImageEffectsItf_ itf;
-    /* pointer to self */
-    struct XAImageEffectsItfImpl_* self;
-
-    /* variables */
-    XAuint32    index;
-    XAboolean   enabled;
-    XAuint32    imageEffectID;
-
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-
-
-} XAImageEffectsItfImpl;
-
-/** METHODS **/
-
-/* Base interface XAImageEffectsItf implementation */
-XAresult XAImageEffectsItfImpl_QuerySupportedImageEffects(XAImageEffectsItf self,
-                                                          XAuint32 index,
-                                                          XAuint32 *pImageEffectId);
-
-XAresult XAImageEffectsItfImpl_EnableImageEffect(XAImageEffectsItf self,
-                                                 XAuint32 imageEffectID);
-
-XAresult XAImageEffectsItfImpl_DisableImageEffect(XAImageEffectsItf self,
-                                                  XAuint32 imageEffectID);
-
-XAresult XAImageEffectsItfImpl_IsImageEffectEnabled(XAImageEffectsItf self,
-                                                    XAuint32 imageEffectID,
-                                                    XAboolean *pEnabled);
-
-   
-/* XAImageEffectsItfImpl -specific methods */
-XAImageEffectsItfImpl* XAImageEffectsItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-void XAImageEffectsItfImpl_Free(XAImageEffectsItfImpl* self);
-#endif /* XAIMAGEEFFECTSITF_H */
--- a/khronosfws/openmax_al/src/common/xametadataextractionitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xametadataextractionitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -150,7 +150,8 @@
     impl = GetImpl(self);
     if (!impl || !pKeySize)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
         return XA_RESULT_PARAMETER_INVALID;
         }
     *pKeySize = 0;
@@ -173,7 +174,8 @@
         /* check index and return unfiltered index */
         if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
             {
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
             return XA_RESULT_PARAMETER_INVALID;
             }
 
@@ -210,7 +212,8 @@
     impl = GetImpl(self);
     if (!impl || !pKey)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -235,7 +238,8 @@
         /* check index and return unfiltered index */
         if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
             {
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
             return XA_RESULT_PARAMETER_INVALID;
             }
 
@@ -284,7 +288,8 @@
     impl = GetImpl(self);
     if (!impl || !pValueSize)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
         return XA_RESULT_PARAMETER_INVALID;
         }
     *pValueSize = 0;
@@ -307,7 +312,8 @@
         /* check index and return unfiltered index */
         if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
             {
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
             return XA_RESULT_PARAMETER_INVALID;
             }
 
@@ -344,7 +350,8 @@
     impl = GetImpl(self);
     if (!impl || !pValue)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -368,7 +375,8 @@
         /* check index and return unfiltered index */
         if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
             {
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
             return XA_RESULT_PARAMETER_INVALID;
             }
 
@@ -433,7 +441,8 @@
 
     if (!impl)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_AddKeyFilter");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAMetadataExtractionItfImpl_AddKeyFilter");
         return XA_RESULT_PARAMETER_INVALID;
         }
     else
@@ -495,7 +504,8 @@
                 matchMask = 0;
                 }
             }
-        }DEBUG_API_A1("<-XAMetadataExtractionItfImpl_AddKeyFilter (%d)", (int)res);
+        }
+    DEBUG_API_A1("<-XAMetadataExtractionItfImpl_AddKeyFilter (%d)", (int)res);
     return res;
     }
 
@@ -627,7 +637,8 @@
     impl = (XAMetadataExtractionItfImpl*) pHandlerCtx;
     if (!impl)
         {
-        DEBUG_ERR("XAMetadataExtractionItfImp_AdaptCb, invalid context pointer!");DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
+        DEBUG_ERR("XAMetadataExtractionItfImp_AdaptCb, invalid context pointer!");
+        DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
         return;
         }
     if (event && event->eventid == XA_ADAPT_MDE_TAGS_AVAILABLE)
@@ -646,7 +657,8 @@
     else
         {
         DEBUG_INFO("unhandled");
-        }DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
+        }
+    DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
     }
 
 /* For given index over filtered array, return index over whole array
@@ -661,7 +673,8 @@
         XAint16 i = -1;
         if (oldidx >= impl->filteredcount)
             {
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-CheckAndUnfilterIndex");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-CheckAndUnfilterIndex");
             return XA_RESULT_PARAMETER_INVALID;
             }
         *newidx = 0;
@@ -678,7 +691,8 @@
             {
             /* should not end up here */
             *newidx = 0;
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-CheckAndUnfilterIndex");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-CheckAndUnfilterIndex");
             return XA_RESULT_PARAMETER_INVALID;
             }
         }
@@ -686,7 +700,8 @@
         {
         if (oldidx >= impl->currentTags.itemcount)
             {
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-CheckAndUnfilterIndex");
+            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+            DEBUG_API("<-CheckAndUnfilterIndex");
             return XA_RESULT_PARAMETER_INVALID;
             }
         *newidx = oldidx;
--- a/khronosfws/openmax_al/src/common/xametadatatraversalitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,303 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "xametadatatraversalitf.h"
-
-#include "xametadataadaptation.h"
-
-/* XAMetadataTraversalImpl* GetImpl(XAMetadataTraversalItf self)
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAMetadataTraversalImpl* GetImpl(XAMetadataTraversalItf self)
-{
-    if( self )
-    {
-        XAMetadataTraversalImpl* impl = (XAMetadataTraversalImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/*****************************************************************************
- * Base interface XAMetadataTraversalItf implementation
- *****************************************************************************/
-
-/* XAresult XAMetadataTraversalItfImpl_SetMode
- * Description: Sets the metadata traversal mode
- */
-XAresult XAMetadataTraversalItfImpl_SetMode(XAMetadataTraversalItf self,
-                                            XAuint32 mode)
-{
-    XAMetadataTraversalImpl *impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAMetadataTraversalItfImpl_SetMode");
-    impl = GetImpl(self);
-    /* check parameters */
-    if( !impl  ||
-       (mode!=XA_METADATATRAVERSALMODE_NODE &&
-        mode!=XA_METADATATRAVERSALMODE_ALL))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else if(impl->traversemode != mode)
-    {
-
-        res =XAMetadataTraversalItfAdapt_SetMode((XAAdaptationGstCtx*)impl->adaptCtx, mode);
-
-        if( res == XA_RESULT_SUCCESS )
-        {
-            impl->traversemode = mode;
-        }
-    }
-    else
-    {
-        /* do nothing */
-    }
-
-    DEBUG_API("<-XAMetadataTraversalItfImpl_SetMode");
-    return res;
-}
-
-/* XAresult XAMetadataTraversalItfImpl_GetChildCount
- * Description: Returns the number of children (nodes, streams, etc.) within the current scope
- */
-XAresult XAMetadataTraversalItfImpl_GetChildCount(XAMetadataTraversalItf self,
-                                                  XAuint32 *pCount)
-{
-    XAMetadataTraversalImpl *impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAMetadataTraversalItfImpl_GetChildCount");
-    impl = GetImpl(self);
-    if( !impl || !pCount )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        if(impl->traversemode==XA_METADATATRAVERSALMODE_ALL)
-        {
-            /* for this mode, child count is always 0 */
-            *pCount = 0;
-            res = XA_RESULT_SUCCESS;
-        }
-        else
-        {
-
-            res = XAMetadataTraversalItfAdapt_GetChildCount((XAAdaptationGstCtx*)impl->adaptCtx, pCount);
-
-        }
-    }
-
-    DEBUG_API("<-XAMetadataTraversalItfImpl_GetChildCount");
-    return res;
-}
-
-/* XAresult XAMetadataTraversalItfImpl_GetChildMIMETypeSize
- * Description: Returns the size in bytes needed to store the MIME type of a child
- */
-XAresult XAMetadataTraversalItfImpl_GetChildMIMETypeSize(XAMetadataTraversalItf self,
-                                                         XAuint32 index,
-                                                         XAuint32 *pSize)
-{
-    XAMetadataTraversalImpl *impl = NULL;
-
-    XAuint32 chCount = 0;
-  
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAMetadataTraversalItfImpl_GetChildMIMETypeSize");
-    impl = GetImpl(self);
-
-    if( !impl || !pSize)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-
-        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((XAAdaptationGstCtx*)impl->adaptCtx, index, pSize);
-
-    }
-
-    DEBUG_API("<-XAMetadataTraversalItfImpl_GetChildMIMETypeSize");
-    return res;
-}
-
-/* XAresult XAMetadataTraversalItfImpl_GetChildInfo
- * Description: Returns information about a child
- */
-XAresult XAMetadataTraversalItfImpl_GetChildInfo(XAMetadataTraversalItf self,
-                                                 XAuint32 index,
-                                                 XAint32 *pNodeID,
-                                                 XAuint32 *pType,
-                                                 XAuint32 size,
-                                                 XAchar *pMimeType)
-{
-    XAMetadataTraversalImpl *impl = NULL;
-
-    XAuint32 chCount = 0;
-
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAMetadataTraversalItfImpl_GetChildInfo");
-    impl = GetImpl(self);
-    if( !impl || !pNodeID || !pType )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-
-        res = XAMetadataTraversalItfAdapt_GetChildCount((XAAdaptationGstCtx*)impl->adaptCtx, &chCount);
-        if(index >= chCount || res != XA_RESULT_SUCCESS)
-        {
-            /* out of bounds */
-            DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-            DEBUG_API("<-XAMetadataTraversalItfImpl_GetChildInfo");
-            return XA_RESULT_PARAMETER_INVALID;
-        }
-        res = XAMetadataTraversalItfAdapt_GetChildInfo((XAAdaptationGstCtx*)impl->adaptCtx, index,
-                                                pNodeID, pType, size, pMimeType);
-
-    }
-
-    DEBUG_API("<-XAMetadataTraversalItfImpl_GetChildInfo");
-    return res;
-}
-
-/* XAresult XAMetadataTraversalItfImpl_SetActiveNode
- * Description: Sets the scope to a child node
- */
-XAresult XAMetadataTraversalItfImpl_SetActiveNode(XAMetadataTraversalItf self,
-                                                  XAuint32 index)
-{
-    XAMetadataTraversalImpl *impl = NULL;
-
-    XAuint32 chCount = 0;
-
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAMetadataTraversalItfImpl_SetActiveNode");
-    impl = GetImpl(self);
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-
-        res = XAMetadataTraversalItfAdapt_GetChildCount((XAAdaptationGstCtx*)impl->adaptCtx, &chCount);
-        if( res == XA_RESULT_SUCCESS )
-        {
-            if((impl->nodedepth==0 && index==XA_NODE_PARENT) ||
-                (index >= chCount && index!=XA_NODE_PARENT))
-            {
-                /* try to ascend from root or descend to nonexistend child node */
-                res = XA_RESULT_PARAMETER_INVALID;
-            }
-            else
-            {
-                /* update node and childs */
-                res = XAMetadataTraversalItfAdapt_SetActiveNode((XAAdaptationGstCtx*)impl->adaptCtx, index);
-                if( res == XA_RESULT_SUCCESS )
-                {
-                    if(index==XA_NODE_PARENT)
-                    {
-                        impl->nodedepth++;
-                    }
-                    else
-                    {
-                        impl->nodedepth--;
-                    }
-                }
-            }
-        }
-        else
-        {
-            DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
-            DEBUG_API("<-XAMetadataTraversalItfImpl_SetActiveNode");
-            return XA_RESULT_INTERNAL_ERROR;
-        }
-      
-    }
-
-    DEBUG_API("<-XAMetadataTraversalItfImpl_SetActiveNode");
-    return res;
-}
-
-/*****************************************************************************
- * XAMetadataTraversalImpl -specific methods
- *****************************************************************************/
-
-/* XAMetadataTraversalImpl* XAMetadataTraversalItfImpl_Create()
- * Description: Allocate and initialize XAMetadataTraversalImpl
- */
-XAMetadataTraversalImpl* XAMetadataTraversalItfImpl_Create( XAAdaptationBaseCtx *adaptCtx )
-{
-    XAMetadataTraversalImpl *self = NULL;
-    DEBUG_API("->XAMetadataTraversalItfImpl_Create");
-
-    self = (XAMetadataTraversalImpl*) calloc(1,sizeof(XAMetadataTraversalImpl));
-
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.SetMode = XAMetadataTraversalItfImpl_SetMode;
-        self->itf.GetChildCount = XAMetadataTraversalItfImpl_GetChildCount;
-        self->itf.GetChildMIMETypeSize = XAMetadataTraversalItfImpl_GetChildMIMETypeSize;
-        self->itf.GetChildInfo = XAMetadataTraversalItfImpl_GetChildInfo;
-        self->itf.SetActiveNode = XAMetadataTraversalItfImpl_SetActiveNode;
-
-        /* init variables */
-        self->adaptCtx = adaptCtx;
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAMetadataTraversalItfImpl_Create");
-    return self;
-}
-
-/* void XAMetadataTraversalItfImpl_Free(XAMetadataTraversalImpl* self)
- * Description: Free all resources reserved at XAMetadataTraversalItfImpl_Create
- */
-void XAMetadataTraversalItfImpl_Free(XAMetadataTraversalImpl* self)
-{
-    DEBUG_API("->XAMetadataTraversalItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAMetadataTraversalItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/common/xametadatatraversalitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +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 XAMETADATATRAVERSALITF_H
-#define XAMETADATATRAVERSALITF_H
-
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAMetadataTraversalItf implementation */
-typedef struct XAMetadataTraversalImpl_
-{
-    /* parent interface */
-    struct XAMetadataTraversalItf_ itf;
-    /* pointer to self */
-    struct XAMetadataTraversalImpl_* self;
-
-    /* pointer to metadata variables */
-    XAuint32 traversemode;
-    XAuint32 index;
-    XAuint32 nodedepth;
-
-
-    XAAdaptationBaseCtx *adaptCtx;
-
-} XAMetadataTraversalImpl;
-
-/** METHODS **/
-
-/* Base interface XAMetadataTraversalItf implementation */
-XAresult XAMetadataTraversalItfImpl_SetMode(XAMetadataTraversalItf self,
-                                          XAuint32 mode);
-
-XAresult XAMetadataTraversalItfImpl_GetChildCount(XAMetadataTraversalItf self,
-                                                XAuint32 *pCount);
-
-XAresult XAMetadataTraversalItfImpl_GetChildMIMETypeSize(XAMetadataTraversalItf self,
-                                                       XAuint32 index,
-                                                       XAuint32 *pSize);
-
-XAresult XAMetadataTraversalItfImpl_GetChildInfo(XAMetadataTraversalItf self,
-                                               XAuint32 index,
-                                               XAint32 *pNodeID,
-                                               XAuint32 *pType,
-                                               XAuint32 size,
-                                               XAchar *pMimeType);
-
-XAresult XAMetadataTraversalItfImpl_SetActiveNode(XAMetadataTraversalItf self,
-                                                XAuint32 index);
-
-
-/* XAMetadataExtractionItfImpl -specific methods */
-XAMetadataTraversalImpl* XAMetadataTraversalItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-void XAMetadataTraversalItfImpl_Free(XAMetadataTraversalImpl* self);
-
-#endif /* XAMETADATATRAVERSALITF_H */
--- a/khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -126,7 +126,8 @@
 
     if (!impl || !percentage)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetVolumeLevel");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetVolumeLevel");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -163,7 +164,8 @@
 
     if (!impl || !pStepCount)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -294,7 +296,8 @@
 
     if (!impl && !event)
         {
-        DEBUG_ERR("XANokiaLinearVolumeItfImpl_AdaptCb, invalid context pointer!");DEBUG_API("<-XANokiaLinearVolumeItfImpl_AdaptCb");
+        DEBUG_ERR("XANokiaLinearVolumeItfImpl_AdaptCb, invalid context pointer!");
+        DEBUG_API("<-XANokiaLinearVolumeItfImpl_AdaptCb");
         return;
         }
     
@@ -312,5 +315,6 @@
     else
         {
         /* do nothing */
-        }DEBUG_API("<-XANokiaLinearVolumeItfimpl_AdaptCb");
+        }
+    DEBUG_API("<-XANokiaLinearVolumeItfimpl_AdaptCb");
     }
--- a/khronosfws/openmax_al/src/common/xanokiavolumeextitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanokiavolumeextitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -91,14 +91,16 @@
     if (XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(self, &maximumLevel)
             != XA_RESULT_SUCCESS)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
+        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");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -122,7 +124,8 @@
 
     if (!impl || !pLevel)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetVolumeLevel");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetVolumeLevel");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -146,7 +149,8 @@
 
     if (!impl || !pMaxLevel)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMaxVolumeLevel");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMaxVolumeLevel");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -170,7 +174,8 @@
 
     if (!impl)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -211,7 +216,8 @@
 
     if (!impl || !pMute)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMute");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMute");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -235,7 +241,8 @@
 
     if (!impl)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -281,7 +288,8 @@
 
     if (!impl || !pEnable)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -307,7 +315,8 @@
     if (!impl || (stereoPosition < STEREO_POSITION_LEFT) || (stereoPosition
             > STEREO_POSITION_RIGHT))
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -351,7 +360,8 @@
 
     if (!impl || !pStereoPosition)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetStereoPosition");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_GetStereoPosition");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -486,7 +496,8 @@
 
     if (!impl)
         {
-        DEBUG_ERR("XANokiaVolumeExtItfImpl_AdaptCb, invalid context pointer!");DEBUG_API("<-XANokiaVolumeExtItfImpl_AdaptCb");
+        DEBUG_ERR("XANokiaVolumeExtItfImpl_AdaptCb, invalid context pointer!");
+        DEBUG_API("<-XANokiaVolumeExtItfImpl_AdaptCb");
         return;
         }
     assert(event);
--- a/khronosfws/openmax_al/src/common/xaobjectitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaobjectitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -80,7 +80,8 @@
             {
             retval = pObjImp->DoRealizeImpl(self);
             }
-        }DEBUG_API("<-XAObjectItfImpl_Realize");
+        }
+    DEBUG_API("<-XAObjectItfImpl_Realize");
     return retval;
     }
 
@@ -132,7 +133,8 @@
             {
             retval = pObjImp->DoResumeImpl(self);
             }
-        }DEBUG_API("<-XAObjectItfImpl_Resume");
+        }
+    DEBUG_API("<-XAObjectItfImpl_Resume");
     return retval;
     }
 
--- a/khronosfws/openmax_al/src/common/xastreaminformationitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xastreaminformationitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -18,7 +18,7 @@
 #include <assert.h>
 
 #include "xastreaminformationitf.h"
-#include "xastreaminformationitfadaptation.h"
+
 #include "xastreaminformationitfadaptationmmf.h"
 
 /* XAStreamInformationItfImpl* GetImpl
@@ -56,20 +56,7 @@
         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
+    if (impl->adapCtx->fwtype == FWMgrFWMMF)
         {
         ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
         if (ret == XA_RESULT_PARAMETER_INVALID)
@@ -81,7 +68,6 @@
                 impl->adapCtx, &(info->containerType),
                 &(info->mediaDuration), &(info->numStreams));
         XAAdaptationBase_ThreadExit(impl->adapCtx);
-        ;
         }
 
     DEBUG_API("-<XAStreamInformationItfImpl_QueryMediaContainerInformation");
@@ -101,21 +87,7 @@
         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
+    if (impl->adapCtx->fwtype == FWMgrFWMMF)
         {
         ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
         if (ret == XA_RESULT_PARAMETER_INVALID)
@@ -128,8 +100,8 @@
                 streamIndex, domain);
 
         XAAdaptationBase_ThreadExit(impl->adapCtx);
-        ;
-        }DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamType");
+        }
+    DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamType");
     return ret;
     }
 
@@ -147,21 +119,7 @@
         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
+    if (impl->adapCtx->fwtype == FWMgrFWMMF)
         {
         ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
         if (ret == XA_RESULT_PARAMETER_INVALID)
@@ -174,7 +132,6 @@
                 impl->adapCtx, streamIndex, info);
 
         XAAdaptationBase_ThreadExit(impl->adapCtx);
-        ;
         }
 
     DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamInformation");
@@ -196,21 +153,7 @@
         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
+    if (impl->adapCtx->fwtype == FWMgrFWMMF)
         {
         ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
         if (ret == XA_RESULT_PARAMETER_INVALID)
@@ -223,8 +166,8 @@
                 streamIndex, pNameSize, pName);
 
         XAAdaptationBase_ThreadExit(impl->adapCtx);
-        ;
-        }DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamName");
+        }
+    DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamName");
     return ret;
     }
 
@@ -276,25 +219,10 @@
             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");
@@ -316,21 +244,7 @@
         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
+    if (impl->adapCtx->fwtype == FWMgrFWMMF)
         {
         ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
         if (ret == XA_RESULT_PARAMETER_INVALID)
@@ -343,7 +257,6 @@
                 streamNum, active, commitNow);
 
         XAAdaptationBase_ThreadExit(impl->adapCtx);
-        ;
         }
 
     DEBUG_API("-<XAStreamInformationItfImpl_SetActiveStream");
--- a/khronosfws/openmax_al/src/common/xathreadsafety.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xathreadsafety.c	Wed Aug 18 10:17:22 2010 +0300
@@ -44,7 +44,8 @@
                 sizeof(XAThreadSafetyImpl));
         if (!threadSafety)
             {
-            DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");DEBUG_API("<-XAThreadSafety_Init");
+            DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
+            DEBUG_API("<-XAThreadSafety_Init");
             /* memory allocation failed */
             return XA_RESULT_MEMORY_FAILURE;
             }
@@ -59,7 +60,8 @@
                 if (ret != XA_RESULT_SUCCESS)
                     {
                     break;
-                    }DEBUG_INFO_A2("Created %s:%x",MEDIAOBJECTNAME(i), threadSafety->mutexTable[i] );
+                    }
+                DEBUG_INFO_A2("Created %s:%x",MEDIAOBJECTNAME(i), threadSafety->mutexTable[i] );
                 }
             }
         else
@@ -129,7 +131,8 @@
     else
         {
         DEBUG_INFO("Thread safety: disabled.");
-        }DEBUG_API("<-XAThreadSafety_Unlock");
+        }
+    DEBUG_API("<-XAThreadSafety_Unlock");
     return ret;
     }
 /*
--- a/khronosfws/openmax_al/src/common/xathreadsafety.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xathreadsafety.h	Wed Aug 18 10:17:22 2010 +0300
@@ -25,16 +25,12 @@
 #ifdef _DEBUG
 /*parse media object names for debug prints*/
 
-static const char* mediaobjectnames[9] =
+static const char* mediaobjectnames[5] =
     {
             "XATSMediaPlayer",
             "XATSMediaRecorder",
             "XATSEngine",
             "XATSRadio",
-            "XATSCamera",
-            "XATSOutputMix",
-            "XATSVibra",
-            "XATSLEDArray",
             "XATSMetaDataExtractor"
     };
 #define MEDIAOBJECTNAME(i) ((i<XATSCount)?mediaobjectnames[i]:"INVALID")
@@ -144,10 +140,6 @@
     XATSMediaRecorder,
     XATSEngine,
     XATSRadio,
-    XATSCamera,
-    XATSOutputMix,
-    XATSVibra,
-    XATSLEDArray,
     XATSMetaDataExtractor,
     XATSCount
     } XAThreadSafetyMediaObjects;
--- a/khronosfws/openmax_al/src/common/xavideopostprocessingitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,359 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xavideopostprocessingitf.h"
- 
-#include "xavideopostprosessingitfadaptation.h"
-
-/**
- * XAVideoPostProcessingItfImpl* GetImpl(XAVideoPostProcessingItf self)
- * Description: Validated interface pointer and cast it to implementations pointer.
- **/
-static XAVideoPostProcessingItfImpl* GetImpl(XAVideoPostProcessingItf self)
-{
-    if(self)
-    {
-        XAVideoPostProcessingItfImpl* impl = (XAVideoPostProcessingItfImpl*)(*self);
-        if(impl && (impl == impl->self))
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAVideoPostProcessingItf implementation
- */
-
-/**
- * XAresult XAVideoPostProcessingItfImpl_SetRotation(XAVideoPostProcessingItf self,
- *                                                   XAmillidegree rotation)
- * Description: Sets post-prosessing options for rotation.
- **/
-XAresult XAVideoPostProcessingItfImpl_SetRotation(XAVideoPostProcessingItf self,
-                                                  XAmillidegree rotation)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
-    XAboolean isSupported = XA_BOOLEAN_FALSE;
-    DEBUG_API("->XAVideoPostProcessingItfImpl_SetRotation");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoPostProcessingItfImpl_SetRotation");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* Check is arbitrary rotation supported */
-    ret = XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported( self, &isSupported );
-
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        if( isSupported == XA_BOOLEAN_FALSE )
-        {
-            /* check that wanted angle is integer multiple of 90 degrees */
-            if( rotation % 90000 != 0 )
-            {
-                /* feature unsupported */
-                ret = XA_RESULT_FEATURE_UNSUPPORTED;
-                return ret;
-            }
-        }
-
-        impl->rotation = rotation;
-        impl->isRotate = XA_BOOLEAN_TRUE;
-    }
-
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_SetRotation");
-    return ret;
-}
-
-/**
- * XAresult XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported(XAVideoPostProcessingItf self,
- *                                                                    XAboolean *pSupported)
- * Description: Determines if arbitrary rotation angles are supported by the implementation.
- */
-XAresult XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported(XAVideoPostProcessingItf self,
-                                                                   XAboolean *pSupported)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported");
-    if(!impl || !pSupported)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported");
-        /* 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("<-XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported");
-    	return ret;
-    }
-
-    ret = XAVideoPostProcessingItfAdapt_IsArbitraryRotationSupported((XAAdaptationGstCtx*)impl->adapCtx,
-                                                                     pSupported);
-
-    if(ret == XA_RESULT_SUCCESS)
-    {
-        impl->supported = *pSupported;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported");
-    return ret;
-}
-
-/**
- * XAresult XAVideoPostProcessingItfImpl_SetScaleOptions(XAVideoPostProcessingItf self,
- *                                                       XAuint32 scaleOptions,
- *                                                       XAuint32 backgroundColor,
- *                                                       XAuint32 renderingHints)
- * Description: Sets the options for scaling
- */
-XAresult XAVideoPostProcessingItfImpl_SetScaleOptions(XAVideoPostProcessingItf self,
-                                                      XAuint32 scaleOptions,
-                                                      XAuint32 backgroundColor,
-                                                      XAuint32 renderingHints)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVideoPostProcessingItfImpl_SetScaleOptions");
-
-    if(!impl || (scaleOptions != XA_VIDEOSCALE_STRETCH && scaleOptions != XA_VIDEOSCALE_FIT
-        && scaleOptions != XA_VIDEOSCALE_CROP))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoPostProcessingItfImpl_SetScaleOptions");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->scaleOptions = scaleOptions;
-    impl->backgroundColor = backgroundColor;
-    impl->renderingHints = renderingHints;
-    impl->isScaleOptions = XA_BOOLEAN_TRUE;
-
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_SetScaleOptions");
-    return ret;
-}
-
-/**
- * XAresult XAVideoPostProcessingItfImpl_SetSourceRectangle(XAVideoPostProcessingItf self,
- *                                                          const XARectangle *pSrcRect)
- * Description: Defines the rectangle in the original frame that is to be used for further processing
- */
-XAresult XAVideoPostProcessingItfImpl_SetSourceRectangle(XAVideoPostProcessingItf self,
-                                                         const XARectangle *pSrcRect)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVideoPostProcessingItfImpl_SetSourceRectangle");
-
-    if(!impl || !pSrcRect)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoPostProcessingItfImpl_SetSourceRectangle");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->srcRect = *pSrcRect;
-    impl->isSrcRect = XA_BOOLEAN_TRUE;
-
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_SetSourceRectangle");
-    return ret;
-}
-
-/**
- * XAresult XAVideoPostProcessingItfImpl_SetDestinationRectangle(XAVideoPostProcessingItf self,
- *                                                               const XARectangle *pDestRect)
- *
- * Description:  Defines the destination rectangle for the processed frame. This rectangle,
- * in conjunction with the scaling options used  (fit, crop, stretch) determines
- * the scaling applied to the frame.
- */
-XAresult XAVideoPostProcessingItfImpl_SetDestinationRectangle(XAVideoPostProcessingItf self,
-                                                              const XARectangle *pDestRect)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVideoPostProcessingItfImpl_SetDestinationRectangle");
-
-    if(!impl || !pDestRect)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoPostProcessingItfImpl_SetDestinationRectangle");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->destRect = *pDestRect;
-    impl->isDestRect = XA_BOOLEAN_TRUE;
-
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_SetDestinationRectangle");
-    return ret;
-}
-
-/**
- * XAresult XAVideoPostProcessingItfImpl_SetMirror(XAVideoPostProcessingItf self,
- *                                                 XAuint32 mirror)
- * Description: Sets post-prosessing options for mirroring.
- */
-XAresult XAVideoPostProcessingItfImpl_SetMirror(XAVideoPostProcessingItf self,
-                                                XAuint32 mirror)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVideoPostProcessingItfImpl_SetMirror");
-
-    if(!impl || (mirror != XA_VIDEOMIRROR_NONE && mirror != XA_VIDEOMIRROR_VERTICAL
-       && mirror != XA_VIDEOMIRROR_HORIZONTAL && mirror != XA_VIDEOMIRROR_BOTH ))
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoPostProcessingItfImpl_SetMirror");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->mirror = mirror;
-    impl->isMirror = XA_BOOLEAN_TRUE;
-
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_SetMirror");
-    return ret;
-}
-
-/**
- * XAresult XAVideoPostProcessingItfImpl_Commit(XAVideoPostProcessingItf self)
- * Description: Commit all video post-processing changes since the last Commit().
- */
-XAresult XAVideoPostProcessingItfImpl_Commit(XAVideoPostProcessingItf self)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVideoPostProcessingItfImpl_Commit");
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoPostProcessingItfImpl_Commit");
-        /* 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("<-XAVideoPostProcessingItfImpl_Commit");
-    	return ret;
-    }
-
-    ret = XAVideoPostProcessingItfAdapt_Commit((XAAdaptationGstCtx*)impl->adapCtx,
-                                               impl->rotation,
-                                               impl->scaleOptions,
-                                               impl->backgroundColor,
-                                               impl->renderingHints,
-                                               &impl->srcRect,
-                                               &impl->destRect,
-                                               impl->mirror,
-                                               impl->isMirror,
-                                               impl->isRotate,
-                                               impl->isDestRect,
-											   impl->isSrcRect,
-											   impl->isScaleOptions);
-
-    if( ret == XA_RESULT_SUCCESS )
-    {
-        impl->isMirror = XA_BOOLEAN_FALSE;
-        impl->isRotate = XA_BOOLEAN_FALSE;
-		impl->isDestRect = XA_BOOLEAN_FALSE;
-		impl->isSrcRect = XA_BOOLEAN_FALSE;
-		impl->isScaleOptions = XA_BOOLEAN_FALSE;
-    }
-
-    XAAdaptationBase_ThreadExit(impl->adapCtx);
-  
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_Commit");
-    return ret;
-}
-
-/**
- * XAVideoPostProcessingItfImpl -specific methods
- **/
-/**
- * XAVideoPostProcessingItfImpl* XAVideoPostProcessingItfImpl_Create()
- * @return  XAVideoPostProcessingItfImpl* - Pointer to  VideoPostProcessingItf interface implementation
- **/
-XAVideoPostProcessingItfImpl* XAVideoPostProcessingItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
-{
-    XAVideoPostProcessingItfImpl* self = (XAVideoPostProcessingItfImpl*)
-        calloc(1,sizeof(XAVideoPostProcessingItfImpl));
-    DEBUG_API("->XAVideoPostProcessingItfImpl_Create");
-    if(self)
-    {
-        XARectangle emptyRect = {0,0,0,0};
-        /* init itf default implementation */
-        self->itf.Commit = XAVideoPostProcessingItfImpl_Commit;
-        self->itf.IsArbitraryRotationSupported = XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported;
-        self->itf.SetDestinationRectangle = XAVideoPostProcessingItfImpl_SetDestinationRectangle;
-        self->itf.SetMirror = XAVideoPostProcessingItfImpl_SetMirror;
-        self->itf.SetRotation = XAVideoPostProcessingItfImpl_SetRotation;
-        self->itf.SetScaleOptions = XAVideoPostProcessingItfImpl_SetScaleOptions;
-        self->itf.SetSourceRectangle = XAVideoPostProcessingItfImpl_SetSourceRectangle;
-
-        /* init variables */
-        self->rotation = 0;
-        self->scaleOptions = XA_VIDEOSCALE_FIT;
-        self->mirror = XA_VIDEOMIRROR_NONE;
-        self->backgroundColor = 0;
-        self->renderingHints = XA_RENDERINGHINT_NONE;
-        self->adapCtx = adapCtx;
-        self->srcRect = emptyRect;
-        self->destRect = emptyRect;
-        self->isMirror = XA_BOOLEAN_FALSE;
-        self->isRotate = XA_BOOLEAN_FALSE;
-        self->isDestRect = XA_BOOLEAN_FALSE;
-        self->isSrcRect = XA_BOOLEAN_FALSE;
-        self->isScaleOptions = XA_BOOLEAN_FALSE;
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_Create");
-    return self;
-}
-
-/**
- * void XAVideoPostProcessingItfImpl_Free(XAVideoPostProcessingItfImpl* self);
- * @param  XAVideoPostProcessingItfImpl* self -
- **/
-void XAVideoPostProcessingItfImpl_Free(XAVideoPostProcessingItfImpl* self)
-{
-    DEBUG_API("->XAVideoPostProcessingItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAVideoPostProcessingItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/common/xavideopostprocessingitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +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 XAVIDEOPOSTPROCESSINGITF_H
-#define XAVIDEOPOSTPROCESSINGITF_H
-
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAVideoPostProcessingItf implementation */
-typedef struct XAVideoPostProcessingItfImpl_
-{
-    /* parent interface */
-    struct XAVideoPostProcessingItf_ itf;
-    /* pointer to self */
-    struct XAVideoPostProcessingItfImpl_* self;
-
-    /* variables */
-    XAboolean       supported;
-    XARectangle     srcRect;
-    XARectangle     destRect;
-    XAuint32        scaleOptions;
-    XAuint32        backgroundColor;
-    XAuint32        renderingHints;
-    XAuint32        mirror;
-    XAmillidegree   rotation;
-    XAboolean       isRotate;
-    XAboolean       isMirror;
-    XAboolean		isDestRect;
-    XAboolean		isSrcRect;
-    XAboolean		isScaleOptions;
-
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-
-} XAVideoPostProcessingItfImpl;
-
-/** METHODS **/
-
-/* Base interface XAVideoPostProcessingItf implementation */
-XAresult XAVideoPostProcessingItfImpl_SetRotation(XAVideoPostProcessingItf self,
-                                                  XAmillidegree rotation);
-
-XAresult XAVideoPostProcessingItfImpl_IsArbitraryRotationSupported(XAVideoPostProcessingItf self,
-                                                                   XAboolean *pSupported);
-
-XAresult XAVideoPostProcessingItfImpl_SetScaleOptions(XAVideoPostProcessingItf self,
-                                                      XAuint32 scaleOptions,
-                                                      XAuint32 backgroundColor,
-                                                      XAuint32 renderingHints);
-
-XAresult XAVideoPostProcessingItfImpl_SetSourceRectangle(XAVideoPostProcessingItf self,
-                                                         const XARectangle *pSrcRect);
-
-XAresult XAVideoPostProcessingItfImpl_SetDestinationRectangle(XAVideoPostProcessingItf self,
-                                                              const XARectangle *pDestRect);
-
-XAresult XAVideoPostProcessingItfImpl_SetMirror(XAVideoPostProcessingItf self,
-                                                XAuint32 mirror);
-
-XAresult XAVideoPostProcessingItfImpl_Commit(XAVideoPostProcessingItf self);
- 
-/* XAVideoPostProcessingItfImpl -specific methods */
-XAVideoPostProcessingItfImpl* XAVideoPostProcessingItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-void XAVideoPostProcessingItfImpl_Free(XAVideoPostProcessingItfImpl* self);
-
-#endif /* XAVIDEOPOSTPROCESSINGITF_H */
--- a/khronosfws/openmax_al/src/common/xavolumeitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xavolumeitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -21,7 +21,6 @@
 
 #include "xavolumeitf.h"
 
-#include "xavolumeitfadaptation.h"
 #include "xanokiavolumeextitfadaptationmmf.h"
 /**
  * XAVolumeItfImpl* GetImpl(XAVolumeItf self)
@@ -81,15 +80,6 @@
         DEBUG_API("<-XAVolumeItfImpl_SetVolumeLevel");
         return ret;
         }
-    if (impl->adapCtx->fwtype == FWMgrFWGST)
-        {
-        ret = XAVolumeItfAdapt_SetVolumeLevel(
-                (XAAdaptationGstCtx*) impl->adapCtx, level);
-        }
-    else
-        {
-        impl->volumeLevel = level;
-        }
 
     if (ret == XA_RESULT_SUCCESS)
         {
@@ -152,15 +142,7 @@
         DEBUG_API("<-XAVolumeItfImpl_GetMaxVolumeLevel");
         return ret;
         }
-    if (impl->adapCtx->fwtype == FWMgrFWGST)
-        {
-        ret = XAVolumeItfAdapt_GetMaxVolumeLevel(
-                (XAAdaptationGstCtx*) impl->adapCtx, pMaxLevel);
-        }
-    else
-        {
-        *pMaxLevel = MAX_SUPPORT_VOLUME_LEVEL;
-        }
+    *pMaxLevel = MAX_SUPPORT_VOLUME_LEVEL;
 
     XAAdaptationBase_ThreadExit(impl->adapCtx);
 
@@ -201,11 +183,6 @@
             ret = XANokiaVolumeExtItfAdapt_SetMute(
                     (XAAdaptationMMFCtx*) impl->adapCtx, mute);
             }
-        else
-            {
-            ret = XAVolumeItfAdapt_SetMute(
-                    (XAAdaptationGstCtx*) impl->adapCtx, mute);
-            }
 
         if (ret == XA_RESULT_SUCCESS)
             {
@@ -272,12 +249,7 @@
     /* Check is stereo position state changed */
     if (enable != impl->enableStereoPos)
         {
-        if (impl->adapCtx->fwtype == FWMgrFWGST)
-            {
-            ret = XAVolumeItfAdapt_EnableStereoPosition(
-                    (XAAdaptationGstCtx*) impl->adapCtx, enable);
-            }
-        else
+        if (impl->adapCtx->fwtype == FWMgrFWMMF)
             {
             ret = XANokiaVolumeExtItfAdapt_EnableStereoPosition(
                     (XAAdaptationMMFCtx*) impl->adapCtx, enable);
@@ -353,12 +325,7 @@
     /* check is stereo position effect enabled if is then handle effect */
     if (impl->enableStereoPos)
         {
-        if (impl->adapCtx->fwtype == FWMgrFWGST)
-            {
-            ret = XAVolumeItfAdapt_SetStereoPosition(
-                    (XAAdaptationGstCtx*) impl->adapCtx, stereoPosition);
-            }
-        else
+        if (impl->adapCtx->fwtype == FWMgrFWMMF)
             {
             ret = XANokiaVolumeExtItfAdapt_SetStereoPosition(
                     (XAAdaptationMMFCtx*) impl->adapCtx, stereoPosition);
--- a/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +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: Audio Encoder Capabilities Interface Implementation
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#include "xaglobals.h"
-#include "xaadptbasectx.h"
-#include "xaaudiodecodercapabilitiesitf.h"
-#include "xacapabilitiesmgr.h"
-/* XAAudioDecoderCapabilitiesItfImpl* GetImpl
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAAudioDecoderCapabilitiesItfImpl* GetImpl(
-        XAAudioDecoderCapabilitiesItf self)
-    {
-    if (self)
-        {
-        XAAudioDecoderCapabilitiesItfImpl* impl =
-                (XAAudioDecoderCapabilitiesItfImpl*) (*self);
-        if (impl && (impl == impl->self))
-            {
-            return impl;
-            }
-        }
-    return NULL;
-    }
-
-/*****************************************************************************
- * Base interface XAAudioDecoderCapabilitiesItf implementation
- *****************************************************************************/
-
-/* XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders
- * Description: Retrieves the available audio decoders.
- */
-XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders(
-        XAAudioDecoderCapabilitiesItf self, XAuint32* pNumDecoders,
-        XAuint32* pDecoderIds)
-    {
-    XAAudioDecoderCapabilitiesItfImpl* impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders");
-
-    if (!impl || !pNumDecoders)
-        {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-        }
-    else
-        {
-        if (pDecoderIds)
-            { /* query array of decoders */
-            if (*pNumDecoders < impl->numCodecs)
-                {
-                DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
-                res = XA_RESULT_BUFFER_INSUFFICIENT;
-                }
-            else
-                {
-
-                XAuint32 i = 0;
-                XACapabilities temp;
-                for (i = 0; i < impl->numCodecs; i++)
-                    {
-                    /* query decoder id from adaptation using index value */
-                    XACapabilitiesMgr_GetCapsByIdx(NULL,
-                            (XACapsType) (XACAP_DECODER | XACAP_AUDIO), i,
-                            &temp);
-                    pDecoderIds[i] = temp.xaid;
-                    }
-
-                }
-            }
-        /* return number of decoders */
-        *pNumDecoders = impl->numCodecs;
-        }DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders");
-    return res;
-    }
-
-/* XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities
- * Description: Queries for the audio decoder�s capabilities.
- */
-XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities(
-        XAAudioDecoderCapabilitiesItf self, XAuint32 decoderId,
-        XAuint32* pIndex, XAAudioCodecDescriptor* pDescriptor)
-    {
-    XAAudioDecoderCapabilitiesItfImpl* impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities");
-
-    if (!impl || !pIndex)
-        {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-        }
-    else
-        {
-        if (!pDescriptor)
-            { /* query number of capa structures */
-            *pIndex = 1;
-            }
-        else
-            { /* query capabilities */
-            if (*pIndex >= 1)
-                {
-                DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-                res = XA_RESULT_PARAMETER_INVALID;
-                }
-            else
-                {
-
-                /* query capabilities from adaptation using codec id */
-                XACapabilities temp;
-                memset(pDescriptor, 0, sizeof(XAAudioCodecDescriptor));
-                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 = desc->maxChannels;
-                    pDescriptor->minSampleRate = desc->minSampleRate; /* milliHz */
-                    if (desc->maxSampleRate < (0xFFFFFFFF))
-                        {
-                        pDescriptor->maxSampleRate = desc->maxSampleRate;
-                        }
-                    else
-                        {
-                        pDescriptor->maxSampleRate = 0xFFFFFFFF;
-                        }
-                    pDescriptor->minBitsPerSample = desc->minBitsPerSample;
-                    pDescriptor->maxBitsPerSample = desc->maxBitsPerSample;
-                    pDescriptor->isFreqRangeContinuous=desc->isFreqRangeContinuous;
-                    pDescriptor->minBitRate = desc->minBitRate;
-                    pDescriptor->maxBitRate = desc->maxBitRate;
-                    pDescriptor->numBitratesSupported
-                            = desc->numBitratesSupported;
-                    pDescriptor->isBitrateRangeContinuous=desc->isBitrateRangeContinuous;
-                    pDescriptor->profileSetting=desc->profileSetting;
-                    pDescriptor->modeSetting=desc->modeSetting; /* no chanmode for pcm defined */
-                    
-                    }
-                    else
-                        {
-                        /* do nothing */
-                        }
-                    /*other caps undefined*/
-                    }
-
-                }
-            }
-    
-
-    DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities");
-    return res;
-    }
-
-/*****************************************************************************
- * XAAudioDecoderCapabilitiesItfImpl -specific methods
- *****************************************************************************/
-
-/* XAAudioDecoderCapabilitiesItfImpl_Create
- * Description: Allocate and initialize XAAudioDecoderCapabilitiesItfImpl
- */
-XAAudioDecoderCapabilitiesItfImpl* XAAudioDecoderCapabilitiesItfImpl_Create()
-    {
-    XAAudioDecoderCapabilitiesItfImpl* self =
-            (XAAudioDecoderCapabilitiesItfImpl*) calloc(1,
-                    sizeof(XAAudioDecoderCapabilitiesItfImpl));
-
-    DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_Create");
-
-    if (self)
-        {
-        /* init itf default implementation */
-        self->itf.GetAudioDecoders
-                = XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders;
-        self->itf.GetAudioDecoderCapabilities
-                = XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities;
-
-        /* init variables */
-
-        assert( XACapabilitiesMgr_GetCapsCount(NULL, (XACapsType)(XACAP_DECODER|XACAP_AUDIO),
-                        &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-
-        self->self = self;
-        }DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_Create");
-    return self;
-    }
-
-/* void XAAudioDecoderCapabilitiesItfImpl_Free
- * Description: Free all resources reserved at XAAudioDecoderCapabilitiesItfImpl_Create
- */
-void XAAudioDecoderCapabilitiesItfImpl_Free(
-        XAAudioDecoderCapabilitiesItfImpl* self)
-    {
-    DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_Free");
-    }
--- a/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +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: Audio Encoder Itf Header
- *
- */
-
-#ifndef XAAUDIODECODERCAPABILITIESITF_H
-#define XAAUDIODECODERCAPABILITIESITF_H
-
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAAudioDecoderCapabilitiesItf implementation */
-typedef struct XAAudioDecoderCapabilitiesItfImpl_
-    {
-    /* parent interface */
-    struct XAAudioDecoderCapabilitiesItf_ itf;
-    /* pointer to self */
-    struct XAAudioDecoderCapabilitiesItfImpl_* self;
-    /* variables */
-    XAuint32 numCodecs;
-    } XAAudioDecoderCapabilitiesItfImpl;
-
-/* Base interface XAAudioDecoderCapabilitiesItf implementation */
-XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders(
-        XAAudioDecoderCapabilitiesItf self, XAuint32* pNumDecoders,
-        XAuint32* pDecoderIds);
-
-XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities(
-        XAAudioDecoderCapabilitiesItf self, XAuint32 decoderId,
-        XAuint32* pIndex, XAAudioCodecDescriptor* pDescriptor);
-
-/* XAAudioDecoderCapabilitiesItfImpl -specific methods */
-XAAudioDecoderCapabilitiesItfImpl* XAAudioDecoderCapabilitiesItfImpl_Create(
-        void);
-void XAAudioDecoderCapabilitiesItfImpl_Free(
-        XAAudioDecoderCapabilitiesItfImpl* self);
-
-#endif /* XAAUDIODECODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -94,7 +94,8 @@
 
         /* return number of encoders */
         *pNumEncoders = impl->numCodecs;
-        }DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders");
+        }
+    DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders");
     return res;
     }
 
@@ -205,7 +206,8 @@
         self->numCodecs = 3;
         self->self = self;
 
-        }DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_Create");
+        }
+    DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_Create");
     return self;
     }
 
--- a/khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xaglobals.h"
-#include "xacameracapabilitiesitf.h"
-  
-
-#include "xastaticcameracapsadaptation.h"
-
-
-static XACameraCapabilitiesItfImpl* GetImpl(XACameraCapabilitiesItf self)
-{
-    if( self )
-    {
-        XACameraCapabilitiesItfImpl* impl = (XACameraCapabilitiesItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XACameraCapabilitiesItf implementation
- */
-XAresult XACameraCapabilitiesItfImpl_GetCameraCapabilities(
-                        XACameraCapabilitiesItf self,
-                        XAuint32* pIndex,
-                        XAuint32* pCameraDeviceID,
-                        XACameraDescriptor* pDescriptor)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetCameraCapabilities");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetCameraCapabilities");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetCameraCapabilities(pIndex,pCameraDeviceID,pDescriptor);
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetCameraCapabilities");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pPatternID,
-                        XAuint32* pFocusPattern,
-                        XAuint32* pCustomPoints1,
-                        XAuint32* pCustomPoints2)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_QueryFocusRegionPatterns(
-            cameraDeviceID, pPatternID, pFocusPattern,pCustomPoints1,pCustomPoints2);
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedAutoLocks(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pNumCombinations,
-                        XAuint32** ppLocks)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetSupportedAutoLocks");
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedAutoLocks");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetSupportedAutoLocks(
-                cameraDeviceID, pNumCombinations, ppLocks);
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedAutoLocks");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAboolean macroEnabled,
-                        XAmillimeter* pMinValue,
-                        XAmillimeter* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAmillimeter** ppSettings)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetSupportedFocusManualSettings(
-            cameraDeviceID, macroEnabled,pMinValue, pMaxValue, pNumSettings, ppSettings);
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pMinValue,
-                        XAuint32* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAuint32** ppSettings)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetSupportedISOSensitivitySettings(
-                cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings );
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pMinValue,
-                        XAuint32* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAuint32** ppSettings)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetSupportedApertureManualSettings(
-                cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings );
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAmicrosecond* pMinValue,
-                        XAmicrosecond* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAmicrosecond** ppSettings)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetSupportedShutterSpeedManualSettings(
-                cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings);
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pMinValue,
-                        XAuint32* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAuint32** ppSettings)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetSupportedWhiteBalanceManualSettings(
-                cameraDeviceID, pMinValue, pMaxValue, pNumSettings, ppSettings);
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings");
-    return ret;
-}
-
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedZoomSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAboolean digitalEnabled,
-                        XAboolean macroEnabled,
-                        XApermille* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XApermille** ppSettings,
-                        XAboolean* pSpeedSupported)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XACameraCapabilitiesItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XACameraCapabilitiesItfImpl_GetSupportedZoomSettings");
-
-    if( !impl )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedZoomSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-  
-    ret = XAStaticCameraCaps_GetSupportedZoomSettings(
-                cameraDeviceID, digitalEnabled, macroEnabled, pMaxValue,
-                pNumSettings, ppSettings, pSpeedSupported);
-
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_GetSupportedZoomSettings");
-    return ret;
-}
-
-  
-/**
- * XACameraCapabilitiesItfImpl -specific methods
- **/
-XACameraCapabilitiesItfImpl* XACameraCapabilitiesItfImpl_Create(void)
-{
-    XACameraCapabilitiesItfImpl* self = (XACameraCapabilitiesItfImpl*)
-        calloc(1,sizeof(XACameraCapabilitiesItfImpl));
-    DEBUG_API("->XACameraCapabilitiesItfImpl_Create");
-
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.GetCameraCapabilities =
-            XACameraCapabilitiesItfImpl_GetCameraCapabilities;
-        self->itf.QueryFocusRegionPatterns =
-            XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns;
-        self->itf.GetSupportedAutoLocks =
-            XACameraCapabilitiesItfImpl_GetSupportedAutoLocks;
-        self->itf.GetSupportedFocusManualSettings =
-            XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings;
-        self->itf.GetSupportedISOSensitivitySettings =
-            XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings;
-        self->itf.GetSupportedApertureManualSettings =
-            XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings;
-        self->itf.GetSupportedShutterSpeedManualSettings =
-            XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings;
-        self->itf.GetSupportedWhiteBalanceManualSettings =
-            XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings;
-        self->itf.GetSupportedZoomSettings =
-            XACameraCapabilitiesItfImpl_GetSupportedZoomSettings;
-
-        self->self = self;
-    }
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_Create");
-    return self;
-}
-
-void XACameraCapabilitiesItfImpl_Free(XACameraCapabilitiesItfImpl* self)
-{
-    DEBUG_API("->XACameraCapabilitiesItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XACameraCapabilitiesItfImpl_Free");
-}
-
--- a/khronosfws/openmax_al/src/engine/xacameracapabilitiesitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +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 XACAMERACAPABILITIESITF_H
-#define XACAMERACAPABILITIESITF_H
-
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XACameraCapabilitiesItf implementation */
-typedef struct XACameraCapabilitiesItfImpl_
-{
-    /* parent interface */
-    struct XACameraCapabilitiesItf_ itf;
-    /* pointer to self */
-    struct XACameraCapabilitiesItfImpl_* self;
-    /* variables */
-} XACameraCapabilitiesItfImpl;
-
-/* Base interface XACameraCapabilitiesItf implementation */
-XAresult XACameraCapabilitiesItfImpl_GetCameraCapabilities(
-                        XACameraCapabilitiesItf self,
-                        XAuint32* pIndex,
-                        XAuint32* pCameraDeviceID,
-                        XACameraDescriptor* pDescriptor);
-
-XAresult XACameraCapabilitiesItfImpl_QueryFocusRegionPatterns(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pPatternID,
-                        XAuint32* pFocusPattern,
-                        XAuint32* pCustomPoints1,
-                        XAuint32* pCustomPoints2);
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedAutoLocks(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pNumCombinations,
-                        XAuint32** ppLocks);
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedFocusManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAboolean macroEnabled,
-                        XAmillimeter* pMinValue,
-                        XAmillimeter* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAmillimeter** ppSettings);
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedISOSensitivitySettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pMinValue,
-                        XAuint32* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAuint32** ppSettings);
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedApertureManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pMinValue,
-                        XAuint32* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAuint32** ppSettings);
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedShutterSpeedManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAmicrosecond* pMinValue,
-                        XAmicrosecond* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAmicrosecond** ppSettings);
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedWhiteBalanceManualSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAuint32* pMinValue,
-                        XAuint32* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XAuint32** ppSettings);
-
-XAresult XACameraCapabilitiesItfImpl_GetSupportedZoomSettings(
-                        XACameraCapabilitiesItf self,
-                        XAuint32 cameraDeviceID,
-                        XAboolean digitalEnabled,
-                        XAboolean macroEnabled,
-                        XApermille* pMaxValue,
-                        XAuint32* pNumSettings,
-                        XApermille** ppSettings,
-                        XAboolean* pSpeedSupported);
- 
-/* XACameraCapabilitiesItfImpl -specific methods */
-XACameraCapabilitiesItfImpl* XACameraCapabilitiesItfImpl_Create(void);
-void XACameraCapabilitiesItfImpl_Free(XACameraCapabilitiesItfImpl* self);
-
-#endif /* XACAMERACAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xadevicevolumeitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xaglobals.h"
-#include "xadevicevolumeitf.h"
-  
-#include "xadevicevolumeitfadaptation.h"
-
-
-static XADeviceVolumeItfImpl* GetImpl(XADeviceVolumeItf self)
-{
-    if( self )
-    {
-        XADeviceVolumeItfImpl* impl = (XADeviceVolumeItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XADeviceVolumeItf implementation
- */
-
-/* XAresult XADeviceVolumeItfImpl_GetVolumeScale( XADeviceVolumeItf self,
- *                                                XAuint32 deviceID,
- *                                                XAint32* pMinValue,
- *                                                XAint32* pMaxValue,
- *                                                XAboolean* pIsMillibelScale)
- * Description: Gets the properties of the volume scale supported by the given device.
- */
-XAresult XADeviceVolumeItfImpl_GetVolumeScale( XADeviceVolumeItf self,
-                                               XAuint32 deviceID,
-                                               XAint32* pMinValue,
-                                               XAint32* pMaxValue,
-                                               XAboolean* pIsMillibelScale)
-{
-    XADeviceVolumeItfImpl* impl = GetImpl(self);
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAboolean supported = XA_BOOLEAN_FALSE;
-    DEBUG_API("->XADeviceVolumeItfImpl_GetVolumeScale");
-    if( !impl || !pMinValue || !pMaxValue || !pIsMillibelScale )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XADeviceVolumeItfImpl_GetVolumeScale");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-  
-    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported((XAAdaptationGstCtx*)impl->adapCtx, deviceID, &supported);
-
-    if( ret != XA_RESULT_SUCCESS || supported != XA_BOOLEAN_TRUE )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XADeviceVolumeItfImpl_GetVolumeScale");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pMinValue = impl->minVolume;
-    *pMaxValue = impl->maxVolume;
-    *pIsMillibelScale = impl->ismBscale;
-
-    DEBUG_API("<-XADeviceVolumeItfImpl_GetVolumeScale");
-    return ret;
-}
-
-/* XAresult XADeviceVolumeItfImpl_SetVolume( XADeviceVolumeItf self,
- *                                           XAuint32 deviceID,
- *                                           XAint32 volume)
- * Description: Sets the device's volume.
- */
-XAresult XADeviceVolumeItfImpl_SetVolume( XADeviceVolumeItf self,
-                                          XAuint32 deviceID,
-                                          XAint32 volume)
-{
-    XADeviceVolumeItfImpl* impl = GetImpl(self);
-    XAresult ret = XA_RESULT_SUCCESS;
-  
-    XAboolean supported = XA_BOOLEAN_FALSE;
-
-    DEBUG_API("->XADeviceVolumeItfImpl_SetVolume");
-
-    if( !impl || volume < impl->minVolume || volume > impl->maxVolume )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XADeviceVolumeItfImpl_SetVolume");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-  
-    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported((XAAdaptationGstCtx*)impl->adapCtx, deviceID, &supported);
-    if( ret != XA_RESULT_SUCCESS || supported != XA_BOOLEAN_TRUE )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XADeviceVolumeItfImpl_SetVolume");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    ret = XADeviceVolumeItfAdapt_SetVolume((XAAdaptationGstCtx*)impl->adapCtx, deviceID, volume);
-
-    if( ret == XA_RESULT_SUCCESS )
-    {
-        impl->curVolume = volume;
-    }
-
-    DEBUG_API("<-XADeviceVolumeItfImpl_SetVolume");
-    return ret;
-}
-
-/* XAresult XADeviceVolumeItfImpl_GetVolume( XADeviceVolumeItf self,
- *                                           XAuint32 deviceID,
- *                                           XAint32 * pVolume)
- * Description: Gets the device's volume.
- */
-XAresult XADeviceVolumeItfImpl_GetVolume( XADeviceVolumeItf self,
-                                          XAuint32 deviceID,
-                                          XAint32 * pVolume)
-{
-    XADeviceVolumeItfImpl* impl = GetImpl(self);
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAboolean supported = XA_BOOLEAN_FALSE;
-    DEBUG_API("->XADeviceVolumeItfImpl_GetVolume");
-
-    if( !impl || !pVolume )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XADeviceVolumeItfImpl_GetVolume");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-  
-    ret = XADeviceVolumeItfAdapt_IsDeviceIDSupported((XAAdaptationGstCtx*)impl->adapCtx, deviceID, &supported);
-
-    if( ret != XA_RESULT_SUCCESS || supported != XA_BOOLEAN_TRUE )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XADeviceVolumeItfImpl_GetVolume");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    *pVolume = impl->curVolume;
-    DEBUG_API("<-XADeviceVolumeItfImpl_GetVolume");
-    return XA_RESULT_SUCCESS;
-}
-
-/**
- * XADeviceVolumeItfImpl -specific methods
- **/
-  
-/**
- * XADeviceVolumeItfImpl* XADeviceVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
- * Description: Allocate and initialize DeviceVolumeImpl
- **/
-XADeviceVolumeItfImpl* XADeviceVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
-{
-    XADeviceVolumeItfImpl* self = (XADeviceVolumeItfImpl*)
-        calloc(1,sizeof(XADeviceVolumeItfImpl));
-    DEBUG_API("->XADeviceVolumeItfImpl_Create");
-
-    if(self)
-    {
-        /* init itf default implementation */
-        self->itf.GetVolumeScale =
-            XADeviceVolumeItfImpl_GetVolumeScale;
-        self->itf.GetVolume =
-            XADeviceVolumeItfImpl_GetVolume;
-        self->itf.SetVolume =
-            XADeviceVolumeItfImpl_SetVolume;
-
-        /* init variables */
-        /* these values are replaced by adaptation in init phase */
-        self->curVolume = DEFAULTDEVICEVOLUME;
-        self->minVolume = DEFAULTDEVICEMINVOLUME;
-        self->maxVolume = DEFAULTDEVICEMAXVOLUME;
-        self->ismBscale = DEFAULTSCALEISMILLIBEL;
-
-        self->adapCtx = adapCtx;
-        self->self = self;
-    }
-    DEBUG_API("<-XADeviceVolumeItfImpl_Create");
-    return self;
-}
-
-/* void XADeviceVolumeItfImpl_Free(XADeviceVolumeItfImpl* self)
- * Description: Free all resources reserved at XADeviceVolumeItfImpl_Create
- */
-void XADeviceVolumeItfImpl_Free(XADeviceVolumeItfImpl* self)
-{
-    DEBUG_API("->XADeviceVolumeItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XADeviceVolumeItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/engine/xadevicevolumeitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +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 XADEVICEVOLUMEITF_H
-#define XADEVICEVOLUMEITF_H
-
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-#define DEFAULTDEVICEVOLUME 5
-#define DEFAULTDEVICEMINVOLUME 0
-#define DEFAULTDEVICEMAXVOLUME 10
-#define DEFAULTSCALEISMILLIBEL XA_BOOLEAN_FALSE
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XADeviceVolumeItf implementation */
-typedef struct XADeviceVolumeItfImpl_
-{
-    /* parent interface */
-    struct XADeviceVolumeItf_ itf;
-    /* pointer to self */
-    struct XADeviceVolumeItfImpl_* self;
-
-    /* variables */
-
-    XAint32 curVolume;
-    XAint32 minVolume;
-    XAint32 maxVolume;
-    XAboolean ismBscale;
- 
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-
-} XADeviceVolumeItfImpl;
-
-/* Base interface XADeviceVolumeItf implementation */
-XAresult XADeviceVolumeItfImpl_GetVolumeScale(
-                        XADeviceVolumeItf self,
-                        XAuint32 deviceID,
-                        XAint32 * pMinValue,
-                        XAint32 * pMaxValue,
-                        XAboolean * pIsMillibelScale);
-XAresult XADeviceVolumeItfImpl_SetVolume(
-                        XADeviceVolumeItf self,
-                        XAuint32 deviceID,
-                        XAint32 volume);
-XAresult XADeviceVolumeItfImpl_GetVolume(
-                        XADeviceVolumeItf self,
-                        XAuint32 deviceID,
-                        XAint32 * pVolume);
-  
-/* XADeviceVolumeItfImpl -specific methods */
-XADeviceVolumeItfImpl* XADeviceVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-
-void XADeviceVolumeItfImpl_Free(XADeviceVolumeItfImpl* self);
-
-#endif /* XADEVICEVOLUMEITF_H */
--- a/khronosfws/openmax_al/src/engine/xaengine.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengine.c	Wed Aug 18 10:17:22 2010 +0300
@@ -25,18 +25,10 @@
 #include "xathreadsyncitf.h"
 #include "xadynintmgmtitf.h"
 #include "xaaudioiodevicecapabilitiesitf.h"
-#include "xaaudiodecodercapabilitiesitf.h"
 #include "xaaudioencodercapabilitiesitf.h"
-#include "xaimagedecodercapabilitiesitf.h"
-#include "xaimageencodercapabilitiesitf.h"
-#include "xavideodecodercapabilitiesitf.h"
-#include "xavideoencodercapabilitiesitf.h"
-#include "xacameracapabilitiesitf.h"
-#include "xadevicevolumeitf.h"
 #include "xaconfigextensionsitf.h"
 #include "xathreadsafety.h"
 #include "xaframeworkmgr.h"  
-#include "xastaticcameracapsadaptation.h"
 
 /* Static mapping of enumeration XAEngineInterfaces to interface iids */
 static const XAInterfaceID* xaEngineItfIIDs[ENGINE_ITFCOUNT] =
@@ -80,7 +72,8 @@
 
     if (!pEngine)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineImpl_Create");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAEngineImpl_Create");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -107,7 +100,8 @@
     pImpl = (XAEngineImpl*) calloc(1, sizeof(XAEngineImpl));
     if (!pImpl)
         {
-        DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");DEBUG_API("<-XAEngineImpl_Create");
+        DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
+        DEBUG_API("<-XAEngineImpl_Create");
         /* memory allocation failed */
         return XA_RESULT_MEMORY_FAILURE;
         }
@@ -142,7 +136,8 @@
                     {
                     /* required interface cannot be accommodated - fail creation */
                     XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
-                    DEBUG_ERR("Required interface not found - abort creation!");DEBUG_API("<-XAEngineImpl_Create");
+                    DEBUG_ERR("Required interface not found - abort creation!");
+                    DEBUG_API("<-XAEngineImpl_Create");
                     return XA_RESULT_FEATURE_UNSUPPORTED;
                     }
                 else
@@ -191,7 +186,8 @@
         }
     else
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineImpl_QueryNumSupportedInterfaces");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAEngineImpl_QueryNumSupportedInterfaces");
         return XA_RESULT_PARAMETER_INVALID;
         }
     }
@@ -293,41 +289,13 @@
                     pItf = XAAudioEncoderCapabilitiesItfImpl_Create(
                             pObjImpl->capabilities);
                     break;
-                    /*
-                     case ENGINE_AUDIODECODERCAPAITF:
-                     pItf = XAAudioDecoderCapabilitiesItfImpl_Create();
-                     break;
-                     case ENGINE_CONFIGEXTENSIONSITF:
-                     pItf = XAConfigExtensionsItfImpl_Create();
-                     break;
-                     case ENGINE_DEVICEVOLUMEITF:
-                     pItf = XADeviceVolumeItfImpl_Create(pObjImpl->adaptationCtx);
-                     break;
-                     case ENGINE_CAMERACAPAITF:
-
-                     XAStaticCameraCaps_Init();
-                     pItf = XACameraCapabilitiesItfImpl_Create();
-                     
-                     break;
-                     case ENGINE_IMAGEDECODERCAPAITF:
-                     pItf = XAImageDecoderCapabilitiesItfImpl_Create();
-                     break;
-                     case ENGINE_IMAGEENCODERCAPAITF:
-                     pItf = XAImageEncoderCapabilitiesItfImpl_Create();
-                     break;
-                     case ENGINE_VIDEODECODERCAPAITF:
-                     pItf = XAVideoDecoderCapabilitiesItfImpl_Create();
-                     break;
-                     case ENGINE_VIDEOENCODERCAPAITF:
-                     pItf = XAVideoEncoderCapabilitiesItfImpl_Create();
-                     break;
-                     */
                 default:
                     break;
                 }
             if (!pItf)
                 {
-                DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");DEBUG_API("<-XAEngineImpl_DoRealize");
+                DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
+                DEBUG_API("<-XAEngineImpl_DoRealize");
                 /* memory allocation failed */
                 return XA_RESULT_MEMORY_FAILURE;
                 }
@@ -348,7 +316,8 @@
  */
 XAresult XAEngineImpl_DoResume(XAObjectItf self)
     {
-    DEBUG_API("->XAEngineImpl_DoResume");DEBUG_API("<-XAEngineImpl_DoResume");
+    DEBUG_API("->XAEngineImpl_DoResume");
+    DEBUG_API("<-XAEngineImpl_DoResume");
 
     return XA_RESULT_PRECONDITIONS_VIOLATED;
     }
@@ -387,34 +356,6 @@
                 case ENGINE_AUDIOENCODERCAPAITF:
                     XAAudioEncoderCapabilitiesItfImpl_Free(pItf);
                     break;
-                    /*
-                     case ENGINE_AUDIODECODERCAPAITF:
-                     XAAudioDecoderCapabilitiesItfImpl_Free(pItf);
-                     break;
-                     case ENGINE_CONFIGEXTENSIONSITF:
-                     XAConfigExtensionsItfImpl_Free(pItf);
-                     break;
-                     case ENGINE_DEVICEVOLUMEITF:
-                     XADeviceVolumeItfImpl_Free(pItf);
-                     break;
-                     case ENGINE_CAMERACAPAITF:
-
-                     XACameraCapabilitiesItfImpl_Free(pItf);
-                     
-                     break;
-                     case ENGINE_IMAGEDECODERCAPAITF:
-                     XAImageDecoderCapabilitiesItfImpl_Free(pItf);
-                     break;
-                     case ENGINE_IMAGEENCODERCAPAITF:
-                     XAImageEncoderCapabilitiesItfImpl_Free(pItf);
-                     break;
-                     case ENGINE_VIDEODECODERCAPAITF:
-                     XAVideoDecoderCapabilitiesItfImpl_Free(pItf);
-                     break;
-                     case ENGINE_VIDEOENCODERCAPAITF:
-                     XAVideoEncoderCapabilitiesItfImpl_Free(pItf);
-                     break;
-                     */
                 default:
                     break;
                 }
--- a/khronosfws/openmax_al/src/engine/xaengineitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengineitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -19,8 +19,6 @@
 #include <stdlib.h>
 #include <assert.h>
 #include "xaengineitf.h"
-#include "xavibraitf.h"
-#include "xaledarrayitf.h"
 #include "xaobjects.h"
 #include "xacapabilitiesmgr.h"
 /*static XAchar implementationText[] = "Implementation does not conform to AL Spec";*/
@@ -73,9 +71,7 @@
         const XAInterfaceID *pInterfaceIds,
         const XAboolean *pInterfaceRequired)
     {
-    return XALEDArrayDeviceImpl_CreateLEDArrayDevice(
-            ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID,
-            numInterfaces, pInterfaceIds, pInterfaceRequired);
+    return XA_RESULT_FEATURE_UNSUPPORTED;
     }
 
 XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self,
@@ -83,9 +79,7 @@
         const XAInterfaceID *pInterfaceIds,
         const XAboolean *pInterfaceRequired)
     {
-    return XAVibraDeviceImpl_CreateVibraDevice(
-            ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID,
-            numInterfaces, pInterfaceIds, pInterfaceRequired);
+    return XA_RESULT_FEATURE_UNSUPPORTED;
     }
 
 XAresult XAEngineItfImpl_CreateMediaPlayer(XAEngineItf self,
@@ -118,9 +112,7 @@
         XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
         const XAboolean *pInterfaceRequired)
     {
-    XAEngineItfImpl* impl = GetImpl(self);
-    return XAOMixImpl_CreateOutputMix(impl->mapper, impl->capabilities, pMix,
-            numInterfaces, pInterfaceIds, pInterfaceRequired);
+    return XA_RESULT_FEATURE_UNSUPPORTED;
     }
 
 XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self,
@@ -153,7 +145,8 @@
 
     if (!pMajor || !pMinor || !pStep)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
         return XA_RESULT_PARAMETER_INVALID;
         }
     /* OpenMAX AL API ver 1.0.1 */
@@ -197,7 +190,8 @@
 
     if (!pNumSupportedInterfaces)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineItfImpl_QueryNumSupportedInterfaces");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAEngineItfImpl_QueryNumSupportedInterfaces");
         return XA_RESULT_PARAMETER_INVALID;
         }
     *pNumSupportedInterfaces = 0;
@@ -215,28 +209,10 @@
             res = XAMediaRecorderImpl_QueryNumSupportedInterfaces(
                     pNumSupportedInterfaces);
             break;
-        case XA_OBJECTID_OUTPUTMIX:
-            res = XAOMixImpl_QueryNumSupportedInterfaces(
-                    pNumSupportedInterfaces);
-            break;
-#ifdef OMAX_CAMERABIN
-            case XA_OBJECTID_CAMERADEVICE:
-            res = XACameraDeviceImpl_QueryNumSupportedInterfaces(
-                    pNumSupportedInterfaces);
-            break;
-#endif
         case XA_OBJECTID_RADIODEVICE:
             res = XARadioDeviceImpl_QueryNumSupportedInterfaces(
                     pNumSupportedInterfaces);
             break;
-        case XA_OBJECTID_LEDDEVICE:
-            res = XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(
-                    pNumSupportedInterfaces);
-            break;
-        case XA_OBJECTID_VIBRADEVICE:
-            res = XAVibraDeviceImpl_QueryNumSupportedInterfaces(
-                    pNumSupportedInterfaces);
-            break;
         case XA_OBJECTID_METADATAEXTRACTOR:
             res = XAMetadataExtractorImpl_QueryNumSupportedInterfaces(
                     pNumSupportedInterfaces);
@@ -276,27 +252,10 @@
             res = XAMediaRecorderImpl_QuerySupportedInterfaces(index,
                     pInterfaceId);
             break;
-        case XA_OBJECTID_OUTPUTMIX:
-            res = XAOMixImpl_QuerySupportedInterfaces(index, pInterfaceId);
-            break;
-#ifdef OMAX_CAMERABIN
-            case XA_OBJECTID_CAMERADEVICE:
-            res = XACameraDeviceImpl_QuerySupportedInterfaces(
-                    index, pInterfaceId );
-            break;
-#endif
         case XA_OBJECTID_RADIODEVICE:
             res = XARadioDeviceImpl_QuerySupportedInterfaces(index,
                     pInterfaceId);
             break;
-        case XA_OBJECTID_LEDDEVICE:
-            res = XALEDArrayDeviceImpl_QuerySupportedInterfaces(index,
-                    pInterfaceId);
-            break;
-        case XA_OBJECTID_VIBRADEVICE:
-            res = XAVibraDeviceImpl_QuerySupportedInterfaces(index,
-                    pInterfaceId);
-            break;
         case XA_OBJECTID_METADATAEXTRACTOR:
             res = XAMetadataExtractorImpl_QuerySupportedInterfaces(index,
                     pInterfaceId);
@@ -313,9 +272,7 @@
         XAuint32 *pIndex, XAuint32 *pLEDDeviceID,
         XALEDDescriptor *pDescriptor)
     {
-
-    XALEDDescriptor descriptor;
-
+    XAresult res = XA_RESULT_SUCCESS;
     DEBUG_API("->XAEngineItfImpl_QueryLEDCapabilities");
 
     if (!pDescriptor)
@@ -326,52 +283,26 @@
             DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
             return XA_RESULT_PARAMETER_INVALID;
             }
-        /* Number of devices */
-        *pIndex = 1;
+        else
+            {
+            /* Number of devices */
+            *pIndex = 0;
+            }
         }
     else
         {
-
-        /* query device capabilities */
-        if (pIndex)
-            {
-            if (*pIndex == 0)
-                {
-                if (!pLEDDeviceID)
-                    {
-                    DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-                    DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
-                    return XA_RESULT_PARAMETER_INVALID;
-                    }
-                *pLEDDeviceID = XA_ADAPTID_LEDARRAY;
-                }
-            else
-                {
-                DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-                DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
-                return XA_RESULT_PARAMETER_INVALID;
-                }
-            }
-
-        if (*pLEDDeviceID == XA_ADAPTID_LEDARRAY)
-            {
-            descriptor.colorMask = COLOR_MASK;
-            descriptor.ledCount = LED_COUNT;
-            descriptor.primaryLED = PRIMARY_LED;
-            *pDescriptor = descriptor;
-            }
-
-        }DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
-    return XA_RESULT_SUCCESS;
+        // return NotSupported below
+        res = XA_RESULT_FEATURE_UNSUPPORTED;
+        }
+    DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
+    return res;
     }
 
 XAresult XAEngineItfImpl_QueryVibraCapabilities(XAEngineItf self,
         XAuint32 *pIndex, XAuint32 *pVibraDeviceID,
         XAVibraDescriptor *pDescriptor)
     {
-
-    XAVibraDescriptor descriptor;
-
+    XAresult res = XA_RESULT_SUCCESS;
     DEBUG_API("->XAEngineItfImpl_QueryVibraCapabilities");
 
     if (!pDescriptor)
@@ -380,49 +311,22 @@
             {
             DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
             DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
-            return XA_RESULT_PARAMETER_INVALID;
+            res = XA_RESULT_PARAMETER_INVALID;
             }
-        /* Number of devices */
-        *pIndex = 1;
+        else
+            {
+            /* Number of devices */
+            *pIndex = 0;
+            }
         }
     else
         {
-
-        /* query device capabilities */
-        if (pIndex)
-            {
-            if (*pIndex == 0)
-                {
-                if (!pVibraDeviceID)
-                    {
-                    DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-                    DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
-                    return XA_RESULT_PARAMETER_INVALID;
-                    }
-
-                *pVibraDeviceID = XA_ADAPTID_VIBRA;
-                }
-            else
-                {
-                DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-                DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
-                return XA_RESULT_PARAMETER_INVALID;
-                }
-            }
-
-        if (*pVibraDeviceID == XA_ADAPTID_VIBRA)
-            {
-            descriptor.minFrequency = MIN_FREQUENCY;
-            descriptor.maxFrequency = MAX_FREQUENCY;
-            descriptor.supportsFrequency = XA_BOOLEAN_TRUE;
-            descriptor.supportsIntensity = XA_BOOLEAN_TRUE;
-            *pDescriptor = descriptor;
-            }
-
+        // return NotSupported below
+        res = XA_RESULT_FEATURE_UNSUPPORTED;
         }
 
     DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
-    return XA_RESULT_SUCCESS;
+    return res;
     }
 
 XAresult XAEngineItfImpl_QueryNumSupportedExtensions(XAEngineItf self,
--- a/khronosfws/openmax_al/src/engine/xaimagedecodercapabilitiesitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#include "xaglobals.h"
-#include "xaimagedecodercapabilitiesitf.h"
-  
-#include "xacapabilitiesmgr.h"
-
-/* XAImageDecoderCapabilitiesItfImpl* GetImpl
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAImageDecoderCapabilitiesItfImpl* GetImpl(XAImageDecoderCapabilitiesItf self)
-{
-    if( self )
-    {
-        XAImageDecoderCapabilitiesItfImpl* impl = (XAImageDecoderCapabilitiesItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAImageDecoderCapabilitiesItf implementation
- **/
-
-/* XAresult XAImageDecoderCapabilitiesItfImpl_GetImageDecoderCapabilities
- * Description: Retrieves image decoder capabilities.
- */
-XAresult XAImageDecoderCapabilitiesItfImpl_GetImageDecoderCapabilities(
-                            XAImageDecoderCapabilitiesItf self,
-                            XAuint32* pDecoderId,
-                            XAImageCodecDescriptor* pDescriptor)
-{
-    XAImageDecoderCapabilitiesItfImpl* impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAImageDecoderCapabilitiesItfImpl_GetImageDecoderCapabilities");
-
-    impl = GetImpl(self);
-    if( !impl || !pDecoderId )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        if( !pDescriptor )
-        {   /* query number of image decoders */
-            *pDecoderId = impl->numCodecs;
-        }
-        else
-        {
-            /* query capabilities from adaptation using codec id */
-  
-            XACapabilities temp;
-            memset(pDescriptor,0,sizeof(XAImageCodecDescriptor));
-            /* here pEncoderId refers to index rather than codec id */
-            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 = desc->maxWidth;
-                pDescriptor->maxHeight = desc->maxHeight;
-            }
-
-        }
-    }
-
-    DEBUG_API("<-XAImageDecoderCapabilitiesItfImpl_GetImageDecoderCapabilities");
-    return res;
-}
-
-/* XAresult XAImageDecoderCapabilitiesItfImpl_QueryColorFormats
- * Description: This method is used to query the color formats supported
- *              by the image decoder.
- */
-XAresult XAImageDecoderCapabilitiesItfImpl_QueryColorFormats(
-                            const XAImageDecoderCapabilitiesItf self,
-                            XAuint32* pIndex,
-                            XAuint32* pColorFormats)
-{
-    XAImageDecoderCapabilitiesItfImpl* impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAImageDecoderCapabilitiesItfImpl_QueryColorFormats");
-    impl = GetImpl(self);
-    if( !impl || !pIndex )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-
-        res = XACapabilitiesMgr_QueryColorFormats(NULL, pIndex, pColorFormats);
-        
-    }
-    DEBUG_API("<-XAImageDecoderCapabilitiesItfImpl_QueryColorFormats");
-    return res;
-}
-
-/**
- * XAImageDecoderCapabilitiesItfImpl -specific methods
- **/
-
-/* XAImageDecoderCapabilitiesItfImpl_Create
- * Description: Allocate and initialize XAImageDecoderCapabilitiesItfImpl
- */
-XAImageDecoderCapabilitiesItfImpl* XAImageDecoderCapabilitiesItfImpl_Create()
-{
-    XAImageDecoderCapabilitiesItfImpl* self = (XAImageDecoderCapabilitiesItfImpl*)
-        calloc(1,sizeof(XAImageDecoderCapabilitiesItfImpl));
-    DEBUG_API("->XAImageDecoderCapabilitiesItfImpl_Create");
-
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.GetImageDecoderCapabilities =
-            XAImageDecoderCapabilitiesItfImpl_GetImageDecoderCapabilities;
-        self->itf.QueryColorFormats =
-            XAImageDecoderCapabilitiesItfImpl_QueryColorFormats;
-
-  
-        /* init variables */
-        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_DECODER|XACAP_IMAGE),
-                                  &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAImageDecoderCapabilitiesItfImpl_Create");
-    return self;
-}
-
-/* void XAImageDecoderCapabilitiesItfImpl_Free
- * Description: Free all resources reserved at XAImageDecoderCapabilitiesItfImpl
- */
-void XAImageDecoderCapabilitiesItfImpl_Free(XAImageDecoderCapabilitiesItfImpl* self)
-{
-    DEBUG_API("->XAImageDecoderCapabilitiesItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAImageDecoderCapabilitiesItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/engine/xaimagedecodercapabilitiesitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +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 XAIMAGEDECODERCAPABILITIESITF_H
-#define XAIMAGEDECODERCAPABILITIESITF_H
-
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAImageDecoderCapabilitiesItf implementation */
-typedef struct XAImageDecoderCapabilitiesItfImpl_
-{
-    /* parent interface */
-    struct XAImageDecoderCapabilitiesItf_ itf;
-    /* pointer to self */
-    struct XAImageDecoderCapabilitiesItfImpl_* self;
-    /* variables */
-    XAuint32 numCodecs;
-} XAImageDecoderCapabilitiesItfImpl;
-
-/* Base interface XAImageDecoderCapabilitiesItf implementation */
-XAresult XAImageDecoderCapabilitiesItfImpl_GetImageDecoderCapabilities(
-                            XAImageDecoderCapabilitiesItf self,
-                            XAuint32* pDecoderId,
-                            XAImageCodecDescriptor* pDescriptor);
-
-XAresult XAImageDecoderCapabilitiesItfImpl_QueryColorFormats(
-                            const XAImageDecoderCapabilitiesItf self,
-                            XAuint32* pIndex,
-                            XAuint32* pColorFormats);
-
-/* XAImageDecoderCapabilitiesItfImpl -specific methods */
-XAImageDecoderCapabilitiesItfImpl* XAImageDecoderCapabilitiesItfImpl_Create(void);
-void XAImageDecoderCapabilitiesItfImpl_Free(XAImageDecoderCapabilitiesItfImpl* self);
-
-#endif /* XAIMAGEDECODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include "xaglobals.h"
-#include "xaimageencodercapabilitiesitf.h"
-#include "xacapabilitiesmgr.h"  
-/* XAImageEncoderCapabilitiesItfImpl* GetImpl
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAImageEncoderCapabilitiesItfImpl* GetImpl(XAImageEncoderCapabilitiesItf self)
-{
-    if( self )
-    {
-        XAImageEncoderCapabilitiesItfImpl* impl = (XAImageEncoderCapabilitiesItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAImageEncoderCapabilitiesItf implementation
- **/
-
-/* XAresult XAImageEncoderCapabilitiesItfImpl_GetImageEncoderCapabilities
- * Description: Retrieves image encoder capabilities.
- */
-XAresult XAImageEncoderCapabilitiesItfImpl_GetImageEncoderCapabilities(
-                            XAImageEncoderCapabilitiesItf self,
-                            XAuint32* pEncoderId,
-                            XAImageCodecDescriptor* pDescriptor)
-{
-    XAImageEncoderCapabilitiesItfImpl* impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAImageEncoderCapabilitiesItfImpl_GetImageEncoderCapabilities");
-
-    impl = GetImpl(self);
-
-    if( !impl || !pEncoderId )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        if( !pDescriptor )
-        {   /* query number of image encoders */
-            *pEncoderId = impl->numCodecs;
-        }
-        else
-        {
-            /* query capabilities from adaptation using codec id */
-  
-            XACapabilities temp;
-            memset(pDescriptor,0,sizeof(XAImageCodecDescriptor));
-            /* here pEncoderId refers to index rather than codec id */
-            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 = desc->maxWidth;
-                pDescriptor->maxHeight = desc->maxHeight;
-            }
-
-        }
-    }
-
-    DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_GetImageEncoderCapabilities");
-    return res;
-}
-
-/* XAresult XAImageEncoderCapabilitiesItfImpl_QueryColorFormats
- * Description: This method is used to query the color formats supported
- *              by the image encoder.
- */
-XAresult XAImageEncoderCapabilitiesItfImpl_QueryColorFormats(
-                            const XAImageEncoderCapabilitiesItf self,
-                            XAuint32* pIndex,
-                            XAuint32* pColorFormats)
-{
-    XAImageEncoderCapabilitiesItfImpl* impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAImageEncoderCapabilitiesItfImpl_QueryColorFormats");
-
-    impl = GetImpl(self);
-    if( !impl || !pIndex )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-
-        res = XACapabilitiesMgr_QueryColorFormats(NULL, pIndex, pColorFormats);
-        
-    }
-    DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_QueryColorFormats");
-    return res;
-}
-
-/**
- * XAImageEncoderCapabilitiesItfImpl -specific methods
- **/
-
-/* XAImageEncoderCapabilitiesItfImpl_Create
- * Description: Allocate and initialize XAImageEncoderCapabilitiesItfImpl
- */
-XAImageEncoderCapabilitiesItfImpl* XAImageEncoderCapabilitiesItfImpl_Create()
-{
-    XAImageEncoderCapabilitiesItfImpl* self = (XAImageEncoderCapabilitiesItfImpl*)
-        calloc(1,sizeof(XAImageEncoderCapabilitiesItfImpl));
-    DEBUG_API("->XAImageEncoderCapabilitiesItfImpl_Create");
-
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.GetImageEncoderCapabilities =
-            XAImageEncoderCapabilitiesItfImpl_GetImageEncoderCapabilities;
-        self->itf.QueryColorFormats =
-            XAImageEncoderCapabilitiesItfImpl_QueryColorFormats;
-
-  
-        /* init variables */
-        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE),
-                                  &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_Create");
-    return self;
-}
-
-/* void XAImageEncoderCapabilitiesItfImpl_Free
- * Description: Free all resources reserved at XAImageEncoderCapabilitiesItfImpl
- */
-void XAImageEncoderCapabilitiesItfImpl_Free(XAImageEncoderCapabilitiesItfImpl* self)
-{
-    DEBUG_API("->XAImageEncoderCapabilitiesItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +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 XAIMAGEENCODERCAPABILITIESITF_H
-#define XAIMAGEENCODERCAPABILITIESITF_H
-
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAImageEncoderCapabilitiesItf implementation */
-typedef struct XAImageEncoderCapabilitiesItfImpl_
-{
-    /* parent interface */
-    struct XAImageEncoderCapabilitiesItf_ itf;
-    /* pointer to self */
-    struct XAImageEncoderCapabilitiesItfImpl_* self;
-    /* variables */
-    XAuint32 numCodecs;
-} XAImageEncoderCapabilitiesItfImpl;
-
-/* Base interface XAImageEncoderCapabilitiesItf implementation */
-XAresult XAImageEncoderCapabilitiesItfImpl_GetImageEncoderCapabilities(
-                            XAImageEncoderCapabilitiesItf self,
-                            XAuint32* pEncoderId,
-                            XAImageCodecDescriptor* pDescriptor);
-
-XAresult XAImageEncoderCapabilitiesItfImpl_QueryColorFormats(
-                            const XAImageEncoderCapabilitiesItf self,
-                            XAuint32* pIndex,
-                            XAuint32* pColorFormats);
-
-/* XAImageEncoderCapabilitiesItfImpl -specific methods */
-XAImageEncoderCapabilitiesItfImpl* XAImageEncoderCapabilitiesItfImpl_Create(void);
-void XAImageEncoderCapabilitiesItfImpl_Free(XAImageEncoderCapabilitiesItfImpl* self);
-
-#endif /* XAIMAGEENCODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xathreadsyncitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xathreadsyncitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -53,7 +53,8 @@
             {
             impl->engInCritical = XA_BOOLEAN_TRUE;
             }
-        }DEBUG_API("<-XAThreadSyncItfImpl_EnterCriticalSection");
+        }
+    DEBUG_API("<-XAThreadSyncItfImpl_EnterCriticalSection");
     return ret;
     }
 
@@ -85,7 +86,8 @@
         /* The engine must be in critical section state */
         DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
         ret = XA_RESULT_PRECONDITIONS_VIOLATED;
-        }DEBUG_API("<-XAThreadSyncItfImpl_ExitCriticalSection");
+        }
+    DEBUG_API("<-XAThreadSyncItfImpl_ExitCriticalSection");
     return ret;
     }
 
--- a/khronosfws/openmax_al/src/engine/xavideodecodercapabilitiesitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-#include "xaglobals.h"
-#include "xavideodecodercapabilitiesitf.h"
-#include "xacapabilitiesmgr.h"   
-
-
-/* XAVideoDecoderCapabilitiesItfImpl* GetImpl
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAVideoDecoderCapabilitiesItfImpl* GetImpl(XAVideoDecoderCapabilitiesItf self)
-{
-    if( self )
-    {
-        XAVideoDecoderCapabilitiesItfImpl* impl = (XAVideoDecoderCapabilitiesItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAVideoDecoderCapabilitiesItf implementation
- **/
-
-/* XAresult XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoders
- * Description: Retrieves available video decoders.
- */
-XAresult XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoders(
-                            XAVideoDecoderCapabilitiesItf self,
-                            XAuint32* pNumDecoders,
-                            XAuint32* pDecoderIds)
-{
-    XAVideoDecoderCapabilitiesItfImpl* impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoders");
-
-    impl = GetImpl(self);
-    if( !impl || !pNumDecoders )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        if( pDecoderIds )
-        {   /* query array of decoders */
-            if( *pNumDecoders < impl->numCodecs )
-            {
-                DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
-                res = XA_RESULT_BUFFER_INSUFFICIENT;
-            }
-            else
-            {
-                
-  
-                XAuint32 i = 0;
-                XACapabilities temp;
-                for( i=0; i<impl->numCodecs; i++ )
-                {
-                    /* query decoder id from adaptation using index value */
-                    XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_DECODER|XACAP_VIDEO), i, &temp);
-                    pDecoderIds[i] = temp.xaid;
-                }
-
-            }
-        }
-        /* return number of decoders */
-        *pNumDecoders = impl->numCodecs;
-    }
-
-    DEBUG_API("<-XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoders");
-    return res;
-}
-
-/* XAresult XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoderCapabilities
- * Description: Retrieves video decoder capabilities.
- */
-XAresult XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoderCapabilities(
-                            XAVideoDecoderCapabilitiesItf self,
-                            XAuint32 decoderId,
-                            XAuint32* pIndex,
-                            XAVideoCodecDescriptor* pDescriptor)
-{
-    XAVideoDecoderCapabilitiesItfImpl* impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAVideoDecoderCapabilitiesItfImpl_GetDecoderCapabilities");
-    impl = GetImpl(self);
-
-    if( !impl || !pIndex )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        if( !pDescriptor )
-        {   /* query number of capa structures */
-            *pIndex = 1;
-        }
-        else
-        {   /* query capabilities */
-            if( *pIndex >= 1 )
-            {
-                DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-                res = XA_RESULT_PARAMETER_INVALID;
-            }
-            else
-            {
-                /* query capabilities from adaptation using codec id */
-  
-                XACapabilities temp;
-                memset(pDescriptor,0,sizeof(XAVideoCodecDescriptor));
-                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 = 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 */
-                }
-
-            }
-        }
-    }
-
-    DEBUG_API("<-XAVideoDecoderCapabilitiesItfImpl_GetDecoderCapabilities");
-    return res;
-}
-
-/**
- * XAVideoDecoderCapabilitiesItfImpl -specific methods
- **/
-
-/* XAVideoDecoderCapabilitiesItfImpl_Create
- * Description: Allocate and initialize XAVideoDecoderCapabilitiesItfImpl
- */
-XAVideoDecoderCapabilitiesItfImpl* XAVideoDecoderCapabilitiesItfImpl_Create()
-{
-    XAVideoDecoderCapabilitiesItfImpl* self = (XAVideoDecoderCapabilitiesItfImpl*)
-        calloc(1,sizeof(XAVideoDecoderCapabilitiesItfImpl));
-    DEBUG_API("->XAVideoDecoderCapabilitiesItfImpl_Create");
-
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.GetVideoDecoders =
-            XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoders;
-        self->itf.GetVideoDecoderCapabilities =
-            XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoderCapabilities;
-
-  
-        /* init variables */
-        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_DECODER|XACAP_VIDEO),
-                                  &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAVideoDecoderCapabilitiesItfImpl_Create");
-    return self;
-}
-
-/* void XAVideoDecoderCapabilitiesItfImpl_Free
- * Description: Free all resources reserved at XAVideoDecoderCapabilitiesItfImpl_Create
- */
-void XAVideoDecoderCapabilitiesItfImpl_Free(XAVideoDecoderCapabilitiesItfImpl* self)
-{
-    DEBUG_API("->XAVideoDecoderCapabilitiesItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAVideoDecoderCapabilitiesItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/engine/xavideodecodercapabilitiesitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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 XAVIDEODECODERCAPABILITIESITF_H
-#define XAVIDEODECODERCAPABILITIESITF_H
-
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAVideoDecoderCapabilitiesItf implementation */
-typedef struct XAVideoDecoderCapabilitiesItfImpl_
-{
-    /* parent interface */
-    struct XAVideoDecoderCapabilitiesItf_ itf;
-    /* pointer to self */
-    struct XAVideoDecoderCapabilitiesItfImpl_* self;
-    /* variables */
-    XAuint32 numCodecs;
-} XAVideoDecoderCapabilitiesItfImpl;
-
-/* Base interface XAVideoDecoderCapabilitiesItf implementation */
-XAresult XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoders(
-                            XAVideoDecoderCapabilitiesItf self,
-                            XAuint32* pNumDecoders,
-                            XAuint32* pDecoderIds);
-
-XAresult XAVideoDecoderCapabilitiesItfImpl_GetVideoDecoderCapabilities(
-                            XAVideoDecoderCapabilitiesItf self,
-                            XAuint32 decoderId,
-                            XAuint32* pIndex,
-                            XAVideoCodecDescriptor* pDescriptor);
-
-/* XAVideoDecoderCapabilitiesItfImpl -specific methods */
-XAVideoDecoderCapabilitiesItfImpl* XAVideoDecoderCapabilitiesItfImpl_Create(void);
-void XAVideoDecoderCapabilitiesItfImpl_Free(XAVideoDecoderCapabilitiesItfImpl* self);
-
-#endif /* XAVIDEODECODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xavideoencodercapabilitiesitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#include "xaglobals.h"
-#include "xavideoencodercapabilitiesitf.h"
-
-#include "xacapabilitiesmgr.h"
-
-/* XAVideoEncoderCapabilitiesItfImpl* GetImpl
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAVideoEncoderCapabilitiesItfImpl* GetImpl(XAVideoEncoderCapabilitiesItf self)
-{
-    if( self )
-    {
-        XAVideoEncoderCapabilitiesItfImpl* impl = (XAVideoEncoderCapabilitiesItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAVideoEncoderCapabilitiesItf implementation
- **/
-
-/* XAresult XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoders
- * Description: Retrieves available video encoders.
- */
-XAresult XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoders(
-                            XAVideoEncoderCapabilitiesItf self,
-                            XAuint32* pNumEncoders,
-                            XAuint32* pEncoderIds)
-{
-    XAVideoEncoderCapabilitiesItfImpl* impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoders");
-
-    if( !impl || !pNumEncoders )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        if( pEncoderIds )
-        {   /* query array of encoders */
-            if( *pNumEncoders < impl->numCodecs )
-            {
-                DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
-                res = XA_RESULT_BUFFER_INSUFFICIENT;
-            }
-            else
-            {
-                
-  
-                XAuint32 i = 0;
-                XACapabilities temp;
-                for( i=0; i<impl->numCodecs; i++ )
-                {
-                    /* query encoder id from adaptation using index value */
-                    XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), i, &temp);
-                    pEncoderIds[i] = temp.xaid;
-                }
-
-            }
-        }
-        /* return number of encoders */
-        *pNumEncoders = impl->numCodecs;
-    }
-
-    DEBUG_API("<-XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoders");
-    return res;
-}
-
-/* XAresult XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoderCapabilities
- * Description: Retrieves video encoder capabilities.
- */
-XAresult XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoderCapabilities(
-                            XAVideoEncoderCapabilitiesItf self,
-                            XAuint32 encoderId,
-                            XAuint32* pIndex,
-                            XAVideoCodecDescriptor* pDescriptor)
-{
-    XAVideoEncoderCapabilitiesItfImpl* impl = NULL;
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAVideoEncoderCapabilitiesItfImpl_GetEncoderCapabilities");
-    impl = GetImpl(self);
-    if( !impl || !pIndex )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        if( !pDescriptor )
-        {   /* query number of capa structures */
-            *pIndex = 1;
-        }
-        else
-        {   /* query capabilities */
-            if( *pIndex >= 1 )
-            {
-                DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-                res = XA_RESULT_PARAMETER_INVALID;
-            }
-            else
-            {
-  
-                /* query capabilities from adaptation using codec id */
-                XACapabilities temp;
-                memset(pDescriptor,0,sizeof(XAVideoCodecDescriptor));
-                res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), encoderId, &temp);
-                if( res == XA_RESULT_SUCCESS )
-                {
-                    XAVideoCodecDescriptor* desc = (XAVideoCodecDescriptor*)(&temp.pEntry);
-                    /* map applicable values to XAVideoCodecCapabilities */
-                    pDescriptor->codecId = temp.xaid;
-                    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 */
-                }
-            
-            }
-        }
-    }
-
-    DEBUG_API("<-XAVideoEncoderCapabilitiesItfImpl_GetEncoderCapabilities");
-    return res;
-}
-
-/**
- * XAVideoEncoderCapabilitiesItfImpl -specific methods
- **/
-
-/* XAVideoEncoderCapabilitiesItfImpl_Create
- * Description: Allocate and initialize XAVideoEncoderCapabilitiesItfImpl
- */
-XAVideoEncoderCapabilitiesItfImpl* XAVideoEncoderCapabilitiesItfImpl_Create()
-{
-    XAVideoEncoderCapabilitiesItfImpl* self = (XAVideoEncoderCapabilitiesItfImpl*)
-        calloc(1,sizeof(XAVideoEncoderCapabilitiesItfImpl));
-    DEBUG_API("->XAVideoEncoderCapabilitiesItfImpl_Create");
-
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.GetVideoEncoders =
-            XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoders;
-        self->itf.GetVideoEncoderCapabilities =
-            XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoderCapabilities;
-
-  
-        /* init variables */
-        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO),
-                                  &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-
-        self->self = self;
-    }
-    DEBUG_API("<-XAVideoEncoderCapabilitiesItfImpl_Create");
-    return self;
-}
-
-/* void XAVideoEncoderCapabilitiesItfImpl_Free
- * Description: Free all resources reserved at XAVideoEncoderCapabilitiesItfImpl_Create
- */
-void XAVideoEncoderCapabilitiesItfImpl_Free(XAVideoEncoderCapabilitiesItfImpl* self)
-{
-    DEBUG_API("->XAVideoEncoderCapabilitiesItfImpl_Free");
-    assert(self==self->self);
-    free(self);
-    DEBUG_API("<-XAVideoEncoderCapabilitiesItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/engine/xavideoencodercapabilitiesitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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 XAVIDEOENCODERCAPABILITIESITF_H
-#define XAVIDEOENCODERCAPABILITIESITF_H
-
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAVideoEncoderCapabilitiesItf implementation */
-typedef struct XAVideoEncoderCapabilitiesItfImpl_
-{
-    /* parent interface */
-    struct XAVideoEncoderCapabilitiesItf_ itf;
-    /* pointer to self */
-    struct XAVideoEncoderCapabilitiesItfImpl_* self;
-    /* variables */
-    XAuint32 numCodecs;
-} XAVideoEncoderCapabilitiesItfImpl;
-
-/* Base interface XAVideoEncoderCapabilitiesItf implementation */
-XAresult XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoders(
-                            XAVideoEncoderCapabilitiesItf self,
-                            XAuint32* pNumEncoders,
-                            XAuint32* pEncoderIds);
-
-XAresult XAVideoEncoderCapabilitiesItfImpl_GetVideoEncoderCapabilities(
-                            XAVideoEncoderCapabilitiesItf self,
-                            XAuint32 decoderId,
-                            XAuint32* pIndex,
-                            XAVideoCodecDescriptor* pDescriptor);
-
-/* XAVideoEncoderCapabilitiesItfImpl -specific methods */
-XAVideoEncoderCapabilitiesItfImpl* XAVideoEncoderCapabilitiesItfImpl_Create(void);
-void XAVideoEncoderCapabilitiesItfImpl_Free(XAVideoEncoderCapabilitiesItfImpl* self);
-
-#endif /* XAVIDEOENCODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c	Wed Aug 18 10:17:22 2010 +0300
@@ -20,21 +20,9 @@
 #include <gst/gst.h>
 #include <gst/gstbuffer.h>
 #include "xaobjectitf.h"
-#include "xacameradevice.h"
 #include "xaradiodevice.h"
-#include "xaoutputmix.h"
-#include "xamediaplayeradaptctx.h"
-#include "xacameraadaptctx.h"
 #include <stdlib.h>
-
-#ifdef OMAX_CAMERABIN
-extern XAboolean cameraRealized;
-
-extern XACameraAdaptationCtx_* cameraCtx;
-#else
-XAboolean cameraRealized = XA_BOOLEAN_FALSE;
-XACameraAdaptationCtx_* cameraCtx = NULL;
-#endif
+#include "xaadaptationgst.h"
 /*
  * XAAdaptationGstCtx* XAAdaptationGst_Create()
  * 1st phase initialization function for Adaptation Base context structure.
@@ -55,6 +43,7 @@
             }
         else
             {
+            GError* gerror = 0;
             /*         Add default handler for Gst-bus messages */
             pSelf->busCb = XAAdaptationGst_GstBusCb;
 
@@ -63,6 +52,12 @@
             // VASU MOD ENDS
 
             sem_init(&(pSelf->semAsyncWait), 0, 0);
+//cross check
+            if ( !gst_init_check( NULL, NULL, &gerror ) )
+                {
+                    DEBUG_ERR("Gst Initalization failure.");
+                    return XA_RESULT_INTERNAL_ERROR;
+                }
             }
         }
     else
@@ -220,7 +215,8 @@
             DEBUG_INFO("Unhandled Gst-Bus message")
             ;
             break;
-        }DEBUG_API("<-XAAdaptationGst_GstBusCb");
+        }
+    DEBUG_API("<-XAAdaptationGst_GstBusCb");
     return TRUE;
     }
 
@@ -252,7 +248,8 @@
         {
         DEBUG_ERR_A1("could not create thread!! (%d)",ret)
         return XA_RESULT_INTERNAL_ERROR;
-        }DEBUG_API("<-XAAdaptationGst_InitGstListener");
+        }
+    DEBUG_API("<-XAAdaptationGst_InitGstListener");
     return XA_RESULT_SUCCESS;
     }
 
@@ -298,7 +295,8 @@
         {
         gst_object_unref(ctx->bus);
         ctx->bus = NULL;
-        }DEBUG_API("<-XAAdaptationGst_StopGstListener");
+        }
+    DEBUG_API("<-XAAdaptationGst_StopGstListener");
     }
 
 /*
@@ -363,7 +361,8 @@
                 GST_STATE(bCtx->bin), GST_STATE_TARGET(bCtx->bin), bCtx->binWantedState);
         bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
         sem_post(&(bCtx->semAsyncWait));
-        }DEBUG_API("<-XAAdaptationGst_CancelAsyncWait");
+        }
+    DEBUG_API("<-XAAdaptationGst_CancelAsyncWait");
     /* return false to remove timer */
     return FALSE;
     }
@@ -385,7 +384,8 @@
             { /* should not be, reset semaphore */
             sem_init(&(ctx->semAsyncWait), 0, 0);
             }
-        }DEBUG_API("<-XAAdaptationGst_CompleteAsyncWait");
+        }
+    DEBUG_API("<-XAAdaptationGst_CompleteAsyncWait");
     }
 
 /**
@@ -699,43 +699,8 @@
                         NULL);
                 break;
             case XA_DATALOCATOR_OUTPUTMIX:
-                DEBUG_INFO("Sink locator type - 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;
 
@@ -761,7 +726,8 @@
     if (gstSnk)
         {
         DEBUG_INFO_A1("Created gstreamer sink element at %x", gstSnk);
-        }DEBUG_API("<-XAAdaptationGst_CreateGstSink");
+        }
+    DEBUG_API("<-XAAdaptationGst_CreateGstSink");
     return gstSnk;
     }
 
@@ -947,7 +913,8 @@
             gst_object_unref(vpp);
             vpp = NULL;
             }
-        }DEBUG_API("<-XAAdaptationGst_CreateVideoPP");
+        }
+    DEBUG_API("<-XAAdaptationGst_CreateVideoPP");
     return vpp;
     }
 
@@ -1095,7 +1062,8 @@
             gst_object_unref(vpp);
             vpp = NULL;
             }
-        }DEBUG_API("<-XAAdaptationGst_CreateFixedSizeVideoPP");
+        }
+    DEBUG_API("<-XAAdaptationGst_CreateFixedSizeVideoPP");
     return vpp;
     }
 
@@ -1148,7 +1116,8 @@
             gst_object_unref(vppBScr);
             vppBScr = NULL;
             }
-        }DEBUG_API("<-XAAdaptationGst_CreateVideoPPBlackScr");
+        }
+    DEBUG_API("<-XAAdaptationGst_CreateVideoPPBlackScr");
     return vppBScr;
     }
 
@@ -1166,7 +1135,8 @@
     if (inputSelector)
         {
         g_object_set(G_OBJECT(inputSelector), "select-all", TRUE, NULL);
-        }DEBUG_API("<-XAAdaptationGst_CreateInputSelector");
+        }
+    DEBUG_API("<-XAAdaptationGst_CreateInputSelector");
     return inputSelector;
     }
 
--- a/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c	Wed Aug 18 10:17:22 2010 +0300
@@ -52,7 +52,8 @@
         mCtx->encodingchanged = XA_BOOLEAN_TRUE;
         memcpy(&mCtx->audioEncSettings, pSettings,
                 sizeof(XAAudioEncoderSettings));
-        }DEBUG_API("<-XAAudioEncoderItfAdapt_SetEncoderSettings");
+        }
+    DEBUG_API("<-XAAudioEncoderItfAdapt_SetEncoderSettings");
     return ret;
     }
 
--- a/khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +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 <string.h>
-#include <gst/gst.h>
-#include "xacameraadaptctx.h"
-#include "xaadaptationgst.h"
-#include <gst/interfaces/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");
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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 XACAMERAADAPTCTX_H
-#define XACAMERAADAPTCTX_H
-
-#include "xaadaptationgst.h"
-#ifdef OMAX_CAMERABIN
-#include <gst/interfaces/photography.h>
-#endif
-/* 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 */
-#ifdef OMAX_CAMERABIN
-    GstFocusStatus focusStatus;
-#endif
-    /* 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xacameraitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,429 +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 <gst/gst.h>
-#include <gst/interfaces/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xacameraitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +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 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_ */
--- a/khronosfws/openmax_al/src/gst_adaptation/xadevicevolumeitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +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 <gst/gst.h>
-#include <gst/interfaces/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xadevicevolumeitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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 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_ */
--- a/khronosfws/openmax_al/src/gst_adaptation/xadynamicsourceitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +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 <gst/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xadynamicsourceitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +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 XADYNAMICSOURCEITFADAPTATION_H
-#define XADYNAMICSOURCEITFADAPTATION_H
-
-#include "xaadaptationgst.h"
-
-
-/* FUNCTIONS */
-
-XAresult XADynamicSourceItfAdapt_SetSource(XAAdaptationGstCtx *bCtx, XADataSource *pDataSource);
-
-#endif /* XADYNAMICSOURCEITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaengineadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaengineadaptctx.c	Wed Aug 18 10:17:22 2010 +0300
@@ -169,8 +169,6 @@
 
     XAAdaptationBase_Free(&(ctx->baseObj.baseObj));
 
-/*    gst_deinit(); */
-
     free(ctx);
     ctx = NULL;
 
--- a/khronosfws/openmax_al/src/gst_adaptation/xaequalizeritfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +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 <gst/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;
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xaequalizeritfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.c	Wed Aug 18 10:17:22 2010 +0300
@@ -364,7 +364,8 @@
     if (!(*ppListHead))
         {
         *ppListHead = firstNode;
-        }DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+        }
+    DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
     return res;
     }
 
--- a/khronosfws/openmax_al/src/gst_adaptation/xaimagecontrolsitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,325 +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 <gst/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaimagecontrolsitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaimageeffectsitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,661 +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 <gst/gst.h>
-#include <gst/interfaces/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaimageeffectsitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaimageencoderitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +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 "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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaimageencoderitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaledarrayadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +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 <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");
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaledarrayadaptctx.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaledarrayitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +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 "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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaledarrayitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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 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_ */
--- a/khronosfws/openmax_al/src/gst_adaptation/xamediaplayeradaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1114 +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 <stdlib.h>
-#include <gst/gst.h>
-#include <gst/app/gstappsrc.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;
-}*/
--- a/khronosfws/openmax_al/src/gst_adaptation/xamediaplayeradaptctx.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +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 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*/
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c	Wed Aug 18 10:17:22 2010 +0300
@@ -21,11 +21,6 @@
 #include <gst/app/gstappsink.h>
 #include "xacapabilitiesmgr.h"
 #include "xamediarecorderadaptctx.h"
-#include "xacameraadaptctx.h"
-
-
-extern XAboolean cameraRealized;
-extern XACameraAdaptationCtx_* cameraCtx;
 
 /*forward declarations*/
 GstElement* XAMediaRecorderAdapt_CreateEncodeBin(
@@ -165,8 +160,6 @@
         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));
@@ -219,26 +212,6 @@
             pSelf->audioEncSettings.encodeOptions = 0;
             pSelf->audioEncSettings.blockAlignment = 0;
             }
-
-        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");
@@ -260,7 +233,8 @@
     DEBUG_API("->XAMediaRecorderAdapt_PostInit");
     if (bCtx == NULL || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
         {
-        DEBUG_ERR("Invalid parameter!!");DEBUG_API("<-XAMediaRecorderAdapt_PostInit");
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAMediaRecorderAdapt_PostInit");
         return XA_RESULT_PARAMETER_INVALID;
         }
     ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
@@ -354,7 +328,8 @@
 
     if (bCtx == NULL || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
         {
-        DEBUG_ERR("Invalid parameter!!");DEBUG_API("<-XAMediaRecorderAdapt_Destroy");
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAMediaRecorderAdapt_Destroy");
         return;
         }
     ctx = (XAMediaRecorderAdaptationCtx*) bCtx;
--- a/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.c	Wed Aug 18 10:17:22 2010 +0300
@@ -18,8 +18,7 @@
 #include <string.h>
 #include <gst/gst.h>
 #include "xaadaptationgst.h"
-#include "xametadataadaptctx.h"
-#include "xamediaplayeradaptctx.h"
+
 #include "xamediarecorderadaptctx.h"
 #include "xametadataadaptation.h"
 
@@ -111,16 +110,8 @@
     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 )
+    
+    if ( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
     {
         mdv = (XAMetadataAdaptVars*) calloc(1, sizeof(XAMetadataAdaptVars));
         mdv->currentchild = &(mdv->generaltags);
@@ -155,97 +146,7 @@
 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;
 }
@@ -621,7 +522,8 @@
                 DEBUG_ERR("Nodetype not supported!");
                 ret = XA_RESULT_CONTENT_UNSUPPORTED;
                 DEBUG_API_A1("<-XAMetadataInsertionItfAdapt_CreateChildNode (%d)", (int)ret);
-                return ret;            }
+                return ret;            
+            }
 
             mdv = mCtx->metadatavars;
             if(!mdv)
@@ -956,12 +858,8 @@
  */
 XAMetadataAdaptVars* XAMetadataAdapt_GetMetadataVars(XAAdaptationGstCtx *bCtx)
 {
-    if( bCtx->baseObj.ctxId == XAMDAdaptation ||
-        bCtx->baseObj.ctxId == XAMediaPlayerAdaptation )
-    {
-        return ((XAMediaPlayerAdaptationCtx*)bCtx)->metadatavars;
-    }
-    else if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
+    
+    if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
     {
         return ((XAMediaRecorderAdaptationCtx*)bCtx)->metadatavars;
     }
@@ -1087,13 +985,8 @@
                         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 )
+        
+        if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation )
         {
             old_tags = &((XAMediaRecorderAdaptationCtx*)bCtx)->metadatavars->generaltags;
             /* keep user's tags */
--- a/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +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 <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);
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptctx.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +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 <gst/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;
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixadaptctx.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +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 <string.h>
-#include <gst/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;
-}
-
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xaoutputmixitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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 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_ */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaplaybackrateitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +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 <gst/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;
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xaplaybackrateitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaplayitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,499 +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 <gst/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;
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xaplayitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaradioadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +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 <gst/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");
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaradioadaptctx.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xaradioitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,797 +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 <unistd.h>
-#include <gst/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");
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaradioitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,877 +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 <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");
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.c	Wed Aug 18 10:17:22 2010 +0300
@@ -20,14 +20,11 @@
 #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.
@@ -74,30 +71,6 @@
                     }
                 }
 
-            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)
@@ -120,29 +93,6 @@
             }
         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)
                 {
@@ -163,11 +113,6 @@
             }
         case XA_RECORDSTATE_RECORDING:
             {
-            if (cameraCtx && mCtx->isobjvsrc)
-                {
-                cameraCtx->recording = XA_BOOLEAN_TRUE;
-                }
-
             if (mCtx->xaRecordState == XA_RECORDSTATE_STOPPED
                     && (mCtx->encodingchanged))
                 {
@@ -288,7 +233,8 @@
                 gret = gst_element_get_state(GST_ELEMENT(mCtx->videosource),
                         NULL, NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
             }
-        }DEBUG_API("<-XARecordItfAdapt_SetRecordState");
+        }
+    DEBUG_API("<-XARecordItfAdapt_SetRecordState");
     return ret;
     }
 
--- a/khronosfws/openmax_al/src/gst_adaptation/xaseekitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +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 <gst/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xaseekitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xasnapshotitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,891 +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 <string.h>
-#include <gst/gst.h>
-#include <gst/app/gstappsrc.h>
-#include <gst/app/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);
-    }
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xasnapshotitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xastaticcameracapsadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,562 +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 <stdio.h>
-#include <string.h>
-#include <gst/gst.h>
-#include <gst/interfaces/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xastaticcameracapsadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,899 +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: StreamInformation Itf Adaptation Source
- *
- */
-
-#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_A1("Adaptation Context- ID is [%u] ",
-                (unsigned int)adaptCtx->ctxId );
-
-    /* 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;
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +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: StreamInformation Itf Adaptation header
- *
- */
- 
-#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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xavibraadaptctx.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +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 <gst/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");
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xavibraadaptctx.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xavibraitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +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 "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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xavibraitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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 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_ */
--- a/khronosfws/openmax_al/src/gst_adaptation/xavideoencoderitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +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 <gst/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;
-}
--- a/khronosfws/openmax_al/src/gst_adaptation/xavideoencoderitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xavideopostprosessingitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,863 +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 <gst/gst.h>
-#include <gst/video/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;
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xavideopostprosessingitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +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 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 */
--- a/khronosfws/openmax_al/src/gst_adaptation/xavolumeitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,502 +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 <gst/gst.h>
-#include <gst/interfaces/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;
-}
-
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xavolumeitfadaptation.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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 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	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,348 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xaledarraydevice.h"
-#include "xaledarrayitf.h"
-#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]=
-{
-    &XA_IID_OBJECT,
-    &XA_IID_LED,
-    &XA_IID_CONFIGEXTENSION,
-    &XA_IID_DYNAMICINTERFACEMANAGEMENT,
-};
-
-
-/*****************************************************************************
- * Global methods
- *****************************************************************************/
-
-/* XAResult XALEDArrayDeviceImpl_Create
- * Description: Create object
- */
-XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice(FrameworkMap* mapper,
-                                                   XAObjectItf* pDevice,
-                                                   XAuint32 deviceID,
-                                                   XAuint32 numInterfaces,
-                                                   const XAInterfaceID * pInterfaceIds,
-                                                   const XAboolean * pInterfaceRequired)
-{
-
-    
-    XAuint8 itfIndex = 0;
-
-    XALEDArrayDeviceImpl* pImpl = NULL;
-    XAObjectItfImpl* pBaseObj = NULL;
-    
-
-    DEBUG_API("->XALEDArrayDeviceImpl_Create");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSLEDArray);
-
-    if( !pDevice )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayDeviceImpl_Create");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* instantiate object implementation */
-    pImpl = (XALEDArrayDeviceImpl*)calloc(1,sizeof(XALEDArrayDeviceImpl));
-    if( !pImpl )
-    {
-        /* memory allocation failed */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-        DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-        DEBUG_API("<-XALEDArrayDeviceImpl_Create");
-        return XA_RESULT_MEMORY_FAILURE;
-    }
-    pBaseObj = &pImpl->baseObj;
-
-
-
-    /* Initialize base object default implementation */
-    XAObjectItfImpl_Init(pBaseObj,
-                         LEDARRAY_ITFCOUNT,
-                         XALEDArrayDeviceItfIIDs,
-                         XALEDArrayDeviceImpl_DoRealize,
-                         XALEDArrayDeviceImpl_DoResume,
-                         XALEDArrayDeviceImpl_FreeResources);
-
-    /* Mark interfaces that need to be exposed */
-    /* Implicit and mandated interfaces */
-    pBaseObj->interfaceMap[LEDARRAY_LEDARRAYITF].required = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[LEDARRAY_DIMITF].required = XA_BOOLEAN_TRUE;
-
-    /* Explicit interfaces */
-    if( (numInterfaces != 0) && pInterfaceIds && pInterfaceRequired )
-    {
-        /* Check required interfaces */
-        for( itfIndex = 0; itfIndex < numInterfaces; itfIndex++ )
-        {
-            /* If mapEntry is null then required interface is not supported.*/
-            XAObjItfMapEntry *entry =
-                XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIndex]);
-           if( !entry  )
-            {
-                if( pInterfaceRequired[itfIndex] )
-                {
-                    /* required interface cannot be accommodated - fail creation */
-                    XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
-                    XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-                    DEBUG_ERR("Required interface not found - abort creation!");
-                    DEBUG_API("<-XALEDArrayDeviceImpl_Create");
-                    return XA_RESULT_FEATURE_UNSUPPORTED;
-                }
-                else
-                {
-                    DEBUG_INFO("Requested (not required) interface not found - continue creation");
-                }
-            }
-            else
-            {
-                entry->required = XA_BOOLEAN_TRUE;
-            }
-        }
-    }
-
-    
-    /* This code is put here to return Feature Not Supported since adaptation is not present*/
-    /*************************************************/
-    XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-    DEBUG_ERR("Required interface not found - abort creation!");
-    DEBUG_API("<-XALEDArrayDeviceImpl_Create");
-    return XA_RESULT_FEATURE_UNSUPPORTED;
-    /*************************************************/    
-    
-/*    // 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;*/
-}
-
-/* XAResult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces
- * Description: Statically query number of supported interfaces
- */
-XAresult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces( XAuint32 *pNumSupportedInterfaces )
-{
-    DEBUG_API("->XALEDArrayDeviceImpl_QueryNumSupportedInterfaces");
-    if( pNumSupportedInterfaces )
-    {
-  
-        *pNumSupportedInterfaces = LEDARRAY_ITFCOUNT;
-
-        DEBUG_API_A1("<-XALEDArrayDeviceImpl_QueryNumSupportedInterfaces - %ld", *pNumSupportedInterfaces );
-        return XA_RESULT_SUCCESS;
-    }
-    else
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayDeviceImpl_QueryNumSupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-}
-/* XAResult XALEDArrayDeviceImpl_QuerySupportedInterfaces
- * Description: Statically query supported interfaces
- */
-XAresult XALEDArrayDeviceImpl_QuerySupportedInterfaces( XAuint32 index,
-                                                      XAInterfaceID * pInterfaceId )
-{
-    DEBUG_API("->XALEDArrayDeviceImpl_QuerySupportedInterfaces");
-
-  
-    if( index >= LEDARRAY_ITFCOUNT || !pInterfaceId )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayDeviceImpl_QuerySupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        *pInterfaceId = *(XALEDArrayDeviceItfIIDs[index]);
-
-        DEBUG_API("<-XALEDArrayDeviceImpl_QuerySupportedInterfaces");
-        return XA_RESULT_SUCCESS;
-  
-    }
-    
-}
-
-
-/*****************************************************************************
- * base object XAObjectItfImpl methods
- *****************************************************************************/
-
-/* XAresult XALEDArrayDeviceImpl_DoRealize( XAObjectItf self )
- * Description: Realize all implicit and explicitly wanted interfaces.
- * Create and initialize implementation-specific variables.
- * Called from base object XAObjectItfImpl
- */
-XAresult XALEDArrayDeviceImpl_DoRealize( XAObjectItf self )
-{
-
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XAuint8 itfIdx = 0;
-    XALEDArrayDeviceImpl* pObjImpl = (XALEDArrayDeviceImpl*)(pObj);
-    XAresult ret = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XALEDArrayDeviceImpl_DoRealize");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSLEDArray);
-
-    /* check casting from correct pointer type */
-    if( !pObjImpl || pObj != pObjImpl->baseObj.self )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayDeviceImpl_DoRealize");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    ret = XALEDArrayAdapt_PostInit( (XAAdaptationGstCtx*)pObjImpl->adaptationCtx );
-    if( ret != XA_RESULT_SUCCESS )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-        DEBUG_ERR_A1("Error: %d",ret);
-        DEBUG_API("<-XALEDArrayDeviceImpl_DoRealize");
-        return ret;
-    }
-
-    /* Realize all implicit and explicitly wanted interfaces */
-    for( itfIdx = 0; itfIdx < LEDARRAY_ITFCOUNT; itfIdx++)
-    {
-        if( !(pObj->interfaceMap[itfIdx].pItf) &&
-            pObj->interfaceMap[itfIdx].required )
-        {
-            void *pItf = NULL;
-            switch( itfIdx )
-            {
-                case LEDARRAY_LEDARRAYITF:
-                    pItf = XALEDArrayItfImpl_Create( pObjImpl->adaptationCtx );
-                    break;
-                case LEDARRAY_CONFIGEXTENSIONITF:
-                    pItf = XAConfigExtensionsItfImpl_Create();
-                    break;
-                case LEDARRAY_DIMITF:
-                    pItf = XADIMItfImpl_Create();
-                    break;
-                default:
-                    break;
-            }
-            if( !pItf )
-            {
-                /* memory allocation failed */
-                XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-                DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-                DEBUG_API("<-XALEDArrayDeviceImpl_DoRealize");
-                return XA_RESULT_MEMORY_FAILURE;
-            }
-            else
-            {
-                pObj->interfaceMap[itfIdx].pItf = pItf;
-            }
-        }
-    }
-
-    pObj->state = XA_OBJECT_STATE_REALIZED;
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-    
-    DEBUG_API("<-XALEDArrayDeviceImpl_DoRealize");
-    return XA_RESULT_SUCCESS;
-}
-
-/* XAresult XALEDArrayDeviceImpl_DoResume
- * Description: Resume object from suspended state
- */
-XAresult XALEDArrayDeviceImpl_DoResume(XAObjectItf self)
-{
-    DEBUG_API("->XALEDArrayDeviceImpl_DoResume");
-    DEBUG_API("<-XALEDArrayDeviceImpl_DoResume");
-    /* This implementation does not support suspended state */
-    return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
-
-/* void XALEDArrayDeviceImpl_FreeResources
- * Description: Free all resources reserved at XALEDArrayDeviceImpl_DoRealize()
- */
-void XALEDArrayDeviceImpl_FreeResources(XAObjectItf self)
-{
-  
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XALEDArrayDeviceImpl* pImpl = (XALEDArrayDeviceImpl*)(*self);
-    XAuint8 itfIdx = 0;
-    DEBUG_API("->XALEDArrayDeviceImpl_FreeResources");
-    XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSLEDArray);
-    assert( pObj && pImpl && pObj == pObj->self );
-
-    if ( pImpl->adaptationCtx != NULL )
-    {
-        XALEDArrayAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
-        pImpl->adaptationCtx = NULL;
-    }
-
-    /* free all allocated interfaces */
-    for(itfIdx = 0; itfIdx < LEDARRAY_ITFCOUNT; itfIdx++)
-    {
-        void *pItf = pObj->interfaceMap[itfIdx].pItf;
-        if(pItf)
-        {
-            switch(itfIdx)
-            {
-                case LEDARRAY_LEDARRAYITF:
-                    XALEDArrayItfImpl_Free( pItf );
-                    break;
-                case LEDARRAY_CONFIGEXTENSIONITF:
-                    XAConfigExtensionsItfImpl_Free( pItf );
-                    break;
-                case LEDARRAY_DIMITF:
-                    XADIMItfImpl_Free( pItf );
-                    break;
-
-                default:
-                    break;
-            }
-            pObj->interfaceMap[itfIdx].pItf = NULL;
-        }
-    }
-
-    if ( pImpl->adaptationCtx != NULL )
-    {
-        XALEDArrayAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
-        pImpl->adaptationCtx = NULL;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSLEDArray);
-    DEBUG_API("<-XALEDArrayDeviceImpl_FreeResources");
-    
-    return;
-}
-/* END OF FILE */
--- a/khronosfws/openmax_al/src/ledarray/xaledarraydevice.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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 XALEDARRAYDEVICE_H
-#define XALEDARRAYDEVICE_H
-
-#include "openmaxalwrapper.h"
-#include "xaobjectitf.h"
-#include "xaglobals.h"
-
-#include "xaadptbasectx.h"
-/** MACROS **/
-
-
-/** TYPES **/
-
-
-/** ENUMERATIONS **/
-/* Enumeration for interfaces that LEDArrayDevice supports.  */
-typedef enum
-{
-    LEDARRAY_OBJECTITF,
-    LEDARRAY_LEDARRAYITF,
-    LEDARRAY_CONFIGEXTENSIONITF,
-    LEDARRAY_DIMITF,
-    LEDARRAY_ITFCOUNT
-} XALEDArrayDeviceInterfaces;
-
-/** STRUCTURES **/
-/* Specification for LEDArrayDeviceImpl. */
-typedef struct XALEDArrayDeviceImpl_
-{
-    /* Parent for XALEDArrayDeviceImpl */
-    XAObjectItfImpl baseObj;
-
-    /* variables */
-    XAuint32 deviceID;
-
-    XAAdaptationBaseCtx* adaptationCtx;
-
-} XALEDArrayDeviceImpl;
-
-
-/** METHODS **/
-
-/* base object XAObjectItfImpl methods */
-XAresult    XALEDArrayDeviceImpl_DoRealize(XAObjectItf self);
-XAresult    XALEDArrayDeviceImpl_DoResume(XAObjectItf self);
-void        XALEDArrayDeviceImpl_FreeResources(XAObjectItf self);
-
-#endif /* XALEDARRAYDEVICE_H */
--- a/khronosfws/openmax_al/src/ledarray/xaledarrayitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xaledarrayitf.h"
-  
-#include "xaledarrayitfadaptation.h"
-
-#include "xathreadsafety.h"
-
-/* XALEDArrayItfImpl* GetImpl(XALEDArrayItf self)
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XALEDArrayItfImpl* GetImpl(XALEDArrayItf self)
-{
-    if( self )
-    {
-        XALEDArrayItfImpl* impl = (XALEDArrayItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/*****************************************************************************
- * Base interface XALEDArrayItf implementation
- *****************************************************************************/
-/*
- * XAresult XALEDArrayItfImpl_ActivateLEDArray ( XALEDArrayItf self,
- *                                               XAuint32 lightMask )
- * Description: Activates or deactivates individual LEDs in an array of LEDs.
- */
-XAresult XALEDArrayItfImpl_ActivateLEDArray ( XALEDArrayItf self,
-                                              XAuint32 lightMask )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XALEDArrayItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XALEDArrayItfImpl_ActivateLEDArray");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSLEDArray);
-
-    if( !impl || lightMask > LED_COUNT)
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayItfImpl_ActivateLEDArray");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is ligtMask mode changed */
-    if( impl->lightMask != lightMask )
-    {
-  
-        ret = XALEDArrayItfAdapt_ActivateLEDArray( (XAAdaptationGstCtx*)impl->adapCtx, lightMask );
-
-        if ( ret == XA_RESULT_SUCCESS )
-        {
-            impl->lightMask = lightMask;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-    DEBUG_API("<-XALEDArrayItfImpl_ActivateLEDArray");
-    return ret;
-}
-/*
- * XAresult XALEDArrayItfImpl_IsLEDArrayActivated ( XALEDArrayItf self,
- *                                                  XAuint32 * pLightMask )
- * Description: Returns the state of each LED in an array of LEDs.
- */
-XAresult XALEDArrayItfImpl_IsLEDArrayActivated ( XALEDArrayItf self,
-                                                 XAuint32 * pLightMask )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XALEDArrayItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XALEDArrayItfImpl_IsLEDArrayActivated");
-
-    if( !impl || !pLightMask)
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayItfImpl_IsLEDArrayActivated");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pLightMask = impl->lightMask;
-
-    if( *pLightMask )
-    {
-        DEBUG_API("The LED is on.");
-    }
-    else
-    {
-        DEBUG_API("The LED is off.");
-    }
-
-    DEBUG_API("<-XALEDArrayItfImpl_IsLEDArrayActivated");
-    return ret;
-}
-/*
- * XAresult XALEDArrayItfImpl_SetColor ( XALEDArrayItf self,
- *                                       XAuint8 index,
- *                                       const XAHSL * pColor )
- * Description: Sets the color of an individual LED.
- */
-XAresult XALEDArrayItfImpl_SetColor ( XALEDArrayItf self,
-                                      XAuint8 index,
-                                      const XAHSL * pColor )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XALEDArrayItfImpl* impl = GetImpl(self);
-    XAboolean support = XA_BOOLEAN_FALSE;
-
-    DEBUG_API("->XALEDArrayItfImpl_SetColor");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSLEDArray);
-
-    if( !impl || index > LED_COUNT - 1 || !pColor )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayItfImpl_SetColor");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    support = ( COLOR_MASK >> index ) & 0x1;
-    if( !support ) /* Not supporting color*/
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED: not supporting color");
-        DEBUG_API("<-XALEDArrayItfImpl_SetColor");
-        return XA_RESULT_PRECONDITIONS_VIOLATED;
-    }
-    else
-    {
-  
-        ret = XALEDArrayItfAdapt_SetColor( (XAAdaptationGstCtx*)impl->adapCtx, index, pColor);
-
-        if ( ret == XA_RESULT_SUCCESS )
-        {
-            impl->color = *pColor;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
-    DEBUG_API("<-XALEDArrayItfImpl_SetColor");
-    return ret;
-}
-/*
- * XAresult XALEDArrayItfImpl_GetColor ( XALEDArrayItf self,
- *                                       XAuint8 index,
- *                                       const XAHSL * pColor )
- * Description: Returns the color of an individual LED.
- */
-XAresult XALEDArrayItfImpl_GetColor ( XALEDArrayItf self,
-                                      XAuint8 index,
-                                      XAHSL * pColor )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XALEDArrayItfImpl* impl = GetImpl(self);
-    XAboolean support = XA_BOOLEAN_FALSE;
-    DEBUG_API("->XALEDArrayItfImpl_GetColor");
-
-    if( !impl || index > LED_COUNT - 1 || !pColor )
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XALEDArrayItfImpl_GetColor");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    support = ( COLOR_MASK >> index ) & 0x1;
-    if( !support ) /* Not supporting color*/
-    {
-        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED: not supporting color");
-        DEBUG_API("<-XALEDArrayItfImpl_GetColor");
-        return XA_RESULT_PRECONDITIONS_VIOLATED;
-    }
-    else
-    {
-        *pColor = impl->color;
-    }
-
-    DEBUG_API_A3("<-XALEDArrayItfImpl_GetColor: hue = %ld, saturation = %d, lightness = %d", pColor->hue, pColor->saturation, pColor->lightness);
-    return ret;
-}
-
-/*****************************************************************************
- * XALEDArrayItfImpl -specific methods
- *****************************************************************************/
-  
-
-/* XALEDArrayItfImpl* XALEDArrayItfImpl_Create()
- * Description: Allocate and initialize LEDArrayItfImpl
- */
-XALEDArrayItfImpl* XALEDArrayItfImpl_Create( XAAdaptationBaseCtx *adapCtx )
-{
-    XALEDArrayItfImpl* self = (XALEDArrayItfImpl*)
-        calloc(1,sizeof(XALEDArrayItfImpl));
-    DEBUG_API("->XALEDArrayItfImpl_Create");
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.ActivateLEDArray = XALEDArrayItfImpl_ActivateLEDArray;
-        self->itf.IsLEDArrayActivated = XALEDArrayItfImpl_IsLEDArrayActivated;
-        self->itf.SetColor = XALEDArrayItfImpl_SetColor;
-        self->itf.GetColor = XALEDArrayItfImpl_GetColor;
-
-        /* init variables */
-        self->lightMask = 0;
-        self->color.hue = 0;
-        self->color.saturation = 0;
-        self->color.lightness = 0;
-        self->adapCtx = adapCtx;
-
-        self->self = self;
-    }
-
-    DEBUG_API("<-XALEDArrayItfImpl_Create");
-    return self;
-}
-
-/* void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self)
- * Description: Free all resources reserved at XALEDArrayItfImpl_Create
- */
-void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self)
-{
-    DEBUG_API("->XALEDArrayItfImpl_Free");
-    assert( self==self->self );
-    free( self );
-    DEBUG_API("<-XALEDArrayItfImpl_Free");
-}
--- a/khronosfws/openmax_al/src/ledarray/xaledarrayitf.h	Tue Jul 06 14:50:35 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 XALEDARRAYITF_H
-#define XALEDARRAYITF_H
-
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-#define LED_COUNT 1
-#define PRIMARY_LED 0
-#define COLOR_MASK 1
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XALEDArrayItf implementation */
-typedef struct XALEDArrayItfImpl_
-{
-    /* parent interface */
-    struct XALEDArrayItf_ itf;
-    /* pointer to self */
-    struct XALEDArrayItfImpl_* self;
-
-    /* variables */
-    XAuint32    lightMask;
-    XAHSL       color;
-
- 
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-
-} XALEDArrayItfImpl;
-
-/** METHODS **/
-
-/* Base interface XALEDArrayItf implementation
- *See API Specification for method documentation
- */
-XAresult XALEDArrayItfImpl_ActivateLEDArray ( XALEDArrayItf self, XAuint32 lightMask );
-XAresult XALEDArrayItfImpl_IsLEDArrayActivated ( XALEDArrayItf self, XAuint32 * pLightMask );
-XAresult XALEDArrayItfImpl_SetColor ( XALEDArrayItf self, XAuint8 index, const XAHSL * pColor );
-XAresult XALEDArrayItfImpl_GetColor ( XALEDArrayItf self, XAuint8 index, XAHSL * pColor );
-/* XALEDArrayItfImpl -specific methods */
- 
-XALEDArrayItfImpl* XALEDArrayItfImpl_Create( XAAdaptationBaseCtx *adapCtx );
-void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self);
-
-
-#endif /* XALEDARRAYITF_H */
--- a/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.c	Wed Aug 18 10:17:22 2010 +0300
@@ -26,12 +26,7 @@
 #include "xadynintmgmtitf.h"
 #include "xavolumeitf.h"
 #include "xametadataextractionitf.h"
-#include "xametadatatraversalitf.h"
 #include "xaplaybackrateitf.h"
-#include "xaequalizeritf.h"
-#include "xaimagecontrolsitf.h"
-#include "xaimageeffectsitf.h"
-#include "xavideopostprocessingitf.h"
 #include "xaconfigextensionsitf.h"
 #include "xathreadsafety.h"
 #include "xametadataadaptation.h"
@@ -46,24 +41,19 @@
 /* Static mapping of enumeration XAMediaPlayerInterfaces to interface iids */
 static const XAInterfaceID* xaMediaPlayerItfIIDs[MP_ITFCOUNT] =
     {
-            &XA_IID_OBJECT,
-            &XA_IID_DYNAMICINTERFACEMANAGEMENT,
-            &XA_IID_PLAY,
-            &XA_IID_SEEK,
-            &XA_IID_VOLUME,
-            &XA_IID_PREFETCHSTATUS,
-            &XA_IID_CONFIGEXTENSION,
-            &XA_IID_DYNAMICSOURCE,
-            &XA_IID_EQUALIZER,
-            &XA_IID_IMAGECONTROLS,
-            &XA_IID_IMAGEEFFECTS,
-            &XA_IID_METADATAEXTRACTION,
-            &XA_IID_METADATATRAVERSAL,
-            &XA_IID_PLAYBACKRATE,
-            &XA_IID_VIDEOPOSTPROCESSING,
-            &XA_IID_NOKIAVOLUMEEXT,
-            &XA_IID_NOKIALINEARVOLUME,
-            &XA_IID_STREAMINFORMATION
+    &XA_IID_OBJECT,
+    &XA_IID_DYNAMICINTERFACEMANAGEMENT,
+    &XA_IID_PLAY,
+    &XA_IID_SEEK,
+    &XA_IID_VOLUME,
+    &XA_IID_PREFETCHSTATUS,
+    &XA_IID_CONFIGEXTENSION,
+    &XA_IID_DYNAMICSOURCE,
+    &XA_IID_METADATAEXTRACTION,
+    &XA_IID_PLAYBACKRATE,
+    &XA_IID_NOKIAVOLUMEEXT,
+    &XA_IID_NOKIALINEARVOLUME,
+    &XA_IID_STREAMINFORMATION
     };
 
 /* Global methods */
@@ -164,13 +154,8 @@
                 }
             else
                 { /* weed out unsupported content-aware itf's */
-                if ((mediaType == XA_MEDIATYPE_IMAGE && (entry->mapIdx
-                        == MP_SEEKITF || entry->mapIdx == MP_EQUALIZERITF
-                        || entry->mapIdx == MP_VOLUMEITF)) || (mediaType
-                        == XA_MEDIATYPE_AUDIO && (entry->mapIdx
-                        == MP_IMAGECONTROLSITF || entry->mapIdx
-                        == MP_IMAGEEFFECTSITF || entry->mapIdx
-                        == MP_VIDEOPOSTPROCESSINGITF)))
+                if ((mediaType == XA_MEDIATYPE_IMAGE && (entry->mapIdx == MP_SEEKITF 
+                        || entry->mapIdx == MP_VOLUMEITF)))
                     {
                     entry->required = XA_BOOLEAN_FALSE;
                     if (pInterfaceRequired[itfIdx])
@@ -196,12 +181,8 @@
 
     /* Mark interfaces that can be handled dynamically */
     /* Mandated dynamic itfs */
-    pBaseObj->interfaceMap[MP_EQUALIZERITF].isDynamic = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[MP_IMAGEEFFECTSITF].isDynamic = XA_BOOLEAN_TRUE;
     pBaseObj->interfaceMap[MP_METADATAEXTRACTIONITF].isDynamic
             = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[MP_METADATATRAVERSALITF].isDynamic
-            = XA_BOOLEAN_TRUE;
     pBaseObj->interfaceMap[MP_PLAYBACKRATEITF].isDynamic = XA_BOOLEAN_TRUE;
 
     /*Set ObjectItf to point to newly created object*/
@@ -258,15 +239,6 @@
 
         pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxMMF;
         }
-    else
-        {
-        pPlayerImpl->adaptationCtxGst = XAMediaPlayerAdapt_Create(
-                pPlayerImpl->dataSrc, pPlayerImpl->bankSrc,
-                pPlayerImpl->audioSnk, pPlayerImpl->imageVideoSnk,
-                pPlayerImpl->vibra, pPlayerImpl->LEDArray);
-
-        pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxGst;
-        }
 
     pPlayerImpl->curAdaptCtx->capslist = capabilities;
     pPlayerImpl->curAdaptCtx->fwtype = fwType;
@@ -401,10 +373,6 @@
                     pItf = XAMetadataExtractionItfImpl_Create(
                             pImpl->curAdaptCtx);
                     break;
-                case MP_METADATATRAVERSALITF:
-                    pItf = XAMetadataTraversalItfImpl_Create(
-                            pImpl->curAdaptCtx);
-                    break;
                 case MP_PLAYBACKRATEITF:
                     pItf = XAPlaybackRateItfImpl_Create(pImpl);
                     break;
@@ -416,20 +384,6 @@
                 case MP_DYNAMICSOURCEITF:
                     pItf = XADynamicSourceItfImpl_Create(pImpl->curAdaptCtx);
                     break;
-                case MP_EQUALIZERITF:
-                    pItf = XAEqualizerItfImpl_Create(pImpl->curAdaptCtx);
-                    break;
-#ifdef OMAX_CAMERABIN
-                    case MP_IMAGECONTROLSITF:
-                    pItf = XAImageControlsItfImpl_Create(pImpl->curAdaptCtx);
-                    break;
-                    case MP_IMAGEEFFECTSITF:
-                    pItf = XAImageEffectsItfImpl_Create(pImpl->curAdaptCtx);
-                    break;
-                    case MP_VIDEOPOSTPROCESSINGITF:
-                    pItf = XAVideoPostProcessingItfImpl_Create(pImpl->curAdaptCtx);
-                    break;
-#endif
                 case MP_NOKIAVOLUMEEXT:
                     pItf = XANokiaVolumeExtItfImpl_Create(pImpl->curAdaptCtx);
                     break;
@@ -464,11 +418,7 @@
         ret = XAMediaPlayerAdaptMMF_PostInit(
                 (XAAdaptationMMFCtx*) pImpl->adaptationCtxMMF);
         }
-    else
-        {
-        ret = XAMediaPlayerAdapt_PostInit(
-                (XAAdaptationGstCtx*) pImpl->adaptationCtxGst);
-        }
+
     if (ret != XA_RESULT_SUCCESS)
         {
         XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -533,9 +483,6 @@
                 case MP_METADATAEXTRACTIONITF:
                     XAMetadataExtractionItfImpl_Free(pItf);
                     break;
-                case MP_METADATATRAVERSALITF:
-                    XAMetadataTraversalItfImpl_Free(pItf);
-                    break;
                 case MP_PLAYBACKRATEITF:
                     XAPlaybackRateItfImpl_Free(pItf);
                     break;
@@ -545,20 +492,6 @@
                 case MP_DYNAMICSOURCEITF:
                     XADynamicSourceItfImpl_Free(pItf);
                     break;
-                case MP_EQUALIZERITF:
-                    XAEqualizerItfImpl_Free(pItf);
-                    break;
-#ifdef OMAX_CAMERABIN
-                    case MP_IMAGECONTROLSITF:
-                    XAImageControlsItfImpl_Free(pItf);
-                    break;
-                    case MP_IMAGEEFFECTSITF:
-                    XAImageEffectsItfImpl_Free(pItf);
-                    break;
-                    case MP_VIDEOPOSTPROCESSINGITF:
-                    XAVideoPostProcessingItfImpl_Free(pItf);
-                    break;
-#endif
                 case MP_NOKIAVOLUMEEXT:
                     XANokiaVolumeExtItfImpl_Free(pItf);
                     break;
@@ -581,11 +514,6 @@
             XAMediaPlayerAdaptMMF_Destroy(
                     (XAAdaptationMMFCtx*) pImpl->adaptationCtxMMF);
             }
-        else
-            {
-            XAMediaPlayerAdapt_Destroy(
-                    (XAAdaptationGstCtx*) pImpl->adaptationCtxGst);
-            }
         }
 
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
@@ -615,22 +543,9 @@
                 mapEntry->pItf = XAMetadataExtractionItfImpl_Create(
                         pImpl->curAdaptCtx);
                 break;
-            case MP_METADATATRAVERSALITF:
-                mapEntry->pItf = XAMetadataTraversalItfImpl_Create(
-                        pImpl->curAdaptCtx);
-                break;
             case MP_PLAYBACKRATEITF:
                 mapEntry->pItf = XAPlaybackRateItfImpl_Create(pImpl);
                 break;
-            case MP_EQUALIZERITF:
-                mapEntry->pItf
-                        = XAEqualizerItfImpl_Create(pImpl->curAdaptCtx);
-                break;
-#ifdef OMAX_CAMERABIN
-                case MP_IMAGEEFFECTSITF:
-                mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->curAdaptCtx );
-                break;
-#endif
             default:
                 DEBUG_ERR("XAMediaPlayerImpl_DoAddItf unknown id")
                 ;
@@ -683,20 +598,9 @@
             case MP_METADATAEXTRACTIONITF:
                 XAMetadataExtractionItfImpl_Free(mapEntry->pItf);
                 break;
-            case MP_METADATATRAVERSALITF:
-                XAMetadataTraversalItfImpl_Free(mapEntry->pItf);
-                break;
             case MP_PLAYBACKRATEITF:
                 XAPlaybackRateItfImpl_Free(mapEntry->pItf);
                 break;
-            case MP_EQUALIZERITF:
-                XAEqualizerItfImpl_Free(mapEntry->pItf);
-                break;
-#ifdef OMAX_CAMERABIN				
-                case MP_IMAGEEFFECTSITF:
-                XAImageEffectsItfImpl_Free(mapEntry->pItf);
-                break;
-#endif
             default:
                 DEBUG_ERR("XAMediaPlayerImpl_DoRemoveItf unknown id")
                 ;
--- a/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.h	Wed Aug 18 10:17:22 2010 +0300
@@ -21,7 +21,6 @@
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
 #include "xaobjectitf.h"
-#include "xamediaplayeradaptctx.h"
 #include "xamediaplayeradaptctxmmf.h"
 #include "xacapabilitiesmgr.h"
 /** MACROS **/
@@ -40,13 +39,8 @@
     MP_PREFETCHSTATUSITF,
     MP_CONFIGEXTENSIONITF,
     MP_DYNAMICSOURCEITF,
-    MP_EQUALIZERITF,
-    MP_IMAGECONTROLSITF,
-    MP_IMAGEEFFECTSITF,
     MP_METADATAEXTRACTIONITF,
-    MP_METADATATRAVERSALITF,
     MP_PLAYBACKRATEITF,
-    MP_VIDEOPOSTPROCESSINGITF,
     MP_NOKIAVOLUMEEXT,
     MP_NOKIALINEARVOLUME,
     MP_STREAMINFORMATIONITF,
--- a/khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplaybackrateitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -20,7 +20,6 @@
 #include <assert.h>
 #include "xaplaybackrateitf.h"
 
-#include "xaplaybackrateitfadaptation.h"
 #include "xaplaybackrateitfadaptationmmf.h"
 
 #include "xathreadsafety.h"
@@ -57,11 +56,7 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
 
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-        res = XAPlaybackRateItfAdapt_SetRate((XAAdaptationGstCtx*)impl->adaptCtx, rate);
-        }
-    else if(impl->adaptCtx->fwtype == FWMgrFWMMF)
+    if(impl->adaptCtx->fwtype == FWMgrFWMMF)
         {
         res = XAPlaybackRateItfAdaptMMF_SetRate((XAAdaptationMMFCtx*)impl->adaptCtx, rate);
         }
@@ -93,11 +88,8 @@
         DEBUG_API("<-XAPlaybackRateItfImpl_GetRate");
         return XA_RESULT_PARAMETER_INVALID;
     }
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-        *pRate = impl->currentRate;
-        }
-    else if(impl->adaptCtx->fwtype == FWMgrFWMMF)
+    
+    if(impl->adaptCtx->fwtype == FWMgrFWMMF)
         {
         *pRate = impl->currentRate;
         }
@@ -127,12 +119,7 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
     
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-        /* set to adaptation */
-        res = XAPlaybackRateItfAdapt_SetPropertyConstraints((XAAdaptationGstCtx*)impl->adaptCtx, constraints);
-        }
-    else if(impl->adaptCtx->fwtype == FWMgrFWMMF)
+    if(impl->adaptCtx->fwtype == FWMgrFWMMF)
         {
         /* set to adaptation */
         res = XAPlaybackRateItfAdaptMMF_SetPropertyConstraints((XAAdaptationMMFCtx*)impl->adaptCtx, constraints);
@@ -162,12 +149,7 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
    
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-        /* needs to be queried from adaptation */
-        res = XAPlaybackRateItfAdapt_GetProperties((XAAdaptationGstCtx*)impl->adaptCtx, pProperties);
-        }
-    else if(impl->adaptCtx->fwtype == FWMgrFWMMF)
+    if(impl->adaptCtx->fwtype == FWMgrFWMMF)
         {
         /* needs to be queried from adaptation */
         res = XAPlaybackRateItfAdaptMMF_GetProperties((XAAdaptationMMFCtx*)impl->adaptCtx, pProperties);
@@ -200,12 +182,7 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
     
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-        /* needs to be queried from adaptation */
-        res = XAPlaybackRateItfAdapt_GetCapabilitiesOfRate((XAAdaptationGstCtx*)impl->adaptCtx, rate, pCapabilities);
-        }
-    else if(impl->adaptCtx->fwtype == FWMgrFWMMF)
+    if(impl->adaptCtx->fwtype == FWMgrFWMMF)
         {
         /* needs to be queried from adaptation */
         res = XAPlaybackRateItfAdaptMMF_GetCapabilitiesOfRate((XAAdaptationMMFCtx*)impl->adaptCtx, rate, pCapabilities);
@@ -240,13 +217,8 @@
         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 if(impl->adaptCtx->fwtype == FWMgrFWMMF)
+    
+    if(impl->adaptCtx->fwtype == FWMgrFWMMF)
         {
         /* needs to be queried from adaptation */
         res = XAPlaybackRateItfAdaptMMF_GetRateRange((XAAdaptationMMFCtx*)impl->adaptCtx, index, pMinRate,
--- a/khronosfws/openmax_al/src/mediaplayer/xaplayitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplayitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -21,8 +21,6 @@
 
 #include "xaplayitf.h"
 
-#include "xaplayitfadaptation.h"
-
 #include "xaplayitfadaptationmmf.h"
 #include "xathreadsafety.h"
 #include <string.h>
@@ -73,31 +71,6 @@
         {
         ret = XAPlayItfAdaptMMF_SetPlayState(impl->pObjImpl->curAdaptCtx,
                 state);
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
-        DEBUG_API("<-XAPlayItfImpl_SetPlayState");
-        return ret;
-        }
-
-    /* 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 );
@@ -131,10 +104,6 @@
         ret = XAPlayItfAdaptMMF_GetPlayState(impl->pObjImpl->curAdaptCtx,
                 pState);
         }
-    else
-        {
-        *pState = impl->playbackState;
-        }
 
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
 
@@ -167,11 +136,6 @@
         ret = XAPlayItfAdaptMMF_GetDuration(impl->pObjImpl->curAdaptCtx,
                 pMsec);
         }
-    else
-        {
-        ret = XAPlayItfAdaptGST_GetDuration(
-                (XAAdaptationGstCtx*) impl->adapCtx, pMsec);
-        }
 
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
 
@@ -206,19 +170,6 @@
         ret = XAPlayItfAdaptMMF_GetPosition(impl->pObjImpl->curAdaptCtx,
                 pMsec);
         }
-    else
-        {
-
-        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");
@@ -289,7 +240,8 @@
             | XA_PLAYEVENT_HEADMOVING | XA_PLAYEVENT_HEADSTALLED)))
         {
         /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -307,29 +259,6 @@
         return ret;
         }
 
-    /* enable position tracking if client wants so */
-    if ((eventFlags & (XA_PLAYEVENT_HEADATMARKER | XA_PLAYEVENT_HEADATNEWPOS))
-            && impl->adapCtx && !impl->positionupdateOn)
-        {
-        ret = XAPlayItfAdapt_EnablePositionTracking(
-                (XAAdaptationGstCtx*) impl->adapCtx, XA_BOOLEAN_TRUE);
-        if (ret == XA_RESULT_SUCCESS)
-            {
-            impl->positionupdateOn = XA_BOOLEAN_TRUE;
-            }
-        }
-    else if (!(eventFlags & (XA_PLAYEVENT_HEADATMARKER
-            | XA_PLAYEVENT_HEADATNEWPOS)) && impl->adapCtx
-            && impl->positionupdateOn)
-        {
-        ret = XAPlayItfAdapt_EnablePositionTracking(
-                (XAAdaptationGstCtx*) impl->adapCtx, XA_BOOLEAN_FALSE);
-        if (ret == XA_RESULT_SUCCESS)
-            {
-            impl->positionupdateOn = XA_BOOLEAN_FALSE;
-            }
-        }
-
     XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
     DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
     return ret;
@@ -608,7 +537,6 @@
 void XAPlayItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event)
     {
     XAPlayItfImpl* impl = (XAPlayItfImpl*) pHandlerCtx;
-    XAuint32 newpos = 0;
 
     DEBUG_API("->XAPlayItfImpl_AdaptCb");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
@@ -629,101 +557,6 @@
         return;
         }
 
-    /* check position update events */
-    if (event->eventid == XA_ADAPT_POSITION_UPDATE_EVT)
-        {
-        assert(event->data);
-        newpos = *((XAuint32*) (event->data));
-        DEBUG_API_A1("Position update from adaptation: new position %lu ms",newpos);
-
-        /* Check is looping start file playing before marker position */
-        if (newpos < impl->markerPosition || impl->lastPosition > newpos)
-            {
-            DEBUG_INFO("Restart looping, clear marker position callback flag.");
-            impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
-            }
-
-        /* check if marker passed and callback needed */
-        if ((impl->markerPosition != NO_POSITION) && (impl->eventFlags
-                & XA_PLAYEVENT_HEADATMARKER))
-            {
-            if (impl->callback && (((impl->lastPosition
-                    < impl->markerPosition)
-                    && (newpos > impl->markerPosition)) || (newpos
-                    == impl->markerPosition)))
-                {
-                /* Check is callback already send */
-                if (impl->isMarkerPosCbSend != XA_BOOLEAN_TRUE)
-                    {
-                    impl->callback(impl->cbPtrToSelf, impl->cbcontext,
-                            XA_PLAYEVENT_HEADATMARKER);
-                    impl->isMarkerPosCbSend = XA_BOOLEAN_TRUE;
-                    }
-                }
-            }
-        /* check if update period passed and callback needed */
-        if ((impl->positionUpdatePeriod > 0) && (impl->eventFlags
-                & XA_PLAYEVENT_HEADATNEWPOS) && impl->callback)
-            {
-            if ((XAuint32) ((impl->lastPosition)
-                    / (impl->positionUpdatePeriod)) < (XAuint32) (newpos
-                    / (impl->positionUpdatePeriod)))
-                {
-                impl->callback(impl->cbPtrToSelf, impl->cbcontext,
-                        XA_PLAYEVENT_HEADATNEWPOS);
-                }
-            }
-        /* store position */
-        impl->lastPosition = newpos;
-        }
-
-    /* check other events */
-    else if (event->eventid == XA_PLAYEVENT_HEADATEND)
-        {
-        impl->playbackState = XA_PLAYSTATE_STOPPED;
-        impl->lastPosition = 0;
-        /* send callback if needed */
-        if ((XA_PLAYEVENT_HEADATEND & impl->eventFlags) && impl->callback)
-            {
-            impl->callback(impl->cbPtrToSelf, impl->cbcontext,
-                    XA_PLAYEVENT_HEADATEND);
-            }
-        }
-    else if (event->eventid == XA_PLAYEVENT_HEADSTALLED)
-        {
-        impl->playbackState = XA_PLAYSTATE_PAUSED;
-        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)
-            {
-            impl->callback(impl->cbPtrToSelf, impl->cbcontext,
-                    XA_PLAYEVENT_HEADSTALLED);
-            }
-        }
-    else if (event->eventid == XA_PLAYEVENT_HEADMOVING)
-        {
-        impl->playbackState = XA_PLAYSTATE_PLAYING;
-        /* send callback if needed */
-        if ((XA_PLAYEVENT_HEADMOVING & impl->eventFlags) && impl->callback)
-            {
-            impl->callback(impl->cbPtrToSelf, impl->cbcontext,
-                    XA_PLAYEVENT_HEADMOVING);
-            }
-        }
-    else
-        {
-        /* do nothing */
-        }
-
     DEBUG_API("<-XAPlayItfImpl_AdaptCb");
     XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
     }
--- a/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -20,9 +20,6 @@
 #include <assert.h>
 
 #include "xaseekitf.h"
-
-#include "xaseekitfadaptation.h"
-#include "xaplayitfadaptation.h"
 #include "xathreadsafety.h"
 #include "xaplayitfadaptationmmf.h"
 #include "xaseekitfadaptationmmf.h"
@@ -108,46 +105,6 @@
             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");
@@ -208,38 +165,6 @@
             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");
@@ -305,7 +230,8 @@
         self->adapCtx = impl->curAdaptCtx;
 
         self->self = self;
-        }DEBUG_API("<-XASeekItfImpl_Create");
+        }
+    DEBUG_API("<-XASeekItfImpl_Create");
     return self;
     }
 
--- a/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -258,7 +258,8 @@
         {
         ret = XAAudioEncoderItfAdapt_GetEncoderSettings(impl->adapCtx,
                 pSettings);
-        }DEBUG_API("<-XAAudioEncoderItfImpl_GetEncoderSettings");
+        }
+    DEBUG_API("<-XAAudioEncoderItfImpl_GetEncoderSettings");
     return ret;
     }
 
@@ -292,7 +293,8 @@
         self->adapCtx = impl->adaptationCtx;
 
         self->self = self;
-        }DEBUG_API("<-XAAudioEncoderItfImpl_Create");
+        }
+    DEBUG_API("<-XAAudioEncoderItfImpl_Create");
     return self;
     }
 
--- a/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include "xaimageencoderitf.h"
-
-#include "xaimageencoderitfadaptation.h"
-#include "xarecorditfadaptation.h"
-#include "xathreadsafety.h"
-#include "xacapabilitiesmgr.h"
-
-#define APPROX_MAXRATIO (90/100)
-
-/* static XAImageEncoderItfImpl* GetImpl(XAImageEncoderItf self)
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAImageEncoderItfImpl* GetImpl(XAImageEncoderItf self)
-{
-    if( self )
-    {
-        XAImageEncoderItfImpl* impl = (XAImageEncoderItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/*****************************************************************************
- * Base interface XAImageEncoderItf implementation
- *****************************************************************************/
-
-/* XAresult XAImageEncoderItfImpl_SetImageSettings
- * Description: Set image encoder settings.
- */
-XAresult XAImageEncoderItfImpl_SetImageSettings(XAImageEncoderItf self,
-                                                const XAImageSettings *pSettings)
-{
-    XAresult res = XA_RESULT_SUCCESS;
-    XACapabilities temp;
-    XAImageEncoderItfImpl *impl = GetImpl(self);
-
-    DEBUG_API("->XAImageEncoderItfImpl_SetImageSettings");
-    XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
-
-    if( !impl || !pSettings )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAImageEncoderItfImpl_SetImageSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-        res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE), pSettings->encoderId, &temp);
-        if( res == XA_RESULT_SUCCESS )
-            {
-#ifdef OMAX_CAMERABIN
-            res = XAImageEncoderItfAdapt_SetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
-#endif
-            }
-        else
-            {
-            DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-            res = XA_RESULT_FEATURE_UNSUPPORTED;
-            }
-        }
-    
-    XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
-
-    DEBUG_API("<-XAImageEncoderItfImpl_SetImageSettings");
-    return res;
-}
-
-/* XAresult XAImageEncoderItfImpl_GetImageSettings
- * Description: Get image encoder settings.
- */
-XAresult XAImageEncoderItfImpl_GetImageSettings(XAImageEncoderItf self,
-                                                XAImageSettings *pSettings)
-{
-    XAresult res = XA_RESULT_SUCCESS;
-    XAImageEncoderItfImpl *impl = GetImpl(self);
-
-    DEBUG_API("->XAImageEncoderItfImpl_GetImageSettings");
-    if( !impl || !pSettings )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAImageEncoderItfImpl_GetImageSettings");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-#ifdef OMAX_CAMERABIN
-        res = XAImageEncoderItfAdapt_GetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
-#endif
-        }
-    else
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XAImageEncoderItfImpl_GetImageSettings");
-        return XA_RESULT_FEATURE_UNSUPPORTED;    
-        }
-
-    DEBUG_API("<-XAImageEncoderItfImpl_GetImageSettings");
-    return res;
-}
-
-/* XAresult XAImageEncoderItfImpl_GetSizeEstimate
- * Description: Get estimated image size.
- */
-XAresult XAImageEncoderItfImpl_GetSizeEstimate(XAImageEncoderItf self,
-                                               XAuint32 *pSize)
-{
-    XAuint32 bpp = 0; /*bytes per pixel*/
-    XAuint32 compPct = 0; /*compression percentage*/
-    XAImageEncoderItfImpl *impl = GetImpl(self);
-    XAImageSettings curSettings = {0,0,0,0,0};
-    DEBUG_API("->XAImageEncoderItfImpl_GetImageSettings");
-
-    if( !impl || !pSize )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAImageEncoderItfImpl_GetImageSettings");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    /* calculate size estimate */
-
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-#ifdef OMAX_CAMERABIN
-        XAImageEncoderItfAdapt_GetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, &curSettings);
-#endif
-        }
-    else
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XAImageEncoderItfImpl_GetSizeEstimate");
-        return XA_RESULT_FEATURE_UNSUPPORTED;   
-        }
-    
-    switch(curSettings.colorFormat)
-    {
-        case XA_COLORFORMAT_MONOCHROME:
-            bpp = 1;
-            break;
-        case XA_COLORFORMAT_L2:
-            bpp = 2;
-            break;
-        case XA_COLORFORMAT_L4:
-            bpp = 4;
-            break;
-        case XA_COLORFORMAT_8BITRGB332:
-        case XA_COLORFORMAT_RAWBAYER8BIT:
-        case XA_COLORFORMAT_RAWBAYER8BITCOMPRESSED:
-        case XA_COLORFORMAT_L8:
-            bpp = 8;
-            break;
-        case XA_COLORFORMAT_RAWBAYER10BIT:
-            bpp = 10;
-            break;
-        case XA_COLORFORMAT_12BITRGB444:
-        case XA_COLORFORMAT_YUV444INTERLEAVED:
-        case XA_COLORFORMAT_YUV411PLANAR:
-        case XA_COLORFORMAT_YUV420PLANAR:
-        case XA_COLORFORMAT_YUV420SEMIPLANAR:
-            bpp = 12;
-            break;
-        case XA_COLORFORMAT_16BITARGB4444:
-        case XA_COLORFORMAT_16BITARGB1555:
-        case XA_COLORFORMAT_16BITRGB565:
-        case XA_COLORFORMAT_16BITBGR565:
-        case XA_COLORFORMAT_YCBYCR:
-        case XA_COLORFORMAT_YCRYCB:
-        case XA_COLORFORMAT_CBYCRY:
-        case XA_COLORFORMAT_CRYCBY:
-        case XA_COLORFORMAT_L16:
-        case XA_COLORFORMAT_YUV422PLANAR:
-        case XA_COLORFORMAT_YUV422SEMIPLANAR:
-            bpp = 16;
-            break;
-        case XA_COLORFORMAT_18BITRGB666:
-        case XA_COLORFORMAT_18BITARGB1665:
-        case XA_COLORFORMAT_18BITBGR666:
-            bpp = 18;
-            break;
-        case XA_COLORFORMAT_19BITARGB1666:
-            bpp = 19;
-            break;
-        case XA_COLORFORMAT_24BITRGB888:
-        case XA_COLORFORMAT_24BITBGR888:
-        case XA_COLORFORMAT_24BITARGB1887:
-        case XA_COLORFORMAT_24BITARGB6666:
-        case XA_COLORFORMAT_24BITABGR6666:
-        case XA_COLORFORMAT_L24:
-            bpp = 24;
-            break;
-        case XA_COLORFORMAT_25BITARGB1888:
-            bpp = 25;
-            break;
-        case XA_COLORFORMAT_32BITBGRA8888:
-        case XA_COLORFORMAT_32BITARGB8888:
-        case XA_COLORFORMAT_L32:
-            bpp = 32;
-            break;
-        default:
-            bpp = 8;
-            break;
-    }
-
-    compPct = (1000 - (curSettings.compressionLevel*APPROX_MAXRATIO))/1000;
-
-    /* numofpixels * colorformat(bits/pixel) * compression rate */
-    *pSize = (curSettings.height * curSettings.width ) * bpp/8 * compPct;
-
-    DEBUG_API("<-XAImageEncoderItfImpl_GetImageSettings");
-    return XA_RESULT_SUCCESS;
-}
-/*****************************************************************************
- * XAImageEncoderItfImpl -specific methods
- *****************************************************************************/
-
-
-/* XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create()
- * Description: Allocate and initialize ImageEncoderItfImpl
- */
-XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create(XAMediaRecorderImpl* impl)
-{
-    XAImageEncoderItfImpl* self = (XAImageEncoderItfImpl*)
-        calloc(1,sizeof(XAImageEncoderItfImpl));
-    //XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)(impl->adaptationCtx);
-    
-    DEBUG_API("->XAImageEncoderItfImpl_Create");
-    if( self )
-    {
-        //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 */
-        self->adaptCtx = impl->adaptationCtx;
-        
-        self->self = self;
-    }
-    DEBUG_API("<-XAImageEncoderItfImpl_Create");
-    return self;
-}
-
-/* void XAImageEncoderItfImpl_Free(XAImageEncoderItfImpl* self)
- * Description: Free all resources reserved at XAImageEncoderItfImpl_Create()
- */
-void XAImageEncoderItfImpl_Free(XAImageEncoderItfImpl* self)
-{
-    DEBUG_API("->XAImageEncoderItfImpl_Free");
-    assert( self==self->self );
-    free( self );
-    DEBUG_API("<-XAImageEncoderItfImpl_Free");
-}
-
--- a/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +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 XAIMAGEENCODERITF_H
-#define XAIMAGEENCODERITF_H
-
-#include "xamediarecorder.h"
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAImageEncoderItf implementation */
-typedef struct XAImageEncoderItfImpl_
-{
-    /* parent interface */
-    struct XAImageEncoderItf_ itf;
-    /* pointer to self */
-    struct XAImageEncoderItfImpl_* self;
-    /* variables */
-    XAAdaptationBaseCtx *adaptCtx;
-
-} XAImageEncoderItfImpl;
-
-/** METHODS **/
-
-/* Base interface XAImageEncoderItf implementation
- * See API Specification for method documentation
- */
-XAresult XAImageEncoderItfImpl_SetImageSettings(XAImageEncoderItf self,
-                                                const XAImageSettings *pSettings);
-
-XAresult XAImageEncoderItfImpl_GetImageSettings(XAImageEncoderItf self,
-                                                XAImageSettings *pSettings);
-
-XAresult XAImageEncoderItfImpl_GetSizeEstimate(XAImageEncoderItf self,
-                                               XAuint32 * pSize);
-
-
-/* XAImageEncoderItfImpl -specific methods */
-XAImageEncoderItfImpl* XAImageEncoderItfImpl_Create(XAMediaRecorderImpl* impl);
-void XAImageEncoderItfImpl_Free(XAImageEncoderItfImpl* self);
-
-#endif /* XAIMAGEENCODERITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c	Wed Aug 18 10:17:22 2010 +0300
@@ -22,18 +22,10 @@
 #include "xaaudioencoderitf.h"
 #include "xaconfigextensionsitf.h"
 #include "xadynintmgmtitf.h"
-#include "xaequalizeritf.h"
-#include "xaimagecontrolsitf.h"
-#include "xaimageeffectsitf.h"
-#include "xaimageencoderitf.h"
 #include "xametadatainsertionitf.h"
 #include "xarecorditf.h"
-#include "xasnapshotitf.h"
-#include "xavideoencoderitf.h"
-#include "xavideopostprocessingitf.h"
 #include "xavolumeitf.h"
 #include "xametadataextractionitf.h"
-#include "xametadatatraversalitf.h"
 #include "xathreadsafety.h"
 #include <string.h>
 #include "xacapabilitiesmgr.h"
@@ -42,22 +34,14 @@
 /* Static mapping of enumeration XAMediaRecorderInterfaces to interface iids */
 static const XAInterfaceID* xaMediaRecorderItfIIDs[MR_ITFCOUNT] =
     {
-            &XA_IID_OBJECT,
-            &XA_IID_AUDIOENCODER,
-            &XA_IID_CONFIGEXTENSION,
-            &XA_IID_DYNAMICINTERFACEMANAGEMENT,
-            &XA_IID_EQUALIZER,
-            &XA_IID_IMAGECONTROLS,
-            &XA_IID_IMAGEEFFECTS,
-            &XA_IID_IMAGEENCODER,
-            &XA_IID_METADATAINSERTION,
-            &XA_IID_RECORD,
-            &XA_IID_SNAPSHOT,
-            &XA_IID_VIDEOENCODER,
-            &XA_IID_VIDEOPOSTPROCESSING,
-            &XA_IID_VOLUME,
-            &XA_IID_METADATAEXTRACTION,
-            &XA_IID_METADATATRAVERSAL
+    &XA_IID_OBJECT,
+    &XA_IID_AUDIOENCODER,
+    &XA_IID_CONFIGEXTENSION,
+    &XA_IID_DYNAMICINTERFACEMANAGEMENT,
+    &XA_IID_METADATAINSERTION,
+    &XA_IID_RECORD,
+    &XA_IID_VOLUME,
+    &XA_IID_METADATAEXTRACTION
     };
 
 /* Global methods */
@@ -128,12 +112,7 @@
         {
         pBaseObj->interfaceMap[MR_AUDIOENCODERITF].required = XA_BOOLEAN_TRUE;
         }
-    if (pImageVideoSrc && mediaType != XA_MEDIATYPE_AUDIO)
-        {
-        pBaseObj->interfaceMap[MR_VIDEOENCODER].required = XA_BOOLEAN_TRUE;
-        pBaseObj->interfaceMap[MR_IMAGEENCODERITF].required = XA_BOOLEAN_TRUE;
-        pBaseObj->interfaceMap[MR_SNAPSHOTITF].required = XA_BOOLEAN_TRUE;
-        }
+
     pBaseObj->interfaceMap[MR_DIMITF].required = XA_BOOLEAN_TRUE;
 
     /* Explicit interfaces */
@@ -163,17 +142,8 @@
                 }
             else
                 { /* weed out unsupported content-aware itf's */
-                if (((mediaType == XA_MEDIATYPE_IMAGE || !pAudioSrc)
-                        && (entry->mapIdx == MR_EQUALIZERITF || entry->mapIdx
-                                == MR_VOLUMEITF || entry->mapIdx
-                                == MR_AUDIOENCODERITF)) || ((mediaType
-                        == XA_MEDIATYPE_AUDIO || !pImageVideoSrc)
-                        && (entry->mapIdx == MR_IMAGECONTROLSITF
-                                || entry->mapIdx == MR_IMAGEEFFECTSITF
-                                || entry->mapIdx == MR_VIDEOPOSTPROCESSINGITF
-                                || entry->mapIdx == MR_VIDEOENCODER
-                                || entry->mapIdx == MR_IMAGEENCODERITF
-                                || entry->mapIdx == MR_SNAPSHOTITF)))
+                if ((mediaType == XA_MEDIATYPE_IMAGE || !pAudioSrc)
+                        && (entry->mapIdx == MR_VOLUMEITF || entry->mapIdx == MR_AUDIOENCODERITF))
                     {
                     entry->required = XA_BOOLEAN_FALSE;
                     if (pInterfaceRequired[itfIdx])
@@ -188,11 +158,6 @@
                     entry->required = XA_BOOLEAN_TRUE;
                     }
 
-                if (entry->mapIdx == MR_SNAPSHOTITF)
-                    {
-                    DEBUG_ERR("SnapshotItf requested - support still mode");
-                    pImpl->recModes |= XA_RECMODE_STILL;
-                    }
                 if (entry->mapIdx == MR_RECORDITF)
                     {
                     DEBUG_ERR("RecordItf requested - support stream mode");
@@ -235,8 +200,6 @@
     /* Mandated dynamic itfs */
     pBaseObj->interfaceMap[MR_METADATAINSERTIONITF].isDynamic
             = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[MR_EQUALIZERITF].isDynamic = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[MR_IMAGEEFFECTSITF].isDynamic = XA_BOOLEAN_TRUE;
 
     /* Initialize XAMediaRecorderImpl variables */
     pImpl->audioSrc = pAudioSrc;
@@ -412,17 +375,6 @@
                 case MR_AUDIOENCODERITF:
                     pItf = XAAudioEncoderItfImpl_Create(pObjImpl);
                     break;
-#ifdef OMAX_CAMERABIN
-                    case MR_SNAPSHOTITF:
-                    pItf = XASnapshotItfImpl_Create(pObjImpl);
-                    break;
-                    case MR_VIDEOENCODER:
-                    pItf = XAVideoEncoderItfImpl_Create(pObjImpl);
-                    break;
-                    case MR_IMAGEENCODERITF:
-                    pItf = XAImageEncoderItfImpl_Create(pObjImpl);
-                    break;
-#endif
                 case MR_METADATAINSERTIONITF:
                     pItf = XAMetadataInsertionItfImpl_Create(pObjImpl);
                     break;
@@ -432,20 +384,6 @@
                     XAConfigExtensionsItfImpl_SetContext(pItf,
                             pObjImpl->adaptationCtx);
                     break;
-                case MR_EQUALIZERITF:
-                    pItf = XAEqualizerItfImpl_Create(pObjImpl->adaptationCtx);
-                    break;
-#ifdef OMAX_CAMERABIN
-                    case MR_IMAGECONTROLSITF:
-                    pItf = XAImageControlsItfImpl_Create( pObjImpl->adaptationCtx );
-                    break;
-                    case MR_IMAGEEFFECTSITF:
-                    pItf = XAImageEffectsItfImpl_Create( pObjImpl->adaptationCtx );
-                    break;
-                    case MR_VIDEOPOSTPROCESSINGITF:
-                    pItf = XAVideoPostProcessingItfImpl_Create( pObjImpl->adaptationCtx );
-                    break;
-#endif
                 case MR_VOLUMEITF:
                     pItf = XAVolumeItfImpl_Create(pObjImpl->adaptationCtx);
                     break;
@@ -453,11 +391,6 @@
                     pItf = XAMetadataExtractionItfImpl_Create(
                             pObjImpl->adaptationCtx);
                     break;
-                case MR_METADATATRAVERSALITF:
-                    pItf = XAMetadataTraversalItfImpl_Create(
-                            pObjImpl->adaptationCtx);
-                    break;
-
                 default:
                     break;
                 }
@@ -522,46 +455,18 @@
                 case MR_DIMITF:
                     XADIMItfImpl_Free(pItf);
                     break;
-                case MR_EQUALIZERITF:
-                    XAEqualizerItfImpl_Free(pItf);
-                    break;
-#ifdef OMAX_CAMERABIN
-                    case MR_IMAGECONTROLSITF:
-                    XAImageControlsItfImpl_Free(pItf);
-                    break;
-                    case MR_IMAGEEFFECTSITF:
-                    XAImageEffectsItfImpl_Free(pItf);
-                    break;
-                    case MR_IMAGEENCODERITF:
-                    XAImageEncoderItfImpl_Free(pItf);
-                    break;
-#endif
                 case MR_METADATAINSERTIONITF:
                     XAMetadataInsertionItfImpl_Free(pItf);
                     break;
                 case MR_RECORDITF:
                     XARecordItfImpl_Free(pItf);
                     break;
-#ifdef OMAX_CAMERABIN
-                    case MR_SNAPSHOTITF:
-                    XASnapshotItfImpl_Free(pItf);
-                    break;
-                    case MR_VIDEOENCODER:
-                    XAVideoEncoderItfImpl_Free(pItf);
-                    break;
-                    case MR_VIDEOPOSTPROCESSINGITF:
-                    XAVideoPostProcessingItfImpl_Free(pItf);
-                    break;
-#endif
                 case MR_VOLUMEITF:
                     XAVolumeItfImpl_Free(pItf);
                     break;
                 case MR_METADATAEXTRACTIONITF:
                     XAMetadataExtractionItfImpl_Free(pItf);
                     break;
-                case MR_METADATATRAVERSALITF:
-                    XAMetadataTraversalItfImpl_Free(pItf);
-                    break;
                 default:
                     break;
                 }
@@ -618,18 +523,8 @@
             case MR_METADATAINSERTIONITF:
                 mapEntry->pItf = XAMetadataInsertionItfImpl_Create(pImpl);
                 break;
-            case MR_EQUALIZERITF:
-                mapEntry->pItf = XAEqualizerItfImpl_Create(
-                        pImpl->adaptationCtx);
-                break;
-#ifdef OMAX_CAMERABIN
-                case MR_IMAGEEFFECTSITF:
-                mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->adaptationCtx );
-                break;
-#endif
             default:
-                DEBUG_ERR("XAMediaRecorderImpl_DoAddItf unknown id")
-                ;
+                DEBUG_ERR("XAMediaRecorderImpl_DoAddItf unknown id");
                 ret = XA_RESULT_FEATURE_UNSUPPORTED;
                 break;
             }
@@ -682,17 +577,8 @@
             case MR_METADATAINSERTIONITF:
                 XAMetadataInsertionItfImpl_Free(mapEntry->pItf);
                 break;
-            case MR_EQUALIZERITF:
-                XAEqualizerItfImpl_Free(mapEntry->pItf);
-                break;
-#ifdef OMAX_CAMERABIN
-                case MR_IMAGEEFFECTSITF:
-                XAImageEffectsItfImpl_Free( mapEntry->pItf );
-                break;
-#endif
             default:
-                DEBUG_ERR("XAMediaRecorderImpl_DoRemoveItf unknown id")
-                ;
+                DEBUG_ERR("XAMediaRecorderImpl_DoRemoveItf unknown id");
                 ret = XA_RESULT_FEATURE_UNSUPPORTED;
                 break;
             }
--- a/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.h	Wed Aug 18 10:17:22 2010 +0300
@@ -36,18 +36,10 @@
     MR_AUDIOENCODERITF,
     MR_CONFIGEXTENSIONITF,
     MR_DIMITF,
-    MR_EQUALIZERITF,
-    MR_IMAGECONTROLSITF,
-    MR_IMAGEEFFECTSITF,
-    MR_IMAGEENCODERITF,
     MR_METADATAINSERTIONITF,
     MR_RECORDITF,
-    MR_SNAPSHOTITF,
-    MR_VIDEOENCODER,
-    MR_VIDEOPOSTPROCESSINGITF,
     MR_VOLUMEITF,
     MR_METADATAEXTRACTIONITF,
-    MR_METADATATRAVERSALITF,
     MR_ITFCOUNT
     } MRInterfaces;
 
--- a/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -64,7 +64,6 @@
         }
     else
         {
-
         if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
             {
             if (impl->adaptCtx)
@@ -85,7 +84,8 @@
             DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
             return XA_RESULT_FEATURE_UNSUPPORTED;
             }
-        }DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
+        }
+    DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
     return ret;
     }
 
@@ -129,7 +129,8 @@
             DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
             return XA_RESULT_PARAMETER_INVALID;
             }
-        }DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
+        }
+    DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
     return ret;
     }
 
@@ -173,7 +174,8 @@
             DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
             return XA_RESULT_PARAMETER_INVALID;
             }
-        }DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
+        }
+    DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
     return ret;
     }
 
@@ -219,7 +221,8 @@
             return XA_RESULT_PARAMETER_INVALID;
             }
 
-        }DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
+        }
+    DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
     return ret;
     }
 
@@ -264,7 +267,8 @@
             DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
             return XA_RESULT_PARAMETER_INVALID;
             }
-        }DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
+        }
+    DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
     return ret;
     }
 
@@ -312,7 +316,8 @@
             DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
             return XA_RESULT_FEATURE_UNSUPPORTED;
             }
-        }DEBUG_API("<-XAMetadataInsertionItfImpl_InsertMetadataItem");
+        }
+    DEBUG_API("<-XAMetadataInsertionItfImpl_InsertMetadataItem");
     return ret;
     }
 
@@ -399,7 +404,8 @@
                 sizeof(XAMetadataInfo*));
         self->self = self;
 
-        }DEBUG_API("<-XAMetadataInsertionItfImpl_Create");
+        }
+    DEBUG_API("<-XAMetadataInsertionItfImpl_Create");
     return self;
     }
 
--- a/khronosfws/openmax_al/src/mediarecorder/xarecorditf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xarecorditf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -521,7 +521,8 @@
         XAAdaptationBase_AddEventHandler(impl->adaptationCtx,
                 &XARecordItfImpl_AdaptCb, XA_RECORDITFEVENTS, self);
         self->self = self;
-        }DEBUG_API("<-XARecordItfImpl_Create");
+        }
+    DEBUG_API("<-XARecordItfImpl_Create");
     return self;
     }
 
--- a/khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,597 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xasnapshotitf.h"
-
-#include "xasnapshotitfadaptation.h"
-
-#include "xathreadsafety.h"
-#include "xaplayitf.h"
-#include "xaglobals.h"
-
-extern void* vfHandle;
-
-/**
- * static XASnapshotItfImpl* GetImpl(XASnapshotItf self)
- * Description: Validated interface pointer and cast it to implementations pointer.
- **/
-static XASnapshotItfImpl* GetImpl(XASnapshotItf self)
-{
-    if( self )
-    {
-        XASnapshotItfImpl* impl = (XASnapshotItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XASnapshotItf implementation
- */
-
-/*
-    This method prepares the device for snapshot to shorten the actual shooting
-    delay with TakeSnapshot() method. The various settings for snapshot are
-    set with this method: the specified number of snapshots, the output location
-    either to the XADataSink (if it is specified) or to memory (if no XADataSink
-    is specified) and then calls xaSnapshotInitiatedCallback() method.
-    Asynchronous.
-    Second call of this method before the call to TakeSnapshot() method will
-    reinitialize the shooting with the new parameter values.
-*/
-XAresult XASnapshotItfImpl_InitiateSnapshot(XASnapshotItf self,
-                                            XAuint32 numberOfPictures,
-                                            XAuint32 fps,
-                                            XAboolean freezeViewFinder,
-                                            XADataSink sink,
-                                            xaSnapshotInitiatedCallback initiatedCallback,
-                                            xaSnapshotTakenCallback takenCallback,
-                                            void * pContext)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-    XAuint32 minF = 0, maxF = 0, maxP = 0;
-
-    DEBUG_API("->XASnapshotItfImpl_InitiateSnapshot");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
-
-    if(!impl)
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASnapshotItfImpl_InitiateSnapshot");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    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");
-        res = XA_RESULT_FEATURE_UNSUPPORTED;      
-        }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-    DEBUG_API_A1("<-XASnapshotItfImpl_InitiateSnapshot (%d)", (int)res);
-    return res;
-}
-
-/*
-    This method takes the specified number of snapshots, stores them either to
-    the XADataSink (if it is specified by InitiateSnapshot()) or to memory (if
-    no XADataSink is specified) and then calls xaSnapshotTakenCallback()
-    method.
- */
-XAresult XASnapshotItfImpl_TakeSnapshot(XASnapshotItf self)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XASnapshotItfImpl_TakeSnapshot");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
-    if(!impl)
-    {
-        DEBUG_ERR("XASnapshotItfImpl_TakeSnapshot -"
-                "XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-
-    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
-        {
-        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 ");
-            }
-    
-        }
-    else
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XASnapshotItfImpl_TakeSnapshot");
-        res = XA_RESULT_FEATURE_UNSUPPORTED;      
-        }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-    DEBUG_API("<-XASnapshotItfImpl_TakeSnapshot");
-    return res;
-}
-
-/*
-    This method cancels an ongoing shooting session. Snapshooting needs to be
-    initiated again after calling this method with InitiateSnapshot method.
-
-    Synchronous.
-*/
-XAresult XASnapshotItfImpl_CancelSnapshot(XASnapshotItf self)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XASnapshotItfImpl_CancelSnapshot");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
-
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASnapshotItfImpl_CancelSnapshot");
-        /* invalid parameter */
-        res = XA_RESULT_PARAMETER_INVALID;
-    }
-    if(impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWGST)
-        {
-        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
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XASnapshotItfImpl_CancelSnapshot");
-        res = XA_RESULT_FEATURE_UNSUPPORTED;         
-        }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-    DEBUG_API_A1("<-XASnapshotItfImpl_CancelSnapshot (%d)", (int)res);
-    return res;
-}
-
-/*
-     This method releases the given buffer.
- */
-XAresult XASnapshotItfImpl_ReleaseBuffers(XASnapshotItf self,
-                                          XADataSink *image)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XASnapshotItfImpl_ReleaseBuffers");
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        res =  XA_RESULT_PARAMETER_INVALID;
-    }
-    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);
-                }
-            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;
-            }
-        }
-    else
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XASnapshotItfImpl_ReleaseBuffers");
-        res = XA_RESULT_FEATURE_UNSUPPORTED;     
-        }
-    
-    DEBUG_API("<-XASnapshotItfImpl_ReleaseBuffers");
-    return res;
-}
-
-/*
-    This method tells how many pictures it is possible to
-    be taken during single burst.
-*/
-XAresult XASnapshotItfImpl_GetMaxPicsPerBurst(XASnapshotItf self,
-                                              XAuint32 *maxNumberOfPictures)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XASnapshotItfImpl_GetMaxPicsPerBurst");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
-    if( !impl || !maxNumberOfPictures )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASnapshotItfImpl_GetMaxPicsPerBurst");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    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
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XASnapshotItfImpl_GetMaxPicsPerBurst");
-        res = XA_RESULT_FEATURE_UNSUPPORTED;     
-        }
-    
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-    DEBUG_API("<-XASnapshotItfImpl_GetMaxPicsPerBurst");
-    return res;
-}
-
-/*
-    This method tells the range of shooting rates possible in burst shooting
-    mode. Please note that these rates might be different depending on which
-    encoder and which resolution has been chosen; not all the rates can
-    necessarily be reached with every resolution or encoder.
-*/
-XAresult XASnapshotItfImpl_GetBurstFPSRange(XASnapshotItf self,
-                                            XAuint32 *minFPS,
-                                            XAuint32 *maxFPS)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XASnapshotItfImpl_GetBurstFPSRange");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
-    if( !impl || !minFPS || !maxFPS )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASnapshotItfImpl_GetBurstFPSRange");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    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
-        {
-        DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
-        DEBUG_API("<-XASnapshotItfImpl_GetBurstFPSRange");
-        res = XA_RESULT_FEATURE_UNSUPPORTED; 
-        }
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-    DEBUG_API("<-XASnapshotItfImpl_GetBurstFPSRange");
-    return res;
-}
-
-/*
-    Toggles the shutter feedback (such as shutter sound or some visual
-    feedback while taking a snapshot).
-*/
-XAresult XASnapshotItfImpl_SetShutterFeedback(XASnapshotItf self,
-                                              XAboolean enabled)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    XAresult res = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XASnapshotItfImpl_SetShutterFeedback");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        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; 
-        }
-    
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-    DEBUG_API("<-XASnapshotItfImpl_SetShutterFeedback");
-    return res;
-}
-
-/*
-    This method tells if the shutter feedback (such as shutter sound or some
-    visual feedback while taking a snapshot) is enabled.
- */
-XAresult XASnapshotItfImpl_GetShutterFeedback(XASnapshotItf self,
-                                              XAboolean *enabled)
-{
-    XASnapshotItfImpl *impl = GetImpl(self);
-    DEBUG_API("->XASnapshotItfImpl_GetShutterFeedback");
-    if( !impl || !enabled )
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XASnapshotItfImpl_GetShutterFeedback");
-        return  XA_RESULT_PARAMETER_INVALID;
-    }
-    enabled = (XAboolean*)impl->shutterfeedback;
-
-    DEBUG_API("<-XASnapshotItfImpl_GetShutterFeedback");
-    return XA_RESULT_SUCCESS;
-}
-
-/**
- * XASnapshotItfImpl -specific methods
- **/
-
-
-/**
- * XASnapshotItfImpl* XASnapshotItfImpl_Create()
- * Description: Allocate and initialize SnapshotItfImpl
- **/
-XASnapshotItfImpl* XASnapshotItfImpl_Create(XAMediaRecorderImpl* impl)
-{
-    XASnapshotItfImpl* self = (XASnapshotItfImpl*)
-        calloc(1,sizeof(XASnapshotItfImpl));
-    
-   
-    DEBUG_API("->XASnapshotItfImpl_Create");
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.CancelSnapshot = XASnapshotItfImpl_CancelSnapshot;
-        self->itf.GetBurstFPSRange = XASnapshotItfImpl_GetBurstFPSRange;
-        self->itf.GetMaxPicsPerBurst = XASnapshotItfImpl_GetMaxPicsPerBurst;
-        self->itf.GetShutterFeedback = XASnapshotItfImpl_GetShutterFeedback;
-        self->itf.InitiateSnapshot = XASnapshotItfImpl_InitiateSnapshot;
-        self->itf.ReleaseBuffers = XASnapshotItfImpl_ReleaseBuffers;
-        self->itf.SetShutterFeedback = XASnapshotItfImpl_SetShutterFeedback;
-        self->itf.TakeSnapshot = XASnapshotItfImpl_TakeSnapshot;
-
-        /* init variables */
-        self->adapCtx = impl->adaptationCtx;
-        self->self = self;
-        self->cbPtrToSelf = NULL;
-    }
-
-    /* Add call back function to eventhandler. */
-    XAAdaptationBase_AddEventHandler( impl->adaptationCtx, &XASnapshotItfImpl_AdaptCb, XA_SNAPSHOTITFEVENTS, self );
-    DEBUG_API("<-XASnapshotItfImpl_Create");
-    return self;
-}
-
-/**
- * void XASnapshotItfImpl_Free(XASnapshotItfImpl* self)
- * Description: Free all resources reserved at XASnapshotItfImpl_Create()
- **/
-void XASnapshotItfImpl_Free(XASnapshotItfImpl* self)
-{
-    DEBUG_API("->XASnapshotItfImpl_Free");
-    assert( self==self->self );
-    /*
-     * Free all resources reserved at XASnapshotItfImpl_Create
-     */
-    self->itf.CancelSnapshot(self->cbPtrToSelf);
-    XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XASnapshotItfImpl_AdaptCb );
-    free( self );
-    DEBUG_API("<-XASnapshotItfImpl_Free");
-}
-
-/* void XASnapshotItfImpl_AdaptCb
- * Description:
- * Listen adaptation callBacks from camera adaptation
- */
-void XASnapshotItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
-    XASnapshotItfImpl* impl = (XASnapshotItfImpl*)pHandlerCtx;
-    DEBUG_API("->XASnapshotItfImpl_AdaptCb");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XASnapshotItfImpl_AdaptCb, invalid context pointer!");
-        return;
-    }
-    assert(event);
-
-    if( event->eventid == XA_ADAPT_SNAPSHOT_TAKEN )
-    {
-        DEBUG_INFO("**Snapshot taken**");
-        impl->snapshotongoing = XA_BOOLEAN_FALSE;
-        if( impl->takencallback )
-        {
-        	if ( vfHandle && impl->freezevf )
-        	{
-        		XAresult ret = XA_RESULT_SUCCESS;
-        		XAPlayItfImpl* vf = (XAPlayItfImpl*)vfHandle;
-        		DEBUG_INFO_A1("Using global view finder handle from %x to freeze view finder", vf);
-        		ret = XAPlayItfImpl_SetPlayState( (XAPlayItf)&vf, XA_PLAYSTATE_PAUSED);
-        		if ( ret != XA_RESULT_SUCCESS )
-        		{
-        			DEBUG_ERR("Could not change view finder to pause");
-        		}
-        	}
-            /* datasize used for "number taken", the pointer to
-             * data sink structure itself contains the data size */
-            impl->takencallback(impl->cbPtrToSelf, impl->usercontext,
-                                event->datasize, (XADataSink*)event->data);
-        }
-    }
-    else if( event->eventid == XA_ADAPT_SNAPSHOT_INITIATED )
-    {
-        DEBUG_INFO("**Snapshot initiated**");
-        impl->initongoing = XA_BOOLEAN_FALSE;
-        impl->initialized = XA_BOOLEAN_TRUE;
-        if( impl->initcallback )
-        {
-            impl->initcallback(impl->cbPtrToSelf, impl->usercontext);
-        }
-    }
-    DEBUG_API("<-XASnapshotItfImpl_AdaptCb");
-}
-/*End of file*/
--- a/khronosfws/openmax_al/src/mediarecorder/xasnapshotitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +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 XASNAPSHOTITF_H
-#define XASNAPSHOTITF_H
-
-#include <semaphore.h>
-
-#include "xamediarecorder.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/*Callbacks*/
-
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-
-
-/* Definition of XASnapshotItf implementation */
-typedef struct XASnapshotItfImpl_
-{
-    /* parent interface */
-    struct XASnapshotItf_ itf;
-    /* pointer to self */
-    struct XASnapshotItfImpl_* self;
-
-    /* variables */
-    XAuint32 numberofpictures;
-    XAboolean shutterfeedback;
-    xaSnapshotInitiatedCallback initcallback;
-    xaSnapshotTakenCallback takencallback;
-    void* usercontext;
-    XASnapshotItf cbPtrToSelf;
-
-
-    XAAdaptationBaseCtx *adapCtx;
-
-    XAboolean           snapshotongoing;
-    XAboolean           initongoing;
-    XAboolean           initialized;
-    XAboolean			freezevf;
-
-} XASnapshotItfImpl;
-
-/** METHODS **/
-
-/* Base interface XASnapshotItf implementation */
-XAresult XASnapshotItfImpl_InitiateSnapshot(XASnapshotItf self,
-                                            XAuint32 numberOfPictures,
-                                            XAuint32 fps,
-                                            XAboolean freezeViewFinder,
-                                            XADataSink sink,
-                                            xaSnapshotInitiatedCallback initiatedCallback,
-                                            xaSnapshotTakenCallback takenCallback,
-                                            void * pContext);
-
-XAresult XASnapshotItfImpl_TakeSnapshot(XASnapshotItf self);
-
-XAresult XASnapshotItfImpl_CancelSnapshot(XASnapshotItf self);
-
-XAresult XASnapshotItfImpl_ReleaseBuffers(XASnapshotItf self,
-                                          XADataSink *image);
-
-XAresult XASnapshotItfImpl_GetMaxPicsPerBurst(XASnapshotItf self,
-                                              XAuint32 *maxNumberOfPictures);
-
-XAresult XASnapshotItfImpl_GetBurstFPSRange(XASnapshotItf self,
-                                            XAuint32 *minFPS,
-                                            XAuint32 *maxFPS);
-
-XAresult XASnapshotItfImpl_SetShutterFeedback(XASnapshotItf self,
-                                              XAboolean enabled);
-
-XAresult XASnapshotItfImpl_GetShutterFeedback(XASnapshotItf self,
-                                              XAboolean *enabled);
-
-/* XASnapshotItfImpl -specific methods */
-XASnapshotItfImpl* XASnapshotItfImpl_Create(XAMediaRecorderImpl* impl);
-void XASnapshotItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-void XASnapshotItfImpl_Free(XASnapshotItfImpl* self);
-
-#endif /* XASNAPSHOTITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include "xavideoencoderitf.h"
-
-#include "xavideoencoderitfadaptation.h"
-#include "xarecorditfadaptation.h"
-#include "xacapabilitiesmgr.h"
-#include "xathreadsafety.h"
-
-
-/* static XAVideoEncoderItfImpl* GetImpl(XAVideoEncoderItf self)
- * Description: Validate interface pointer and cast it to implementation pointer.
- */
-static XAVideoEncoderItfImpl* GetImpl(XAVideoEncoderItf self)
-{
-    if( self )
-    {
-        XAVideoEncoderItfImpl* impl = (XAVideoEncoderItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/*****************************************************************************
- * Base interface XAVideoEncoderItf implementation
- *****************************************************************************/
-
-/* XAresult XAVideoEncoderItfImpl_SetVideoSettings
- * Description: Set video encoder settings.
- */
-XAresult XAVideoEncoderItfImpl_SetVideoSettings(XAVideoEncoderItf self,
-                                                XAVideoSettings *pSettings)
-{
-    XAresult res = XA_RESULT_SUCCESS;
-    XACapabilities temp;
-    XAuint32 recState = XA_RECORDSTATE_STOPPED;
-    XAVideoEncoderItfImpl *impl = GetImpl(self);
-    DEBUG_API("->XAVideoEncoderItfImpl_SetVideoSettings");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
-
-    if( !impl || !pSettings )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoEncoderItfImpl_SetVideoSettings");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    if(impl->adaptCtx->fwtype == FWMgrFWGST)
-        {
-        res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), pSettings->encoderId, &temp);
-        if( res == XA_RESULT_SUCCESS )
-            {
-            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");
-        res = XA_RESULT_FEATURE_UNSUPPORTED;     
-        }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
-
-    DEBUG_API("<-XAVideoEncoderItfImpl_SetVideoSettings");
-    return res;
-}
-
-/* XAresult XAVideoEncoderItfImpl_GetVideoSettings
- * Description: Get video encoder settings.
- */
-XAresult XAVideoEncoderItfImpl_GetVideoSettings(XAVideoEncoderItf self,
-                                                XAVideoSettings *pSettings)
-{
-    XAresult res = XA_RESULT_SUCCESS;
-    XAVideoEncoderItfImpl *impl = GetImpl(self);
-    DEBUG_API("->XAVideoEncoderItfImpl_GetVideoSettings");
-    if( !impl || !pSettings )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVideoEncoderItfImpl_GetVideoSettings");
-        /* invalid parameter */
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    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;
-}
-
-/*****************************************************************************
- * XAVideoEncoderItfImpl -specific methods
- *****************************************************************************/
-
-
-/* XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create()
- * Description: Allocate and initialize VideoEncoderItfImpl
- */
-XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create( XAMediaRecorderImpl* impl )
-{
-    XAVideoEncoderItfImpl* self = (XAVideoEncoderItfImpl*)
-        calloc(1,sizeof(XAVideoEncoderItfImpl));
-    DEBUG_API("->XAVideoEncoderItfImpl_Create");
-
-    if( self )
-    {
-        /* init itf default implementation */
-        self->itf.GetVideoSettings = XAVideoEncoderItfImpl_GetVideoSettings;
-        self->itf.SetVideoSettings = XAVideoEncoderItfImpl_SetVideoSettings;
-
-        /* init variables */
-        self->adaptCtx = impl->adaptationCtx;
-        self->self = self;
-    }
-    DEBUG_API("<-XAVideoEncoderItfImpl_Create");
-    return self;
-}
-
-/* void XAVideoEncoderItfImpl_Free(XAVideoEncoderItfImpl* self)
- * Description: Free all resources reserved at XAVideoEncoderItfImpl_Create()
- */
-void XAVideoEncoderItfImpl_Free(XAVideoEncoderItfImpl* self)
-{
-    DEBUG_API("->XAVideoEncoderItfImpl_Free");
-    assert( self==self->self );
-    free( self );
-    DEBUG_API("<-XAVideoEncoderItfImpl_Free");
-}
-
--- a/khronosfws/openmax_al/src/mediarecorder/xavideoencoderitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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 XAVIDEOENCODERITF_H
-#define XAVIDEOENCODERITF_H
-
-
-#include "xamediarecorder.h"
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAVideoEncoderItf implementation */
-typedef struct XAVideoEncoderItfImpl_
-{
-    /* parent interface */
-    struct XAVideoEncoderItf_ itf;
-    /* pointer to self */
-    struct XAVideoEncoderItfImpl_* self;
-
-    /* variables */
-    XAAdaptationBaseCtx *adaptCtx;
-
-} XAVideoEncoderItfImpl;
-
-/** METHODS **/
-
-/* Base interface XAVideoEncoderItf implementation
- * See API Specification for method documentation
- */
-XAresult XAVideoEncoderItfImpl_SetVideoSettings(XAVideoEncoderItf self,
-                                                XAVideoSettings *pSettings);
-
-XAresult XAVideoEncoderItfImpl_GetVideoSettings(XAVideoEncoderItf self,
-                                                XAVideoSettings *pSettings);
-
-
-/* XAVideoEncoderItfImpl -specific methods */
-XAVideoEncoderItfImpl* XAVideoEncoderItfImpl_Create( XAMediaRecorderImpl* impl );
-void XAVideoEncoderItfImpl_Free(XAVideoEncoderItfImpl* self);
-
-#endif /* XAVIDEOENCODERITF_H */
--- a/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.c	Wed Aug 18 10:17:22 2010 +0300
@@ -22,10 +22,8 @@
 #include "xadynamicsourceitf.h"
 #include "xadynintmgmtitf.h"
 #include "xametadataextractionitf.h"
-#include "xametadatatraversalitf.h"
 #include "xaconfigextensionsitf.h"
 
-#include "xametadataadaptctx.h"
 #include "xacapabilitiesmgr.h"
 #include "xathreadsafety.h"
 
@@ -35,12 +33,11 @@
 /* Static mapping of enumeration XAMetadataInterfaces to interface iids */
 static const XAInterfaceID* xaMetadataExtractorItfIIDs[MDE_ITFCOUNT] =
     {
-            &XA_IID_OBJECT,
-            &XA_IID_DYNAMICINTERFACEMANAGEMENT,
-            &XA_IID_METADATAEXTRACTION,
-            &XA_IID_METADATATRAVERSAL,
-            &XA_IID_CONFIGEXTENSION,
-            &XA_IID_DYNAMICSOURCE
+    &XA_IID_OBJECT,
+    &XA_IID_DYNAMICINTERFACEMANAGEMENT,
+    &XA_IID_METADATAEXTRACTION,
+    &XA_IID_CONFIGEXTENSION,
+    &XA_IID_DYNAMICSOURCE
     };
 
 /*****************************************************************************
@@ -107,8 +104,6 @@
     /* Implicit and mandated interfaces */
     pBaseObj->interfaceMap[MDE_METADATAEXTRACTIONITF].required
             = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[MDE_METADATATRAVERSALITF].required
-            = XA_BOOLEAN_TRUE;
     pBaseObj->interfaceMap[MDE_DYNAMICSOURCEITF].required = XA_BOOLEAN_TRUE;
     pBaseObj->interfaceMap[MDE_DIMITF].required = XA_BOOLEAN_TRUE;
 
@@ -180,16 +175,8 @@
     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_API("<-XAMetadataExtractorImpl_Create");
@@ -213,7 +200,8 @@
         {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         res = XA_RESULT_PARAMETER_INVALID;
-        }DEBUG_API_A1("<-XAMetadataExtractorImpl_QueryNumSupportedInterfaces (%d)", (int)res);
+        }
+    DEBUG_API_A1("<-XAMetadataExtractorImpl_QueryNumSupportedInterfaces (%d)", (int)res);
     return res;
     }
 /* XAResult XAMetadataExtractorImpl_QuerySupportedInterfaces
@@ -234,7 +222,8 @@
         {
         *pInterfaceId = *(xaMetadataExtractorItfIIDs[index]);
         res = XA_RESULT_SUCCESS;
-        }DEBUG_API_A1("<-XAMetadataExtractorImpl_QuerySupportedInterfaces (%d)", (int)res);
+        }
+    DEBUG_API_A1("<-XAMetadataExtractorImpl_QuerySupportedInterfaces (%d)", (int)res);
     return res;
     }
 
@@ -291,10 +280,6 @@
                     pItf = XAMetadataExtractionItfImpl_Create(
                             pObjImpl->curAdaptCtx);
                     break;
-                case MDE_METADATATRAVERSALITF:
-                    pItf = XAMetadataTraversalItfImpl_Create(
-                            pObjImpl->curAdaptCtx);
-                    break;
                 case MDE_CONFIGEXTENSIONITF:
                     pItf = XAConfigExtensionsItfImpl_Create();
                     XAConfigExtensionsItfImpl_SetContext(pItf,
@@ -330,11 +315,6 @@
         ret = XAMetadataAdaptCtxMMF_PostInit(
                 (XAAdaptationMMFCtx*) pObjImpl->adaptationCtxMMF);
         }
-    else
-        {
-        ret = XAMetadataAdaptCtx_PostInit(
-                (XAAdaptationGstCtx*) pObjImpl->adaptationCtxGst);
-        }
 
     if (ret != XA_RESULT_SUCCESS)
         {
@@ -385,9 +365,6 @@
                 case MDE_METADATAEXTRACTIONITF:
                     XAMetadataExtractionItfImpl_Free(pItf);
                     break;
-                case MDE_METADATATRAVERSALITF:
-                    XAMetadataTraversalItfImpl_Free(pItf);
-                    break;
                 case MDE_DYNAMICSOURCEITF:
                     XADynamicSourceItfImpl_Free(pItf);
                     break;
@@ -410,12 +387,6 @@
                     (XAAdaptationMMFCtx*) pImpl->adaptationCtxMMF);
             pImpl->adaptationCtxMMF = NULL;
             }
-        else
-            {
-            XAMetadataAdaptCtx_Destroy(
-                    (XAAdaptationGstCtx*) pImpl->adaptationCtxGst);
-            pImpl->adaptationCtxGst = NULL;
-            }
         }
 
     pImpl->curAdaptCtx = NULL;
@@ -454,8 +425,7 @@
 
                 break;
             default:
-                DEBUG_ERR("XAMetadataExtractorImpl_DoAddItf unknown id")
-                ;
+                DEBUG_ERR("XAMetadataExtractorImpl_DoAddItf unknown id");
                 ret = XA_RESULT_FEATURE_UNSUPPORTED;
                 break;
             }
@@ -505,8 +475,7 @@
                 XAConfigExtensionsItfImpl_Free(mapEntry->pItf);
                 break;
             default:
-                DEBUG_ERR("XAMetadataExtractorImpl_DoRemoveItf unknown id")
-                ;
+                DEBUG_ERR("XAMetadataExtractorImpl_DoRemoveItf unknown id");
                 ret = XA_RESULT_FEATURE_UNSUPPORTED;
                 break;
             }
--- a/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.h	Wed Aug 18 10:17:22 2010 +0300
@@ -34,7 +34,6 @@
     MDE_OBJECTITF, /* <-keep this first */
     MDE_DIMITF,
     MDE_METADATAEXTRACTIONITF,
-    MDE_METADATATRAVERSALITF,
     MDE_CONFIGEXTENSIONITF,
     MDE_DYNAMICSOURCEITF,
     MDE_ITFCOUNT
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -15,7 +15,6 @@
  *
  */
 
-#include <OpenMAXAL.h>
 #include <string.h>
 #include <ctype.h>
 #include <uri8.h>
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.h	Wed Aug 18 10:17:22 2010 +0300
@@ -23,7 +23,7 @@
 #include <e32base.h>
 #include <e32std.h>
 #include <e32hashtab.h>
-#include <OpenMAXAL.h>
+#include <openmaxalwrapper.h>
 
 #include <hxmetadatautil.h>
 #include <MetaDataUtility.h>
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -86,6 +86,12 @@
  		iRadioPlayerUtility = &iRadioUtility->RadioPlayerUtilityL( *this ); 
  	}   
  	 
+	SetForceMonoFlag();
+	iDefaultFrequency = RADIO_DEFAULT_FREQ;
+	iDefaultFreqRange = (TFmRadioFrequencyRange)RADIO_DEFAULT_FREQ_RANGE;  
+	iDefaultMinFreq = RADIO_DEFAULT_MIN_FREQ;
+	iDefaultMaxFreq = RADIO_DEFAULT_MAX_FREQ;
+	 	 
 }
 void CMMFRadioBackendEngine::StationSeek(XAboolean aUpwards)
 {
@@ -98,6 +104,7 @@
 void CMMFRadioBackendEngine::SetFrequency(TInt aFreq)
 {
   DEBUG_API_A1("CMMFRadioBackendEngine::SetFrequency: %d", aFreq);	
+  
 	if (iFmTunerUtility)
  	{
   	iFmTunerUtility->SetFrequency(aFreq);
@@ -111,6 +118,11 @@
 	if (iFmTunerUtility)
 	{
   	ret = iFmTunerUtility->GetFrequency(aFreq);
+  	if (ret != KErrNone)
+  	{
+  		aFreq = iDefaultFrequency;
+  		ret = KErrNone;
+  	}
  	}	
   DEBUG_API_A1("CMMFRadioBackendEngine::GetFrequency RET: %d", ret);	 
 //  RDebug::Print(_L("CMMFRadioBackendEngine::GetFrequency RET: %d"), ret);	 
@@ -156,12 +168,19 @@
 TInt CMMFRadioBackendEngine::GetFreqRange(TFmRadioFrequencyRange& aRange)
 {
 	TInt ret = KErrNotFound;
-	TInt minFreq = 0;
-	TInt maxFreq = 0;
+	TInt minFreq;
+	TInt maxFreq;
 		
  	if (iFmTunerUtility)
  	{
  		ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)minFreq, (TInt&)maxFreq);
+ 		if (ret != KErrNone)
+ 		{
+ 			minFreq = iDefaultMinFreq;
+ 			maxFreq = iDefaultMaxFreq;
+ 			aRange = iDefaultFreqRange;
+ 			ret = KErrNone;
+ 		}
  	}	
   DEBUG_API_A1("CMMFRadioBackendEngine::GetFreqRange RET: %d", ret);	 
 //  RDebug::Print(_L("CMMFRadioBackendEngine::GetFreqRange RET: %d"), ret);	   	
@@ -174,7 +193,14 @@
 		
 	if (iFmTunerUtility)
  	{
-  	ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)aMinFreq, (TInt&)aMaxFreq);
+  		ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)aMinFreq, (TInt&)aMaxFreq);
+  		if (ret != KErrNone)
+  		{
+  			aRange = iDefaultFreqRange;
+  			aMinFreq = iDefaultMinFreq;
+  			aMaxFreq = iDefaultMaxFreq;
+  			ret = KErrNone;
+  		}
  	}	
   DEBUG_API_A1("CMMFRadioBackendEngine::GetFreqRangeProperties RET: %d", ret);	 	
 //  RDebug::Print(_L("CMMFRadioBackendEngine::GetFreqRangeProperties RET: %d"), ret);	   
@@ -232,9 +258,14 @@
 	if (iFmTunerUtility)
 	{
 		ret = iFmTunerUtility->GetForcedMonoReception(forceMono);
+		if (ret == KErrNotReady)
+		{
+			aForcedMono = XA_STEREOMODE_AUTO; // Radio Utility Default value
+			return KErrNone;
+		}
 	}		 
 		
-//  RDebug::Print(_L("CMMFRadioBackendEngine::GetForcedMonoReception RET: %d, aForcedMono = %d"), ret, aForcedMono);	 		
+	
 	if (forceMono)
 	{
 		aForcedMono = XA_STEREOMODE_MONO;
@@ -268,9 +299,9 @@
 TInt CMMFRadioBackendEngine::ForceMonoReception(XAuint32 aForcedMono)
 {
 	TInt ret = KErrNotFound;
-	TBool currentMode;
+	XAuint32 currentMode;
 	
-	ret = GetForcedMonoReception((XAuint32&)currentMode);
+	ret = GetForcedMonoReception(currentMode);
 	if (ret != XA_RESULT_SUCCESS)
 		return ret;
 		
@@ -311,6 +342,33 @@
   return ret;
 }
 
+XAresult CMMFRadioBackendEngine::SetForceMonoFlag() 
+{
+	TInt ret = KErrNotFound;
+	TBool forceMono;
+
+	if (iFmTunerUtility)
+	{
+		ret = iFmTunerUtility->GetForcedMonoReception(forceMono);
+		if (ret == KErrNotReady)
+		{
+			// For Radio Utility Default value = XA_STEREOMODE_STEREO
+			iForceStereo = ETrue;
+			return KErrNone;
+		}
+				
+	}		 
+		
+	if (forceMono == XA_STEREOMODE_MONO)
+	{
+		iForceStereo = EFalse;
+	}
+	else
+	{
+		iForceStereo = ETrue;			
+	}
+  return ret;
+}
 XAresult CMMFRadioBackendEngine::SetRadioAdaptContext(void * adaptcontext)
 {
 	iRadioAdaptContext = adaptcontext;
@@ -649,9 +707,9 @@
 		return ((CMMFRadioBackendEngine*)(context))->GetFreqRange((TFmRadioFrequencyRange&)*range); 			
 	}
     
-	XAresult  get_freq_range_properties(void* context, XAuint8 range, XAuint32* aMinFreq, XAuint32* aMaxFreq)
+	XAresult  get_freq_range_properties(void* context, XAuint8 aRange, XAuint32* aMinFreq, XAuint32* aMaxFreq)
 	{
-		return ((CMMFRadioBackendEngine*)(context))->GetFreqRangeProperties((TFmRadioFrequencyRange&)range, (TInt&) *aMinFreq, (TInt&) *aMaxFreq); 		
+		return ((CMMFRadioBackendEngine*)(context))->GetFreqRangeProperties((TFmRadioFrequencyRange&) aRange, (TInt&) *aMinFreq, (TInt&) *aMaxFreq); 		
 	}   
     
 	XAresult  get_max_volume(void* context, XAmillibel* maxVol)
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.h	Wed Aug 18 10:17:22 2010 +0300
@@ -227,6 +227,7 @@
     CMMFRadioBackendEngine();
     void ConstructL();
 	XAresult TranslateError(TInt error);    
+	XAresult SetForceMonoFlag();		 
 
 private:      
     CRadioUtility* 				iRadioUtility; 
@@ -235,6 +236,10 @@
     TBool						iForceStereo;
     void* 						iRadioAdaptContext;
     void* 						iPlayerAdaptContext;    
+    TFmRadioFrequencyRange 		iDefaultFreqRange;
+    XAuint32 					iDefaultFrequency; 
+    TInt 						iDefaultMinFreq;
+    TInt 						iDefaultMaxFreq; 
        
     };
     
@@ -258,6 +263,7 @@
 extern void         stop_radio(void * context);
 extern void         play_radio(void* context);
 extern XAresult     set_volume(void* context, XAuint32 vol);
+extern XAresult     get_volume(void* context, XAuint32* vol);
 extern XAresult     mmf_set_player_adapt_context(void * context, void * adaptcontext);
 extern XAresult     set_mute(void* context, XAboolean mute);
 #endif /* __cplusplus */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -169,7 +169,8 @@
         free(pSelf);
         pSelf = NULL;
         return NULL;
-        }DEBUG_API("<-XAMediaPlayerAdaptMMF_Create");
+        }
+    DEBUG_API("<-XAMediaPlayerAdaptMMF_Create");
     return (XAAdaptationBaseCtx*) (&pSelf->baseObj.baseObj);
     }
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -22,8 +22,6 @@
 #include "cmmfbackendengine.h"
 #include "xaadptbasectx.h"
 
-extern XAboolean cameraRealized;
-
 /*
  * XAAdaptationBaseCtx* XAMediaRecorderAdaptMMF_Create()
  * Allocates memory for Media Recorder Adaptation Context and makes 1st phase initialization
@@ -36,9 +34,7 @@
         XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes)
     {
     XAMediaRecorderAdaptationMMFCtx *pSelf = NULL;
-    XAuint32 locType = 0;
     XAresult res;
-    XADataLocator_IODevice *ioDevice;
     DEBUG_API("->XAMediaRecorderAdaptMMF_Create");
 
     pSelf = (XAMediaRecorderAdaptationMMFCtx*) calloc(1,
@@ -81,27 +77,6 @@
             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");
-                    XAAdaptationBaseMMF_Free(&pSelf->baseObj);
-                    free(pSelf);
-                    pSelf = NULL;
-                    }
-                }
-            }
         }
     else
         {
@@ -138,7 +113,7 @@
     XADataFormat_MIME* tempFormat;
     XAMediaRecorderAdaptationMMFCtx *pSelf;
     DEBUG_API("->XAMediaRecorderAdapt_PostInit");
-    if(bCtx)
+    if(!bCtx)
         {
         ret = XA_RESULT_PARAMETER_INVALID;
         return ret;
--- a/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -94,7 +94,8 @@
     DEBUG_API("->XAMetadataAdaptCtxMMF_Destroy");
     if (bCtx == NULL)
         {
-        DEBUG_ERR("Invalid parameter!!");DEBUG_API("<-XAMetadataAdaptCtxMMF_Destroy");
+        DEBUG_ERR("Invalid parameter!!");
+        DEBUG_API("<-XAMetadataAdaptCtxMMF_Destroy");
         return;
         }
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.c	Wed Aug 18 10:17:22 2010 +0300
@@ -133,7 +133,8 @@
     if (!(*ppListHead))
         {
         *ppListHead = firstNode;
-        }DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+        }
+    DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
     return res;
     }
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -47,6 +47,12 @@
         *percentage = (vol * MAX_PERCENTAGE_VOLUME)/maxvol;
         
         }
+    else if (ctx->baseObj.ctxId == XARadioAdaptation)
+        {
+        mmf_set_player_adapt_context(cmmfradiobackendengine_init(), ctx);
+        res = get_volume(cmmfradiobackendengine_init(), &vol);
+        *percentage = vol;
+        }      
 
     DEBUG_API_A1("<-XANokiaLinearVolumeItfAdapt_GetVolumeLevel %d", percentage);
     return res;
@@ -70,7 +76,8 @@
             && ctx->baseObj.ctxId != XAMediaRecorderAdaptation
             && ctx->baseObj.ctxId != XARadioAdaptation))
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
         /* invalid parameter */
         res = XA_RESULT_PARAMETER_INVALID;
         return res;
@@ -93,7 +100,8 @@
         {
         mmf_set_player_adapt_context(cmmfradiobackendengine_init(), ctx);
         res = set_volume(cmmfradiobackendengine_init(), percentage);
-        }DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+        }
+    DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
     return res;
     }
 
@@ -106,7 +114,8 @@
             && ctx->baseObj.ctxId != XAMediaRecorderAdaptation
             && ctx->baseObj.ctxId != XARadioAdaptation))
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
--- a/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -115,7 +115,8 @@
     if (!ctx || (ctx->baseObj.ctxId != XAMediaPlayerAdaptation
             && ctx->baseObj.ctxId != XAMediaRecorderAdaptation))
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -152,7 +153,8 @@
     if (!ctx || (ctx->baseObj.ctxId != XAMediaPlayerAdaptation
             && ctx->baseObj.ctxId != XAMediaRecorderAdaptation))
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -23,8 +23,6 @@
 #include "cmmfradiobackendengine.h"
 #include <glib.h>
 
-extern XAboolean cameraRealized;
-
 /*forward declaration of position updater callback*/
 gboolean XAPlayItfAdapt_PositionUpdate(gpointer ctx);
 
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaradioitfadaptation.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaradioitfadaptation.c	Wed Aug 18 10:17:22 2010 +0300
@@ -70,7 +70,7 @@
 
 /*
  * XAresult XARadioItfAdapt_GetFreqRangeProperties(XAAdaptationMMFCtx *bCtx,
- *                                                 XAuint8 * pRange,
+ *                                                 XAuint8 range,
  *                                                 XAuint32 * pMinFreq,
  *                                                 XAuint32 * pMaxFreq)
  */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -41,7 +41,8 @@
     DEBUG_API_A1("->XARecordItfAdaptMMF_SetRecordState %s",RECORDSTATENAME(state));
     if (!bCtx)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdaptMMF_SetRecordState");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdaptMMF_SetRecordState");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -111,7 +112,8 @@
 
     if (!bCtx)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdaptMMF_GetRecordState");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdaptMMF_GetRecordState");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -139,7 +141,8 @@
 
     if (!bCtx)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdaptMMF_GetPosition");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdaptMMF_GetPosition");
         /* invalid parameter */
         ret = XA_RESULT_PARAMETER_INVALID;
         return ret;
@@ -178,7 +181,8 @@
             event.data = &posInMsec;
             DEBUG_API_A1("XARecordItfAdapt_PositionUpdate: pos %lu ms", posInMsec);
             XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event);
-            }DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
+            }
+            DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
         return (mCtx->runpositiontimer);
         }
     /* return false to stop timer */
@@ -198,7 +202,8 @@
 
     if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
@@ -233,7 +238,8 @@
 
     if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
         /* invalid parameter */
         return XA_RESULT_PARAMETER_INVALID;
         }
--- a/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -38,7 +38,8 @@
     /* 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_QueryMediaContainerInformation");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -100,14 +101,16 @@
             &numStreams);
     if (ret != XA_RESULT_SUCCESS)
         {
-        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
+        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");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -291,7 +294,8 @@
     if (!adaptCtx || !pNameSize || (adaptCtx->ctxId
             != XAMediaPlayerAdaptation))
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -301,14 +305,16 @@
             &numStreams);
     if (ret != XA_RESULT_SUCCESS)
         {
-        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+        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");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
@@ -344,13 +350,15 @@
     if (!adaptCtx  || !numStreams || (adaptCtx->ctxId
             != XAMediaPlayerAdaptation))
         {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+        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");
+        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
         return XA_RESULT_PRECONDITIONS_VIOLATED;
         }
 
@@ -360,7 +368,8 @@
             &inputNumStreams);
     if (ret != XA_RESULT_SUCCESS)
         {
-        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
         return ret;
         }
 
@@ -369,7 +378,8 @@
         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");
+            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++)
@@ -400,13 +410,15 @@
     /* 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");
+        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");
+        DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
         return XA_RESULT_PRECONDITIONS_VIOLATED;
         }
 
@@ -416,14 +428,16 @@
             &numStreams);
     if (ret != XA_RESULT_SUCCESS)
         {
-        DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+        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");
+        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+        DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
         return XA_RESULT_PARAMETER_INVALID;
         }
 
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmix.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,458 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "xaoutputmix.h"
-#include "xaobjectitf.h"
-#include "xadynintmgmtitf.h"
-#include "xaconfigextensionsitf.h"
-#include "xaequalizeritf.h"
-#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]={
-    &XA_IID_OBJECT,
-    &XA_IID_DYNAMICINTERFACEMANAGEMENT,
-    &XA_IID_CONFIGEXTENSION,
-    &XA_IID_OUTPUTMIX,
-    &XA_IID_EQUALIZER,
-    &XA_IID_VOLUME
-};
-
-/*****************************************************************************
- * Global methods
- *****************************************************************************/
-
-
-/*
- *XAresult XAOMixImpl_CreateOutputMix(XAObjectItf *pMix,
- *                                    XAuint32 numInterfaces,
- *                                   const XAInterfaceID *pInterfaceIds,
- *                                   const XAboolean *pInterfaceRequired)
- * Description: Create object
- */
-XAresult XAOMixImpl_CreateOutputMix(FrameworkMap* mapper,
-                                    XACapabilities* capabilities,
-                                    XAObjectItf *pMix,
-                                    XAuint32 numInterfaces,
-                                    const XAInterfaceID *pInterfaceIds,
-                                    const XAboolean *pInterfaceRequired)
-{
-
-    XAObjectItfImpl* pBaseObj = NULL;
-    XAOMixImpl* pImpl = NULL;
-    XAuint32 itfIdx = 0;
-    DEBUG_API("->XAOMixImpl_CreateOutputMix");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
-
-    
-    
-    if(!pMix)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAOMixImpl_CreateOutputMix");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* instantiate object */
-    pImpl = (XAOMixImpl*)calloc(1,sizeof(XAOMixImpl));
-    if(!pImpl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-        /* memory allocation failed */
-        DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-        DEBUG_API("<-XAOMixImpl_CreateOutputMix");
-        return XA_RESULT_MEMORY_FAILURE;
-    }
-    pBaseObj = &pImpl->baseObj;
-
-    XAObjectItfImpl_Init(pBaseObj,
-                         OMIX_ITFCOUNT,
-                         xaOMixItfIIDs,
-                         XAOMixImpl_DoRealize,
-                         XAOMixImpl_DoResume,
-                         XAOMixImpl_FreeResources );
-
-    /* Mark interfaces that need to be exposed */
-    /* Implicit and mandated interfaces */
-    pBaseObj->interfaceMap[OMIX_OUTPUTMIXITF].required = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[OMIX_DIMITF].required = XA_BOOLEAN_TRUE;
-
-    /* Explicit interfaces */
-    if((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired)
-    {
-        /* Check required interfaces */
-        for(itfIdx = 0; itfIdx < numInterfaces; itfIdx++)
-        {
-            /* If mapEntry is null then required interface is not supported.*/
-            XAObjItfMapEntry *entry =
-                XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIdx]);
-            if( !entry  )
-            {
-                if( pInterfaceRequired[itfIdx] )
-                {
-                    /* required interface cannot be accommodated - fail creation */
-                    XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
-                    XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-                    DEBUG_ERR("Required interface not found - abort creation!");
-                    return XA_RESULT_FEATURE_UNSUPPORTED;
-                }
-                else
-                {
-                    DEBUG_INFO("Requested (not required) interface not found - continue creation");
-                }
-            }
-            else
-            {
-                entry->required = XA_BOOLEAN_TRUE;
-            }
-        }
-    }
-    /* Mark interfaces that can be handled dynamically */
-    pBaseObj->interfaceMap[OMIX_EQUALIZERITF].isDynamic = XA_BOOLEAN_TRUE;
-
-    /* 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;
-    /*************************************************/    
-    
-/*    // 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;*/
-}
-
-/*
- * XAresult XAOMixImpl_QueryNumSupportedInterfaces(XAuint32 * pNumSupportedInterfaces)
- * Description: Query number of supported interfaces
- */
-XAresult XAOMixImpl_QueryNumSupportedInterfaces(XAuint32 * pNumSupportedInterfaces)
-{
-    DEBUG_API("->XAOMixImpl_QueryNumSupportedInterfaces");
-    if( pNumSupportedInterfaces )
-    {
-        *pNumSupportedInterfaces = OMIX_ITFCOUNT;
-        DEBUG_API_A1("<-XAOMixImpl_QueryNumSupportedInterfaces - %lu", *pNumSupportedInterfaces );
-        return XA_RESULT_SUCCESS;
-    }
-    else
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAOMixImpl_QueryNumSupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-}
-
-/*
- * XAresult XAOMixImpl_QuerySupportedInterfaces(XAuint32 index, XAInterfaceID * pInterfaceId)
- * Description: Statically query supported interfaces
- */
-XAresult XAOMixImpl_QuerySupportedInterfaces(XAuint32 index,
-                                             XAInterfaceID * pInterfaceId)
-{
-    DEBUG_API("->XAOMixImpl_QuerySupportedInterfaces");
-    if (index >= OMIX_ITFCOUNT || !pInterfaceId)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAOMixImpl_QuerySupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-
-        *pInterfaceId = *(xaOMixItfIIDs[index]);
-
-        DEBUG_API("<-XAOMixImpl_QuerySupportedInterfaces");
-        return XA_RESULT_SUCCESS;
-    }
-}
-
-/*****************************************************************************
- * base object XAObjectItfImpl methods
- *****************************************************************************/
-
-/* XAresult XAOMixImpl_DoRealize(XAObjectItf self)
- * Description: Realize all implicit and explicitly wanted interfaces.
- * Create and initialize implementation-specific variables.
- * Called from base object XAObjectItfImpl
- */
-XAresult XAOMixImpl_DoRealize(XAObjectItf self)
-{
-
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAOMixImpl* pMixImpl = (XAOMixImpl*)(pObj);
-    XAuint8 itfIdx = 0;
-    DEBUG_API("->XAOMixImpl_DoRealize");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
-
-    /* check casting from correct pointer type */
-    if( !pMixImpl || pObj != pMixImpl->baseObj.self )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAOMixImpl_DoRealize");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* Initialize adaptation */
-    ret = XAOutputMixAdapt_PostInit( (XAAdaptationGstCtx*)pMixImpl->adaptationCtx );
-    if( ret != XA_RESULT_SUCCESS )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-        DEBUG_API("<-XAOMixImpl_DoRealize");
-        return ret;
-    }
-
-    /* Realize all implicit and explicitly wanted interfaces */
-    for( itfIdx = 0; itfIdx < OMIX_ITFCOUNT; itfIdx++)
-    {
-        if( !(pObj->interfaceMap[itfIdx].pItf) && pObj->interfaceMap[itfIdx].required )
-        {
-            void *pItf = NULL;
-            switch( itfIdx )
-            {
-                case OMIX_CONFIGEXTENSIONITF:
-                    pItf = XAConfigExtensionsItfImpl_Create();
-                    break;
-                case OMIX_DIMITF:
-                    pItf = XADIMItfImpl_Create();
-                    if(pItf)
-                    {
-                        XADIMItfImpl_Init(pItf, self,
-                                          XAOMixImpl_DoAddItf,
-                                          XAOMixImpl_DoResumeItf,
-                                          XAOMixImpl_DoRemoveItf);
-                    }
-                    break;
-                  case OMIX_EQUALIZERITF:
-                      pItf = XAEqualizerItfImpl_Create(pMixImpl->adaptationCtx);
-                      break;
-                  case OMIX_VOLUMEITF:
-                      pItf = XAVolumeItfImpl_Create(pMixImpl->adaptationCtx);
-                      break;
-                  case OMIX_OUTPUTMIXITF:
-                      pItf = XAOutputMixItfImpl_Create(pMixImpl->adaptationCtx);
-                      break;
-                  default:
-                      break;
-            }
-            if( !pItf )
-            {
-                XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-                DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-                /* memory allocation failed */
-                DEBUG_API("<-XAOMixImpl_DoRealize");
-                return XA_RESULT_MEMORY_FAILURE;
-            }
-            else
-            {
-                pObj->interfaceMap[itfIdx].pItf = pItf;
-            }
-        }
-    }
-
-    pObj->state = XA_OBJECT_STATE_REALIZED;
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-    
-    DEBUG_API("<-XAOMixImpl_DoRealize");
-    return XA_RESULT_SUCCESS;
-}
-
-/*
- * XAresult XAOMixImpl_DoResume(XAObjectItf self)
- * Description: Resume object from suspended state
- */
-XAresult XAOMixImpl_DoResume(XAObjectItf self)
-{
-    DEBUG_API("->XAOMixImpl_DoResume");
-    DEBUG_API("<-XAOMixImpl_DoResume");
-    /* This implementation does not support suspended state */
-    return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
-
-/*
- * void XAOMixImpl_FreeResources(XAObjectItf self)
- * Description: Free all resources reserved at XACameraDeviceImpl_DoRealize()
- */
-void XAOMixImpl_FreeResources(XAObjectItf self)
-{
-
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XAOMixImpl* pImpl = (XAOMixImpl*)(*self);
-    XAuint8 itfIdx = 0;
-    DEBUG_API("->XAOMixImpl_FreeResources");
-    XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSOutputMix);
-    assert( pObj && pImpl && pObj == pObj->self );
-
-    if ( pImpl->adaptationCtx != NULL )
-    {
-        XAOutputMixAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
-        pImpl->adaptationCtx = NULL;
-    }
-
-    /* free all allocated interfaces */
-    for(itfIdx = 0; itfIdx < OMIX_ITFCOUNT; itfIdx++)
-    {
-        void *pItf = pObj->interfaceMap[itfIdx].pItf;
-        if(pItf)
-        {
-            switch(itfIdx)
-            {
-               case OMIX_CONFIGEXTENSIONITF:
-                   XAConfigExtensionsItfImpl_Free( pItf );
-                   break;
-               case OMIX_DIMITF:
-                    XADIMItfImpl_Free( pItf );
-                    break;
-               case OMIX_EQUALIZERITF:
-                   XAEqualizerItfImpl_Free(pItf);
-                   break;
-               case OMIX_VOLUMEITF:
-                   XAVolumeItfImpl_Free(pItf);
-                   break;
-               case OMIX_OUTPUTMIXITF:
-                   XAOutputMixItfImpl_Free( pItf );
-                   break;
-               default:
-                   break;
-             }
-             pObj->interfaceMap[itfIdx].pItf = NULL;
-         }
-     }
-
-    if ( pImpl->adaptationCtx != NULL )
-    {
-        XAOutputMixAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
-        pImpl->adaptationCtx = NULL;
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSOutputMix);
-    
-    DEBUG_API("<-XAOMixImpl_FreeResources");
-}
-
-/*****************************************************************************
- * MediaRecorderImpl -specific methods
- *****************************************************************************/
-
-/* XAOMixImpl_DoAddItf
- * Dynamically add an interface, object specific parts
- */
-XAresult XAOMixImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
-{
-
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XAOMixImpl* pImpl = (XAOMixImpl*)(pObj);
-
-    XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAOMixImpl_DoAddItf");
-    if(mapEntry)
-    {
-        switch( mapEntry->mapIdx )
-        {
-        case OMIX_EQUALIZERITF:
-
-            mapEntry->pItf = XAEqualizerItfImpl_Create( pImpl->adaptationCtx );
-
-            break;
-        default:
-            DEBUG_ERR("XAOMixImpl_DoAddItf unknown id");
-            ret = XA_RESULT_FEATURE_UNSUPPORTED;
-            break;
-        }
-        if( !mapEntry->pItf && ret == XA_RESULT_SUCCESS)
-        {
-            DEBUG_ERR("XAOMixImpl_DoAddItf itf creation failed");
-            ret = XA_RESULT_MEMORY_FAILURE;
-        }
-    }
-    else
-    {
-        ret = XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    DEBUG_API("<-XAOMixImpl_DoAddItf");
-    return ret;
-}
-
-/* XAOMixImpl_DoResumeItf
- * Try to resume lost interface, object specific parts
- */
-XAresult XAOMixImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAOMixImpl_DoResumeItf");
-    /* For now, no difference between suspended and unrealised itfs */
-    ret = XAOMixImpl_DoAddItf(self,mapEntry);
-    DEBUG_API("<-XAOMixImpl_DoResumeItf");
-    return ret;
-}
-
-/* XAOMixImpl_DoRemoveItf
- * Dynamically remove an interface, object specific parts
- */
-XAresult XAOMixImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    DEBUG_API("->XAOMixImpl_DoRemoveItf");
-
-    if(mapEntry)
-    {
-        switch( mapEntry->mapIdx )
-        {
-        case OMIX_EQUALIZERITF:
-            XAEqualizerItfImpl_Free( mapEntry->pItf );
-            break;
-        default:
-            DEBUG_ERR("XAOMixImpl_DoRemoveItf unknown id");
-            ret = XA_RESULT_FEATURE_UNSUPPORTED;
-            break;
-        }
-        mapEntry->pItf = NULL;
-    }
-    else
-    {
-        ret = XA_RESULT_PARAMETER_INVALID;
-    }
-
-    DEBUG_API("<-XAOMixImpl_DoRemoveItf");
-    return ret;
-}
-
-/*END OF FILE*/
-
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmix.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +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 XAOUTPUTMIX_H
-#define XAOUTPUTMIX_H
-
-#include "openmaxalwrapper.h"
-#include "xaobjectitf.h"
-#include "xaglobals.h"
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-
-
-/** TYPES **/
-
-
-/** ENUMERATIONS **/
-/* Enumeration for interfaces that OutputMix supports.  */
-typedef enum
-{
-    OMIX_OBJECTITF,
-    OMIX_DIMITF,
-    OMIX_CONFIGEXTENSIONITF,
-    OMIX_OUTPUTMIXITF,
-    OMIX_EQUALIZERITF,
-    OMIX_VOLUMEITF,
-    OMIX_ITFCOUNT
-} XAOMixInterfaces;
-
-
-/** STRUCTURES **/
-/* Specification for  MediaPlayerImpl.*/
-typedef struct XAOMixImpl_
-{
-    /* Parent for XAMediaPlayerImpl */
-    XAObjectItfImpl baseObj;
-
-    /* variables */
-    XAAdaptationBaseCtx* adaptationCtx;
-
-} XAOMixImpl;
-
-
-/** METHODS **/
-
-/* base object XAObjectItfImpl methods */
-XAresult XAOMixImpl_DoRealize(XAObjectItf self);
-XAresult XAOMixImpl_DoResume(XAObjectItf self);
-void XAOMixImpl_FreeResources(XAObjectItf self);
-
-/* XAOMixImpl -specific methods*/
-XAresult XAOMixImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  );
-XAresult XAOMixImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry  );
-XAresult XAOMixImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-
-#endif /* XAOUTPUTMIX_H */
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmixitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +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 "xaoutputmixitf.h"
-
-#include "xaoutputmixitfadaptation.h"
-
-#include <assert.h>
-#include "xathreadsafety.h"
-#include "e32def.h"
-/**
- * XAOutputMixtfImpl* GetImpl(XAOutputMixtfImpl self)
- * Description: Validated interface pointer and cast it to implementations pointer.
- **/
-static XAOutputMixItfImpl* GetImpl(XAOutputMixItf self)
-{
-    if(self)
-    {
-        XAOutputMixItfImpl* impl = (XAOutputMixItfImpl*)(*self);
-        if(impl && impl == impl->self)
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XAOutputMixtf implementation
- */
-
-/*
- * XAresult XAOutputMixItfImpl_GetDestinationOutputDeviceIDs( XAOutputMixItf self,
- *                                                          XAint32 * pNumDevices,
- *                                                          XAuint32 * pDeviceIDs )
- * Description: Retrieves the device IDs of the destination output devices currently
- * associated with the output mix.
- */
-XAresult XAOutputMixItfImpl_GetDestinationOutputDeviceIDs( XAOutputMixItf self, XAint32 * pNumDevices, XAuint32 * pDeviceIDs )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAOutputMixItfImpl* impl = GetImpl(self);
-    DEBUG_API_A1("->XAOutputMixItfImpl_GetDestinationOutputDeviceIDs - pNumDevices %ld",*pNumDevices);
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
-    if(!impl || !pNumDevices  )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAOutputMixItfImpl_GetDestinationOutputDeviceIDs");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    ret = XAOutputMixItfAdapt_GetDestinationOutputDeviceIDs((XAAdaptationGstCtx*)impl->adapCtx, pNumDevices, pDeviceIDs );
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-    DEBUG_API_A1("<-XAOutputMixItfImpl_GetDestinationOutputDeviceIDs - pNumDevices %ld",*pNumDevices);
-    return ret;
-}
-
-/*
- * XAresult XAOutputMixItfImpl_RegisterDeviceChangeCallback( XAOutputMixItf self,
- *                                                          xaMixDeviceChangeCallback callback,
- *                                                          void * pContext)
- * Description: Registers a callback to notify client when there are changes to the
- * device IDs associated with the output mix.
- */
-XAresult XAOutputMixItfImpl_RegisterDeviceChangeCallback( XAOutputMixItf self, xaMixDeviceChangeCallback callback, void * pContext)
-{
-   XAresult ret = XA_RESULT_SUCCESS;
-   XAOutputMixItfImpl* impl = GetImpl(self);
-   DEBUG_API("->XAOutputMixItfImpl_RegisterDeviceChangeCallback");
-   if(!impl)
-   {
-       /* invalid parameter */
-       DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-       DEBUG_API("<-XAOutputMixItfImpl_RegisterDeviceChangeCallback");
-       return XA_RESULT_PARAMETER_INVALID;
-   }
-
-   /* callback may be NULL (to remove callback) */
-   impl->callback = callback;
-   impl->cbContext = pContext;
-   impl->cbPtrToSelf = self;
-
-   if(callback)
-   {   /* start listening */
-       XAAdaptationBase_AddEventHandler( impl->adapCtx, &XAOutputMixItfImpl_AdaptCb, XA_OUTPUTMIXITFEVENTS, (void*)self );
-   }
-   else
-   {   /* stop listening */
-       XAAdaptationBase_RemoveEventHandler( impl->adapCtx, &XAOutputMixItfImpl_AdaptCb );
-   }
-
-
-   DEBUG_API("<-XAOutputMixItfImpl_RegisterDeviceChangeCallback");
-   return ret;
-}
-
-/*
- * XAresult XAOutputMixItfImpl_ReRoute( XAOutputMixItf self,
- *                                      XAint32 numOutputDevices,
- *                                      XAuint32 * pOutputDeviceIDs)
- * Description: Requests a change to the specified set of output devices on an output mix.
- */
-XAresult XAOutputMixItfImpl_ReRoute( XAOutputMixItf self, XAint32 numOutputDevices, XAuint32 * pOutputDeviceIDs)
-{
-   XAresult ret = XA_RESULT_SUCCESS;
-   XAOutputMixItfImpl* impl = GetImpl(self);
-
-   DEBUG_API("->XAOutputMixItfImpl_ReRoute");
-   XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
-
-   if(!impl || ( numOutputDevices > 0 && !pOutputDeviceIDs) )
-   {
-       /* invalid parameter */
-       XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-       DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-       DEBUG_API("<-XAOutputMixItfImpl_ReRoute");
-       return XA_RESULT_PARAMETER_INVALID;
-   }
-
-
-   ret = XAOutputMixItfAdapt_ReRoute((XAAdaptationGstCtx*)impl->adapCtx, numOutputDevices, pOutputDeviceIDs );
-
-
-   XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
-   DEBUG_API("<-XAOutputMixItfImpl_ReRoute");
-   return ret;
-
-}
-
-/**
- * XAVolumeItfImpl -specific methods
- **/
-
-
-/*
- * XAOutputMixItfImpl* XAOutputMixItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
- * Description: Creates new Output mix itf implmementation
- */
-XAOutputMixItfImpl* XAOutputMixItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
-{
-   XAOutputMixItfImpl *self = (XAOutputMixItfImpl*)
-        calloc(1,sizeof(XAOutputMixItfImpl));
-   DEBUG_API("->XAVolumeItfImpl_Create");
-
-    if(self)
-    {
-        /* init itf default implementation */
-        self->itf.GetDestinationOutputDeviceIDs = XAOutputMixItfImpl_GetDestinationOutputDeviceIDs;
-        self->itf.RegisterDeviceChangeCallback = XAOutputMixItfImpl_RegisterDeviceChangeCallback;
-        self->itf.ReRoute = XAOutputMixItfImpl_ReRoute;
-
-        /* init variables */
-        self->adapCtx = adapCtx;
-        self->callback = NULL;
-        self->cbContext = NULL;
-        self->cbPtrToSelf = NULL;
-
-        self->self = self;
-    }
-
-    DEBUG_API("<-XAVolumeItfImpl_Create");
-    return self;
-}
-
-/*
- * void XAOutputMixItfImpl_Free(XAOutputMixItfImpl* self)
- * Description: Frees XAOutputMixItfImpl
- */
-void XAOutputMixItfImpl_Free(XAOutputMixItfImpl* self)
-{
-    DEBUG_API("->XAOutputMixItfImpl_Free");
-    assert(self==self->self);
-    if( self->callback )
-    {
-        XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XAOutputMixItfImpl_AdaptCb );
-    }
-    free(self);
-    DEBUG_API("<-XAOutputMixItfImpl_Free");
-}
-
-
-
-/* void XAOutputMixItfImpl_AdaptCb( void *pHandlerCtx,
- *                                  XAAdaptEvent *event )
- * Description: Listen changes in adaptation
- */
-void XAOutputMixItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
-     XAOutputMixItfImpl* impl = (XAOutputMixItfImpl*)pHandlerCtx;
-     DEBUG_API("->XAOutputMixItfImpl_AdaptCb");
-
-     if(!impl)
-     {
-        DEBUG_ERR("XAOutputMixItfImpl_AdaptCb, invalid context pointer!");
-        return;
-     }
-     assert(event);
-
-     /* send callback if needed.
-      * Check event-id to avoid sending incorrect events. */
-     if( (event->eventid==XA_ADAPT_OMIX_DEVICESET_CHANGED) && impl->callback )
-     {
-        impl->callback(impl->cbPtrToSelf, impl->cbContext);
-     }
-
-     DEBUG_API("<-XAOutputMixItfImpl_AdaptCb");
-}
-
--- a/khronosfws/openmax_al/src/outputmix/xaoutputmixitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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 XAOUTPUTMIXITF_H_
-#define XAOUTPUTMIXITF_H_
-
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAOutputMixItf implementation */
-typedef struct XAOutputMixItfImpl_
-{
-    /* parent interface */
-    struct XAOutputMixItf_ itf;
-    /* pointer to self */
-    struct XAOutputMixItfImpl_* self;
-
-    /* Variables */
-
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-
-    XAuint32 eventFlags;
-    xaMixDeviceChangeCallback callback;
-    void    *cbContext;
-    XAOutputMixItf cbPtrToSelf;
-
-} XAOutputMixItfImpl;
-
-/** METHODS **/
-
-/* Base interface XAOutputMixItf implementation */
-XAresult XAOutputMixItfImpl_GetDestinationOutputDeviceIDs( XAOutputMixItf self, XAint32 * pNumDevices, XAuint32 * pDeviceIDs );
-XAresult XAOutputMixItfImpl_RegisterDeviceChangeCallback( XAOutputMixItf self, xaMixDeviceChangeCallback callback, void * pContext);
-XAresult XAOutputMixItfImpl_ReRoute( XAOutputMixItf self, XAint32 numOutputDevices, XAuint32 * pOutputDeviceIDs);
-
-
-/* XAOutputMixItfImpl -specific methods */
-XAOutputMixItfImpl* XAOutputMixItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-void XAOutputMixItfImpl_Free(XAOutputMixItfImpl* self);
-void XAOutputMixItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-
-
-#endif /* XAOUTPUTMIXITF_H_ */
--- a/khronosfws/openmax_al/src/radio/xaradiodevice.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradiodevice.c	Wed Aug 18 10:17:22 2010 +0300
@@ -22,7 +22,6 @@
 #include "xaradioitf.h"
 #include "xaconfigextensionsitf.h"
 #include "xadynintmgmtitf.h"
-#include "xardsitf.h"
 #include "xathreadsafety.h"
 #include "xaradioadaptctx.h"
 /* Static mapping of enumeration XARadioDeviceInterfaces to interface iids */
@@ -31,8 +30,7 @@
     &XA_IID_OBJECT,
     &XA_IID_RADIO,
     &XA_IID_CONFIGEXTENSION,
-    &XA_IID_DYNAMICINTERFACEMANAGEMENT,
-    &XA_IID_RDS
+    &XA_IID_DYNAMICINTERFACEMANAGEMENT
 };
 
 /*****************************************************************************
@@ -233,11 +231,6 @@
                 case RADIO_DIMITF:
                     pItf = XADIMItfImpl_Create();
                     break;
-                case RADIO_RDSITF:
-
-                   pItf = XARDSItfImpl_Create( pObjImpl->adaptationCtx );
-
-                   break;
                 default:
                     break;
             }
@@ -305,9 +298,6 @@
                 case RADIO_DIMITF:
                     XADIMItfImpl_Free( pItf );
                     break;
-                case RADIO_RDSITF:
-                    XARDSItfImpl_Free( pItf );
-                    break;
                 default:
                     break;
             }
--- a/khronosfws/openmax_al/src/radio/xaradiodevice.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradiodevice.h	Wed Aug 18 10:17:22 2010 +0300
@@ -37,7 +37,6 @@
     RADIO_RADIOITF,
     RADIO_CONFIGEXTENSIONITF,
     RADIO_DIMITF,
-    RADIO_RDSITF,
     RADIO_ITFCOUNT
 } XARadioDeviceInterfaces;
 
--- a/khronosfws/openmax_al/src/radio/xaradioitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradioitf.c	Wed Aug 18 10:17:22 2010 +0300
@@ -19,7 +19,6 @@
 #include <stdlib.h>
 #include <assert.h>
 #include <string.h>
-#include <xaradioitfext.h>
 #include "xaradioitf.h"
 #include "xaradioitfadaptation.h"
 #include "xathreadsafety.h"
@@ -96,7 +95,6 @@
     XAresult ret = XA_RESULT_SUCCESS;
     XARadioItfImpl* impl = GetImpl(self);
     DEBUG_API("->XARadioItfImpl_GetFreqRange");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
 
     if(!impl || !pRange)
     {
@@ -109,7 +107,6 @@
 
     ret = XARadioItfAdapt_GetFreqRange(pRange);
 
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_GetFreqRange");
     return ret;
 }
@@ -148,7 +145,7 @@
 
 /**
  * XAresult XARadioItfImpl_GetFreqRangeProperties(XARadioItf self,
- *                                                XAuint8 range,
+ *                                                XAuint8  range,
  *                                                XAuint32 * pMinFreq,
  *                                                XAuint32 * pMaxFreq,
  *                                                XAuint32 * pFreqInterval)
@@ -156,7 +153,7 @@
  *              modulation of the given frequency range.
  **/
 XAresult XARadioItfImpl_GetFreqRangeProperties(XARadioItf self,
-                                               XAuint8 range,
+                                               XAuint8  range,
                                                XAuint32 * pMinFreq,
                                                XAuint32 * pMaxFreq,
                                                XAuint32 * pFreqInterval)
@@ -168,21 +165,9 @@
    *pFreqInterval = FREQINTERVAL;   
 		    
     DEBUG_API("->XARadioItfImpl_GetFreqRangeProperties");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
 
     if(!impl || !pMinFreq || !pMaxFreq || !pFreqInterval)
     {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    ret = XARadioItfAdapt_IsFreqRangeSupported( range, &isSupported );
-
-    if (isSupported != XA_BOOLEAN_TRUE || ret != XA_RESULT_SUCCESS)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
         /* invalid parameter */
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
@@ -192,7 +177,6 @@
     ret = XARadioItfAdapt_GetFreqRangeProperties( (XAAdaptationMMFCtx*)impl->adapCtx,
             range, pMinFreq, pMaxFreq );
 
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
     return ret;
 }
@@ -208,6 +192,10 @@
 XAresult XARadioItfImpl_SetFrequency(XARadioItf self, XAuint32 freq)
 {
     XAresult ret = XA_RESULT_SUCCESS;
+    XAuint8 range = 1; // Default to EuroAmerica
+    XAuint32 minFreq;
+    XAuint32 maxFreq;
+   	XAuint32 freqInterval;
         
     XARadioItfImpl* impl = GetImpl(self);
     DEBUG_API("->XARadioItfImpl_SetFrequency");
@@ -221,9 +209,23 @@
         return XA_RESULT_PARAMETER_INVALID;
     }
     
- 
-
-    ret = XARadioItfAdapt_SetFrequency( (XAAdaptationMMFCtx*)impl->adapCtx, freq );
+    // Check for valid entries: 
+ 		ret = XARadioItfImpl_GetFreqRangeProperties(self, range, &minFreq, &maxFreq, &freqInterval);   
+    if (ret != XA_RESULT_SUCCESS)
+    {
+    	XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
+    	DEBUG_API("<-XARadioItfImpl_SetFrequency");    	
+    	return ret;
+    }		
+    
+    if ( (freq < minFreq) || (freq > maxFreq) )
+    {
+    	XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
+    	DEBUG_API("<-XARadioItfImpl_SetFrequency");    	
+    	return XA_RESULT_PARAMETER_INVALID;
+    }	  
+           
+   	ret = XARadioItfAdapt_SetFrequency( (XAAdaptationMMFCtx*)impl->adapCtx, freq );
 
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
     DEBUG_API("<-XARadioItfImpl_SetFrequency");
--- a/khronosfws/openmax_al/src/radio/xardsitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,881 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xardsitf.h"
-#include "xardsitfadaptation.h"
-#include "xathreadsafety.h"
-#include "xaadaptationgst.h"
-/**
- * XARDSItfImpl* GetImpl(XARDSItf self)
- * Description: Validated interface pointer and cast it to implementations pointer.
- **/
-static XARDSItfImpl* GetImpl(XARDSItf self)
-{
-    if(self)
-    {
-        XARDSItfImpl *impl = (XARDSItfImpl*)(*self);
-        if(impl && impl == impl->self)
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/**
- * Base interface XARDSItf implementation
- */
-
-/**
- * XAresult XARDSItfImpl_QueryRDSSignal(XARDSItf self, XAboolean * isSignal)
- * Description: Returns the status of the RDS reception.
- **/
-XAresult XARDSItfImpl_QueryRDSSignal(XARDSItf self, XAboolean * isSignal)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_QueryRDSSignal");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl || !isSignal)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_QueryRDSSignal");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_QueryRDSSignal((XAAdaptationGstCtx*)impl->adapCtx, isSignal);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_QueryRDSSignal");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetProgrammeServiceName(XARDSItf self, XAchar * ps)
- * Description: Gets the current Programme Service name (PS).
- **/
-XAresult XARDSItfImpl_GetProgrammeServiceName(XARDSItf self, XAchar * ps)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetProgrammeServiceName");
-    if(!impl || !ps)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetProgrammeServiceName");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetProgrammeServiceName((XAAdaptationGstCtx*)impl->adapCtx, ps);
-
-    DEBUG_API("<-XARDSItfImpl_GetProgrammeServiceName");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetRadioText(XARDSItf self, XAchar * rt)
- * Description: Gets the current Radio Text (RT).
- **/
-XAresult XARDSItfImpl_GetRadioText(XARDSItf self, XAchar * rt)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetRadioText");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl || !rt)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetRadioText");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetRadioText((XAAdaptationGstCtx*)impl->adapCtx, rt);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetRadioText");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetRadioTextPlus(XARDSItf self,
- *                                        XAuint8 contentType,
- *                                        XAchar * informationElement,
- *                                        XAchar * descriptor,
- *                                        XAuint8 * descriptorContentType)
- * Description: Gets the current Radio Text+ (RT+) information element based
- *              on the given class code.
- **/
-XAresult XARDSItfImpl_GetRadioTextPlus(XARDSItf self,
-                                       XAuint8 contentType,
-                                       XAchar * informationElement,
-                                       XAchar * descriptor,
-                                       XAuint8 * descriptorContentType)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetRadioTextPlus");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl || contentType < XA_RDSRTPLUS_ITEMTITLE || contentType > XA_RDSRTPLUS_GETDATA
-            || !informationElement || !descriptor || !descriptorContentType)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetRadioTextPlus");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_GetRadioTextPlus((XAAdaptationGstCtx*)impl->adapCtx, contentType, informationElement,
- //                                       descriptor, descriptorContentType);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetRadioTextPlus");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetProgrammeType(XARDSItf self, XAuint32 * pty)
- * Description: Gets the current Programme TYpe (PTY) as short. The
- *              return value zero corresponds to No Programme Type
- *              or to undefined type. Please note that PTYs in RBDS
- *              differ from the ones in RDS.
- **/
-XAresult XARDSItfImpl_GetProgrammeType(XARDSItf self, XAuint32 * pty)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetProgrammeType");
-
-    if(!impl || !pty)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetProgrammeType");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty);
-
-    DEBUG_API("<-XARDSItfImpl_GetProgrammeType");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetProgrammeTypeString(XARDSItf self,
- *                                              XAboolean isLengthMax16,
- *                                              XAchar * pty)
- * Description: Gets the current Programme TYpe (PTY) as a String with
- *              the maximum of 8 or 16 characters in English (char set TBD)
- *              as defined in RDS and RBDS specifications. Please note
- *              that PTYs in RBDS differ from the ones in RDS.
- **/
-XAresult XARDSItfImpl_GetProgrammeTypeString(XARDSItf self,
-                                             XAboolean isLengthMax16,
-                                             XAchar * pty)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetProgrammeTypeString");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl || !pty)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetProgrammeTypeString");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetProgrammeTypeString((XAAdaptationGstCtx*)impl->adapCtx, isLengthMax16, pty);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetProgrammeTypeString");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetProgrammeIdentificationCode(XARDSItf self, XAint16 * pi)
- * Description: Gets the current Programme Identification code (PI). The PI is not
- *              intended for directly displaying to the end user, but instead to
- *              identify uniquely a programme. This can be used to detect that two
- *              frequencies are transmitting the same programme.
- **/
-XAresult XARDSItfImpl_GetProgrammeIdentificationCode(XARDSItf self, XAint16 * pi)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetProgrammeIdentificationCode");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl || !pi)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetProgrammeIdentificationCode");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetProgrammeIdentificationCode((XAAdaptationGstCtx*)impl->adapCtx, pi);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetProgrammeIdentificationCode");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetClockTime(XARDSItf self, XAtime * dateAndTime)
- * Description: Gets the current Clock Time and date (CT).
- **/
-XAresult XARDSItfImpl_GetClockTime(XARDSItf self, XAtime * dateAndTime)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetClockTime");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl || !dateAndTime)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetClockTime");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_GetClockTime((XAAdaptationGstCtx*)impl->adapCtx, dateAndTime);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetClockTime");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetTrafficAnnouncement(XARDSItf self, XAboolean * ta)
- * Description: Gets the current status of the Traffic Announcement (TA) switch.
- **/
-XAresult XARDSItfImpl_GetTrafficAnnouncement(XARDSItf self, XAboolean * ta)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetTrafficAnnouncement");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl || !ta)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetTrafficAnnouncement");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, ta);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetTrafficAnnouncement");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetTrafficProgramme(XARDSItf self, XAboolean * tp)
- * Description: Gets the current status of the Traffic Programme (TP) switch.
- **/
-XAresult XARDSItfImpl_GetTrafficProgramme(XARDSItf self, XAboolean * tp)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetTrafficProgramme");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl || !tp)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetTrafficProgramme");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, tp);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetTrafficProgramme");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_SeekByProgrammeType(XARDSItf self,
- *                                           XAuint32 pty,
- *                                           XAboolean upwards)
- * Description: Seeks for the frequency sending the given Programme TYpe (PTY).
- *              If the end of the tuner’s frequency band is reached before the
- *              given Programme TYpe is found, the scan continues from the other
- *              end until the given Programme TYpe is found or the original frequency
- *              is reached. Asynchronous - tuner callback xaRadioCallback() and
- *              XA_RADIO_EVENT_SEEK_COMPLETED is used for notifying of the result.
- *              StopSeeking() method of XARadioItf can be used to abort an ongoing seek.
- **/
-XAresult XARDSItfImpl_SeekByProgrammeType(XARDSItf self,
-                                          XAuint32 pty,
-                                          XAboolean upwards)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_SeekByProgrammeType");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl || pty > XA_RDSPROGRAMMETYPE_RDSPTY_ALARM)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_SeekByProgrammeType");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_SeekByProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty, upwards);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_SeekByProgrammeType");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_SeekTrafficAnnouncement(XARDSItf self, XAboolean upwards)
- * Description: Seeks for a frequency sending Traffic Announcement (TA). If the end
- *              of the tuner’s frequency band is reached before a Traffic Announcement
- *              is found, the scan continues from the other end until a Traffic
- *              Announcement is found or the original frequency is reached. Asynchronous
- *              - tuner callback xaRadioCallback() and XA_RADIO_EVENT_SEEK_COMPLETED
- *              is used for notifying of the result. StopSeeking() method of XARadioItf
- *              can be used to abort an ongoing seek.
- **/
-XAresult XARDSItfImpl_SeekTrafficAnnouncement(XARDSItf self, XAboolean upwards)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_SeekTrafficAnnouncement");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_SeekTrafficAnnouncement");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_SeekTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, upwards);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_SeekTrafficAnnouncement");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_SeekTrafficProgramme(XARDSItf self, XAboolean upwards)
- * Description: Seeks for a frequency sending Traffic Programme (TP). If the end
- *              of the tuner’s frequency band is reached before a Traffic Programme
- *              is found, the scan continues from the other end until a Traffic
- *              Programme is found or the original frequency is reached. Asynchronous
- *              - tuner callback xaRadioCallback() and XA_RADIO_EVENT_SEEK_COMPLETED
- *              is used for notifying of the result. StopSeeking() method of XARadioItf
- *              can be used to abort an ongoing seek.
- **/
-XAresult XARDSItfImpl_SeekTrafficProgramme(XARDSItf self, XAboolean upwards)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_SeekTrafficProgramme");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_SeekTrafficProgramme");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_SeekTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, upwards);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_SeekTrafficProgramme");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_SetAutomaticSwitching(XARDSItf self, XAboolean automatic)
- * Description: Sets the automatic switching of the transmitter in the case of a
- *              stronger transmitter with the same PI presence. Based on AF and/or
- *              EON fields. Please note that NOT ALL IMPLEMENTATIONS SUPPORT THIS
- *              FUNCTIONALITY.
- **/
-XAresult XARDSItfImpl_SetAutomaticSwitching(XARDSItf self, XAboolean automatic)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_SetAutomaticSwitching");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_SetAutomaticSwitching");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_SetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_SetAutomaticSwitching");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetAutomaticSwitching(XARDSItf self, XAboolean * automatic)
- * Description: Gets the mode of the automatic switching of the transmitter in
- *              case of a stronger transmitter with the same PI presence.
- **/
-XAresult XARDSItfImpl_GetAutomaticSwitching(XARDSItf self, XAboolean * automatic)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetAutomaticSwitching");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl || !automatic)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetAutomaticSwitching");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_GetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetAutomaticSwitching");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_SetAutomaticTrafficAnnouncement(XARDSItf self, XAboolean automatic)
- * Description: Sets the automatic switching of the program in case of the presence
- *              of Traffic Announcement in another program. Based on TP and TA fields.
- *              Please note that NOT ALL IMPLEMENTATIONS SUPPORT THIS FUNCTIONALITY.
- **/
-XAresult XARDSItfImpl_SetAutomaticTrafficAnnouncement(XARDSItf self, XAboolean automatic)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_SetAutomaticTrafficAnnouncement");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_SetAutomaticTrafficAnnouncement");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_SetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_SetAutomaticTrafficAnnouncement");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetAutomaticTrafficAnnouncement(XARDSItf self, XAboolean * automatic)
- * Description: Gets the mode of the automatic switching of the program in case of
- *              the presence of Traffic Announcement in another program. Based on
- *              TP and TA fields.
- **/
-XAresult XARDSItfImpl_GetAutomaticTrafficAnnouncement(XARDSItf self, XAboolean * automatic)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetAutomaticTrafficAnnouncement");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl || !automatic)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetAutomaticTrafficAnnouncement");
-
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_GetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetAutomaticTrafficAnnouncement");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_GetODAGroup(XARDSItf self,
- *                                   XAint16 AID,
- *                                   xaGetODAGroupCallback callback,
- *                                   void * pContext)
- * Description: Returns asynchronously via callback (xaGetODAGroupCallback())
- *              the application Group and the message bits concerning the given
- *              ODA (Open Data Application). ODA is a mechanism that a broadcaster
- *              can use to transfer data that is not explicitly specified in the RDS
- *              standard. Open Data Applications are subject to a registration process.
- *              Transmission protocols used by ODAs may be public or private. See RDS
- *              Forum web page (http://www.rds.org.uk/)for details.
- **/
-XAresult XARDSItfImpl_GetODAGroup(XARDSItf self,
-                                  XAuint16 AID,
-                                  xaGetODAGroupCallback callback,
-                                  void * pContext)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_GetODAGroup");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    if(!impl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_GetODAGroup");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->odaGroupCallback = callback;
-    impl->odaGroupContext = pContext;
-    impl->odaGroupCbPtrToSelf = self;
-
-    if (callback)
-    {
-
- //       ret = XARDSItfAdapt_GetODAGroup((XAAdaptationGstCtx*)impl->adapCtx, AID);
-
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_GetODAGroup");
-
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_SubscribeODAGroup(XARDSItf self,
- *                                         XAint16 group,
- *                                         XAboolean useErrorCorrection)
- * Description: Subscribes the given ODA group. If the given group was already
- *              subscribed, this call doesn’t do anything. Only new data in groups
- *              that have been subscribed will cause a newODA callback.
- **/
-XAresult XARDSItfImpl_SubscribeODAGroup(XARDSItf self,
-                                        XAint16 group,
-                                        XAboolean useErrorCorrection)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XARDSItfImpl_SubscribeODAGroup");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_SubscribeODAGroup");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    ret = XARDSItfAdapt_SubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group, useErrorCorrection);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_SubscribeODAGroup");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_UnsubscribeODAGroup(XARDSItf self, XAint16 group)
- * Description: Unsubscribes the given ODA group. If the given group has not
- *              been subscribed, this doesn’t do anything. Only new data in
- *              groups that have been subscribed will cause a newODA callback.
- **/
-XAresult XARDSItfImpl_UnsubscribeODAGroup(XARDSItf self, XAint16 group)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-
-    DEBUG_API("->XARDSItfImpl_UnsubscribeODAGroup");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-
-    if(!impl)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_UnsubscribeODAGroup");
-
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
- //   ret = XARDSItfAdapt_UnsubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_UnsubscribeODAGroup");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_ListODAGroupSubscriptions(XARDSItf self,
- *                                                 XAint16* pGroups,
- *                                                 XAuint32* pLength);
- * Description: Lists ODA groups that are currently subscribed.
- **/
-XAresult XARDSItfImpl_ListODAGroupSubscriptions(XARDSItf self,
-                                                XAint16* pGroups,
-                                                XAuint32* pLength)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
-    DEBUG_API("->XARDSItfImpl_ListODAGroupSubscriptions");
-
-    if(!impl || !pLength)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_ListODAGroupSubscriptions");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-//    XARDSItfAdapt_ListODAGroupSubscriptions((XAAdaptationGstCtx*)impl->adapCtx, pGroups, pLength);
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_ListODAGroupSubscriptions");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_RegisterRDSCallback(XARDSItf self,
- *                                           xaRDSCallback callback,
- *                                           void * pContext)
- * Description: Sets or clears the xaNewODADataCallback(). xaNewODADataCallback()
- *              is used tranfer the actual ODA data to the application.
- **/
-XAresult XARDSItfImpl_RegisterRDSCallback(XARDSItf self,
-                                          xaRDSCallback callback,
-                                          void * pContext)
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_RegisterRDSCallback");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_RegisterRDSCallback");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->rdsCallback = callback;
-    impl->rdsContext = pContext;
-    impl->rdsCbPtrToSelf = self;
-
-    DEBUG_API("<-XARDSItfImpl_RegisterRDSCallback");
-    return ret;
-}
-
-/**
- * XAresult XARDSItfImpl_RegisterODADataCallback(XARDSItf self,
- *                                               xaNewODADataCallback callback,
- *                                               void * pContext)
- * Description: Sets or clears the xaRDSCallback(). xaRDSCallback() is used to monitor
- *              changes in RDS fields.
- **/
-XAresult XARDSItfImpl_RegisterODADataCallback(XARDSItf self,
-                                              xaNewODADataCallback callback,
-                                              void * pContext)
-{
-
-    XAresult ret = XA_RESULT_SUCCESS;
-    XARDSItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XARDSItfImpl_RegisterODADataCallback");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        /* invalid parameter */
-        DEBUG_API("<-XARDSItfImpl_RegisterODADataCallback");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    impl->odaDataCallback = callback;
-    impl->odaDataContext = pContext;
-    impl->odaDataCbPtrToSelf = self;
-
-    DEBUG_API("<-XARDSItfImpl_RegisterODADataCallback");
-    return ret;
-}
-
-/**
- * XARDSItfImpl -specific methods
- **/
-
-
-/**
- * XARDSItfImplImpl* XARDSItfImpl_Create()
- * @return  XARDSItfImplImpl* - Pointer to  RDSItf interface implementation
- **/
-XARDSItfImpl* XARDSItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
-{
-    XARDSItfImpl *self = (XARDSItfImpl*)
-        calloc(1,sizeof(XARDSItfImpl));
-    DEBUG_API("->XARDSItfImpl_Create");
-    if(self)
-    {
-        /* init itf default implementation */
-        self->itf.QueryRDSSignal = XARDSItfImpl_QueryRDSSignal;
-        self->itf.GetProgrammeServiceName = XARDSItfImpl_GetProgrammeServiceName;
-        self->itf.GetRadioText = XARDSItfImpl_GetRadioText;
-        self->itf.GetRadioTextPlus = XARDSItfImpl_GetRadioTextPlus;
-        self->itf.GetProgrammeType = XARDSItfImpl_GetProgrammeType;
-        self->itf.GetProgrammeTypeString = XARDSItfImpl_GetProgrammeTypeString;
-        self->itf.GetProgrammeIdentificationCode = XARDSItfImpl_GetProgrammeIdentificationCode;
-        self->itf.GetClockTime = XARDSItfImpl_GetClockTime;
-        self->itf.GetTrafficAnnouncement = XARDSItfImpl_GetTrafficAnnouncement;
-        self->itf.GetTrafficProgramme = XARDSItfImpl_GetTrafficProgramme;
-        self->itf.SeekByProgrammeType = XARDSItfImpl_SeekByProgrammeType;
-        self->itf.SeekTrafficAnnouncement = XARDSItfImpl_SeekTrafficAnnouncement;
-        self->itf.SeekTrafficProgramme = XARDSItfImpl_SeekTrafficProgramme;
-        self->itf.SetAutomaticSwitching = XARDSItfImpl_SetAutomaticSwitching;
-        self->itf.GetAutomaticSwitching = XARDSItfImpl_GetAutomaticSwitching;
-        self->itf.SetAutomaticTrafficAnnouncement = XARDSItfImpl_SetAutomaticTrafficAnnouncement;
-        self->itf.GetAutomaticTrafficAnnouncement = XARDSItfImpl_GetAutomaticTrafficAnnouncement;
-        self->itf.GetODAGroup = XARDSItfImpl_GetODAGroup;
-        self->itf.SubscribeODAGroup = XARDSItfImpl_SubscribeODAGroup;
-        self->itf.UnsubscribeODAGroup = XARDSItfImpl_UnsubscribeODAGroup;
-        self->itf.ListODAGroupSubscriptions = XARDSItfImpl_ListODAGroupSubscriptions;
-        self->itf.RegisterRDSCallback = XARDSItfImpl_RegisterRDSCallback;
-        self->itf.RegisterODADataCallback = XARDSItfImpl_RegisterODADataCallback;
-
-        /* init variables */
-
-        self->odaDataCallback = NULL;
-        self->odaDataContext = NULL;
-        self->odaDataCbPtrToSelf = NULL;
-        self->odaGroupCallback = NULL;
-        self->odaGroupContext = NULL;
-        self->odaGroupCbPtrToSelf = NULL;
-        self->rdsCallback = NULL;
-        self->rdsContext = NULL;
-        self->rdsCbPtrToSelf = NULL;
-
-        XAAdaptationBase_AddEventHandler( adapCtx, &XARDSItfImpl_AdaptCb, XA_RDSITFEVENTS, self );
-
-        self->adapCtx = adapCtx;
-
-        self->self = self;
-    }
-
-    DEBUG_API("<-XARDSItfImpl_Create");
-    return self;
-}
-
-/* void XARDSItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
- * @param void *pHandlerCtx - pointer to cb context (XARadioItfImpl)
- * @param XAAdaptEvent *event  - Event
- * Description: Event handler for adaptation events
- */
-void XARDSItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
-    XARDSItfImpl* impl =(XARDSItfImpl*)pHandlerCtx;
-    DEBUG_API("->XARDSItfImpl_AdaptCb");
-
-    if(!impl)
-    {
-        DEBUG_ERR("XARadioItfImpl_AdaptCb, invalid context pointer!");
-        DEBUG_API("<-XARDSItfImpl_AdaptCb");
-        return;
-    }
-    assert(event);
-
-    if( event->eventid == XA_ADAPT_RDS_GET_ODA_GROUP_DONE && impl->odaGroupCallback )
-    {
-        /* stubbed (enough for emulation purposes) */
-        /* XA_BOOLEAN_FALSE and -1 means oda group not found */
-        impl->odaGroupCallback( (XARadioItf) impl->odaGroupCbPtrToSelf, impl->odaGroupContext, XA_BOOLEAN_FALSE, -1, 0 );
-    }
-    DEBUG_API("<-XARDSItfImpl_AdaptCb");
-}
-
-/**
- * void XARDSItfImpl_Free(XARDSItfImpl* self)
- * @param  XARDSItfImpl* self -
- **/
-void XARDSItfImpl_Free(XARDSItfImpl* self)
-{
-    DEBUG_API("->XARDSItfImpl_Free");
-    XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSRadio);
-    assert(self==self->self);
-
-    XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XARDSItfImpl_AdaptCb );
-
-    XARDSItfAdapt_Free(self->adapCtx);
-
-    free(self);
-    XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSRadio);
-    DEBUG_API("<-XARDSItfImpl_Free");
-}
-
--- a/khronosfws/openmax_al/src/radio/xardsitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +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 XARDSITF_H
-#define XARDSITF_H
-
-#include "xaadptbasectx.h"
-/** MACROS **/
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-/* Definition of XAEqualizerItf implementation */
-typedef struct XARDSItfImpl_
-{
-    /* parent interface */
-    struct XARDSItf_ itf;
-    /* pointer to self */
-    struct XARDSItfImpl_* self;
-
-    /* variables */
-
-    xaRDSCallback           rdsCallback;
-    void                   *rdsContext;
-    XARDSItf               rdsCbPtrToSelf;
-
-    xaGetODAGroupCallback   odaGroupCallback;
-    void                   *odaGroupContext;
-    XARDSItf               odaGroupCbPtrToSelf;
-
-    xaNewODADataCallback    odaDataCallback;
-    void                   *odaDataContext;
-    XARDSItf               odaDataCbPtrToSelf;
-
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-} XARDSItfImpl;
-
-/** METHODS **/
-
-/* Base interface XARDSItf implementation */
-
-XAresult XARDSItfImpl_QueryRDSSignal(XARDSItf self, XAboolean * isSignal);
-
-XAresult XARDSItfImpl_GetProgrammeServiceName(XARDSItf self, XAchar * ps);
-
-XAresult XARDSItfImpl_GetRadioText(XARDSItf self, XAchar * rt);
-
-XAresult XARDSItfImpl_GetRadioTextPlus(XARDSItf self,
-                                       XAuint8 contentType,
-                                       XAchar * informationElement,
-                                       XAchar * descriptor,
-                                       XAuint8 * descriptorContentType);
-
-XAresult XARDSItfImpl_GetProgrammeType(XARDSItf self, XAuint32 * pty);
-
-XAresult XARDSItfImpl_GetProgrammeTypeString(XARDSItf self,
-                                             XAboolean isLengthMax16,
-                                             XAchar * pty);
-
-XAresult XARDSItfImpl_GetProgrammeIdentificationCode(XARDSItf self, XAint16 * pi);
-
-XAresult XARDSItfImpl_GetClockTime(XARDSItf self, XAtime * dateAndTime);
-
-XAresult XARDSItfImpl_GetTrafficAnnouncement(XARDSItf self, XAboolean * ta);
-
-XAresult XARDSItfImpl_GetTrafficProgramme(XARDSItf self, XAboolean * tp);
-
-XAresult XARDSItfImpl_SeekByProgrammeType(XARDSItf self,
-                                          XAuint32 pty,
-                                          XAboolean upwards);
-
-XAresult XARDSItfImpl_SeekTrafficAnnouncement(XARDSItf self, XAboolean upwards);
-
-XAresult XARDSItfImpl_SeekTrafficProgramme(XARDSItf self, XAboolean upwards);
-
-XAresult XARDSItfImpl_SetAutomaticSwitching(XARDSItf self, XAboolean automatic);
-
-XAresult XARDSItfImpl_GetAutomaticSwitching(XARDSItf self, XAboolean * automatic);
-
-XAresult XARDSItfImpl_SetAutomaticTrafficAnnouncement(XARDSItf self, XAboolean automatic);
-
-XAresult XARDSItfImpl_GetAutomaticTrafficAnnouncement(XARDSItf self, XAboolean * automatic);
-
-XAresult XARDSItfImpl_GetODAGroup(XARDSItf self,
-                                  XAuint16 AID,
-                                  xaGetODAGroupCallback callback,
-                                  void * pContext);
-
-XAresult XARDSItfImpl_SubscribeODAGroup(XARDSItf self,
-                                        XAint16 group,
-                                        XAboolean useErrorCorrection);
-
-XAresult XARDSItfImpl_UnsubscribeODAGroup(XARDSItf self, XAint16 group);
-
-XAresult XARDSItfImpl_ListODAGroupSubscriptions(XARDSItf self,
-                                                XAint16* pGroups,
-                                                XAuint32* pLength);
-
-XAresult XARDSItfImpl_RegisterRDSCallback(XARDSItf self,
-                                          xaRDSCallback callback,
-                                          void * pContext);
-
-XAresult XARDSItfImpl_RegisterODADataCallback(XARDSItf self,
-                                              xaNewODADataCallback callback,
-                                              void * pContext);
-
-
-/* XARDSItfImpl -specific methods */
-XARDSItfImpl* XARDSItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
-
-void XARDSItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
-void XARDSItfImpl_Free(XARDSItfImpl* self);
-
-#endif /* XARDSITF_H */
--- a/khronosfws/openmax_al/src/vibra/xavibradevice.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,315 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xavibradevice.h"
-#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]=
-{
-    &XA_IID_OBJECT,
-    &XA_IID_CONFIGEXTENSION,
-    &XA_IID_VIBRA,
-    &XA_IID_DYNAMICINTERFACEMANAGEMENT
-};
-
-
-/*****************************************************************************
- * Global methods
- *****************************************************************************/
-/*
- * XAresult XAVibraDeviceImpl_CreateVibraDevice
- * Description: Create object
- */
-XAresult XAVibraDeviceImpl_CreateVibraDevice(FrameworkMap* mapper,
-                                             XAObjectItf* pDevice,
-                                             XAuint32 deviceID,
-                                             XAuint32 numInterfaces,
-                                             const XAInterfaceID * pInterfaceIds,
-                                             const XAboolean * pInterfaceRequired)
-{
-    XAVibraDeviceImpl* pImpl = NULL;
-    XAObjectItfImpl* pBaseObj = NULL;
-    XAuint8 itfIndex = 0;
-
-    DEBUG_API("->XAVibraDeviceImpl_CreateVibraDevice");
-
-    if( !pDevice )
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraDeviceImpl_CreateVibraDevice");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* instantiate object implementation */
-    pImpl = (XAVibraDeviceImpl*)calloc(1,sizeof(XAVibraDeviceImpl));
-    if( !pImpl )
-    {
-        /* memory allocation failed */
-        DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-        DEBUG_API("<-XAVibraDeviceImpl_CreateVibraDevice");
-        return XA_RESULT_MEMORY_FAILURE;
-    }
-    pBaseObj = &pImpl->baseObj;
-
-    /* Initialize base object default implementation */
-    XAObjectItfImpl_Init(pBaseObj,
-                         VIBRA_ITFCOUNT,
-                         XAVibraDeviceItfIIDs,
-                         XAVibraDeviceImpl_DoRealize,
-                         XAVibraDeviceImpl_DoResume,
-                         XAVibraDeviceImpl_FreeResources);
-
-    /* Mark interfaces that need to be exposed */
-    /* Implicit and mandated interfaces */
-    pBaseObj->interfaceMap[VIBRA_VIBRAITF].required = XA_BOOLEAN_TRUE;
-    pBaseObj->interfaceMap[VIBRA_DIMITF].required = XA_BOOLEAN_TRUE;
-
-    /* Explicit interfaces */
-    if( (numInterfaces != 0) && pInterfaceIds && pInterfaceRequired )
-    {
-        /* Check required interfaces */
-        for( itfIndex = 0; itfIndex < numInterfaces; itfIndex++ )
-        {
-            /* If mapEntry is null then required interface is not supported.*/
-            XAObjItfMapEntry *entry =
-                XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIndex]);
-            if( !entry  )
-            {
-                if( pInterfaceRequired[itfIndex] )
-                {
-                    /* required interface cannot be accommodated - fail creation */
-                    XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
-                    DEBUG_ERR("Required interface not found - abort creation!");
-                    DEBUG_API("<-XAVibraDeviceImpl_CreateVibraDevice");
-                    return XA_RESULT_FEATURE_UNSUPPORTED;
-                }
-                else
-                {
-                    DEBUG_INFO("Requested (not required) interface not found - continue creation");
-                }
-            }
-            else
-            {
-                entry->required = XA_BOOLEAN_TRUE;
-            }
-        }
-    }
-
-    /* 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_API("<-XAVibraDeviceImpl_CreateVibraDevice");
-    return XA_RESULT_FEATURE_UNSUPPORTED;
-    /*************************************************/
-    
-/*    // 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;*/
-}
-/* XAResult XAVibraDeviceImpl_QueryNumSupportedInterfaces
- * Description: Statically query number of supported interfaces
- */
-XAresult XAVibraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces)
-{
-    DEBUG_API("->XAVibraDeviceImpl_QueryNumSupportedInterfaces");
-    if( pNumSupportedInterfaces )
-    {
-        *pNumSupportedInterfaces = VIBRA_ITFCOUNT;
-
-        DEBUG_API_A1("<-XAVibraDeviceImpl_QueryNumSupportedInterfaces - %ld", *pNumSupportedInterfaces );
-        return XA_RESULT_SUCCESS;
-    }
-    else
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraDeviceImpl_QueryNumSupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-}
-/* XAResult XACVibraDeviceImpl_QuerySupportedInterfaces
- * Description: Statically query supported interfaces
- */
-XAresult XAVibraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
-                                                    XAInterfaceID *pInterfaceId)
-{
-    DEBUG_API("->XAVibraDeviceImpl_QuerySupportedInterfaces");
-
-    if( index >= VIBRA_ITFCOUNT || !pInterfaceId )
-    {
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraDeviceImpl_QuerySupportedInterfaces");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-    else
-    {
-        *pInterfaceId = *(XAVibraDeviceItfIIDs[index]);
-
-        DEBUG_API("<-XAVibraDeviceImpl_QuerySupportedInterfaces");
-        return XA_RESULT_SUCCESS;
-    }
-}
-/*****************************************************************************
- * base object XAObjectItfImpl methods
- *****************************************************************************/
-/* XAResult XAVibraDeviceImpl_DoRealize
- * Description: Realize all implicit and explicitly wanted interfaces.
- * Create and initialize implementation-specific variables.
- * Called from base object XAObjectItfImpl
- */
-XAresult XAVibraDeviceImpl_DoRealize(XAObjectItf self)
-{
-    XAuint8 itfIdx = 0;
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-    XAVibraDeviceImpl* pObjImpl = (XAVibraDeviceImpl*)(pObj);
-    XAresult ret = XA_RESULT_SUCCESS;
-
-    DEBUG_API("->XAVibraDeviceImpl_DoRealize");
-
-    /* check casting from correct pointer type */
-    if( !pObjImpl || pObj != pObjImpl->baseObj.self )
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraDeviceImpl_DoRealize");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-
-    ret = XAVibraAdapt_PostInit( pObjImpl->adaptationCtx );
-
-    if( ret != XA_RESULT_SUCCESS )
-    {
-        DEBUG_API("<-XAVibraDeviceImpl_DoRealize");
-        return ret;
-    }
-
-    /* Realize all implicit and explicitly wanted interfaces */
-    for( itfIdx = 0; itfIdx < VIBRA_ITFCOUNT; itfIdx++)
-    {
-        if( !(pObj->interfaceMap[itfIdx].pItf) &&
-            pObj->interfaceMap[itfIdx].required )
-        {
-            void *pItf = NULL;
-            switch( itfIdx )
-            {
-                case VIBRA_VIBRAITF:
-
-                    pItf = XAVibraItfImpl_Create(pObjImpl->adaptationCtx);
-
-                    break;
-                case VIBRA_CONFIGEXTENSIONITF:
-                    pItf = XAConfigExtensionsItfImpl_Create();
-                    break;
-                case VIBRA_DIMITF:
-                    pItf = XADIMItfImpl_Create();
-                    break;
-                default:
-                    break;
-            }
-            if( !pItf )
-            {
-                /* memory allocation failed */
-                DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
-                DEBUG_API("<-XAVibraDeviceImpl_DoRealize");
-                return XA_RESULT_MEMORY_FAILURE;
-            }
-            else
-            {
-                pObj->interfaceMap[itfIdx].pItf = pItf;
-            }
-        }
-    }
-
-    pObj->state = XA_OBJECT_STATE_REALIZED;
-    DEBUG_API("<-XAVibraDeviceImpl_DoRealize");
-    return XA_RESULT_SUCCESS;
-}
-
-/* XAResult XAVibraDeviceImpl_DoResume
- * Description: Resume object from suspended state
- */
-XAresult XAVibraDeviceImpl_DoResume(XAObjectItf self)
-{
-    DEBUG_API("->XAVibraDeviceImpl_DoResume");
-    DEBUG_API("<-XAVibraDeviceImpl_DoResume");
-    /* This implementation does not support suspended state */
-    return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
-/* void XAVibraDeviceImpl_FreeResources
- * Description: Free all resources reserved at XAVibraDeviceImpl_DoRealize()
- */
-void XAVibraDeviceImpl_FreeResources(XAObjectItf self)
-{
-    XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
-    XAVibraDeviceImpl* pImpl = (XAVibraDeviceImpl*) (*self);
-    XAuint8 itfIdx = 0;
-    DEBUG_API("->XAVibraDeviceImpl_FreeResources");
-
-    
-    assert( pObj && pImpl && pObj == pObj->self );
-    if (pImpl->adaptationCtx != NULL)
-    {
-        XAVibraAdapt_Destroy(pImpl->adaptationCtx);
-        pImpl->adaptationCtx = NULL;
-    }
-
-    /* free all allocated interfaces */
-    for (itfIdx = 0; itfIdx < VIBRA_ITFCOUNT; itfIdx++)
-    {
-        void *pItf = pObj->interfaceMap[itfIdx].pItf;
-        if (pItf)
-        {
-            switch (itfIdx)
-            {
-                 case VIBRA_VIBRAITF:
-                     XAVibraItfImpl_Free( pItf );
-                     break;
-                 case VIBRA_CONFIGEXTENSIONITF:
-                     XAConfigExtensionsItfImpl_Free( pItf );
-                     break;
-                 case VIBRA_DIMITF:
-                     XADIMItfImpl_Free( pItf );
-                     break;
-                 default:
-                     break;
-            }
-            pObj->interfaceMap[itfIdx].pItf = NULL;
-        }
-    }
-
-    DEBUG_API("<-XAVibraDeviceImpl_FreeResources");
-
-    return;
-}
-/* END OF FILE*/
--- a/khronosfws/openmax_al/src/vibra/xavibradevice.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +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 XAVIBRADEVICE_H
-#define XAVIBRADEVICE_H
-
-#include "xaobjectitf.h"
-#include "xaadptbasectx.h"
-/** MACROS **/
-
-
-/** TYPES **/
-
-
-/** ENUMERATIONS **/
-/* Enumeration for interfaces that CameraDevice supports.  */
-typedef enum
-{
-    VIBRA_OBJECTITF,
-    VIBRA_CONFIGEXTENSIONITF,
-    VIBRA_VIBRAITF,
-    VIBRA_DIMITF,
-    VIBRA_ITFCOUNT
-} XAVibraDeviceInterfaces;
-
-/** STRUCTURES **/
-/* Specification for VibraDeviceImpl. */
-typedef struct XAVibraDeviceImpl_
-{
-    /* Parent for XACameraDeviceImpl */
-    XAObjectItfImpl baseObj;
-
-    /* variables */
-    XAuint32 deviceID;
-
-    XAAdaptationBaseCtx* adaptationCtx;
-
-} XAVibraDeviceImpl;
-
-/** METHODS **/
-
-/* base object XAObjectItfImpl methods */
-XAresult    XAVibraDeviceImpl_DoRealize(XAObjectItf self);
-XAresult    XAVibraDeviceImpl_DoResume(XAObjectItf self);
-void        XAVibraDeviceImpl_FreeResources(XAObjectItf self);
-
-#endif /* XAVIBRADEVICE_H */
--- a/khronosfws/openmax_al/src/vibra/xavibraitf.c	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,280 +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 <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "xavibraitf.h"
-
-#include "xavibraitfadaptation.h"
-
-#include "xathreadsafety.h"
-/* XAVibraItfImpl* GetImpl(XAVibraItf self)
- * Description: Validate interface pointer and cast it to implementation pointer.
-*/
-static XAVibraItfImpl* GetImpl(XAVibraItf self)
-{
-    if( self )
-    {
-        XAVibraItfImpl* impl = (XAVibraItfImpl*)(*self);
-        if( impl && (impl == impl->self) )
-        {
-            return impl;
-        }
-    }
-    return NULL;
-}
-
-/*****************************************************************************
- * Base interface XAVibraItf implementation
- *****************************************************************************/
-/*
- * XAresult XAVibraItfImpl_Vibrate ( XAVibraItf self, XAboolean vibrate )
- * Description: Activates or deactivates vibration for the I/O device.
- */
-XAresult XAVibraItfImpl_Vibrate ( XAVibraItf self,
-                                  XAboolean vibrate )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVibraItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVibraItfImpl_Vibrate");
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSVibra);
-
-    if( !impl )
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraItfImpl_Vibrate");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is vibrate mode changed */
-    if( impl->vibrate != vibrate )
-    {
-
-        ret = XAVibraItfAdapt_Vibrate( (XAAdaptationGstCtx*)impl->adapCtx, vibrate );
-
-        if ( ret == XA_RESULT_SUCCESS )
-        {
-            impl->vibrate = vibrate;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
-    DEBUG_API("<-XAVibraItfImpl_Vibrate");
-    return ret;
-}
-/*
- * XAresult XAVibraItfImpl_IsVibrating ( XAVibraItf self, XAboolean * pVibrating )
- * Description: Returns whether the I/O device is vibrating.
- */
-XAresult XAVibraItfImpl_IsVibrating ( XAVibraItf self, XAboolean * pVibrating )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVibraItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVibraItfImpl_IsVibrating");
-
-    if( !impl || !pVibrating)
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraItfImpl_IsVibrating");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pVibrating = impl->vibrate;
-
-    if( *pVibrating )
-    {
-        DEBUG_API("It's vibrating");
-    }
-    else
-    {
-        DEBUG_API("Vibrate is off.");
-    }
-
-    DEBUG_API("<-XAVibraItfImpl_IsVibrating");
-    return ret;
-}
-/*
- * XAresult XAVibraItfImpl_SetFrequency ( XAVibraItf self,  XAmilliHertz frequency )
- * Description: Sets the vibration frequency of the I/O device.
- */
-XAresult XAVibraItfImpl_SetFrequency ( XAVibraItf self, XAmilliHertz frequency )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVibraItfImpl* impl = GetImpl(self);
-
-    DEBUG_API_A1("->XAVibraItfImpl_SetFrequency %ld", frequency);
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSVibra);
-
-    if( !impl || frequency < MIN_FREQUENCY || frequency > MAX_FREQUENCY)
-    {
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraItfImpl_SetFrequency");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is vibration frequency changed */
-    if( impl->frequency != frequency )
-    {
-
-        ret = XAVibraItfAdapt_SetFrequency( (XAAdaptationGstCtx*)impl->adapCtx, frequency );
-
-        if( ret == XA_RESULT_SUCCESS )
-        {
-            impl->frequency = frequency;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
-    DEBUG_API("<-XAVibraItfImpl_SetFrequency");
-    return ret;
-}
-/*
- * XAresult XAVibraItfImpl_GetFrequency ( XAVibraItf self,  XAmilliHertz * pFrequency )
- * Description: Returns the vibration frequency of the I/O device.
- */
-XAresult XAVibraItfImpl_GetFrequency ( XAVibraItf self, XAmilliHertz * pFrequency )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVibraItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVibraItfImpl_GetFrequency");
-    if( !impl || !pFrequency)
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraItfImpl_GetFrequency");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pFrequency = impl->frequency;
-
-    DEBUG_API_A1("Frequency is %ld", *pFrequency);
-    DEBUG_API("<-XAVibraItfImpl_GetFrequency");
-    return ret;
-}
-/*
- * XAresult XAVibraItfImpl_SetIntensity ( XAVibraItf self,  XApermille intensity )
- * Description: Sets the vibration intensity of the Vibra I/O device.
- */
-XAresult XAVibraItfImpl_SetIntensity ( XAVibraItf self, XApermille intensity )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVibraItfImpl* impl = GetImpl(self);
-    DEBUG_API_A1("->XAVibraItfImpl_SetIntensity %d", intensity);
-    XA_IMPL_THREAD_SAFETY_ENTRY(XATSVibra);
-
-    if( !impl || intensity < MIN_INTENSITY || intensity > MAX_INTENSITY )
-    {
-        /* invalid parameter */
-        XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraItfImpl_SetIntensity");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    /* check is vibration intensity changed */
-    if( impl->intensity != intensity )
-    {
-
-        ret = XAVibraItfAdapt_SetIntensity( (XAAdaptationGstCtx*)impl->adapCtx, intensity );
-
-        if( ret == XA_RESULT_SUCCESS )
-        {
-            impl->intensity = intensity;
-        }
-    }
-
-    XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
-    DEBUG_API("<-XAVibraItfImpl_SetIntensity");
-    return ret;
-}
-/*
- * XAresult XAVibraItfImpl_GetIntensity ( XAVibraItf self, XApermille * pIntensity )
- * Description: Returns the vibration intensity of the Vibra I/O device.
- */
-XAresult XAVibraItfImpl_GetIntensity ( XAVibraItf self, XApermille * pIntensity )
-{
-    XAresult ret = XA_RESULT_SUCCESS;
-    XAVibraItfImpl* impl = GetImpl(self);
-    DEBUG_API("->XAVibraItfImpl_GetIntensity");
-
-    if( !impl || !pIntensity)
-    {
-        /* invalid parameter */
-        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
-        DEBUG_API("<-XAVibraItfImpl_GetIntensity");
-        return XA_RESULT_PARAMETER_INVALID;
-    }
-
-    *pIntensity = impl->intensity;
-
-    DEBUG_API_A1("Intensity is %d", *pIntensity);
-    DEBUG_API("<-XAVibraItfImpl_GetIntensity");
-    return ret;
-}
-
-
-
-/*****************************************************************************
- * XAVibraItfImpl -specific methods
- *****************************************************************************/
-/* XAVibraItfImpl* XAVibraItfImpl_Create()
- * Description: Allocate and initialize VibraItfImpl
- */
-XAVibraItfImpl* XAVibraItfImpl_Create( XAAdaptationBaseCtx *adapCtx )
-{
-    XAVibraItfImpl* self = (XAVibraItfImpl*) calloc(1,sizeof(XAVibraItfImpl));
-    DEBUG_API("->XAVibraItfImpl_Create");
-    if( self )
-    {
-        /* init itf default implementation*/
-        self->itf.Vibrate = XAVibraItfImpl_Vibrate;
-        self->itf.IsVibrating = XAVibraItfImpl_IsVibrating;
-        self->itf.SetFrequency = XAVibraItfImpl_SetFrequency;
-        self->itf.GetFrequency = XAVibraItfImpl_GetFrequency;
-        self->itf.SetIntensity = XAVibraItfImpl_SetIntensity;
-        self->itf.GetIntensity = XAVibraItfImpl_GetIntensity;
-
-        /* init variables*/
-        self->vibrate = XA_BOOLEAN_FALSE;
-        self->frequency = 0;
-        self->intensity = 0;
-        self->adapCtx = adapCtx;
-
-        self->self = self;
-    }
-
-    DEBUG_API("<-XAVibraItfImpl_Create");
-    return self;
-}
-
-/* void XAVibraItfImpl_Free(XAVibraItfImpl* self)
- * Description: Free all resources reserved at XAVibraItfImpl_Create
- */
-void XAVibraItfImpl_Free(XAVibraItfImpl* self)
-{
-    DEBUG_API("->XAVibraItfImpl_Free");
-    assert( self==self->self );
-    free( self );
-    DEBUG_API("<-XAVibraItfImpl_Free");
-}
-
--- a/khronosfws/openmax_al/src/vibra/xavibraitf.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +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 XAVIBRAITF_H
-#define XAVIBRAITF_H
-
-#include "xaadptbasectx.h"
-
-/** MACROS **/
-#define MIN_INTENSITY 0
-#define MAX_INTENSITY 1000
-#define MIN_FREQUENCY 0x00000001
-#define MAX_FREQUENCY 0xFFFFFFFF
-/** TYPES **/
-
-/** ENUMERATIONS **/
-
-/** STRUCTURES **/
-
-/* Definition of XAXAVibraItfItf implementation */
-typedef struct XAVibraItfImpl_
-{
-   /* parent interface */
-    struct XAVibraItf_ itf;
-    /* pointer to self */
-    struct XAVibraItfImpl_* self;
-
-    /* variables */
-    XAboolean       vibrate;
-    XAmilliHertz    frequency;
-    XApermille      intensity;
-
-    /*Adaptation variables*/
-    XAAdaptationBaseCtx *adapCtx;
-
-} XAVibraItfImpl;
-
-/** METHODS **/
-
-/* Base interface XAVibraItf implementation
- * See API Specification for method documentation
-*/
-XAresult XAVibraItfImpl_Vibrate ( XAVibraItf self, XAboolean vibrate );
-XAresult XAVibraItfImpl_IsVibrating ( XAVibraItf self, XAboolean * pVibrating );
-XAresult XAVibraItfImpl_SetFrequency ( XAVibraItf self, XAmilliHertz frequency );
-XAresult XAVibraItfImpl_GetFrequency ( XAVibraItf self, XAmilliHertz * pFrequency );
-XAresult XAVibraItfImpl_SetIntensity ( XAVibraItf self, XApermille intensity );
-XAresult XAVibraItfImpl_GetIntensity ( XAVibraItf self, XApermille * pIntensity );
-
- 
-/* XAVibraItfImpl -specific methods*/
-XAVibraItfImpl* XAVibraItfImpl_Create( XAAdaptationBaseCtx *adapCtx );
-
-void XAVibraItfImpl_Free(XAVibraItfImpl* self);
-#endif /* XAVIBRAITF_H */
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/rom/AudioControllerPluginsVariant.iby	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/rom/AudioControllerPluginsVariant.iby	Wed Aug 18 10:17:22 2010 +0300
@@ -35,6 +35,9 @@
 file=ABI_DIR\BUILD_DIR\3GPAudioMetaDataComposer.dll             SHARED_LIB_DIR\3GPAudioMetaDataComposer.dll
 #endif
 
+//For Wav Controller
+ECOM_PLUGIN(mmfaudiocontroller.dll,101f55bf.rsc)
+
 //For 3GP
 ECOM_PLUGIN(3GPAudioPlayControllerPlugin.DLL,3GPAudioPlayControllerPlugin.rsc)
 ECOM_PLUGIN(3GPAudioPlayControllerRecognizer.DLL,3GPAudioPlayControllerRecognizer.rsc)
--- a/mmfenh/profilesettingsmonitor/inc/ProfileSettingsMonitorServerImpl.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmfenh/profilesettingsmonitor/inc/ProfileSettingsMonitorServerImpl.h	Wed Aug 18 10:17:22 2010 +0300
@@ -29,6 +29,7 @@
 #include <MProEngActiveProfileObserver.h>
 #include <MProEngProfileActivationObserver.h>
 #include <MProEngNotifyHandler.h>
+#include <MProEngTones.h>
 #include <MProEngToneSettings.h>
 #include <e32property.h>
 #include <GlobalAudioSettingsPSKeys.h>
@@ -36,6 +37,7 @@
 #include <ProfileEngineDomainCRKeys.h>
 #include <ProfilesVariant.hrh>
 #include <e32capability.h>
+#include <GlobalAudioSettings.h>
 class CProfileSettingsMonitorServerImpl : 
 public CBase, 
 public MProEngProfileActivationObserver, 
@@ -62,6 +64,8 @@
 	// Initializes publish and subscribe keys used for
 	// audio clients list implementation
 	void InitializeAudioClientsListPSKeysL();
+	void CMapGASRingingType(TProfileRingingType aRingingType);
+	void CMapGASKeypadVolume(TProfileKeypadVolume aKeypadVolume);
 
 private:
     MProEngEngine* iEngine;
@@ -72,11 +76,27 @@
     TBool iSilentProfile;
     TBool iVibra;
     TBool iPublicSilence;
+    HBufC* iMessageToneName;
+    HBufC* iEmailToneName;
+    HBufC* iVideoCallToneName;
+    HBufC* iRingingTone1Name;
+    HBufC* iRingingTone2Name;
+  
+    CGlobalAudioSettings::TGASRingingType iGASRingingType;
+  
+    CGlobalAudioSettings::TGASKeypadVolume iGASKeypadVolume;
     RProperty iWarningTonesProperty;
     RProperty iMessagingTonesProperty;
     RProperty iSilentProfileProperty;
     RProperty iVibraProperty;
     RProperty iPublicSilenceProperty;
+    RProperty iMessageToneNameProperty;
+    RProperty iEmailToneNameProperty;
+    RProperty iRingingTypeProperty;
+    RProperty iVideoCallToneNameProperty;
+    RProperty iRingingTone1NameProperty;
+    RProperty iRingingTone2NameProperty;
+    RProperty iKeypadVolumeProperty;
 	};
 
 #endif
--- a/mmfenh/profilesettingsmonitor/src/ProfileSettingsMonitorServerImpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmfenh/profilesettingsmonitor/src/ProfileSettingsMonitorServerImpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -53,6 +53,52 @@
 	iVibraProperty.Close();
 	RProperty::Delete(KGASPSUidGlobalAudioSettings, KGASVibra);
 	
+	iRingingTypeProperty.Close();
+	RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASRingingType);
+	
+	iMessageToneNameProperty.Close();
+	RProperty::Delete(KGASPSUidGlobalAudioSettings, KGASMessageToneName);
+	
+	iEmailToneNameProperty.Close();
+	RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASEmailToneName);
+	
+	iVideoCallToneNameProperty.Close();
+	RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASVideoCallToneName);
+	
+	iRingingTone1NameProperty.Close();
+	RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASRingingTone1Name);
+	
+	iRingingTone2NameProperty.Close();
+    RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASRingingTone2Name);
+	
+	iKeypadVolumeProperty.Close();
+	RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASKeypadToneVolume);
+	
+	if(iMessageToneName)
+	  {
+	  delete iMessageToneName;
+	  iMessageToneName=NULL;
+	  }
+	if(iEmailToneName)
+	  {
+	  delete iEmailToneName;
+	  iEmailToneName=NULL;
+	  }
+	if(iVideoCallToneName)
+	  {
+	  delete iVideoCallToneName;
+	  iVideoCallToneName=NULL;
+	  }
+	if(iRingingTone1Name)
+	  {
+	  delete iRingingTone1Name;
+	  iRingingTone1Name=NULL;
+	  }
+	if(iRingingTone2Name)
+	   {
+	   delete iRingingTone2Name;
+	   iRingingTone2Name=NULL;
+	   }
 	// Release profile engine resources
 	if ( iEngine )
 	    {
@@ -92,7 +138,25 @@
     iWarningTones = settings.WarningAndGameTones();
     iMessagingTones = !( currentProfile->IsSilent() );
     iVibra = settings.VibratingAlert();
+  
+    CMapGASRingingType( settings.RingingType());
+    
     //CleanupStack::PopAndDestroy(currentProfile);
+   
+    MProEngTones& profileTones=currentProfile->ProfileTones();
+    
+    iMessageToneName=profileTones.MessageAlertTone().AllocL();
+   
+    iEmailToneName=profileTones.EmailAlertTone().AllocL();
+    
+    iVideoCallToneName=profileTones.VideoCallRingingTone().AllocL();
+    
+    iRingingTone1Name=profileTones.RingingTone1().AllocL();
+    
+    iRingingTone2Name=profileTones.RingingTone2().AllocL();
+        
+  
+    CMapGASKeypadVolume(settings.KeypadVolume());
     
     // Get PublicSilence from CenRep
     TInt featureBitmask( 0 );     
@@ -182,6 +246,103 @@
                                                 KGASPSUidGlobalAudioSettings,
                                                 KGASPublicSilence,
                                                 iPublicSilence));
+    
+    
+    
+    User::LeaveIfError(RProperty::Define(
+                                    KGASPSUidGlobalAudioSettings,
+                                    KGASRingingType,
+                                    RProperty::EInt,
+                                    read,
+                                    write));
+    User::LeaveIfError(iRingingTypeProperty.Attach(
+                                              KGASPSUidGlobalAudioSettings,
+                                              KGASRingingType));
+    User::LeaveIfError(iRingingTypeProperty.Set(
+                                              KGASPSUidGlobalAudioSettings,
+                                              KGASRingingType,
+                                              iGASRingingType));
+    User::LeaveIfError(RProperty::Define(
+                                    KGASPSUidGlobalAudioSettings,
+                                    KGASMessageToneName,
+                                    RProperty::EText,
+                                    read,
+                                    write));
+    User::LeaveIfError(iMessageToneNameProperty.Attach(
+                                                KGASPSUidGlobalAudioSettings,
+                                                KGASMessageToneName));
+    User::LeaveIfError(iMessageToneNameProperty.Set(
+                                                KGASPSUidGlobalAudioSettings,
+                                                KGASMessageToneName,
+                                                *iMessageToneName));
+    
+    User::LeaveIfError(RProperty::Define(
+                                    KGASPSUidGlobalAudioSettings,
+                                    KGASEmailToneName,
+                                    RProperty::EText,
+                                    read,
+                                    write));
+    User::LeaveIfError(iEmailToneNameProperty.Attach(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASEmailToneName));
+    User::LeaveIfError(iEmailToneNameProperty.Set(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASEmailToneName,
+                                               *iEmailToneName));
+    User::LeaveIfError(RProperty::Define(
+                                    KGASPSUidGlobalAudioSettings,
+                                    KGASVideoCallToneName,
+                                    RProperty::EText,
+                                    read,
+                                    write));
+    User::LeaveIfError(iVideoCallToneNameProperty.Attach(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASVideoCallToneName));
+    User::LeaveIfError(iVideoCallToneNameProperty.Set(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASVideoCallToneName,
+                                               *iVideoCallToneName));
+        
+    User::LeaveIfError(RProperty::Define(
+                                    KGASPSUidGlobalAudioSettings,
+                                    KGASRingingTone1Name,
+                                    RProperty::EText,
+                                    read,
+                                    write));
+    User::LeaveIfError(iRingingTone1NameProperty.Attach(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASRingingTone1Name));
+    User::LeaveIfError(iRingingTone1NameProperty.Set(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASRingingTone1Name,
+                                               *iRingingTone1Name));
+    User::LeaveIfError(RProperty::Define(
+                                    KGASPSUidGlobalAudioSettings,
+                                    KGASRingingTone2Name,
+                                    RProperty::EText,
+                                    read,
+                                    write));
+    User::LeaveIfError(iRingingTone2NameProperty.Attach(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASRingingTone2Name));
+    User::LeaveIfError(iRingingTone2NameProperty.Set(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASRingingTone2Name,
+                                               *iRingingTone2Name));
+    
+    User::LeaveIfError(RProperty::Define(
+                                    KGASPSUidGlobalAudioSettings,
+                                    KGASKeypadToneVolume,
+                                    RProperty::EInt,
+                                    read,
+                                    write));
+    User::LeaveIfError(iKeypadVolumeProperty.Attach(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASKeypadToneVolume));
+    User::LeaveIfError(iKeypadVolumeProperty.Set(
+                                               KGASPSUidGlobalAudioSettings,
+                                               KGASKeypadToneVolume,
+                                               iGASKeypadVolume));
 
     //Stream Gain Control
     TInt status = RProperty::Define(
@@ -321,6 +482,74 @@
                                                 KGASVibra,
                                                 iVibra));
             }
+        if(iGASRingingType != settings.RingingType())
+            {
+            
+             CMapGASRingingType(settings.RingingType());
+            
+             User::LeaveIfError(iRingingTypeProperty.Set(
+                                                         KGASPSUidGlobalAudioSettings,
+                                                         KGASRingingType,
+                                                         iGASRingingType));
+             
+            }
+        MProEngTones &profileTones=currentProfile->ProfileTones();
+        if(iMessageToneName->Compare(profileTones.MessageAlertTone())!= 0)
+            {
+              delete iMessageToneName;
+              iMessageToneName=NULL;
+              iMessageToneName=profileTones.MessageAlertTone().AllocL();
+              User::LeaveIfError(iMessageToneNameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                              KGASMessageToneName,
+                                                              *iMessageToneName));
+            }
+        if(iEmailToneName->Compare(profileTones.EmailAlertTone())!= 0)
+            {
+              delete iEmailToneName;
+              iEmailToneName=NULL;
+              iEmailToneName=profileTones.EmailAlertTone().AllocL();
+              User::LeaveIfError(iEmailToneNameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                            KGASEmailToneName,
+                                                                            *iEmailToneName));
+            }
+        if(iVideoCallToneName->Compare(profileTones.VideoCallRingingTone())!=0)
+            {
+              delete iVideoCallToneName;
+              iVideoCallToneName=NULL;
+              iVideoCallToneName=profileTones.VideoCallRingingTone().AllocL();
+              User::LeaveIfError(iVideoCallToneNameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                          KGASVideoCallToneName,
+                                                                                          *iVideoCallToneName));
+              
+            }
+        if(iRingingTone1Name->Compare(profileTones.RingingTone1())!=0)
+            {
+          delete iRingingTone1Name;
+          iRingingTone1Name=NULL;
+          iRingingTone1Name=profileTones.RingingTone1().AllocL();
+          User::LeaveIfError(iRingingTone1NameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                      KGASRingingTone1Name,
+                                                                                      *iRingingTone1Name));
+            }
+        if(iRingingTone2Name->Compare(profileTones.RingingTone2())!=0)
+                    {
+                   delete iRingingTone2Name;
+                  iRingingTone2Name=NULL;
+                  iRingingTone2Name=profileTones.RingingTone2().AllocL();
+                  User::LeaveIfError(iRingingTone2NameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                              KGASRingingTone2Name,
+                                                                                              *iRingingTone2Name));
+                    }
+        if(iGASKeypadVolume!=settings.KeypadVolume())
+            {
+              
+              CMapGASKeypadVolume(settings.KeypadVolume());
+              User::LeaveIfError(iKeypadVolumeProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                        KGASKeypadToneVolume,
+                                                                                        iGASKeypadVolume));
+              
+              
+            }
         CleanupStack::PopAndDestroy(currentProfile);
         }
 #ifdef _DEBUG
@@ -346,6 +575,7 @@
     CleanupReleasePushL(*currentProfile);
     
     MProEngToneSettings& settings = currentProfile->ToneSettings();
+    MProEngTones& profileTones=currentProfile->ProfileTones();
     if(iWarningTones != settings.WarningAndGameTones())
         {
         iWarningTones = settings.WarningAndGameTones();
@@ -371,6 +601,76 @@
                                             KGASVibra,
                                             iVibra));
         }
+    if(iGASRingingType != settings.RingingType())
+        {
+        
+         CMapGASRingingType(settings.RingingType());
+         
+         User::LeaveIfError(iRingingTypeProperty.Set(
+                                                     KGASPSUidGlobalAudioSettings,
+                                                     KGASRingingType,
+                                                     iGASRingingType));
+        }
+    if(iMessageToneName->Compare(profileTones.MessageAlertTone())!= 0)
+        {
+          delete iMessageToneName;
+          iMessageToneName=NULL;
+          iMessageToneName=profileTones.MessageAlertTone().AllocL();
+          
+          User::LeaveIfError(iMessageToneNameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                          KGASMessageToneName,
+                                                          *iMessageToneName));
+        }
+    
+    if(iEmailToneName->Compare(profileTones.EmailAlertTone())!= 0)
+        {
+          delete iEmailToneName;
+          iEmailToneName=NULL;
+          iEmailToneName=profileTones.EmailAlertTone().AllocL();
+          User::LeaveIfError(iEmailToneNameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                        KGASEmailToneName,
+                                                                        *iEmailToneName));
+        }
+    if(iVideoCallToneName->Compare(profileTones.VideoCallRingingTone())!=0)
+        {
+          delete iVideoCallToneName;
+          iVideoCallToneName=NULL;
+          iVideoCallToneName=profileTones.VideoCallRingingTone().AllocL();
+          User::LeaveIfError(iVideoCallToneNameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                      KGASVideoCallToneName,
+                                                                                      *iVideoCallToneName));
+          
+        }
+    if(iRingingTone1Name->Compare(profileTones.RingingTone1())!=0)
+        {
+         delete iRingingTone1Name;
+         iRingingTone1Name=NULL;
+         iRingingTone1Name=profileTones.RingingTone1().AllocL();
+         User::LeaveIfError(iRingingTone1NameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                  KGASRingingTone1Name,
+                                                                                  *iRingingTone1Name));
+         
+        }
+    if(iRingingTone2Name->Compare(profileTones.RingingTone2())!=0)
+        {
+          delete iRingingTone2Name;
+          iRingingTone2Name=NULL;
+          iRingingTone2Name=profileTones.RingingTone2().AllocL();
+          User::LeaveIfError(iRingingTone2NameProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                      KGASRingingTone2Name,
+                                                                                      *iRingingTone2Name));
+         
+            }
+    if(iGASKeypadVolume!=settings.KeypadVolume())
+        {
+         
+          CMapGASKeypadVolume( settings.KeypadVolume());
+          User::LeaveIfError(iKeypadVolumeProperty.Set(KGASPSUidGlobalAudioSettings,
+                                                                                                KGASKeypadToneVolume,
+                                                                                                iGASKeypadVolume));
+          
+          
+        }
     CleanupStack::PopAndDestroy(currentProfile);
     }
 
@@ -378,6 +678,39 @@
     {
     DEB_TRACE0(_L("CMyProfileNameArrayObserver::HandleProfileActivationNotificationError"));
 	}
-
+void CProfileSettingsMonitorServerImpl::CMapGASRingingType(TProfileRingingType aRingingType)
+    {
+    switch(aRingingType)
+            {
+            case EProfileRingingTypeRinging :   iGASRingingType=CGlobalAudioSettings::EGASRingingTypeRinging;
+                                                 break;
+               
+            case EProfileRingingTypeAscending:iGASRingingType=CGlobalAudioSettings::EGASRingingTypeAscending;
+                                               break;
+              
+            case EProfileRingingTypeRingingOnce :iGASRingingType=CGlobalAudioSettings::EGASRingingTypeRingingOnce;
+                                                  break;
+               
+            case EProfileRingingTypeBeepOnce :iGASRingingType=CGlobalAudioSettings::EGASRingingTypeBeepOnce;
+                                              break;
+               
+            case EProfileRingingTypeSilent:iGASRingingType=CGlobalAudioSettings::EGASRingingTypeSilent;
+                                           break;
+            }
+    }
+void CProfileSettingsMonitorServerImpl::CMapGASKeypadVolume(TProfileKeypadVolume aKeypadVolume)
+    {
+     switch(aKeypadVolume)
+         {
+         case  EProfileKeypadVolumeOff  : iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeOff;
+                                          break;
+         case EProfileKeypadVolumeLevel1 :iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeLevel1;
+                                          break;
+         case EProfileKeypadVolumeLevel2 :iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeLevel2;
+                                          break;
+         case  EProfileKeypadVolumeLevel3 :iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeLevel3;
+                                           break;
+         }
+    }
 // End of file
 	
--- a/mmmw_info/mmmw_metadata/mmmw_metadata.mrp	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-component           mmmw_metadata
-source   \sf\mw\mmmw\mmmw_info\mmmw_metadata 
-source   \sf\mw\mmmw\package_definition.xml
-source   \sf\mw\mmmw\distribution.policy.s60
-notes_source      \component_defs\release.src
-ipr T 
--- a/mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh	Wed Aug 18 10:17:22 2010 +0300
@@ -44,7 +44,9 @@
     EMetaDataDuration,
     EMetaDataDate,
     EMetaDataUnsyncLyrics,
-    EMetaDataProtected        // get the Protected info, "0"=non protected, "1"=protected
+    EMetaDataProtected,   // get the Protected info, "0"=non protected, "1"=protected
+    EMetaDataSampleRate,  // Hz
+    EMetaDataBitRate      // Bps		
 	
     // More later...
     };
--- a/mmmw_plat/openmax_al_api/inc/OpenMAXAL_Platform.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/openmax_al_api/inc/OpenMAXAL_Platform.h	Wed Aug 18 10:17:22 2010 +0300
@@ -48,8 +48,8 @@
 /** The XA_API is platform specific definition used
  *  to declare OMX function prototypes.  They are modified to meet the
  *  requirements for a particular platform */
-#ifdef __SYMBIAN32__   
-#   define XA_API __declspec(dllimport) 
+#ifndef XA_API
+    #define XA_API __declspec(dllimport)
 #endif
 
 #endif /* _OPENMAXAL_PLATFORM_H_ */
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_radioitf.cfg	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_radioitf.cfg	Wed Aug 18 10:17:22 2010 +0300
@@ -30,7 +30,7 @@
 [Endtest]  
 
 [Test]
-title 21.2 RadioItf Set Freq 106.0 MHz
+title 21.2 RadioItf Get Frequency (DEFAULT)
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
 ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
@@ -40,7 +40,6 @@
 ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
 ALImpl al_radioitf_RegisterRadioCallback  
 
-
 ALImpl al_SetDataLocator 3 5 0 1
 ALImpl al_SetDataSource 3 0 1
 ALImpl al_SetDataSink 3 6 1
@@ -51,10 +50,7 @@
 ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
 ALImpl al_playitf_RegisterCallback
 
-request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
-ALImpl al_radioitf_SetFrequency 106000000
-wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
-release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_GetFrequencyDefault
 
 ALImpl al_objitf_Destroy MO_RADIO
 ALImpl al_objitf_Destroy MO_PLAYER
@@ -63,7 +59,36 @@
 [Endtest] 
 
 [Test]
-title 21.3 RadioItf Get Freq 
+title 21.3 RadioItf Get Freq Range (DEFAULT)
+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_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback  
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 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 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+ALImpl al_radioitf_GetFreqRangeDefault
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest] 
+
+[Test]
+title 21.4 RadioItf Set-Get Freq 106.0 
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
 ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
@@ -98,41 +123,7 @@
 [Endtest] 
 
 [Test]
-title 21.4 RadioItf Set Freq Range
-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_engitf_CreateRadioDevice 0
-ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
-ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
-ALImpl al_radioitf_RegisterRadioCallback  
-
-
-ALImpl al_SetDataLocator 3 5 0 1
-ALImpl al_SetDataSource 3 0 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 XA_IID_PLAY
-ALImpl al_playitf_RegisterCallback
-
-request Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
-ALImpl al_radioitf_SetFreqRange 1 // EFmRangeJapan
-wait Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
-release Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
-
-
-ALImpl al_objitf_Destroy MO_RADIO
-ALImpl al_objitf_Destroy MO_PLAYER
-ALImpl al_objitf_Destroy MO_ENGINE
-delete ALImpl
-[Endtest] 
-
-[Test]
-title 21.5 RadioItf Get Freq Range
+title 21.5 RadioItf Set-Get Freq Range
 create openmaxaltestmodule ALImpl
 ALImpl al_createEngine 1 1 0 0
 ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
@@ -153,11 +144,11 @@
 ALImpl al_playitf_RegisterCallback
 
 request Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
-ALImpl al_radioitf_SetFreqRange 1 // EFmRangeJapan
+ALImpl al_radioitf_SetFreqRange 2 //XA_FREQRANGE_FMJAPAN
 wait Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
 release Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
 
-ALImpl al_radioitf_GetFreqRange 1 // EFmRangeJapan
+ALImpl al_radioitf_GetFreqRange 2 // EFmRangeJapan
 
 ALImpl al_objitf_Destroy MO_RADIO
 ALImpl al_objitf_Destroy MO_PLAYER
@@ -176,7 +167,6 @@
 ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
 ALImpl al_radioitf_RegisterRadioCallback  
 
-
 ALImpl al_SetDataLocator 3 5 0 1
 ALImpl al_SetDataSource 3 0 1
 ALImpl al_SetDataSink 3 6 1
@@ -188,11 +178,11 @@
 ALImpl al_playitf_RegisterCallback
 
 request Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
-ALImpl al_radioitf_SetFreqRange 0 // EFmRangeEuroAmerica
+ALImpl al_radioitf_SetFreqRange 1 //XA_FREQRANGE_FMEUROAMERICA
 wait Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
 release Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
 
-ALImpl al_radioitf_GetFreqRangeProperties 0 87500000 108000000 20 // range expected: min freq, max freq, freq interval
+ALImpl al_radioitf_GetFreqRangeProperties 1 87500000 108000000 200000 // range expected: min freq, max freq, freq interval
 
 ALImpl al_objitf_Destroy MO_RADIO
 ALImpl al_objitf_Destroy MO_PLAYER
@@ -211,7 +201,6 @@
 ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
 ALImpl al_radioitf_RegisterRadioCallback  
 
-
 ALImpl al_SetDataLocator 3 5 0 1
 ALImpl al_SetDataSource 3 0 1
 ALImpl al_SetDataSink 3 6 1
@@ -726,4 +715,70 @@
 ALImpl al_objitf_Destroy MO_PLAYER
 ALImpl al_objitf_Destroy MO_ENGINE
 delete ALImpl
-[Endtest]        
\ No newline at end of file
+[Endtest]  
+
+[Test]
+title 21.22 RadioItf Set Freq ERROR--too big
+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_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback  
+
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 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 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+allownextresult -17
+ALImpl al_radioitf_SetFrequency 109000000
+																
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]   
+
+[Test]
+title 21.23 RadioItf Set Invalid Freq Range
+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_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback  
+
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 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 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+//request Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+allownextresult 2
+ALImpl al_radioitf_SetFreqRange 50 
+//wait Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+//release Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+
+
+ALImpl al_objitf_Destroy MO_RADIO
+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/inc/openmaxaltestmodule.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/openmaxaltestmodule.h	Wed Aug 18 10:17:22 2010 +0300
@@ -370,6 +370,9 @@
         virtual TInt al_radioitf_Seek(CStifItemParser& aItem );
         virtual TInt al_radioitf_StopSeeking(CStifItemParser& aItem ); 
        	virtual TInt al_radioitf_RegisterRadioCallback(CStifItemParser& aItem ); 
+        virtual TInt al_radioitf_GetFrequencyDefault( CStifItemParser& aItem);
+        virtual TInt al_radioitf_GetFreqRangeDefault( CStifItemParser& aItem );
+
         virtual TInt al_strminfoitf_QueryMediaContainerInformation( CStifItemParser& aItem );
         virtual TInt al_strminfoitf_QueryStreamType( CStifItemParser& aItem );
         virtual TInt al_strminfoitf_QueryStreamInformation( CStifItemParser& aItem );
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -248,11 +248,13 @@
         /*RadioItf begins*/
         ENTRY( "al_radioitf_SetFreqRange", COpenMAXALTestModule::al_radioitf_SetFreqRange ),    
         ENTRY( "al_radioitf_GetFreqRange", COpenMAXALTestModule::al_radioitf_GetFreqRange ),    
+        ENTRY( "al_radioitf_GetFreqRangeDefault", COpenMAXALTestModule::al_radioitf_GetFreqRangeDefault ),            	 
         ENTRY( "al_radioitf_IsFreqRangeSupported", COpenMAXALTestModule::al_radioitf_IsFreqRangeSupported ),    
         ENTRY( "al_radioitf_GetFreqRangeProperties", COpenMAXALTestModule::al_radioitf_GetFreqRangeProperties ),    
         ENTRY( "al_radioitf_SetFrequency", COpenMAXALTestModule::al_radioitf_SetFrequency ),            	        	        	        	
         ENTRY( "al_radioitf_CancelSetFrequency", COpenMAXALTestModule::al_radioitf_CancelSetFrequency ),    
         ENTRY( "al_radioitf_GetFrequency", COpenMAXALTestModule::al_radioitf_GetFrequency ),    
+        ENTRY( "al_radioitf_GetFrequencyDefault", COpenMAXALTestModule::al_radioitf_GetFrequencyDefault ),            	
         ENTRY( "al_radioitf_SetSquelch", COpenMAXALTestModule::al_radioitf_SetSquelch ),    
         ENTRY( "al_radioitf_GetSquelch", COpenMAXALTestModule::al_radioitf_GetSquelch ),    
         ENTRY( "al_radioitf_SetStereoMode", COpenMAXALTestModule::al_radioitf_SetStereoMode ),    
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/radio/openmaxalradioitftests.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/radio/openmaxalradioitftests.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -83,6 +83,17 @@
     status = aItem.GetNextInt(freqRange);
     RET_ERR_IF_ERR(status);
 
+		if (m_PlayItf)
+        {
+        status = (*m_PlayItf)->SetPlayState(
+                m_PlayItf, XA_PLAYSTATE_PLAYING);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        return status;
+        } 			
+			
     if(m_RadioItf)
         {
         status = (*m_RadioItf)->SetFreqRange(
@@ -185,12 +196,39 @@
     {
     TInt status(KErrNone);
     TInt freq;
+    XAuint32 currentFreq;    
     status = aItem.GetNextInt(freq); 
-    RET_ERR_IF_ERR(status);             
+    RET_ERR_IF_ERR(status);   
+    
+		if (m_PlayItf)
+        {
+        status = (*m_PlayItf)->SetPlayState(
+                m_PlayItf, XA_PLAYSTATE_PLAYING);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        return status;
+        } 
+        
     if (m_RadioItf)
         {
-        status = (*m_RadioItf)->SetFrequency(
-                m_RadioItf, freq); 
+        	status = (*m_RadioItf)->GetFrequency(m_RadioItf, &currentFreq); 
+       		if (status != KErrNone)
+       		{	
+       			status = KErrCompletion;  
+       			return status;
+       		}             
+        }
+    else
+        {
+        status = KErrNotFound;
+        return status;
+        }          
+                      
+    if (m_RadioItf)
+        {
+        status = (*m_RadioItf)->SetFrequency(m_RadioItf, freq); 
        	if (status != KErrNone)
        		status = KErrCompletion;               
         }
@@ -227,6 +265,36 @@
         }    
     return status;
     }
+    
+TInt COpenMAXALTestModule::al_radioitf_GetFrequencyDefault( CStifItemParser& aItem)
+    {
+    TInt status(KErrCompletion);
+    XAuint32 freq;
+                 
+    if (m_RadioItf)
+        {
+        status = (*m_RadioItf)->GetFrequency(
+                m_RadioItf, &freq); 
+        }    
+    return status;
+    }    
+    
+TInt COpenMAXALTestModule::al_radioitf_GetFreqRangeDefault( CStifItemParser& aItem )
+    {
+    TInt status(KErrCompletion);
+    XAuint8 freqRange;
+    
+    if (m_RadioItf)
+        {
+        status = (*m_RadioItf)->GetFreqRange(
+                m_RadioItf, &freqRange);              
+        }
+    else
+        {
+        status = KErrNotFound;
+        }    
+    return status;
+    }    
 
 TInt COpenMAXALTestModule::al_radioitf_RegisterRadioCallback( CStifItemParser& /*aItem*/ )
     {
@@ -414,10 +482,10 @@
         XARadioItf 	caller,
         XAuint32   	event
 )
-{
-   
+{  		
+    
     switch (event)
-        {
+        {                   	
         case XA_RADIO_EVENT_ANTENNA_STATUS_CHANGED:
             {
             TEventIf antennaStatusEvent( TEventIf::ESetEvent, _L("Event_XA_RADIO_EVENT_ANTENNA_STATUS_CHANGED:") );
--- a/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h	Wed Aug 18 10:17:22 2010 +0300
@@ -223,6 +223,8 @@
      * @param[in] aAlarmContext The context to the specific alarm that is to be stopped.
      */
     IMPORT_C void StopAlarm(unsigned int aAlarmContext);
+    
+    IMPORT_C void PlayAlarm(TToneType aTone, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 
 protected:
     // Protected constructors and destructors
--- a/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg	Wed Aug 18 10:17:22 2010 +0300
@@ -273,4 +273,4 @@
 STSSTIF StopAlarm True
 STSSTIF Delete
 delete STSSTIF
-[Endtest]
\ No newline at end of file
+[Endtest]
--- a/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicestif.h	Wed Aug 18 10:17:22 2010 +0300
@@ -136,6 +136,8 @@
         virtual TInt  PlayAlarm( CStifItemParser& aItem );
         
         virtual TInt  StopAlarm( CStifItemParser& aItem );
+        
+        virtual TInt  PlayToneWithStop( CStifItemParser& aItem);
 
 
 
@@ -145,6 +147,7 @@
        virtual void HandleEvent();
     	
     	
+    	
     	  
     	  // Data
         TPlayState            iPlayState;
--- a/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -37,6 +37,7 @@
         ENTRY( "PlayTone", CSystemToneServiceStif::PlayTone ),
         ENTRY( "PlayAlarm", CSystemToneServiceStif::PlayAlarm ),
         ENTRY( "StopAlarm", CSystemToneServiceStif::StopAlarm ),
+        ENTRY( "PlayToneWithStop", CSystemToneServiceStif::PlayToneWithStop ),	
         
 
 
@@ -216,6 +217,40 @@
 }
 
 
+TInt CSystemToneServiceStif::PlayToneWithStop( CStifItemParser& aItem )
+    {
+        // Print to UI
+            _LIT( Ksystemtoneservicestif, "systemtoneservicestif" );
+            _LIT( KPrint, "In PlaySystemToneServiceWithContext" );
+            TestModuleIf().Printf( 0, Ksystemtoneservicestif, KPrint );
+            // Print to log file
+            iLog->Log( KPrint );
+            
+               TInt lRetVal = KErrNone;
+               TInt alarmType = 0;
+
+               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->PlayAlarm(CSystemToneService::EClockAlarm, iCurrentContext, *this);
+        }
+			  else
+        {
+            //iSts->PlayTone(CSystemToneService::EClockAlarm, iCurrentContext);
+            iSts->PlayAlarm(CSystemToneService::TToneType(alarmType), iCurrentContext, *this);
+            iLog->Log(_L("CSystemToneService::TAlarmType(alarmType) %d"),CSystemToneService::TAlarmType(alarmType) );
+        }
+        
+        return lRetVal;       
+            
+        }
+
+
+
 void CSystemToneServiceStif::HandleEvent()
 	{
 		TEventIf event( TEventIf::ESetEvent, _L("Event_PlayAlarmComplete") );
--- a/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/group/TmsAudioServicesTestClass.pkg	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/group/TmsAudioServicesTestClass.pkg	Wed Aug 18 10:17:22 2010 +0300
@@ -32,7 +32,7 @@
 "/epoc32/release/armv5/urel/TmsAudioServicesTestClass.dll" - "c:/Sys/Bin/TmsAudioServicesTestClass.dll"
 ; If installation process fails, exclude testframework.ini from the sis file and
 ; copy manually.
-"../../init/TestFramework.ini"-"c:/Testframework/TestFramework.ini"
+;"../../init/TestFramework.ini"-"c:/Testframework/TestFramework.ini"
 "../../init/TmsAudioServicesTestClass.ini"-"c:/Testframework/TmsAudioServicesTestClass.ini"
 "../../Conf/TMSAudioServicesTestClass.cfg"-"c:/Testframework/TMSAudioServicesTestClass.cfg"
 
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	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/src/TmsAudioServicesTestClassBlocks.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -1272,7 +1272,7 @@
             {
             iLog->Log(_L("CTmsAudioServicesTestClass::OpenDownlink - init Downlink"));
             iTmsDnlink->AddObserver(*this, NULL);
-            error = iTmsDnlink->Init();
+            error = iTmsDnlink->Init(4);
             }
 
         if (error != KErrNone)
@@ -1358,7 +1358,7 @@
             {
             iLog->Log(_L("CTmsAudioServicesTestClass::OpenDownlink - init Uplink"));
             iTmsUplink->AddObserver(*this, NULL);
-            error = iTmsUplink->Init();
+            error = iTmsUplink->Init(4);
             }
 
         if (error != KErrNone)
@@ -1460,7 +1460,7 @@
             {
             if ((iUpLinkStatus == INITIALIZED) || (iUpLinkStatus == PAUSED))
                 {
-                iTmsUplink->Start();
+                iTmsUplink->Start(2);
 
                 if (iUpLinkStatus == INITIALIZED)
                     {
@@ -1483,7 +1483,7 @@
             {
             if ((iDnLinkStatus == INITIALIZED) || (iDnLinkStatus == PAUSED))
                 {
-                iTmsDnlink->Start();
+                iTmsDnlink->Start(2);
                 if (iDnLinkStatus == INITIALIZED)
                     {
                     AddExpectedEvent(EFillBuffer, KMediumTimeout);
--- a/mmserv/metadatautility/Src/MetaDataParserWMA.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/metadatautility/Src/MetaDataParserWMA.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -11,8 +11,7 @@
 *
 * Contributors:
 *
-* Description:  This class implements an ID3v1 and v1.1 parser as specified in
-*                www.id3.org.
+* Description:  This class implements a wma parser 
 *
 */
 
@@ -42,9 +41,12 @@
  *  Preroll,            QWORD,  64
  *  Flags,              DWORD,  32 
  */
-const TInt KDurationOffset  = 64;       // duration offset from File Property object
-const TInt KPrerollOffset   = 80;       // preRoll offset from File Property object
-const TInt KFlagsOffset     = 88;       // flags offset from File Property object
+const TInt KDurationOffset  = 64;       // duration offset in File Property object
+const TInt KPrerollOffset   = 80;       // preRoll offset in File Property object
+const TInt KFlagsOffset     = 88;       // flags offset in File Property object
+const TInt KSampleRateOffset = 82;      // sample rate offset in stream properties object
+const TInt KBitRateOffset   = 86;       // bit rate offset in stream properties object
+
 
 // ASF Header Object GUIDs 
   
@@ -70,6 +72,7 @@
 #ifdef __WINDOWS_MEDIA
 _LIT(KWMProvider, "WM/Provider\0");
 #endif
+_LIT8 (KASFStreamPropertiesObject, "B7DC0791A9B711CF8EE600C00C205365");
 
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -125,10 +128,10 @@
 
 // Destructor
 CMetaDataParserWMA::~CMetaDataParserWMA()
-	{
-		delete iHeaderData;
-		delete iCharacterSet;
-		iFs.Close();
+    {
+    delete iHeaderData;
+    delete iCharacterSet;
+    iFs.Close();
 	}
 
 // -----------------------------------------------------------------------------
@@ -183,6 +186,8 @@
 	#ifdef __WINDOWS_MEDIA
 		TRAP(err, GetExtContDesEntryL(EMetaDataVendor, iProviderOffset));
 	#endif
+		TRAP(err, GetSampleRateL());
+		TRAP(err, GetBitRateL());
 		}
 	else
 		{
@@ -244,6 +249,12 @@
 				case EMetaDataVendor:
 					TRAP(err, GetExtContDesEntryL(EMetaDataVendor, iProviderOffset));
 			#endif
+				case EMetaDataSampleRate:
+					TRAP(err, GetSampleRateL());
+					break;
+				case EMetaDataBitRate:
+					TRAP(err, GetBitRateL());
+					break;
 				default:
 					break;
 				}
@@ -336,6 +347,12 @@
 			iHeaderExtensionObjectExists = ETrue;
 			iHeaderExtensionOffset = objOffset;
 			}	
+		if(!iStreamPropertiesObjectExists && objGUID == 
+			KASFStreamPropertiesObject)
+			{
+			iStreamPropertiesObjectExists = ETrue;
+			iStreamPropertiesOffset = objOffset;
+			}	
 		TBuf8<8> size = iHeaderData->Mid(objOffset + 16, 8); 
 		TInt objSize = ConvertToInt64(size); // upper 32 bits?
 		if(0 > objSize)
@@ -345,7 +362,8 @@
 		objOffset += objSize;
 		if(objOffset >= headerSize - 30 || 
 			(iContentDescriptionObjectExists && iFilePropertiesObjectExists 
-			&& iExtendedContentDescriptionObjectExists && iHeaderExtensionObjectExists) )
+			&& iExtendedContentDescriptionObjectExists && iHeaderExtensionObjectExists 
+			&& iStreamPropertiesObjectExists) )
 			{
 			loop = EFalse;
 			}
@@ -374,7 +392,7 @@
 // -----------------------------------------------------------------------------
 //
 void CMetaDataParserWMA::FormatGUID(TDes8 &aGUID)
-{
+    {
 	TBuf8<16> copyGUID(aGUID);
 	TInt i;
 	for(i = 0; i < 4; i++)
@@ -396,16 +414,16 @@
 	aGUID.Delete(0, 32);
 	for(i = 0; i <16; i++)
 		{
-			aGUID.AppendNumFixedWidthUC(copyGUID[i], EHex, 2);
+        aGUID.AppendNumFixedWidthUC(copyGUID[i], EHex, 2);
 		}
-}
+    }
 
 // -----------------------------------------------------------------------------
 // CMetaDataParserWMA::ConvertToInt64
 // -----------------------------------------------------------------------------
 //
 TInt64 CMetaDataParserWMA::ConvertToInt64(TDesC8& aDes)
-{
+    {
 	TInt64 num = 0;
 	TInt i;
 	for(i = 7 ; i >= 0; i--)
@@ -414,14 +432,14 @@
 		num |= aDes[i];
 		}
 	return num;
-}
+    }
 
 // -----------------------------------------------------------------------------
 // CMetaDataParserWMA::ConvertToInt32
 // -----------------------------------------------------------------------------
 //
 TInt CMetaDataParserWMA::ConvertToInt32(TDesC8& aDes)
-{
+    {
 	TInt num = 0;
 	for(TInt i = 3 ; i >= 0; i--)
 		{	
@@ -429,7 +447,7 @@
 		num |= aDes[i];
 		}
 	return num;
-}
+    }
 
 
 // -----------------------------------------------------------------------------
@@ -437,7 +455,7 @@
 // -----------------------------------------------------------------------------
 //
 TInt CMetaDataParserWMA::ConvertToInt16(TDesC8& aDes)
-{
+    {
 	TInt num = 0;
 	for(TInt i = 1 ; i >= 0; i--)
 		{	
@@ -445,7 +463,7 @@
 		num |= aDes[i];
 		}
 	return num;
-}
+    }
 
 // -----------------------------------------------------------------------------
 // CMetaDataParserWMA::ConvertDes8toDes16
@@ -573,15 +591,15 @@
 // -----------------------------------------------------------------------------
 //
 void CMetaDataParserWMA::GetJpegL()
-{
+    {
 	if (iPictureOffset <= 0)
-	{
-		return;
-	}
+	    {
+        return;
+        }
 	
 	TInt offset = iPictureOffset;
 	if(!iMetadatLibraryObjectJpegExists)
-		{
+	    {
 		TPtrC8 dataType = iHeaderData->Mid(offset, 2);
 		offset += 2;
 		TInt dataTypeInt = ConvertToInt16(dataType);
@@ -603,28 +621,28 @@
 	TInt picType = 0;
 	picType |= picData[0];
 	if(picType != 3)
-	{
+	    {
 		return; // only Front Album Cover supported
-	}
+        }
 	
 	TPtrC8 picLengthData = iHeaderData->Mid(offset, 4);
 	offset += 4;
 	TInt picLength = ConvertToInt32(picLengthData);
 	if(picLength <= 0)
-	{
+	    {
 		return;
-	}
+        }
 	
 	_LIT8(KNULL, "\0\0");
 	TPtrC8 data = iHeaderData->Mid(offset, picLength);
 	TInt pos = data.Find(KNULL);
 	if(pos != 0)
-	{
+	    {
 		pos++; // for unicode coding for strings. 
-	}
+        }
 	// check mime type
 	if(pos != KErrNotFound)
-	{
+	    {
 		HBufC8 *mimeType = iHeaderData->Mid(offset, pos + 2).AllocLC();
 		offset += pos + 2;
 		HBufC* name16 = HBufC::NewLC( (pos+2)/2);
@@ -633,26 +651,26 @@
 		_LIT(KJPEG, "image/jpeg\0");
 		_LIT(KJPG, "image/jpg\0");
 		if(mimeType16.Compare(KJPEG) != 0 && mimeType16.Compare(KJPG) != 0)
-		{
+		    {
 			CleanupStack::PopAndDestroy(2, mimeType);
 			return; // only JPEG & JPG supported
-		}
+		    }
 		CleanupStack::PopAndDestroy(2); // mimeType16, mimeType
-	}
+        }
 		
 	// skip the picture description
 	TPtrC8 picDesc = iHeaderData->Mid(offset, picLength);
 	pos = picDesc.Find(KNULL);
 	if(pos != 0)
-	{
+	    {
 		pos++; // for unicode coding for strings. 
-	}
+        }
 	offset += pos + 2;
 	
 	// picture data 
 	TPtrC8 pic8 = iHeaderData->Mid(offset, picLength);	
 	iContainer->AppendL( EMetaDataJpeg, pic8 );
-}
+    }
 
 
 // -----------------------------------------------------------------------------
@@ -660,7 +678,7 @@
 // -----------------------------------------------------------------------------
 //
 TBool CMetaDataParserWMA::GetExtContDesEntryL(TMetaDataFieldId aFieldId, TInt aOffset)
-{
+    {
 	TBool ret = EFalse;
 	if(iExtendedContentDescriptionCount == 0)
 		{
@@ -705,7 +723,7 @@
 		ret = ETrue;
 		}
 	return ret;
-}
+    }
 
 // -----------------------------------------------------------------------------
 // CMetaDataParserWMA::GetDurationL
@@ -757,7 +775,7 @@
 	TDes16& aUnicode )
 	{
 	TPtrC8 unicodeData;
-  TUint characterSetId = 0;
+	TUint characterSetId = 0;
 	CCnvCharacterSetConverter* charSetConv = CCnvCharacterSetConverter::NewLC();
 	TInt state = CCnvCharacterSetConverter::KStateDefault;
 
@@ -784,17 +802,17 @@
 //
 void CMetaDataParserWMA::ParseContentDescriptionObject()
 	{
-		TBuf8<2> data = iHeaderData->Mid(iContentDescriptionOffset + 24, 2);
-		iTitleLength = ConvertToInt16(data); 
-		data = iHeaderData->Mid(iContentDescriptionOffset + 26, 2);
-		iAuthorLength = ConvertToInt16(data); 
-		data = iHeaderData->Mid(iContentDescriptionOffset + 28, 2);
-		iCopyrightLength = ConvertToInt16(data); 
-		data = iHeaderData->Mid(iContentDescriptionOffset + 30, 2);
-		iDescriptionLength = ConvertToInt16(data); 
-		data = iHeaderData->Mid(iContentDescriptionOffset + 32, 2);
-		iRatingLength = ConvertToInt16(data);
-		return;
+	TBuf8<2> data = iHeaderData->Mid(iContentDescriptionOffset + 24, 2);
+	iTitleLength = ConvertToInt16(data); 
+	data = iHeaderData->Mid(iContentDescriptionOffset + 26, 2);
+	iAuthorLength = ConvertToInt16(data); 
+	data = iHeaderData->Mid(iContentDescriptionOffset + 28, 2);
+	iCopyrightLength = ConvertToInt16(data); 
+	data = iHeaderData->Mid(iContentDescriptionOffset + 30, 2);
+	iDescriptionLength = ConvertToInt16(data); 
+	data = iHeaderData->Mid(iContentDescriptionOffset + 32, 2);
+	iRatingLength = ConvertToInt16(data);
+	return;
 	}
 
 
@@ -1006,4 +1024,65 @@
 		}
 	}	
 
+// -----------------------------------------------------------------------------
+// CMetaDataParserWMA::GetSampleRateL
+// -----------------------------------------------------------------------------
+//
+void CMetaDataParserWMA::GetSampleRateL()
+    {
+#ifdef _DEBUG
+    RDebug::Print(_L("CMetaDataParserWMA::GetSampleRateL"));
+#endif    
+    if(!iStreamPropertiesObjectExists)
+        {
+        return;
+        }
+    TInt offset = iStreamPropertiesOffset + KSampleRateOffset;
+    TPtrC8 sampleRate = iHeaderData->Mid(offset, 4);
+    if(offset+4 > iHeaderData->Length())        //Header Size is too small
+        {
+        return ;
+        } 
+    
+    TInt sampleRateValue = ConvertToInt32(sampleRate); 
+    TBuf16<20> des16;   
+    des16.Num(sampleRateValue);                 // convert to string
+    
+    iContainer->AppendL( EMetaDataSampleRate, des16 );
+    
+#ifdef _DEBUG
+    RDebug::Print(_L("CMetaDataParserWMA::GetSampleRateL(), SampleRate=%S"), &des16);
+#endif      
+    }
+	
+// -----------------------------------------------------------------------------
+// CMetaDataParserWMA::GetBitRateL
+// -----------------------------------------------------------------------------
+//
+void CMetaDataParserWMA::GetBitRateL()
+    {
+#ifdef _DEBUG
+    RDebug::Print(_L("CMetaDataParserWMA::GetBitRateL"));
+#endif    
+    if(!iStreamPropertiesObjectExists)
+	    {
+        return;
+	    }
+    TInt offset = iStreamPropertiesOffset + KBitRateOffset;
+    if(offset+4 > iHeaderData->Length()) //Header Size is too small
+        {
+        return ;
+        } 
+    TPtrC8 byteRate = iHeaderData->Mid(offset, 4);      // byte rate
+
+    TInt bitRateValue = ConvertToInt32(byteRate) * 8;  // multiply by 8 to get bit rate
+    TBuf16<20> des16;   
+    des16.Num(bitRateValue);                           // convert to string
+    
+    iContainer->AppendL( EMetaDataBitRate, des16 );
+#ifdef _DEBUG
+    RDebug::Print(_L("CMetaDataParserWMA::GetBitRateL(), bitRate=%S"), &des16);
+#endif    
+    }
+
 //  End of File
--- a/mmserv/metadatautility/Src/MetaDataParserWMA.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/metadatautility/Src/MetaDataParserWMA.h	Wed Aug 18 10:17:22 2010 +0300
@@ -11,8 +11,7 @@
 *
 * Contributors:
 *
-* Description:  This class implements an ID3v1 and v1.1 parser as specified in
-*                www.id3.org.
+* Description:  This class implements a wma parser 
 *
 */
 
@@ -119,6 +118,18 @@
         * @return void
 		*/
 		void GetDurationL();
+		
+		/**
+        * Append sample rate to the container, if found.
+        * @return void
+		*/
+		void GetSampleRateL();
+		
+		/**
+        * Append bit rate to the container, if found.
+        * @return void
+		*/
+		void GetBitRateL();
 
 		/**
         * Parses all entries in Content Description Object
@@ -240,6 +251,9 @@
 		TBool iHeaderExtensionObjectExists;
 		TBool iMetadataLibraryObjectExists;
 		TBool iMetadatLibraryObjectJpegExists;
+		TBool iStreamPropertiesObjectExists;
+		
+		TInt iStreamPropertiesOffset;
     };
 
 #endif      // CMetaDataParserWMA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/bwins/Radio_Utility_Stubu.def	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,73 @@
+EXPORTS
+	?GetAutomaticTrafficAnnouncement@CRadioRdsUtility@@QAEHAAH@Z @ 1 NONAME ; int CRadioRdsUtility::GetAutomaticTrafficAnnouncement(int &)
+	?Close@CRadioRdsUtility@@QAEXXZ @ 2 NONAME ; void CRadioRdsUtility::Close(void)
+	?PlayerState@CRadioPlayerUtility@@QBE?AW4TPlayerState@@XZ @ 3 NONAME ; enum TPlayerState CRadioPlayerUtility::PlayerState(void) const
+	?GetBalance@CRadioPlayerUtility@@QBEHAAH0@Z @ 4 NONAME ; int CRadioPlayerUtility::GetBalance(int &, int &) const
+	?RadioRdsUtilityL@CRadioUtility@@QAEAAVCRadioRdsUtility@@AAVMRadioRdsObserver@@@Z @ 5 NONAME ; class CRadioRdsUtility & CRadioUtility::RadioRdsUtilityL(class MRadioRdsObserver &)
+	?StationSeek@CRadioFmTunerUtility@@QAEXH@Z @ 6 NONAME ; void CRadioFmTunerUtility::StationSeek(int)
+	?CancelStationSeek@CRadioFmTunerUtility@@QAEXXZ @ 7 NONAME ; void CRadioFmTunerUtility::CancelStationSeek(void)
+	?StationSeekByTP@CRadioRdsUtility@@QAEXH@Z @ 8 NONAME ; void CRadioRdsUtility::StationSeekByTP(int)
+	?SetSquelch@CRadioFmTunerUtility@@QAEHH@Z @ 9 NONAME ; int CRadioFmTunerUtility::SetSquelch(int)
+	?GetAutomaticTrafficAnnouncement@CBody@CRadioRdsUtility@@QAEHAAH@Z @ 10 NONAME ; int CRadioRdsUtility::CBody::GetAutomaticTrafficAnnouncement(int &)
+	?GetTrafficProgrammeStatus@CRadioRdsUtility@@QAEHAAH@Z @ 11 NONAME ; int CRadioRdsUtility::GetTrafficProgrammeStatus(int &)
+	?GetMaxSignalStrength@CRadioFmTunerUtility@@QBEHAAH@Z @ 12 NONAME ; int CRadioFmTunerUtility::GetMaxSignalStrength(int &) const
+	?GetProgrammeService@CRadioRdsUtility@@QAEHAAV?$TBuf16@$07@@@Z @ 13 NONAME ; int CRadioRdsUtility::GetProgrammeService(class TBuf16<8> &)
+	?RadioPlayerUtilityL@CRadioUtility@@QAEAAVCRadioPlayerUtility@@AAVMRadioPlayerObserver@@@Z @ 14 NONAME ; class CRadioPlayerUtility & CRadioUtility::RadioPlayerUtilityL(class MRadioPlayerObserver &)
+	?GetStereoMode@CRadioFmTunerUtility@@QBEHAAH@Z @ 15 NONAME ; int CRadioFmTunerUtility::GetStereoMode(int &) const
+	?GetRdsSignalStatus@CRadioRdsUtility@@QBEHAAH@Z @ 16 NONAME ; int CRadioRdsUtility::GetRdsSignalStatus(int &) const
+	?GetRadioTextPlus@CRadioRdsUtility@@QAEHW4TRdsRTplusClass@@AAV?$TBuf16@$0EA@@@@Z @ 17 NONAME ; int CRadioRdsUtility::GetRadioTextPlus(enum TRdsRTplusClass, class TBuf16<64> &)
+	??1CRadioFmTunerUtility@@EAE@XZ @ 18 NONAME ; CRadioFmTunerUtility::~CRadioFmTunerUtility(void)
+	?GetRadioText@CRadioRdsUtility@@QAEHAAV?$TBuf16@$0EA@@@@Z @ 19 NONAME ; int CRadioRdsUtility::GetRadioText(class TBuf16<64> &)
+	?CancelGetPSByTA@CRadioRdsUtility@@QAEXXZ @ 20 NONAME ; void CRadioRdsUtility::CancelGetPSByTA(void)
+	?RequestTunerControl@CRadioFmTunerUtility@@QAEXXZ @ 21 NONAME ; void CRadioFmTunerUtility::RequestTunerControl(void)
+	?GetProgrammeIdentification@CRadioRdsUtility@@QAEHAAH@Z @ 22 NONAME ; int CRadioRdsUtility::GetProgrammeIdentification(int &)
+	?SetBalance@CRadioPlayerUtility@@QAEHHH@Z @ 23 NONAME ; int CRadioPlayerUtility::SetBalance(int, int)
+	?SetFrequency@CRadioFmTunerUtility@@QAEXH@Z @ 24 NONAME ; void CRadioFmTunerUtility::SetFrequency(int)
+	?NotifyRdsDataChange@CRadioRdsUtility@@QAEHVTRdsData@@@Z @ 25 NONAME ; int CRadioRdsUtility::NotifyRdsDataChange(class TRdsData)
+	?CancelSetFrequencyRange@CRadioFmTunerUtility@@QAEXXZ @ 26 NONAME ; void CRadioFmTunerUtility::CancelSetFrequencyRange(void)
+	?GetFreqByPTY@CRadioRdsUtility@@QAEXH@Z @ 27 NONAME ; void CRadioRdsUtility::GetFreqByPTY(int)
+	?GetVolume@CRadioPlayerUtility@@QBEHAAH@Z @ 28 NONAME ; int CRadioPlayerUtility::GetVolume(int &) const
+	?SetVolume@CRadioPlayerUtility@@QAEHH@Z @ 29 NONAME ; int CRadioPlayerUtility::SetVolume(int)
+	?StationSeekByPTY@CRadioRdsUtility@@QAEXHH@Z @ 30 NONAME ; void CRadioRdsUtility::StationSeekByPTY(int, int)
+	?GetCapabilities@CRadioRdsUtility@@QBEHAAVTRdsCapabilities@@@Z @ 31 NONAME ; int CRadioRdsUtility::GetCapabilities(class TRdsCapabilities &) const
+	?CancelRdsStationSeek@CRadioRdsUtility@@QAEXXZ @ 32 NONAME ; void CRadioRdsUtility::CancelRdsStationSeek(void)
+	?CancelGetFreqByTA@CRadioRdsUtility@@QAEXXZ @ 33 NONAME ; void CRadioRdsUtility::CancelGetFreqByTA(void)
+	?SetVolumeRamp@CRadioPlayerUtility@@QAEHABVTTimeIntervalMicroSeconds@@@Z @ 34 NONAME ; int CRadioPlayerUtility::SetVolumeRamp(class TTimeIntervalMicroSeconds const &)
+	?StationSeekByPTY@CBody@CRadioRdsUtility@@QAEXHH@Z @ 35 NONAME ; void CRadioRdsUtility::CBody::StationSeekByPTY(int, int)
+	?CancelGetFreqByPTY@CRadioRdsUtility@@QAEXXZ @ 36 NONAME ; void CRadioRdsUtility::CancelGetFreqByPTY(void)
+	?GetAutomaticSwitching@CRadioRdsUtility@@QAEHAAH@Z @ 37 NONAME ; int CRadioRdsUtility::GetAutomaticSwitching(int &)
+	?GetTrafficAnnouncementStatus@CRadioRdsUtility@@QAEHAAH@Z @ 38 NONAME ; int CRadioRdsUtility::GetTrafficAnnouncementStatus(int &)
+	?CancelSetFrequency@CRadioFmTunerUtility@@QAEXXZ @ 39 NONAME ; void CRadioFmTunerUtility::CancelSetFrequency(void)
+	?GetClockTime@CRadioRdsUtility@@QAEHAAVTDateTime@@@Z @ 40 NONAME ; int CRadioRdsUtility::GetClockTime(class TDateTime &)
+	?CancelAFSearch@CRadioRdsUtility@@QAEXXZ @ 41 NONAME ; void CRadioRdsUtility::CancelAFSearch(void)
+	?ForceMonoReception@CRadioFmTunerUtility@@QAEHH@Z @ 42 NONAME ; int CRadioFmTunerUtility::ForceMonoReception(int)
+	?GetProgrammeType@CRadioRdsUtility@@QAEHAAH@Z @ 43 NONAME ; int CRadioRdsUtility::GetProgrammeType(int &)
+	?GetForcedMonoReception@CRadioFmTunerUtility@@QBEHAAH@Z @ 44 NONAME ; int CRadioFmTunerUtility::GetForcedMonoReception(int &) const
+	?GetFreqByTA@CRadioRdsUtility@@QAEXXZ @ 45 NONAME ; void CRadioRdsUtility::GetFreqByTA(void)
+	?CancelGetPSByPTY@CRadioRdsUtility@@QAEXXZ @ 46 NONAME ; void CRadioRdsUtility::CancelGetPSByPTY(void)
+	?GetFrequencyRange@CRadioFmTunerUtility@@QBEHAAW4TFmRadioFrequencyRange@@AAH1@Z @ 47 NONAME ; int CRadioFmTunerUtility::GetFrequencyRange(enum TFmRadioFrequencyRange &, int &, int &) const
+	?Stop@CRadioPlayerUtility@@QAEXXZ @ 48 NONAME ; void CRadioPlayerUtility::Stop(void)
+	?SetFrequencyRange@CRadioFmTunerUtility@@QAEXW4TFmRadioFrequencyRange@@@Z @ 49 NONAME ; void CRadioFmTunerUtility::SetFrequencyRange(enum TFmRadioFrequencyRange)
+	??1CRadioPlayerUtility@@EAE@XZ @ 50 NONAME ; CRadioPlayerUtility::~CRadioPlayerUtility(void)
+	?GetFrequency@CRadioFmTunerUtility@@QBEHAAH@Z @ 51 NONAME ; int CRadioFmTunerUtility::GetFrequency(int &) const
+	?StationSeekByTA@CRadioRdsUtility@@QAEXH@Z @ 52 NONAME ; void CRadioRdsUtility::StationSeekByTA(int)
+	?Play@CRadioPlayerUtility@@QAEXXZ @ 53 NONAME ; void CRadioPlayerUtility::Play(void)
+	?CustomInterface@CRadioPlayerUtility@@UAEPAXVTUid@@@Z @ 54 NONAME ; void * CRadioPlayerUtility::CustomInterface(class TUid)
+	?GetCapabilities@CRadioFmTunerUtility@@QAEHAAVTFmTunerCapabilities@@@Z @ 55 NONAME ; int CRadioFmTunerUtility::GetCapabilities(class TFmTunerCapabilities &)
+	?IsMute@CRadioPlayerUtility@@QAEHXZ @ 56 NONAME ; int CRadioPlayerUtility::IsMute(void)
+	?SetAutomaticSwitching@CRadioRdsUtility@@QAEHH@Z @ 57 NONAME ; int CRadioRdsUtility::SetAutomaticSwitching(int)
+	?SetAutomaticTrafficAnnouncement@CRadioRdsUtility@@QAEHH@Z @ 58 NONAME ; int CRadioRdsUtility::SetAutomaticTrafficAnnouncement(int)
+	?RadioFmTunerUtilityL@CRadioUtility@@QAEAAVCRadioFmTunerUtility@@AAVMRadioFmTunerObserver@@@Z @ 59 NONAME ; class CRadioFmTunerUtility & CRadioUtility::RadioFmTunerUtilityL(class MRadioFmTunerObserver &)
+	?GetPSByPTY@CRadioRdsUtility@@QAEXH@Z @ 60 NONAME ; void CRadioRdsUtility::GetPSByPTY(int)
+	?CancelNotifyRdsDataChange@CRadioRdsUtility@@QAEXXZ @ 61 NONAME ; void CRadioRdsUtility::CancelNotifyRdsDataChange(void)
+	?EnableTunerInOfflineMode@CRadioFmTunerUtility@@QAEHH@Z @ 62 NONAME ; int CRadioFmTunerUtility::EnableTunerInOfflineMode(int)
+	?Mute@CRadioPlayerUtility@@QAEHH@Z @ 63 NONAME ; int CRadioPlayerUtility::Mute(int)
+	?NewL@CRadioUtility@@SAPAV1@H@Z @ 64 NONAME ; class CRadioUtility * CRadioUtility::NewL(int)
+	?Close@CRadioPlayerUtility@@QAEXXZ @ 65 NONAME ; void CRadioPlayerUtility::Close(void)
+	?GetPSByTA@CRadioRdsUtility@@QAEXXZ @ 66 NONAME ; void CRadioRdsUtility::GetPSByTA(void)
+	??1CRadioUtility@@UAE@XZ @ 67 NONAME ; CRadioUtility::~CRadioUtility(void)
+	?GetSignalStrength@CRadioFmTunerUtility@@QBEHAAH@Z @ 68 NONAME ; int CRadioFmTunerUtility::GetSignalStrength(int &) const
+	?Close@CRadioFmTunerUtility@@QAEXXZ @ 69 NONAME ; void CRadioFmTunerUtility::Close(void)
+	?GetSquelch@CRadioFmTunerUtility@@QBEHAAH@Z @ 70 NONAME ; int CRadioFmTunerUtility::GetSquelch(int &) const
+	?GetMaxVolume@CRadioPlayerUtility@@QBEHAAH@Z @ 71 NONAME ; int CRadioPlayerUtility::GetMaxVolume(int &) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/eabi/Radio_Utility_Stubu.def	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,96 @@
+EXPORTS
+	_ZN13CRadioUtility16RadioRdsUtilityLER17MRadioRdsObserver @ 1 NONAME
+	_ZN13CRadioUtility19RadioPlayerUtilityLER20MRadioPlayerObserver @ 2 NONAME
+	_ZN13CRadioUtility20RadioFmTunerUtilityLER21MRadioFmTunerObserver @ 3 NONAME
+	_ZN13CRadioUtility4NewLEi @ 4 NONAME
+	_ZN13CRadioUtilityD0Ev @ 5 NONAME
+	_ZN13CRadioUtilityD1Ev @ 6 NONAME
+	_ZN13CRadioUtilityD2Ev @ 7 NONAME
+	_ZN16CRadioRdsUtility10GetPSByPTYEi @ 8 NONAME
+	_ZN16CRadioRdsUtility11GetFreqByTAEv @ 9 NONAME
+	_ZN16CRadioRdsUtility12GetClockTimeER9TDateTime @ 10 NONAME
+	_ZN16CRadioRdsUtility12GetFreqByPTYEi @ 11 NONAME
+	_ZN16CRadioRdsUtility12GetRadioTextER6TBuf16ILi64EE @ 12 NONAME
+	_ZN16CRadioRdsUtility14CancelAFSearchEv @ 13 NONAME
+	_ZN16CRadioRdsUtility15CancelGetPSByTAEv @ 14 NONAME
+	_ZN16CRadioRdsUtility15StationSeekByTAEi @ 15 NONAME
+	_ZN16CRadioRdsUtility15StationSeekByTPEi @ 16 NONAME
+	_ZN16CRadioRdsUtility16CancelGetPSByPTYEv @ 17 NONAME
+	_ZN16CRadioRdsUtility16GetProgrammeTypeERi @ 18 NONAME
+	_ZN16CRadioRdsUtility16GetRadioTextPlusE15TRdsRTplusClassR6TBuf16ILi64EE @ 19 NONAME
+	_ZN16CRadioRdsUtility16StationSeekByPTYEii @ 20 NONAME
+	_ZN16CRadioRdsUtility17CancelGetFreqByTAEv @ 21 NONAME
+	_ZN16CRadioRdsUtility18CancelGetFreqByPTYEv @ 22 NONAME
+	_ZN16CRadioRdsUtility19GetProgrammeServiceER6TBuf16ILi8EE @ 23 NONAME
+	_ZN16CRadioRdsUtility19NotifyRdsDataChangeE8TRdsData @ 24 NONAME
+	_ZN16CRadioRdsUtility20CancelRdsStationSeekEv @ 25 NONAME
+	_ZN16CRadioRdsUtility21GetAutomaticSwitchingERi @ 26 NONAME
+	_ZN16CRadioRdsUtility21SetAutomaticSwitchingEi @ 27 NONAME
+	_ZN16CRadioRdsUtility25CancelNotifyRdsDataChangeEv @ 28 NONAME
+	_ZN16CRadioRdsUtility25GetTrafficProgrammeStatusERi @ 29 NONAME
+	_ZN16CRadioRdsUtility26GetProgrammeIdentificationERi @ 30 NONAME
+	_ZN16CRadioRdsUtility28GetTrafficAnnouncementStatusERi @ 31 NONAME
+	_ZN16CRadioRdsUtility31GetAutomaticTrafficAnnouncementERi @ 32 NONAME
+	_ZN16CRadioRdsUtility31SetAutomaticTrafficAnnouncementEi @ 33 NONAME
+	_ZN16CRadioRdsUtility5CloseEv @ 34 NONAME
+	_ZN16CRadioRdsUtility9GetPSByTAEv @ 35 NONAME
+	_ZN19CRadioPlayerUtility10SetBalanceEii @ 36 NONAME
+	_ZN19CRadioPlayerUtility13SetVolumeRampERK25TTimeIntervalMicroSeconds @ 37 NONAME
+	_ZN19CRadioPlayerUtility15CustomInterfaceE4TUid @ 38 NONAME
+	_ZN19CRadioPlayerUtility4MuteEi @ 39 NONAME
+	_ZN19CRadioPlayerUtility4PlayEv @ 40 NONAME
+	_ZN19CRadioPlayerUtility4StopEv @ 41 NONAME
+	_ZN19CRadioPlayerUtility5CloseEv @ 42 NONAME
+	_ZN19CRadioPlayerUtility6IsMuteEv @ 43 NONAME
+	_ZN19CRadioPlayerUtility9SetVolumeEi @ 44 NONAME
+	_ZN19CRadioPlayerUtilityD0Ev @ 45 NONAME
+	_ZN19CRadioPlayerUtilityD1Ev @ 46 NONAME
+	_ZN19CRadioPlayerUtilityD2Ev @ 47 NONAME
+	_ZN20CRadioFmTunerUtility10SetSquelchEi @ 48 NONAME
+	_ZN20CRadioFmTunerUtility11StationSeekEi @ 49 NONAME
+	_ZN20CRadioFmTunerUtility12SetFrequencyEi @ 50 NONAME
+	_ZN20CRadioFmTunerUtility15GetCapabilitiesER20TFmTunerCapabilities @ 51 NONAME
+	_ZN20CRadioFmTunerUtility17CancelStationSeekEv @ 52 NONAME
+	_ZN20CRadioFmTunerUtility17SetFrequencyRangeE22TFmRadioFrequencyRange @ 53 NONAME
+	_ZN20CRadioFmTunerUtility18CancelSetFrequencyEv @ 54 NONAME
+	_ZN20CRadioFmTunerUtility18ForceMonoReceptionEi @ 55 NONAME
+	_ZN20CRadioFmTunerUtility19RequestTunerControlEv @ 56 NONAME
+	_ZN20CRadioFmTunerUtility23CancelSetFrequencyRangeEv @ 57 NONAME
+	_ZN20CRadioFmTunerUtility24EnableTunerInOfflineModeEi @ 58 NONAME
+	_ZN20CRadioFmTunerUtility5CloseEv @ 59 NONAME
+	_ZN20CRadioFmTunerUtilityD0Ev @ 60 NONAME
+	_ZN20CRadioFmTunerUtilityD1Ev @ 61 NONAME
+	_ZN20CRadioFmTunerUtilityD2Ev @ 62 NONAME
+	_ZNK16CRadioRdsUtility15GetCapabilitiesER16TRdsCapabilities @ 63 NONAME
+	_ZNK16CRadioRdsUtility18GetRdsSignalStatusERi @ 64 NONAME
+	_ZNK19CRadioPlayerUtility10GetBalanceERiS0_ @ 65 NONAME
+	_ZNK19CRadioPlayerUtility11PlayerStateEv @ 66 NONAME
+	_ZNK19CRadioPlayerUtility12GetMaxVolumeERi @ 67 NONAME
+	_ZNK19CRadioPlayerUtility9GetVolumeERi @ 68 NONAME
+	_ZNK20CRadioFmTunerUtility10GetSquelchERi @ 69 NONAME
+	_ZNK20CRadioFmTunerUtility12GetFrequencyERi @ 70 NONAME
+	_ZNK20CRadioFmTunerUtility13GetStereoModeERi @ 71 NONAME
+	_ZNK20CRadioFmTunerUtility17GetFrequencyRangeER22TFmRadioFrequencyRangeRiS2_ @ 72 NONAME
+	_ZNK20CRadioFmTunerUtility17GetSignalStrengthERi @ 73 NONAME
+	_ZNK20CRadioFmTunerUtility20GetMaxSignalStrengthERi @ 74 NONAME
+	_ZNK20CRadioFmTunerUtility22GetForcedMonoReceptionERi @ 75 NONAME
+	_ZTI13CRadioUtility @ 76 NONAME
+	_ZTI16CRadioRdsUtility @ 77 NONAME
+	_ZTI19CRadioPlayerUtility @ 78 NONAME
+	_ZTI20CRadioFmTunerUtility @ 79 NONAME
+	_ZTIN13CRadioMonitor5CBodyE @ 80 NONAME
+	_ZTIN13CRadioUtility5CBodyE @ 81 NONAME
+	_ZTIN16CRadioRdsUtility5CBodyE @ 82 NONAME
+	_ZTIN19CRadioPlayerUtility5CBodyE @ 83 NONAME
+	_ZTIN20CRadioFmTunerUtility5CBodyE @ 84 NONAME
+	_ZTV13CRadioUtility @ 85 NONAME
+	_ZTV16CRadioRdsUtility @ 86 NONAME
+	_ZTV19CRadioPlayerUtility @ 87 NONAME
+	_ZTV20CRadioFmTunerUtility @ 88 NONAME
+	_ZTVN13CRadioMonitor5CBodyE @ 89 NONAME
+	_ZTVN13CRadioUtility5CBodyE @ 90 NONAME
+	_ZTVN16CRadioRdsUtility5CBodyE @ 91 NONAME
+	_ZTVN19CRadioPlayerUtility5CBodyE @ 92 NONAME
+	_ZTVN20CRadioFmTunerUtility5CBodyE @ 93 NONAME
+	_ZThn4_N19CRadioPlayerUtility15CustomInterfaceE4TUid @ 94 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/group/Radio_Utility_Stub.mmp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2006-2007 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:  Project definition file for project RadioUtilityStub
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET        	Radio_Utility_Stub.dll
+TARGETTYPE    	DLL
+CAPABILITY    	CAP_GENERAL_DLL
+VENDORID      	VID_DEFAULT
+UID           	0x1000008D 0x01000001
+VERSION 10.1
+
+SOURCEPATH	../../src
+SOURCE		RadioUtility.cpp
+SOURCE		RadioUtilityBody.cpp
+SOURCE		RadioPlayerUtility.cpp
+SOURCE		RadioFmTunerUtility.cpp
+SOURCE		RadioRdsUtility.cpp
+SOURCE		RadioMonitorBody.cpp
+SOURCE      RadioPlayerUtilityBody.cpp
+SOURCE      RadioFmTunerUtilityBody.cpp
+SOURCE      RadioRdsUtilityBody.cpp
+
+SOURCEPATH	../src
+
+USERINCLUDE	../src
+USERINCLUDE	../../src
+USERINCLUDE	../../inc
+USERINCLUDE	../../../inc
+USERINCLUDE	../../../../../inc
+USERINCLUDE /sf/app/radio/radioengine/utils/inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+//LIBRARY		edllstub.lib
+LIBRARY		euser.lib
+LIBRARY		RadioSession_Stub.lib
+LIBRARY		CustomInterfaceUtility.lib 
+LIBRARY     flogger.lib 
+ 
+MACRO STUB_CONSTELLATION
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/group/bld.inf	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2002-2004 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:  Project build file for Radio_Utility_Stub
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+// Platforms the component needs to be built on
+//
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// iby file
+../rom/Radio_Utility_Stub.iby		CORE_MW_LAYER_IBY_EXPORT_PATH(Radio_Utility_Stub.iby)
+
+PRJ_MMPFILES
+Radio_Utility_Stub.mmp
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/rom/Radio_Utility_Stub.iby	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2005 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:  IBY file for the Radio Utility
+*
+*/
+
+
+#ifndef RADIO_UTILITY_IBY
+#define RADIO_UTILITY_IBY
+
+#ifdef __FM_RADIO
+
+file=ABI_DIR\BUILD_DIR\Radio_Utility_Stub.dll	SHARED_LIB_DIR\Radio_Utility_Stub.dll
+
+// Stub sis
+data = ZSYSTEM\install\Radio_Utility_Stub.sis	system\install\Radio_Utility_Stub.sis
+
+#endif //__FM_RADIO
+#endif // RADIO_UTILITY_IBY
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/src/StubRadioFmTunerUtilityBody.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,327 @@
+/*
+* Copyright (c) 2007 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:  Radio FM Tuner Utility implementation body's stub.
+*
+*/
+
+
+#include "RadioFmTunerUtilityBody.h"
+#include "RadioUtilityBody.h"
+#include "RadioStubManager.h"
+
+
+#define STUB  CRadioStubManager::GetRadioStubManager()->iTuner
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CRadioFmTunerUtility::CBody* CRadioFmTunerUtility::CBody::NewL(
+    RRadioSession& aRadioSession,
+    MRadioFmTunerObserver& aObserver )
+    {
+    if ( STUB.iLeaveNewL.iError )
+        {
+        User::Leave( STUB.iLeaveNewL.iError );
+        }
+    CRadioFmTunerUtility::CBody* s = new(ELeave) CRadioFmTunerUtility::CBody( aRadioSession, aObserver );
+    CleanupStack::PushL(s);
+    s->ConstructL();
+    CleanupStack::Pop();
+    return s;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::ConstructL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::ConstructL()
+    {
+    if ( STUB.iLeaveErrorForConstructL.iError )
+        {
+        User::Leave( STUB.iLeaveErrorForConstructL.iError );
+        }
+    STUB.iRadioFmTunerUtilityClient = &iRadioFmTunerUtilityClient;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::CBody
+// -----------------------------------------------------------------------------
+//
+CRadioFmTunerUtility::CBody::CBody(
+        RRadioSession& aRadioSession,
+        MRadioFmTunerObserver& aObserver )
+    :iRadioSession( aRadioSession ), 
+    iRadioFmTunerUtilityClient( aObserver )
+    
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::~CBody
+// -----------------------------------------------------------------------------
+//
+CRadioFmTunerUtility::CBody::~CBody()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::RequestTunerControl
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::RequestTunerControl()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::Close
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::Close()
+    {
+    // Consider releasing tuner control here.
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::GetCapabilities
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetCapabilities(
+    TFmTunerCapabilities& aCaps ) const
+    {
+    aCaps.iTunerBands = STUB.iCaps.iTunerBands;
+    aCaps.iTunerFunctions = STUB.iCaps.iTunerFunctions;
+    aCaps.iAdditionalFunctions1 = STUB.iCaps.iAdditionalFunctions1;
+    aCaps.iAdditionalFunctions2 = STUB.iCaps.iAdditionalFunctions2;
+    return STUB.iGetCapabilitiesError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::EnableTunerInOfflineMode
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::EnableTunerInOfflineMode(
+    TBool aEnable )
+    {
+    STUB.iTunerInOfflineMode = aEnable;
+    return STUB.iEnableTunerInOfflineModeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::GetFrequencyRange
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetFrequencyRange(
+    TFmRadioFrequencyRange& aRange,
+    TInt& aMinFreq,
+    TInt& aMaxFreq ) const
+    {
+
+    aRange = STUB.iRange;
+    aMinFreq = STUB.iMinFreq;
+    aMaxFreq = STUB.iMaxFreq;
+#ifdef _DEBUG
+    RDebug::Print(_L("CRadioFmTunerUtility::CBody::GetFrequencyRange, aRange = %d, aMinFreq = %d, aMaxFreq = %d"),
+        aRange, aMinFreq, aMaxFreq);
+#endif
+    return STUB.iGetFrequencyRangeError.Error();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::SetFrequencyRange
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::SetFrequencyRange(
+    TFmRadioFrequencyRange aRange )
+    {
+#ifdef _DEBUG
+    RDebug::Print(_L("CRadioFmTunerUtility::CBody::SetFrequencyRange, aRange = %d"), aRange);
+#endif
+    STUB.iPreviousRange = STUB.iRange;
+    STUB.iRange = aRange;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::CancelSetFrequencyRange
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::CancelSetFrequencyRange()
+    {
+    STUB.iRange = STUB.iPreviousRange;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::SetFrequency
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::SetFrequency(
+    TInt aFrequency )
+    {
+#ifdef _DEBUG
+    RDebug::Print(_L("CRadioFmTunerUtility::CBody::SetFrequency, aFrequency = %d"), aFrequency);
+#endif
+    STUB.iPreviousFrequency = STUB.iFrequency;
+    STUB.iFrequency = aFrequency;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::CancelSetFrequencyRange
+// Body of CancelSetFrequencyRange
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::CancelSetFrequency()
+    {
+    STUB.iFrequency = STUB.iPreviousFrequency;
+    STUB.iPreviousFrequency = 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::GetFrequency
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetFrequency(
+    TInt& aFrequency ) const
+    {
+    aFrequency = STUB.iFrequency;
+    return STUB.iGetFrequencyError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::StationSeek
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::StationSeek(
+    TBool aUpwards )
+    {
+#ifdef _DEBUG
+    RDebug::Print(_L("CRadioFmTunerUtility::CBody::StationSeek, aUpwards = %d"), aUpwards);
+#endif
+    STUB.iStationSeekUpwards = aUpwards;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::CancelStationSeek
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioFmTunerUtility::CBody::CancelStationSeek()
+    {
+    STUB.iStationSeekUpwards = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::GetSignalStrength
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetSignalStrength(
+    TInt& aSignalStrength ) const
+    {
+    aSignalStrength = STUB.iSignalStrength;
+    return STUB.iGetSignalStrengthError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::GetMaxSignalStrength
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetMaxSignalStrength(
+    TInt& aMaxSignalStrength ) const
+    {
+    aMaxSignalStrength = STUB.iMaxSignalStrength;
+    return STUB.iGetMaxSignalStrengthError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::GetStereoMode
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetStereoMode(
+    TBool& aStereo ) const
+    {
+    aStereo = STUB.iStereoMode;
+    return STUB.iGetStereoModeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::ForceMonoReception
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::ForceMonoReception(
+    TBool aForcedMono)
+    {
+    STUB.iForcedMono = aForcedMono;
+    return STUB.iForcedMonoReceptionError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::GetForcedMonoReception
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetForcedMonoReception(
+    TBool& aForcedMono ) const
+    {
+    aForcedMono = STUB.iForcedMono;
+    return STUB.iGetForcedMonoReceptionError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::SetSquelch
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::SetSquelch(
+    TBool aSquelch )
+    {
+    STUB.iSquelch = aSquelch;
+    return STUB.iSetSquelchError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioFmTunerUtility::CBody::GetSquelch
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioFmTunerUtility::CBody::GetSquelch(
+    TBool& aSquelch ) const
+    {
+    aSquelch = STUB.iSquelch;
+    return STUB.iGetSquelchError.Error();
+    }
+
+// End of File
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/src/StubRadioPlayerUtilityBody.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2007 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:  Radio Player Utility body's stub implementation
+*
+*/
+
+
+#include <custominterfaceutility.h>
+#include "RadioServerData.h"
+#include "RadioPlayerUtilityBody.h"
+#include "RadioSession.h"
+#include "RadioStubManager.h"
+
+#define STUB  CRadioStubManager::GetRadioStubManager()->iPlayer
+
+// ======== MEMBER FUNCTIONS ========
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+
+CRadioPlayerUtility::CBody* CRadioPlayerUtility::CBody::NewL(
+    RRadioSession& aRadioSession,
+    MRadioPlayerObserver& aObserver )
+    {
+    if ( STUB.iLeaveNewL.iError )
+        {
+        User::Leave( STUB.iLeaveNewL.iError );
+        }
+    CRadioPlayerUtility::CBody* s = new(ELeave) CRadioPlayerUtility::CBody( aRadioSession, aObserver);
+    CleanupStack::PushL(s);
+    s->ConstructL();
+    CleanupStack::Pop();
+    return s;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::ConstructL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+void CRadioPlayerUtility::CBody::ConstructL()
+    {
+    if ( STUB.iLeaveErrorForConstructL.iError )
+        {
+        User::Leave( STUB.iLeaveErrorForConstructL.iError );
+        }
+    STUB.iRadioPlayerUtilityClient = &iRadioPlayerUtilityClient;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::CBody
+// -----------------------------------------------------------------------------
+//
+CRadioPlayerUtility::CBody::CBody( 
+        RRadioSession& aRadioSession,
+        MRadioPlayerObserver& aObserver )
+    :iRadioSession( aRadioSession ),
+    iRadioPlayerUtilityClient( aObserver )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CRadioPlayerUtility::CBody::~CBody()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::PlayerState
+// Get the player's state.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+//
+void CRadioPlayerUtility::CBody::PlayerState(
+    TPlayerState& aPlayerState ) const
+    {
+    aPlayerState = STUB.iPlayerState;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::Close
+// Stops radio playback only if no other primary clients are connected to the
+// radio server.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioPlayerUtility::CBody::Close()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::Play
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioPlayerUtility::CBody::Play()
+    {
+    STUB.iPlayerState = ERadioPlayerPlaying;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::Stop
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioPlayerUtility::CBody::Stop()
+    {
+    STUB.iPlayerState = ERadioPlayerIdle;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::Mute
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioPlayerUtility::CBody::Mute(
+    TBool aMute )
+    {
+    STUB.iMuteStatus = aMute;
+    return STUB.iMuteError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::IsMute
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool CRadioPlayerUtility::CBody::IsMute()
+    {
+    return STUB.iMuteStatus;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::SetVolume
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioPlayerUtility::CBody::SetVolume(
+    TInt aVolume )
+    {
+    STUB.iVolume = aVolume;
+    return STUB.iSetVolumeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::GetVolume
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioPlayerUtility::CBody::GetVolume(
+    TInt& aVolume ) const
+    {
+    aVolume = STUB.iVolume;
+    return STUB.iGetVolumeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::SetVolumeRamp
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioPlayerUtility::CBody::SetVolumeRamp(
+    const TTimeIntervalMicroSeconds& aRampInterval )
+    {
+#ifdef _DEBUG
+    RDebug::Print(_L("CRadioPlayerUtility::CBody::SetVolumeRamp"));
+#endif
+    STUB.iRampInterval = aRampInterval;
+    return STUB.iSetVolumeRampError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::GetMaxVolume
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioPlayerUtility::CBody::GetMaxVolume(
+    TInt& aMaxVolume ) const
+    {
+    aMaxVolume = STUB.iMaxVolume;
+    return STUB.iGetMaxVolumeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::SetBalance
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioPlayerUtility::CBody::SetBalance(
+    TInt aLeftPercentage,
+    TInt aRightPercentage )
+    {
+#ifdef _DEBUG
+    RDebug::Print(_L("CRadioPlayerUtility::CBody::SetBalance, aLeftPercentage = %d, aRightPercentage = %d"),
+        aLeftPercentage, aRightPercentage);
+#endif
+    STUB.iLeftPercentage = aLeftPercentage;
+    STUB.iRightPercentage = aRightPercentage;
+    return STUB.iSetBalanceError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::GetBalance
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioPlayerUtility::CBody::GetBalance(
+    TInt& aLeftPercentage,
+    TInt& aRightPercentage ) const
+    {
+    aLeftPercentage = STUB.iLeftPercentage;
+    aRightPercentage = STUB.iRightPercentage;
+    return STUB.iGetBalanceError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioPlayerUtility::CBody::CustomInterface
+// Get a custom interface for the specified interface Id.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TAny* CRadioPlayerUtility::CBody::CustomInterface(
+    TUid aInterfaceId )
+    {
+//    TAny* ci = NULL;
+//    return ci;
+#ifdef _DEBUG
+    RDebug::Print(_L("CRadioPlayerUtility::CBody::CustomInterface, aInterfaceId = %d"), aInterfaceId);
+#endif
+    TAny* ci = NULL;
+    CCustomInterfaceUtility* customInterfaceUtil = NULL;
+
+    TRAPD( error, customInterfaceUtil = CCustomInterfaceUtility::NewL( iRadioSession ) );
+
+    if ( !error )
+        {
+        ci = customInterfaceUtil->CustomInterface( aInterfaceId );
+        if ( !ci )
+            {
+            // The custom interface utility is owned by the custom interface, implicitly.
+            // The custom interface utility instance is destroyed when the
+            // custom interface is finally destroyed!
+            // But if there's no valid ci, we need to take care of deleting the
+            // custom interface utility instance.
+            delete customInterfaceUtil;
+            }
+        }
+    return ci;
+    }
+
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radio_utility/stub/src/StubRadioRdsUtilityBody.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,433 @@
+/*
+* Copyright (c) 2007 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:  Radio RDS Utility body's stub implementation
+*
+*/
+
+
+#include "RadioRdsUtilityBody.h"
+#include "RadioServerData.h"
+#include "RadioSession.h"
+#include "RadioStubManager.h"
+
+#define STUB  CRadioStubManager::GetRadioStubManager()->iRds
+
+// ======== MEMBER FUNCTIONS ========
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CRadioRdsUtility::CBody* CRadioRdsUtility::CBody::NewL(
+    RRadioSession& aRadioSession,
+    MRadioRdsObserver& aObserver )
+    {
+    if ( STUB.iLeaveNewL.iError )
+        {
+        User::Leave( STUB.iLeaveNewL.iError );
+        }
+    CRadioRdsUtility::CBody* s = new(ELeave) CRadioRdsUtility::CBody( aRadioSession, aObserver );
+    CleanupStack::PushL(s);
+    s->ConstructL();
+    CleanupStack::Pop();
+    return s;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::ConstructL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::ConstructL()
+    {
+    if ( STUB.iLeaveErrorForConstructL.iError )
+        {
+        User::Leave( STUB.iLeaveErrorForConstructL.iError );
+        }
+    STUB.iRadioRdsUtilityClient = &iRadioRdsUtilityClient;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CBody
+// -----------------------------------------------------------------------------
+//
+CRadioRdsUtility::CBody::CBody(
+        RRadioSession& aRadioSession,
+        MRadioRdsObserver& aObserver )
+    : iRadioSession(aRadioSession),
+    iRadioRdsUtilityClient(aObserver)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CRadioRdsUtility::CBody::~CBody()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::Close
+// Cancel all requested RDS notifications if any were requested.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::Close()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetCapabilities
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetCapabilities(
+    TRdsCapabilities& aCaps ) const
+    {
+    if ( !STUB.iGetCapabilitiesError.Error() )
+        {
+        aCaps.iRdsFunctions = STUB.iCaps.iRdsFunctions;
+        aCaps.iAdditionalFunctions1 = STUB.iCaps.iAdditionalFunctions1;
+        aCaps.iAdditionalFunctions2 = STUB.iCaps.iAdditionalFunctions2;
+        }
+    return STUB.iGetCapabilitiesError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetRdsSignalStatus
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetRdsSignalStatus(
+    TBool& aRdsSignal ) const
+    {
+    aRdsSignal = STUB.iRdsSignal;
+    return STUB.iGetRdsSignalStatusError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::NotifyRdsDataChange
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::NotifyRdsDataChange(
+    TRdsData aRdsData )
+    {
+    iRdsDataReq.iRdsFunctions = aRdsData.iRdsFunctions;
+    iRdsDataReq.iAdditionalFunctions1 = aRdsData.iAdditionalFunctions1;
+    iRdsDataReq.iAdditionalFunctions2 = aRdsData.iAdditionalFunctions2;
+    return STUB.iNotifyRdsDataChangeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CancelNotifyRdsDataChange
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::CancelNotifyRdsDataChange()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::SetAutomaticSwitching
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::SetAutomaticSwitching(
+    TBool aAuto )
+    {
+    STUB.iAutomaticSwitching = aAuto;
+    return STUB.iSetAutomaticSwitchingError.Error();
+
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetAutomaticSwitching
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetAutomaticSwitching(
+    TBool& aAuto )
+    {
+    aAuto = STUB.iAutomaticSwitching;
+    return STUB.iGetAutomaticSwitchingError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CancelAFSearch
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::CancelAFSearch()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::SetAutomaticTrafficAnnouncement
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::SetAutomaticTrafficAnnouncement(
+    TBool aAuto )
+    {
+    STUB.iTaStatus = aAuto;
+    return STUB.iSetAutomaticTrafficAnnouncementError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetAutomaticTrafficAnnouncement
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetAutomaticTrafficAnnouncement(
+    TBool& aAuto )
+    {
+    aAuto = STUB.iTaStatus;
+    return STUB.iGetAutomaticTrafficAnnouncementError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::StationSeekByPTY
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::StationSeekByPTY(
+    TRdsProgrammeType /*aPty*/,
+    TBool /*aUpwards*/ )
+    {
+    iRadioRdsUtilityClient.MrroStationSeekByPTYComplete( 
+            STUB.iStationSeekByPTYError.Error(), STUB.iFrequency );
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::StationSeekByTA
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::StationSeekByTA(
+    TBool /*aSeekUp*/ )
+    {
+    iRadioRdsUtilityClient.MrroStationSeekByTAComplete( STUB.iStationSeekByTAError.Error(), STUB.iFrequency );
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::StationSeekByTP
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::StationSeekByTP(
+    TBool /*aSeekUp*/ )
+    {
+    iRadioRdsUtilityClient.MrroStationSeekByTPComplete( STUB.iStationSeekByTPError.Error(), STUB.iFrequency );
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CancelRdsStationSeek
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::CancelRdsStationSeek()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetFreqByPTY
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::GetFreqByPTY(
+    TRdsProgrammeType /*aPty*/ )
+    {
+    iRadioRdsUtilityClient.MrroGetFreqByPTYComplete( STUB.iGetFreqByPTYError.Error(), STUB.iFreqList );
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CancelGetFreqByPTY
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::CancelGetFreqByPTY()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetFreqByTA
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::GetFreqByTA()
+    {
+    iRadioRdsUtilityClient.MrroGetFreqByTAComplete( STUB.iGetFreqByTAError.Error(), STUB.iFreqList );
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CancelGetFreqByTA
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::CancelGetFreqByTA()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetPSByPTY
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::GetPSByPTY(
+    TRdsProgrammeType /*aPty*/ )
+    {
+    iRadioRdsUtilityClient.MrroGetPSByPTYComplete( STUB.iGetPSByPTYError.Error(), STUB.iPsList );
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CancelGetPSByPTY
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::CancelGetPSByPTY()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetPSByTA
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::GetPSByTA()
+    {
+    iRadioRdsUtilityClient.MrroGetPSByPTYComplete( STUB.iGetPSByTAError.Error(), STUB.iPsList );
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::CancelGetPSByTA
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CRadioRdsUtility::CBody::CancelGetPSByTA()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetProgrammeIdentification
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetProgrammeIdentification(
+    TInt& /*aPi*/ )
+    {
+    return STUB.iGetProgrammeIdentificationError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetProgrammeType
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetProgrammeType(
+    TRdsProgrammeType& /*aPty*/ )
+    {
+    return STUB.iGetProgrammeTypeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetProgrammeService
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetProgrammeService(
+    TRdsPSName& aPs )
+    {
+    if ( STUB.iPs.Length() )
+        {
+        aPs.Copy( STUB.iPs );
+        }
+
+    return STUB.iGetProgrammeServiceError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetRadioText
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetRadioText(
+    TRdsRadioText& aRt )
+    {
+    if ( STUB.iRtPlusData.Length() )
+       {
+       aRt.Copy( STUB.iRtPlusData );
+       }
+
+    return STUB.iGetRadioTextError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetRadioTextPlus
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetRadioTextPlus(
+    TRdsRTplusClass /*aRtPlusClass*/,
+    TRdsRadioText& aRtPlusData )
+    {
+
+    if ( STUB.iRtPlusData.Length() )
+        {
+        aRtPlusData.Copy( STUB.iRtPlusData );
+        }
+
+    return STUB.iGetRadioTextPlusError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetClockTime
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetClockTime(
+    TDateTime& aCt )
+    {
+    aCt = STUB.iCt;
+    return STUB.iGetClockTimeError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetTrafficAnnouncementStatus
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetTrafficAnnouncementStatus(
+    TBool& aTaStatus )
+    {
+    STUB.iTaStatus = aTaStatus;
+    return STUB.iGetTrafficAnnouncementStatusError.Error();
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioRdsUtility::CBody::GetTrafficProgrammeStatus
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CRadioRdsUtility::CBody::GetTrafficProgrammeStatus(
+    TBool& aTpStatus )
+    {
+    aTpStatus = STUB.iTpStatus;
+    return STUB.iGetTrafficProgrammeStatusError.Error();
+    }
+
+
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radioserver/Session/stub/bwins/RadioSession_Stubu.def	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,71 @@
+EXPORTS
+	?CustomCommandAsync@RRadioSession@@UAEXABV?$TPckgBuf@VTMMFMessageDestination@@@@HABVTDesC8@@1AAVTRequestStatus@@@Z @ 1 NONAME ; void RRadioSession::CustomCommandAsync(class TPckgBuf<class TMMFMessageDestination> const &, int, class TDesC8 const &, class TDesC8 const &, class TRequestStatus &)
+	?StationSeekByTP@RRadioSession@@QAEXH@Z @ 2 NONAME ; void RRadioSession::StationSeekByTP(int)
+	?SetSquelch@RRadioSession@@QAEHH@Z @ 3 NONAME ; int RRadioSession::SetSquelch(int)
+	?CustomCommandAsync@RRadioSession@@UAEXABV?$TPckgBuf@VTMMFMessageDestination@@@@HABVTDesC8@@1AAVTDes8@@AAVTRequestStatus@@@Z @ 4 NONAME ; void RRadioSession::CustomCommandAsync(class TPckgBuf<class TMMFMessageDestination> const &, int, class TDesC8 const &, class TDesC8 const &, class TDes8 &, class TRequestStatus &)
+	?NotifyRadioTextPlusChange@RRadioSession@@QAEHAAV?$RArray@H@@@Z @ 5 NONAME ; int RRadioSession::NotifyRadioTextPlusChange(class RArray<int> &)
+	?CancelGetPSByTA@RRadioSession@@QAEXXZ @ 6 NONAME ; void RRadioSession::CancelGetPSByTA(void)
+	?NotifyRdsDataChange@RRadioSession@@QAEHVTRsRdsData@@@Z @ 7 NONAME ; int RRadioSession::NotifyRdsDataChange(class TRsRdsData)
+	?CancelGetFreqByTA@RRadioSession@@QAEXXZ @ 8 NONAME ; void RRadioSession::CancelGetFreqByTA(void)
+	?Connect@RRadioSession@@QAEHAAVMRadioObserver@@H@Z @ 9 NONAME ; int RRadioSession::Connect(class MRadioObserver &, int)
+	?GetTrafficAnnouncementStatus@RRadioSession@@QAEHAAH@Z @ 10 NONAME ; int RRadioSession::GetTrafficAnnouncementStatus(int &)
+	?GetAutomaticSwitching@RRadioSession@@QAEHAAH@Z @ 11 NONAME ; int RRadioSession::GetAutomaticSwitching(int &)
+	?CancelGetFreqByPTY@RRadioSession@@QAEXXZ @ 12 NONAME ; void RRadioSession::CancelGetFreqByPTY(void)
+	?GetMuteStatus@RRadioSession@@QBEHAAH@Z @ 13 NONAME ; int RRadioSession::GetMuteStatus(int &) const
+	?StationSeekByTA@RRadioSession@@QAEXH@Z @ 14 NONAME ; void RRadioSession::StationSeekByTA(int)
+	?SetVolume@RRadioSession@@QAEHH@Z @ 15 NONAME ; int RRadioSession::SetVolume(int)
+	?GetMaxSignalStrength@RRadioSession@@QBEHAAH@Z @ 16 NONAME ; int RRadioSession::GetMaxSignalStrength(int &) const
+	?GetForceMonoReception@RRadioSession@@QBEHAAH@Z @ 17 NONAME ; int RRadioSession::GetForceMonoReception(int &) const
+	?GetProgrammeType@RRadioSession@@QAEHAAH@Z @ 18 NONAME ; int RRadioSession::GetProgrammeType(int &)
+	?GetTrafficProgrammeStatus@RRadioSession@@QAEHAAH@Z @ 19 NONAME ; int RRadioSession::GetTrafficProgrammeStatus(int &)
+	?GetFrequencyRange@RRadioSession@@QBEHAAW4TRsFrequencyRange@@AAH1@Z @ 20 NONAME ; int RRadioSession::GetFrequencyRange(enum TRsFrequencyRange &, int &, int &) const
+	?SetAutomaticSwitching@RRadioSession@@QAEHH@Z @ 21 NONAME ; int RRadioSession::SetAutomaticSwitching(int)
+	?GetAutomaticTrafficAnnouncement@RRadioSession@@QAEHAAH@Z @ 22 NONAME ; int RRadioSession::GetAutomaticTrafficAnnouncement(int &)
+	?GetStereoMode@RRadioSession@@QBEHAAH@Z @ 23 NONAME ; int RRadioSession::GetStereoMode(int &) const
+	?CancelRdsStationSeek@RRadioSession@@QAEXXZ @ 24 NONAME ; void RRadioSession::CancelRdsStationSeek(void)
+	?ForceMonoReception@RRadioSession@@QAEHH@Z @ 25 NONAME ; int RRadioSession::ForceMonoReception(int)
+	?CustomCommandSync@RRadioSession@@UAEHABV?$TPckgBuf@VTMMFMessageDestination@@@@HABVTDesC8@@1@Z @ 26 NONAME ; int RRadioSession::CustomCommandSync(class TPckgBuf<class TMMFMessageDestination> const &, int, class TDesC8 const &, class TDesC8 const &)
+	?GetRdsSignalStatus@RRadioSession@@QBEHAAH@Z @ 27 NONAME ; int RRadioSession::GetRdsSignalStatus(int &) const
+	?GetFrequency@RRadioSession@@QBEHAAH@Z @ 28 NONAME ; int RRadioSession::GetFrequency(int &) const
+	?RequestTunerControl@RRadioSession@@QAEXW4TRsTuner@@@Z @ 29 NONAME ; void RRadioSession::RequestTunerControl(enum TRsTuner)
+	?GetPSByTA@RRadioSession@@QAEXXZ @ 30 NONAME ; void RRadioSession::GetPSByTA(void)
+	?GetRadioTextPlus@RRadioSession@@QAEHW4TRsRdsRTplusClass@@AAV?$TBuf16@$0EA@@@@Z @ 31 NONAME ; int RRadioSession::GetRadioTextPlus(enum TRsRdsRTplusClass, class TBuf16<64> &)
+	?StationSeekByPTY@RRadioSession@@QAEXHH@Z @ 32 NONAME ; void RRadioSession::StationSeekByPTY(int, int)
+	?CancelSetFrequencyRange@RRadioSession@@QAEXXZ @ 33 NONAME ; void RRadioSession::CancelSetFrequencyRange(void)
+	?GetSquelch@RRadioSession@@QBEHAAH@Z @ 34 NONAME ; int RRadioSession::GetSquelch(int &) const
+	?Play@RRadioSession@@QAEXXZ @ 35 NONAME ; void RRadioSession::Play(void)
+	?StationSeek@RRadioSession@@QAEXH@Z @ 36 NONAME ; void RRadioSession::StationSeek(int)
+	?GetVolume@RRadioSession@@QBEHAAH@Z @ 37 NONAME ; int RRadioSession::GetVolume(int &) const
+	?PlayerState@RRadioSession@@QBEHAAW4TRsPlayerState@@@Z @ 38 NONAME ; int RRadioSession::PlayerState(enum TRsPlayerState &) const
+	?CancelNotifyRdsDataChange@RRadioSession@@QAEXXZ @ 39 NONAME ; void RRadioSession::CancelNotifyRdsDataChange(void)
+	?SetBalance@RRadioSession@@QAEHHH@Z @ 40 NONAME ; int RRadioSession::SetBalance(int, int)
+	?SetVolumeRamp@RRadioSession@@QAEHABVTTimeIntervalMicroSeconds@@@Z @ 41 NONAME ; int RRadioSession::SetVolumeRamp(class TTimeIntervalMicroSeconds const &)
+	?GetRdsCapabilities@RRadioSession@@QBEHAAVTRsRdsCapabilities@@@Z @ 42 NONAME ; int RRadioSession::GetRdsCapabilities(class TRsRdsCapabilities &) const
+	?GetProgrammeService@RRadioSession@@QAEHAAV?$TBuf16@$07@@@Z @ 43 NONAME ; int RRadioSession::GetProgrammeService(class TBuf16<8> &)
+	?GetSignalStrength@RRadioSession@@QBEHAAH@Z @ 44 NONAME ; int RRadioSession::GetSignalStrength(int &) const
+	?GetFreqByPTY@RRadioSession@@QAEXH@Z @ 45 NONAME ; void RRadioSession::GetFreqByPTY(int)
+	?CancelAFSearch@RRadioSession@@QAEXXZ @ 46 NONAME ; void RRadioSession::CancelAFSearch(void)
+	?GetBalance@RRadioSession@@QBEHAAH0@Z @ 47 NONAME ; int RRadioSession::GetBalance(int &, int &) const
+	?GetRadioText@RRadioSession@@QAEHAAV?$TBuf16@$0EA@@@@Z @ 48 NONAME ; int RRadioSession::GetRadioText(class TBuf16<64> &)
+	?Stop@RRadioSession@@QAEXH@Z @ 49 NONAME ; void RRadioSession::Stop(int)
+	?Close@RRadioSession@@QAEXXZ @ 50 NONAME ; void RRadioSession::Close(void)
+	?CancelStationSeek@RRadioSession@@QAEXXZ @ 51 NONAME ; void RRadioSession::CancelStationSeek(void)
+	?EnableTunerInOfflineMode@RRadioSession@@QAEHH@Z @ 52 NONAME ; int RRadioSession::EnableTunerInOfflineMode(int)
+	?CancelSetFrequency@RRadioSession@@QAEXXZ @ 53 NONAME ; void RRadioSession::CancelSetFrequency(void)
+	?GetPSByPTY@RRadioSession@@QAEXH@Z @ 54 NONAME ; void RRadioSession::GetPSByPTY(int)
+	?GetProgrammeIdentification@RRadioSession@@QAEHAAH@Z @ 55 NONAME ; int RRadioSession::GetProgrammeIdentification(int &)
+	?CustomCommandSync@RRadioSession@@UAEHABV?$TPckgBuf@VTMMFMessageDestination@@@@HABVTDesC8@@1AAVTDes8@@@Z @ 56 NONAME ; int RRadioSession::CustomCommandSync(class TPckgBuf<class TMMFMessageDestination> const &, int, class TDesC8 const &, class TDesC8 const &, class TDes8 &)
+	?CancelGetPSByPTY@RRadioSession@@QAEXXZ @ 57 NONAME ; void RRadioSession::CancelGetPSByPTY(void)
+	?Mute@RRadioSession@@QAEHH@Z @ 58 NONAME ; int RRadioSession::Mute(int)
+	?GetMaxVolume@RRadioSession@@QBEHAAH@Z @ 59 NONAME ; int RRadioSession::GetMaxVolume(int &) const
+	?CancelNotifyRadioTextPlusChange@RRadioSession@@QAEXXZ @ 60 NONAME ; void RRadioSession::CancelNotifyRadioTextPlusChange(void)
+	?GetFreqByTA@RRadioSession@@QAEXXZ @ 61 NONAME ; void RRadioSession::GetFreqByTA(void)
+	?Version@RRadioSession@@QBE?AVTVersion@@XZ @ 62 NONAME ; class TVersion RRadioSession::Version(void) const
+	??0RRadioSession@@QAE@XZ @ 63 NONAME ; RRadioSession::RRadioSession(void)
+	?SetFrequency@RRadioSession@@QAEXH@Z @ 64 NONAME ; void RRadioSession::SetFrequency(int)
+	?SetAutomaticTrafficAnnouncement@RRadioSession@@QAEHH@Z @ 65 NONAME ; int RRadioSession::SetAutomaticTrafficAnnouncement(int)
+	?GetTunerCapabilities@RRadioSession@@QBEHAAVTRsTunerCapabilities@@@Z @ 66 NONAME ; int RRadioSession::GetTunerCapabilities(class TRsTunerCapabilities &) const
+	?SetFrequencyRange@RRadioSession@@QAEXW4TRsFrequencyRange@@@Z @ 67 NONAME ; void RRadioSession::SetFrequencyRange(enum TRsFrequencyRange)
+	?GetClockTime@RRadioSession@@QAEHAAVTDateTime@@@Z @ 68 NONAME ; int RRadioSession::GetClockTime(class TDateTime &)
+	?NewL@RRadioSession@@SAPAV1@XZ @ 69 NONAME ; class RRadioSession * RRadioSession::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radioserver/Session/stub/eabi/RadioSession_Stubu.def	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,78 @@
+EXPORTS
+	_ZN13RRadioSession10GetPSByPTYEi @ 1 NONAME
+	_ZN13RRadioSession10SetBalanceEii @ 2 NONAME
+	_ZN13RRadioSession10SetSquelchEi @ 3 NONAME
+	_ZN13RRadioSession11GetFreqByTAEv @ 4 NONAME
+	_ZN13RRadioSession11StationSeekEi @ 5 NONAME
+	_ZN13RRadioSession12GetClockTimeER9TDateTime @ 6 NONAME
+	_ZN13RRadioSession12GetFreqByPTYEi @ 7 NONAME
+	_ZN13RRadioSession12GetRadioTextER6TBuf16ILi64EE @ 8 NONAME
+	_ZN13RRadioSession12SetFrequencyEi @ 9 NONAME
+	_ZN13RRadioSession13SetVolumeRampERK25TTimeIntervalMicroSeconds @ 10 NONAME
+	_ZN13RRadioSession14CancelAFSearchEv @ 11 NONAME
+	_ZN13RRadioSession15CancelGetPSByTAEv @ 12 NONAME
+	_ZN13RRadioSession15StationSeekByTAEi @ 13 NONAME
+	_ZN13RRadioSession15StationSeekByTPEi @ 14 NONAME
+	_ZN13RRadioSession16CancelGetPSByPTYEv @ 15 NONAME
+	_ZN13RRadioSession16GetProgrammeTypeERi @ 16 NONAME
+	_ZN13RRadioSession16GetRadioTextPlusE17TRsRdsRTplusClassR6TBuf16ILi64EE @ 17 NONAME
+	_ZN13RRadioSession16StationSeekByPTYEii @ 18 NONAME
+	_ZN13RRadioSession17CancelGetFreqByTAEv @ 19 NONAME
+	_ZN13RRadioSession17CancelStationSeekEv @ 20 NONAME
+	_ZN13RRadioSession17CustomCommandSyncERK8TPckgBufI22TMMFMessageDestinationEiRK6TDesC8S7_ @ 21 NONAME
+	_ZN13RRadioSession17CustomCommandSyncERK8TPckgBufI22TMMFMessageDestinationEiRK6TDesC8S7_R5TDes8 @ 22 NONAME
+	_ZN13RRadioSession17SetFrequencyRangeE17TRsFrequencyRange @ 23 NONAME
+	_ZN13RRadioSession18CancelGetFreqByPTYEv @ 24 NONAME
+	_ZN13RRadioSession18CancelSetFrequencyEv @ 25 NONAME
+	_ZN13RRadioSession18CustomCommandAsyncERK8TPckgBufI22TMMFMessageDestinationEiRK6TDesC8S7_R14TRequestStatus @ 26 NONAME
+	_ZN13RRadioSession18CustomCommandAsyncERK8TPckgBufI22TMMFMessageDestinationEiRK6TDesC8S7_R5TDes8R14TRequestStatus @ 27 NONAME
+	_ZN13RRadioSession18ForceMonoReceptionEi @ 28 NONAME
+	_ZN13RRadioSession19GetProgrammeServiceER6TBuf16ILi8EE @ 29 NONAME
+	_ZN13RRadioSession19NotifyRdsDataChangeE10TRsRdsData @ 30 NONAME
+	_ZN13RRadioSession19RequestTunerControlE8TRsTuner @ 31 NONAME
+	_ZN13RRadioSession20CancelRdsStationSeekEv @ 32 NONAME
+	_ZN13RRadioSession21GetAutomaticSwitchingERi @ 33 NONAME
+	_ZN13RRadioSession21SetAutomaticSwitchingEi @ 34 NONAME
+	_ZN13RRadioSession23CancelSetFrequencyRangeEv @ 35 NONAME
+	_ZN13RRadioSession24EnableTunerInOfflineModeEi @ 36 NONAME
+	_ZN13RRadioSession25CancelNotifyRdsDataChangeEv @ 37 NONAME
+	_ZN13RRadioSession25GetTrafficProgrammeStatusERi @ 38 NONAME
+	_ZN13RRadioSession25NotifyRadioTextPlusChangeER6RArrayIiE @ 39 NONAME
+	_ZN13RRadioSession26GetProgrammeIdentificationERi @ 40 NONAME
+	_ZN13RRadioSession28GetTrafficAnnouncementStatusERi @ 41 NONAME
+	_ZN13RRadioSession31CancelNotifyRadioTextPlusChangeEv @ 42 NONAME
+	_ZN13RRadioSession31GetAutomaticTrafficAnnouncementERi @ 43 NONAME
+	_ZN13RRadioSession31SetAutomaticTrafficAnnouncementEi @ 44 NONAME
+	_ZN13RRadioSession4MuteEi @ 45 NONAME
+	_ZN13RRadioSession4PlayEv @ 46 NONAME
+	_ZN13RRadioSession4StopEi @ 47 NONAME
+	_ZN13RRadioSession5CloseEv @ 48 NONAME
+	_ZN13RRadioSession7ConnectER14MRadioObserveri @ 49 NONAME
+	_ZN13RRadioSession9GetPSByTAEv @ 50 NONAME
+	_ZN13RRadioSession9SetVolumeEi @ 51 NONAME
+	_ZN13RRadioSessionC1Ev @ 52 NONAME
+	_ZN13RRadioSessionC2Ev @ 53 NONAME
+	_ZNK13RRadioSession10GetBalanceERiS0_ @ 54 NONAME
+	_ZNK13RRadioSession10GetSquelchERi @ 55 NONAME
+	_ZNK13RRadioSession11PlayerStateER14TRsPlayerState @ 56 NONAME
+	_ZNK13RRadioSession12GetFrequencyERi @ 57 NONAME
+	_ZNK13RRadioSession12GetMaxVolumeERi @ 58 NONAME
+	_ZNK13RRadioSession13GetMuteStatusERi @ 59 NONAME
+	_ZNK13RRadioSession13GetStereoModeERi @ 60 NONAME
+	_ZNK13RRadioSession17GetFrequencyRangeER17TRsFrequencyRangeRiS2_ @ 61 NONAME
+	_ZNK13RRadioSession17GetSignalStrengthERi @ 62 NONAME
+	_ZNK13RRadioSession18GetRdsCapabilitiesER18TRsRdsCapabilities @ 63 NONAME
+	_ZNK13RRadioSession18GetRdsSignalStatusERi @ 64 NONAME
+	_ZNK13RRadioSession20GetMaxSignalStrengthERi @ 65 NONAME
+	_ZNK13RRadioSession20GetTunerCapabilitiesER20TRsTunerCapabilities @ 66 NONAME
+	_ZNK13RRadioSession21GetForceMonoReceptionERi @ 67 NONAME
+	_ZNK13RRadioSession7VersionEv @ 68 NONAME
+	_ZNK13RRadioSession9GetVolumeERi @ 69 NONAME
+	_ZTI13CRadioRequest @ 70 NONAME
+	_ZTI13RRadioSession @ 71 NONAME
+	_ZTI18CRadioEventHandler @ 72 NONAME
+	_ZTV13CRadioRequest @ 73 NONAME
+	_ZTV13RRadioSession @ 74 NONAME
+	_ZTV18CRadioEventHandler @ 75 NONAME
+	_ZN13RRadioSession4NewLEv @ 76 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radioserver/Session/stub/group/RadioSession_Stub.mmp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2002-2004 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:  Project file for RadioSession Stub for Radio unit tests
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET		RadioSession_Stub.dll
+CAPABILITY	CAP_CLIENT_DLL
+TARGETTYPE	DLL
+UID		0x1000008d 0x01000031
+VENDORID	VID_DEFAULT
+VERSION 10.1
+
+SOURCEPATH	../../Src
+SOURCE		RadioRequest.cpp
+SOURCE		RadioEventHandler.cpp
+
+SOURCEPATH ../src
+SOURCE StubRadioSession.cpp
+
+USERINCLUDE ../Src
+USERINCLUDE	../../Src
+USERINCLUDE	../../../Inc
+USERINCLUDE	../../../../inc
+USERINCLUDE /sf/mw/mmmw/mmserv/radioutility/radio_utility/stub/src
+USERINCLUDE             /sf/mw/mmmw/mmserv/radioutility/radio_utility/stub/src
+USERINCLUDE             /sf/mw/mmmw/mmserv/radioutility/radio_utility/src
+USERINCLUDE             /sf/mw/mmmw/mmserv/radioutility/inc
+USERINCLUDE             /sf/mw/mmmw/mmserv/inc
+USERINCLUDE             /sf/mw/mmmw/inc
+USERINCLUDE /sf/app/radio/radioengine/utils/inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY		euser.lib
+LIBRARY		MmfControllerFramework.lib
+LIBRARY     flogger.lib
+MACRO STUB_CONSTELLATION
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radioserver/Session/stub/group/bld.inf	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2002-2004 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:  Project build file for RadioSession's stub
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../src/RadioStubManager.h /epoc32/include/RadioStubManager.h
+
+
+PRJ_MMPFILES
+RadioSession_Stub.mmp
+
+
+//  End of File  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radioserver/Session/stub/src/RadioStubManager.h	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* Copyright (c) 2002-2004 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 RADIOSTUBMANAGER_H_
+#define RADIOSTUBMANAGER_H_
+#include <e32std.h>
+#include <e32base.h>
+
+#include <RadioFmTunerUtility.h>
+#include <RadioPlayerUtility.h>
+#include <RadioRdsUtility.h>
+#include <remconcallhandlingtargetobserver.h>
+#include <remconcoreapitargetobserver.h>
+
+#include "RadioServerData.h"
+#include "mradioheadseteventobserver.h"
+#include "RadioStubManager.h"
+
+_LIT(KRadioStubManagerLocalChunkName, "RadioStubManagerLocalChunkName");
+
+struct TStubError
+    {
+
+    void SetStubError( TFmRadioTunerError aError, TUint aFailCounter = 1, TBool aFailForEver = EFalse ) 
+        {
+        iError = aError;
+        iFailCounter = aFailCounter;
+        iFailForEver = aFailForEver; };
+    TInt Error() 
+        {
+        TInt aError (iError);
+        if (iFailCounter)
+            {
+            --iFailCounter;
+            }
+        else if (iFailForEver)
+            {
+            }
+        else
+            {
+            aError = KErrNone;
+            }            
+        return aError;
+        }
+    TFmRadioTunerError iError;
+    TUint iFailCounter;
+    TBool iFailForEver;
+    };
+
+struct TLeaveError
+    {
+    void Set( TInt aError = KErrGeneral );
+    TInt iError;
+    };
+
+struct SRadioStubManager
+    {
+public:
+    void  FillZ() 
+        { 
+        Mem::FillZ( this, sizeof( SRadioStubManager ) ); 
+        }
+public:
+    enum TCenRepDbs
+        {
+        // Redefine CenRep databases for test purposes.
+        // Original constant names are got by eliminating leading "ESub_"-prefix.
+        EStub_KPSUidCtsyCallInformation = 0x01001001,
+        EStub_KUidSystemCategory = 0x01001002,
+        EStub_KPSUidVoiceUiAccMonitor = 0x01001003,
+        EStub_KPSUidMMFAudioServer = 0x01001004,    
+        EStub_KRadioPSUid = 0x01001005,
+        EStub_KRadioServerPropertyCategory = 0x01001006
+        };
+    
+    struct TRemConTargetData
+    {
+    TLeaveError iLeaveNewL;
+    TLeaveError iLeaveConstructL;
+    
+    
+    MRemConCoreApiTargetObserver*   iRemConCoreApiTargetObserver;
+    MRemConCallHandlingTargetObserver*  iRemConCallHandlingTargetObserver;
+    } mutable iRemConTarget;
+    
+    struct TAccessoryObserverData
+    {
+    TLeaveError iLeaveNewL;
+    TLeaveError iLeaveIsHeadsetConnectedL;
+    TLeaveError iLeaveConstructL;
+    
+    TBool iHeadsetConnected;
+    MRadioHeadsetEventObserver* iObserver;
+    
+    
+    } mutable iAccessoryObserver;
+    
+    struct TFmTunerStubData
+        {
+        TRsTunerCapabilities iCaps;
+        TStubError iGetCapabilitiesError;
+        
+        
+        TBool iTunerInOfflineMode;
+        TStubError iEnableTunerInOfflineModeError;
+        
+        
+        TRsFrequencyRange iRange;
+        TRsFrequencyRange iPreviousRange;
+        TInt iMinFreq;
+        TInt iMaxFreq;
+        TStubError iGetFrequencyRangeError;
+        TStubError iSetFrequencyRangeError;
+        
+        TInt iFrequency;
+        TInt iPreviousFrequency;
+        TStubError iGetFrequencyError;
+        TStubError iSetFrequencyError;
+
+        struct TScanStations
+        {
+        TInt iCount;
+        TInt iMinFreq;
+        TInt iFrequencyStepSize;        
+        } mutable iScanStations;
+        
+        TBool iStationSeekUpwards;
+
+        TInt iSignalStrength;
+        TStubError iGetSignalStrengthError;
+        
+        TInt iMaxSignalStrength;
+        TStubError iGetMaxSignalStrengthError;
+        
+        TBool iStereoMode;
+        TStubError iGetStereoModeError;
+        
+        TBool iForcedMono;
+        TStubError iGetForcedMonoReceptionError;
+        TStubError iForcedMonoReceptionError;
+        
+        TBool iSquelch;
+        TStubError iSetSquelchError;
+        TStubError iGetSquelchError;
+        } mutable iTuner;
+
+    struct TPlayerStubData
+        {
+        TLeaveError iLeaveNewL;
+        TLeaveError iLeaveErrorForConstructL;
+        MRadioPlayerObserver* iRadioPlayerUtilityClient;
+
+        TRsPlayerState iPlayerState;
+        
+        TBool iMuteStatus;
+        TStubError iMuteError;
+        
+        TInt iVolume;
+        TStubError iSetVolumeError;
+        TStubError iGetVolumeError;
+        
+        TTimeIntervalMicroSeconds iRampInterval;
+        TStubError iSetVolumeRampError;
+        
+        TInt iMaxVolume;
+        TStubError iGetMaxVolumeError;
+        
+        TInt iLeftPercentage;
+        TInt iRightPercentage;
+        TStubError iSetBalanceError;
+        TStubError iGetBalanceError;
+        } mutable iPlayer;
+        
+    struct TRdsStubData
+        {
+        TLeaveError iLeaveNewL;
+        TLeaveError iLeaveErrorForConstructL;
+        MRadioRdsObserver* iRadioRdsUtilityClient;
+        TRsRdsCapabilities iCaps;
+        TStubError iGetCapabilitiesError;
+        
+        TBool iRdsSignal;
+        TStubError iGetRdsSignalStatusError;
+        
+        TStubError iNotifyRdsDataChangeError;    
+        
+        TBool iAutomaticSwitching;
+        TStubError iSetAutomaticSwitchingError;
+        TStubError iGetAutomaticSwitchingError;
+        
+        TStubError iStationSeekByPTYError;
+        TStubError iStationSeekByTAError;
+        TStubError iStationSeekByTPError;
+        TInt iFrequency;
+        TStubError iGetFreqByPTYError;
+        TStubError iGetFreqByTAError;
+        TStubError iGetPSByPTYError;
+        TStubError iGetPSByTAError;
+            
+        RArray<TRdsPSName> iPsList;
+        RArray<TInt> iFreqList;
+        
+        TInt iPi;
+        TStubError iGetProgrammeIdentificationError;
+        
+        TRdsProgrammeType iPty;
+        TStubError iGetProgrammeTypeError;
+        
+        TRdsPSName iPs;
+        TStubError iGetProgrammeServiceError;
+        
+        // Radio Text
+        TRdsRTplusClass iRtPlusClass;
+        TRdsRadioText iRtPlusData;
+        TStubError iGetRadioTextPlusError;
+        TRsRdsRadioText iRt;
+        TStubError iGetRadioTextError;
+        
+        // Automatic traffic announcement
+        TBool iAuto;
+        TStubError iGetTrafficAnnouncementStatusError;
+        TStubError iSetTrafficAnnouncementStatusError;
+    
+        TBool iTaStatus;
+        TStubError iGetAutomaticTrafficAnnouncementError;
+        TStubError iSetAutomaticTrafficAnnouncementError;
+        
+        TDateTime iCt;
+        TStubError iGetClockTimeError;
+        
+        TBool iTpStatus;
+        TStubError iGetTrafficProgrammeStatusError;
+        } mutable iRds;
+        
+    struct TMonitorStubData
+        {
+        TInt    iNone;
+        } mutable iMonitor;
+    };
+
+const TUid KStub_KRadioServerPropertyCategory = {SRadioStubManager::EStub_KRadioServerPropertyCategory};
+const TUid KStub_KUidSystemCategory = {SRadioStubManager::EStub_KUidSystemCategory};
+const TUid KStub_KPSUidCtsyCallInformation = {SRadioStubManager::EStub_KPSUidCtsyCallInformation};
+const TUid KStub_KPSUidVoiceUiAccMonitor = {SRadioStubManager::EStub_KPSUidVoiceUiAccMonitor};
+const TUid KStub_KPSUidMMFAudioServer = {SRadioStubManager::EStub_KPSUidMMFAudioServer};
+const TUid KStub_KRadioPSUid = {SRadioStubManager::EStub_KRadioPSUid};
+const TUid KStub_KRadioCRUid = {0x101FF976}; // tried with this {SRadioStubManager::EStub_KRadioPSUid} but failed
+
+#endif /* RADIOSTUBMANAGER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radioserver/Session/stub/src/StubRadioSession.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,1773 @@
+/*
+* Copyright (c) 2002-2004 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 class is the main interface to the RadioServer. It implements
+*				 the client-side session.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include 	<e32math.h>
+#include    "StubRadioSession.h"
+#include    "RadioClientServer.h"
+#include	"RadioRequest.h"
+#include	"RadioEventHandler.h"
+#include    "RadioDebug.h"
+#include    "trace.h"
+
+// CONSTANTS
+// Index to list of asynchronous requests that generates response to MRadioObserver.
+const TInt KReqInternal				 = 0;
+const TInt KReqRequestTunerControl   = 1;
+const TInt KReqSetFrequencyRange     = 2;
+const TInt KReqSetFrequency          = 3;
+const TInt KReqStationSeek           = 4;
+const TInt KReqPlay					 = 5;
+const TInt KReqStationSeekByPTY      = 6;
+const TInt KReqStationSeekByTA       = 7;
+const TInt KReqStationSeekByTP       = 8;
+
+// Max number of retries to start the server
+const TInt KRadioStartRetry	= 2;
+// Minimum of one for each asynchronous message + one to allow cancel
+const TInt KRadioMessageSlots = 11;
+
+#define TUNER  iRadioStubManager->iTuner
+#define PLAYER  iRadioStubManager->iPlayer
+#define RDS  iRadioStubManager->iRds
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// StartServer
+// Static function to start the server process thread.
+// Start the server process/thread which lives in an EPOCEXE object.
+// Returns: TInt: KErrNone (0) if no error
+// -----------------------------------------------------------------------------
+//
+static TInt StartServer()
+	{
+    FUNC_LOG;
+
+    const TUidType serverUid(KNullUid, KNullUid, KRadioServerUid3);
+
+    // We just create a new server process. Simultaneous launching of two such
+    // processes should be detected when the second one attempts to create
+    // the server object, failing with KErrAlreadyExists.
+    RProcess server;
+    TInt r = server.Create(KRadioServerImg, KNullDesC, serverUid);
+
+    if ( r != KErrNone )
+        {
+        INFO_1("server.Create() failed [%d]", r);
+        return r;
+        }
+    TRequestStatus stat;
+    server.Rendezvous(stat);
+    if ( stat != KRequestPending )
+        {
+        server.Kill(0);     // abort startup
+        }
+    else
+        {
+        server.Resume();    // logon OK - start the server
+        }
+    User::WaitForRequest(stat);     // wait for start or death
+    // 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
+    r = (server.ExitType() == EExitPanic) ? KErrGeneral : stat.Int();
+    server.Close();
+    return r;
+	}
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// RRadioSession::NewL
+// Two-phased constructor except no need for ConstrucL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RRadioSession* RRadioSession::NewL()
+    {
+    FUNC_LOG;
+    RRadioSession* self = new (ELeave) RRadioSession();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// RRadioSession::RRadioSession
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RRadioSession::RRadioSession()
+	:	iConnected(EFalse),
+		iDestinationPckg(TMMFMessageDestination(KRadioServerInterfaceUid, KRadioServerObjectHandle)),
+		iObserver(NULL),
+		iPrimaryClient(EFalse),
+		iRdsNotify(EFalse)
+    {
+    FUNC_LOG;
+    }
+
+// -----------------------------------------------------------------------------
+// RRadioSession::Connect
+// Create a client-side session. Start the server if not started already.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::Connect(
+	MRadioObserver& aObserver,
+	TBool aPrimaryClient )
+	{
+    FUNC_LOG;
+    INFO_1("Size of RRadioSession: %i", sizeof(RRadioSession) );
+    // check if already connected
+    if ( iConnected )
+        {
+        INFO("already connected");
+        return KErrAlreadyExists;
+        }
+
+    TInt retry = KRadioStartRetry;
+    TInt err = KErrGeneral;
+    TInt numMessageSlots = KRadioMessageSlots;
+    for (;;)
+        {
+        // Try to create a new session with the server
+        err = CreateSession(KRadioServerName, Version(), numMessageSlots);
+        if ( (err != KErrNotFound) && (err != KErrServerTerminated) )
+            {
+            break;  // Connected to existing server - ok
+            }
+        if ( --retry == 0 )
+            {
+            break;  // Failed.
+            }
+        // Server not running, try to start it.
+        err = StartServer();
+        if ( (err != KErrNone) && (err != KErrAlreadyExists) )
+            {
+            break;  // Server not launched - propagate error
+            }
+        }
+
+    if ( err != KErrNone )
+        {
+        INFO_1("Unable to start server [%d]", err);
+        return err;
+        }
+    // Dooing some temporary manipulation for heap
+    User::Check();
+    User::CompressAllHeaps();
+    CRadioRequest* req( NULL );
+    TRAP(err, req = CRadioRequest::NewLC(*this, aObserver, ERadioServNone); CleanupStack::Pop( req ) );
+    iExtraRequestForBugHunting = req;   
+    User::Check();
+    User::CompressAllHeaps();
+    //delete iExtraRequestForBugHunting;
+    //iExtraRequestForBugHunting = NULL;
+    
+    // Create active object request handlers and add it to scheduler
+    TRAP(err, StartRequestHandlersL(aObserver));
+    if ( err == KErrNone )
+        {
+        // Create active object event handlers and add it to scheduler
+        TRAP(err, StartEventHandlersL(aObserver));
+        if ( err == KErrNone )
+            {
+            iConnected = ETrue;
+            iObserver = &aObserver;
+            if ( aPrimaryClient )
+                {
+                iPrimaryClient = ETrue;
+                err = SendReceive(ERadioServAddPrimaryClient, TIpcArgs(&iDestinationPckg));
+                }
+            }
+        else
+            {
+            iRequests.ResetAndDestroy();
+            iEventHandlers.ResetAndDestroy();
+            }
+        }
+    else
+        {
+        iRequests.ResetAndDestroy();
+        }
+    // Open chunk for test configuration/control data
+    // Open chunk for test configuration/control data
+    User::Check();
+    User::CompressAllHeaps();
+    err = iRadioStubManagerChunk.OpenGlobal(
+            KRadioStubManagerLocalChunkName,
+            EFalse, // == Read | Write
+            EOwnerThread );
+    if (err)
+        {
+        goto exitAndReturn;
+        }
+    User::Check();
+    User::CompressAllHeaps();
+    if ( sizeof(SRadioStubManager) > iRadioStubManagerChunk.MaxSize() )
+        {
+        err =  KErrTooBig;
+        goto exitAndReturn;
+        }
+    TUint8* basePtr = iRadioStubManagerChunk.Base();
+    User::LeaveIfNull( basePtr );    
+    if (!basePtr)
+        {
+        err = KErrGeneral;
+        goto exitAndReturn;
+        }    
+    User::Check();
+    User::CompressAllHeaps();
+    iRadioStubManager = (SRadioStubManager*)basePtr;    
+
+exitAndReturn:    
+    User::Check();
+    User::CompressAllHeaps();
+    INFO_1("exit err=[%d]", err);
+    return err;
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::Version
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TVersion RRadioSession::Version() const
+	{
+	return(TVersion(KRadioServerVersionMajor, KRadioServerVersionMinor, KRadioServerVersionBuild));
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::Close
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::Close()
+	{
+    FUNC_LOG;
+
+    //delete iExtraRequestForBugHunting;
+    iEventHandlers.ResetAndDestroy();
+    iEventHandlers.Close();
+
+    iRdsEventHandlers.ResetAndDestroy();
+    iRdsEventHandlers.Close();
+
+    for ( TInt i = (iRequests.Count() - 1) ; i >= 0; i = (iRequests.Count()- 1)  )
+        {
+        INFO_2("iRequests[i] pointer: 0x%x, no: %i", *&iRequests[i], i );
+        CRadioRequest* req = *&iRequests[i];
+        iRequests.Remove(i);
+        delete req;
+        }   
+    //iRequests.ResetAndDestroy();
+    iRequests.Close();
+
+    if ( iConnected )
+        {
+        iConnected = EFalse;
+        if ( iPrimaryClient )
+            {
+            SendReceive(ERadioServRemovePrimaryClient, TIpcArgs(&iDestinationPckg));
+            }
+        RSessionBase::Close();
+        }
+    // Dooing some temporary manipulation for heap
+    //User::Check();
+    //User::CompressAllHeaps();
+    delete iExtraRequestForBugHunting;
+	}
+
+//********** TunerUtility control begins
+
+// -----------------------------------------------------------------------------
+// RRadioSession::RequestTunerControl
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::RequestTunerControl(
+	TRsTuner /*aTuner*/ )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        if ( !iRequests[KReqRequestTunerControl]->IsActive() )
+            {
+            iRequests[KReqRequestTunerControl]->CompleteRequest(ERadioServRequestTunerControl, KErrNone);
+            }
+		}
+	else
+		{
+		iRequests[KReqInternal]->CompleteRequest(ERadioServRequestTunerControl, KErrDisconnected);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetTunerCapabilities
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetTunerCapabilities(
+	TRsTunerCapabilities& aCaps ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetCapabilitiesError.Error() );
+        if ( KErrNone == err )
+            {
+            aCaps.iFrequencyRange = TUNER.iCaps.iFrequencyRange;
+            aCaps.iCapabilities = TUNER.iCaps.iCapabilities;
+            aCaps.iAdditionalFunctions1 = TUNER.iCaps.iAdditionalFunctions1;
+            aCaps.iAdditionalFunctions2 = TUNER.iCaps.iAdditionalFunctions2;            
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::EnableTunerInOfflineMode
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::EnableTunerInOfflineMode(
+	TBool aEnable )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iEnableTunerInOfflineModeError.Error() );
+        if ( KErrNone == err )
+            {
+            TUNER.iTunerInOfflineMode = aEnable;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::SetFrequencyRange
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::SetFrequencyRange(
+	TRsFrequencyRange aRange )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iSetFrequencyRangeError.Error() );
+        if ( KErrNone == err )
+            {
+            TUNER.iPreviousRange = TUNER.iRange;
+            TUNER.iRange = aRange;
+            }
+        if ( iRequests[KReqSetFrequencyRange]->IsActive() )
+            {
+            iRequests[KReqSetFrequencyRange]->Cancel();
+            }
+        iRequests[KReqSetFrequencyRange]->CompleteRequest(ERadioServSetFrequencyRange, err);
+		}
+	else
+		{
+		iRequests[KReqInternal]->CompleteRequest(ERadioServSetFrequencyRange, KErrDisconnected);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelSetFrequencyRange
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelSetFrequencyRange()
+	{
+    FUNC_LOG;
+	if ( iConnected && iRequests[KReqSetFrequencyRange]->IsActive() )
+		{
+		iRequests[KReqSetFrequencyRange]->Cancel();
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetFrequencyRange
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetFrequencyRange(
+	TRsFrequencyRange& aRange,
+	TInt& aMinFreq,
+	TInt& aMaxFreq) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetFrequencyRangeError.Error() );
+        if ( KErrNone == err )
+            {
+            aRange = TUNER.iRange;
+            aMinFreq = TUNER.iMinFreq;
+            aMaxFreq = TUNER.iMaxFreq;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::SetFrequency
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::SetFrequency(
+	TInt aFrequency )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+	    TUint err( TUNER.iSetFrequencyError.Error() );
+	    if  ( KErrNone == err )
+	        {
+	        TUNER.iPreviousFrequency = TUNER.iFrequency;
+	        TUNER.iFrequency = aFrequency;
+	        }       
+        if ( iRequests[KReqSetFrequency]->IsActive() )
+            {
+            iRequests[KReqSetFrequency]->Cancel();
+            }
+        iRequests[KReqSetFrequency]->CompleteRequest(ERadioServSetFrequency, err);
+		}
+	else
+		{
+		iRequests[KReqInternal]->CompleteRequest(ERadioServSetFrequency, KErrDisconnected);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelSetFrequency
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelSetFrequency()
+	{
+    FUNC_LOG;
+	if ( iConnected && iRequests[KReqSetFrequency]->IsActive() )
+		{
+		iRequests[KReqSetFrequency]->Cancel();
+		}
+    TUNER.iFrequency = TUNER.iPreviousFrequency;
+    TUNER.iPreviousFrequency = 0;
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetFrequency
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetFrequency(
+	TInt& aFrequency ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetFrequencyError.Error() );
+        if ( KErrNone == err )
+            {
+            aFrequency = TUNER.iFrequency;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::StationSeek
+// -----------------------------------------------------------------------------
+EXPORT_C void RRadioSession::StationSeek(
+	TBool aUpwards )
+	{
+    FUNC_LOG;
+    INFO_1("aUpwards: %D", aUpwards );
+	if ( iConnected )
+		{
+	    TUNER.iStationSeekUpwards = aUpwards;
+        if ( iRequests[KReqStationSeek]->IsActive() )
+            {
+            iRequests[KReqStationSeek]->Cancel();
+            }
+        TInt err( KErrNone);
+        if ( KErrNotFound == TUNER.iScanStations.iCount )
+            {
+            err = KErrNotFound;
+            }
+        else if ( TUNER.iScanStations.iCount )
+            {
+            iRequests[KReqStationSeek]->iInt = TUNER.iScanStations.iMinFreq + ( TUNER.iScanStations.iCount * TUNER.iScanStations.iFrequencyStepSize );
+            --TUNER.iScanStations.iCount;
+            if ( 0 == TUNER.iScanStations.iCount )
+                {
+                TUNER.iScanStations.iCount = KErrNotFound;
+                }
+            }
+        else
+            {
+            iRequests[KReqStationSeek]->iInt = TUNER.iFrequency;
+            }
+        iRequests[KReqStationSeek]->CompleteRequest(ERadioServStationSeek, err);
+		}
+	else
+		{
+		iRequests[KReqInternal]->CompleteRequest(ERadioServStationSeek, KErrDisconnected);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelStationSeek
+// -----------------------------------------------------------------------------
+EXPORT_C void RRadioSession::CancelStationSeek()
+	{
+    FUNC_LOG;
+	if ( iConnected && iRequests[KReqStationSeek]->IsActive() )
+		{
+		iRequests[KReqStationSeek]->Cancel();
+		}
+	TUNER.iScanStations.iCount = 0;
+    TUNER.iStationSeekUpwards = EFalse;
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetSignalStrength
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetSignalStrength(
+	TInt& aSignalStrength ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetSignalStrengthError.Error() );
+        if ( KErrNone == err )
+            {
+            aSignalStrength = TUNER.iSignalStrength;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetMaxSignalStrength
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetMaxSignalStrength(
+	TInt& aMaxSignalStrength ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetMaxSignalStrengthError.Error() );
+        if ( KErrNone == err )
+            {
+            aMaxSignalStrength = TUNER.iMaxSignalStrength;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetStereoMode
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetStereoMode(
+	TBool& aStereo ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetStereoModeError.Error() );
+        if ( KErrNone == err )
+            {
+            aStereo = TUNER.iStereoMode;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::ForceMonoReception
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::ForceMonoReception(
+	TBool aForcedMono )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iForcedMonoReceptionError.Error() );
+        if ( KErrNone == err )
+            {
+            TUNER.iForcedMono = aForcedMono;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetForceMonoReception
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetForceMonoReception(
+	TBool& aForcedMono ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetForcedMonoReceptionError.Error() );
+        if ( KErrNone == err )
+            {
+            aForcedMono = TUNER.iForcedMono;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::SetSquelch
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::SetSquelch(
+	TBool aEnabled )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iSetSquelchError.Error() );
+        if ( KErrNone == err )
+            {
+            TUNER.iSquelch = aEnabled;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetSquelch
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetSquelch(
+	TBool& aSquelch ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( TUNER.iGetSquelchError.Error() );
+        if ( KErrNone == err )
+            {
+            aSquelch = TUNER.iSquelch;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+//********** PlayerUtility control begins
+
+// -----------------------------------------------------------------------------
+// RRadioSession::PlayerState
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::PlayerState(
+	TRsPlayerState& aState ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+	    aState = PLAYER.iPlayerState;
+        return KErrNone;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::Play
+// -----------------------------------------------------------------------------
+EXPORT_C void RRadioSession::Play()
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+		PLAYER.iPlayerState = ERsPlayerPlaying;
+        if ( iRequests[KReqPlay]->IsActive() )
+            {
+            iRequests[KReqStationSeek]->Cancel();
+            }
+        iRequests[KReqPlay]->CompleteRequest(ERadioServPlay, KErrNone);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::Stop
+// -----------------------------------------------------------------------------
+EXPORT_C void RRadioSession::Stop(
+	TBool aIfOnlyPrimaryClient )
+	{
+    FUNC_LOG;
+    INFO_1("aIfOnlyPrimaryClient: [%d]", aIfOnlyPrimaryClient);
+    if ( iConnected & aIfOnlyPrimaryClient )
+        {
+        PLAYER.iPlayerState = ERsPlayerIdle;
+        RProperty::Set( KRadioServerPropertyCategory, ERadioServPsPlayerState,  PLAYER.iPlayerState );
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetMaxVolume
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetMaxVolume(
+    TInt& aMaxVolume ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( PLAYER.iGetMaxVolumeError.Error() );
+        if ( KErrNone == err )
+            {
+            aMaxVolume = PLAYER.iMaxVolume;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::SetVolume
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::SetVolume(
+	TInt aVolume )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( PLAYER.iSetVolumeError.Error() );
+        if ( KErrNone == err )
+            {
+            PLAYER.iVolume = aVolume;
+            RProperty::Set( KRadioServerPropertyCategory, ERadioServPsVolume, PLAYER.iVolume );      
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetVolume
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetVolume(
+	TInt& aVolume ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( PLAYER.iGetVolumeError.Error() );
+        if ( KErrNone == err )
+            {
+            aVolume = PLAYER.iVolume;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::SetVolumeRamp
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::SetVolumeRamp(
+	const TTimeIntervalMicroSeconds& aRampInterval )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( PLAYER.iSetVolumeRampError.Error() );
+        if ( KErrNone == err )
+            {
+            PLAYER.iRampInterval = aRampInterval;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::Mute
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::Mute(
+	TBool aMute )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( PLAYER.iMuteError.Error() );
+        if ( KErrNone == err )
+            {
+            PLAYER.iMuteStatus = aMute;
+            RProperty::Set( KRadioServerPropertyCategory, ERadioServPsMuteStatus, PLAYER.iMuteStatus );      
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetMuteStatus
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::GetMuteStatus(
+	TBool& aMute ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+		aMute = PLAYER.iMuteStatus;
+		return KErrNone;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::SetBalance
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::SetBalance(
+	TInt aLeftPercentage,
+	TInt aRightPercentage )
+	{
+    FUNC_LOG;
+	INFO_2("left=[%d] right=[%d]", aLeftPercentage, aRightPercentage);
+	if ( iConnected )
+		{
+		TInt err( PLAYER.iSetBalanceError.Error() );
+		if ( KErrNone == err )
+		    {
+	        PLAYER.iLeftPercentage = aLeftPercentage;
+	        PLAYER.iRightPercentage = aRightPercentage;
+	        //iRadioPlayerUtilityClient.MrpoBalanceChange( STUB.iLeftPercentage, STUB.iRightPercentage );
+	        TPckgBuf<TRsSettingsData> balance;
+	        balance().iData1 = aLeftPercentage;     // Left
+	        balance().iData2 = aRightPercentage;    // Right
+	        RProperty::Set( KRadioServerPropertyCategory, ERadioServPsBalance,  balance );      
+		    }
+	    return err;
+
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetBalance
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetBalance(
+	TInt& aLeftPercentage,
+	TInt& aRightPercentage ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( PLAYER.iSetBalanceError.Error() );
+        if ( KErrNone == err )
+            {
+            aLeftPercentage = PLAYER.iLeftPercentage;
+            aRightPercentage = PLAYER.iRightPercentage;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+//********** RDSUtility control begins
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetRdsCapabilities
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetRdsCapabilities(
+	TRsRdsCapabilities& aCaps ) const
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+		TInt err( RDS.iGetCapabilitiesError.Error() );
+	    if ( KErrNone == err )
+	        {
+	        aCaps.iRdsFunctions = RDS.iCaps.iRdsFunctions;
+	        aCaps.iAdditionalFunctions1 = RDS.iCaps.iAdditionalFunctions1;
+	        aCaps.iAdditionalFunctions2 = RDS.iCaps.iAdditionalFunctions2;
+	        }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetRdsSignalStatus
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetRdsSignalStatus(
+	TBool& aRdsSignal ) const
+    {
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetRdsSignalStatusError.Error() );
+        if ( KErrNone == err )
+            {
+            aRdsSignal = RDS.iRdsSignal;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::NotifyRdsDataChange
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::NotifyRdsDataChange(
+	TRsRdsData aRdsData )
+	{
+    FUNC_LOG;
+	INFO_1("aRdsData.iRdsFunctions [%d]", aRdsData.iRdsFunctions);
+	if ( !iConnected )
+		{
+		return KErrDisconnected;
+		}
+
+	if ( !iObserver )
+		{
+		return KErrNotReady;
+		}
+
+	TRAPD(err, StartRdsEventHandlersL(aRdsData.iRdsFunctions));
+	if ( err != KErrNone )
+		{
+		INFO_1("err=[%d]", err);
+		return err;
+		}
+    iRdsNotify = ETrue;
+	return err;
+    }
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelNotifyRdsDataChange
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelNotifyRdsDataChange()
+    {
+    FUNC_LOG;
+	if ( iConnected && iRdsNotify )
+		{
+		iRdsEventHandlers.ResetAndDestroy();
+	    iRdsNotify = EFalse;
+		}
+    }
+
+// -----------------------------------------------------------------------------
+// RRadioSession::NotifyRadioTextPlusChange
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::NotifyRadioTextPlusChange(
+	RArray<TInt>& /*aRtPlusClasses*/ )
+	{
+    FUNC_LOG;
+	return KErrNotSupported;
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelNotifyRadioTextPlusChange
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelNotifyRadioTextPlusChange()
+	{
+    FUNC_LOG;
+	// NotifyRadioTextPlusChange is not supported
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::SetAutomaticSwitching
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::SetAutomaticSwitching(
+	TBool aAuto )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iSetAutomaticSwitchingError.Error() );
+        if ( KErrNone == err )
+            {
+            RDS.iAutomaticSwitching = aAuto;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetAutomaticSwitching
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetAutomaticSwitching(
+	TBool& aAuto )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetAutomaticSwitchingError.Error() );
+        if ( KErrNone == err )
+            {
+            aAuto = RDS.iAutomaticSwitching;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelAFSearch
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelAFSearch()
+	{
+    FUNC_LOG;
+	}
+
+ // -----------------------------------------------------------------------------
+// RRadioSession::SetAutomaticTrafficAnnouncement
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::SetAutomaticTrafficAnnouncement(
+	TBool /*aAuto*/ )
+	{
+    FUNC_LOG;
+	return KErrNotSupported;
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetAutomaticTrafficAnnouncement
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetAutomaticTrafficAnnouncement(
+	TBool& /*aAuto*/ )
+	{
+    FUNC_LOG;
+	return KErrNotSupported;
+   	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::StationSeekByPTY
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::StationSeekByPTY(
+	TRsRdsProgrammeType aPty,
+	TBool aSeekUp )
+   	{
+    FUNC_LOG;
+   	INFO_2("pty=[%d], aSeekUp=%d", aPty, aSeekUp);
+	if ( iConnected )
+		{
+        if ( iRequests[KReqStationSeekByPTY]->IsActive() )
+            {
+            iRequests[KReqStationSeekByPTY]->Cancel();
+            }
+		iRequests[KReqStationSeekByPTY]->iInt = RDS.iFrequency;
+		iRequests[KReqInternal]->CompleteRequest(ERadioServStationSeekByPTY, KErrNone);
+		}
+	else
+		{
+		iRequests[KReqInternal]->CompleteRequest(ERadioServStationSeekByPTY, KErrDisconnected);
+		}
+   	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::StationSeekByTA
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::StationSeekByTA(
+	TBool /*aSeekUp*/ )
+   	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        if ( iRequests[KReqStationSeekByTA]->IsActive() )
+            {
+            iRequests[KReqStationSeekByTA]->Cancel();
+            }
+        iRequests[KReqStationSeekByTA]->iInt = RDS.iFrequency;
+	    iRequests[KReqInternal]->CompleteRequest(ERadioServStationSeekByTA, KErrNone);
+		}
+	else
+		{
+		iRequests[KReqInternal]->CompleteRequest(ERadioServStationSeekByTA, KErrDisconnected);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::StationSeekByTP
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::StationSeekByTP(
+	TBool /*aSeekUp*/ )
+   	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        if ( iRequests[KReqStationSeekByTP]->IsActive() )
+            {
+            iRequests[KReqStationSeekByTP]->Cancel();
+            }
+        iRequests[KReqStationSeekByTP]->iInt = RDS.iFrequency;
+        iRequests[KReqInternal]->CompleteRequest(ERadioServStationSeekByTP, KErrNone);
+		}
+	else
+		{
+		iRequests[KReqInternal]->CompleteRequest(ERadioServStationSeekByTP, KErrDisconnected);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelRdsStationSeek
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelRdsStationSeek()
+  	{
+    FUNC_LOG;
+  	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetFreqByPTY
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::GetFreqByPTY(
+	TRsRdsProgrammeType /*aPty*/ )
+	{
+    FUNC_LOG;
+	iRequests[KReqInternal]->CompleteRequest(ERadioServGetFreqByPTY, KErrNotSupported);
+  	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelGetFreqByPTY
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelGetFreqByPTY()
+	{
+    FUNC_LOG;
+	// GetFreqByPTY is not supported
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetFreqByTA
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::GetFreqByTA()
+	{
+    FUNC_LOG;
+	iRequests[KReqInternal]->CompleteRequest(ERadioServGetFreqByTA, KErrNotSupported);
+    }
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelGetFreqByTA
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelGetFreqByTA()
+    {
+    FUNC_LOG;
+    // GetFreqByTA is not supported
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetPSByPTY
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::GetPSByPTY(
+	TRsRdsProgrammeType /*aPty*/ )
+    {
+    FUNC_LOG;
+	iRequests[KReqInternal]->CompleteRequest(ERadioServGetPSByPTY, KErrNotSupported);
+    }
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelGetPSByPTY
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelGetPSByPTY()
+    {
+    FUNC_LOG;
+    // GetPSByPTY is not supported
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetPSByTA
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::GetPSByTA()
+    {
+    FUNC_LOG;
+	iRequests[KReqInternal]->CompleteRequest(ERadioServGetPSByTA, KErrNotSupported);
+    }
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelGetPSByTA
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void RRadioSession::CancelGetPSByTA()
+    {
+    FUNC_LOG;
+    // GetPSByTA is not supported
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetProgrammeIdentification
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetProgrammeIdentification(
+	TInt& aPi )
+    {
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetProgrammeIdentificationError.Error() );
+        if ( KErrNone == err )
+            {
+            aPi = RDS.iPi;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetProgrammeType
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetProgrammeType(
+	TRsRdsProgrammeType& aPty )
+    {
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetProgrammeTypeError.Error() );
+        if ( KErrNone == err )
+            {
+            aPty = RDS.iPty;
+            }
+        return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetProgrammeService
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetProgrammeService(
+	TRsRdsPSName& aPs )
+    {
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetProgrammeServiceError.Error() );
+        if ( KErrNone == err )
+            {
+            aPs = RDS.iPs;
+            }
+        return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetRadioText
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetRadioText(
+	TRsRdsRadioText& aRt )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetRadioTextError.Error() );
+        if ( KErrNone == err )
+            {
+            aRt = RDS.iRt;
+            }
+        return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetRadioTextPlus
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetRadioTextPlus(
+	TRsRdsRTplusClass /*aRtPlusClass*/,
+	TRsRdsRadioText& /*aRtPlusData*/ )
+	{
+    FUNC_LOG;
+	return KErrNotSupported;
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetClockTime
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetClockTime(
+	TDateTime& aCt )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetClockTimeError.Error() );
+        if ( KErrNone == err )
+            {
+            aCt = RDS.iCt;
+            }
+        return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetTrafficAnnouncementStatus
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetTrafficAnnouncementStatus(
+	TBool& aTaStatus )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetTrafficAnnouncementStatusError.Error() );
+        if ( KErrNone == err )
+            {
+            aTaStatus = RDS.iTaStatus;
+            }
+	    return err;
+ 		}
+ 	else
+ 		{
+ 		return KErrDisconnected;
+ 		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::GetTrafficProgrammeStatus
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt RRadioSession::GetTrafficProgrammeStatus(
+	TBool& aTpStatus )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+        TInt err( RDS.iGetTrafficProgrammeStatusError.Error() );
+        if ( KErrNone == err )
+            {
+            aTpStatus = RDS.iTpStatus;
+            }
+	    return err;
+		}
+	else
+		{
+		return KErrDisconnected;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CustomCommandSync
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::CustomCommandSync(
+    const TMMFMessageDestinationPckg& aDestination,
+    TInt aFunction,
+    const TDesC8& aDataTo1,
+    const TDesC8& aDataTo2 )
+    {
+    FUNC_LOG;
+    if ( iConnected )
+        {
+        return SendReceive(aFunction, TIpcArgs(&aDestination, &aDataTo1, &aDataTo2));
+        }
+    else
+        {
+        return KErrDisconnected;
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CustomCommandSync
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RRadioSession::CustomCommandSync(
+    const TMMFMessageDestinationPckg& aDestination,
+    TInt aFunction,
+    const TDesC8& aDataTo1,
+    const TDesC8& aDataTo2,
+    TDes8& aDataFrom )
+    {
+    FUNC_LOG;
+    if ( iConnected )
+        {
+        return SendReceive(aFunction, TIpcArgs(&aDestination, &aDataTo1, &aDataTo2, &aDataFrom));
+        }
+    else
+        {
+        return KErrDisconnected;
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CustomCommandAsync
+// -----------------------------------------------------------------------------
+EXPORT_C void RRadioSession::CustomCommandAsync(
+    const TMMFMessageDestinationPckg& aDestination,
+    TInt aFunction,
+    const TDesC8& aDataTo1,
+    const TDesC8& aDataTo2,
+    TRequestStatus& aStatus )
+    {
+    FUNC_LOG;
+    if ( iConnected )
+        {
+        SendReceive(aFunction, TIpcArgs(&aDestination, &aDataTo1, &aDataTo2), aStatus);
+        }
+    else
+        {
+        TRequestStatus* stat = &aStatus;
+        User::RequestComplete(stat, KErrDisconnected);
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CustomCommandAsync
+// -----------------------------------------------------------------------------
+EXPORT_C void RRadioSession::CustomCommandAsync(
+    const TMMFMessageDestinationPckg& aDestination,
+    TInt aFunction,
+    const TDesC8& aDataTo1,
+    const TDesC8& aDataTo2,
+    TDes8& aDataFrom,
+    TRequestStatus& aStatus )
+    {
+    FUNC_LOG;
+    if ( iConnected )
+        {
+        SendReceive(aFunction, TIpcArgs(&aDestination, &aDataTo1, &aDataTo2, &aDataFrom), aStatus);
+        }
+    else
+        {
+        TRequestStatus* stat = &aStatus;
+        User::RequestComplete(stat, KErrDisconnected);
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::CancelRequest
+// -----------------------------------------------------------------------------
+//
+void RRadioSession::CancelRequest(
+	TInt aRequest )
+	{
+    FUNC_LOG;
+	if ( iConnected )
+		{
+		SendReceive(ERadioServCancel, TIpcArgs(&iDestinationPckg, aRequest));
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::StartRequestHandlersL
+// Create asynchronous request handlers.
+// ** NOTE: The order in which each handler is appended to the iRequests array is critical.
+// Access to each request is done with constants declared at the beginning of this file.
+// -----------------------------------------------------------------------------
+//
+void RRadioSession::StartRequestHandlersL(
+	MRadioObserver& aObserver )
+	{
+    FUNC_LOG;
+
+	CRadioRequest* req = NULL;
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServNone);
+    User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+	INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServRequestTunerControl);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServSetFrequencyRange);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServSetFrequency);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServStationSeek);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServPlay);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServStationSeekByPTY);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServStationSeekByTA);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+
+	req = CRadioRequest::NewLC(*this, aObserver, ERadioServStationSeekByTP);
+	User::LeaveIfError( iRequests.Append(req) );
+	CleanupStack::Pop( req );
+    INFO_2("CRadioRequest* req: 0x%x, no: %i", req, iRequests.Count() );
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::StartEventHandlersL
+// -----------------------------------------------------------------------------
+//
+void RRadioSession::StartEventHandlersL(
+	MRadioObserver& aEventObserver )
+	{
+    FUNC_LOG;
+
+	CRadioEventHandler* handler = NULL;
+	
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsPlayerState);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsAntennaStatus);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsOfflineMode );
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsTransmitterStatus );
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsFrequency);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+    handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsFrequencyRange);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsForceMonoReception);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsSquelch);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsVolume);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsMuteStatus);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(aEventObserver, *this, ERadioServPsBalance);
+	User::LeaveIfError( iEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+	}
+
+// -----------------------------------------------------------------------------
+// RRadioSession::StartRdsEventHandlersL
+// -----------------------------------------------------------------------------
+//
+void RRadioSession::StartRdsEventHandlersL(
+	TUint32 aRdsFunction )
+	{
+    FUNC_LOG;
+
+	iRdsEventHandlers.ResetAndDestroy();
+	CRadioEventHandler* handler = NULL;
+
+	// If RDS notification started always return the latest RdsSignalStatus
+	handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsRdsSignalStatus);
+	User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+	handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsAutoSwitchStatus);
+	User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+	CleanupStack::Pop( handler );
+
+    if (aRdsFunction & TRsRdsData::ERsRdsProgrammeIdentification)
+    	{
+    	handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsProgrammeIdentification);
+		User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+    	}
+
+    if (aRdsFunction & TRsRdsData::ERsRdsProgrammeType)
+    	{
+    	handler = CRadioEventHandler::NewLC(*iObserver, *this,ERadioServPsProgrammeType );
+		User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+    	}
+
+	if (aRdsFunction & TRsRdsData::ERsRdsProgrammeService)
+		{
+		handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsProgrammeService);
+		User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+		}
+
+	if(aRdsFunction & TRsRdsData::ERsRdsRadioText)
+		{
+		handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsRadioText);
+		User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+		}
+
+  if(aRdsFunction & TRsRdsData::ERsRdsRadioTextPlus)
+    {
+    handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsRadioTextPlusObjects);
+    User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+    CleanupStack::Pop( handler );
+    }
+
+	if (aRdsFunction & TRsRdsData::ERsRdsClockTime)
+		{
+	    handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsClockTime);
+		User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+		}
+
+	if (aRdsFunction & TRsRdsData::ERsRdsTrafficAnnouncement)
+		{
+		handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsTrafficAnnouncementStatus);
+		User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+		}
+
+	if (aRdsFunction & TRsRdsData::ERsRdsAlternateFrequency)
+		{
+	    handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsAfSearchBegin);
+	    User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+
+	    handler = CRadioEventHandler::NewLC(*iObserver, *this, ERadioServPsAfSearchEnd);
+	    User::LeaveIfError( iRdsEventHandlers.Append(handler) );
+		CleanupStack::Pop( handler );
+		}
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/radioserver/Session/stub/src/StubRadioSession.h	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,1198 @@
+/*
+* Copyright (c) 2002-2004 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 class is the main interface to the RadioServer. It implements
+*				 the client-side session. It also contains M-observer classes that
+*				 the client must implement to receive completion notification for
+*				 asynchronous requests and spontaneous event notifications.
+*
+*/
+
+
+
+#ifndef RADIOSESSION_H
+#define RADIOSESSION_H
+
+//  INCLUDES
+#include <mmf/common/mmfbase.h>
+#include <mmf/common/mmfcontrollerframework.h>
+#include <MCustomCommand.h>
+
+#include "RadioServerData.h"
+#include "RadioStubManager.h"
+
+// FORWARD DECLARATIONS
+class CRadioRequest;
+class CRadioEventHandler;
+
+// CLASS DECLARATION
+
+/**
+*  Defines functions that client must implement in order to receive
+*  events from the radio server.
+*
+*  @lib RadioSession.lib
+*  @since S60 3.0
+*/
+class MRadioObserver
+    {
+public: // New functions
+
+//********** Tuner related
+
+	/**
+     * Completion message for RequestTunerControl request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     */
+	virtual void RequestTunerControlComplete( TRadioServerError aError ) = 0;
+
+	/**
+     * Completion message for SetFrequencyRange request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     */
+	virtual void SetFrequencyRangeComplete( TRadioServerError aError ) = 0;
+
+	/**
+     * Completion message for SetFrequency request.
+     *
+     * @since S60 3.0
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     */
+	virtual void SetFrequencyComplete( TRadioServerError aError ) = 0;
+
+	/**
+     * Completion message for StationSeek request.
+     *
+     * @since S60 3.0
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aFrequency Valid only if aError is KErrNone. Contains the new frequency in Hz.
+     */
+	virtual void StationSeekComplete( TRadioServerError aError, TInt aFrequency ) = 0;
+
+	/**
+     * Event notification indicating FM transmitter status change. Radio receiver
+     * is turned off when FM transmitter is active.
+     *
+     * @since S60 3.2
+     * @param aActive ETrue if FM transmitter is active; EFalse otherwise.
+     */
+	virtual void RadioEventTransmitterStatusChange( TBool aActive ) = 0;
+
+	/**
+     * Event notification indicating antenna status change.
+     *
+     * @since S60 3.0
+     * @param aAttached ETrue if antenna is attached.
+     */
+	virtual void RadioEventAntennaStatusChange( TBool aAttached ) = 0;
+
+	/**
+     * Event notification indicating offline mode change.
+     *
+     * @since S60 3.0
+     * @param aOfflineMode ETrue if device is in offline mode.
+     */
+	virtual void RadioEventOfflineModeChange( TBool aOfflineMode ) = 0;
+
+	/**
+     * Event notification indicating frequency range change. This may be caused by
+     * other applications.
+     *
+     * @since S60 3.2
+     * @param aNewRange New frequency range.
+     */
+	virtual void RadioEventFrequencyRangeChanged( TRsFrequencyRange aNewRange ) = 0;
+
+	/**
+     * Event notification indicating frequency(Hz) change. This may be caused by
+     * other applications or RDS if AF/TA is enabled.
+     *
+     * @since S60 3.2
+     * @param aFrequency New frequency where tuner is currently tuned.
+     */
+	virtual void RadioEventFrequencyChange( TInt aFrequency ) = 0;
+
+	/**
+     * Event notification indicating forced mono status change.
+     *
+     * @since S60 3.2
+     * @param aForcedMono ETrue if forced mode is enabled; EFalse otherwise.
+     */
+	virtual void RadioEventForcedMonoChanged( TBool aForcedMono ) = 0;
+
+	/**
+     * Event notification indicating squelch (muting the frequencies without broadcast) status change.
+     *
+     * @since S60 3.2
+     * @param aSquelch ETrue if squelch is enabled; EFalse otherwise.
+     */
+	virtual void RadioEventSquelchChanged( TBool aSquelch ) = 0;
+
+//********** Player related
+
+	/**
+     * Event notification indicating radio player state change. This may be caused by
+     * other applications.
+     *
+     * @since S60 3.0
+     * @param aRadioOn ETrue if radio is playing, otherwise radio is off.
+     * @param aError Valid only if aRadioOn is EFalse. Contains the reason why radio is off.
+     */
+	virtual void RadioEventStateChange( TBool aRadioOn, TRadioServerError aError ) = 0;
+
+	/**
+     * Event notification indicating volume change.
+     *
+     * @since S60 3.2
+     * @param aVolume New volume.
+     */
+	virtual void RadioEventVolumeChange( TInt aVolume ) = 0;
+
+	/**
+     * Event notification indicating mute setting change.
+     *
+     * @since S60 3.2
+     * @param aMute ETrue indicates audio is muted.
+     */
+	virtual void RadioEventMuteChange( TBool aMute ) = 0;
+
+	/**
+     * Event notification indicating balance setting change.
+     *
+     * @since S60 3.2
+     * @param aLeftPercentage Left speaker volume percentage. This value ranges from 0 to 100.
+     * @param aRightPercentage Right speaker volume percentage. This value ranges from 0 to 100.
+     */
+	virtual void RadioEventBalanceChange( TInt aLeftPercentage, TInt aRightPercentage ) = 0;
+
+//********** RDS related
+
+	/**
+     * Completion message for StationSeekByPTY request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aFrequency The frequency(Hz) of the radio station that was found.
+     */
+	virtual void StationSeekByPTYComplete( TRadioServerError aError, TInt aFrequency ) = 0;
+
+	/**
+     * Completion message for StationSeekByTA request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aFrequency The frequency(Hz) of the radio station that was found.
+     */
+	virtual void StationSeekByTAComplete( TRadioServerError aError, TInt aFrequency ) = 0;
+
+	/**
+     * Completion message for StationSeekByTP request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aFrequency The frequency(Hz) of the radio station that was found.
+     */
+	virtual void StationSeekByTPComplete( TRadioServerError aError, TInt aFrequency ) = 0;
+
+	/**
+     * Completion message for GetFreqByPTY request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aFreqList Array of frequencies (Hz), valid only if aError is KErrNone.
+     */
+	virtual void GetFreqByPTYComplete( TRadioServerError aError, RArray<TInt>& aFreqList ) = 0;
+
+	/**
+     * Completion message for GetFreqByTA request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aFreqList Array of frequencies (Hz), valid only if aError is KErrNone.
+     */
+	virtual void GetFreqByTAComplete( TRadioServerError aError, RArray<TInt>& aFreqList ) = 0;
+
+	/**
+     * Completion message for StatGetPSByPTY request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aPsList Array of programme service names, valid only if aError is KErrNone.
+     */
+	virtual void GetPSByPTYComplete( TRadioServerError aError, RArray<TRsRdsPSName>& aPsList ) = 0;
+
+	/**
+     * Completion message for GetPSByTA request.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aPsList Array of programme service names, valid only if aError is KErrNone.
+     */
+	virtual void GetPSByTAComplete( TRadioServerError aError, RArray<TRsRdsPSName>& aPsList ) = 0;
+
+	/**
+     * Event notification indicating new Programme Identification(PI) is available.
+     *
+     * @since S60 3.2
+     * @param aPi Programme identification
+     */
+	virtual void RadioEventRdsDataPI( TInt aPi ) = 0;
+
+	/**
+     * Event notification indicating new Programme Type(PTY) is available.
+     *
+     * @since S60 3.2
+     * @param aPty Programme type
+     */
+	virtual void RadioEventRdsDataPTY( TRsRdsProgrammeType aPty ) = 0;
+
+	/**
+     * Event notification indicating new Programme Service(PS) is available.
+     *
+     * @since S60 3.2
+     * @param aPs Programme service
+     */
+	virtual void RadioEventRdsDataPS( TRsRdsPSName& aPs ) = 0;
+
+	/**
+     * Event notification indicating new Radio Text(RT) is available.
+     *
+     * @since S60 3.2
+     * @param aRt Radio text
+     */
+	virtual void RadioEventRdsDataRT( TRsRdsRadioText& aRt ) = 0;
+
+	/**
+     * Event notification indicating new Clock Time(CT) is available.
+     *
+     * @since S60 3.2
+     * @param aCt Clock time
+     */
+	virtual void RadioEventRdsDataCT( TDateTime& aCt ) = 0;
+
+	/**
+     * Event notification indicating Traffice Announcement(TA) status change.
+     *
+     * @since S60 3.2
+     * @param aTaOn ETrue indicates that Traffic Announcement is on.
+     */
+	virtual void RadioEventRdsDataTA( TBool aTaOn ) = 0;
+
+	/**
+     * Event notification indicating new Radio Text+(RT+) is available.
+     *
+     * @since S60 3.2
+	 * @param aRtPlusClass Radio text plus class
+	 * @param aRtPlusData Radio text plus data
+	 */
+	virtual void RadioEventRdsDataRTplus( TRsRdsRTplusClass aRtPlusClass, TRsRdsRadioText& aRtPlusData ) = 0;
+
+	/**
+     * Event notification indicating the beginning of Alternate Frequency(AF) search.
+     *
+     * @since S60 3.2
+     */
+	virtual void RadioEventRdsSearchBeginAF() = 0;
+
+	/**
+     * Event notification indicating the end of Alternate Frequency(AF) search.
+     *
+     * @since S60 3.2
+     * @param aError KErrNone if successful, otherwise one of the system/RadioServer errors.
+     * @param aFrequency The frequency(Hz) of the radio station that was found.
+     */
+	virtual void RadioEventRdsSearchEndAF( TRadioServerError aError, TInt aFrequency ) = 0;
+
+	/**
+     * Event notification indicating station change to another frequency(Hz) that is
+     * broadcasting Traffic Announcement(TA).
+     *
+     * @since S60 3.2
+     * @param aFrequency The frequency(Hz) of the radio station that was found.
+     */
+	virtual void RadioEventRdsStationChangeTA( TInt aFrequency ) = 0;
+
+	/**
+     * Event notification indicating automatic switching (AF) setting change.
+     *
+     * @since S60 3.2
+     * @param aAuto ETrue indicates that automatic switching is on.
+     */
+	virtual void RadioEventRdsAutomaticSwitchingChange( TBool aAuto ) = 0;
+
+	/**
+     * Event notification indicating automatic traffic announcement setting change.
+     *
+     * @since S60 3.2
+     * @param aAuto ETrue indicates that automatic traffic announcement is on.
+     */
+	virtual void RadioEventRdsAutomaticTrafficAnnouncement( TBool aAuto ) = 0;
+
+	/**
+     * Event notification indicating RDS signal status change (i.e. signal is lost/restored).
+     *
+     * @since S60 3.2
+     * @param aSignal ETrue indicates that RDS signal is available in the tuned frequency.
+     */
+	virtual void RadioEventRdsSignalChange( TBool aSignal ) = 0;
+    };
+
+/**
+*  Main interface to the Radio Server.
+*  Implements the client-side session.
+*
+*  @lib RadioSession.lib
+*  @since S60 3.0
+*/
+class RRadioSession : public RSessionBase,
+					  public MCustomCommand
+    {
+public: // New functions
+    IMPORT_C static RRadioSession* NewL();
+    
+public:  // Constructors and destructor
+
+	/**
+     * C++ default constructor.
+     */
+	IMPORT_C RRadioSession();
+
+public: // New functions
+
+    /**
+     * Connects a client to the radio server.
+     * @since S60 3.0
+     *
+     * @param aObserver The observer object for receiving async completion callbacks.
+     * @param aPrimaryClient Indicates whether the client is a primary client. Primary
+     * clients are clients that can control the radio tuner such as FM Radio Application,
+     * Visual Radio, or a Java Radio App.  Non-primary clients are observers of the tuner,
+     * player, and RDS utilities and cannot exist without a primary client such as Active
+     * Idle, Cover UI, or a smart accessory driver.
+     * @return A standard system error code.
+     */
+	IMPORT_C TInt Connect( MRadioObserver& aObserver, TBool aPrimaryClient );
+
+	/**
+     * Gets the client side version number.
+     *
+     * @since S60 3.0
+     * @return The client side version number.
+     */
+	IMPORT_C TVersion Version() const;
+
+	/**
+     * Closes connection to the radio server.
+     *
+     * @since S60 3.0
+     */
+	IMPORT_C void Close();
+
+//********** TunerUtility control begins
+
+	/**
+     * Request for control of a tuner. If this method returns KErrNone, control of
+     * the tuner has been granted. Control to the tuner must be granted before any
+     * other request can be made.
+     *
+     * @since S60 3.2
+     * @param Tuner type (e.g. FM, AM)
+     * @return A standard system error code.
+     * @see MRadioObserver::RequestTunerControlComplete
+     */
+	IMPORT_C void RequestTunerControl( TRsTuner aTuner );
+
+	/**
+     * Get the capabilities of the radio on the device.
+     *
+     * @since S60 3.2
+     * @param aCaps The capabilities object to fill
+     * @return A standard system error code.
+     */
+	IMPORT_C TInt GetTunerCapabilities( TRsTunerCapabilities& aCaps ) const;
+
+	/**
+     * EnableTunerInOfflineMode on the device.
+     *
+     * @since S60 3.2
+     * @param aEnable ETrue to enable tuner functions in offline mode, EFalse to disable.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt EnableTunerInOfflineMode( TBool aEnable );
+
+	/**
+     * Asynchronous request to set the frequency range. If the frequency range is not set,
+     * it will be defaulted to ERsTunerFM.
+     *
+     * @since S60 3.2
+     * @param aRange Frequency range
+     * @see MRadioObserver::SetFrequencyRangeComplete
+     */
+	IMPORT_C void SetFrequencyRange( TRsFrequencyRange aRange );
+
+	/**
+     * Cancels an outstanding SetFrequencyRange request. Note that SetFrequencyRange may
+     * complete before cancel can occur and a callback may occur.
+     *
+     * @since S60 3.2
+     * @return A standard system error code.
+     */
+	IMPORT_C void CancelSetFrequencyRange();
+
+	/**
+     * Get the current frequency range. It also returns the minimum and maximum frequencies(Hz)
+     * for the returned range.
+     *
+     * @since S60 3.2
+     * @param aRange On return contains the current frequency range.
+     * @param aMinFreq On return contains the minimum frequency for the current frequency range.
+     * @param aMaxFreq On return contains the maximum frequency for the current frequency range.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetFrequencyRange( TRsFrequencyRange& aRange, TInt& aMinFreq, TInt& aMaxFreq ) const;
+
+	/**
+     * Asynchronous request to tune the tuner to the specified frequency.
+     *
+     * @since S60 3.2
+     * @param aFrequency The frequency (Hz) to tune to
+     * @see MRadioObserver::SetFrequecyComplete
+     */
+	IMPORT_C void SetFrequency( TInt aFrequency );
+
+	/**
+     * Cancels an outstanding SetFrequency request. Note that SetFrequency may complete before
+     * cancel can occur and a callback to MRadioObserver::SetFrequencyComplete may occur.
+     *
+     * @since S60 3.0
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C void CancelSetFrequency();
+
+	/**
+     * Get the current frequency.
+     *
+     * @since S60 3.2
+     * @param aFrequency On return contains the current frequency(Hz).
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetFrequency( TInt& aFrequency ) const;
+
+	/**
+     * Asynchronous request to find a radio station, starting from current frequency and
+     * seaching in the direction specified (i.e. up or down).
+     *
+     * @since S60 3.0
+     * @param aSeekUp Search direction
+     * @see MRadioObserver::StationSeekComplete
+     */
+	IMPORT_C void StationSeek( TBool aUpwards );
+
+	/**
+     * Cancels an outstanding StationSeek request. Note that StationSeek may complete before
+     * cancel can occur and a callback to MRadioObserver::StationSeekComplete may occur.
+     *
+     * @since S60 3.0
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C void CancelStationSeek();
+
+	/**
+     * Gets the signal strength of the currently tuned signal.
+     *
+     * @since S60 3.2
+     * @param aStrength On return contains the current signal strength.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetSignalStrength( TInt& aSignalStrength ) const;
+
+	/**
+     * Gets the maximum possible signal strength of a tuned signal.
+     *
+     * @since S60 3.2
+     * @param aMaxStrength On return contains the maximum signal strength.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetMaxSignalStrength( TInt& aMaxSignalStrength ) const;
+
+	/**
+     * Get the stereo mode of the radio.
+     *
+     * @since S60 3.2
+     * @param aStereo On return, will be ETrue if signal is stereo.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetStereoMode( TBool& aStereo ) const;
+
+	/**
+     * Indicates whether the reception should be forced into monophonic mode.
+     *
+     * @since S60 3.2
+     * @param aMono If ETrue, all reception will be in mono mode even if a stereo signal is
+     *		 available. If EFalse, a stereo signal will be received when possible.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt ForceMonoReception( TBool aForcedMono );
+
+	/**
+     * Checks whether force mono reception is on or not.
+     * @since S60 3.2
+     * @param aForceMono ETrue if force mono is on, EFalse otherwise.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetForceMonoReception( TBool& aForcedMono ) const;
+
+	/**
+     * Enable or disable quelch.
+     *
+     * @since S60 3.2
+     * @param aEnabled ETrue to enable squelching, EFalse to disable it.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt SetSquelch( TBool aEnabled );
+
+	/**
+	 * Retrieves the current squelching (muting in frequencies without reception) setting
+     *
+     * @since S60 3.2
+     * @param aSquelch ETrue if a squelching is currently enabled
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetSquelch( TBool& aSquelch ) const;
+
+//********** PlayerUtility control begins
+
+	/**
+     * Retrieve the current state of the player.
+	 * If the radio is already playing, client should simply retrieve current settings such
+     * as volume, etc.
+     *
+     * @since S60 3.2
+     * @return Radio player state.
+     */
+	IMPORT_C TInt PlayerState( TRsPlayerState& aState ) const;
+
+	/**
+     * Starts radio playback.
+     *
+     * @since S60 3.0
+     */
+	IMPORT_C void Play();
+
+	/**
+     * Stops playback, and release the output device for use by other clients.
+     *
+     * @since S60 3.0
+     * @param aIfOnlyPrimaryClient ETrue to stop playback only if there are no other primary clients
+     */
+	IMPORT_C void Stop( TBool aIfOnlyPrimaryClient = EFalse );
+
+	/**
+     * Retrieves the maximum volume supported.
+     *
+     * @since S60 3.0
+     * @param aVolume On return contains the maximum volume.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetMaxVolume( TInt& aMaxVolume ) const;
+
+	/**
+     * Sets the volume to the specified level.
+     *
+     * @since S60 3.0
+     * @param aVolume The volume level to set
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt SetVolume( TInt aVolume );
+
+	/**
+     * Get the current volume.
+     *
+     * @since S60 3.2
+     * @param aVolume On return contains the current volume.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetVolume( TInt& aVolume ) const;
+
+	/**
+     * Set a volume ramp.
+     *
+     * @since S60 3.2
+     * @param aRampInterval The time interval over which the volume should be increased from
+     *		 zero to the current volume setting.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt SetVolumeRamp( const TTimeIntervalMicroSeconds& aRampInterval );
+
+	/**
+     * Mutes or unmutes playback.
+     *
+     * @since S60 3.0
+     * @param aMute ETrue to mute the audio, EFalse to unmute it.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt Mute( TBool aMute );
+
+	/**
+     * Find out if the audio is muted or not.
+     *
+     * @since S60 3.2
+     * @param aVolume On return set to ETrue if audio is muted.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetMuteStatus( TBool& aMute ) const;
+
+	/**
+     * Set the speaker balance for playing.
+     *
+     * @since S60 3.2
+     * @param aLeftPercentage Left speaker volume percentage. This value ranges from 0 to 100.
+     * @param aRightPercentage Right speaker volume percentage. This value ranges from 0 to 100.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt SetBalance( TInt aLeftPercentage, TInt aRightPercentage );
+
+	/**
+     * Get the current speaker balance setting.
+     *
+     * @since S60 3.2
+     * @param aLeftPercentage On return contains the left speaker volume percentage.
+     * @param aRightPercentage On return contains the right speaker volume percentage.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetBalance( TInt& aLeftPercentage, TInt& aRightPercentage ) const;
+
+//********** RDSUtility control begins
+
+	/**
+     * Get the capabilities of the RDS control on the device.
+     *
+     * @since S60 3.2
+     * @param aCaps The capabilities object to fill
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetRdsCapabilities( TRsRdsCapabilities& aCaps ) const;
+
+	/**
+     * Get the status of the RDS reception.
+     *
+     * @since S60 3.2
+     * @param aRdsSignal On return, will be ETrue if RDS signal can be recepted, EFalse otherwise.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetRdsSignalStatus( TBool& aRdsSignal ) const;
+
+	/**
+     * Subscribe for notification for the specified RDS data. Client should first check
+     * the capabilities to see if a feature is supported.
+     * Request for notification for non-supported features will simply be ignored.
+     *
+     * @since S60 3.2
+     * @param aRdsData Bitfield indicating notification request.
+     * @return A standard system/RadioServer error code.
+     * @see MRadioObserver::RadioEventRdsDataPI
+     * @see MRadioObserver::RadioEventRdsDataPTY
+     * @see MRadioObserver::RadioEventRdsDataPS
+     * @see MRadioObserver::RadioEventRdsDataRT
+     * @see MRadioObserver::RadioEventRdsDataCT
+     * @see MRadioObserver::RadioEventRdsDataTA
+     */
+	IMPORT_C TInt NotifyRdsDataChange( TRsRdsData aRdsData );
+
+	/**
+     * Cancel NotifyRdsDataChange request.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelNotifyRdsDataChange();
+
+    /**
+     * Subscribe for notification for the specified RadioText+ data. Client should first check
+     * the capabilities to see if RT+ feature is supported.
+     * Returns KErrNotSupported if RT+ is not supported.
+     *
+     * Note that if the client wishes to receive the entire radio text data chunk, client should
+     * subscribe for ERsRdsRadioText using NotifyRdsDataChange instead.
+     *
+     * @since S60 3.2
+     * @param aRtPlusClasses Array of RT+ class to be notified
+     * @return A standard system/RadioServer error code.
+     * @see MRadioObserver::RadioEventRdsDataRTplus
+     */
+    IMPORT_C TInt NotifyRadioTextPlusChange( RArray<TInt>& aRtPlusClasses );
+
+	/**
+     * Cancel NotifyRadioTextPlusChange request.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelNotifyRadioTextPlusChange();
+
+	/**
+     * Turn on/off automatic switching of frequency based on Alternate Frequency.
+     * This will cause RDS device to search for alternate frequency when the signal strength
+     * deteriorates. User should be ready to receive RadioEventRdsSearchBeginAF and
+     * RadioEventRdsSearchEndAF. Automatic switching is off by default.
+     *
+     * @since S60 3.2
+     * @param aAuto ETrue to turn automatic switching on, EFalse to turn it off.
+     * @return A standard system/RadioServer error code.
+     * @see MRadioObserver::RadioEventRdsSearchBeginAF
+	 * @see MRadioObserver::RadioEventRdsSearchEndAF
+     */
+	IMPORT_C TInt SetAutomaticSwitching( TBool aAuto );
+
+	/**
+     * Find out whether automatic switching is on or off.
+     *
+     * @since S60 3.2
+     * @param aAuto On return, ETrue indicates that automatic switching is enabled.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetAutomaticSwitching( TBool& aAuto );
+
+	/**
+     * Cancel ongoing search for an Alternate Frequency (AF) with stronger signal.
+     *
+     * Client can issue this request to interrupt the search indicated with
+     * MRadioObserver::RadioEventRdsSearchBeginAF.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelAFSearch();
+
+	/**
+     * Turns on/off automatic switching of frequency based on Traffic Announcement.
+     * This will cause RDS device to search for frequencies broadcasting traffic announcement.
+     * Client will be notified of frequency change though the tuner event.
+     * It's up to the client to return to the previous frequency when the traffic announcement
+     * is finished.
+     *
+     * NOTE: This is only supported in dual tuner configuration since the secondary tuner
+     * needs to perform continuous scanning for frequency broadcasting traffic announcement,
+     * while the primary tuner is used for normal tuner activities.
+     *
+     * @since S60 3.2
+     * @param aAuto ETrue indicates that automatic switching is on.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt SetAutomaticTrafficAnnouncement( TBool aAuto );
+
+	/**
+     * Find out whether automatic traffic announcement is enabled.
+     *
+     * @since S60 3.2
+     * @param aAuto On return, ETrue indicates that automatic traffic announcement is on.
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetAutomaticTrafficAnnouncement( TBool& aAuto );
+
+	/**
+     * Asynchronous request to find a radio station with the specified Programme Type(PTY),
+     * starting from the currently tuned frequency and searching in the direction specified
+     * (i.e. up or down). User must be ready to receive callback method StationSeekByPTYComplete
+     * The station found is returned in the callback.
+     *
+     * @since S60 3.2
+     * @param aPty The type of programme to search for.
+     * @param aSeekUp The direction to search in. Searches upwards if set to ETrue.
+     * @see MRadioObserver::StationSeekByPTYComplete
+     */
+	IMPORT_C void StationSeekByPTY( TRsRdsProgrammeType aPty, TBool aSeekUp );
+
+	/**
+     * Asynchronous request to find a radio station with Traffic Announcement(TA),
+     * starting from the currently tuned frequency and searching in the direction specified
+     * (i.e. up or down). User must be ready to receive callback method StationSeekByTAComplete
+     * The station found is returned in the callback.
+     *
+     * @since S60 3.2
+     * @param aSeekUp The direction to search in. Searches upwards if set to ETrue.
+     * @see MRadioObserver::StationSeekByTAComplete
+     */
+	IMPORT_C void StationSeekByTA( TBool aSeekUp );
+
+	/**
+     * Asynchronous request to find a radio station with Traffic Programme(TP),
+     * starting from the currently tuned frequency and searching in the direction specified
+     * (i.e. up or down). User must be ready to receive callback method StationSeekByTPComplete
+     * The station found is returned in the callback.
+     *
+     * @since S60 3.2
+     * @param aSeekUp The direction to search in. Searches upwards if set to ETrue.
+     * @see MRadioObserver::StationSeekByTPComplete
+     */
+	IMPORT_C void StationSeekByTP( TBool aSeekUp );
+
+	/**
+     * Cancels an ongoing retune operation, as initiated by a call to StationSeekByPTY,
+     * StationSeekByTA, or StationSeekByTP.
+     * The usual callback will not occur if this has been called.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelRdsStationSeek();
+
+	/**
+     * Asynchronous request to find all frequencies sending the given Programme Type (PTY).
+     * User must be ready to receive callback method GetFreqByPTYComplete.
+     *
+     * NOTE: This is only supported in dual tuner configuration since the secondary tuner
+     * needs to perform continuous scanning for frequencies broadcasting given Programme Type
+     * while the primary tuner is used for normal tuner activities.
+     * Client should first check the tuner capabilities. Will return KErrNotSupported in
+     * callback method if this feature is not supported.
+     *
+     * @since S60 3.2
+     * @param aPty The type of programme to search for
+     * @see MRadioObserver::GetFreqByPTYComplete
+     */
+	IMPORT_C void GetFreqByPTY( TRsRdsProgrammeType aPty );
+
+	/**
+     * Cancels an ongoing request to find all frequencies sending a given Programme Type (PTY).
+     * The usual callback will not occur if this has been called.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelGetFreqByPTY();
+
+	/**
+     * Asynchronous request to find all frequencies sending Traffic Announcement (TA). User must
+     * be ready to receive callback method GetFreqByTAComplete.
+     *
+     * NOTE: This is only supported in dual tuner configuration since the secondary tuner
+     * needs to perform continuous scanning for frequencies broadcasting given Traffic Announcement
+     * while the primary tuner is used for normal tuner activities.
+     * Client should first check the tuner capabilities. Will return KErrNotSupported in
+     * callback method if this feature is not supported.
+     *
+     * @since S60 3.2
+     * @see MRadioObserver::GetFreqByTAComplete
+     */
+	IMPORT_C void GetFreqByTA();
+
+	/**
+     * Cancels an ongoing request to find all frequencies sending Traffic Announcement.
+     * The usual callback will not occur if this has been called.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelGetFreqByTA();
+
+	/**
+     * Asynchronous request to find all Programme Service names (PS) sending the given Programme
+     * Type (PTY). User must be ready to receive callback method GetPSByPTYComplete.
+     *
+     * NOTE: This is only supported in dual tuner configuration since the secondary tuner
+     * needs to perform continuous scanning for frequencies broadcasting given Programme Type
+     * while the primary tuner is used for normal tuner activities.
+     * Client should first check the tuner capabilities. Will return KErrNotSupported in
+     * callback method if this feature is not supported.
+     *
+     * @since S60 3.2
+     * @param aPty The type of programme to search for
+     * @see MRadioObserver::GetPSByPTYComplete
+     */
+	IMPORT_C void GetPSByPTY( TRsRdsProgrammeType aPty );
+
+	/**
+     * Cancels an ongoing request to find all Programme Service names (PS) sending a given
+     * Programme Type (PTY). The usual callback will not occur if this has been called.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelGetPSByPTY();
+
+	/**
+     * Asynchronous request to find all Programme Service names (PS) sending Traffic Announcement (TA).
+     * User must be ready to receive callback method GetPSByTAComplete.
+     *
+     * NOTE: This is only supported in dual tuner configuration since the secondary tuner
+     * needs to perform continuous scanning for frequencies broadcasting given Traffic Announcement
+     * while the primary tuner is used for normal tuner activities.
+     * Client should first check the tuner capabilities. Will return KErrNotSupported in
+     * callback method if this feature is not supported.
+     *
+     * @since S60 3.2
+     * @see MRadioObserver::GetPSByTAComplete
+     */
+	IMPORT_C void GetPSByTA();
+
+	/**
+     * Cancels an ongoing request to find all Programme Service names (PS) sending Traffic Announcement.
+     * The usual callback will not occur if this has been called.
+     *
+     * @since S60 3.2
+     */
+	IMPORT_C void CancelGetPSByTA();
+
+	/**
+     * Get the current Programme Identification code.
+     * RDS data is received over the air and may not be available immediately following
+     * tune operation. If data is not available, this function will return KErrNotFound.
+     * If a value is returned, this is the last known value, which may not be up to date.
+     * To be notified of the most recent value, client should use NotifyRdsDataChange.
+     *
+     * @since S60 3.2
+     * @param aPi On return contains Programme Identification code
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetProgrammeIdentification( TInt& aPi );
+
+	/**
+     * Get the current Programme Type.
+     * RDS data is received over the air and may not be available immediately following
+     * tune operation. If data is not available, this function will return KErrNotFound.
+     * If a value is returned, this is the last known value, which may not be up to date.
+     * To be notified of the most recent value, client should use NotifyRdsDataChange.
+     *
+     * @since S60 3.2
+     * @param aPty On return contains Programme Type
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetProgrammeType( TRsRdsProgrammeType& aPty );
+
+	/**
+     * Get the current Programme Service name.
+     * RDS data is received over the air and may not be available immediately following
+     * tune operation. If data is not available, this function will return KErrNotFound.
+     * If a value is returned, this is the last known value, which may not be up to date.
+     * To be notified of the most recent value, client should use NotifyRdsDataChange.
+     *
+     * Programme Service name is fixed to 8 characters.
+     *
+     * @since S60 3.2
+     * @param aPs On return contains Programme Service name
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetProgrammeService( TRsRdsPSName& aPs );
+
+	/**
+     * Get the current Radio Text.
+     * RDS data is received over the air and may not be available immediately following
+     * tune operation. If data is not available, this function will return KErrNotFound.
+     * If a value is returned, this is the last known value, which may not be up to date.
+     * To be notified of the most recent value, client should use NotifyRdsDataChange.
+     *
+     * The maximum possible length for radio text field is 64 characters.
+     *
+     * @since S60 3.2
+     * @param aRt On return contains Radio Text
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetRadioText( TRsRdsRadioText& aRt );
+
+    /**
+     * Get the current Radio Text+.
+     * RDS data is received over the air and may not be available immediately following
+     * tune operation. If data is not available, this function will return KErrNotFound.
+     * If a value is returned, this is the last known value, which may not be up to date.
+     * To be notified of the most recent value, client should use NotifyRdsDataChange.
+     *
+     * The maximum possible length for radio text+ field is 64 characters.
+     *
+     * @since S60 3.2
+     * @param aRtPlusClass Radio text plus class
+     * @param aRtPlusData On return contains Radio Text+ field
+     * @return A standard system/RadioServer error code.
+     */
+    IMPORT_C TInt GetRadioTextPlus( TRsRdsRTplusClass aRtPlusClass, TRsRdsRadioText& aRtPlusData );
+
+	/**
+     * Get the current Clock Time and date.
+     * RDS data is received over the air and may not be available immediately following
+     * tune operation. If data is not available, this function will return KErrNotFound.
+     * If a value is returned, this is the last known value, which may not be up to date.
+     * To be notified of the most recent value, client should use NotifyRdsDataChange.
+     *
+     * @since S60 3.2
+     * @param aCt On return contains current time and date
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetClockTime( TDateTime& aCt );
+
+	/**
+     * Get Traffic Announcement status at the current station.
+     *
+     * @since S60 3.2
+     * @param aTaStatus On return, will be ETrue if current station has ongoing traffic announcement
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetTrafficAnnouncementStatus( TBool& aTaStatus );
+
+	/**
+     * Get Traffic Programme status at the current station.
+     *
+     * @since S60 3.2
+     * @param aTpStatus On return, will be ETrue if current station supports traffic programme
+     * @return A standard system/RadioServer error code.
+     */
+	IMPORT_C TInt GetTrafficProgrammeStatus( TBool& aTpStatus );
+
+// from base class MCustomCommand
+
+    /**
+     * From MCustomCommand
+     * Sends a synchronous custom command to the radio server.
+     *
+     * @since S60 3.0
+     * @param aDestination The destination of the message, consisting of the uid of
+     * 		 the interface of this message
+     * @param aFunction The function number to indicate which function is to be called
+     *		 on the interface defined in the aDestination parameter
+     * @param aDataTo1 The first chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @param aDataTo2 The second chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @return A standard system error code.
+     */
+	IMPORT_C  TInt CustomCommandSync( const TMMFMessageDestinationPckg& aDestination,
+					TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2 );
+
+	/**
+     * From MCustomCommand
+     * Sends a synchronous custom command to the radio server.
+     *
+     * @since S60 3.0
+     * @param aDestination The destination of the message, consisting of the uid of
+     *		 the interface of this message
+     * @param aFunction The function number to indicate which function is to be called
+     *		 on the interface defined in the aDestination parameter
+     * @param aDataTo1 The first chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @param aDataTo2 The second chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @param aDataFrom The area of memory to which the controller framework
+     *		 will write any data to be passed back to the client. Can't be KNullDesC8.
+     * @return A standard system error code.
+     */
+	IMPORT_C  TInt CustomCommandSync( const TMMFMessageDestinationPckg& aDestination,
+					TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom );
+
+	/**
+     * From MCustomCommand
+     * Sends an asynchronous custom command to the radio server.
+     *
+     * @since S60 3.0
+     * @param aDestination The destination of the message, consisting of the uid of
+     *		 the interface of this message
+     * @param aFunction The function number to indicate which function is to be called
+     *		 on the interface defined in the aDestination parameter
+     * @param aDataTo1 The first chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @param aDataTo2 The second chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @param aStatus The TRequestStatus of an active object. This will contain the
+     *		 result of the request on completion.  The exact range of result values is
+     *		 dependent on the interface.
+     */
+	IMPORT_C  void CustomCommandAsync( const TMMFMessageDestinationPckg& aDestination,
+					TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TRequestStatus& aStatus );
+
+	/**
+     * From MCustomCommand
+     * Sends an asynchronous custom command to the radio server.
+     *
+     * @since S60 3.0
+     * @param aDestination The destination of the message, consisting of the uid of
+     *		 the interface of this message
+     * @param aFunction The function number to indicate which function is to be called
+     *		 on the interface defined in the aDestination parameter
+     * @param aDataTo1 The first chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @param aDataTo2 The second chunk of data to be copied to the controller
+     *		 framework. The exact contents of the data are dependent on the
+     *		 interface being called. Can be KNullDesC8.
+     * @param aDataFrom The area of memory to which the controller framework
+     *		 will write any data to be passed back to the client. Can't be KNullDesC8.
+     * @param aStatus The TRequestStatus of an active object. This will contain the
+     *		 result of the request on completion.  The exact range of result values is
+     *		 dependent on the interface.
+     */
+	IMPORT_C  void CustomCommandAsync( const TMMFMessageDestinationPckg& aDestination, TInt aFunction,
+					const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom, TRequestStatus& aStatus );
+
+//********** Internal functions begin
+
+	/**
+     * Used internally to cancel outstanding asynchronous requests. This is triggered by
+     * CRadioRequest.
+     *
+     * @since S60 3.0
+     * @param aRequest The outstanding asynchronous request being cancelled
+     */
+	void CancelRequest( TInt aRequest );
+
+private:
+
+	/**
+     * Creates request handlers for each asynchronous request.
+     */
+	void StartRequestHandlersL( MRadioObserver& aObserver );
+
+	/**
+     * Creates event handlers for tuner and playback events from radio tuner.
+     */
+	void StartEventHandlersL( MRadioObserver& aObserver );
+
+	/**
+     * Creates event handlers for RDS events from radio tuner.
+     */
+	void StartRdsEventHandlersL( TUint32 aRdsFunctions );
+
+private:    // Data
+
+	// Connection status
+	TBool iConnected;
+	// Requests that generates response to MRadioObserver
+	RPointerArray<CRadioRequest> iRequests;
+	// Event handlers that generates response to MRadioEventObserver
+	RPointerArray<CRadioEventHandler> iEventHandlers;
+	//Rds Event handlers
+	RPointerArray<CRadioEventHandler> iRdsEventHandlers;
+
+	// Destination information for standard radio interface messages
+	TMMFMessageDestinationPckg iDestinationPckg;
+
+	// Radio observer
+	MRadioObserver* iObserver;
+	// Client type
+	TBool iPrimaryClient;
+	// RDS notify flag
+	TBool iRdsNotify;
+
+	// RadioStubManager pointer points inside RadioStubManagerChunk
+    SRadioStubManager* iRadioStubManager;
+    
+    // RadioStubManagerChunk handle
+    RChunk iRadioStubManagerChunk;
+    
+    CRadioRequest* iExtraRequestForBugHunting;
+    
+    };
+
+#endif      // RADIOSESSION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/radioutility/tsrc/bld.inf	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* 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:
+*
+*/
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+#include "../presetutility/group/bld.inf"
+#include "../radioserver/Session/stub/group/bld.inf"
+#include "../radio_utility/stub/group/bld.inf"
--- a/mmserv/sts/bwins/systemtoneservice.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/bwins/systemtoneservice.def	Wed Aug 18 10:17:22 2010 +0300
@@ -4,4 +4,5 @@
 	?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)
+	?PlayAlarm@CSystemToneService@@QAEXW4TToneType@1@AAIAAVMStsPlayAlarmObserver@@@Z @ 6 NONAME ; void CSystemToneService::PlayAlarm(enum CSystemToneService::TToneType, unsigned int &, class MStsPlayAlarmObserver &)
 
--- a/mmserv/sts/eabi/systemtoneservice.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/eabi/systemtoneservice.def	Wed Aug 18 10:17:22 2010 +0300
@@ -4,4 +4,5 @@
 	_ZN18CSystemToneService8PlayToneENS_9TToneTypeE @ 3 NONAME
 	_ZN18CSystemToneService9PlayAlarmENS_10TAlarmTypeERjR21MStsPlayAlarmObserver @ 4 NONAME
 	_ZN18CSystemToneService9StopAlarmEj @ 5 NONAME
+	_ZN18CSystemToneService9PlayAlarmENS_9TToneTypeERjR21MStsPlayAlarmObserver @ 6 NONAME
 
--- a/mmserv/sts/rom/mmmwsystemtoneservice.iby	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/rom/mmmwsystemtoneservice.iby	Wed Aug 18 10:17:22 2010 +0300
@@ -14,10 +14,6 @@
 * Description: STS IBY file
 *
 */
-/*
- * sts.iby
- *
- */
 
 #ifndef MMMWSYSTEMTONESERVICE_IBY
 #define MMMWSYSTEMTONESERVICE_IBY
@@ -32,4 +28,4 @@
 
 #endif //MMMWSYSTEMTONESERVICE_IBY
 
-//End of File
\ No newline at end of file
+//End of File
--- a/mmserv/sts/src/systemtoneservice.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/src/systemtoneservice.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -68,3 +68,10 @@
     {
     iImplementation.StopAlarm(aAlarmContext);
     }
+
+EXPORT_C void CSystemToneService::PlayAlarm(TToneType aTone,
+				unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
+		{
+		iImplementation.PlayAlarm(aTone, aAlarmContext, aObserver);
+		}			
+	    
--- a/mmserv/sts/sts/inc/sts.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/sts/inc/sts.h	Wed Aug 18 10:17:22 2010 +0300
@@ -22,11 +22,16 @@
 #ifndef STS_H_
 #define STS_H_
 
+
 #include <systemtoneservice.h>
 #include <map>
 
 #include "stsplayer.h"
 
+class MProEngEngine;
+class MProEngProfile;
+
+
 class CSts : private MStsPlayerObserver
     {
 public:
@@ -36,11 +41,15 @@
     void PlayAlarm(CSystemToneService::TAlarmType aAlarm,
             unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
     void StopAlarm(unsigned int aAlarmContext);
+    void PlayToneStop(CSystemToneService::TToneType aTone,
+    	      unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 
 protected:
     CSts();
     virtual ~CSts();
     bool Init();
+    void LoadActiveProfileSettingsL();
+    
 
 private:
     void CleanUpPlayers();
@@ -53,6 +62,16 @@
     class CPlayerNode;
     typedef std::map<unsigned int, CPlayerNode*> TPlayerMap;
     TPlayerMap iPlayerMap;
+    
+    TPtrC iFileName;
+    MProEngEngine* iEngine;
+    MProEngProfile* iProfile;
+
+    TInt  iVolume;
+    TBool iWarningToneEnabled;
+    TUint iAudioPreference;
+    TUint iAudioPriority;
+    
     };
 
 #endif //STS_H
--- a/mmserv/sts/sts/inc/stsplayer.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/sts/inc/stsplayer.h	Wed Aug 18 10:17:22 2010 +0300
@@ -18,11 +18,10 @@
 #ifndef STSPLAYER_H_
 #define STSPLAYER_H_
 
-#include <mdaaudiosampleplayer.h>
-#include <systemtoneservice.h>
 
-class MProEngEngine;
-class MProEngProfile;
+#include <systemtoneservice.h>
+#include <mdaaudiosampleplayer.h>
+
 
 class MStsPlayerObserver
     {
@@ -35,26 +34,28 @@
 public:
 
     static CStsPlayer* CreateTonePlayer(MStsPlayerObserver& aObserver,
-            CSystemToneService::TToneType aTone, unsigned int aContext);
+            CSystemToneService::TToneType aTone, unsigned int aContext, 
+           	const TDesC& aFileName, TInt aVolume, 
+           	TUint aAudioPreference, TUint  aAudioPriority);
     static CStsPlayer* CreateAlarmPlayer(MStsPlayerObserver& aObserver,
-            CSystemToneService::TAlarmType aAlarm, unsigned int aContext);
+            CSystemToneService::TAlarmType aAlarm, unsigned int aContext,
+            const TDesC& aFileName, TInt aVolume,
+    				TUint aAudioPreference, TUint  aAudioPriority);	
     virtual ~CStsPlayer();
     void Play();
     void Stop();
-
-
-protected:
+    
     
-    void LoadActiveProfileSettingsL();
-    void SetToneSettings(CSystemToneService::TToneType aTone);
-    void SetAlarmSettings(CSystemToneService::TAlarmType aAlarm);
+protected:
+        
     CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName,
-    int aRepeatNumberOfTimes, unsigned int aContext);
+    int aRepeatNumberOfTimes, unsigned int aContext,
+    TInt aVolume, TUint aAudioPreference, TUint aAudioPriority);
     bool Init();
 
 private:
     void MapcInitComplete(TInt aError,
-            const TTimeIntervalMicroSeconds& aDuration);
+    const TTimeIntervalMicroSeconds& aDuration);
     void MapcPlayComplete(TInt aError);
 
     MStsPlayerObserver& iObserver;
@@ -63,14 +64,11 @@
     int iRepeatNumberOfTimes;
     unsigned int iContext;
 
-    MProEngEngine* iEngine;
-    MProEngProfile* iProfile;
-
-    TInt iVolume;
+	TInt  iVolume;
     TBool iWarningToneEnabled;
     TUint iAudioPreference;
     TUint iAudioPriority;
-
+		
     };
 
 #endif // STSPLAYER_H_
--- a/mmserv/sts/sts/src/sts.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/sts/src/sts.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -17,6 +17,15 @@
  */
 
 #include "sts.h"
+#include <AudioPreference.h>
+#include <MProEngEngine.h>
+#include <MProEngProfile.h>
+#include <MProEngTones.h>
+#include <MProEngToneSettings.h>
+#include <ProEngFactory.h>
+
+_LIT(KDefaultFile,"z:\\data\\sounds\\digital\\clock.aac");
+
 
 class CSts::CPlayerNode
     {
@@ -66,15 +75,21 @@
 /*static*/CSts* CSts::Create()
     {
     CSts* self = new CSts();
+     
     if (self != 0)
         {
         bool successful = self->Init();
-        if (!successful)
-            {
+       
+        if(successful)
+        {	
+        	TRAPD( err ,self->LoadActiveProfileSettingsL());
+        	if( (err != KErrNone ) && (!successful))
+           {
             delete self;
             self = 0;
-            }
+           }
         }
+      }
     return self;
     }
 
@@ -90,18 +105,112 @@
 
 bool CSts::Init()
     {
+    iEngine =  ProEngFactory::NewEngineL();
     return true;
     }
 
 CSts::~CSts()
     {
     CleanUpPlayers();
+    if (iProfile)
+        {
+        iProfile->Release();
+        }
+    	if (iEngine)
+        {
+        iEngine->Release();
+        }
+        
     }
 
+
+void CSts::LoadActiveProfileSettingsL()
+	{
+		if(!iEngine)
+		   	{
+		   		iEngine =  ProEngFactory::NewEngineL();
+        	}
+		
+        if (iEngine)
+            iProfile = iEngine->ActiveProfileL();
+	    
+	    if (iProfile)
+	        {
+             MProEngToneSettings& settings  = iProfile->ToneSettings();
+             iWarningToneEnabled = settings.WarningAndGameTones();
+	        }
+      
+  }
+
 void CSts::PlayTone(CSystemToneService::TToneType aTone)
     {
+    if(iProfile)
+    
+    {
+    	MProEngTones&         tones = iProfile->ProfileTones();
+		
+			switch (aTone)
+				{
+				case CSystemToneService::EEmailAlert:
+					{
+				    	iFileName.Set(tones.EmailAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg ;
+				    	break;
+				    }
+				case CSystemToneService::ESmsAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break; 
+				    }
+				case CSystemToneService::EMmsAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break;
+				  	}
+				case CSystemToneService::EChatAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS ;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break;
+				    } 
+				case CSystemToneService::EWarningBeep:
+				    {
+				    	iAudioPreference = KAudioPrefWarning;
+				    	iAudioPriority =  KAudioPriorityWarningTone ;
+				    	if (iWarningToneEnabled)
+				      	  iFileName.Set(KDefaultFile);
+				    	else
+				      	  iVolume = 0;
+				    
+				    	break;
+				    }
+				default:
+					{
+					  	iFileName.Set(KDefaultFile);
+					  	iAudioPreference = KAudioPrefDefaultTone;
+				        iAudioPriority = KAudioPriorityWarningTone ;
+				      break;
+				    }
+				}
+			}
+			
+		else
+		{			 
+				 iFileName.Set(KDefaultFile);
+				 iAudioPreference = KAudioPrefDefaultTone;
+				 iAudioPriority = KAudioPriorityWarningTone ;
+		}
+		
+		
     CStsPlayer* player = CStsPlayer::CreateTonePlayer(*this, aTone,
-            iNextContext);
+            iNextContext, iFileName, iVolume, 
+            iAudioPreference, iAudioPriority);
     if (player != 0)
         {
         iPlayerMap[iNextContext] = new CPlayerNode(player);
@@ -119,8 +228,55 @@
 void CSts::PlayAlarm(CSystemToneService::TAlarmType aAlarm,
         unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
     {
+    
+    if(iProfile)
+    
+   		 {
+    		MProEngTones&         tones = iProfile->ProfileTones();
+		 
+		 	switch (aAlarm)
+        	{
+        	case CSystemToneService::EIncomingCall:
+        		{
+            		iFileName.Set(tones.RingingTone1());
+            		iAudioPreference = KAudioPrefIncomingCall ;
+					iAudioPriority = KAudioPriorityRingingTone ;
+            		break;
+            	}
+       		case CSystemToneService::EIncomingCallLine2:
+       			{
+            		iFileName.Set(tones.RingingTone2());
+            		iAudioPreference = KAudioPrefIncomingCall;
+					iAudioPriority = KAudioPriorityRingingTone ;
+            		break;  
+            	}
+            case CSystemToneService::EIncomingDataCall:
+            	{
+            		iFileName.Set(tones.VideoCallRingingTone());
+            		iAudioPreference = KAudioPrefIncomingDataCall;
+		    		iAudioPriority = KAudioPriorityRealOnePlayer;
+            		break;
+            	}
+        	default:
+        		{
+        			iFileName.Set(KDefaultFile);
+        			iAudioPreference = KAudioPrefAlarmClock  ;
+					iAudioPriority = KAudioPriorityAlarm;
+					break;
+            	}
+       		}
+      	}
+      else
+		{		
+			     iFileName.Set(KDefaultFile);	 
+				 iAudioPreference = KAudioPrefDefaultTone;
+				 iAudioPriority = KAudioPriorityWarningTone ;
+				 
+		}  
+    	
     CStsPlayer* player = CStsPlayer::CreateAlarmPlayer(*this, aAlarm,
-            iNextContext);
+             iNextContext, iFileName, iVolume, 
+             iAudioPreference, iAudioPriority);
     if (player != 0)
         {
         iPlayerMap[iNextContext] = new CPlayerNode(player, aObserver);
@@ -152,6 +308,95 @@
         }
     }
 
+
+void CSts::PlayToneStop(CSystemToneService::TToneType aTone,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
+    {
+    
+    if(iProfile)
+    
+    {
+    	MProEngTones&         tones = iProfile->ProfileTones();
+		
+			switch (aTone)
+				{
+				case CSystemToneService::EEmailAlert:
+					{
+				    	iFileName.Set(tones.EmailAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg ;
+				    	break;
+				    }
+				case CSystemToneService::ESmsAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break; 
+				    }
+				case CSystemToneService::EMmsAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break;
+				  	}
+				case CSystemToneService::EChatAlert:
+					{
+				    	iFileName.Set(tones.MessageAlertTone());
+				    	iAudioPreference = KAudioPrefNewSMS ;
+				    	iAudioPriority = KAudioPriorityRecvMsg;
+				    	break;
+				    } 
+				case CSystemToneService::EWarningBeep:
+				    {
+				    	iAudioPreference = KAudioPrefWarning;
+				    	iAudioPriority =  KAudioPriorityWarningTone ;
+				    	if (iWarningToneEnabled)
+				      	  iFileName.Set(KDefaultFile);
+				    	else
+				      	  iVolume = 0;
+				    
+				    	break;
+				    }
+				default:
+					{
+					  	iFileName.Set(KDefaultFile);
+					  	iAudioPreference = KAudioPrefDefaultTone;
+				        iAudioPriority = KAudioPriorityWarningTone ;
+				      break;
+				    }
+				}
+			}
+			
+		else
+		{			 
+				 iFileName.Set(KDefaultFile);
+				 iAudioPreference = KAudioPrefDefaultTone;
+				 iAudioPriority = KAudioPriorityWarningTone ;
+		}
+    	
+    CStsPlayer* player = CStsPlayer::CreateTonePlayer(*this, aTone,
+             iNextContext, iFileName, iVolume, 
+             iAudioPreference, iAudioPriority);
+    if (player != 0)
+        {
+        iPlayerMap[iNextContext] = new CPlayerNode(player, aObserver);
+        aAlarmContext = iNextContext;
+        iNextContext++;
+        if (iNextContext == 0)
+            iNextContext++;
+        player->Play();
+        }
+    else
+        {
+        //TODO: Add trace here
+        aAlarmContext = 0;
+        }
+    }
+
+
+
 void CSts::CleanUpPlayers()
     {
         while (!iPlayerMap.empty())
--- a/mmserv/sts/sts/src/stsplayer.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/sts/src/stsplayer.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -17,40 +17,20 @@
  */
 #include "stsplayer.h"
 #include <AudioPreference.h>
-#include <MProEngEngine.h>
-#include <MProEngProfile.h>
-#include <MProEngTones.h>
-#include <MProEngToneSettings.h>
-#include <ProEngFactory.h>
 #include <systemtoneservice.h>
 
 
-_LIT(KDefaultFile,"z:\\data\\sounds\\digital\\clock.aac");
-
-
-
-
 
 /*static*/CStsPlayer* CStsPlayer::CreateTonePlayer(
-        MStsPlayerObserver& aObserver, CSystemToneService::TToneType aTone,
-        unsigned int aContext)
+        MStsPlayerObserver& aObserver,CSystemToneService::TToneType aTone,
+       	unsigned int aContext, const TDesC& aFileName, TInt aVolume,
+       	TUint aAudioPreference, TUint  aAudioPriority)
     {
     CStsPlayer* self = 0;
-     
-    self = new CStsPlayer(aObserver, KDefaultFile, 0, aContext);
     
-    if( self != 0)
-    	{
-    		TRAPD(err,self->LoadActiveProfileSettingsL());
-             
-    		if( err == KErrNone )
-       		self->SetToneSettings(aTone);
-    		else 
-        {
-          delete self;
-          self = 0;
-         }
-        	        
+    self = new CStsPlayer(aObserver, aFileName, 0, aContext, aVolume, aAudioPreference, aAudioPriority);
+    
+           	        
     		if (self != 0)
          {
             bool successful = self->Init();
@@ -60,30 +40,21 @@
                self = 0;
             }
           }
-        }
+        
     return self;
     }
 
 /*static*/CStsPlayer* CStsPlayer::CreateAlarmPlayer(
         MStsPlayerObserver& aObserver, CSystemToneService::TAlarmType aAlarm,
-        unsigned int aContext)
+        unsigned int aContext, const TDesC& aFileName, TInt aVolume,
+       	TUint aAudioPreference, TUint  aAudioPriority)
     {
     CStsPlayer* self = 0;
-   	
-   	self = new CStsPlayer(aObserver, KDefaultFile, 10, aContext);
+   
    	
-   	if( self != 0)
-    	{		
-   			TRAPD(err,self->LoadActiveProfileSettingsL());
-   			
-   			if( err == KErrNone )
-   	    	self->SetAlarmSettings(aAlarm); 
-   			else 
-   	  	 {
-   	    	 delete self;
-   	     	 self = 0;
-   	   		}           
-   
+   	self = new CStsPlayer(aObserver, aFileName, 10, aContext, aVolume, aAudioPreference, aAudioPriority);
+   	
+     
     	if (self != 0)
       	  {
         	  bool successful = self->Init();
@@ -93,132 +64,21 @@
                	self = 0;
             }	
         	}
-        }
+        
     return self;
     }
 
-void CStsPlayer::LoadActiveProfileSettingsL()
-	{
-		if(!iEngine)
-		   	{
-		   		iEngine =  ProEngFactory::NewEngineL();
-        	}
-		
-        if (iEngine)
-            iProfile = iEngine->ActiveProfileL();
-	    
-	    if (iProfile)
-	        {
-             MProEngToneSettings& settings  = iProfile->ToneSettings();
-             iWarningToneEnabled = settings.WarningAndGameTones();
-	        }
-     
-     
-     
-     
-  }
-
-void CStsPlayer::SetToneSettings(CSystemToneService::TToneType aTone)
-	{
-		
-    if(iProfile)
-    
-    {
-    	MProEngTones&         tones = iProfile->ProfileTones();
-		
-			switch (aTone)
-				{
-				case CSystemToneService::EEmailAlert:
-				    iFileName.Set(tones.EmailAlertTone());
-				    iAudioPreference = KAudioPrefNewSMS;
-				    iAudioPriority = KAudioPriorityRecvMsg ;
-				    break;
-				case CSystemToneService::ESmsAlert:
-				    iFileName.Set(tones.MessageAlertTone());
-				    iAudioPreference = KAudioPrefNewSMS;
-				    iAudioPriority = KAudioPriorityRecvMsg;
-				    break; 
-				case CSystemToneService::EMmsAlert:
-				    iFileName.Set(tones.MessageAlertTone());
-				    iAudioPreference = KAudioPrefNewSMS;
-				    iAudioPriority = KAudioPriorityRecvMsg;
-				    break;
-				case CSystemToneService::EChatAlert:
-				    iFileName.Set(tones.MessageAlertTone());
-				    iAudioPreference = KAudioPrefNewSMS ;
-				    iAudioPriority = KAudioPriorityRecvMsg;
-				    break; 
-				case CSystemToneService::EWarningBeep:
-				    iAudioPreference = KAudioPrefWarning;
-				    iAudioPriority =  KAudioPriorityWarningTone ;
-				    if (iWarningToneEnabled)
-				        iFileName.Set(KDefaultFile);
-				    else
-				        iVolume = 0;
-				        
-				    break;
-				default:
-					iAudioPreference = KAudioPrefDefaultTone;
-				    iAudioPriority = KAudioPriorityWarningTone ;
-				    break;
-				}
-			}
-			
-		else
-		{			 
-				 iAudioPreference = KAudioPrefDefaultTone;
-				 iAudioPriority = KAudioPriorityWarningTone ;
-		}
-		
-	}	
-	
-	
-void CStsPlayer::SetAlarmSettings(CSystemToneService::TAlarmType aAlarm)
-	{
-		if(iProfile)
-    
-   		 {
-    		MProEngTones&         tones = iProfile->ProfileTones();
-		 
-		 	switch (aAlarm)
-        	{
-        	case CSystemToneService::EIncomingCall:
-            	iFileName.Set(tones.RingingTone1());
-            	iAudioPreference = KAudioPrefIncomingCall ;
-				iAudioPriority = KAudioPriorityRingingTone ;
-            	break;
-       		case CSystemToneService::EIncomingCallLine2:
-            	iFileName.Set(tones.RingingTone2());
-            	iAudioPreference = KAudioPrefIncomingCall;
-				iAudioPriority = KAudioPriorityRingingTone ;
-            	break;  
-            case CSystemToneService::EIncomingDataCall:
-            	iFileName.Set(tones.VideoCallRingingTone());
-            	iAudioPreference = KAudioPrefIncomingDataCall;
-		    	iAudioPriority = KAudioPriorityRealOnePlayer;
-            	break;
-        	default:
-        		iAudioPreference = KAudioPrefAlarmClock  ;
-				iAudioPriority = KAudioPriorityAlarm;
-            	break;
-       		}
-      	}
-      else
-		{			 
-				 iAudioPreference = KAudioPrefDefaultTone;
-				 iAudioPriority = KAudioPriorityWarningTone ;
-		}  
-	}	
 
 
 
 
 CStsPlayer::CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName,
-        int aRepeatNumberOfTimes, unsigned int aContext) :
+        int aRepeatNumberOfTimes, unsigned int aContext, TInt aVolume, TUint aAudioPreference, TUint aAudioPriority ) :
     iObserver(aObserver), iPlayer(0), iFileName(aFileName),
-            iRepeatNumberOfTimes(aRepeatNumberOfTimes), iContext(aContext)
+            iRepeatNumberOfTimes(aRepeatNumberOfTimes), iContext(aContext), iVolume(aVolume),
+            iAudioPreference(aAudioPreference), iAudioPriority(aAudioPriority)
     {
-    	iEngine =  ProEngFactory::NewEngineL();
+    	
     }
 
 bool CStsPlayer::Init()
@@ -233,15 +93,7 @@
 
 CStsPlayer::~CStsPlayer()
     {
-    	if (iProfile)
-        {
-        iProfile->Release();
-        }
-    	if (iEngine)
-        {
-        iEngine->Release();
-        }
-        
+    	
     delete iPlayer; 
     
     }
--- a/mmserv/sts/stsproxy/inc/stsimplementation.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsproxy/inc/stsimplementation.h	Wed Aug 18 10:17:22 2010 +0300
@@ -34,6 +34,9 @@
     PlayAlarm(CSystemToneService::TAlarmType aAlarm,
             unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
     void StopAlarm(unsigned int aAlarmContext);
+    void
+    PlayAlarm(CSystemToneService::TToneType aTone,
+            unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 private:
     CStsImplementation();
     bool Init();
--- a/mmserv/sts/stsproxy/src/rstssession.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsproxy/src/rstssession.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -295,6 +295,26 @@
         }
     }
 
+void RStsSession::SendPlayToneForStop(CSystemToneService::TToneType aTone,
+        unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver)
+    {
+    TPckg<unsigned int> alarmContextPckg(aAlarmContext);
+    TInt err = SendReceive(StsMsg_PlayTone, TIpcArgs(aTone,
+            &alarmContextPckg, &aObserver));
+    if (err != KErrNone)
+        {
+        //TODO: Log a message
+        aObserver.PlayAlarmComplete(aAlarmContext);
+        }
+    else
+        {
+        iObserverMutex.Wait();
+        iObserverMap[aAlarmContext] = &aObserver;
+        iObserverMutex.Signal();
+        }
+   }   
+    
+
 void RStsSession::CleanUpObservers()
     {
     iObserverMutex.Wait();
--- a/mmserv/sts/stsproxy/src/rstssession.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsproxy/src/rstssession.h	Wed Aug 18 10:17:22 2010 +0300
@@ -39,6 +39,9 @@
             unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver);
 
     void SendStopAlarm(unsigned int aAlarmContext);
+    
+    void SendPlayToneForStop(CSystemToneService::TToneType aTone,
+    	      unsigned int& aAlarmContext,  MStsPlayAlarmObserver& aObserver);
 
 private:
 
--- a/mmserv/sts/stsproxy/src/stsimplementation.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsproxy/src/stsimplementation.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -78,3 +78,9 @@
     //TODO: Add logging and error checking
     iSession->SendStopAlarm(aAlarmContext);
     }
+    
+void CStsImplementation::PlayAlarm(CSystemToneService::TToneType aTone,
+	      unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) 
+	   {  
+	   	iSession->SendPlayToneForStop(aTone, aAlarmContext, aObserver);  
+		 }
--- a/mmserv/sts/stsserver/group/stsserver.mmp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsserver/group/stsserver.mmp	Wed Aug 18 10:17:22 2010 +0300
@@ -49,4 +49,4 @@
 LIBRARY        libc.lib
 LIBRARY        libstdcpp.lib
 LIBRARY        mediaclientaudio.lib
-LIBRARY        profileengine.lib
\ No newline at end of file
+LIBRARY        profileengine.lib
--- a/mmserv/sts/stsserver/inc/stsclientservercommon.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsserver/inc/stsclientservercommon.h	Wed Aug 18 10:17:22 2010 +0300
@@ -38,6 +38,7 @@
     StsMsg_StopAlarm,
     StsMsg_PlayTone,
     StsMsg_PlayAlarm,
+    StsMsg_PlayToneStop,
     StsMsg_ENDMARKER
     };
 
--- a/mmserv/sts/stsserver/src/stsserversession.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsserver/src/stsserversession.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -114,6 +114,27 @@
     iSts.StopAlarm(context);
     }
 
+void CStsServerSession::DoPlayToneStopL(const RMessage2& aMessage)
+    {
+    CSystemToneService::TToneType tone =
+            (CSystemToneService::TToneType) aMessage.Int0();
+    unsigned int context = 0;
+    //SR
+    //iSts.PlayTone(tone, context, *this);
+    iSts.PlayToneStop(tone, 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::CleanUpObservers()
     {
     while (!iObserverMap.empty())
--- a/mmserv/sts/stsserver/src/stsserversession.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/sts/stsserver/src/stsserversession.h	Wed Aug 18 10:17:22 2010 +0300
@@ -47,6 +47,7 @@
     void DoPlayToneL(const RMessage2& aMessage);
     void DoPlayAlarmL(const RMessage2& aMessage);
     void DoStopAlarmL(const RMessage2& aMessage);
+    void DoPlayToneStopL(const RMessage2& aMessage);
 
     void CleanUpObservers();
     
--- a/mmserv/tms/inc/tmscallclisrv.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmscallclisrv.h	Wed Aug 18 10:17:22 2010 +0300
@@ -53,6 +53,7 @@
     TMS_ROUTING_OUTPUT_GET,
     TMS_ROUTING_PREVIOUSOUTPUT_GET,
     TMS_ROUTING_AVAILABLE_OUTPUT_GET,
+    TMS_GET_ACTIVE_CALL_PARAMS,
 
     //For TMS Format
     TMS_FORMAT_SETCODECMODE,
@@ -69,10 +70,7 @@
     TMS_FORMAT_SETCNG,
     TMS_FORMAT_GETCNG,
     TMS_FORMAT_SETPLC,
-    TMS_FORMAT_GETPLC,
-    TMS_DTMF_START,
-    TMS_DTMF_STOP,
-    TMS_DTMF_CONTINUE
+    TMS_FORMAT_GETPLC
     };
 
 struct TMSCliSrvStreamCreateDataStruct
@@ -124,6 +122,15 @@
 typedef TPckgBuf<TMSCliSrvDataXferChunkHndlDataStruct>
         TMSCliSrvDataXferChunkHndlDataStructBufPckg;
 
+struct TmsCallMsgBuf
+    {
+    gint iRequest;
+    gint iStatus;
+    gboolean iBool;
+    gint iInt;
+    };
+typedef TPckgBuf<TmsCallMsgBuf> TmsCallMsgBufPckg;
+
 } //namespace TMS
 
 #endif // TMSCALLCLISRV_H
--- a/mmserv/tms/inc/tmsclientserver.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmsclientserver.h	Wed Aug 18 10:17:22 2010 +0300
@@ -58,8 +58,7 @@
     ETMSRingTonePause,
     ETMSRingToneStop,
     ETMSRingToneMute,
-    ETMSStartDTMFNotifier,
-    ETMSCancelDTMFNotifier,
+    ETMSInitDTMF,
     ETMSStartDTMF,
     ETMSStopDTMF,
     ETMSContinueDTMF,
@@ -82,7 +81,8 @@
     EGlobalEffectsPsVolume = 10,
     EGlobalEffectsPsGain,
     ERoutingPs,
-    EDtmfPs
+    EDtmfPs,
+    ESyncVolume
     };
 
 // TMSServer message queue notifier type keys
--- a/mmserv/tms/inc/tmsdtmfbody.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmsdtmfbody.h	Wed Aug 18 10:17:22 2010 +0300
@@ -42,3 +42,4 @@
 } //namespace TMS
 
 #endif //TMS_GLOBAL_ROUTING_BODY_H
+
--- a/mmserv/tms/inc/tmsdtmfimpl.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmsdtmfimpl.h	Wed Aug 18 10:17:22 2010 +0300
@@ -32,14 +32,11 @@
     IMPORT_C static gint Delete(TMSDTMF*& dtmf);
 
 private:
-    TMSDTMFImpl(TMSStreamType streamtype);
-    gint PostConstruct();
-    gint SetParent(TMSDTMF*& parent);
-
-private:
-    TMSStreamType iStreamType;
+    TMSDTMFImpl();
+    gint PostConstruct(TMSStreamType streamtype);
     };
 
 } //namespace TMS
 
 #endif //TMS_DTMF_IMPL_H
+
--- a/mmserv/tms/inc/tmsproxy.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmsproxy.h	Wed Aug 18 10:17:22 2010 +0300
@@ -93,6 +93,7 @@
     IMPORT_C gint MuteRT();
 
     // TMSDTMF
+    IMPORT_C gint InitDTMFPlayer(TMSStreamType streamtype);
     IMPORT_C gint StartDTMF(TMSStreamType streamtype, GString* tone);
     IMPORT_C gint StopDTMF(TMSStreamType streamtype);
     IMPORT_C gint ContinueDTMFStringSending(TBool continuesending);
@@ -102,8 +103,6 @@
     IMPORT_C gint StopInbandTone();
 
     // Global notifiers
-    IMPORT_C gint StartDTMFNotifier();
-    IMPORT_C gint CancelDTMFNotifier();
     IMPORT_C gint StartGlobalEffectNotifier();
     IMPORT_C gint CancelGlobalEffectNotifier();
     IMPORT_C gint StartRoutingNotifier();
--- a/mmserv/tms/inc/tmsstreambody.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmsstreambody.h	Wed Aug 18 10:17:22 2010 +0300
@@ -55,10 +55,9 @@
     virtual gint Start(gint retrytime) = 0;
     virtual gint Stop() = 0;
     virtual void Deinit() = 0;
-
-private:
     };
 
 } //namespace TMS
 
 #endif //TMS_STREAM_BODY_H
+
--- a/mmserv/tms/inc/tmsstreamimpl.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmsstreamimpl.h	Wed Aug 18 10:17:22 2010 +0300
@@ -45,4 +45,3 @@
 
 #endif // TMS_STREAM_IMPL_H
 
-// End of file
--- a/mmserv/tms/inc/tmsutility.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/inc/tmsutility.h	Wed Aug 18 10:17:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2006-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"
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description: Telephony Multimedia Service
+ * Description:  Tracing and convertion utility.
  *
  */
 
@@ -60,6 +60,7 @@
 #define RET_REASON_IF_ERR(s) if(s!=0) return s
 
 #define TMSRESULT(result) TMSUtility::TMSResult(result)
+#define SYMBIANRESULT(result) TMSUtility::SymbianResult(result)
 #define TOTMSOUTPUT(output) TMSUtility::ToTMSOutput(output)
 #define TOTAROUTPUT(output) TMSUtility::ToTAROutput(output)
 #define TOFOURCC(format) TMSUtility::ToFourCC(format)
@@ -73,6 +74,7 @@
     {
 public:
     IMPORT_C static gint TMSResult(const gint error);
+    IMPORT_C static TInt SymbianResult(const gint error);
     IMPORT_C static gint EtelToTMSResult(const gint error);
     IMPORT_C static TMSAudioOutput ToTMSOutput(
             CTelephonyAudioRouting::TAudioOutput taroutput);
--- a/mmserv/tms/rom/tms.iby	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/rom/tms.iby	Wed Aug 18 10:17:22 2010 +0300
@@ -1,28 +1,26 @@
 /*
-* 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: Telephony Multimedia Service
-*
-*/
-/*
- * tms.iby
+ * 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: Telephony Multimedia Service
  *
  */
 
-#ifndef __TMS_IBY__
-#define __TMS_IBY__
+#ifndef TMS_IBY
+#define TMS_IBY
 
+#include <data_caging_paths_for_iby.hrh>
 #include <bldvariant.hrh>
+
 #ifdef FF_TMS
 
 file=ABI_DIR/BUILD_DIR/tmsapi.dll         SHARED_LIB_DIR/tmsapi.dll
@@ -39,6 +37,6 @@
 
 #endif //FF_TMS
 
-#endif //__TMS_IBY__
+#endif //TMS_IBY
 
 //End of File
\ No newline at end of file
--- a/mmserv/tms/tmscallserver/eabi/tmscallserver.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/eabi/tmscallserver.def	Wed Aug 18 10:17:22 2010 +0300
@@ -1,33 +1,25 @@
 EXPORTS
 	_ZN3TMS13TMSCallServer11StartThreadEPv @ 1 NONAME
-	_ZTIN3TMS11TMSCallAdptE @ 2 NONAME
-	_ZTIN3TMS11TMSIPUplinkE @ 3 NONAME
-	_ZTIN3TMS13TMSCallCSAdptE @ 4 NONAME
-	_ZTIN3TMS13TMSCallIPAdptE @ 5 NONAME
-	_ZTIN3TMS13TMSCallServerE @ 6 NONAME
-	_ZTIN3TMS13TMSIPDownlinkE @ 7 NONAME
-	_ZTIN3TMS14TMSCallSessionE @ 8 NONAME
-	_ZTIN3TMS14TMSTarSettingsE @ 9 NONAME
-	_ZTIN3TMS15TMSDTMFProviderE @ 10 NONAME
-	_ZTIN3TMS15TMSDtmfNotifierE @ 11 NONAME
-	_ZTIN3TMS17TMSCallDelayTimerE @ 12 NONAME
-	_ZTIN3TMS18TMSEtelDtmfMonitorE @ 13 NONAME
-	_ZTIN3TMS19TMSIPCallStreamBaseE @ 14 NONAME
-	_ZTIN3TMS22TMSAudioDtmfTonePlayerE @ 15 NONAME
-	_ZTIN3TMS22TMSEtelDtmfStopMonitorE @ 16 NONAME
-	_ZTVN3TMS11TMSCallAdptE @ 17 NONAME
-	_ZTVN3TMS11TMSIPUplinkE @ 18 NONAME
-	_ZTVN3TMS13TMSCallCSAdptE @ 19 NONAME
-	_ZTVN3TMS13TMSCallIPAdptE @ 20 NONAME
-	_ZTVN3TMS13TMSCallServerE @ 21 NONAME
-	_ZTVN3TMS13TMSIPDownlinkE @ 22 NONAME
-	_ZTVN3TMS14TMSCallSessionE @ 23 NONAME
-	_ZTVN3TMS14TMSTarSettingsE @ 24 NONAME
-	_ZTVN3TMS15TMSDTMFProviderE @ 25 NONAME
-	_ZTVN3TMS15TMSDtmfNotifierE @ 26 NONAME
-	_ZTVN3TMS17TMSCallDelayTimerE @ 27 NONAME
-	_ZTVN3TMS18TMSEtelDtmfMonitorE @ 28 NONAME
-	_ZTVN3TMS19TMSIPCallStreamBaseE @ 29 NONAME
-	_ZTVN3TMS22TMSAudioDtmfTonePlayerE @ 30 NONAME
-	_ZTVN3TMS22TMSEtelDtmfStopMonitorE @ 31 NONAME
+	_ZTIN3TMS10TMSSyncVolE @ 2 NONAME
+	_ZTIN3TMS11TMSCallAdptE @ 3 NONAME
+	_ZTIN3TMS11TMSIPUplinkE @ 4 NONAME
+	_ZTIN3TMS13TMSCallCSAdptE @ 5 NONAME
+	_ZTIN3TMS13TMSCallIPAdptE @ 6 NONAME
+	_ZTIN3TMS13TMSCallServerE @ 7 NONAME
+	_ZTIN3TMS13TMSIPDownlinkE @ 8 NONAME
+	_ZTIN3TMS14TMSCallSessionE @ 9 NONAME
+	_ZTIN3TMS14TMSTarSettingsE @ 10 NONAME
+	_ZTIN3TMS17TMSCallDelayTimerE @ 11 NONAME
+	_ZTIN3TMS19TMSIPCallStreamBaseE @ 12 NONAME
+	_ZTVN3TMS10TMSSyncVolE @ 13 NONAME
+	_ZTVN3TMS11TMSCallAdptE @ 14 NONAME
+	_ZTVN3TMS11TMSIPUplinkE @ 15 NONAME
+	_ZTVN3TMS13TMSCallCSAdptE @ 16 NONAME
+	_ZTVN3TMS13TMSCallIPAdptE @ 17 NONAME
+	_ZTVN3TMS13TMSCallServerE @ 18 NONAME
+	_ZTVN3TMS13TMSIPDownlinkE @ 19 NONAME
+	_ZTVN3TMS14TMSCallSessionE @ 20 NONAME
+	_ZTVN3TMS14TMSTarSettingsE @ 21 NONAME
+	_ZTVN3TMS17TMSCallDelayTimerE @ 22 NONAME
+	_ZTVN3TMS19TMSIPCallStreamBaseE @ 23 NONAME
 
--- a/mmserv/tms/tmscallserver/group/tmscallserver.mmp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/group/tmscallserver.mmp	Wed Aug 18 10:17:22 2010 +0300
@@ -52,11 +52,7 @@
 SOURCE          tmscsdownlink.cpp
 SOURCE          tmscsuplink.cpp
 SOURCE          tmstarsettings.cpp
-SOURCE          tmsdtmftoneplayer.cpp
-SOURCE          tmsdtmfprovider.cpp
-SOURCE          tmseteldtmfmonitor.cpp
-SOURCE          tmseteldtmfstopmonitor.cpp
-SOURCE          tmsdtmfnotifier.cpp
+SOURCE          tmsyncvol.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../inc
@@ -99,10 +95,6 @@
 LIBRARY         profileengine.lib
 LIBRARY         telephonyaudiorouting.lib
 LIBRARY         tmsutility.lib
-// Libraries for ETel
-LIBRARY         etelmm.lib
-LIBRARY         etel.lib
-LIBRARY         customapi.lib
 
 DEFFILE         tmscallserver.def
 NOSTRICTDEF
--- a/mmserv/tms/tmscallserver/inc/tmscalladpt.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscalladpt.h	Wed Aug 18 10:17:22 2010 +0300
@@ -26,6 +26,14 @@
 // TMSCallAdpt class
 class TMSCallAdpt
     {
+protected:
+    enum TMSStreamState
+        {
+        EIdle = 0,
+        EInitialized,
+        EActivated
+        };
+
 public:
     static gint CreateCallL(gint callType, TMSCallAdpt*& callAdpt);
     virtual ~TMSCallAdpt();
@@ -93,10 +101,8 @@
     virtual gint GetPreviousOutput(TMSAudioOutput& output) = 0;
     virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf) = 0;
 
-    // From TMSDTMF
-    virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr) = 0;
-    virtual gint StopDTMF(const TMSStreamType streamtype) = 0;
-    virtual gint ContinueDTMF(const gboolean sending) = 0;
+    void GetCallType(TMSCallType& callType);
+    gboolean IsUplActivated();
 
 protected:
     TMSCallAdpt();
@@ -105,10 +111,12 @@
 protected:
     gint iGlobalVol;
     gint iGlobalGain;
+    TMSStreamState iUplState;
+    TMSStreamState iDnlState;
+    gint iCallType;
     };
 
 } //namespace TMS
 
 #endif // CALLADPT_H
 
-// End of file
--- a/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h	Wed Aug 18 10:17:22 2010 +0300
@@ -25,10 +25,8 @@
 #include <etelmm.h>
 #include <rmmcustomapi.h>
 #include "tmsclientserver.h"
-#include "tmsdtmftoneplayerobserver.h"
 #include "tmscalladpt.h"
 #include "tmscsdevsoundobserver.h"
-#include "tmsdtmfobserver.h"
 
 namespace TMS {
 
@@ -36,18 +34,14 @@
 class TMSCSUplink;
 class TMSCSDownlink;
 class TMSTarSettings;
-class TMSAudioDtmfTonePlayer;
-class TMSDTMFProvider;
-class TMSDtmfNotifier;
+class TMSSyncVol;
 
 /*
  * TMSCallCSAdpt class
  */
 class TMSCallCSAdpt : public TMSCallAdpt,
                       public TMSCSDevSoundObserver,
-                      public MTelephonyAudioRoutingObserver,
-                      public TMSDTMFTonePlayerObserver,
-                      public TMSDTMFObserver
+                      public MTelephonyAudioRoutingObserver
     {
 public:
 	static TMSCallCSAdpt* NewL();
@@ -117,25 +111,12 @@
     virtual gint GetPreviousOutput(TMSAudioOutput& output);
     virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf);
 
-	// From TMSDTMF
-    virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr);
-    virtual gint StopDTMF(const TMSStreamType streamtype);
-    virtual gint ContinueDTMF(const gboolean sending);
-
     //From TMSCSDevSoundObserver
     void DownlinkInitCompleted(gint status);
     void UplinkInitCompleted(gint status);
     void DownlinkActivationCompleted(gint status);
     void UplinkActivationCompleted(gint status);
 
-    //From TMSDTMFTonePlayerObserver
-    void DTMFInitCompleted(gint status);
-    void DTMFToneFinished(gint status);
-
-    //From TMSDTMFObserver
-    void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
-            const gint status, const TChar tone);
-
 private:
     TMSCallCSAdpt();
     void ConstructL();
@@ -157,23 +138,18 @@
     TMSCSDownlink* iCSDownlink;
     CTelephonyAudioRouting* iRouting;
     TMSTarSettings* iTarSettings;
-    TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
-    TMSDtmfNotifier* iDTMFNotifier;
-    TMSDTMFProvider* iDTMFUplinkPlayer;
 
     // Message queues for communication and data transfer back to the client
     RMsgQueue<TmsMsgBuf> iMsgQueueUp;
     RMsgQueue<TmsMsgBuf> iMsgQueueDn;
     TmsMsgBuf iMsgBuffer;
 
-    gboolean iUplinkInitialized;
     gint iUplinkStreamId;
-    gboolean iDnlinkInitialized;
     gint iDnlinkStreamId;
+    TMSSyncVol* iResetVolNotifier;
     };
 
 } //namespace TMS
 
 #endif // CALLCSADPT_H
 
-// End of file
--- a/mmserv/tms/tmscallserver/inc/tmscallipadpt.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscallipadpt.h	Wed Aug 18 10:17:22 2010 +0300
@@ -25,8 +25,6 @@
 #include "tmsshared.h"
 #include "tmscalladpt.h"
 #include "tmsipcallstream.h"
-#include "tmsdtmftoneplayer.h"
-#include "tmsdtmfnotifier.h"
 
 namespace TMS {
 
@@ -38,8 +36,7 @@
  * TMSCallIPAdpt class
  */
 class TMSCallIPAdpt : public TMSCallAdpt,
-                      public TMSIPDevSoundObserver,
-                      public TMSDTMFTonePlayerObserver
+                      public TMSIPDevSoundObserver
     {
 public:
     static TMSCallIPAdpt* NewL();
@@ -109,11 +106,6 @@
     virtual gint GetPreviousOutput(TMSAudioOutput& output);
     virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf);
 
-	// From TMSDTMF
-    virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr);
-    virtual gint StopDTMF(const TMSStreamType streamtype);
-    virtual gint ContinueDTMF(const gboolean sending);
-
     // From TMS codec formats
     gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype);
     gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype);
@@ -138,10 +130,6 @@
     void DownlinkStarted(gint status);
     void UplinkStarted(gint status);
 
-    //From TMSDTMFTonePlayerObserver
-    void DTMFInitCompleted(gint status);
-    void DTMFToneFinished(gint status);
-
 private:
     TMSCallIPAdpt();
     void ConstructL();
@@ -149,7 +137,6 @@
     gint OpenDownlink(const RMessage2& message, const gint retrytime);
     gint OpenUplink(const RMessage2& message, const gint retrytime);
 
-    gint InitDTMF(TMSStreamType strmtype);
     void GetSupportedBitRatesL(CBufFlat*& brbuffer);
     void NotifyClient(const gint strmId, const gint command,
             const gint status = KErrNone, const gint64 int64 = TInt64(0));
@@ -158,17 +145,13 @@
     gint iNextStreamId;
     TMSIPUplink* iIPUplink;
     TMSIPDownlink* iIPDownlink;
-    TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
-    TMSDtmfNotifier* iDTMFNotifier;
-    TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer;
+
     // Message queues for communication and data transfer back to the client
     RMsgQueue<TmsMsgBuf> iMsgQueueUp;
     RMsgQueue<TmsMsgBuf> iMsgQueueDn;
     TmsMsgBuf iMsgBuffer;
 
-    gboolean iUplinkInitialized;
     gint iUplinkStreamId;
-    gboolean iDnlinkInitialized;
     gint iDnlinkStreamId;
 
     TMMFPrioritySettings iPriority;
--- a/mmserv/tms/tmscallserver/inc/tmscallsession.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscallsession.h	Wed Aug 18 10:17:22 2010 +0300
@@ -87,10 +87,7 @@
     void HandleRoutingGetOutputL(const RMessage2& aMessage);
     void HandleRoutingGetPreviousOutputL(const RMessage2& aMessage);
     void HandleRoutingGetAvailableOutputsL(const RMessage2& aMessage);
-
-    void HandleDTMFStart(const RMessage2& aMessage);
-    void HandleDTMFStop(const RMessage2& aMessage);
-    void HandleDTMFContinue(const RMessage2& aMessage);
+    void HandleGetActiveCallL(const RMessage2& aMessage);
 
 private:
     TMSCallServer& iTMSCallServer;
--- a/mmserv/tms/tmscallserver/inc/tmsdtmfnotifier.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef DTMFNOTIFIER_H
-#define DTMFNOTIFIER_H
-
-//  INCLUDES
-#include <e32property.h>
-#include <sounddevice.h>
-#include "tmsclientserver.h"
-
-namespace TMS {
-
-// CLASS DECLARATION
-class TMSDtmfNotifier
-    {
-public:
-    // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static TMSDtmfNotifier* NewL();
-
-    /**
-     * Destructor.
-     */
-    virtual ~TMSDtmfNotifier();
-
-public:
-    // New functions
-
-    void SetDtmf(TmsMsgBufPckg dtmfpckg, gboolean publish = TRUE);
-
-private:
-
-    /**
-     * C++ default constructor.
-     */
-    TMSDtmfNotifier();
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private:
-    gint iVolume;
-    };
-
-} //namespace TMS
-
-#endif // DTMFNOTIFIER_H
-
-// End of File
--- a/mmserv/tms/tmscallserver/inc/tmsdtmfobserver.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef TMSDTMFOBSERVER_H
-#define TMSDTMFOBSERVER_H
-
-#include <e32base.h>
-
-namespace TMS {
-
-/**
- * CCP DTMF related events observer class.
- * This class is used for notifying DTMF specific events.
- */
-class TMSDTMFObserver
-    {
-public:
-
-    /** DTMF Events */
-    enum TCCPDtmfEvent
-        {
-        /** Unknown */
-        ECCPDtmfUnknown = 0,
-        /** DTMF sending started manually */
-        ECCPDtmfManualStart = 5,
-        /** DTMF sending stopped manually */
-        ECCPDtmfManualStop = 6,
-        /** DTMF sending aborted manually */
-        ECCPDtmfManualAbort = 7,
-        /** Automatic DTMF sending initialized */
-        ECCPDtmfSequenceStart = 9,
-        /** Automatic DTMF sending stopped */
-        ECCPDtmfSequenceStop = 10,
-        /** Automatic DTMF sending aborted */
-        ECCPDtmfSequenceAbort = 11,
-        /** There was stop mark in DTMF string */
-        ECCPDtmfStopInDtmfString,
-        /** DTMF sending completed succesfully */
-        ECCPDtmfStringSendingCompleted
-        };
-
-    //protected:
-    /**
-     * Protects the observer being deleted through the observer interface.
-     */
-    //virtual inline ~TMSDTMFObserver() {};
-
-public:
-
-    /**
-     * HandleDTMFEvents.
-     * @param event Event type
-     * @param status Error code
-     * @param tone Character
-     * @return none
-     */
-    virtual void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
-            const gint status, const TChar tone) /*const*/ = 0;
-    };
-
-} //namespace TMS
-
-#endif // TMSDTMFOBSERVER_H
-
-// End of File
--- a/mmserv/tms/tmscallserver/inc/tmsdtmfprovider.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef TMSDTMFPROVIDER_H
-#define TMSDTMFPROVIDER_H
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <glib.h>
-#include <rmmcustomapi.h>
-#include "tmsdtmfobserver.h"
-
-namespace TMS {
-
-// FORWARD DECLARATIONS
-class TMSEtelDtmfMonitor;
-class TMSEtelDtmfStopMonitor;
-
-/**
- * TMSDTMFProvider class
- * Makes asynchronic request to ETel interface according to given request type.
- * Provides canceling via CActive::Cancel().
- */
-class TMSDTMFProvider : public CActive
-    {
-public:
-
-    /**
-     * Two phased constructing of the DTMF provider instance.
-     * @param aPhone mobile phone handle
-     * @param aMmCustom custom API handle for special DTMF event
-     *        monitoring.
-     * @return the DTMF provider instance
-     */
-    static TMSDTMFProvider* NewL();
-
-    /**
-     * C++ default destructor
-     */
-    virtual ~TMSDTMFProvider();
-
-    /**
-     * HandleDTMFEvents.
-     * @param aEvent Event type
-     * @param aError Error code
-     * @param aTone Character
-     */
-    void NotifyDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent aEvent,
-            const gint aError, const TChar aTone);
-
-    // from base class MCCPDTMFProvider
-    /**
-     * Cancels asynchronous DTMF string sending.
-     * @return KErrNone if succesfull, otherwise another system wide error code
-     */
-    gint CancelDtmfStringSending();
-
-    /**
-     * Starts the transmission of a single DTMF tone across a
-     * connected and active call.
-     * @param aTone Tone to be played.
-     * @return KErrNone if succesfull, otherwise another system wide error code
-     */
-    gint StartDtmfTone(const TChar aTone);
-
-    /**
-     * Stops playing current DTMF tone.
-     * @return KErrNone if succesfull, otherwise another system wide error code
-     */
-    gint StopDtmfTone();
-
-    /**
-     * Plays DTMF string.
-     * @param aString String to be played.
-     * @return KErrNone if succesfull, otherwise another system wide error code
-     * KErrArgument if the specified string contains illegal DTMF characters
-     */
-    gint SendDtmfToneString(const TDesC& aString);
-
-    /**
-     * Continue or cancel sending DTMF string which was stopped with 'w'
-     * character in string.
-     * @param aContinue ETrue if sending of the DTMF string should continue,
-     * EFalse if the rest of the DTMF string is to be discarded.
-     * @return KErrNone if succesfull, otherwise another system wide error code
-     */
-    gint ContinueDtmfStringSending(const gboolean aContinue);
-
-    /**
-     * Add an observer for DTMF related events.
-     * Plug-in dependent feature if duplicates or more than one observers
-     * are allowed or not. Currently CCE will set only one observer.
-     * @param aObserver Observer
-     * @leave system error if observer adding fails
-     */
-    void AddObserver(const TMSDTMFObserver& aObserver);
-
-    /**
-     * Remove an observer.
-     * @param aObserver Observer
-     * @return KErrNone if removed succesfully. KErrNotFound if observer was
-     * not found. Any other system error depending on the error.
-     */
-    gint RemoveObserver(const TMSDTMFObserver& aObserver);
-
-    // from base class CActive
-protected:
-    /**
-     * From CActive
-     * RunL
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     * Cancels the monitor
-     */
-    void DoCancel();
-
-private:
-    /**
-     * Constructs the requester.
-     *
-     * @param aPhone handle to ETel phone
-     * @param aMmCustom custom API handle
-     */
-    TMSDTMFProvider();
-
-    /**
-     * Constructing the provider in the second phase.
-     */
-    void ConstructL();
-
-private:
-    /**
-     * DTMF event observer.
-     */
-    RPointerArray<TMSDTMFObserver> iObservers;
-
-    /**
-     * ETel phone handle for DTMF functionality.
-     */
-    RMobilePhone iPhone;
-
-    /**
-     * Monitor for DTMF events and changes.
-     * Own.
-     */
-    TMSEtelDtmfMonitor* iMonitor;
-
-    /**
-     * Monitor for DTMF stopping.
-     * Own.
-     */
-    TMSEtelDtmfStopMonitor* iStopMonitor;
-
-    /**
-     * Custom API reference.
-     */
-    RMmCustomAPI iMmCustom;
-
-    RTelServer iServer;
-    TBuf<25> iTsyname;
-    };
-
-} //namespace TMS
-
-#endif //TMSDTMFPROVIDER_H
--- a/mmserv/tms/tmscallserver/inc/tmsdtmftoneplayer.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef TMSAUDIODTMFTONEPLAYER_H
-#define TMSAUDIODTMFTONEPLAYER_H
-
-// INCLUDES
-#include <glib.h>
-#include <sounddevice.h>
-#include "tmsdtmftoneplayerobserver.h"
-
-// FORWARD DECLARATIONS
-class CMMFDevSound;
-
-// CLASS DECLARATION
-
-/**
- *  Plays DTMF tones using media server
- */
-
-namespace TMS {
-
-class TMSAudioDtmfTonePlayer : public MDevSoundObserver
-    {
-public:
-    // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static TMSAudioDtmfTonePlayer* NewL(TMSDTMFTonePlayerObserver& obsrvr,
-            guint audioPreference, guint audioPriority);
-
-    /**
-     * Destructor.
-     */
-    virtual ~TMSAudioDtmfTonePlayer();
-
-public:
-
-    /**
-     * Sets volume.
-     * @param aVolume volume value or KDtmfSilent.
-     * @return None.
-     */
-    void SetVolume(gint volume);
-
-    /**
-     * Starts playing given dtmf tone infinitely.
-     * @param aTone Tone to be played.
-     * @return None.
-     */
-    void PlayDtmfTone(TDes& tone);
-
-    /**
-     * Cancels playing.
-     * @param None.
-     * @return None.
-     */
-    void Cancel();
-
-public:
-    //From MDevSoundObserver
-    /**
-     * See MDevSoundObserver
-     */
-    void InitializeComplete(TInt aError);
-
-    /**
-     * See MDevSoundObserver
-     */
-    void ToneFinished(TInt aError);
-
-    /**
-     * See MDevSoundObserver
-     */
-    void BufferToBeFilled(CMMFBuffer* /*aBuffer*/) {}
-
-    /**
-     * See MDevSoundObserver
-     */
-    void PlayError(TInt /*aError*/) {}
-
-    /**
-     * See MDevSoundObserver
-     */
-    void BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) {}
-
-    /**
-     * See MDevSoundObserver
-     */
-    void RecordError(TInt /*aError*/) {}
-
-    /**
-     * See MDevSoundObserver
-     */
-    void ConvertError(TInt /*aError*/) {}
-    /**
-     * See MDevSoundObserver
-     */
-    void DeviceMessage(TUid /*aMessageType*/, const TDesC8& /*aMsg*/) {}
-
-protected:
-
-    /**
-     * C++ default constructor.
-     */
-    TMSAudioDtmfTonePlayer(TMSDTMFTonePlayerObserver& obsrvr,
-            guint audioPreference, guint audioPriority);
-
-    void ConstructL();
-
-    /**
-     * Normalize tone.
-     * @param aTone dtmf tone.
-     * @return None.
-     */
-    void Normalize(TChar& tone);
-
-private:
-    //new functions
-
-    /**
-     * Converts the given value to the one that matches tha range used by
-     * CMMFDevSound. The CMMFDevSound uses valuess that can from 0 to the
-     * value returned by a call to CMMFDevSound::MaxVolume().
-     */
-    gint ConvertVolumeLevel(gint volume);
-
-protected:
-    // Data
-
-    // Current volume setting.
-    gint iVolume;
-
-    // DTMF player instance
-    CMMFDevSound* iDTMFPlayer;
-
-    TMSDTMFTonePlayerObserver& iObserver;
-    guint iPref;
-    guint iPrior;
-    };
-
-} //namespace TMS
-
-#endif // TMSAUDIODTMFTONEPLAYER_H
-
-// End of File
--- a/mmserv/tms/tmscallserver/inc/tmsdtmftoneplayerobserver.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef DTMFTONEPLAYEROBSERVER_H
-#define DTMFTONEPLAYEROBSERVER_H
-
-#include <glib.h>
-
-namespace TMS {
-
-/**
- *  Observer interface for knowing when dtmf tone player has been initialized.
- */
-class TMSDTMFTonePlayerObserver
-    {
-public:
-    virtual void DTMFInitCompleted(gint status) = 0;
-    virtual void DTMFToneFinished(gint status) = 0;
-    };
-} //namespace TMS
-
-#endif // DTMFTONEPLAYEROBSERVER_H
-
--- a/mmserv/tms/tmscallserver/inc/tmseteldtmfmonitor.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef TMSETELDTMFMONITOR_H
-#define TMSETELDTMFMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <rmmcustomapi.h>
-
-namespace TMS {
-
-// FORWARD DECLARATIONS
-class TMSCSPCall;
-class TMSDTMFProvider;
-
-/**
- * TMSEtelDtmfMonitor class
- *
- * Monitors ETel for DTMF events.
- *
- * This monitor is applied only for listening incoming calls, i.e.
- * line capabilites are not monitored.
- *
- * @lib csplugin.dll
- *
- */
-class TMSEtelDtmfMonitor : public CActive
-    {
-public:
-    /**
-     * Two-phased constructing for the monitor.
-     *
-     * @param aObserver the observer for getting notification
-     * @param aMmCustom Custom API handle
-     */
-    static TMSEtelDtmfMonitor* NewL(TMSDTMFProvider& aObserver,
-            RMmCustomAPI& aMmCustom);
-
-    /**
-     * C++ default destructor
-     */
-    virtual ~TMSEtelDtmfMonitor();
-
-    /**
-     * Start monitoring call events
-     */
-    void StartMonitoring();
-
-protected: // From CActive
-    /**
-     * From CActive
-     * RunL
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     * Cancels the monitor
-     */
-    void DoCancel();
-
-private:
-    /**
-     * C++ default constructor
-     * @param aObserver the observer for status change (incoming call)
-     * @param aMmCustom Custom API handle
-     */
-    TMSEtelDtmfMonitor(TMSDTMFProvider& aObserver, RMmCustomAPI& aMmCustom);
-
-private:
-    /**
-     * Forwards events.
-     */
-    TMSDTMFProvider& iObserver;
-
-    /**
-     * Event data. Updated when event occurs.
-     */
-    RMmCustomAPI::TDtmfInfo iEventData;
-
-    /**
-     * Custom API reference.
-     */
-    RMmCustomAPI& iMmCustom;
-    };
-
-} //namespace TMS
-
-#endif // TMSETELDTMFMONITOR_H
-
--- a/mmserv/tms/tmscallserver/inc/tmseteldtmfstopmonitor.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef TMSETELDTMFSTOPMONITOR_H
-#define TMSETELDTMFSTOPMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-namespace TMS {
-
-// FORWARD DECLARATIONS
-class TMSDTMFProvider;
-
-/**
- * TMSEtelDtmfStopMonitor class
- *
- * Monitors single ETel RMobilePhone for DTMF events.
- *
- * This monitor is applied only for listening incoming calls, i.e.
- * line capabilites are not monitored.
- *
- */
-class TMSEtelDtmfStopMonitor : public CActive
-    {
-public:
-    /**
-     * Two-phased constructing for the monitor.
-     *
-     * @param aObserver the observer for getting notification
-     * @param aPhone the line to monitor
-     */
-    static TMSEtelDtmfStopMonitor* NewL(TMSDTMFProvider& aObserver,
-            RMobilePhone& aPhone);
-
-    /**
-     * C++ default destructor
-     */
-    virtual ~TMSEtelDtmfStopMonitor();
-
-    /**
-     * Start monitoring call events
-     */
-    void StartMonitoring();
-
-protected: // From CActive
-    /**
-     * From CActive
-     * RunL
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     * Cancels the monitor
-     */
-    void DoCancel();
-
-private:
-    /**
-     * C++ default constructor
-     * @param aObserver the observer for status change (incoming call)
-     * @param aPhone the line associated with the call
-     */
-    TMSEtelDtmfStopMonitor(TMSDTMFProvider& aObserver, RMobilePhone& aPhone);
-
-private:
-    /**
-     * Forwards events.
-     */
-    TMSDTMFProvider& iObserver;
-
-    /**
-     * Phone that is being observed for incoming call.
-     */
-    RMobilePhone& iPhone;
-
-    /**
-     * Event received.
-     */
-    RMobilePhone::TMobilePhoneDTMFEvent iEventData;
-
-    };
-
-} //namespace TMS
-
-#endif // TMSETELDTMFSTOPMONITOR_H
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmscallserver/inc/tmssyncvol.h	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ *
+ * Contributors:
+ *
+ * Description: Telephony Multimedia Service
+ *
+ */
+
+#ifndef TMSSYNCVOL_H
+#define TMSSYNCVOL_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <e32property.h>
+#include <sounddevice.h>
+#include "tmsclientserver.h"
+
+namespace TMS {
+
+// CLASS DECLARATION
+class TMSSyncVol
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Two-phased constructor.
+     */
+    static TMSSyncVol* NewL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~TMSSyncVol();
+
+public:
+    // New functions
+
+    void SetSyncVol(TBool syncvol = ETrue);
+
+private:
+
+    /**
+     * C++ default constructor.
+     */
+    TMSSyncVol();
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL();
+
+private:
+    gint iVolume; //Volume
+    };
+
+} //namespace TMS
+
+#endif // TMSSYNCVOL_H
+
+// End of File
--- a/mmserv/tms/tmscallserver/src/tmscalladpt.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscalladpt.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -53,8 +53,9 @@
 gint TMSCallAdpt::CreateCallL(gint callType, TMSCallAdpt*& callAdpt)
     {
     TRACE_PRN_FN_ENT;
+    gint retVal(TMS_RESULT_SUCCESS);
     TMSCallAdpt* self(NULL);
-    gint retVal(TMS_RESULT_SUCCESS);
+
     switch (callType)
         {
         case TMS_CALL_IP:
@@ -63,6 +64,7 @@
             if (self)
                 {
                 retVal = self->PostConstruct();
+                self->iCallType = callType;
                 if (retVal != TMS_RESULT_SUCCESS)
                     {
                     delete self;
@@ -77,6 +79,7 @@
             if (self)
                 {
                 retVal = self->PostConstruct();
+                self->iCallType = callType;
                 if (retVal != TMS_RESULT_SUCCESS)
                     {
                     delete self;
@@ -93,4 +96,23 @@
     return retVal;
     }
 
-// End of file
+// -----------------------------------------------------------------------------
+// TMSCallAdpt::GetCallType
+//
+// -----------------------------------------------------------------------------
+//
+void TMSCallAdpt::GetCallType(TMSCallType& callType)
+    {
+    callType = iCallType;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSCallAdpt::IsUplActivated
+//
+// -----------------------------------------------------------------------------
+//
+gboolean TMSCallAdpt::IsUplActivated()
+    {
+    return (iUplState == EActivated)? TRUE : FALSE;
+    }
+
--- a/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -26,9 +26,7 @@
 #include "tmsshared.h"
 #include "tmsclientserver.h"
 #include "tmstarsettings.h"
-#include "tmsdtmftoneplayer.h"
-#include "tmsdtmfprovider.h"
-#include "tmsdtmfnotifier.h"
+#include "tmssyncvol.h"
 
 using namespace TMS;
 
@@ -58,9 +56,7 @@
     iCSUplink = NULL;
     iRouting = NULL;
     iTarSettings = NULL;
-    iDTMFDnlinkPlayer = NULL;
-    iDTMFUplinkPlayer = NULL;
-    iDTMFNotifier = NULL;
+    iResetVolNotifier = NULL;
     TRACE_PRN_FN_EXT;
     }
 
@@ -84,11 +80,9 @@
 
     delete iRouting;
     delete iTarSettings;
-    delete iDTMFUplinkPlayer;
-    delete iDTMFDnlinkPlayer;
-    delete iDTMFNotifier;
     delete iCSUplink;
     delete iCSDownlink;
+    delete iResetVolNotifier;
 
     if (iMsgQueueUp.Handle() > 0)
         {
@@ -112,8 +106,8 @@
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_SUCCESS);
     iNextStreamId = 1;
-    iUplinkInitialized = FALSE;
-    iDnlinkInitialized = FALSE;
+    iUplState = EIdle;
+    iDnlState = EIdle;
     TRACE_PRN_FN_EXT;
     return status;
     }
@@ -133,12 +127,11 @@
         case TMS_STREAM_UPLINK:
             {
             status = TMS_RESULT_ALREADY_EXIST;
-            if (!iUplinkInitialized)
+            if (iUplState == EIdle)
                 {
                 iUplinkStreamId = iNextStreamId;
                 outStrmId = iUplinkStreamId;
                 iNextStreamId++;
-                //iUplinkInitialized = TRUE; //not initialized yet!
                 status = TMS_RESULT_SUCCESS;
                 }
             break;
@@ -146,12 +139,11 @@
         case TMS_STREAM_DOWNLINK:
             {
             status = TMS_RESULT_ALREADY_EXIST;
-            if (!iDnlinkInitialized)
+            if (iDnlState == EIdle)
                 {
                 iDnlinkStreamId = iNextStreamId;
                 outStrmId = iDnlinkStreamId;
                 iNextStreamId++;
-                //iDnlinkInitialized = TRUE; //not initialized yet!
                 status = TMS_RESULT_SUCCESS;
                 }
             break;
@@ -242,15 +234,6 @@
         {
         TRAP(status, iCSUplink = TMSCSUplink::NewL(*this, retrytime));
         }
-    if (!iDTMFUplinkPlayer && status == TMS_RESULT_SUCCESS)
-        {
-        TRAP(status, iDTMFUplinkPlayer = TMSDTMFProvider::NewL());
-        iDTMFUplinkPlayer->AddObserver(*this);
-        }
-    if (!iDTMFNotifier && status == TMS_RESULT_SUCCESS)
-        {
-        TRAP(status, iDTMFNotifier = TMSDtmfNotifier::NewL());
-        }
     return status;
     }
 
@@ -275,15 +258,6 @@
         {
         TRAP(status, iTarSettings = TMSTarSettings::NewL());
         }
-    if (!iDTMFDnlinkPlayer && status == TMS_RESULT_SUCCESS)
-        {
-        TRAP(status, iDTMFDnlinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
-                KAudioDTMFString, KAudioPriorityDTMFString));
-        }
-    if (!iDTMFNotifier && status == TMS_RESULT_SUCCESS)
-        {
-        TRAP(status, iDTMFNotifier = TMSDtmfNotifier::NewL());
-        }
     return status;
     }
 
@@ -301,7 +275,8 @@
         {
         case TMS_STREAM_UPLINK:
             {
-            if (iCSUplink && strmId == iUplinkStreamId)
+            if (iCSUplink && strmId == iUplinkStreamId &&
+                    iUplState == EInitialized)
                 {
                 iCSUplink->Activate(retrytime);
                 status = TMS_RESULT_SUCCESS;
@@ -310,7 +285,16 @@
             }
         case TMS_STREAM_DOWNLINK:
             {
-            if (iCSDownlink && strmId == iDnlinkStreamId)
+            if(!iResetVolNotifier)
+                {
+                TRAP(status, iResetVolNotifier = TMSSyncVol::NewL());
+                }
+            if(iResetVolNotifier)
+                {
+                iResetVolNotifier->SetSyncVol();
+                }
+            if (iCSDownlink && strmId == iDnlinkStreamId &&
+                    iDnlState == EInitialized)
                 {
                 iCSDownlink->Activate(retrytime);
                 status = TMS_RESULT_SUCCESS;
@@ -359,6 +343,7 @@
             if (iCSUplink && strmId == iUplinkStreamId)
                 {
                 iCSUplink->Deactivate();
+                iUplState = EInitialized;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
                 }
@@ -369,6 +354,7 @@
             if (iCSDownlink && strmId == iDnlinkStreamId)
                 {
                 iCSDownlink->Deactivate();
+                iDnlState = EInitialized;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
                 }
@@ -402,16 +388,18 @@
             if (iCSUplink && strmId == iUplinkStreamId)
                 {
                 iCSUplink->Deactivate();
-                iUplinkInitialized = FALSE;
+                iUplState = EIdle;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iUplinkStreamId, ECmdUplinkDeInitComplete, status);
                 }
             break;
+            }
         case TMS_STREAM_DOWNLINK:
+            {
             if (iCSDownlink && strmId == iDnlinkStreamId)
                 {
                 iCSDownlink->Deactivate();
-                iDnlinkInitialized = FALSE;
+                iDnlState = EIdle;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iDnlinkStreamId, ECmdDownlinkDeInitComplete,
                         status);
@@ -445,7 +433,7 @@
             if (strmId == iUplinkStreamId)
                 {
                 iUplinkStreamId = -1;
-                iUplinkInitialized = FALSE;
+                iUplState = EIdle;
                 }
             break;
             }
@@ -454,7 +442,7 @@
             if (strmId == iDnlinkStreamId)
                 {
                 iDnlinkStreamId = -1;
-                iDnlinkInitialized = FALSE;
+                iDnlState = EIdle;
                 }
             break;
             }
@@ -521,7 +509,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSDownlink && iDnlinkInitialized)
+    if (iCSDownlink && iDnlState != EIdle)
         {
         volume = iCSDownlink->MaxVolume();
         status = TMS_RESULT_SUCCESS;
@@ -540,7 +528,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSDownlink && iDnlinkInitialized)
+    if (iCSDownlink && iDnlState != EIdle)
         {
         iCSDownlink->SetVolume(volume);
         status = TMS_RESULT_SUCCESS;
@@ -559,7 +547,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSDownlink && iDnlinkInitialized)
+    if (iCSDownlink && iDnlState != EIdle)
         {
         volume = iCSDownlink->Volume();
         status = TMS_RESULT_SUCCESS;
@@ -577,7 +565,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSUplink && iUplinkInitialized)
+    if (iCSUplink && iUplState != EIdle)
         {
         gain = iCSUplink->MaxGain();
         status = TMS_RESULT_SUCCESS;
@@ -596,7 +584,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSUplink && iUplinkInitialized)
+    if (iCSUplink && iUplState != EIdle)
         {
         iCSUplink->SetGain(gain);
         status = TMS_RESULT_SUCCESS;
@@ -615,7 +603,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSUplink && iUplinkInitialized)
+    if (iCSUplink && iUplState != EIdle)
         {
         gain = iCSUplink->Gain();
         status = TMS_RESULT_SUCCESS;
@@ -633,7 +621,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSDownlink && iDnlinkInitialized)
+    if (iCSDownlink && iDnlState != EIdle)
         {
         volume = iCSDownlink->MaxVolume();
         status = TMS_RESULT_SUCCESS;
@@ -653,7 +641,7 @@
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
     iGlobalVol = volume;
-    if (iCSDownlink && iDnlinkInitialized)
+    if (iCSDownlink && iDnlState != EIdle)
         {
         iCSDownlink->SetVolume(volume);
         status = TMS_RESULT_SUCCESS;
@@ -671,7 +659,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSDownlink && iDnlinkInitialized)
+    if (iCSDownlink && iDnlState != EIdle)
         {
         volume = iCSDownlink->Volume();
         status = TMS_RESULT_SUCCESS;
@@ -689,7 +677,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSUplink && iUplinkInitialized)
+    if (iCSUplink && iUplState != EIdle)
         {
         gain = iCSUplink->MaxGain();
         status = TMS_RESULT_SUCCESS;
@@ -709,7 +697,7 @@
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
     iGlobalGain = gain;
-    if (iCSUplink && iUplinkInitialized)
+    if (iCSUplink && iUplState != EIdle)
         {
         iCSUplink->SetGain(gain);
         status = TMS_RESULT_SUCCESS;
@@ -727,7 +715,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iCSUplink && iUplinkInitialized)
+    if (iCSUplink && iUplState != EIdle)
         {
         gain = iCSUplink->Gain();
         status = TMS_RESULT_SUCCESS;
@@ -942,7 +930,6 @@
         status = TMS_RESULT_SUCCESS;
         output = TOTMSOUTPUT(taroutput);
         }
-
     TRACE_PRN_FN_EXT;
     return status;
     }
@@ -984,10 +971,8 @@
         RBufWriteStream stream;
         stream.Open(*outputsbuf);
         CleanupClosePushL(stream);
-
         TArray<CTelephonyAudioRouting::TAudioOutput>
                 availableOutputs = iRouting->AvailableOutputs();
-
         guint numOfItems = availableOutputs.Count();
         count = numOfItems;
         for (guint i = 0; i < numOfItems; i++)
@@ -995,7 +980,6 @@
             tmsoutput = TOTMSOUTPUT(availableOutputs[i]);
             stream.WriteUint32L(tmsoutput);
             }
-
         CleanupStack::PopAndDestroy(&stream);
         status = TMS_RESULT_SUCCESS;
         }
@@ -1005,176 +989,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// TMSCallCSAdpt::StartDTMF
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallCSAdpt::StartDTMF(const TMSStreamType strmtype, TDes& dtmfstring)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED);
-    TmsMsgBufPckg dtmfpckg;
-    dtmfpckg().iStatus = status;
-    dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-
-    if (strmtype == TMS_STREAM_DOWNLINK && iDnlinkInitialized)
-        {
-        if (iDTMFDnlinkPlayer)
-            {
-            iDTMFDnlinkPlayer->PlayDtmfTone(dtmfstring);
-            status = TMS_RESULT_SUCCESS;
-            }
-        dtmfpckg().iStatus = TMS_RESULT_SUCCESS;
-        dtmfpckg().iRequest = ECmdDTMFToneDnlPlayStarted;
-        }
-    else if (strmtype == TMS_STREAM_UPLINK && iUplinkInitialized)
-        {
-        //use etel for uplink
-        if (iDTMFUplinkPlayer)
-            {
-            status = iDTMFUplinkPlayer->SendDtmfToneString(dtmfstring);
-            status = TMS_RESULT_SUCCESS;
-            }
-        dtmfpckg().iStatus = TMSUtility::EtelToTMSResult(status);
-        dtmfpckg().iRequest = ECmdDTMFToneUplPlayStarted;
-        }
-
-    if (iDTMFNotifier)
-        {
-        iDTMFNotifier->SetDtmf(dtmfpckg);
-        }
-
-    TRACE_PRN_IF_ERR(status);
-    TRACE_PRN_FN_EXT;
-    return status;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::StopDTMF
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallCSAdpt::StopDTMF(const TMSStreamType streamtype)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_SUCCESS);
-
-    if (streamtype == TMS_STREAM_DOWNLINK && iDTMFDnlinkPlayer)
-        {
-        iDTMFDnlinkPlayer->Cancel();
-        }
-    else if (streamtype == TMS_STREAM_UPLINK && iDTMFUplinkPlayer)
-        {
-        status = iDTMFUplinkPlayer->StopDtmfTone();
-        status = TMSUtility::EtelToTMSResult(status);
-        }
-
-    TRACE_PRN_FN_EXT;
-    return status;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::ContinueDTMF
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallCSAdpt::ContinueDTMF(const gboolean sending)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-
-    if (iDTMFUplinkPlayer)
-        {
-        status = iDTMFUplinkPlayer->ContinueDtmfStringSending(sending);
-        status = TMSUtility::EtelToTMSResult(status);
-        }
-
-    TRACE_PRN_FN_EXT;
-    return status;
-    }
-
-//From TMSDTMFTonePlayerObserver
-// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::DTMFInitCompleted
-//
-// -----------------------------------------------------------------------------
-//
-void TMSCallCSAdpt::DTMFInitCompleted(gint /*status*/)
-    {
-    TRACE_PRN_FN_ENT;
-    // TODO: process error
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::DTMFToneFinished
-//
-// -----------------------------------------------------------------------------
-//
-void TMSCallCSAdpt::DTMFToneFinished(gint status)
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_IF_ERR(status);
-    TmsMsgBufPckg dtmfpckg;
-
-    // KErrUnderflow indicates end of DTMF playback.
-    if (status == KErrUnderflow || status == KErrInUse)
-        {
-        status = TMS_RESULT_SUCCESS;
-        }
-    dtmfpckg().iStatus = TMSUtility::TMSResult(status);
-    dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-    if (iDTMFNotifier)
-        {
-        iDTMFNotifier->SetDtmf(dtmfpckg);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::HandleDTMFEvent
-//
-// -----------------------------------------------------------------------------
-//
-void TMSCallCSAdpt::HandleDTMFEvent(
-        const TMSDTMFObserver::TCCPDtmfEvent event, const gint status,
-        const TChar /*tone*/)
-    {
-    TRACE_PRN_FN_ENT;
-    TmsMsgBufPckg dtmfpckg;
-
-    TRACE_PRN_N1(_L("**TMS TMSCallCSAdpt::HandleDTMFEvent error:%d"), status);
-
-    dtmfpckg().iStatus = TMSUtility::EtelToTMSResult(status);
-
-    switch (event)
-        {
-        case ECCPDtmfUnknown:               //Unknown
-            break;
-        case ECCPDtmfManualStart:           //DTMF sending started manually
-        case ECCPDtmfSequenceStart:         //Automatic DTMF sending initialized
-            dtmfpckg().iRequest = ECmdDTMFToneUplPlayStarted;
-            break;
-        case ECCPDtmfManualStop:            //DTMF sending stopped manually
-        case ECCPDtmfManualAbort:           //DTMF sending aborted manually
-        case ECCPDtmfSequenceStop:          //Automatic DTMF sending stopped
-        case ECCPDtmfSequenceAbort:         //Automatic DTMF sending aborted
-        case ECCPDtmfStopInDtmfString:      //There was stop mark in DTMF string
-        case ECCPDtmfStringSendingCompleted: //DTMF sending success
-            dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-            break;
-        default:
-            break;
-        }
-
-    if (iDTMFNotifier)
-        {
-        iDTMFNotifier->SetDtmf(dtmfpckg, TRUE);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
 // TMSCallCSAdpt::DownlinkInitCompleted
 // From TMSCSDevSoundObserver
 // -----------------------------------------------------------------------------
@@ -1184,7 +998,7 @@
     TRACE_PRN_FN_ENT;
     if (status == TMS_RESULT_SUCCESS)
         {
-        iDnlinkInitialized = TRUE;
+        iDnlState = EInitialized;
         }
     NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
     TRACE_PRN_FN_EXT;
@@ -1200,7 +1014,7 @@
     TRACE_PRN_FN_ENT;
     if (status == TMS_RESULT_SUCCESS)
         {
-        iUplinkInitialized = TRUE;
+        iUplState = EInitialized;
         }
     NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
     TRACE_PRN_FN_EXT;
@@ -1214,6 +1028,10 @@
 void TMSCallCSAdpt::UplinkActivationCompleted(gint status)
     {
     TRACE_PRN_FN_ENT;
+    if (status == TMS_RESULT_SUCCESS)
+        {
+        iUplState = EActivated;
+        }
     NotifyClient(iUplinkStreamId, ECmdUplinkStarted, status);
     TRACE_PRN_FN_EXT;
     }
@@ -1226,6 +1044,10 @@
 void TMSCallCSAdpt::DownlinkActivationCompleted(gint status)
     {
     TRACE_PRN_FN_ENT;
+    if (status == TMS_RESULT_SUCCESS)
+        {
+        iDnlState = EActivated;
+        }
     NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted, status);
     TRACE_PRN_FN_EXT;
     }
--- a/mmserv/tms/tmscallserver/src/tmscallipadpt.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallipadpt.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -47,9 +47,6 @@
     TRACE_PRN_FN_ENT;
     iIPDownlink = NULL;
     iIPUplink = NULL;
-    iDTMFDnlinkPlayer = NULL;
-    iDTMFUplinkPlayer = NULL;
-    iDTMFNotifier = NULL;
     TRACE_PRN_FN_EXT;
     }
 
@@ -74,9 +71,6 @@
     iCodecs.Reset();
     iCodecs.Close();
     iArrBitrates.Reset();
-    delete iDTMFUplinkPlayer;
-    delete iDTMFDnlinkPlayer;
-    delete iDTMFNotifier;
     delete iIPUplink;
     delete iIPDownlink;
 
@@ -102,8 +96,8 @@
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_SUCCESS);
     iNextStreamId = 1;
-    iUplinkInitialized = FALSE;
-    iDnlinkInitialized = FALSE;
+    iUplState = EIdle;
+    iDnlState = EIdle;
     TRACE_PRN_FN_EXT;
     return status;
     }
@@ -123,12 +117,11 @@
         case TMS_STREAM_UPLINK:
             {
             status = TMS_RESULT_ALREADY_EXIST;
-            if (!iUplinkInitialized)
+            if (iUplState == EIdle)
                 {
                 iUplinkStreamId = iNextStreamId;
                 outStrmId = iUplinkStreamId;
                 iNextStreamId++;
-                //iUplinkInitialized = TRUE; //not initialized yet!
                 status = TMS_RESULT_SUCCESS;
                 }
             break;
@@ -136,12 +129,11 @@
         case TMS_STREAM_DOWNLINK:
             {
             status = TMS_RESULT_ALREADY_EXIST;
-            if (!iDnlinkInitialized)
+            if (iDnlState == EIdle)
                 {
                 iDnlinkStreamId = iNextStreamId;
                 outStrmId = iDnlinkStreamId;
                 iNextStreamId++;
-                //iDnlinkInitialized = TRUE; //not initialized yet!
                 status = TMS_RESULT_SUCCESS;
                 }
             break;
@@ -183,10 +175,6 @@
                 {
                 SetFormat(iUplinkStreamId, fourCC);
                 status = OpenUplink(message, retrytime);
-                if (status == TMS_RESULT_SUCCESS)
-                    {
-                    status = InitDTMF(TMS_STREAM_UPLINK);
-                    }
                 }
             break;
             }
@@ -197,10 +185,6 @@
                 {
                 SetFormat(iDnlinkStreamId, fourCC);
                 status = OpenDownlink(message, retrytime);
-                if (status == TMS_RESULT_SUCCESS)
-                    {
-                    status = InitDTMF(TMS_STREAM_DOWNLINK);
-                    }
                 }
             break;
             }
@@ -230,21 +214,21 @@
         {
         case TMS_STREAM_UPLINK:
             {
-            if (iIPUplink && strmId == iUplinkStreamId)
+            if (iIPUplink && strmId == iUplinkStreamId &&
+                    iUplState == EInitialized)
                 {
                 iIPUplink->Start(retrytime);
                 status = TMS_RESULT_SUCCESS;
-                NotifyClient(iUplinkStreamId, ECmdUplinkStarted, status);
                 }
             break;
             }
         case TMS_STREAM_DOWNLINK:
             {
-            if (iIPDownlink && strmId == iDnlinkStreamId)
+            if (iIPDownlink && strmId == iDnlinkStreamId &&
+                    iDnlState == EInitialized)
                 {
                 iIPDownlink->Start(retrytime);
                 status = TMS_RESULT_SUCCESS;
-                NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted, status);
                 }
             break;
             }
@@ -275,6 +259,7 @@
             if (strmId == iUplinkStreamId && iIPUplink)
                 {
                 iIPUplink->Stop();
+                iUplState = EInitialized;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iUplinkStreamId, ECmdUplinkPaused, status);
                 }
@@ -285,6 +270,7 @@
             if (strmId == iDnlinkStreamId && iIPDownlink)
                 {
                 iIPDownlink->Stop();
+                iDnlState = EInitialized;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iDnlinkStreamId, ECmdDownlinkPaused, status);
                 }
@@ -315,9 +301,11 @@
         {
         case TMS_STREAM_UPLINK:
             {
-            if (iIPUplink && strmId == iUplinkStreamId)
+            if (iIPUplink && strmId == iUplinkStreamId &&
+                    iUplState == EActivated)
                 {
                 iIPUplink->Stop();
+                iUplState = EInitialized;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
                 }
@@ -325,9 +313,11 @@
             }
         case TMS_STREAM_DOWNLINK:
             {
-            if (iIPDownlink && strmId == iDnlinkStreamId)
+            if (iIPDownlink && strmId == iDnlinkStreamId &&
+                    iDnlState == EActivated)
                 {
                 iIPDownlink->Stop();
+                iDnlState = EInitialized;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
                 }
@@ -358,11 +348,10 @@
         {
         case TMS_STREAM_UPLINK:
             {
-            if (iIPUplink && strmId == iUplinkStreamId)
+            if (iIPUplink && strmId == iUplinkStreamId && iUplState != EIdle)
                 {
                 iIPUplink->Stop();
-                //iUplinkStreamId = -1;
-                iUplinkInitialized = FALSE;
+                iUplState = EIdle;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iUplinkStreamId, ECmdUplinkDeInitComplete, status);
                 }
@@ -370,11 +359,10 @@
             }
         case TMS_STREAM_DOWNLINK:
             {
-            if (iIPDownlink && strmId == iDnlinkStreamId)
+            if (iIPDownlink && strmId == iDnlinkStreamId && iDnlState != EIdle)
                 {
                 iIPDownlink->Stop();
-                //iDnlinkStreamId = -1;
-                iDnlinkInitialized = FALSE;
+                iDnlState = EIdle;
                 status = TMS_RESULT_SUCCESS;
                 NotifyClient(iDnlinkStreamId, ECmdDownlinkDeInitComplete,
                         status);
@@ -387,7 +375,6 @@
             break;
             }
         }
-
     TRACE_PRN_FN_EXT;
     return status;
     }
@@ -409,7 +396,7 @@
             if (strmId == iUplinkStreamId)
                 {
                 iUplinkStreamId = -1;
-                iUplinkInitialized = FALSE;
+                iUplState = EIdle;
                 }
             break;
             }
@@ -418,7 +405,7 @@
             if (strmId == iDnlinkStreamId)
                 {
                 iDnlinkStreamId = -1;
-                iDnlinkInitialized = FALSE;
+                iDnlState = EIdle;
                 }
             break;
             }
@@ -538,7 +525,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iDnlinkInitialized && iIPDownlink)
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->GetMaxVolume(volume);
         iMaxVolume = volume;
@@ -557,7 +544,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iDnlinkInitialized && iIPDownlink)
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->SetVolume(volume);
         NotifyClient(iDnlinkStreamId, ECmdSetVolume, status);
@@ -575,7 +562,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iDnlinkInitialized && iIPDownlink)
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->GetVolume(volume);
         }
@@ -592,7 +579,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iUplinkInitialized && iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->GetMaxGain(gain);
         iMaxGain = gain;
@@ -611,7 +598,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iUplinkInitialized && iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->SetGain(gain);
         NotifyClient(iUplinkStreamId, ECmdSetGain, status);
@@ -629,7 +616,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iUplinkInitialized && iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->GetGain(gain);
         }
@@ -646,7 +633,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iDnlinkInitialized && iIPDownlink)
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->GetMaxVolume(volume);
         iMaxVolume = volume;
@@ -666,7 +653,7 @@
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
     //iGlobalVol = volume;
-    if (iDnlinkInitialized && iIPDownlink)
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->SetVolume(volume);
         }
@@ -683,7 +670,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iDnlinkInitialized && iIPDownlink)
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->GetVolume(volume);
         }
@@ -700,7 +687,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iUplinkInitialized && iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->GetMaxGain(gain);
         iMaxGain = gain;
@@ -720,7 +707,7 @@
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
     //iGlobalGain = gain;
-    if (iUplinkInitialized && iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->SetGain(gain);
         }
@@ -737,7 +724,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iUplinkInitialized && iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->GetGain(gain);
         }
@@ -806,7 +793,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->GetSupportedBitrates(iArrBitrates);
         count = iArrBitrates.Count();
@@ -862,7 +849,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->GetBitrate(bitrate);
         }
@@ -879,7 +866,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->SetBitrate(bitrate);
         }
@@ -896,7 +883,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->GetVad(fmttype, vad);
         }
@@ -913,7 +900,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPUplink)
+    if (iIPUplink && iUplState != EIdle)
         {
         status = iIPUplink->SetVad(fmttype, vad);
         }
@@ -930,7 +917,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPDownlink)
+    if (iIPDownlink && iDnlState == EInitialized)
         {
         status = iIPDownlink->GetCng(fmttype, cng);
         }
@@ -947,7 +934,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPDownlink)
+    if (iIPDownlink && iDnlState == EInitialized)
         {
         status = iIPDownlink->SetCng(fmttype, cng);
         }
@@ -964,7 +951,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPDownlink)
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->GetPlc(fmttype, plc);
         }
@@ -981,7 +968,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_INVALID_STATE);
-    if (iIPDownlink)
+    if (iIPDownlink && iDnlState == EInitialized)
         {
         status = iIPDownlink->SetPlc(fmttype, plc);
         }
@@ -1055,7 +1042,7 @@
      * 2) KAudioPrefVoipAudioUplink             -NOK native VoIP?
      *    KAudioPriorityVoipAudioUplink         -NOK native VoIP?
      */
-    iPriority.iPref = KAudioPrefVoipAudioUplink;
+    iPriority.iPref = KAudioPrefVoipAudioUplinkNonSignal;
     iPriority.iPriority = KAudioPriorityVoipAudioUplink;
 
     delete iIPUplink;
@@ -1172,23 +1159,22 @@
 gint TMSCallIPAdpt::SetIlbcCodecMode(const gint mode,
         const TMSStreamType strmtype)
     {
-    gint status(TMS_RESULT_INVALID_ARGUMENT);
+    gint status(TMS_RESULT_SUCCESS);
 
-    if (strmtype == TMS_STREAM_DOWNLINK)
+    if (strmtype == TMS_STREAM_DOWNLINK && iIPDownlink &&
+            iDnlState == EInitialized)
         {
-        if (iDnlinkInitialized && iIPDownlink)
-            {
-            status = iIPDownlink->SetIlbcCodecMode(mode);
-            }
+        status = iIPDownlink->SetIlbcCodecMode(mode);
         }
-    else if (strmtype == TMS_STREAM_UPLINK)
+    else if (strmtype == TMS_STREAM_UPLINK && iIPUplink &&
+            iUplState == EInitialized)
         {
-        if (iUplinkInitialized && iIPUplink)
-            {
-            status = iIPUplink->SetIlbcCodecMode(mode);
-            }
+        status = iIPUplink->SetIlbcCodecMode(mode);
         }
-
+    else
+        {
+        status = TMS_RESULT_INVALID_STATE;
+        }
     return status;
     }
 
@@ -1199,23 +1185,22 @@
 //
 gint TMSCallIPAdpt::GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype)
     {
-    gint status(TMS_RESULT_INVALID_ARGUMENT);
+    gint status(TMS_RESULT_SUCCESS);
 
-    if (strmtype == TMS_STREAM_DOWNLINK)
+    if (strmtype == TMS_STREAM_DOWNLINK && iIPDownlink &&
+            iDnlState != EIdle)
         {
-        if (iDnlinkInitialized && iIPDownlink)
-            {
-            status = iIPDownlink->GetIlbcCodecMode(mode);
-            }
+        status = iIPDownlink->GetIlbcCodecMode(mode);
         }
-    else if (strmtype == TMS_STREAM_UPLINK)
+    else if (strmtype == TMS_STREAM_UPLINK && iIPUplink &&
+            iUplState != EIdle)
         {
-        if (iUplinkInitialized && iIPUplink)
-            {
-            status = iIPUplink->GetIlbcCodecMode(mode);
-            }
+        status = iIPUplink->GetIlbcCodecMode(mode);
         }
-
+    else
+        {
+        status = TMS_RESULT_INVALID_STATE;
+        }
     return status;
     }
 
@@ -1227,23 +1212,22 @@
 gint TMSCallIPAdpt::SetG711CodecMode(const gint mode,
         const TMSStreamType strmtype)
     {
-    gint status(TMS_RESULT_INVALID_ARGUMENT);
+    gint status(TMS_RESULT_SUCCESS);
 
-    if (strmtype == TMS_STREAM_DOWNLINK)
+    if (strmtype == TMS_STREAM_DOWNLINK && iIPDownlink &&
+            iDnlState == EInitialized)
         {
-        if (iDnlinkInitialized && iIPDownlink)
-            {
-            status = iIPDownlink->SetG711CodecMode(mode);
-            }
+        status = iIPDownlink->SetG711CodecMode(mode);
         }
-    else if (strmtype == TMS_STREAM_UPLINK)
+    else if (strmtype == TMS_STREAM_UPLINK && iIPUplink &&
+            iUplState == EInitialized)
         {
-        if (iUplinkInitialized && iIPUplink)
-            {
-            status = iIPUplink->SetG711CodecMode(mode);
-            }
+        status = iIPUplink->SetG711CodecMode(mode);
         }
-
+    else
+        {
+        status = TMS_RESULT_INVALID_STATE;
+        }
     return status;
     }
 
@@ -1254,23 +1238,22 @@
 //
 gint TMSCallIPAdpt::GetG711CodecMode(gint& mode, const TMSStreamType strmtype)
     {
-    gint status(TMS_RESULT_INVALID_ARGUMENT);
+    gint status(TMS_RESULT_SUCCESS);
 
-    if (strmtype == TMS_STREAM_DOWNLINK)
+    if (strmtype == TMS_STREAM_DOWNLINK && iIPDownlink &&
+            iDnlState != EIdle)
         {
-        if (iDnlinkInitialized && iIPDownlink)
-            {
-            status = iIPDownlink->GetG711CodecMode(mode);
-            }
+        status = iIPDownlink->GetG711CodecMode(mode);
         }
-    else if (strmtype == TMS_STREAM_UPLINK)
+    else if (strmtype == TMS_STREAM_UPLINK && iIPUplink &&
+            iUplState != EIdle)
         {
-        if (iUplinkInitialized && iIPUplink)
-            {
-            status = iIPUplink->GetG711CodecMode(mode);
-            }
+        status = iIPUplink->GetG711CodecMode(mode);
         }
-
+    else
+        {
+        status = TMS_RESULT_INVALID_STATE;
+        }
     return status;
     }
 
@@ -1281,8 +1264,8 @@
 //
 gint TMSCallIPAdpt::FrameModeRqrdForEC(gboolean& frmodereq)
     {
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-    if (iIPDownlink)
+    gint status(TMS_RESULT_INVALID_STATE);
+    if (iIPDownlink && iDnlState == EInitialized)
         {
         status = iIPDownlink->FrameModeRqrdForEC(frmodereq);
         }
@@ -1296,8 +1279,8 @@
 //
 gint TMSCallIPAdpt::SetFrameMode(const gboolean frmode)
     {
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-    if (iIPDownlink)
+    gint status(TMS_RESULT_INVALID_STATE);
+    if (iIPDownlink && iDnlState == EInitialized)
         {
         status = iIPDownlink->SetFrameMode(frmode);
         }
@@ -1311,8 +1294,8 @@
 //
 gint TMSCallIPAdpt::GetFrameMode(gboolean& frmode)
     {
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-    if (iIPDownlink)
+    gint status(TMS_RESULT_INVALID_STATE);
+    if (iIPDownlink && iDnlState != EIdle)
         {
         status = iIPDownlink->GetFrameMode(frmode);
         }
@@ -1325,8 +1308,8 @@
 //
 gint TMSCallIPAdpt::ConcealErrorForNextBuffer()
     {
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-    if (iIPDownlink)
+    gint status(TMS_RESULT_INVALID_STATE);
+    if (iIPDownlink && iDnlState == EActivated)
         {
         status = iIPDownlink->ConcealErrorForNextBuffer();
         }
@@ -1340,8 +1323,8 @@
 //
 gint TMSCallIPAdpt::BadLsfNextBuffer()
     {
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-    if (iIPDownlink)
+    gint status(TMS_RESULT_INVALID_STATE);
+    if (iIPDownlink && iDnlState == EActivated)
         {
         status = iIPDownlink->BadLsfNextBuffer();
         }
@@ -1356,14 +1339,15 @@
 gint TMSCallIPAdpt::SetOutput(TMSAudioOutput output)
     {
     TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-    if (iDnlinkInitialized && iIPDownlink)
+    gint status(TMS_RESULT_INVALID_STATE);
+    if (iIPDownlink && iDnlState != EIdle)
         {
         TRAP(status, iIPDownlink->SetAudioDeviceL(output));
         }
     TRACE_PRN_FN_EXT;
     return status;
     }
+
 // -----------------------------------------------------------------------------
 // TMSCallIPAdpt::GetOutput
 //
@@ -1372,8 +1356,8 @@
 gint TMSCallIPAdpt::GetOutput(TMSAudioOutput& output)
     {
     TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
-    if (iDnlinkInitialized && iIPDownlink)
+    gint status(TMS_RESULT_INVALID_STATE);
+    if (iIPDownlink && iDnlState != EIdle)
         {
         TRAP(status, iIPDownlink->GetAudioDeviceL(output));
         }
@@ -1399,162 +1383,11 @@
 gint TMSCallIPAdpt::GetAvailableOutputsL(gint& /*count*/,
         CBufFlat*& /*outputsbuf*/)
     {
+    //TODO: return public & private
     return TMS_RESULT_FEATURE_NOT_SUPPORTED;
     }
 
 // -----------------------------------------------------------------------------
-// TMSCallIPAdpt::InitDTMF
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallIPAdpt::InitDTMF(TMSStreamType strmtype)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED);
-
-    if (strmtype == TMS_STREAM_DOWNLINK)
-        {
-        delete iDTMFDnlinkPlayer;
-        iDTMFDnlinkPlayer = NULL;
-        TRAP(status, iDTMFDnlinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
-                KAudioDTMFString, KAudioPriorityDTMFString));
-         }
-    else if (strmtype == TMS_STREAM_UPLINK)
-        {
-        delete iDTMFUplinkPlayer;
-        iDTMFUplinkPlayer = NULL;
-        TRAP(status, iDTMFUplinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
-                KAudioDTMFString, KAudioPriorityDTMFString));
-        }
-
-    if (!iDTMFNotifier && status == TMS_RESULT_SUCCESS)
-         {
-         TRAP(status, iDTMFNotifier = TMSDtmfNotifier::NewL());
-         }
-
-    TRACE_PRN_FN_EXT;
-    return status;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallIPAdpt::StartDTMF
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallIPAdpt::StartDTMF(TMSStreamType strmtype, TDes& dtmfstring)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED);
-    TmsMsgBufPckg dtmfpckg;
-    dtmfpckg().iStatus = status;
-    dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-
-    if (strmtype == TMS_STREAM_DOWNLINK)
-        {
-        status = TMS_RESULT_UNINITIALIZED_OBJECT;
-        if (iDTMFDnlinkPlayer)
-            {
-            iDTMFDnlinkPlayer->PlayDtmfTone(dtmfstring);
-            status = TMS_RESULT_SUCCESS;
-            }
-        dtmfpckg().iStatus = status;
-        dtmfpckg().iRequest = ECmdDTMFToneDnlPlayStarted;
-        }
-    else if (strmtype == TMS_STREAM_UPLINK)
-        {
-        status = TMS_RESULT_UNINITIALIZED_OBJECT;
-        if (iDTMFUplinkPlayer)
-            {
-            iDTMFUplinkPlayer->PlayDtmfTone(dtmfstring);
-            status = TMS_RESULT_SUCCESS;
-            }
-        dtmfpckg().iStatus = status;
-        dtmfpckg().iRequest = ECmdDTMFToneUplPlayStarted;
-        }
-
-    if (iDTMFNotifier)
-        {
-        iDTMFNotifier->SetDtmf(dtmfpckg);
-        }
-
-    TRACE_PRN_IF_ERR(status);
-    TRACE_PRN_FN_EXT;
-    return status;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallIPAdpt::StopDTMF
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallIPAdpt::StopDTMF(TMSStreamType streamtype)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_SUCCESS);
-
-    if (streamtype == TMS_STREAM_DOWNLINK && iDTMFDnlinkPlayer)
-        {
-        iDTMFDnlinkPlayer->Cancel();
-        }
-    else if (streamtype == TMS_STREAM_UPLINK && iDTMFUplinkPlayer)
-        {
-        //status = iDTMFUplinkPlayer->StopDtmfTone();
-        iDTMFUplinkPlayer->Cancel();
-        }
-
-    TRACE_PRN_FN_EXT;
-    return status;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallIPAdpt::ContinueDTMF
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallIPAdpt::ContinueDTMF(const gboolean /*sending*/)
-    {
-    return TMS_RESULT_FEATURE_NOT_SUPPORTED;
-    }
-
-//From DTMFTonePlayerObserver
-// -----------------------------------------------------------------------------
-// TMSCallIPAdpt::DTMFInitCompleted
-//
-// -----------------------------------------------------------------------------
-//
-void TMSCallIPAdpt::DTMFInitCompleted(gint /*status*/)
-    {
-    TRACE_PRN_FN_ENT;
-    // TODO: process error
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSCallIPAdpt::DTMFToneFinished
-//
-// -----------------------------------------------------------------------------
-//
-void TMSCallIPAdpt::DTMFToneFinished(gint status)
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_IF_ERR(status);
-    TmsMsgBufPckg dtmfpckg;
-
-    // KErrUnderflow indicates end of DTMF playback.
-    if (status == KErrUnderflow /*|| status == KErrInUse*/)
-        {
-        status = TMS_RESULT_SUCCESS;
-        }
-    dtmfpckg().iStatus = TMSUtility::TMSResult(status);
-    dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
-    if (iDTMFNotifier)
-        {
-        iDTMFNotifier->SetDtmf(dtmfpckg);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
 // TMSCallIPAdpt::DownlinkInitCompleted
 // From TMSIPDevSoundObserver
 // -----------------------------------------------------------------------------
@@ -1564,7 +1397,7 @@
     TRACE_PRN_FN_ENT;
     if (status == TMS_RESULT_SUCCESS)
         {
-        iDnlinkInitialized = TRUE;
+        iDnlState = EInitialized;
         }
     NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
     TRACE_PRN_FN_EXT;
@@ -1580,7 +1413,7 @@
     TRACE_PRN_FN_ENT;
     if (status == TMS_RESULT_SUCCESS)
         {
-        iUplinkInitialized = TRUE;
+        iUplState = EInitialized;
         }
     NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
     TRACE_PRN_FN_EXT;
@@ -1594,6 +1427,10 @@
 void TMSCallIPAdpt::UplinkStarted(gint status)
     {
     TRACE_PRN_FN_ENT;
+    if (status == TMS_RESULT_SUCCESS)
+        {
+        iUplState = EActivated;
+        }
     NotifyClient(iUplinkStreamId, ECmdUplinkStarted, status);
     TRACE_PRN_FN_EXT;
     }
@@ -1606,6 +1443,10 @@
 void TMSCallIPAdpt::DownlinkStarted(gint status)
     {
     TRACE_PRN_FN_ENT;
+    if (status == TMS_RESULT_SUCCESS)
+        {
+        iDnlState = EActivated;
+        }
     NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted, status);
     TRACE_PRN_FN_EXT;
     }
@@ -1630,4 +1471,3 @@
         }
     }
 
-// End of file
--- a/mmserv/tms/tmscallserver/src/tmscallsession.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallsession.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -225,14 +225,8 @@
         case TMS_ROUTING_AVAILABLE_OUTPUT_GET:
             HandleRoutingGetAvailableOutputsL(aMessage);
             break;
-        case TMS_DTMF_START:
-            HandleDTMFStart(aMessage);
-            break;
-        case TMS_DTMF_STOP:
-            HandleDTMFStop(aMessage);
-            break;
-        case TMS_DTMF_CONTINUE:
-            HandleDTMFContinue(aMessage);
+        case TMS_GET_ACTIVE_CALL_PARAMS:
+            HandleGetActiveCallL(aMessage);
             break;
         default:
             User::Leave(TMS_RESULT_ILLEGAL_OPERATION);
@@ -1113,68 +1107,24 @@
         CleanupStack::PopAndDestroy(outputbuf);
         }
     aMessage.Complete(status);
-    }
-
-void TMSCallSession::HandleDTMFStart(const RMessage2& aMessage)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_DOES_NOT_EXIST);
-
-    if (iCallAdpt)
-        {
-        TMSStreamType strmtype;
-        gint len = 0;
-        strmtype = (TMSStreamType) aMessage.Int0();
-        len = aMessage.GetDesLength(1);
-        HBufC* tone(NULL);
-        if (len > 0)
-            {
-            TRAP(status,tone = HBufC::NewL(len));
-            if (status == KErrNone)
-                {
-                TPtr ptr = tone->Des();
-                status = aMessage.Read(1, ptr);
-                TRACE_PRN_N(ptr);
-                if (status == KErrNone)
-                    {
-                    status = iCallAdpt->StartDTMF(strmtype, ptr);
-                    }
-                }
-            delete tone;
-            tone = NULL;
-            }
-        }
-
-    aMessage.Complete(status);
     TRACE_PRN_FN_EXT;
     }
 
-void TMSCallSession::HandleDTMFStop(const RMessage2& aMessage)
+void TMSCallSession::HandleGetActiveCallL(const RMessage2& aMessage)
     {
-    TRACE_PRN_FN_ENT;
     gint status(TMS_RESULT_DOES_NOT_EXIST);
+    TMSCallType callType;
+    gboolean active(FALSE);
     if (iCallAdpt)
         {
-        TMSStreamType streamtype;
-        streamtype = (TMSStreamType) aMessage.Int0();
-        status = iCallAdpt->StopDTMF(streamtype);
+        iCallAdpt->GetCallType(callType);
+        active = iCallAdpt->IsUplActivated();
+        TmsCallMsgBufPckg p;
+        p().iInt = (gint) callType;
+        p().iBool = active;
+        aMessage.WriteL(0, p);
+        status = TMS_RESULT_SUCCESS;
         }
     aMessage.Complete(status);
-    TRACE_PRN_FN_EXT;
     }
 
-void TMSCallSession::HandleDTMFContinue(const RMessage2& aMessage)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status(TMS_RESULT_DOES_NOT_EXIST);
-    if (iCallAdpt)
-        {
-        TBool continuesending;
-        continuesending = (TBool) aMessage.Int0();
-        status = iCallAdpt->ContinueDTMF(continuesending);
-        }
-    aMessage.Complete(status);
-    TRACE_PRN_FN_EXT;
-    }
-
-// End of file
--- a/mmserv/tms/tmscallserver/src/tmscsdevsound.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscsdevsound.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -68,11 +68,7 @@
         iPreference = KAudioPrefCSCallDownlink;
         }
 
-    if (iInitRetryTime != 0)
-        {
-        iTimer = TMSTimer::NewL();
-        }
-
+    iTimer = TMSTimer::NewL();
     InitializeL();
     TRACE_PRN_FN_EXT;
     }
@@ -183,6 +179,7 @@
         CancelTimer();
         NotifyEvent(aError);
         }
+    TRACE_PRN_IF_ERR(aError);
     TRACE_PRN_FN_EXT;
     }
 
--- a/mmserv/tms/tmscallserver/src/tmscsdownlink.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscsdownlink.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -141,7 +141,8 @@
     TRACE_PRN_N1(_L("TMSCSDownlink::PlayError[%d]"), aError);
 
     // We don't react to devsound errors unless we are activating.
-    if (iActivationOngoing && aError == KErrAccessDenied)
+    if (iActivationOngoing && (aError == KErrAccessDenied ||
+            aError == KErrInUse))
         {
         if (iStartRetryTime != 0)
             {
--- a/mmserv/tms/tmscallserver/src/tmscsuplink.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscsuplink.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -145,7 +145,8 @@
     TRACE_PRN_N1(_L("TMSCSUplink::RecordError[%d]"), aError);
 
     // We dont react to devsound messages unless we are activating.
-    if (iActivationOngoing && aError == KErrAccessDenied)
+    if (iActivationOngoing && (aError == KErrAccessDenied ||
+            aError == KErrInUse))
         {
         if (iStartRetryTime != 0)
             {
--- a/mmserv/tms/tmscallserver/src/tmsdtmfnotifier.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +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: Telephony Multimedia Service
- *
- */
-
-// INCLUDE FILES
-#include "tmsdtmfnotifier.h"
-#include "tmsclientserver.h"
-#include "tmsutility.h"
-
-using namespace TMS;
-
-// CONSTANTS
-_LIT_SECURITY_POLICY_PASS(KTMSServerReadPolicy);
-_LIT_SECURITY_POLICY_C1(KTMSServerWritePolicy, ECapabilityWriteUserData);
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::TMSDtmfNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfNotifier::TMSDtmfNotifier()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfNotifier::ConstructL()
-    {
-    TRACE_PRN_FN_ENT;
-    gint err = RProperty::Define(EDtmfPs, RProperty::EByteArray,
-            KTMSServerReadPolicy, KTMSServerWritePolicy);
-    TRACE_PRN_N1(_L("DtmfSetting::ConstructL err:%d"), err);
-
-    if (err != KErrAlreadyExists)
-        {
-        User::LeaveIfError(err);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfNotifier* TMSDtmfNotifier::NewL()
-    {
-    TMSDtmfNotifier* self = new (ELeave) TMSDtmfNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// Destructor
-TMSDtmfNotifier::~TMSDtmfNotifier()
-    {
-    TRACE_PRN_FN_ENT;
-    gint err = RProperty::Delete(KTMSPropertyCategory, EDtmfPs);
-    TRACE_PRN_N1(_L("DtmfSetting::~TMSDtmfNotifier err:%d"), err);
-    TRACE_PRN_FN_ENT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfNotifier::SetDtmf
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfNotifier::SetDtmf(TmsMsgBufPckg dtmfpckg, gboolean publish)
-    {
-    TRACE_PRN_FN_ENT;
-    if (publish)
-        {
-        gint err = RProperty::Set(KTMSPropertyCategory, EDtmfPs, dtmfpckg);
-        TRACE_PRN_N1(_L("DtmfSetting::SetDtmf err:%d"), err);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-//  End of File
--- a/mmserv/tms/tmscallserver/src/tmsdtmfprovider.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +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: Telephony Multimedia Service
- *
- */
-
-#include <etelmm.h>
-#include <rmmcustomapi.h>
-#include "tmsdtmfprovider.h"
-#include "tmsdtmfobserver.h"
-#include "tmsutility.h"
-#include "tmseteldtmfmonitor.h"
-#include "tmseteldtmfstopmonitor.h"
-
-using namespace TMS;
-
-TMSDTMFProvider* TMSDTMFProvider::NewL()
-    {
-    TRACE_PRN_FN_ENT;
-    TMSDTMFProvider* self = new (ELeave) TMSDTMFProvider();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    TRACE_PRN_FN_EXT;
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// Destructor of the object.
-// -----------------------------------------------------------------------------
-//
-TMSDTMFProvider::~TMSDTMFProvider()
-    {
-    TRACE_PRN_FN_ENT;
-    Cancel();
-    iObservers.Close();
-    delete iMonitor;
-    delete iStopMonitor;
-
-    iMmCustom.Close();
-    iPhone.Close();
-    iServer.UnloadPhoneModule(iTsyname);
-    iServer.Close();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Constructs the requester.
-// -----------------------------------------------------------------------------
-//
-TMSDTMFProvider::TMSDTMFProvider() :
-    CActive(EPriorityStandard)
-    {
-    TRACE_PRN_FN_ENT;
-    CActiveScheduler::Add(this);
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Constructs the requester in the second phase.
-// -----------------------------------------------------------------------------
-//
-void TMSDTMFProvider::ConstructL()
-    {
-    TRACE_PRN_FN_ENT;
-
-    CleanupClosePushL(iServer);
-    User::LeaveIfError(iServer.Connect());
-
-    TRACE_PRN_N(_L("**TMS ETel iServer.Connect"));
-
-    iServer.GetTsyName(0, iTsyname);
-
-    //Load in the phone device driver
-    User::LeaveIfError(iServer.LoadPhoneModule(iTsyname));
-
-    TRACE_PRN_N(_L("**TMS ETel iServer.LoadPhoneModule"));
-
-    //Find the number of phones available from the tel server
-    gint numberPhones;
-    User::LeaveIfError(iServer.EnumeratePhones(numberPhones));
-
-    TRACE_PRN_N(_L("**TMS ETel iServer.EnumeratePhones"));
-
-    //Check there are available phones
-    if (numberPhones < 1)
-        {
-        User::Leave(KErrNotFound);
-        }
-
-    //Get info about the first available phone
-    RTelServer::TPhoneInfo info;
-    User::LeaveIfError(iServer.GetPhoneInfo(0, info));
-
-    TRACE_PRN_N(_L("**TMS ETel iServer.GetPhoneInfo"));
-
-    CleanupClosePushL(iPhone);
-    User::LeaveIfError(iPhone.Open(iServer, info.iName));
-
-    TRACE_PRN_N(_L("**TMS ETel iPhone.Open"));
-
-    RMobilePhone::TLineInfo lineInfo;
-    User::LeaveIfError(iPhone.GetLineInfo(0, lineInfo));
-
-    TRACE_PRN_N(_L("**TMS ETel iPhone.GetLineInfo"));
-
-    gint errorCode = iMmCustom.Open(iPhone);
-
-    if (!iPhone.SubSessionHandle() || !iMmCustom.SubSessionHandle())
-        {
-        User::Leave(KErrArgument);
-        }
-    iMonitor = TMSEtelDtmfMonitor::NewL(*this, iMmCustom);
-    iMonitor->StartMonitoring();
-    iStopMonitor = TMSEtelDtmfStopMonitor::NewL(*this, iPhone);
-    // iStopMonitor->StartMonitoring();
-
-    CleanupStack::Pop(2);//telserver,phone
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Notifies observers about a DTMF event
-// -----------------------------------------------------------------------------
-//
-void TMSDTMFProvider::NotifyDTMFEvent(
-        const TMSDTMFObserver::TCCPDtmfEvent aEvent, const gint aError,
-        const TChar aTone)
-    {
-    TRACE_PRN_FN_ENT;
-    for (gint i = 0; i < iObservers.Count(); i++)
-        {
-        TMSDTMFObserver* obs = iObservers[i];
-        if (obs)
-            {
-            iObservers[i]->HandleDTMFEvent(aEvent, aError, aTone);
-            }
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Cancel DTMF string sending
-// -----------------------------------------------------------------------------
-//
-gint TMSDTMFProvider::CancelDtmfStringSending()
-    {
-    TRACE_PRN_FN_ENT;
-    gint ret(KErrAlreadyExists);
-    if (IsActive())
-        {
-        Cancel();
-        ret = KErrNone;
-        }
-    TRACE_PRN_FN_EXT;
-    return ret;
-    }
-
-// -----------------------------------------------------------------------------
-// Starts DTMF string sending
-// -----------------------------------------------------------------------------
-//
-gint TMSDTMFProvider::StartDtmfTone(const TChar aTone)
-    {
-    TRACE_PRN_FN_ENT;
-    gint ret(KErrAlreadyExists);
-    if (!IsActive())
-        {
-        ret = iPhone.StartDTMFTone(aTone);
-        }
-    TRACE_PRN_FN_EXT;
-    return ret;
-    }
-
-// -----------------------------------------------------------------------------
-// Stop DTMF tone
-// -----------------------------------------------------------------------------
-//
-gint TMSDTMFProvider::StopDtmfTone()
-    {
-    TRACE_PRN_FN_ENT;
-    gint ret(KErrAlreadyExists);
-    if (!IsActive())
-        {
-        ret = iPhone.StopDTMFTone();
-        }
-    TRACE_PRN_FN_EXT;
-    return ret;
-    }
-
-// -----------------------------------------------------------------------------
-// Send DTMF string
-// -----------------------------------------------------------------------------
-//
-gint TMSDTMFProvider::SendDtmfToneString(const TDesC& aString)
-    {
-    TRACE_PRN_FN_ENT;
-    gint ret = KErrInUse;
-    if (!IsActive())
-        {
-        iStatus = KRequestPending;
-        iPhone.SendDTMFTones(iStatus, aString);
-        SetActive();
-        ret = KErrNone;
-        }
-    TRACE_PRN_FN_EXT;
-    return ret;
-    }
-
-// -----------------------------------------------------------------------------
-// Continue DTMF string sending
-// -----------------------------------------------------------------------------
-//
-gint TMSDTMFProvider::ContinueDtmfStringSending(const gboolean aContinue)
-    {
-    TRACE_PRN_FN_ENT;
-    gint status = iPhone.ContinueDTMFStringSending(aContinue);
-    TRACE_PRN_FN_EXT;
-    return status;
-    }
-
-// -----------------------------------------------------------------------------
-// Adds observer.
-// -----------------------------------------------------------------------------
-//
-void TMSDTMFProvider::AddObserver(const TMSDTMFObserver& aObserver)
-    {
-    TRACE_PRN_FN_ENT;
-    if (iObservers.Find(&aObserver) == KErrNotFound)
-        {
-        iObservers.Append(&aObserver);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Removes given observer.
-// -----------------------------------------------------------------------------
-//
-gint TMSDTMFProvider::RemoveObserver(const TMSDTMFObserver& aObserver)
-    {
-    TRACE_PRN_FN_ENT;
-    gint ret = KErrNotFound;
-    gint found = iObservers.Find(&aObserver);
-    if (found != KErrNotFound)
-        {
-        iObservers.Remove(found);
-        ret = KErrNone;
-        }
-    TRACE_PRN_FN_EXT;
-    return ret;
-    }
-
-// -----------------------------------------------------------------------------
-// From CActive.
-// Handles request completion.
-// -----------------------------------------------------------------------------
-//
-void TMSDTMFProvider::RunL()
-    {
-    TRACE_PRN_FN_ENT;
-    if (iStatus == KErrNone)
-        {
-        TMSDTMFObserver::TCCPDtmfEvent event =
-                TMSDTMFObserver::ECCPDtmfStringSendingCompleted;
-        NotifyDTMFEvent(event, KErrNone, NULL);
-        }
-    else
-        {
-        gint error = iStatus.Int();
-        if (error != KErrCancel)
-            {
-            TMSDTMFObserver::TCCPDtmfEvent event =
-                    TMSDTMFObserver::ECCPDtmfStringSendingCompleted;
-            NotifyDTMFEvent(event, error, NULL);
-            }
-        // Cancel is not notified
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// -----------------------------------------------------------------------------
-//
-void TMSDTMFProvider::DoCancel()
-    {
-    TRACE_PRN_FN_ENT;
-    iPhone.CancelAsyncRequest(EMobilePhoneSendDTMFTones);
-    TRACE_PRN_FN_EXT;
-    }
-
-//  End of File
--- a/mmserv/tms/tmscallserver/src/tmsdtmftoneplayer.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +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: Telephony Multimedia Service
- *
- */
-
-// INCLUDE FILES
-#include "tmsutility.h"
-#include "tmsdtmftoneplayer.h"
-
-// CONSTANTS
-const gint KBufSize = 10;
-const gint KMaxVolumeLevel = 10;
-
-_LIT(KPhoneTone_Asterisk, "*+w");
-
-//from voip
-const guint KDTMFToneLengthOn = 250000;
-const guint KDTMFToneLengthOff = 50000;
-const guint KDTMFToneLengthPause = 2500000;
-
-using namespace TMS;
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-TMSAudioDtmfTonePlayer* TMSAudioDtmfTonePlayer::NewL(
-        TMSDTMFTonePlayerObserver& obsrvr, guint audioPreference,
-        guint audioPriority)
-    {
-    TMSAudioDtmfTonePlayer* self = new (ELeave) TMSAudioDtmfTonePlayer(obsrvr,
-            audioPreference, audioPriority);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-//Destructor
-TMSAudioDtmfTonePlayer::~TMSAudioDtmfTonePlayer()
-    {
-    TRACE_PRN_FN_ENT;
-    Cancel();
-    delete iDTMFPlayer;
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::TMSAudioDtmfTonePlayer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TMSAudioDtmfTonePlayer::TMSAudioDtmfTonePlayer(
-        TMSDTMFTonePlayerObserver& obsrvr, guint audioPreference,
-        guint audioPriority) :
-    iObserver(obsrvr),
-    iPref(audioPreference),
-    iPrior(audioPriority)
-    {
-    TRACE_PRN_FN_ENT;
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void TMSAudioDtmfTonePlayer::ConstructL()
-    {
-    TRACE_PRN_FN_ENT;
-
-    TMMFPrioritySettings dtmfClickPlayerPrioritySettings;
-    iDTMFPlayer = CMMFDevSound::NewL();
-    iDTMFPlayer->InitializeL(*this, EMMFStateTonePlaying);
-
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::SetVolume
-// Sets the volume level that is used when the dtmf tone is played.
-// -----------------------------------------------------------------------------
-//
-void TMSAudioDtmfTonePlayer::SetVolume(gint volume)
-    {
-    TRACE_PRN_FN_ENT;
-    gint vol = ConvertVolumeLevel(volume);
-
-    if (vol != iVolume)
-        {
-        iVolume = vol;
-        iDTMFPlayer->SetVolume(iVolume);
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::PlayDtmfTone
-// Searches the given DTMF tone from iToneArray and calls PlayCurrentTone
-// member function.
-// -----------------------------------------------------------------------------
-//
-void TMSAudioDtmfTonePlayer::PlayDtmfTone(TDes& tone)
-    {
-    TRACE_PRN_FN_ENT;
-    Cancel();
-
-    // DTMF signaling.
-    if (iDTMFPlayer)
-        {
-        TBuf<KBufSize> key;
-        key.Append(tone);
-        TRAP_IGNORE(iDTMFPlayer->PlayDTMFStringL(tone));
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::Cancel
-// Cancels the currently playing tone.
-// -----------------------------------------------------------------------------
-//
-void TMSAudioDtmfTonePlayer::Cancel()
-    {
-    TRACE_PRN_FN_ENT;
-    iDTMFPlayer->Stop();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::Normalize
-// Lowers case for chars and if its '*','+', or 'w' sets it to asterisk
-// char ('*').
-// -----------------------------------------------------------------------------
-//
-void TMSAudioDtmfTonePlayer::Normalize(TChar& tone)
-    {
-    TRACE_PRN_FN_ENT;
-    tone.LowerCase();
-    TPtrC ast(KPhoneTone_Asterisk);
-
-    if (ast.Locate(tone) != KErrNotFound)
-        {
-        tone = ast[0];
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::InitializeComplete
-// -----------------------------------------------------------------------------
-//
-void TMSAudioDtmfTonePlayer::InitializeComplete(TInt aError)
-    {
-    TRACE_PRN_FN_ENT;
-
-    if (aError == KErrNone)
-        {
-        TMMFPrioritySettings dtmfPlayerSettings;
-        dtmfPlayerSettings.iPref = iPref;
-        dtmfPlayerSettings.iPriority = iPrior;
-        dtmfPlayerSettings.iState = EMMFStateTonePlaying;
-        iDTMFPlayer->SetPrioritySettings(dtmfPlayerSettings);
-
-        TTimeIntervalMicroSeconds32 length(KDTMFToneLengthOn);
-        TTimeIntervalMicroSeconds32 pause(KDTMFToneLengthOff);
-        TTimeIntervalMicroSeconds32 zero(KDTMFToneLengthPause);
-        iDTMFPlayer->SetDTMFLengths(length, pause, zero);
-        iDTMFPlayer->SetVolume(iDTMFPlayer->MaxVolume());
-        }
-
-    iObserver.DTMFInitCompleted(aError);
-
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::ToneFinished
-// -----------------------------------------------------------------------------
-//
-void TMSAudioDtmfTonePlayer::ToneFinished(TInt aError)
-    {
-    TRACE_PRN_FN_ENT;
-    iObserver.DTMFToneFinished(aError);
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSAudioDtmfTonePlayer::ConvertVolumeLevel
-// -----------------------------------------------------------------------------
-//
-gint TMSAudioDtmfTonePlayer::ConvertVolumeLevel(gint volume)
-    {
-    TRACE_PRN_FN_ENT;
-    gint result = iDTMFPlayer->MaxVolume() * volume / KMaxVolumeLevel;
-    TRACE_PRN_FN_EXT;
-    return result;
-    }
-
-//  End of File
--- a/mmserv/tms/tmscallserver/src/tmseteldtmfmonitor.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +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: Telephony Multimedia Service
- *
- */
-
-#include <rmmcustomapi.h>
-#include <gsmerror.h>
-#include "tmsdtmfprovider.h"
-#include "tmsdtmfobserver.h"
-#include "tmseteldtmfmonitor.h"
-#include "tmsutility.h"
-
-using namespace TMS;
-
-// -----------------------------------------------------------------------------
-// TMSEtelDtmfMonitor::NewL.
-// -----------------------------------------------------------------------------
-//
-TMSEtelDtmfMonitor* TMSEtelDtmfMonitor::NewL(TMSDTMFProvider& aObserver,
-        RMmCustomAPI& aMmCustom)
-    {
-    TRACE_PRN_FN_ENT;
-    TMSEtelDtmfMonitor* self = new (ELeave) TMSEtelDtmfMonitor(aObserver,
-            aMmCustom);
-    TRACE_PRN_FN_EXT;
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// Constructs the monitor.
-// -----------------------------------------------------------------------------
-//
-TMSEtelDtmfMonitor::TMSEtelDtmfMonitor(TMSDTMFProvider& aObserver,
-        RMmCustomAPI& aMmCustom) :
-    CActive(EPriorityStandard),
-    iObserver(aObserver),
-    iMmCustom(aMmCustom)
-    {
-    TRACE_PRN_FN_ENT;
-    CActiveScheduler::Add(this);
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// -----------------------------------------------------------------------------
-//
-TMSEtelDtmfMonitor::~TMSEtelDtmfMonitor()
-    {
-    TRACE_PRN_FN_ENT;
-    Cancel();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Starts the monitor.
-// -----------------------------------------------------------------------------
-//
-void TMSEtelDtmfMonitor::StartMonitoring()
-    {
-    TRACE_PRN_FN_ENT;
-    if (!IsActive())
-        {
-        iStatus = KRequestPending;
-        iMmCustom.NotifyDtmfEvent(iStatus, iEventData);
-        SetActive();
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// From CActive.
-// Handles line status change notifying.
-// -----------------------------------------------------------------------------
-//
-void TMSEtelDtmfMonitor::RunL()
-    {
-    TRACE_PRN_FN_ENT;
-    gint err = iStatus.Int();
-    TRACE_PRN_N1(_L("**TMS TMSEtelDtmfMonitor::RunL: status:%d"), err);
-
-    if (err == KErrNone)
-        {
-        TMSDTMFObserver::TCCPDtmfEvent event;
-        if (iEventData.iEvent == RMmCustomAPI::EDtmfStart
-                && iEventData.iType == RMmCustomAPI::EDtmfManual)
-            {
-            event = TMSDTMFObserver::ECCPDtmfManualStart;
-            }
-        else if (iEventData.iEvent == RMmCustomAPI::EDtmfStart
-                && iEventData.iType == RMmCustomAPI::EDtmfSequence)
-            {
-            event = TMSDTMFObserver::ECCPDtmfSequenceStart;
-            }
-        else if (iEventData.iEvent == RMmCustomAPI::EDtmfStop
-                && iEventData.iType == RMmCustomAPI::EDtmfManual)
-            {
-            event = TMSDTMFObserver::ECCPDtmfManualStop;
-            }
-        else if (iEventData.iEvent == RMmCustomAPI::EDtmfStop
-                && iEventData.iType == RMmCustomAPI::EDtmfSequence)
-            {
-            event = TMSDTMFObserver::ECCPDtmfSequenceStop;
-            }
-        else if (iEventData.iEvent == RMmCustomAPI::EDtmfAbort
-                && iEventData.iType == RMmCustomAPI::EDtmfManual)
-            {
-            event = TMSDTMFObserver::ECCPDtmfManualAbort;
-            }
-        else if (iEventData.iEvent == RMmCustomAPI::EDtmfAbort
-                && iEventData.iType == RMmCustomAPI::EDtmfSequence)
-            {
-            event = TMSDTMFObserver::ECCPDtmfSequenceAbort;
-            }
-        else
-            {
-            // Refresh and return (no observer notfiying).
-            TRACE_PRN_N2(_L("**TMS TMSEtelDtmfMonitor::RunL: Unknown event \
-                    = %¨d, type = %d"), iEventData.iEvent,iEventData.iType);
-            StartMonitoring();
-            return;
-            }
-
-        iObserver.NotifyDTMFEvent(event, err, iEventData.iTone);
-        }
-    else
-        {
-        TRACE_PRN_N1(_L("**TMS TMSEtelDtmfMonitor::RunL: Error \
-                from DTMF: %d"),err);
-        }
-
-    // Continue if not in offline mode
-    if (err != KErrGsmOfflineOpNotAllowed && err != KErrCancel
-            && err != KErrNotSupported)
-        {
-        StartMonitoring();
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// -----------------------------------------------------------------------------
-//
-void TMSEtelDtmfMonitor::DoCancel()
-    {
-    TRACE_PRN_FN_ENT;
-    iMmCustom.CancelAsyncRequest(ECustomNotifyDtmfEventIPC);
-    TRACE_PRN_FN_EXT;
-    }
-
-// End of file
--- a/mmserv/tms/tmscallserver/src/tmseteldtmfstopmonitor.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +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: Telephony Multimedia Service
- *
- */
-
-#include <gsmerror.h>
-#include "tmsutility.h"
-#include "tmsdtmfobserver.h"
-#include "tmsdtmfprovider.h"
-#include "tmseteldtmfstopmonitor.h"
-
-using namespace TMS;
-
-// -----------------------------------------------------------------------------
-// TMSEtelDtmfStopMonitor::NewL.
-// -----------------------------------------------------------------------------
-//
-TMSEtelDtmfStopMonitor* TMSEtelDtmfStopMonitor::NewL(TMSDTMFProvider& aObserver,
-        RMobilePhone& aPhone)
-    {
-    TRACE_PRN_FN_EXT;
-    TMSEtelDtmfStopMonitor* self = new (ELeave) TMSEtelDtmfStopMonitor(
-            aObserver, aPhone);
-    TRACE_PRN_FN_EXT;
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// Constructs the monitor.
-// -----------------------------------------------------------------------------
-//
-TMSEtelDtmfStopMonitor::TMSEtelDtmfStopMonitor(TMSDTMFProvider& aObserver,
-        RMobilePhone& aPhone) :
-    CActive(EPriorityStandard),
-    iObserver(aObserver),
-    iPhone(aPhone)
-    {
-    TRACE_PRN_FN_ENT;
-    CActiveScheduler::Add(this);
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// -----------------------------------------------------------------------------
-//
-TMSEtelDtmfStopMonitor::~TMSEtelDtmfStopMonitor()
-    {
-    TRACE_PRN_FN_ENT;
-    Cancel();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// Starts the monitor.
-// -----------------------------------------------------------------------------
-//
-void TMSEtelDtmfStopMonitor::StartMonitoring()
-    {
-    TRACE_PRN_FN_ENT;
-    if (!IsActive())
-        {
-        iStatus = KRequestPending;
-        iPhone.NotifyStopInDTMFString(iStatus);
-        SetActive();
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// From CActive.
-// Handles line status change notifying.
-// -----------------------------------------------------------------------------
-//
-void TMSEtelDtmfStopMonitor::RunL()
-    {
-    TRACE_PRN_FN_ENT;
-    gint err = iStatus.Int();
-    TRACE_PRN_N1(_L("**TMS TMSEtelDtmfStopMonitor::RunL: status: %d"), err);
-
-    if (err != KErrCancel && err != KErrServerTerminated)
-        {
-        TChar tone = NULL;
-        TMSDTMFObserver::TCCPDtmfEvent event =
-                TMSDTMFObserver::ECCPDtmfStopInDtmfString;
-        iObserver.NotifyDTMFEvent(event, err, tone);
-        }
-    else
-        {
-        TRACE_PRN_N1(_L("**TMS TMSEtelDtmfStopMonitor::RunL: Error \
-                       from RMobilePhone: %d"),iStatus.Int());
-        }
-
-    // Continue if not in offline mode
-    if (err != KErrGsmOfflineOpNotAllowed && err != KErrCancel
-            && err != KErrNotSupported)
-        {
-        StartMonitoring();
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// -----------------------------------------------------------------------------
-//
-void TMSEtelDtmfStopMonitor::DoCancel()
-    {
-    TRACE_PRN_FN_ENT;
-    iPhone.CancelAsyncRequest(EMobilePhoneNotifyStopInDTMFString);
-    TRACE_PRN_FN_EXT;
-    }
-
-// End of file
--- a/mmserv/tms/tmscallserver/src/tmsipcalldownlinkds.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmsipcalldownlinkds.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -112,11 +112,7 @@
         {
         TRAP(err, iDevSound->PlayInitL());
         TRACE_PRN_IF_ERR(err);
-        if (err != TMS_RESULT_SUCCESS)
-            {
-            iStatus = EReady;
-            iObserver.DownlinkStarted(err);
-            }
+        iObserver.DownlinkStarted(err);
         }
     TRACE_PRN_FN_EXT;
     }
--- a/mmserv/tms/tmscallserver/src/tmsipcalluplinkds.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmsipcalluplinkds.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -112,12 +112,7 @@
         {
         TRAP(err, iDevSound->RecordInitL());
         TRACE_PRN_IF_ERR(err);
-
-        if (err != TMS_RESULT_SUCCESS)
-            {
-            iStatus = EReady;
-            iObserver.UplinkStarted(err);
-            }
+        iObserver.UplinkStarted(err);
         }
     TRACE_PRN_FN_EXT;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmscallserver/src/tmsyncvol.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ *
+ * Contributors:
+ *
+ * Description: Telephony Multimedia Service
+ *
+ */
+
+// INCLUDE FILES
+#include "tmssyncvol.h"
+#include "tmsclientserver.h"
+#include "tmsutility.h"
+
+using namespace TMS;
+
+// CONSTANTS
+_LIT_SECURITY_POLICY_PASS(KTMSServerReadPolicy);
+_LIT_SECURITY_POLICY_C1(KTMSServerWritePolicy, ECapabilityWriteUserData);
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::TMSSyncVol
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+TMSSyncVol::TMSSyncVol()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void TMSSyncVol::ConstructL()
+    {
+    TRACE_PRN_FN_ENT;
+    TInt err = RProperty::Define(ESyncVolume, RProperty::EInt,
+            KTMSServerReadPolicy, KTMSServerWritePolicy);
+    TRACE_PRN_N1(_L("TMSSyncVol::ConstructL err:%d"),err);
+
+    if (err != KErrAlreadyExists)
+        {
+        User::LeaveIfError(err);
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+TMSSyncVol* TMSSyncVol::NewL()
+    {
+    TMSSyncVol* self = new (ELeave) TMSSyncVol();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// Destructor
+TMSSyncVol::~TMSSyncVol()
+    {
+    TRACE_PRN_FN_ENT;
+    TInt err = RProperty::Delete(KTMSPropertyCategory, ESyncVolume);
+    TRACE_PRN_N1(_L("TMSSyncVol::~TMSSyncVol err:%d"),err);
+    TRACE_PRN_FN_ENT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSSyncVol::SetSyncVol
+// -----------------------------------------------------------------------------
+//
+void TMSSyncVol::SetSyncVol(TBool syncvol)
+    {
+    TRACE_PRN_FN_ENT;
+    //    TInt err(KErrNone);
+    if (syncvol)
+        {
+        /*err =*/RProperty::Set(KTMSPropertyCategory, ESyncVolume, syncvol);
+        }
+
+    //TRACE_PRN_N1(_L("TMSSyncVol::SetSyncVol err:%d"),err);
+    TRACE_PRN_FN_EXT;
+    }
+
+//  End of File
--- a/mmserv/tms/tmsfactory/src/tmsfactoryimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsfactory/src/tmsfactoryimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -25,7 +25,6 @@
 #include "tmsringtoneimpl.h"
 #include "tmsdtmfimpl.h"
 #include "tmsinbandtoneimpl.h"
-
 #include "tmsutility.h"
 #include "tmsproxy.h"
 #include "tmsfactoryimpl.h"
--- a/mmserv/tms/tmsimpl/bwins/tmsimpl.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/bwins/tmsimpl.def	Wed Aug 18 10:17:22 2010 +0300
@@ -1,23 +1,23 @@
 EXPORTS
 	?Create@TMSEffectImpl@TMS@@SAHHAAPAVTMSEffect@2@@Z @ 1 NONAME ; int TMS::TMSEffectImpl::Create(int, class TMS::TMSEffect * &)
-	?Create@TMSDTMFImpl@TMS@@SAHHAAPAVTMSDTMF@2@@Z @ 2 NONAME ; int TMS::TMSDTMFImpl::Create(int, class TMS::TMSDTMF * &)
-	?Delete@TMSDTMFImpl@TMS@@SAHAAPAVTMSDTMF@2@@Z @ 3 NONAME ; int TMS::TMSDTMFImpl::Delete(class TMS::TMSDTMF * &)
-	?Create@TMSSourceImpl@TMS@@SAHHAAPAVTMSSource@2@@Z @ 4 NONAME ; int TMS::TMSSourceImpl::Create(int, class TMS::TMSSource * &)
-	?Delete@TMSRingToneImpl@TMS@@SAHAAPAVTMSRingTone@2@@Z @ 5 NONAME ; int TMS::TMSRingToneImpl::Delete(class TMS::TMSRingTone * &)
-	?Create@TMSRingToneImpl@TMS@@SAHAAPAVTMSRingTone@2@@Z @ 6 NONAME ; int TMS::TMSRingToneImpl::Create(class TMS::TMSRingTone * &)
-	?Delete@TMSFormatImpl@TMS@@SAHAAPAVTMSFormat@2@@Z @ 7 NONAME ; int TMS::TMSFormatImpl::Delete(class TMS::TMSFormat * &)
-	?Delete@TMSCallImpl@TMS@@SAHAAPAVTMSCall@2@@Z @ 8 NONAME ; int TMS::TMSCallImpl::Delete(class TMS::TMSCall * &)
-	?Delete@TMSSinkImpl@TMS@@SAHAAPAVTMSSink@2@@Z @ 9 NONAME ; int TMS::TMSSinkImpl::Delete(class TMS::TMSSink * &)
-	?Delete@TMSBufferImpl@TMS@@SAHAAPAVTMSBuffer@2@@Z @ 10 NONAME ; int TMS::TMSBufferImpl::Delete(class TMS::TMSBuffer * &)
-	?Delete@TMSSourceImpl@TMS@@SAHAAPAVTMSSource@2@@Z @ 11 NONAME ; int TMS::TMSSourceImpl::Delete(class TMS::TMSSource * &)
-	?Delete@TMSEffectImpl@TMS@@SAHAAPAVTMSEffect@2@@Z @ 12 NONAME ; int TMS::TMSEffectImpl::Delete(class TMS::TMSEffect * &)
-	?Create@TMSBufferImpl@TMS@@SAHHIAAPAVTMSBuffer@2@@Z @ 13 NONAME ; int TMS::TMSBufferImpl::Create(int, unsigned int, class TMS::TMSBuffer * &)
-	?Create@TMSCallImpl@TMS@@SAHHAAPAVTMSCall@2@I@Z @ 14 NONAME ; int TMS::TMSCallImpl::Create(int, class TMS::TMSCall * &, unsigned int)
-	?Delete@TMSGlobalRoutingImpl@TMS@@SAHAAPAVTMSGlobalRouting@2@@Z @ 15 NONAME ; int TMS::TMSGlobalRoutingImpl::Delete(class TMS::TMSGlobalRouting * &)
-	?Create@TMSRingToneImpl@TMS@@SAHAAPAVTMSRingTone@2@AAVRWindow@@H@Z @ 16 NONAME ; int TMS::TMSRingToneImpl::Create(class TMS::TMSRingTone * &, class RWindow &, int)
-	?Delete@TMSInbandToneImpl@TMS@@SAHAAPAVTMSInbandTone@2@@Z @ 17 NONAME ; int TMS::TMSInbandToneImpl::Delete(class TMS::TMSInbandTone * &)
-	?Create@TMSSinkImpl@TMS@@SAHHAAPAVTMSSink@2@@Z @ 18 NONAME ; int TMS::TMSSinkImpl::Create(int, class TMS::TMSSink * &)
-	?Create@TMSInbandToneImpl@TMS@@SAHAAPAVTMSInbandTone@2@@Z @ 19 NONAME ; int TMS::TMSInbandToneImpl::Create(class TMS::TMSInbandTone * &)
-	?Create@TMSFormatImpl@TMS@@SAHHAAPAVTMSFormat@2@@Z @ 20 NONAME ; int TMS::TMSFormatImpl::Create(int, class TMS::TMSFormat * &)
-	?Create@TMSGlobalRoutingImpl@TMS@@SAHAAPAVTMSGlobalRouting@2@@Z @ 21 NONAME ; int TMS::TMSGlobalRoutingImpl::Create(class TMS::TMSGlobalRouting * &)
+	?Create@TMSSourceImpl@TMS@@SAHHAAPAVTMSSource@2@@Z @ 2 NONAME ; int TMS::TMSSourceImpl::Create(int, class TMS::TMSSource * &)
+	?Delete@TMSRingToneImpl@TMS@@SAHAAPAVTMSRingTone@2@@Z @ 3 NONAME ; int TMS::TMSRingToneImpl::Delete(class TMS::TMSRingTone * &)
+	?Create@TMSRingToneImpl@TMS@@SAHAAPAVTMSRingTone@2@@Z @ 4 NONAME ; int TMS::TMSRingToneImpl::Create(class TMS::TMSRingTone * &)
+	?Delete@TMSFormatImpl@TMS@@SAHAAPAVTMSFormat@2@@Z @ 5 NONAME ; int TMS::TMSFormatImpl::Delete(class TMS::TMSFormat * &)
+	?Delete@TMSCallImpl@TMS@@SAHAAPAVTMSCall@2@@Z @ 6 NONAME ; int TMS::TMSCallImpl::Delete(class TMS::TMSCall * &)
+	?Delete@TMSSinkImpl@TMS@@SAHAAPAVTMSSink@2@@Z @ 7 NONAME ; int TMS::TMSSinkImpl::Delete(class TMS::TMSSink * &)
+	?Delete@TMSBufferImpl@TMS@@SAHAAPAVTMSBuffer@2@@Z @ 8 NONAME ; int TMS::TMSBufferImpl::Delete(class TMS::TMSBuffer * &)
+	?Delete@TMSSourceImpl@TMS@@SAHAAPAVTMSSource@2@@Z @ 9 NONAME ; int TMS::TMSSourceImpl::Delete(class TMS::TMSSource * &)
+	?Delete@TMSEffectImpl@TMS@@SAHAAPAVTMSEffect@2@@Z @ 10 NONAME ; int TMS::TMSEffectImpl::Delete(class TMS::TMSEffect * &)
+	?Create@TMSBufferImpl@TMS@@SAHHIAAPAVTMSBuffer@2@@Z @ 11 NONAME ; int TMS::TMSBufferImpl::Create(int, unsigned int, class TMS::TMSBuffer * &)
+	?Create@TMSCallImpl@TMS@@SAHHAAPAVTMSCall@2@I@Z @ 12 NONAME ; int TMS::TMSCallImpl::Create(int, class TMS::TMSCall * &, unsigned int)
+	?Delete@TMSGlobalRoutingImpl@TMS@@SAHAAPAVTMSGlobalRouting@2@@Z @ 13 NONAME ; int TMS::TMSGlobalRoutingImpl::Delete(class TMS::TMSGlobalRouting * &)
+	?Create@TMSRingToneImpl@TMS@@SAHAAPAVTMSRingTone@2@AAVRWindow@@H@Z @ 14 NONAME ; int TMS::TMSRingToneImpl::Create(class TMS::TMSRingTone * &, class RWindow &, int)
+	?Delete@TMSInbandToneImpl@TMS@@SAHAAPAVTMSInbandTone@2@@Z @ 15 NONAME ; int TMS::TMSInbandToneImpl::Delete(class TMS::TMSInbandTone * &)
+	?Create@TMSSinkImpl@TMS@@SAHHAAPAVTMSSink@2@@Z @ 16 NONAME ; int TMS::TMSSinkImpl::Create(int, class TMS::TMSSink * &)
+	?Create@TMSInbandToneImpl@TMS@@SAHAAPAVTMSInbandTone@2@@Z @ 17 NONAME ; int TMS::TMSInbandToneImpl::Create(class TMS::TMSInbandTone * &)
+	?Create@TMSFormatImpl@TMS@@SAHHAAPAVTMSFormat@2@@Z @ 18 NONAME ; int TMS::TMSFormatImpl::Create(int, class TMS::TMSFormat * &)
+	?Create@TMSGlobalRoutingImpl@TMS@@SAHAAPAVTMSGlobalRouting@2@@Z @ 19 NONAME ; int TMS::TMSGlobalRoutingImpl::Create(class TMS::TMSGlobalRouting * &)
+	?Create@TMSDTMFImpl@TMS@@SAHHAAPAVTMSDTMF@2@@Z @ 20 NONAME ; int TMS::TMSDTMFImpl::Create(int, class TMS::TMSDTMF * &)
+	?Delete@TMSDTMFImpl@TMS@@SAHAAPAVTMSDTMF@2@@Z @ 21 NONAME ; int TMS::TMSDTMFImpl::Delete(class TMS::TMSDTMF * &)
 
--- a/mmserv/tms/tmsimpl/group/tmsimpl.mmp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/group/tmsimpl.mmp	Wed Aug 18 10:17:22 2010 +0300
@@ -96,6 +96,7 @@
 LIBRARY         tmsapi.lib
 LIBRARY         tmscallproxy.lib
 LIBRARY         tmsproxy.lib
+LIBRARY         tmsutility.lib
 LIBRARY         libc.lib
 
 DEFFILE         tmsimpl.def
--- a/mmserv/tms/tmsimpl/inc/tmsdtmfbodyimpl.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/inc/tmsdtmfbodyimpl.h	Wed Aug 18 10:17:22 2010 +0300
@@ -33,10 +33,11 @@
 class TMSDTMFBodyImpl : public TMSDTMFBody
     {
 public:
-    static gint Create(TMSStreamType streamtype, TMSDTMFBody*& bodyimpl);
+    static gint Create(TMSStreamType streamtype, TMSDTMF& parent,
+            TMSDTMFBody*& bodyimpl);
     virtual ~TMSDTMFBodyImpl();
 
-    // From TMSDTMFBody begins
+    // From TMSDTMFBody
     virtual gint AddObserver(TMSDTMFObserver& obsrvr, gpointer user_data);
     virtual gint RemoveObserver(TMSDTMFObserver& obsrvr);
     virtual gint Start();
@@ -44,11 +45,9 @@
     virtual gint SetTone(GString* string);
     virtual gint ContinueDTMFStringSending(gboolean sending);
 
-    void SetParent(TMSDTMF*& parent);
-
 private:
     TMSDTMFBodyImpl();
-    gint PostConstruct();
+    gint PostConstruct(TMSStreamType stype, TMSDTMF& parent);
 
 private:
     TMSDTMFObserver* iObserver;
--- a/mmserv/tms/tmsimpl/inc/tmsstreambodyimpl.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/inc/tmsstreambodyimpl.h	Wed Aug 18 10:17:22 2010 +0300
@@ -118,4 +118,3 @@
 
 #endif // TMS_STREAM_BODY_IMPL_H
 
-// End of file
--- a/mmserv/tms/tmsimpl/src/tmscallimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmscallimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -36,11 +36,10 @@
 
 gint TMSCallImpl::PostConstruct(TMSCallType ctype, guint /*ctxid*/)
     {
+    TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
     TMSCallBody* tmscallimplbody(NULL);
 
-    TRACE_PRN_FN_ENT;
-
     switch (ctype)
         {
         case TMS_CALL_IP:
@@ -65,10 +64,10 @@
 EXPORT_C gint TMSCallImpl::Create(TMSCallType ctype, TMSCall*& tmscall,
         guint ctxid)
     {
+    TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
     TMSCallImpl *self = new TMSCallImpl();
 
-    TRACE_PRN_FN_ENT;
     if (self)
         {
         ret = self->PostConstruct(ctype, ctxid);
--- a/mmserv/tms/tmsimpl/src/tmscscallbodyimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmscscallbodyimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -66,7 +66,6 @@
     {
     gint ret(TMS_RESULT_SUCCESS);
     TRACE_PRN_FN_ENT;
-
     iSession = new TMSCallProxy();
 
     TRACE_PRN_FN_ENT;
@@ -106,9 +105,7 @@
 gint TMSCSCallBodyImpl::GetCallContextId(guint& ctxid)
     {
     gint ret(TMS_RESULT_FEATURE_NOT_SUPPORTED);
-    TRACE_PRN_FN_ENT;
     ctxid = 0;
-    TRACE_PRN_FN_EXT;
     return ret;
     }
 
@@ -138,14 +135,18 @@
                 }
             else
                 {
-                //TODO: delete call only if no active sessions left
                 if (iSession)
                     {
+                    //TODO: delete call only if no active sessions left
                     iSession->DeleteCall();
                     iSession->Close();
                     delete iSession;
                     iSession = NULL;
                     }
+                else
+                    {
+                    ret = TMS_RESULT_UNINITIALIZED_OBJECT;
+                    }
                 }
             break;
         default:
--- a/mmserv/tms/tmsimpl/src/tmsdtmfbodyimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsdtmfbodyimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -52,31 +52,30 @@
     TRACE_PRN_FN_EXT;
     }
 
-gint TMSDTMFBodyImpl::Create(TMSStreamType streamtype, TMSDTMFBody*& bodyimpl)
+gint TMSDTMFBodyImpl::Create(TMSStreamType streamtype, TMSDTMF& parent,
+        TMSDTMFBody*& bodyimpl)
     {
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
     TMSDTMFBodyImpl* self = new TMSDTMFBodyImpl();
     if (self)
         {
-        ret = self->PostConstruct();
+        ret = self->PostConstruct(streamtype, parent);
         if (ret != TMS_RESULT_SUCCESS)
             {
             delete self;
             self = NULL;
             }
-        else
-            {
-            self->iStreamType = streamtype;
-            }
         }
     bodyimpl = self;
     return ret;
     }
 
-gint TMSDTMFBodyImpl::PostConstruct()
+gint TMSDTMFBodyImpl::PostConstruct(TMSStreamType streamtype, TMSDTMF& parent)
     {
     gint ret(TMS_RESULT_SUCCESS);
     iClientId = 1;
+    iParent = &parent;
+    iStreamType = streamtype;
     iProxy = new TMSProxy();
     if (!iProxy)
         {
@@ -84,7 +83,11 @@
         }
     else
         {
-        if (iProxy->Connect() != TMS_RESULT_SUCCESS)
+        if (iProxy->Connect() == TMS_RESULT_SUCCESS)
+            {
+            ret = iProxy->InitDTMFPlayer(iStreamType);
+            }
+        else
             {
             delete iProxy;
             iProxy = NULL;
@@ -106,10 +109,6 @@
             {
             ret = iProxy->SetMsgQueueNotifier(EMsgQueueDTMFType, iObserver,
                     iParent, iClientId);
-            if (ret == TMS_RESULT_SUCCESS)
-                {
-                ret = iProxy->StartDTMFNotifier();
-                }
             }
         else
             {
@@ -130,7 +129,6 @@
         {
         ret = iProxy->RemoveMsgQueueNotifier(EMsgQueueDTMFType, iObserver);
         iObserver = NULL;
-        iProxy->CancelDTMFNotifier();
         }
     else
         {
@@ -179,7 +177,6 @@
     __ASSERT_ALWAYS(string, PANIC(TMS_RESULT_NULL_ARGUMENT));
 
     gint ret(TMS_RESULT_SUCCESS);
-
     if (iString)
         {
         if (iString->len)
@@ -206,8 +203,3 @@
     return ret;
     }
 
-void TMSDTMFBodyImpl::SetParent(TMSDTMF*& parent)
-    {
-    iParent = parent;
-    }
-
--- a/mmserv/tms/tmsimpl/src/tmsdtmfimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsdtmfimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -21,10 +21,9 @@
 
 using namespace TMS;
 
-TMSDTMFImpl::TMSDTMFImpl(TMSStreamType streamtype)
+TMSDTMFImpl::TMSDTMFImpl()
     {
     TRACE_PRN_FN_ENT;
-    iStreamType = streamtype;
     TRACE_PRN_FN_EXT;
     }
 
@@ -34,12 +33,12 @@
     TRACE_PRN_FN_EXT;
     }
 
-gint TMSDTMFImpl::PostConstruct()
+gint TMSDTMFImpl::PostConstruct(TMSStreamType streamtype)
     {
+    TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
     TMSDTMFBody* bodyimpl(NULL);
-    TRACE_PRN_FN_ENT;
-    ret = TMSDTMFBodyImpl::Create(iStreamType, bodyimpl);
+    ret = TMSDTMFBodyImpl::Create(streamtype, *this, bodyimpl);
 
     if (ret == TMS_RESULT_SUCCESS)
         {
@@ -51,49 +50,32 @@
 
 EXPORT_C gint TMSDTMFImpl::Create(TMSStreamType streamtype, TMSDTMF*& dtmf)
     {
+    TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
-    TMSDTMFImpl *self = new TMSDTMFImpl(streamtype);
+    TMSDTMFImpl *self = new TMSDTMFImpl();
 
-    TRACE_PRN_FN_ENT;
     if (self)
         {
-        ret = self->PostConstruct();
+        ret = self->PostConstruct(streamtype);
         if (ret != TMS_RESULT_SUCCESS)
             {
             delete self;
             self = NULL;
             }
         }
-    if (self && ret == TMS_RESULT_SUCCESS)
-        {
-        dtmf = self;
-        ret = self->SetParent(dtmf);
-        }
+
+    dtmf = self;
     TRACE_PRN_FN_EXT;
     return ret;
     }
 
 EXPORT_C gint TMSDTMFImpl::Delete(TMSDTMF*& dtmf)
     {
+    TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_SUCCESS);
-    TRACE_PRN_FN_ENT;
-    delete (static_cast<TMSDTMFImpl*>(dtmf));
+    delete (static_cast<TMSDTMFImpl*> (dtmf));
     dtmf = NULL;
     TRACE_PRN_FN_EXT;
     return ret;
     }
 
-gint TMSDTMFImpl::SetParent(TMSDTMF*& parent)
-    {
-    gint ret(TMS_RESULT_SUCCESS);
-    if (this->iBody)
-        {
-        static_cast<TMSDTMFBodyImpl*>(this->iBody)->SetParent(parent);
-        }
-    else
-        {
-        ret = TMS_RESULT_UNINITIALIZED_OBJECT;
-        }
-    return ret;
-    }
-
--- a/mmserv/tms/tmsimpl/src/tmseffectimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmseffectimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -61,19 +61,19 @@
     switch (effecttype)
         {
         case TMS_EFFECT_VOLUME:
-            delete (static_cast<TMSVolumeEffectImpl*>(tmseffect));
+            delete (static_cast<TMSVolumeEffectImpl*> (tmseffect));
             tmseffect = NULL;
             break;
         case TMS_EFFECT_GAIN:
-            delete (static_cast<TMSGainEffectImpl*>(tmseffect));
+            delete (static_cast<TMSGainEffectImpl*> (tmseffect));
             tmseffect = NULL;
             break;
         case TMS_EFFECT_GLOBAL_VOL:
-            delete (static_cast<TMSGlobalVolEffectImpl*>(tmseffect));
+            delete (static_cast<TMSGlobalVolEffectImpl*> (tmseffect));
             tmseffect = NULL;
             break;
         case TMS_EFFECT_GLOBAL_GAIN:
-            delete (static_cast<TMSGlobalGainEffectImpl*>(tmseffect));
+            delete (static_cast<TMSGlobalGainEffectImpl*> (tmseffect));
             tmseffect = NULL;
             break;
         default:
--- a/mmserv/tms/tmsimpl/src/tmsg711impl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsg711impl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -43,7 +43,7 @@
     if (ret == TMS_RESULT_SUCCESS)
         {
         this->iBody = bodyimpl;
-        this->iFormatBody = static_cast<TMSG711FormatBodyImpl*>(bodyimpl);
+        this->iFormatBody = static_cast<TMSG711FormatBodyImpl*> (bodyimpl);
         }
     TRACE_PRN_FN_EXT;
     return ret;
@@ -52,7 +52,7 @@
 gint TMSG711FormatImpl::Create(TMSFormat*& tmsformat)
     {
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
-    TMSG711FormatImpl *self = new TMSG711FormatImpl();
+    TMSG711FormatImpl* self = new TMSG711FormatImpl();
 
     TRACE_PRN_FN_ENT;
     if (self)
@@ -75,7 +75,7 @@
     gint ret(TMS_RESULT_SUCCESS);
     if (this->iBody)
         {
-        static_cast<TMSG711FormatBodyImpl*>(this->iBody)->SetProxy(context,
+        static_cast<TMSG711FormatBodyImpl*> (this->iBody)->SetProxy(context,
                 queuehandler);
         }
     else
@@ -85,4 +85,3 @@
     return ret;
     }
 
-// End of file
--- a/mmserv/tms/tmsimpl/src/tmsipcallbodyimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsipcallbodyimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -68,37 +68,38 @@
     TRACE_PRN_FN_ENT;
     iSession = new TMSCallProxy();
 
-    if (iSession)
+    TRACE_PRN_FN_ENT;
+    if (!iSession)
+        {
+        ret = TMS_RESULT_INSUFFICIENT_MEMORY;
+        }
+    RET_REASON_IF_ERR(ret);
+
+    if (iSession->Connect() != TMS_RESULT_SUCCESS)
         {
-        if (iSession->Connect() != TMS_RESULT_SUCCESS)
+        delete iSession;
+        iSession = NULL;
+        ret = TMS_RESULT_FATAL_ERROR;
+        }
+    else
+        {
+        ret = iSession->CreateCall(TMS_CALL_IP);
+        if (ret != TMS_RESULT_SUCCESS && ret != TMS_RESULT_ALREADY_EXIST)
             {
+            iSession->Close();
             delete iSession;
             iSession = NULL;
             ret = TMS_RESULT_FATAL_ERROR;
             }
-        else
-            {
-            ret = iSession->CreateCall(TMS_CALL_IP);
-            if (ret != TMS_RESULT_SUCCESS && ret != TMS_RESULT_ALREADY_EXIST)
-                {
-                iSession->Close();
-                delete iSession;
-                ret = TMS_RESULT_FATAL_ERROR;
-                }
-            }
         }
-    else
-        {
-        ret = TMS_RESULT_INSUFFICIENT_MEMORY;
-        }
+    RET_REASON_IF_ERR(ret);
     TRACE_PRN_FN_EXT;
     return ret;
     }
 
 TMSCallType TMSIPCallBodyImpl::GetCallType()
     {
-    TMSCallType ctype(TMS_CALL_IP);
-    return ctype;
+    return TMS_CALL_IP;
     }
 
 gint TMSIPCallBodyImpl::GetCallContextId(guint& ctxid)
@@ -127,7 +128,7 @@
                 ret = AddStreamToList(strm);
                 }
             //TODO:Need longer term fix to not destory everything
-            //if more the one stream is trying to be created.
+            //if more than one stream is trying to be created.
             else if (ret == TMS_RESULT_ALREADY_EXIST)
                 {
                 break;
@@ -193,9 +194,10 @@
 
     if (itStrm)
         {
+        // Remove stream object from the vector. After removing, the iterator
+        // will point to the next item (if available); so, do NOT attempt
+        // deleting itStrm here! (Will result in KERN-EXEC)
         iStreamsVector.erase(itStrm); // Remove from array
-        // Don't delete itStrm as the iterator advanced to the next
-        // item on the list
         ret = TMSStreamImpl::Delete(strm);
         }
     TRACE_PRN_FN_EXT;
--- a/mmserv/tms/tmsimpl/src/tmsringtonebodyimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsringtonebodyimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -81,18 +81,18 @@
     gint ret(TMS_RESULT_SUCCESS);
     iClientId = 1;
     iProxy = new TMSProxy();
-
     if (!iProxy)
         {
         ret = TMS_RESULT_INSUFFICIENT_MEMORY;
         }
-    RET_REASON_IF_ERR(ret);
-
-    if (iProxy->Connect() != TMS_RESULT_SUCCESS)
+    else
         {
-        delete iProxy;
-        iProxy = NULL;
-        ret = TMS_RESULT_FATAL_ERROR;
+        if (iProxy->Connect() != TMS_RESULT_SUCCESS)
+            {
+            delete iProxy;
+            iProxy = NULL;
+            ret = TMS_RESULT_FATAL_ERROR;
+            }
         }
     RET_REASON_IF_ERR(ret);
     return ret;
@@ -223,7 +223,6 @@
     return ret;
     }
 
-
 void TMSRingToneBodyImpl::SetParent(TMSRingTone*& parent)
     {
     iParent = parent;
--- a/mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -49,11 +49,13 @@
     iFormat(NULL),
     iStreamState(TMS_STREAM_UNINITIALIZED)
     {
-    //TMSStream::Construct(this);
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_FN_EXT;
     }
 
 TMSStreamBodyImpl::~TMSStreamBodyImpl()
     {
+    TRACE_PRN_FN_ENT;
     if (iMsgQHandler)
         {
         iMsgQHandler->Cancel();
@@ -71,6 +73,7 @@
         iContext.CallProxy->DeleteStream(iContext.CallType,
                 iContext.StreamType, iContext.StreamId);
         }
+    TRACE_PRN_FN_EXT;
     }
 
 gint TMSStreamBodyImpl::Create(TMSCallType callType, TMSStreamType stype,
@@ -719,7 +722,7 @@
         void* user_data)
     {
     TMSSignalEvent event = {}; //all elements initialized to zeros
-    event.reason = aError;
+    event.reason = TMSRESULT(aError);
     event.user_data = user_data;
     iStreamState = aEventType;
 
--- a/mmserv/tms/tmsimpl/src/tmsstreamimpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsstreamimpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -36,21 +36,23 @@
 gint TMSStreamImpl::PostConstruct(TMSCallType callType, TMSStreamType stype,
         TMSCallProxy* proxy)
     {
+    TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
-    TMSStreamBody* tmsstreamimplbody(NULL);
-    ret = TMSStreamBodyImpl::Create(callType, stype, proxy, *this,
-            tmsstreamimplbody);
+    TMSStreamBody* bodyimpl(NULL);
+    ret = TMSStreamBodyImpl::Create(callType, stype, proxy, *this, bodyimpl);
 
     if (ret == TMS_RESULT_SUCCESS)
         {
-        this->iBody = tmsstreamimplbody;
+        this->iBody = bodyimpl;
         }
+    TRACE_PRN_FN_EXT;
     return ret;
     }
 
 gint TMSStreamImpl::Create(TMSCallType callType, TMSStreamType stype,
         TMSCallProxy* proxy, TMSStream*& strm)
     {
+    TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
     TMSStreamImpl *self = new TMSStreamImpl();
 
@@ -64,6 +66,7 @@
             }
         }
     strm = self;
+    TRACE_PRN_FN_EXT;
     return ret;
     }
 
@@ -71,7 +74,7 @@
     {
     TRACE_PRN_FN_ENT;
     gint ret(TMS_RESULT_SUCCESS);
-    delete (static_cast<TMSStreamImpl*>(strm));
+    delete (static_cast<TMSStreamImpl*> (strm));
     strm = NULL;
     TRACE_PRN_FN_EXT;
     return ret;
--- a/mmserv/tms/tmsproxy/bwins/tmsproxy.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsproxy/bwins/tmsproxy.def	Wed Aug 18 10:17:22 2010 +0300
@@ -1,39 +1,38 @@
 EXPORTS
 	?RemoveMsgQueueNotifier@TMSProxy@TMS@@QAEHW4TMSMsgQueueNotifierType@2@PAX@Z @ 1 NONAME ; int TMS::TMSProxy::RemoveMsgQueueNotifier(enum TMS::TMSMsgQueueNotifierType, void *)
-	?StartDTMFNotifier@TMSProxy@TMS@@QAEHXZ @ 2 NONAME ; int TMS::TMSProxy::StartDTMFNotifier(void)
-	?GetMaxLevel@TMSProxy@TMS@@QAEHAAI@Z @ 3 NONAME ; int TMS::TMSProxy::GetMaxLevel(unsigned int &)
-	?GetSupportedDecoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 4 NONAME ; int TMS::TMSProxy::GetSupportedDecoders(class RArray<unsigned long> &, int &)
-	?Connect@TMSProxy@TMS@@QAEHXZ @ 5 NONAME ; int TMS::TMSProxy::Connect(void)
-	?SetLevel@TMSProxy@TMS@@QAEHI@Z @ 6 NONAME ; int TMS::TMSProxy::SetLevel(unsigned int)
-	?InitRT@TMSProxy@TMS@@QAEHHPAU_GString@@0@Z @ 7 NONAME ; int TMS::TMSProxy::InitRT(int, struct _GString *, struct _GString *)
-	?GetGain@TMSProxy@TMS@@QAEHAAI@Z @ 8 NONAME ; int TMS::TMSProxy::GetGain(unsigned int &)
-	?PlayRT@TMSProxy@TMS@@QAEHXZ @ 9 NONAME ; int TMS::TMSProxy::PlayRT(void)
-	?StartInbandTone@TMSProxy@TMS@@QAEHH@Z @ 10 NONAME ; int TMS::TMSProxy::StartInbandTone(int)
-	?Version@TMSProxy@TMS@@QBE?AVTVersion@@XZ @ 11 NONAME ; class TVersion TMS::TMSProxy::Version(void) const
-	?GetTMSCallSessionHandle@TMSProxy@TMS@@QAEHXZ @ 12 NONAME ; int TMS::TMSProxy::GetTMSCallSessionHandle(void)
-	?StopRT@TMSProxy@TMS@@QAEHXZ @ 13 NONAME ; int TMS::TMSProxy::StopRT(void)
-	?GetSupportedEncoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 14 NONAME ; int TMS::TMSProxy::GetSupportedEncoders(class RArray<unsigned long> &, int &)
-	?ContinueDTMFStringSending@TMSProxy@TMS@@QAEHH@Z @ 15 NONAME ; int TMS::TMSProxy::ContinueDTMFStringSending(int)
-	?StopInbandTone@TMSProxy@TMS@@QAEHXZ @ 16 NONAME ; int TMS::TMSProxy::StopInbandTone(void)
-	?GetOutput@TMSProxy@TMS@@QAEHAAH@Z @ 17 NONAME ; int TMS::TMSProxy::GetOutput(int &)
-	?MuteRT@TMSProxy@TMS@@QAEHXZ @ 18 NONAME ; int TMS::TMSProxy::MuteRT(void)
-	?StopDTMF@TMSProxy@TMS@@QAEHH@Z @ 19 NONAME ; int TMS::TMSProxy::StopDTMF(int)
-	??1TMSProxy@TMS@@UAE@XZ @ 20 NONAME ; TMS::TMSProxy::~TMSProxy(void)
-	?SetMsgQueueNotifier@TMSProxy@TMS@@QAEHW4TMSMsgQueueNotifierType@2@PAX1H@Z @ 21 NONAME ; int TMS::TMSProxy::SetMsgQueueNotifier(enum TMS::TMSMsgQueueNotifierType, void *, void *, int)
-	?StartRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 22 NONAME ; int TMS::TMSProxy::StartRoutingNotifier(void)
-	?GetAvailableOutputs@TMSProxy@TMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 23 NONAME ; int TMS::TMSProxy::GetAvailableOutputs(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
-	?PauseRT@TMSProxy@TMS@@QAEHXZ @ 24 NONAME ; int TMS::TMSProxy::PauseRT(void)
-	?StartDTMF@TMSProxy@TMS@@QAEHHPAU_GString@@@Z @ 25 NONAME ; int TMS::TMSProxy::StartDTMF(int, struct _GString *)
-	?CancelRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 26 NONAME ; int TMS::TMSProxy::CancelRoutingNotifier(void)
-	?SetGain@TMSProxy@TMS@@QAEHI@Z @ 27 NONAME ; int TMS::TMSProxy::SetGain(unsigned int)
-	?GetLevel@TMSProxy@TMS@@QAEHAAI@Z @ 28 NONAME ; int TMS::TMSProxy::GetLevel(unsigned int &)
-	?GetPreviousOutput@TMSProxy@TMS@@QAEHAAH@Z @ 29 NONAME ; int TMS::TMSProxy::GetPreviousOutput(int &)
-	?Close@TMSProxy@TMS@@QAEXXZ @ 30 NONAME ; void TMS::TMSProxy::Close(void)
-	??0TMSProxy@TMS@@QAE@XZ @ 31 NONAME ; TMS::TMSProxy::TMSProxy(void)
-	?SetOutput@TMSProxy@TMS@@QAEHH@Z @ 32 NONAME ; int TMS::TMSProxy::SetOutput(int)
+	?GetMaxLevel@TMSProxy@TMS@@QAEHAAI@Z @ 2 NONAME ; int TMS::TMSProxy::GetMaxLevel(unsigned int &)
+	?GetSupportedDecoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 3 NONAME ; int TMS::TMSProxy::GetSupportedDecoders(class RArray<unsigned long> &, int &)
+	?Connect@TMSProxy@TMS@@QAEHXZ @ 4 NONAME ; int TMS::TMSProxy::Connect(void)
+	?SetLevel@TMSProxy@TMS@@QAEHI@Z @ 5 NONAME ; int TMS::TMSProxy::SetLevel(unsigned int)
+	?InitRT@TMSProxy@TMS@@QAEHHPAU_GString@@0@Z @ 6 NONAME ; int TMS::TMSProxy::InitRT(int, struct _GString *, struct _GString *)
+	?GetGain@TMSProxy@TMS@@QAEHAAI@Z @ 7 NONAME ; int TMS::TMSProxy::GetGain(unsigned int &)
+	?PlayRT@TMSProxy@TMS@@QAEHXZ @ 8 NONAME ; int TMS::TMSProxy::PlayRT(void)
+	?StartInbandTone@TMSProxy@TMS@@QAEHH@Z @ 9 NONAME ; int TMS::TMSProxy::StartInbandTone(int)
+	?Version@TMSProxy@TMS@@QBE?AVTVersion@@XZ @ 10 NONAME ; class TVersion TMS::TMSProxy::Version(void) const
+	?GetTMSCallSessionHandle@TMSProxy@TMS@@QAEHXZ @ 11 NONAME ; int TMS::TMSProxy::GetTMSCallSessionHandle(void)
+	?StopRT@TMSProxy@TMS@@QAEHXZ @ 12 NONAME ; int TMS::TMSProxy::StopRT(void)
+	?GetSupportedEncoders@TMSProxy@TMS@@QAEHAAV?$RArray@K@@AAH@Z @ 13 NONAME ; int TMS::TMSProxy::GetSupportedEncoders(class RArray<unsigned long> &, int &)
+	?ContinueDTMFStringSending@TMSProxy@TMS@@QAEHH@Z @ 14 NONAME ; int TMS::TMSProxy::ContinueDTMFStringSending(int)
+	?StopInbandTone@TMSProxy@TMS@@QAEHXZ @ 15 NONAME ; int TMS::TMSProxy::StopInbandTone(void)
+	?GetOutput@TMSProxy@TMS@@QAEHAAH@Z @ 16 NONAME ; int TMS::TMSProxy::GetOutput(int &)
+	?MuteRT@TMSProxy@TMS@@QAEHXZ @ 17 NONAME ; int TMS::TMSProxy::MuteRT(void)
+	?StopDTMF@TMSProxy@TMS@@QAEHH@Z @ 18 NONAME ; int TMS::TMSProxy::StopDTMF(int)
+	??1TMSProxy@TMS@@UAE@XZ @ 19 NONAME ; TMS::TMSProxy::~TMSProxy(void)
+	?SetMsgQueueNotifier@TMSProxy@TMS@@QAEHW4TMSMsgQueueNotifierType@2@PAX1H@Z @ 20 NONAME ; int TMS::TMSProxy::SetMsgQueueNotifier(enum TMS::TMSMsgQueueNotifierType, void *, void *, int)
+	?GetAvailableOutputs@TMSProxy@TMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 21 NONAME ; int TMS::TMSProxy::GetAvailableOutputs(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
+	?PauseRT@TMSProxy@TMS@@QAEHXZ @ 22 NONAME ; int TMS::TMSProxy::PauseRT(void)
+	?StartRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 23 NONAME ; int TMS::TMSProxy::StartRoutingNotifier(void)
+	?StartDTMF@TMSProxy@TMS@@QAEHHPAU_GString@@@Z @ 24 NONAME ; int TMS::TMSProxy::StartDTMF(int, struct _GString *)
+	?CancelRoutingNotifier@TMSProxy@TMS@@QAEHXZ @ 25 NONAME ; int TMS::TMSProxy::CancelRoutingNotifier(void)
+	?SetGain@TMSProxy@TMS@@QAEHI@Z @ 26 NONAME ; int TMS::TMSProxy::SetGain(unsigned int)
+	?GetLevel@TMSProxy@TMS@@QAEHAAI@Z @ 27 NONAME ; int TMS::TMSProxy::GetLevel(unsigned int &)
+	?GetPreviousOutput@TMSProxy@TMS@@QAEHAAH@Z @ 28 NONAME ; int TMS::TMSProxy::GetPreviousOutput(int &)
+	?Close@TMSProxy@TMS@@QAEXXZ @ 29 NONAME ; void TMS::TMSProxy::Close(void)
+	??0TMSProxy@TMS@@QAE@XZ @ 30 NONAME ; TMS::TMSProxy::TMSProxy(void)
+	?SetOutput@TMSProxy@TMS@@QAEHH@Z @ 31 NONAME ; int TMS::TMSProxy::SetOutput(int)
+	?InitDTMFPlayer@TMSProxy@TMS@@QAEHH@Z @ 32 NONAME ; int TMS::TMSProxy::InitDTMFPlayer(int)
 	?DeinitRT@TMSProxy@TMS@@QAEHXZ @ 33 NONAME ; int TMS::TMSProxy::DeinitRT(void)
 	?CancelGlobalEffectNotifier@TMSProxy@TMS@@QAEHXZ @ 34 NONAME ; int TMS::TMSProxy::CancelGlobalEffectNotifier(void)
 	?GetMaxGain@TMSProxy@TMS@@QAEHAAI@Z @ 35 NONAME ; int TMS::TMSProxy::GetMaxGain(unsigned int &)
 	?StartGlobalEffectNotifier@TMSProxy@TMS@@QAEHXZ @ 36 NONAME ; int TMS::TMSProxy::StartGlobalEffectNotifier(void)
-	?CancelDTMFNotifier@TMSProxy@TMS@@QAEHXZ @ 37 NONAME ; int TMS::TMSProxy::CancelDTMFNotifier(void)
 
--- a/mmserv/tms/tmsproxy/eabi/tmsproxy.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsproxy/eabi/tmsproxy.def	Wed Aug 18 10:17:22 2010 +0300
@@ -1,44 +1,43 @@
 EXPORTS
 	_ZN3TMS8TMSProxy10GetMaxGainERj @ 1 NONAME
 	_ZN3TMS8TMSProxy11GetMaxLevelERj @ 2 NONAME
-	_ZN3TMS8TMSProxy14StopInbandToneEv @ 3 NONAME
-	_ZN3TMS8TMSProxy15StartInbandToneEi @ 4 NONAME
-	_ZN3TMS8TMSProxy17GetPreviousOutputERi @ 5 NONAME
-	_ZN3TMS8TMSProxy17StartDTMFNotifierEv @ 6 NONAME
-	_ZN3TMS8TMSProxy18CancelDTMFNotifierEv @ 7 NONAME
-	_ZN3TMS8TMSProxy19GetAvailableOutputsERSt6vectorIjSaIjEE @ 8 NONAME
-	_ZN3TMS8TMSProxy19SetMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPvS2_i @ 9 NONAME
-	_ZN3TMS8TMSProxy20GetSupportedDecodersER6RArrayImERi @ 10 NONAME
-	_ZN3TMS8TMSProxy20GetSupportedEncodersER6RArrayImERi @ 11 NONAME
-	_ZN3TMS8TMSProxy20StartRoutingNotifierEv @ 12 NONAME
-	_ZN3TMS8TMSProxy21CancelRoutingNotifierEv @ 13 NONAME
-	_ZN3TMS8TMSProxy22RemoveMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPv @ 14 NONAME
-	_ZN3TMS8TMSProxy23GetTMSCallSessionHandleEv @ 15 NONAME
-	_ZN3TMS8TMSProxy25ContinueDTMFStringSendingEi @ 16 NONAME
-	_ZN3TMS8TMSProxy25StartGlobalEffectNotifierEv @ 17 NONAME
-	_ZN3TMS8TMSProxy26CancelGlobalEffectNotifierEv @ 18 NONAME
-	_ZN3TMS8TMSProxy5CloseEv @ 19 NONAME
-	_ZN3TMS8TMSProxy6InitRTEiP8_GStringS2_ @ 20 NONAME
-	_ZN3TMS8TMSProxy6MuteRTEv @ 21 NONAME
-	_ZN3TMS8TMSProxy6PlayRTEv @ 22 NONAME
-	_ZN3TMS8TMSProxy6StopRTEv @ 23 NONAME
-	_ZN3TMS8TMSProxy7ConnectEv @ 24 NONAME
-	_ZN3TMS8TMSProxy7GetGainERj @ 25 NONAME
-	_ZN3TMS8TMSProxy7PauseRTEv @ 26 NONAME
-	_ZN3TMS8TMSProxy7SetGainEj @ 27 NONAME
-	_ZN3TMS8TMSProxy8DeinitRTEv @ 28 NONAME
-	_ZN3TMS8TMSProxy8GetLevelERj @ 29 NONAME
-	_ZN3TMS8TMSProxy8SetLevelEj @ 30 NONAME
-	_ZN3TMS8TMSProxy8StopDTMFEi @ 31 NONAME
-	_ZN3TMS8TMSProxy9GetOutputERi @ 32 NONAME
-	_ZN3TMS8TMSProxy9SetOutputEi @ 33 NONAME
-	_ZN3TMS8TMSProxy9StartDTMFEiP8_GString @ 34 NONAME
-	_ZN3TMS8TMSProxyC1Ev @ 35 NONAME
-	_ZN3TMS8TMSProxyC2Ev @ 36 NONAME
-	_ZN3TMS8TMSProxyD0Ev @ 37 NONAME
-	_ZN3TMS8TMSProxyD1Ev @ 38 NONAME
-	_ZN3TMS8TMSProxyD2Ev @ 39 NONAME
-	_ZNK3TMS8TMSProxy7VersionEv @ 40 NONAME
-	_ZTIN3TMS8TMSProxyE @ 41 NONAME
-	_ZTVN3TMS8TMSProxyE @ 42 NONAME
+	_ZN3TMS8TMSProxy14InitDTMFPlayerEi @ 3 NONAME
+	_ZN3TMS8TMSProxy14StopInbandToneEv @ 4 NONAME
+	_ZN3TMS8TMSProxy15StartInbandToneEi @ 5 NONAME
+	_ZN3TMS8TMSProxy17GetPreviousOutputERi @ 6 NONAME
+	_ZN3TMS8TMSProxy19GetAvailableOutputsERSt6vectorIjSaIjEE @ 7 NONAME
+	_ZN3TMS8TMSProxy19SetMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPvS2_i @ 8 NONAME
+	_ZN3TMS8TMSProxy20GetSupportedDecodersER6RArrayImERi @ 9 NONAME
+	_ZN3TMS8TMSProxy20GetSupportedEncodersER6RArrayImERi @ 10 NONAME
+	_ZN3TMS8TMSProxy20StartRoutingNotifierEv @ 11 NONAME
+	_ZN3TMS8TMSProxy21CancelRoutingNotifierEv @ 12 NONAME
+	_ZN3TMS8TMSProxy22RemoveMsgQueueNotifierENS_23TMSMsgQueueNotifierTypeEPv @ 13 NONAME
+	_ZN3TMS8TMSProxy23GetTMSCallSessionHandleEv @ 14 NONAME
+	_ZN3TMS8TMSProxy25ContinueDTMFStringSendingEi @ 15 NONAME
+	_ZN3TMS8TMSProxy25StartGlobalEffectNotifierEv @ 16 NONAME
+	_ZN3TMS8TMSProxy26CancelGlobalEffectNotifierEv @ 17 NONAME
+	_ZN3TMS8TMSProxy5CloseEv @ 18 NONAME
+	_ZN3TMS8TMSProxy6InitRTEiP8_GStringS2_ @ 19 NONAME
+	_ZN3TMS8TMSProxy6MuteRTEv @ 20 NONAME
+	_ZN3TMS8TMSProxy6PlayRTEv @ 21 NONAME
+	_ZN3TMS8TMSProxy6StopRTEv @ 22 NONAME
+	_ZN3TMS8TMSProxy7ConnectEv @ 23 NONAME
+	_ZN3TMS8TMSProxy7GetGainERj @ 24 NONAME
+	_ZN3TMS8TMSProxy7PauseRTEv @ 25 NONAME
+	_ZN3TMS8TMSProxy7SetGainEj @ 26 NONAME
+	_ZN3TMS8TMSProxy8DeinitRTEv @ 27 NONAME
+	_ZN3TMS8TMSProxy8GetLevelERj @ 28 NONAME
+	_ZN3TMS8TMSProxy8SetLevelEj @ 29 NONAME
+	_ZN3TMS8TMSProxy8StopDTMFEi @ 30 NONAME
+	_ZN3TMS8TMSProxy9GetOutputERi @ 31 NONAME
+	_ZN3TMS8TMSProxy9SetOutputEi @ 32 NONAME
+	_ZN3TMS8TMSProxy9StartDTMFEiP8_GString @ 33 NONAME
+	_ZN3TMS8TMSProxyC1Ev @ 34 NONAME
+	_ZN3TMS8TMSProxyC2Ev @ 35 NONAME
+	_ZN3TMS8TMSProxyD0Ev @ 36 NONAME
+	_ZN3TMS8TMSProxyD1Ev @ 37 NONAME
+	_ZN3TMS8TMSProxyD2Ev @ 38 NONAME
+	_ZNK3TMS8TMSProxy7VersionEv @ 39 NONAME
+	_ZTIN3TMS8TMSProxyE @ 40 NONAME
+	_ZTVN3TMS8TMSProxyE @ 41 NONAME
 
--- a/mmserv/tms/tmsproxy/src/tmsproxy.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsproxy/src/tmsproxy.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -30,12 +30,12 @@
 using namespace TMS;
 
 // CONSTANTS
-const TUint KTMSServerConnectRetries = 2;
-const TUint KSessionMessageSlots = 10;
-const TUint KUTF8Multiply = 2;
+const guint KTMSServerConnectRetries = 2;
+const guint KSessionMessageSlots = 10;
+const guint KUTF8Multiply = 2;
 
 // -----------------------------------------------------------------------------
-// StartServer
+// TMSProxy::StartServer
 //
 // Function that will launch TMS server executable in it its own process.
 // Start the server process/thread, which lives in an EPOCEXE object.
@@ -119,14 +119,13 @@
     {
     TRACE_PRN_FN_ENT;
 
-    gint retry = KTMSServerConnectRetries;
+    guint retry = KTMSServerConnectRetries;
     gint err(TMS_RESULT_GENERAL_ERROR);
-    gint numMessageSlots = KSessionMessageSlots;
 
     for (;;)
         {
         // Try to create a new session with the server
-        err = CreateSession(KTMSServerName, Version(), numMessageSlots);
+        err = CreateSession(KTMSServerName, Version(), KSessionMessageSlots);
 
         if ((err != KErrNotFound) && (err != KErrServerTerminated))
             {
@@ -183,9 +182,8 @@
 
 EXPORT_C gint TMSProxy::GetTMSCallSessionHandle()
     {
-    gint err(TMS_RESULT_SUCCESS);
-    err = SendReceive(ETMSCallSessionHandle);
-    return TMSRESULT(err);
+    gint handle = SendReceive(ETMSCallSessionHandle);
+    return handle;
     }
 
 EXPORT_C gint TMSProxy::GetSupportedDecoders(RArray<TUint32>& aDecoders,
@@ -414,7 +412,7 @@
         {
         // Convert buffer from UTF-8 to unicode (16-bit)
         // Note: UTF-8 strings can take up to 4 bytes per character
-        gint unilen = tts->len / KUTF8Multiply;
+        guint unilen = tts->len / KUTF8Multiply;
         TRAP(status, ttsBuf = HBufC::NewL(unilen));
         if (status == KErrNone)
             {
@@ -438,7 +436,7 @@
                 HBufC* buf(NULL);
                 // Convert buffer from UTF-8 to unicode (16-bit)
                 // Note: UTF-8 strings can take up to 4 bytes per character
-                gint unilen = str->len / KUTF8Multiply;
+                guint unilen = str->len / KUTF8Multiply;
 
                 TRAP(status, buf = HBufC::NewL(unilen));
                 if (buf && status == KErrNone)
@@ -537,6 +535,15 @@
     return TMSRESULT(status);
     }
 
+EXPORT_C gint TMSProxy::InitDTMFPlayer(TMSStreamType streamtype)
+    {
+    gint status(TMS_RESULT_SUCCESS);
+    TIpcArgs args;
+    args.Set(0, streamtype);
+    status = RSessionBase::SendReceive(ETMSInitDTMF, args);
+    return TMSRESULT(status);
+    }
+
 EXPORT_C gint TMSProxy::StartDTMF(TMSStreamType streamtype, GString* tone)
     {
     TRACE_PRN_FN_ENT;
@@ -602,20 +609,6 @@
     return TMSRESULT(status);
     }
 
-EXPORT_C gint TMSProxy::StartDTMFNotifier()
-    {
-    gint status(TMS_RESULT_SUCCESS);
-    status = RSessionBase::SendReceive(ETMSStartDTMFNotifier); //DTMFHandler
-    return TMSRESULT(status);
-    }
-
-EXPORT_C gint TMSProxy::CancelDTMFNotifier()
-    {
-    gint status(TMS_RESULT_SUCCESS);
-    status = RSessionBase::SendReceive(ETMSCancelDTMFNotifier); //DTMFHandler
-    return TMSRESULT(status);
-    }
-
 EXPORT_C gint TMSProxy::StartGlobalEffectNotifier()
     {
     gint status(TMS_RESULT_SUCCESS);
--- a/mmserv/tms/tmsserver/group/tmsserver.mmp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/group/tmsserver.mmp	Wed Aug 18 10:17:22 2010 +0300
@@ -37,7 +37,6 @@
 SOURCE          tmstareventhandler.cpp
 SOURCE          tmscenreplistener.cpp
 SOURCE          tmscenrepaudiohandler.cpp
-SOURCE          tmsdtmfeventhandler.cpp
 SOURCE          tmsaudiotoneutilityimpl.cpp
 SOURCE          tmsaudioinbandtoneplayer.cpp
 SOURCE          tmspubsublistener.cpp
@@ -45,6 +44,10 @@
 SOURCE          tmsrtaudiohdlr.cpp
 SOURCE          tmsrtplayer.cpp
 SOURCE          tmsasyncreqao.cpp
+SOURCE          tmsdtmftoneplayer.cpp
+SOURCE          tmsdtmfprovider.cpp
+SOURCE          tmseteldtmfmonitor.cpp
+SOURCE          tmseteldtmfstopmonitor.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../inc
@@ -76,6 +79,10 @@
 LIBRARY         apmime.lib
 LIBRARY         charconv.lib
 LIBRARY         caf.lib
+// Libraries for ETel
+LIBRARY         etelmm.lib
+LIBRARY         etel.lib
+LIBRARY         customapi.lib
 
 SMPSAFE
 
--- a/mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsaudioinbandtoneplayer.h	Wed Aug 18 10:17:22 2010 +0300
@@ -19,6 +19,7 @@
 #define TMSAUDIOINBANDTONEPLAYER_H
 
 // INCLUDES
+#include <AudioPreference.h>
 #include <mdaaudiotoneplayer.h>
 #include <barsc.h>
 #include <barsread.h>
--- a/mmserv/tms/tmsserver/inc/tmsdtmfeventhandler.h	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +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: Telephony Multimedia Service
- *
- */
-
-#ifndef DTMFEVENTHANDLER_H
-#define DTMFEVENTHANDLER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <e32property.h>
-#include "tmsserver.h"
-
-namespace TMS {
-
-// CLASS DECLARATION
-class TMSDtmfEventHandler : public CActive
-    {
-public:
-    /**
-     * Two-phased constructor.
-     */
-    static TMSDtmfEventHandler* NewL(TMSServer* aServer);
-
-    /**
-     * Destructor.
-     */
-    virtual ~TMSDtmfEventHandler();
-
-private:
-    /**
-     * From CActive
-     * Cancel outstanding request
-     */
-    void DoCancel();
-
-    /**
-     * From CActive
-     * Implementation of CActive::RunL.
-     * Called when server request has completed.
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     * Implementation of CActive::RunError.
-     * Called when RunL leaves.
-     */
-    TInt RunError(TInt aError);
-
-private:
-
-    /**
-     * C++ default constructor.
-     */
-    TMSDtmfEventHandler(TMSServer* aServer);
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private:
-    TMSServer* iTMSSer;
-    RProperty iProperty;
-    };
-
-} //namespace TMS
-
-#endif      // DTMFEVENTHANDLER_H
-
-// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/inc/tmsdtmfobserver.h	Wed Aug 18 10:17:22 2010 +0300
@@ -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: Telephony Multimedia Service
+ *
+ */
+
+#ifndef TMSDTMFOBSERVER_H
+#define TMSDTMFOBSERVER_H
+
+#include <e32base.h>
+
+namespace TMS {
+
+/**
+ * CCP DTMF related events observer class.
+ * This class is used for notifying DTMF specific events.
+ */
+class TMSDTMFObserver
+    {
+public:
+
+    /** DTMF Events */
+    enum TCCPDtmfEvent
+        {
+        /** Unknown */
+        ECCPDtmfUnknown = 0,
+        /** DTMF sending started manually */
+        ECCPDtmfManualStart = 5,
+        /** DTMF sending stopped manually */
+        ECCPDtmfManualStop = 6,
+        /** DTMF sending aborted manually */
+        ECCPDtmfManualAbort = 7,
+        /** Automatic DTMF sending initialized */
+        ECCPDtmfSequenceStart = 9,
+        /** Automatic DTMF sending stopped */
+        ECCPDtmfSequenceStop = 10,
+        /** Automatic DTMF sending aborted */
+        ECCPDtmfSequenceAbort = 11,
+        /** There was stop mark in DTMF string */
+        ECCPDtmfStopInDtmfString,
+        /** DTMF sending completed succesfully */
+        ECCPDtmfStringSendingCompleted
+        };
+
+    //protected:
+    /**
+     * Protects the observer being deleted through the observer interface.
+     */
+    //virtual inline ~TMSDTMFObserver() {};
+
+public:
+
+    /**
+     * HandleDTMFEvents.
+     * @param event Event type
+     * @param status Error code
+     * @param tone Character
+     * @return none
+     */
+    virtual void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
+            const gint status, const TChar tone) /*const*/ = 0;
+    };
+
+} //namespace TMS
+
+#endif // TMSDTMFOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/inc/tmsdtmfprovider.h	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,182 @@
+/*
+ * 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: Telephony Multimedia Service
+ *
+ */
+
+#ifndef TMSDTMFPROVIDER_H
+#define TMSDTMFPROVIDER_H
+
+#include <e32base.h>
+#include <etelmm.h>
+#include <glib.h>
+#include <rmmcustomapi.h>
+#include "tmsdtmfobserver.h"
+
+namespace TMS {
+
+// FORWARD DECLARATIONS
+class TMSEtelDtmfMonitor;
+class TMSEtelDtmfStopMonitor;
+
+/**
+ * TMSDTMFProvider class
+ * Makes asynchronic request to ETel interface according to given request type.
+ * Provides canceling via CActive::Cancel().
+ */
+class TMSDTMFProvider : public CActive
+    {
+public:
+
+    /**
+     * Two phased constructing of the DTMF provider instance.
+     * @param aPhone mobile phone handle
+     * @param aMmCustom custom API handle for special DTMF event
+     *        monitoring.
+     * @return the DTMF provider instance
+     */
+    static TMSDTMFProvider* NewL();
+
+    /**
+     * C++ default destructor
+     */
+    virtual ~TMSDTMFProvider();
+
+    /**
+     * HandleDTMFEvents.
+     * @param aEvent Event type
+     * @param aError Error code
+     * @param aTone Character
+     */
+    void NotifyDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent aEvent,
+            const gint aError, const TChar aTone);
+
+    // from base class MCCPDTMFProvider
+    /**
+     * Cancels asynchronous DTMF string sending.
+     * @return KErrNone if succesfull, otherwise another system wide error code
+     */
+    gint CancelDtmfStringSending();
+
+    /**
+     * Starts the transmission of a single DTMF tone across a
+     * connected and active call.
+     * @param aTone Tone to be played.
+     * @return KErrNone if succesfull, otherwise another system wide error code
+     */
+    gint StartDtmfTone(const TChar aTone);
+
+    /**
+     * Stops playing current DTMF tone.
+     * @return KErrNone if succesfull, otherwise another system wide error code
+     */
+    gint StopDtmfTone();
+
+    /**
+     * Plays DTMF string.
+     * @param aString String to be played.
+     * @return KErrNone if succesfull, otherwise another system wide error code
+     * KErrArgument if the specified string contains illegal DTMF characters
+     */
+    gint SendDtmfToneString(const TDesC& aString);
+
+    /**
+     * Continue or cancel sending DTMF string which was stopped with 'w'
+     * character in string.
+     * @param aContinue ETrue if sending of the DTMF string should continue,
+     * EFalse if the rest of the DTMF string is to be discarded.
+     * @return KErrNone if succesfull, otherwise another system wide error code
+     */
+    gint ContinueDtmfStringSending(const gboolean aContinue);
+
+    /**
+     * Add an observer for DTMF related events.
+     * Plug-in dependent feature if duplicates or more than one observers
+     * are allowed or not. Currently CCE will set only one observer.
+     * @param aObserver Observer
+     * @leave system error if observer adding fails
+     */
+    void AddObserver(const TMSDTMFObserver& aObserver);
+
+    /**
+     * Remove an observer.
+     * @param aObserver Observer
+     * @return KErrNone if removed succesfully. KErrNotFound if observer was
+     * not found. Any other system error depending on the error.
+     */
+    gint RemoveObserver(const TMSDTMFObserver& aObserver);
+
+    // from base class CActive
+protected:
+    /**
+     * From CActive
+     * RunL
+     */
+    void RunL();
+
+    /**
+     * From CActive
+     * Cancels the monitor
+     */
+    void DoCancel();
+
+private:
+    /**
+     * Constructs the requester.
+     *
+     * @param aPhone handle to ETel phone
+     * @param aMmCustom custom API handle
+     */
+    TMSDTMFProvider();
+
+    /**
+     * Constructing the provider in the second phase.
+     */
+    void ConstructL();
+
+private:
+    /**
+     * DTMF event observer.
+     */
+    RPointerArray<TMSDTMFObserver> iObservers;
+
+    /**
+     * ETel phone handle for DTMF functionality.
+     */
+    RMobilePhone iPhone;
+
+    /**
+     * Monitor for DTMF events and changes.
+     * Own.
+     */
+    TMSEtelDtmfMonitor* iMonitor;
+
+    /**
+     * Monitor for DTMF stopping.
+     * Own.
+     */
+    TMSEtelDtmfStopMonitor* iStopMonitor;
+
+    /**
+     * Custom API reference.
+     */
+    RMmCustomAPI iMmCustom;
+
+    RTelServer iServer;
+    TBuf<25> iTsyname;
+    };
+
+} //namespace TMS
+
+#endif //TMSDTMFPROVIDER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/inc/tmsdtmftoneplayer.h	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,162 @@
+/*
+ * 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: Telephony Multimedia Service
+ *
+ */
+
+#ifndef TMSAUDIODTMFTONEPLAYER_H
+#define TMSAUDIODTMFTONEPLAYER_H
+
+// INCLUDES
+#include <glib.h>
+#include <sounddevice.h>
+#include "tmsdtmftoneplayerobserver.h"
+
+// FORWARD DECLARATIONS
+class CMMFDevSound;
+
+// CLASS DECLARATION
+
+/**
+ *  Plays DTMF tones using media server
+ */
+
+namespace TMS {
+
+class TMSAudioDtmfTonePlayer : public MDevSoundObserver
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Two-phased constructor.
+     */
+    static TMSAudioDtmfTonePlayer* NewL(TMSDTMFTonePlayerObserver& obsrvr,
+            guint audioPreference, guint audioPriority);
+
+    /**
+     * Destructor.
+     */
+    virtual ~TMSAudioDtmfTonePlayer();
+
+public:
+
+    /**
+     * Sets volume.
+     * @param aVolume volume value or KDtmfSilent.
+     * @return None.
+     */
+    void SetVolume(gint volume);
+
+    /**
+     * Starts playing given dtmf tone infinitely.
+     * @param aTone Tone to be played.
+     * @return None.
+     */
+    void PlayDtmfTone(TDes& tone);
+
+    /**
+     * Cancels playing.
+     * @param None.
+     * @return None.
+     */
+    void Cancel();
+
+public:
+    //From MDevSoundObserver
+    /**
+     * See MDevSoundObserver
+     */
+    void InitializeComplete(TInt aError);
+
+    /**
+     * See MDevSoundObserver
+     */
+    void ToneFinished(TInt aError);
+
+    /**
+     * See MDevSoundObserver
+     */
+    void BufferToBeFilled(CMMFBuffer* /*aBuffer*/) {}
+
+    /**
+     * See MDevSoundObserver
+     */
+    void PlayError(TInt /*aError*/) {}
+
+    /**
+     * See MDevSoundObserver
+     */
+    void BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) {}
+
+    /**
+     * See MDevSoundObserver
+     */
+    void RecordError(TInt /*aError*/) {}
+
+    /**
+     * See MDevSoundObserver
+     */
+    void ConvertError(TInt /*aError*/) {}
+    /**
+     * See MDevSoundObserver
+     */
+    void DeviceMessage(TUid /*aMessageType*/, const TDesC8& /*aMsg*/) {}
+
+protected:
+
+    /**
+     * C++ default constructor.
+     */
+    TMSAudioDtmfTonePlayer(TMSDTMFTonePlayerObserver& obsrvr,
+            guint audioPreference, guint audioPriority);
+
+    void ConstructL();
+
+    /**
+     * Normalize tone.
+     * @param aTone dtmf tone.
+     * @return None.
+     */
+    void Normalize(TChar& tone);
+
+private:
+    //new functions
+
+    /**
+     * Converts the given value to the one that matches tha range used by
+     * CMMFDevSound. The CMMFDevSound uses valuess that can from 0 to the
+     * value returned by a call to CMMFDevSound::MaxVolume().
+     */
+    gint ConvertVolumeLevel(gint volume);
+
+protected:
+    // Data
+
+    // Current volume setting.
+    gint iVolume;
+
+    // DTMF player instance
+    CMMFDevSound* iDTMFPlayer;
+
+    TMSDTMFTonePlayerObserver& iObserver;
+    guint iPref;
+    guint iPrior;
+    };
+
+} //namespace TMS
+
+#endif // TMSAUDIODTMFTONEPLAYER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/inc/tmsdtmftoneplayerobserver.h	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,37 @@
+/*
+ * 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: Telephony Multimedia Service
+ *
+ */
+
+#ifndef DTMFTONEPLAYEROBSERVER_H
+#define DTMFTONEPLAYEROBSERVER_H
+
+#include <glib.h>
+
+namespace TMS {
+
+/**
+ *  Observer interface for knowing when dtmf tone player has been initialized.
+ */
+class TMSDTMFTonePlayerObserver
+    {
+public:
+    virtual void DTMFInitCompleted(gint status) = 0;
+    virtual void DTMFToneFinished(gint status) = 0;
+    };
+} //namespace TMS
+
+#endif // DTMFTONEPLAYEROBSERVER_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/inc/tmseteldtmfmonitor.h	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,105 @@
+/*
+ * 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: Telephony Multimedia Service
+ *
+ */
+
+#ifndef TMSETELDTMFMONITOR_H
+#define TMSETELDTMFMONITOR_H
+
+#include <e32base.h>
+#include <etelmm.h>
+#include <rmmcustomapi.h>
+
+namespace TMS {
+
+// FORWARD DECLARATIONS
+class TMSCSPCall;
+class TMSDTMFProvider;
+
+/**
+ * TMSEtelDtmfMonitor class
+ *
+ * Monitors ETel for DTMF events.
+ *
+ * This monitor is applied only for listening incoming calls, i.e.
+ * line capabilites are not monitored.
+ *
+ * @lib csplugin.dll
+ *
+ */
+class TMSEtelDtmfMonitor : public CActive
+    {
+public:
+    /**
+     * Two-phased constructing for the monitor.
+     *
+     * @param aObserver the observer for getting notification
+     * @param aMmCustom Custom API handle
+     */
+    static TMSEtelDtmfMonitor* NewL(TMSDTMFProvider& aObserver,
+            RMmCustomAPI& aMmCustom);
+
+    /**
+     * C++ default destructor
+     */
+    virtual ~TMSEtelDtmfMonitor();
+
+    /**
+     * Start monitoring call events
+     */
+    void StartMonitoring();
+
+protected: // From CActive
+    /**
+     * From CActive
+     * RunL
+     */
+    void RunL();
+
+    /**
+     * From CActive
+     * Cancels the monitor
+     */
+    void DoCancel();
+
+private:
+    /**
+     * C++ default constructor
+     * @param aObserver the observer for status change (incoming call)
+     * @param aMmCustom Custom API handle
+     */
+    TMSEtelDtmfMonitor(TMSDTMFProvider& aObserver, RMmCustomAPI& aMmCustom);
+
+private:
+    /**
+     * Forwards events.
+     */
+    TMSDTMFProvider& iObserver;
+
+    /**
+     * Event data. Updated when event occurs.
+     */
+    RMmCustomAPI::TDtmfInfo iEventData;
+
+    /**
+     * Custom API reference.
+     */
+    RMmCustomAPI& iMmCustom;
+    };
+
+} //namespace TMS
+
+#endif // TMSETELDTMFMONITOR_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/inc/tmseteldtmfstopmonitor.h	Wed Aug 18 10:17:22 2010 +0300
@@ -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: Telephony Multimedia Service
+ *
+ */
+
+#ifndef TMSETELDTMFSTOPMONITOR_H
+#define TMSETELDTMFSTOPMONITOR_H
+
+#include <e32base.h>
+#include <etelmm.h>
+
+namespace TMS {
+
+// FORWARD DECLARATIONS
+class TMSDTMFProvider;
+
+/**
+ * TMSEtelDtmfStopMonitor class
+ *
+ * Monitors single ETel RMobilePhone for DTMF events.
+ *
+ * This monitor is applied only for listening incoming calls, i.e.
+ * line capabilites are not monitored.
+ *
+ */
+class TMSEtelDtmfStopMonitor : public CActive
+    {
+public:
+    /**
+     * Two-phased constructing for the monitor.
+     *
+     * @param aObserver the observer for getting notification
+     * @param aPhone the line to monitor
+     */
+    static TMSEtelDtmfStopMonitor* NewL(TMSDTMFProvider& aObserver,
+            RMobilePhone& aPhone);
+
+    /**
+     * C++ default destructor
+     */
+    virtual ~TMSEtelDtmfStopMonitor();
+
+    /**
+     * Start monitoring call events
+     */
+    void StartMonitoring();
+
+protected: // From CActive
+    /**
+     * From CActive
+     * RunL
+     */
+    void RunL();
+
+    /**
+     * From CActive
+     * Cancels the monitor
+     */
+    void DoCancel();
+
+private:
+    /**
+     * C++ default constructor
+     * @param aObserver the observer for status change (incoming call)
+     * @param aPhone the line associated with the call
+     */
+    TMSEtelDtmfStopMonitor(TMSDTMFProvider& aObserver, RMobilePhone& aPhone);
+
+private:
+    /**
+     * Forwards events.
+     */
+    TMSDTMFProvider& iObserver;
+
+    /**
+     * Phone that is being observed for incoming call.
+     */
+    RMobilePhone& iPhone;
+
+    /**
+     * Event received.
+     */
+    RMobilePhone::TMobilePhoneDTMFEvent iEventData;
+
+    };
+
+} //namespace TMS
+
+#endif // TMSETELDTMFSTOPMONITOR_H
+
--- a/mmserv/tms/tmsserver/inc/tmsglobaleffectssettings.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsglobaleffectssettings.h	Wed Aug 18 10:17:22 2010 +0300
@@ -90,6 +90,12 @@
      */
     TInt MaxGain() const;
 
+    /**
+     * Resets volume to default if level is 0 when new call starts.
+     * @return
+     */
+    void ResetDefaultVolume();
+
 private:
 
     /**
--- a/mmserv/tms/tmsserver/inc/tmsrtplayer.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsrtplayer.h	Wed Aug 18 10:17:22 2010 +0300
@@ -201,7 +201,7 @@
     /**
      * Initializes ring tone configuration parameters.
      */
-    void InitRtParamsL(TRtPlayerType aPlayerType);
+    void InitRtParams(TRtPlayerType aPlayerType);
 
     /*
      * from TMSRtAudioHdlrObsrv
--- a/mmserv/tms/tmsserver/inc/tmsserver.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsserver.h	Wed Aug 18 10:17:22 2010 +0300
@@ -15,8 +15,8 @@
  *
  */
 
-#ifndef __TMSSERVER_H
-#define __TMSSERVER_H
+#ifndef TMSSERVER_H
+#define TMSSERVER_H
 
 #include <e32base.h>
 #include <mmcccodecinformation.h>
@@ -25,6 +25,9 @@
 #include "tmsclientserver.h"
 #include "tmsrtplayerobsrv.h"
 #include "tmsrtplayer.h"
+#include "tmsdtmfobserver.h"
+#include "tmsdtmftoneplayerobserver.h"
+#include "tmspubsubobserver.h"
 
 namespace TMS {
 
@@ -36,14 +39,19 @@
 class TMSTarEventHandler;
 class TMSCSPCenRepListener;
 class TMSCenRepAudioHandler;
-class TMSDtmfEventHandler;
+class TMSAudioDtmfTonePlayer;
+class TMSDTMFProvider;
+class TMSPubSubListener;
 
 // -----------------------------------------------------------------------------
 // TMSServer class
 // -----------------------------------------------------------------------------
 //
 class TMSServer : public CServer2,
-                  private TMSRtPlayerObsrv
+                  private TMSRtPlayerObsrv,
+                  private TMSDTMFObserver,
+                  private TMSDTMFTonePlayerObserver,
+                  public TMSPubSubObserver
     {
 public:
     static void RunServerL();
@@ -53,12 +61,6 @@
     void DropSession();
     TInt SessionCount() const;
 
-    void SetDnLinkSession(const TBool aSession);
-    void SetUpLinkSession(const TBool aSession);
-
-    TBool HasDnLinkSession() const;
-    TBool HasUpLinkSession() const;
-
     void GetNewTMSCallSessionHandleL(RHandleBase& aHandle);
     TInt SetOutput(CSession2* sid, TInt output);
     TInt GetOutput(const RMessage2& aMessage);
@@ -75,14 +77,15 @@
     TInt GetSupportedCodecs(const TMSStreamType strmType,
             RArray<TFourCC>*& aCodecs);
 
-    TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg);
+    // for DTMF player
+    TInt InitDTMF(const RMessage2& aMessage);
     TInt StartDTMF(const RMessage2& aMessage);
     TInt StopDTMF(const RMessage2& aMessage);
     TInt ContinueSendingDTMF(const RMessage2& aMessage);
-    TInt NotifyDtmfClients(TmsMsgBufPckg dtmfpckg);
+    TInt NotifyDtmfClients(gint aEventType, gint aError);
+    gint FindActiveCallType();
 
-    void StartDTMFNotifierL();
-    void CancelDTMFNotifier();
+    TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg);
     void StartRoutingNotifierL();
     void CancelRoutingNotifier();
     void StartCenRepHandlerL();
@@ -106,6 +109,18 @@
     // from TMSRtPlayerObsrv
     void RtPlayerEvent(TInt aEventType, TInt aError);
 
+    // from TMSDTMFTonePlayerObserver
+    void DTMFInitCompleted(gint status);
+    void DTMFToneFinished(gint status);
+
+    // from TMSDTMFObserver
+    void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
+            const gint status, const TChar tone);
+
+    // from TMSPubSubObserver
+    void HandleNotifyPSL(const TUid aUid, const TInt& aKey,
+                const TRequestStatus& aStatus);
+
 private:
     static TMSServer* NewLC();
     TMSServer();
@@ -122,18 +137,15 @@
     TInt iSession;
     TMSServerShutDown *iShutdownTimer;
 
-    TBool iDnlinkSession;
-    TBool iUplinkSession;
-
     mutable RPointerArray<TMSStartAndMonitorTMSCallThread> iTMSCallServList;
     TMSGlobalEffectsSettings* iEffectSettings;
     TMSTarEventHandler* iTarHandler;
     TMSCenRepAudioHandler* iAudioCenRepHandler;
     TMSAudioOutput iCurrentRouting;
-    TMSDtmfEventHandler* iDTMFHandler;
     TInt iTarHandlerCount;
     TInt iAudioCenRepHandlerCount;
     TInt iDTMFHandlerCount;
+    TMSCallType iActiveCallType;
 
     // for RT
     TMSRingTonePlayer* iTMSRtPlayer;
@@ -141,9 +153,15 @@
     HBufC8* iRtSequence;
     HBufC* iTtsText;
 
+    // for DTMF
+    TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
+    TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer;
+    TMSDTMFProvider* iDTMFUplinkPlayerEtel;
+
     // for codecs count
     RArray<TFourCC> iDnlCodecs;
     RArray<TFourCC> iUplCodecs;
+    TMSPubSubListener* iSyncVol;
     };
 
 // -----------------------------------------------------------------------------
@@ -191,6 +209,5 @@
 
 } //namespace TMS
 
-#endif //__TMSSERVER_H
+#endif //TMSSERVER_H
 
-// End of file
--- a/mmserv/tms/tmsserver/inc/tmstareventhandler.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmstareventhandler.h	Wed Aug 18 10:17:22 2010 +0300
@@ -53,6 +53,12 @@
      **/
     void RunL();
 
+    /**
+     * From CActive
+     * Called when RunL leaves.
+     **/
+    TInt RunError(TInt aError);
+
 private:
 
     /**
@@ -74,4 +80,3 @@
 
 #endif //TMSTAREVENTHANDLER_H
 
-// End of File
--- a/mmserv/tms/tmsserver/src/tmsaudioinbandtoneplayer.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsaudioinbandtoneplayer.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -263,7 +263,7 @@
                 default:
                     break;
                 }
-#ifndef __WINS__
+#ifndef __WINSCW__
             //Play the tone
             iPlayer->Play();
 #endif
@@ -285,22 +285,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// TMSAudioInbandTonePlayer::MatoPrepareComplete
-// Updates flag values and plays current inbandtone.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void TMSAudioInbandTonePlayer::MatoPrepareComplete(TInt aError)
-    {
-    TRACE_PRN_FN_ENT;
-    if (aError == KErrNone)
-        {
-        PlayCurrentTone();
-        }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
 // TMSAudioInbandTonePlayer::SetVolume
 // -----------------------------------------------------------------------------
 //
@@ -322,15 +306,40 @@
     }
 
 // -----------------------------------------------------------------------------
+// TMSAudioInbandTonePlayer::MatoPrepareComplete
+// Updates flag values and plays current inbandtone.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void TMSAudioInbandTonePlayer::MatoPrepareComplete(TInt aError)
+    {
+    TRACE_PRN_FN_ENT;
+    if (aError == KErrNone)
+        {
+        PlayCurrentTone();
+        }
+    TRACE_PRN_IF_ERR(aError);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
 // TMSAudioInbandTonePlayer::MatoPlayComplete
 // -
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-void TMSAudioInbandTonePlayer::MatoPlayComplete(TInt /*aError*/)
+void TMSAudioInbandTonePlayer::MatoPlayComplete(
+#ifdef _DEBUG
+        TInt aError)
+#else
+        TInt /*aError*/)
+#endif
     {
     TRACE_PRN_FN_ENT;
     // TODO: process error?
+#ifdef _DEBUG
+    TRACE_PRN_IF_ERR(aError);
+#endif
     TRACE_PRN_FN_EXT;
     }
 
@@ -360,4 +369,3 @@
     TRACE_PRN_FN_EXT;
     }
 
-// End of File
--- a/mmserv/tms/tmsserver/src/tmsdtmfeventhandler.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +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: Telephony Multimedia Service
- *
- */
-
-// INCLUDE FILES
-#include "tmsdtmfeventhandler.h"
-#include "tmsclientserver.h"
-#include "tmsutility.h"
-
-using namespace TMS;
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::TMSDtmfEventHandler
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfEventHandler::TMSDtmfEventHandler(TMSServer* aServer) :
-    CActive(EPriorityStandard),
-    iTMSSer(aServer)
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfEventHandler::ConstructL()
-    {
-    TRACE_PRN_FN_ENT;
-    CActiveScheduler::Add(this);
-    User::LeaveIfError(iProperty.Attach(KTMSPropertyCategory, EDtmfPs));
-    iStatus = KRequestPending;
-    iProperty.Subscribe(iStatus);
-    SetActive();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-TMSDtmfEventHandler* TMSDtmfEventHandler::NewL(TMSServer* aServer)
-    {
-    TMSDtmfEventHandler* self = new (ELeave) TMSDtmfEventHandler(aServer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// Destructor
-TMSDtmfEventHandler::~TMSDtmfEventHandler()
-    {
-    TRACE_PRN_FN_ENT;
-    if (IsActive())
-        {
-        Cancel();
-        }
-    iProperty.Close();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::DoCancel
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfEventHandler::DoCancel()
-    {
-    TRACE_PRN_FN_ENT;
-    iProperty.Cancel();
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::RunL
-// -----------------------------------------------------------------------------
-//
-void TMSDtmfEventHandler::RunL()
-    {
-    TRACE_PRN_FN_ENT;
-// Subscribe immediately before analyzing the notification to ensure that we
-// don't miss further updates.
-//if (iStatus.Int() == KErrNone)
-//    {
-    iStatus = KRequestPending;
-    iProperty.Subscribe(iStatus);
-    SetActive();
-    TmsMsgBufPckg dtmfpckg;
-    iProperty.Get(dtmfpckg);
-    iTMSSer->NotifyDtmfClients(dtmfpckg);
-//    }
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSDtmfEventHandler::RunError
-// -----------------------------------------------------------------------------
-//
-TInt TMSDtmfEventHandler::RunError(TInt aError)
-    {
-    return aError;
-    }
-
-//  End of File
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/src/tmsdtmfprovider.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,307 @@
+/*
+ * 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: Telephony Multimedia Service
+ *
+ */
+
+#include <etelmm.h>
+#include <rmmcustomapi.h>
+#include "tmsdtmfprovider.h"
+#include "tmsdtmfobserver.h"
+#include "tmsutility.h"
+#include "tmseteldtmfmonitor.h"
+#include "tmseteldtmfstopmonitor.h"
+
+using namespace TMS;
+
+TMSDTMFProvider* TMSDTMFProvider::NewL()
+    {
+    TRACE_PRN_FN_ENT;
+    TMSDTMFProvider* self = new (ELeave) TMSDTMFProvider();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    TRACE_PRN_FN_EXT;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor of the object.
+// -----------------------------------------------------------------------------
+//
+TMSDTMFProvider::~TMSDTMFProvider()
+    {
+    TRACE_PRN_FN_ENT;
+    Cancel();
+    iObservers.Close();
+    delete iMonitor;
+    delete iStopMonitor;
+
+    iMmCustom.Close();
+    iPhone.Close();
+    iServer.UnloadPhoneModule(iTsyname);
+    iServer.Close();
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Constructs the requester.
+// -----------------------------------------------------------------------------
+//
+TMSDTMFProvider::TMSDTMFProvider() :
+    CActive(EPriorityStandard)
+    {
+    TRACE_PRN_FN_ENT;
+    CActiveScheduler::Add(this);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Constructs the requester in the second phase.
+// -----------------------------------------------------------------------------
+//
+void TMSDTMFProvider::ConstructL()
+    {
+    TRACE_PRN_FN_ENT;
+
+    User::LeaveIfError(iServer.Connect());
+
+    TRACE_PRN_N(_L("**TMS ETel iServer.Connect"));
+
+    User::LeaveIfError(iServer.GetTsyName(0, iTsyname));
+
+    //Load in the phone device driver
+    User::LeaveIfError(iServer.LoadPhoneModule(iTsyname));
+
+    TRACE_PRN_N(_L("**TMS ETel iServer.LoadPhoneModule"));
+
+    //Find the number of phones available from the tel server
+    gint numberPhones;
+    User::LeaveIfError(iServer.EnumeratePhones(numberPhones));
+
+    TRACE_PRN_N(_L("**TMS ETel iServer.EnumeratePhones"));
+
+    //Check there are available phones
+    if (numberPhones < 1)
+        {
+        User::Leave(KErrNotFound);
+        }
+
+    //Get info about the first available phone
+    RTelServer::TPhoneInfo info;
+    User::LeaveIfError(iServer.GetPhoneInfo(0, info));
+
+    TRACE_PRN_N(_L("**TMS ETel iServer.GetPhoneInfo"));
+
+    CleanupClosePushL(iPhone);
+    User::LeaveIfError(iPhone.Open(iServer, info.iName));
+
+    TRACE_PRN_N(_L("**TMS ETel iPhone.Open"));
+
+    RMobilePhone::TLineInfo lineInfo;
+    User::LeaveIfError(iPhone.GetLineInfo(0, lineInfo));
+
+    TRACE_PRN_N(_L("**TMS ETel iPhone.GetLineInfo"));
+
+    gint errorCode = iMmCustom.Open(iPhone);
+
+    if (!iPhone.SubSessionHandle() || !iMmCustom.SubSessionHandle())
+        {
+        User::Leave(KErrArgument);
+        }
+    iMonitor = TMSEtelDtmfMonitor::NewL(*this, iMmCustom);
+    iMonitor->StartMonitoring();
+    iStopMonitor = TMSEtelDtmfStopMonitor::NewL(*this, iPhone);
+    // iStopMonitor->StartMonitoring();
+
+    CleanupStack::Pop(1);//phone
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Notifies observers about a DTMF event
+// -----------------------------------------------------------------------------
+//
+void TMSDTMFProvider::NotifyDTMFEvent(
+        const TMSDTMFObserver::TCCPDtmfEvent aEvent, const gint aError,
+        const TChar aTone)
+    {
+    TRACE_PRN_FN_ENT;
+    for (gint i = 0; i < iObservers.Count(); i++)
+        {
+        TMSDTMFObserver* obs = iObservers[i];
+        if (obs)
+            {
+            iObservers[i]->HandleDTMFEvent(aEvent, aError, aTone);
+            }
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Cancel DTMF string sending
+// -----------------------------------------------------------------------------
+//
+gint TMSDTMFProvider::CancelDtmfStringSending()
+    {
+    TRACE_PRN_FN_ENT;
+    gint ret(KErrAlreadyExists);
+    if (IsActive())
+        {
+        Cancel();
+        ret = KErrNone;
+        }
+    TRACE_PRN_FN_EXT;
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// Starts DTMF string sending
+// -----------------------------------------------------------------------------
+//
+gint TMSDTMFProvider::StartDtmfTone(const TChar aTone)
+    {
+    TRACE_PRN_FN_ENT;
+    gint ret(KErrAlreadyExists);
+    if (!IsActive())
+        {
+        ret = iPhone.StartDTMFTone(aTone);
+        }
+    TRACE_PRN_IF_ERR(ret);
+    TRACE_PRN_FN_EXT;
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// Stop DTMF tone
+// -----------------------------------------------------------------------------
+//
+gint TMSDTMFProvider::StopDtmfTone()
+    {
+    TRACE_PRN_FN_ENT;
+    gint ret(KErrAlreadyExists);
+    if (!IsActive())
+        {
+        ret = iPhone.StopDTMFTone();
+        }
+    TRACE_PRN_IF_ERR(ret);
+    TRACE_PRN_FN_EXT;
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// Send DTMF string
+// -----------------------------------------------------------------------------
+//
+gint TMSDTMFProvider::SendDtmfToneString(const TDesC& aString)
+    {
+    TRACE_PRN_FN_ENT;
+    gint ret = KErrInUse;
+    if (!IsActive())
+        {
+        iStatus = KRequestPending;
+        iPhone.SendDTMFTones(iStatus, aString);
+        SetActive();
+        ret = KErrNone;
+        }
+    TRACE_PRN_IF_ERR(ret);
+    TRACE_PRN_FN_EXT;
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// Continue DTMF string sending
+// -----------------------------------------------------------------------------
+//
+gint TMSDTMFProvider::ContinueDtmfStringSending(const gboolean aContinue)
+    {
+    TRACE_PRN_FN_ENT;
+    gint status = iPhone.ContinueDTMFStringSending(aContinue);
+    TRACE_PRN_FN_EXT;
+    return status;
+    }
+
+// -----------------------------------------------------------------------------
+// Adds observer.
+// -----------------------------------------------------------------------------
+//
+void TMSDTMFProvider::AddObserver(const TMSDTMFObserver& aObserver)
+    {
+    TRACE_PRN_FN_ENT;
+    if (iObservers.Find(&aObserver) == KErrNotFound)
+        {
+        iObservers.Append(&aObserver);
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Removes given observer.
+// -----------------------------------------------------------------------------
+//
+gint TMSDTMFProvider::RemoveObserver(const TMSDTMFObserver& aObserver)
+    {
+    TRACE_PRN_FN_ENT;
+    gint ret = KErrNotFound;
+    gint found = iObservers.Find(&aObserver);
+    if (found != KErrNotFound)
+        {
+        iObservers.Remove(found);
+        ret = KErrNone;
+        }
+    TRACE_PRN_FN_EXT;
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// From CActive.
+// Handles request completion.
+// -----------------------------------------------------------------------------
+//
+void TMSDTMFProvider::RunL()
+    {
+    TRACE_PRN_FN_ENT;
+    if (iStatus == KErrNone)
+        {
+        TMSDTMFObserver::TCCPDtmfEvent event =
+                TMSDTMFObserver::ECCPDtmfStringSendingCompleted;
+        NotifyDTMFEvent(event, KErrNone, NULL);
+        }
+    else
+        {
+        gint error = iStatus.Int();
+        if (error != KErrCancel)
+            {
+            TMSDTMFObserver::TCCPDtmfEvent event =
+                    TMSDTMFObserver::ECCPDtmfStringSendingCompleted;
+            NotifyDTMFEvent(event, error, NULL);
+            TRACE_PRN_IF_ERR(error);
+            }
+        // Cancel is not notified
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// From CActive
+// Canceling functionality.
+// -----------------------------------------------------------------------------
+//
+void TMSDTMFProvider::DoCancel()
+    {
+    TRACE_PRN_FN_ENT;
+    iPhone.CancelAsyncRequest(EMobilePhoneSendDTMFTones);
+    TRACE_PRN_FN_EXT;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/src/tmsdtmftoneplayer.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -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: Telephony Multimedia Service
+ *
+ */
+
+// INCLUDE FILES
+#include "tmsutility.h"
+#include "tmsdtmftoneplayer.h"
+
+// CONSTANTS
+const gint KDTMFMaxBufSize = 64;
+const gint KMaxVolumeLevel = 10;
+
+_LIT(KPhoneTone_Asterisk, "*+w");
+
+//from voip
+const guint KDTMFToneLengthOn = 250000;
+const guint KDTMFToneLengthOff = 50000;
+const guint KDTMFToneLengthPause = 2500000;
+
+using namespace TMS;
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+TMSAudioDtmfTonePlayer* TMSAudioDtmfTonePlayer::NewL(
+        TMSDTMFTonePlayerObserver& obsrvr, guint audioPreference,
+        guint audioPriority)
+    {
+    TMSAudioDtmfTonePlayer* self = new (ELeave) TMSAudioDtmfTonePlayer(obsrvr,
+            audioPreference, audioPriority);
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+//Destructor
+TMSAudioDtmfTonePlayer::~TMSAudioDtmfTonePlayer()
+    {
+    TRACE_PRN_FN_ENT;
+    Cancel();
+    delete iDTMFPlayer;
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::TMSAudioDtmfTonePlayer
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+TMSAudioDtmfTonePlayer::TMSAudioDtmfTonePlayer(
+        TMSDTMFTonePlayerObserver& obsrvr, guint audioPreference,
+        guint audioPriority) :
+    iObserver(obsrvr),
+    iPref(audioPreference),
+    iPrior(audioPriority)
+    {
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void TMSAudioDtmfTonePlayer::ConstructL()
+    {
+    TRACE_PRN_FN_ENT;
+
+    TMMFPrioritySettings dtmfClickPlayerPrioritySettings;
+    iDTMFPlayer = CMMFDevSound::NewL();
+    iDTMFPlayer->InitializeL(*this, EMMFStateTonePlaying);
+
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::SetVolume
+// Sets the volume level that is used when the dtmf tone is played.
+// -----------------------------------------------------------------------------
+//
+void TMSAudioDtmfTonePlayer::SetVolume(gint volume)
+    {
+    TRACE_PRN_FN_ENT;
+    gint vol = ConvertVolumeLevel(volume);
+
+    if (vol != iVolume)
+        {
+        iVolume = vol;
+        iDTMFPlayer->SetVolume(iVolume);
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::PlayDtmfTone
+// Searches the given DTMF tone from iToneArray and calls PlayCurrentTone
+// member function.
+// -----------------------------------------------------------------------------
+//
+void TMSAudioDtmfTonePlayer::PlayDtmfTone(TDes& tone)
+    {
+    TRACE_PRN_FN_ENT;
+    Cancel();
+
+    // DTMF signaling.
+    if (iDTMFPlayer)
+        {
+        TBuf<KDTMFMaxBufSize> key;
+        key.Append(tone);
+        TRAP_IGNORE(iDTMFPlayer->PlayDTMFStringL(tone));
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::Cancel
+// Cancels the currently playing tone.
+// -----------------------------------------------------------------------------
+//
+void TMSAudioDtmfTonePlayer::Cancel()
+    {
+    TRACE_PRN_FN_ENT;
+    iDTMFPlayer->Stop();
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::Normalize
+// Lowers case for chars and if its '*','+', or 'w' sets it to asterisk
+// char ('*').
+// -----------------------------------------------------------------------------
+//
+void TMSAudioDtmfTonePlayer::Normalize(TChar& tone)
+    {
+    TRACE_PRN_FN_ENT;
+    tone.LowerCase();
+    TPtrC ast(KPhoneTone_Asterisk);
+
+    if (ast.Locate(tone) != KErrNotFound)
+        {
+        tone = ast[0];
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::InitializeComplete
+// -----------------------------------------------------------------------------
+//
+void TMSAudioDtmfTonePlayer::InitializeComplete(TInt aError)
+    {
+    TRACE_PRN_FN_ENT;
+
+    if (aError == KErrNone)
+        {
+        TMMFPrioritySettings dtmfPlayerSettings;
+        dtmfPlayerSettings.iPref = iPref;
+        dtmfPlayerSettings.iPriority = iPrior;
+        dtmfPlayerSettings.iState = EMMFStateTonePlaying;
+        iDTMFPlayer->SetPrioritySettings(dtmfPlayerSettings);
+
+        TTimeIntervalMicroSeconds32 length(KDTMFToneLengthOn);
+        TTimeIntervalMicroSeconds32 pause(KDTMFToneLengthOff);
+        TTimeIntervalMicroSeconds32 zero(KDTMFToneLengthPause);
+        iDTMFPlayer->SetDTMFLengths(length, pause, zero);
+        iDTMFPlayer->SetVolume(iDTMFPlayer->MaxVolume());
+        }
+
+    iObserver.DTMFInitCompleted(aError);
+    TRACE_PRN_IF_ERR(aError);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::ToneFinished
+// -----------------------------------------------------------------------------
+//
+void TMSAudioDtmfTonePlayer::ToneFinished(TInt aError)
+    {
+    TRACE_PRN_FN_ENT;
+    iObserver.DTMFToneFinished(aError);
+    TRACE_PRN_IF_ERR(aError);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSAudioDtmfTonePlayer::ConvertVolumeLevel
+// -----------------------------------------------------------------------------
+//
+gint TMSAudioDtmfTonePlayer::ConvertVolumeLevel(gint volume)
+    {
+    TRACE_PRN_FN_ENT;
+    gint result = iDTMFPlayer->MaxVolume() * volume / KMaxVolumeLevel;
+    TRACE_PRN_FN_EXT;
+    return result;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/src/tmseteldtmfmonitor.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,165 @@
+/*
+ * 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: Telephony Multimedia Service
+ *
+ */
+
+#include <rmmcustomapi.h>
+#include <gsmerror.h>
+#include "tmsdtmfprovider.h"
+#include "tmsdtmfobserver.h"
+#include "tmseteldtmfmonitor.h"
+#include "tmsutility.h"
+
+using namespace TMS;
+
+// -----------------------------------------------------------------------------
+// TMSEtelDtmfMonitor::NewL.
+// -----------------------------------------------------------------------------
+//
+TMSEtelDtmfMonitor* TMSEtelDtmfMonitor::NewL(TMSDTMFProvider& aObserver,
+        RMmCustomAPI& aMmCustom)
+    {
+    TRACE_PRN_FN_ENT;
+    TMSEtelDtmfMonitor* self = new (ELeave) TMSEtelDtmfMonitor(aObserver,
+            aMmCustom);
+    TRACE_PRN_FN_EXT;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Constructs the monitor.
+// -----------------------------------------------------------------------------
+//
+TMSEtelDtmfMonitor::TMSEtelDtmfMonitor(TMSDTMFProvider& aObserver,
+        RMmCustomAPI& aMmCustom) :
+    CActive(EPriorityStandard),
+    iObserver(aObserver),
+    iMmCustom(aMmCustom)
+    {
+    TRACE_PRN_FN_ENT;
+    CActiveScheduler::Add(this);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Destructs the object by canceling first ongoing monitoring.
+// -----------------------------------------------------------------------------
+//
+TMSEtelDtmfMonitor::~TMSEtelDtmfMonitor()
+    {
+    TRACE_PRN_FN_ENT;
+    Cancel();
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Starts the monitor.
+// -----------------------------------------------------------------------------
+//
+void TMSEtelDtmfMonitor::StartMonitoring()
+    {
+    TRACE_PRN_FN_ENT;
+    if (!IsActive())
+        {
+        iStatus = KRequestPending;
+        iMmCustom.NotifyDtmfEvent(iStatus, iEventData);
+        SetActive();
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// From CActive.
+// Handles line status change notifying.
+// -----------------------------------------------------------------------------
+//
+void TMSEtelDtmfMonitor::RunL()
+    {
+    TRACE_PRN_FN_ENT;
+    gint err = iStatus.Int();
+    TRACE_PRN_N1(_L("**TMS TMSEtelDtmfMonitor::RunL: status:%d"), err);
+
+    if (err == KErrNone)
+        {
+        TMSDTMFObserver::TCCPDtmfEvent event;
+        if (iEventData.iEvent == RMmCustomAPI::EDtmfStart
+                && iEventData.iType == RMmCustomAPI::EDtmfManual)
+            {
+            event = TMSDTMFObserver::ECCPDtmfManualStart;
+            }
+        else if (iEventData.iEvent == RMmCustomAPI::EDtmfStart
+                && iEventData.iType == RMmCustomAPI::EDtmfSequence)
+            {
+            event = TMSDTMFObserver::ECCPDtmfSequenceStart;
+            }
+        else if (iEventData.iEvent == RMmCustomAPI::EDtmfStop
+                && iEventData.iType == RMmCustomAPI::EDtmfManual)
+            {
+            event = TMSDTMFObserver::ECCPDtmfManualStop;
+            }
+        else if (iEventData.iEvent == RMmCustomAPI::EDtmfStop
+                && iEventData.iType == RMmCustomAPI::EDtmfSequence)
+            {
+            event = TMSDTMFObserver::ECCPDtmfSequenceStop;
+            }
+        else if (iEventData.iEvent == RMmCustomAPI::EDtmfAbort
+                && iEventData.iType == RMmCustomAPI::EDtmfManual)
+            {
+            event = TMSDTMFObserver::ECCPDtmfManualAbort;
+            }
+        else if (iEventData.iEvent == RMmCustomAPI::EDtmfAbort
+                && iEventData.iType == RMmCustomAPI::EDtmfSequence)
+            {
+            event = TMSDTMFObserver::ECCPDtmfSequenceAbort;
+            }
+        else
+            {
+            // Refresh and return (no observer notfiying).
+            TRACE_PRN_N2(_L("**TMS TMSEtelDtmfMonitor::RunL: Unknown event \
+                    = %¨d, type = %d"), iEventData.iEvent,iEventData.iType);
+            StartMonitoring();
+            return;
+            }
+
+        iObserver.NotifyDTMFEvent(event, err, iEventData.iTone);
+        }
+    else
+        {
+        TRACE_PRN_N1(_L("**TMS TMSEtelDtmfMonitor::RunL: Error \
+                from DTMF: %d"),err);
+        }
+
+    // Continue if not in offline mode
+    if (err != KErrGsmOfflineOpNotAllowed && err != KErrCancel
+            && err != KErrNotSupported)
+        {
+        StartMonitoring();
+        }
+    TRACE_PRN_IF_ERR(err);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// From CActive
+// Canceling functionality.
+// -----------------------------------------------------------------------------
+//
+void TMSEtelDtmfMonitor::DoCancel()
+    {
+    TRACE_PRN_FN_ENT;
+    iMmCustom.CancelAsyncRequest(ECustomNotifyDtmfEventIPC);
+    TRACE_PRN_FN_EXT;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsserver/src/tmseteldtmfstopmonitor.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,127 @@
+/*
+ * 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: Telephony Multimedia Service
+ *
+ */
+
+#include <gsmerror.h>
+#include "tmsutility.h"
+#include "tmsdtmfobserver.h"
+#include "tmsdtmfprovider.h"
+#include "tmseteldtmfstopmonitor.h"
+
+using namespace TMS;
+
+// -----------------------------------------------------------------------------
+// TMSEtelDtmfStopMonitor::NewL.
+// -----------------------------------------------------------------------------
+//
+TMSEtelDtmfStopMonitor* TMSEtelDtmfStopMonitor::NewL(TMSDTMFProvider& aObserver,
+        RMobilePhone& aPhone)
+    {
+    TRACE_PRN_FN_EXT;
+    TMSEtelDtmfStopMonitor* self = new (ELeave) TMSEtelDtmfStopMonitor(
+            aObserver, aPhone);
+    TRACE_PRN_FN_EXT;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Constructs the monitor.
+// -----------------------------------------------------------------------------
+//
+TMSEtelDtmfStopMonitor::TMSEtelDtmfStopMonitor(TMSDTMFProvider& aObserver,
+        RMobilePhone& aPhone) :
+    CActive(EPriorityStandard),
+    iObserver(aObserver),
+    iPhone(aPhone)
+    {
+    TRACE_PRN_FN_ENT;
+    CActiveScheduler::Add(this);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Destructs the object by canceling first ongoing monitoring.
+// -----------------------------------------------------------------------------
+//
+TMSEtelDtmfStopMonitor::~TMSEtelDtmfStopMonitor()
+    {
+    TRACE_PRN_FN_ENT;
+    Cancel();
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// Starts the monitor.
+// -----------------------------------------------------------------------------
+//
+void TMSEtelDtmfStopMonitor::StartMonitoring()
+    {
+    TRACE_PRN_FN_ENT;
+    if (!IsActive())
+        {
+        iStatus = KRequestPending;
+        iPhone.NotifyStopInDTMFString(iStatus);
+        SetActive();
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// From CActive.
+// Handles line status change notifying.
+// -----------------------------------------------------------------------------
+//
+void TMSEtelDtmfStopMonitor::RunL()
+    {
+    TRACE_PRN_FN_ENT;
+    gint err = iStatus.Int();
+    TRACE_PRN_N1(_L("**TMS TMSEtelDtmfStopMonitor::RunL: status: %d"), err);
+
+    if (err != KErrCancel && err != KErrServerTerminated)
+        {
+        TChar tone = NULL;
+        TMSDTMFObserver::TCCPDtmfEvent event =
+                TMSDTMFObserver::ECCPDtmfStopInDtmfString;
+        iObserver.NotifyDTMFEvent(event, err, tone);
+        }
+    else
+        {
+        TRACE_PRN_N1(_L("**TMS TMSEtelDtmfStopMonitor::RunL: Error \
+                       from RMobilePhone: %d"),iStatus.Int());
+        }
+
+    // Continue if not in offline mode
+    if (err != KErrGsmOfflineOpNotAllowed && err != KErrCancel
+            && err != KErrNotSupported)
+        {
+        StartMonitoring();
+        }
+    TRACE_PRN_IF_ERR(err);
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// From CActive
+// Canceling functionality.
+// -----------------------------------------------------------------------------
+//
+void TMSEtelDtmfStopMonitor::DoCancel()
+    {
+    TRACE_PRN_FN_ENT;
+    iPhone.CancelAsyncRequest(EMobilePhoneNotifyStopInDTMFString);
+    TRACE_PRN_FN_EXT;
+    }
+
--- a/mmserv/tms/tmsserver/src/tmsglobaleffectssettings.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsglobaleffectssettings.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -18,6 +18,7 @@
 // INCLUDE FILES
 #include "tmsglobaleffectssettings.h"
 #include "tmsclientserver.h"
+#include "tmsutility.h"
 
 using namespace TMS;
 
@@ -26,7 +27,7 @@
 const TInt KDefaultMaxVolume = 10;
 const TInt KDefaultGain = 1;
 
-#ifndef __WINS__
+#ifndef __WINSCW__
 const TInt KDefaultMaxGain = 1;
 #else
 const TInt KDefaultMaxGain = 64;
@@ -59,13 +60,17 @@
 //
 void TMSGlobalEffectsSettings::ConstructL()
     {
+    TRACE_PRN_FN_ENT;
     // Create repository instance
     iRepository = CRepository::NewL(KCRUidTmseffects);
     if (iRepository)
         {
         iRepository->Get(KTmsLoudSpkrVolume, iLoudSpkrVolume);
         iRepository->Get(KTmsEarPieceVolume, iEarVolume);
+        TRACE_PRN_N1(_L("loud spkr vol %d"),iLoudSpkrVolume);
+        TRACE_PRN_N1(_L("ear piece vol %d"),iEarVolume);
         }
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -94,15 +99,27 @@
 //
 void TMSGlobalEffectsSettings::SetLoudSpkrVolume(TInt aVolume)
     {
+    TRACE_PRN_FN_ENT;
     TInt status(KErrNone);
     if (iRepository)
         {
-        status = iRepository->Set(KTmsLoudSpkrVolume, aVolume);
+        if (aVolume > 0)
+            {
+            status = iRepository->Set(KTmsLoudSpkrVolume, aVolume);
+            TRACE_PRN_N2(_L("status %d loud spkr vol %d"),status,aVolume);
+            }
+        else
+            {
+            status = iRepository->Set(KTmsLoudSpkrVolume, KDefaultVolume);
+            TRACE_PRN_N(_L("loud spkr level 0 store default"));
+            }
         if (status == KErrNone)
             {
             iLoudSpkrVolume = aVolume;
+            TRACE_PRN_N1(_L("cached loud spkr vol %d"),iLoudSpkrVolume);
             }
         }
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -111,15 +128,27 @@
 //
 void TMSGlobalEffectsSettings::SetEarPieceVolume(TInt aVolume)
     {
+    TRACE_PRN_FN_ENT;
     TInt status(KErrNone);
     if (iRepository)
         {
-        status = iRepository->Set(KTmsEarPieceVolume, aVolume);
+        if (aVolume > 0)
+            {
+            status = iRepository->Set(KTmsEarPieceVolume, aVolume);
+            TRACE_PRN_N2(_L("status %d ear vol %d"),status,aVolume);
+            }
+        else
+            {
+            status = iRepository->Set(KTmsEarPieceVolume, KDefaultVolume);
+            TRACE_PRN_N(_L("ear piece vol level 0 store default"));
+            }
         if (status == KErrNone)
             {
             iEarVolume = aVolume;
+            TRACE_PRN_N1(_L("cached ear piece vol %d"),iEarVolume);
             }
         }
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -129,6 +158,7 @@
 void TMSGlobalEffectsSettings::GetLoudSpkrVolume(TInt& aVolume)
     {
     aVolume = iLoudSpkrVolume;
+    TRACE_PRN_N1(_L("TMSGlobalEffectsSettings GetLoudSpkrVolume %d"),aVolume);
     }
 
 // -----------------------------------------------------------------------------
@@ -138,6 +168,7 @@
 void TMSGlobalEffectsSettings::GetEarPieceVolume(TInt& aVolume)
     {
     aVolume = iEarVolume;
+    TRACE_PRN_N1(_L("TMSGlobalEffectsSettings GetEarPieceVolume  %d"),aVolume);
     }
 
 // -----------------------------------------------------------------------------
@@ -176,4 +207,21 @@
     return iMaxGain;
     }
 
-//  End of File
+// -----------------------------------------------------------------------------
+// TMSGlobalEffectsSettings::ResetDefaultVolume
+// -----------------------------------------------------------------------------
+//
+void TMSGlobalEffectsSettings::ResetDefaultVolume()
+    {
+    if (iLoudSpkrVolume == 0)
+        {
+        iRepository->Get(KTmsLoudSpkrVolume, iLoudSpkrVolume);
+        TRACE_PRN_N1(_L("Needed to reset default loudspkr vol %d"),iLoudSpkrVolume);
+        }
+    if (iEarVolume == 0)
+        {
+        iRepository->Get(KTmsEarPieceVolume, iEarVolume);
+        TRACE_PRN_N1(_L("Needed to reset default ear vol %d"),iEarVolume);
+        }
+    }
+
--- a/mmserv/tms/tmsserver/src/tmsrtaudiohdlr.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsrtaudiohdlr.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -392,9 +392,8 @@
 void TMSRtAudioHdlr::MapcInitComplete(TInt aError,
         const TTimeIntervalMicroSeconds& /*aDuration*/)
     {
-    TRACE_PRN_N2(
-            _L("TMS->TMSRtAudioHdlr::MapcInitComplete: player[%d], err[%d]"),
-            iRtType, aError);
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_N2(_L("RT player type[%d], err[%d]"), iRtType, aError);
 
     __ASSERT_DEBUG((iFormat == EFormatSample) ||
             ((iFormat == EFormatTts) && (iPlayerStatus == EToneLoading)),
@@ -414,6 +413,7 @@
             }
         }
     iObserver.RtAudioHdlrEvent(ECmdRingToneOpenComplete, aError, iRtType);
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -422,9 +422,8 @@
 //
 void TMSRtAudioHdlr::MapcPlayComplete(TInt aError)
     {
-    TRACE_PRN_N2(
-            _L("TMS->TMSRtAudioHdlr::MapcPlayComplete: player[%d], err[%d]"),
-            iRtType, aError);
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_N2(_L("RT player type[%d], err[%d]"), iRtType, aError);
 
     iPlayerStatus = EToneReady;
 
@@ -437,6 +436,7 @@
         i3DPlugin = NULL;
         }*/
     iObserver.RtAudioHdlrEvent(ECmdRingTonePlayComplete, aError, iRtType);
+    TRACE_PRN_FN_EXT;
     }
 
 // -----------------------------------------------------------------------------
@@ -445,9 +445,8 @@
 //
 void TMSRtAudioHdlr::MatoPrepareComplete(TInt aError)
     {
-    TRACE_PRN_N2(
-            _L("TMS->TMSRtAudioHdlr::MatoPrepareComplete: player[%d], err[%d]"),
-            iRtType, aError);
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_N2(_L("RT player type[%d], err[%d]"), iRtType, aError);
 
     __ASSERT_DEBUG(((iFormat == EFormatTone) &&
             (iPlayerStatus == EToneLoading)), PANIC(TMS_RESULT_INVALID_STATE));
@@ -466,6 +465,7 @@
             }
         }
     iObserver.RtAudioHdlrEvent(ECmdRingToneOpenComplete, aError, iRtType);
+    TRACE_PRN_FN_ENT;
     }
 
 // -----------------------------------------------------------------------------
@@ -474,12 +474,11 @@
 //
 void TMSRtAudioHdlr::MatoPlayComplete(TInt aError)
     {
-    TRACE_PRN_N2(
-            _L("TMS->TMSRtAudioHdlr::MatoPlayComplete: player[%d], err[%d]"),
-            iRtType, aError);
-
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_N2(_L("RT player type[%d], err[%d]"), iRtType, aError);
     iObserver.RtAudioHdlrEvent(ECmdRingTonePlayComplete, aError, iRtType);
-    }
+    TRACE_PRN_FN_EXT;
+   }
 
 // -----------------------------------------------------------------------------
 // TMSRtAudioHdlr::DoPlay
@@ -505,7 +504,7 @@
         }
     else
         {
-#ifdef __WINS__
+#ifdef __WINSCW__
         iSamplePlayer->Play();
 #else
 /*
@@ -529,7 +528,7 @@
                 }
             }*/
         iSamplePlayer->Play();
-#endif //__WINS__
+#endif //__WINSCW__
         }
 
     TRACE_PRN_FN_EXT;
@@ -830,4 +829,3 @@
         }
     }
 
-//  End of File
--- a/mmserv/tms/tmsserver/src/tmsrtplayer.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsrtplayer.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -48,7 +48,7 @@
 
 _LIT(KTMSTtsHeader, "(tts)");
 
-#ifdef __WINS__
+#ifdef __WINSCW__
 //_LIT(KTMSDefaultSoundFile, "z:\\data\\sounds\\digital\\Nokia_tune.aac");
 _LIT(KTMSDefaultSoundFile, "Z:\\Data\\Sounds\\Digital\\Nokia tune.aac");
 //_LIT(KTMSDefaultSoundFile, "c:\\data\\sounds\\digital\\test_8khz.wav");
@@ -67,7 +67,7 @@
 \x40\x64\x06\x0B");
 _LIT8(KTMSUnsecureVoIPCall, "\x00\x11\x0B\x67\x04\x40\x04\x67\x04\x40\x04\
 \x6C\x04\x40\x04\x6D\x04\x0B");
-#endif // __WINS__
+#endif // __WINSCW__
 
 // -----------------------------------------------------------------------------
 // TMSRingTonePlayer::NewL
@@ -115,7 +115,7 @@
 
     iEngine =  ProEngFactory::NewEngineL();
 
-    InitRtParamsL(EPlayerBackup);
+    InitRtParams(EPlayerBackup);
     //CreateDefaultRingToneL();
     CreateBkpRtPlayerL();
     //GetMaxToneFileSizeL(iToneFileSizeLimitKB);
@@ -152,10 +152,10 @@
     }
 
 // -----------------------------------------------------------------------------
-// TMSRingTonePlayer::InitRtParamsL
+// TMSRingTonePlayer::InitRtParams
 // -----------------------------------------------------------------------------
 //
-void TMSRingTonePlayer::InitRtParamsL(TRtPlayerType aPlayerType)
+void TMSRingTonePlayer::InitRtParams(TRtPlayerType aPlayerType)
     {
     TRACE_PRN_FN_ENT;
 
@@ -183,7 +183,7 @@
     {
     TRACE_PRN_FN_ENT;
 
-    InitRtParamsL(EPlayerDefault);
+    InitRtParams(EPlayerDefault);
     LoadProfileRingToneL();
 
     TRACE_PRN_FN_EXT;
@@ -371,7 +371,7 @@
     delete iBeepOncePlayer;
     iBeepOncePlayer = NULL;
 
-#ifdef __WINS__
+#ifdef __WINSCW__
     TParse* fp = new (ELeave) TParse();
     fp->Set(KTMSBeepSequence, NULL, NULL);
     TFileName fileName(fp->FullName());
@@ -381,7 +381,7 @@
 #else
     iBeepOncePlayer = TMSRtAudioHdlr::NewSeqL(KTMSBeepSequence(),
             iRtParam.iPriority, iRtParam.iPreference, *this, EPlayerBeepOnce);
-#endif // __WINS__
+#endif // __WINSCW__
 
     iRtParam.iType = EPlayerBeepOnce;
     TRACE_PRN_FN_EXT;
@@ -399,7 +399,7 @@
     delete iSilentPlayer;
     iSilentPlayer = NULL;
 
-#ifdef __WINS__
+#ifdef __WINSCW__
     TParse* fp = new (ELeave) TParse();
     fp->Set(KTMSNoSoundSequence, NULL, NULL);
     TFileName fileName(fp->FullName());
@@ -409,7 +409,7 @@
 #else
     iSilentPlayer = TMSRtAudioHdlr::NewSeqL(KTMSNoSoundSequence(),
             iRtParam.iPriority, iRtParam.iPreference, *this, EPlayerSilent);
-#endif // __WINS__
+#endif // __WINSCW__
 
     iRtParam.iType = EPlayerSilent;
     TRACE_PRN_FN_EXT;
@@ -426,7 +426,7 @@
     delete iUnsecureVoIPTonePlayer;
     iUnsecureVoIPTonePlayer = NULL;
 
-#ifdef __WINS__
+#ifdef __WINSCW__
     TParse* fp = new (ELeave) TParse();
     fp->Set(KTMSUnsecureVoIPCall, NULL, NULL);
     TFileName fileName(fp->FullName());
@@ -438,7 +438,7 @@
     iUnsecureVoIPTonePlayer = TMSRtAudioHdlr::NewSeqL(KTMSUnsecureVoIPCall(),
             iRtParam.iPriority, iRtParam.iPreference, *this,
             EPlayerUnsecureVoIP);
-#endif // __WINS__
+#endif // __WINSCW__
 
     iRtParam.iType = EPlayerUnsecureVoIP;
     TRACE_PRN_FN_EXT;
@@ -449,7 +449,7 @@
 // -----------------------------------------------------------------------------
 //
 void TMSRingTonePlayer::CreateCustomSequencePlayerL(const TDesC8&
-#ifdef __WINS__
+#ifdef __WINSCW__
         /*aSequence*/)
 #else
         aSequence)
@@ -460,7 +460,7 @@
     delete iSequencePlayer;
     iSequencePlayer = NULL;
 
-#ifdef __WINS__
+#ifdef __WINSCW__
     TParse* fp = new (ELeave) TParse();
     fp->Set(KTMSBeepSequence, NULL, NULL);
     TFileName fileName(fp->FullName());
@@ -470,7 +470,7 @@
 #else
     iSequencePlayer = TMSRtAudioHdlr::NewSeqL(aSequence, iRtParam.iPriority,
             iRtParam.iPreference, *this, EPlayerSequence);
-#endif // __WINS__
+#endif // __WINSCW__
 
     iRtParam.iType = EPlayerSequence;
     TRACE_PRN_FN_EXT;
@@ -1378,12 +1378,12 @@
                 iAudioPlayer = NULL;
                 }
 
-#ifdef __WINS__
+#ifdef __WINSCW__
             TRAP_IGNORE(PlayAudioRingToneL());
             iTonePlayingStatus = EDefaultTonePlaying;
 #else
             TRAP_IGNORE(PlayDefaultToneL());
-#endif
+#endif //__WINSCW__
             break;
             }
         case EDefaultTonePlaying:
@@ -1710,4 +1710,3 @@
     return audioHdlr;
     }
 
-//  End of File
--- a/mmserv/tms/tmsserver/src/tmsserver.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsserver.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -30,7 +30,9 @@
 #include "tmsglobaleffectssettings.h"
 #include "tmstareventhandler.h"
 #include "tmscenrepaudiohandler.h"
-#include "tmsdtmfeventhandler.h"
+#include "tmsdtmftoneplayer.h"
+#include "tmsdtmfprovider.h"
+#include "tmspubsublistener.h"
 #include "tmsrtparam.h"
 #include "tmsserver.h"
 
@@ -83,10 +85,12 @@
     delete iEffectSettings;
     delete iTarHandler;
     delete iAudioCenRepHandler;
-    delete iDTMFHandler;
     DeinitRingTonePlayer();
     delete iTMSRtPlayer;
-
+    delete iDTMFUplinkPlayer;
+    delete iDTMFUplinkPlayerEtel;
+    delete iDTMFDnlinkPlayer;
+    delete iSyncVol;
     TRACE_PRN_FN_EXT;
     }
 
@@ -134,8 +138,12 @@
     iEffectSettings = TMSGlobalEffectsSettings::NewL();
     iTarHandler = NULL;
     iAudioCenRepHandler = NULL;
-    iDTMFHandler = NULL;
     iCurrentRouting = TMS_AUDIO_OUTPUT_PRIVATE;
+    iDTMFDnlinkPlayer = NULL;
+    iDTMFUplinkPlayer = NULL;
+    iDTMFUplinkPlayerEtel = NULL;
+    iActiveCallType = -1;
+    iSyncVol = TMSPubSubListener::NewL(KTMSPropertyCategory,ESyncVolume, this);
 
     //TODO: EUnit fails to initialize ProfileEngine in RT in eshell mode
     TRAP_IGNORE(InitRingTonePlayerL());
@@ -190,46 +198,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// TMSServer::SetDnLinkSession
-//
-// -----------------------------------------------------------------------------
-//
-void TMSServer::SetDnLinkSession(const TBool aSession)
-    {
-    iDnlinkSession = aSession;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSServer::SetUpLinkSession
-//
-// -----------------------------------------------------------------------------
-//
-void TMSServer::SetUpLinkSession(const TBool aSession)
-    {
-    iUplinkSession = aSession;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSServer::HasDnLinkSession
-//
-// -----------------------------------------------------------------------------
-//
-TBool TMSServer::HasDnLinkSession() const
-    {
-    return iDnlinkSession;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSServer::HasUpLinkSession
-//
-// -----------------------------------------------------------------------------
-//
-TBool TMSServer::HasUpLinkSession() const
-    {
-    return iUplinkSession;
-    }
-
-// -----------------------------------------------------------------------------
 // TMSServer::GetNewTMSCallSessionHandleL
 //
 // -----------------------------------------------------------------------------
@@ -272,7 +240,7 @@
 
     TInt status = TMS_RESULT_SUCCESS;
     TMSStartAndMonitorTMSCallThread* callServerThread = NULL;
-    TRAP(status, callServerThread =TMSStartAndMonitorTMSCallThread::NewL(
+    TRAP(status, callServerThread = TMSStartAndMonitorTMSCallThread::NewL(
             const_cast<TMSServer*>(this)));
     if (status != TMS_RESULT_SUCCESS)
         {
@@ -297,11 +265,13 @@
                 case TMS_AUDIO_OUTPUT_LOUDSPEAKER:
                     {
                     iEffectSettings->GetLoudSpkrVolume(volume);
+                    TRACE_PRN_N1(_L("loudspk vol %d"),volume);
                     }
                     break;
                 default:
                     {
                     iEffectSettings->GetEarPieceVolume(volume);
+                    TRACE_PRN_N1(_L("ear vol %d"),volume);
                     }
                     break;
                 }
@@ -389,40 +359,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// TMSServer::StartDTMFNotifierL
-//
-// -----------------------------------------------------------------------------
-//
-void TMSServer::StartDTMFNotifierL()
-    {
-    TRACE_PRN_FN_ENT;
-
-    if (!iDTMFHandler)
-        {
-        iDTMFHandlerCount = 0;
-        iDTMFHandler = TMSDtmfEventHandler::NewL(
-                (const_cast<TMSServer*> (this)));
-        }
-    iDTMFHandlerCount++;
-
-    TRACE_PRN_FN_EXT;
-    }
-
-// -----------------------------------------------------------------------------
-// TMSServer::CancelDTMFNotifier
-//
-// -----------------------------------------------------------------------------
-//
-void TMSServer::CancelDTMFNotifier()
-    {
-    if (--iDTMFHandlerCount <= 0)
-        {
-        delete iDTMFHandler;
-        iDTMFHandler = NULL;
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // TMSServer::SetOutput
 //
 // -----------------------------------------------------------------------------
@@ -608,9 +544,11 @@
         case TMS_AUDIO_OUTPUT_PUBLIC:
         case TMS_AUDIO_OUTPUT_LOUDSPEAKER:
             iEffectSettings->GetLoudSpkrVolume(volume);
+            TRACE_PRN_N1(_L("TMSServer::GetLevel loudspkr vol %d"),volume);
             break;
         default:
             iEffectSettings->GetEarPieceVolume(volume);
+            TRACE_PRN_N1(_L("TMSServer::GetLevel ear vol %d"),volume);
             break;
         }
 
@@ -668,16 +606,12 @@
             }
 
         iSessionIter.SetToFirst();
-        TMSServerSession* serverSession =
-                static_cast<TMSServerSession*> (iSessionIter++);
-
-        while (serverSession != NULL)
+        TMSServerSession* ss = static_cast<TMSServerSession*> (iSessionIter++);
+        while (ss != NULL)
             {
-            serverSession->HandleGlobalEffectChange(
-                    TMS_EVENT_EFFECT_VOL_CHANGED, level, EFalse,
-                    iCurrentRouting);
-
-            serverSession = static_cast<TMSServerSession*> (iSessionIter++);
+            ss->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED, level,
+                    EFalse, iCurrentRouting);
+            ss = static_cast<TMSServerSession*> (iSessionIter++);
             }
         }
 
@@ -744,15 +678,11 @@
         iAudioCenRepHandler->SetMuteState(level);
         iEffectSettings->SetGain(level);
         iSessionIter.SetToFirst();
-
-        TMSServerSession* serverSession =
-                static_cast<TMSServerSession*> (iSessionIter++);
-
-        while (serverSession != NULL)
+        TMSServerSession* ss = static_cast<TMSServerSession*> (iSessionIter++);
+        while (ss != NULL)
             {
-            serverSession->HandleGlobalEffectChange(
-                    TMS_EVENT_EFFECT_GAIN_CHANGED, level);
-            serverSession = static_cast<TMSServerSession*> (iSessionIter++);
+            ss->HandleGlobalEffectChange(TMS_EVENT_EFFECT_GAIN_CHANGED, level);
+            ss = static_cast<TMSServerSession*> (iSessionIter++);
             }
         }
 
@@ -876,27 +806,28 @@
             iCurrentRouting == TMS_AUDIO_OUTPUT_LOUDSPEAKER)
         {
         iEffectSettings->GetLoudSpkrVolume(vol);
+        TRACE_PRN_N1(_L("TMSServer::NotifyTarClients loudspkr vol %d"),vol);
         }
     else
         {
         iEffectSettings->GetEarPieceVolume(vol);
+        TRACE_PRN_N1(_L("TMSServer::NotifyTarClients ear vol %d"),vol);
         }
 
     TInt status = SendMessageToCallServ(TMS_EFFECT_GLOBAL_VOL_SET, vol);
 
     iSessionIter.SetToFirst();
-    TMSServerSession* serverSession =
-            static_cast<TMSServerSession*> (iSessionIter++);
-    while (serverSession != NULL)
+    TMSServerSession* ss = static_cast<TMSServerSession*> (iSessionIter++);
+    while (ss != NULL)
         {
         // Send only if there is a subscriber to TMS routing notifications.
         if (iTarHandlerCount > 1)
             {
-            serverSession->HandleRoutingChange(routingpckg);
+            ss->HandleRoutingChange(routingpckg);
             }
-        serverSession->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED,
-                vol, ETrue, iCurrentRouting);
-        serverSession = static_cast<TMSServerSession*> (iSessionIter++);
+        ss->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED, vol, ETrue,
+                iCurrentRouting);
+        ss = static_cast<TMSServerSession*> (iSessionIter++);
         }
 
     TRACE_PRN_FN_EXT;
@@ -904,6 +835,49 @@
     }
 
 // -----------------------------------------------------------------------------
+// TMSServer::InitDTMF
+//
+// -----------------------------------------------------------------------------
+//
+TInt TMSServer::InitDTMF(const RMessage2& aMessage)
+    {
+    TRACE_PRN_FN_ENT;
+    TInt status(TMS_RESULT_SUCCESS);
+    TMSStreamType strmtype;
+    strmtype = (TMSStreamType) aMessage.Int0();
+
+    if (strmtype == TMS_STREAM_UPLINK)
+        {
+        if (!iDTMFUplinkPlayerEtel) //CS call
+            {
+            // Uses ETel for uplink
+            TRAP(status, iDTMFUplinkPlayerEtel = TMSDTMFProvider::NewL());
+            if (iDTMFUplinkPlayerEtel && status == TMS_RESULT_SUCCESS)
+                {
+                iDTMFUplinkPlayerEtel->AddObserver(*this);
+                }
+            }
+        if (!iDTMFUplinkPlayer) //IP call
+            {
+            TRAP(status, iDTMFUplinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
+                    KAudioDTMFString, KAudioPriorityDTMFString));
+            }
+        }
+    else if (strmtype == TMS_STREAM_DOWNLINK)
+        {
+        if (!iDTMFDnlinkPlayer) //CS or IP call
+            {
+            TRAP(status, iDTMFDnlinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
+                    KAudioDTMFString, KAudioPriorityDTMFString));
+            }
+        }
+
+    aMessage.Complete(status);
+    TRACE_PRN_FN_EXT;
+    return status;
+    }
+
+// -----------------------------------------------------------------------------
 // TMSServer::StartDTMF
 //
 // -----------------------------------------------------------------------------
@@ -915,31 +889,62 @@
     TInt status(TMS_RESULT_SUCCESS);
     TInt len(0);
     TMSStreamType strmtype;
-
     strmtype = (TMSStreamType) aMessage.Int0();
     len = aMessage.GetDesLength(1);
-    HBufC* tone(NULL);
     if (len > 0)
         {
-        delete tone;
-        tone = NULL;
-        TRAP(status,tone = HBufC::NewL(len));
+        HBufC* tone(NULL);
+        TRAP(status, tone = HBufC::NewL(len));
         if (status == TMS_RESULT_SUCCESS)
             {
             TPtr ptr = tone->Des();
             status = aMessage.Read(1, ptr);
             TRACE_PRN_N(ptr);
 
-            TIpcArgs args;
-            args.Set(0, strmtype);
-            args.Set(1, &ptr);
-            status = SendMessageToCallServ(TMS_DTMF_START, args);
-            delete tone;
-            tone = NULL;
+            if (strmtype == TMS_STREAM_UPLINK)
+                {
+#ifdef __WINSCW__
+                // Just to hear DTMF tones in Wins
+                iActiveCallType = TMS_CALL_IP;
+#else
+                FindActiveCallType();
+#endif
+                if (iActiveCallType == TMS_CALL_IP && iDTMFUplinkPlayer)
+                    {
+                    iDTMFUplinkPlayer->PlayDtmfTone(ptr);
+                    status = TMS_RESULT_SUCCESS;
+                    }
+                else if (iActiveCallType == TMS_CALL_CS &&
+                        iDTMFUplinkPlayerEtel)
+                    {
+                    status = iDTMFUplinkPlayerEtel->SendDtmfToneString(ptr);
+                    }
+                else
+                    {
+                    status = TMS_RESULT_INVALID_STATE;
+                    }
+                NotifyDtmfClients(ECmdDTMFToneUplPlayStarted, status);
+                }
+            else if (strmtype == TMS_STREAM_DOWNLINK)
+                {
+                status = TMS_RESULT_INVALID_STATE;
+                if (iDTMFDnlinkPlayer)
+                    {
+                    iDTMFDnlinkPlayer->PlayDtmfTone(ptr);
+                    status = TMS_RESULT_SUCCESS;
+                    }
+                NotifyDtmfClients(ECmdDTMFToneDnlPlayStarted, status);
+                }
+            else
+                {
+                status = TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
+                }
             }
+        delete tone;
+        tone = NULL;
         }
+
     aMessage.Complete(status);
-
     TRACE_PRN_FN_EXT;
     return status;
     }
@@ -953,12 +958,35 @@
     {
     TRACE_PRN_FN_ENT;
 
-    TInt status(TMS_RESULT_SUCCESS);
+    TInt status(TMS_RESULT_INVALID_STATE);
     TMSStreamType streamtype;
     streamtype = (TMSStreamType) aMessage.Int0();
-    status = SendMessageToCallServ(TMS_DTMF_STOP, streamtype);
+
+    if (streamtype == TMS_STREAM_UPLINK)
+        {
+        if (iActiveCallType == TMS_CALL_IP && iDTMFUplinkPlayer)
+            {
+            iDTMFUplinkPlayer->Cancel();
+            status = TMS_RESULT_SUCCESS;
+            }
+        else if (iActiveCallType == TMS_CALL_CS &&
+                iDTMFUplinkPlayerEtel)
+            {
+            status = iDTMFUplinkPlayerEtel->StopDtmfTone();
+            status = TMSUtility::EtelToTMSResult(status);
+            }
+        }
+    else if (streamtype == TMS_STREAM_DOWNLINK)
+        {
+        if (iDTMFDnlinkPlayer)
+            {
+            iDTMFDnlinkPlayer->Cancel();
+            status = TMS_RESULT_SUCCESS;
+            }
+        }
+    iActiveCallType = -1;
+    NotifyDtmfClients(ECmdDTMFTonePlayFinished, status);
     aMessage.Complete(status);
-
     TRACE_PRN_FN_EXT;
     return status;
     }
@@ -971,13 +999,14 @@
 TInt TMSServer::ContinueSendingDTMF(const RMessage2& aMessage)
     {
     TRACE_PRN_FN_ENT;
-
-    TInt status(TMS_RESULT_SUCCESS);
-    TBool continuesending;
-    continuesending = (TBool) aMessage.Int0();
-    status = SendMessageToCallServ(TMS_DTMF_CONTINUE, continuesending);
+    TInt status(TMS_RESULT_INVALID_STATE);
+    if (iActiveCallType == TMS_CALL_CS && iDTMFUplinkPlayerEtel)
+        {
+        TBool continuesnd = (TBool) aMessage.Int0();
+        status = iDTMFUplinkPlayerEtel->ContinueDtmfStringSending(continuesnd);
+        status = TMSUtility::EtelToTMSResult(status);
+        }
     aMessage.Complete(status);
-
     TRACE_PRN_FN_EXT;
     return status;
     }
@@ -987,22 +1016,117 @@
 //
 // -----------------------------------------------------------------------------
 //
-TInt TMSServer::NotifyDtmfClients(TmsMsgBufPckg dtmfpckg)
+TInt TMSServer::NotifyDtmfClients(gint aEventType, gint aError)
+    {
+    TRACE_PRN_FN_ENT;
+    iSessionIter.SetToFirst();
+    TMSServerSession* ss = static_cast<TMSServerSession*> (iSessionIter++);
+    while (ss != NULL)
+        {
+        ss->NotifyClient(aEventType, aError);
+        ss = static_cast<TMSServerSession*> (iSessionIter++);
+        }
+    TRACE_PRN_FN_EXT;
+    return TMS_RESULT_SUCCESS;
+    }
+
+//From DTMFTonePlayerObserver
+// -----------------------------------------------------------------------------
+// TMSServer::DTMFInitCompleted
+//
+// -----------------------------------------------------------------------------
+//
+void TMSServer::DTMFInitCompleted(gint status)
+    {
+    TRACE_PRN_FN_ENT;
+    if (status != TMS_RESULT_SUCCESS)
+        {
+        NotifyDtmfClients(ECmdDTMFTonePlayFinished, status);
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSServer::DTMFToneFinished
+//
+// -----------------------------------------------------------------------------
+//
+void TMSServer::DTMFToneFinished(gint status)
     {
     TRACE_PRN_FN_ENT;
+    TRACE_PRN_IF_ERR(status);
 
-    iSessionIter.SetToFirst();
-    TMSServerSession* serverSession =
-            static_cast<TMSServerSession*> (iSessionIter++);
+    // KErrUnderflow indicates end of DTMF playback.
+    if (status == KErrUnderflow /*|| status == KErrInUse*/)
+        {
+        status = TMS_RESULT_SUCCESS;
+        }
+    NotifyDtmfClients(ECmdDTMFTonePlayFinished, status);
+    TRACE_PRN_FN_EXT;
+    }
 
-    while (serverSession != NULL)
+// -----------------------------------------------------------------------------
+// TMSServer::FindActiveCallType
+//
+// -----------------------------------------------------------------------------
+//
+gint TMSServer::FindActiveCallType()
+    {
+    TInt status(TMS_RESULT_INVALID_STATE);
+    iActiveCallType = -1;
+    TInt i = 0;
+    while (i < iTMSCallServList.Count())
         {
-        serverSession->NotifyClient(dtmfpckg().iRequest, dtmfpckg().iStatus);
-        serverSession = static_cast<TMSServerSession*> (iSessionIter++);
+        TMSStartAndMonitorTMSCallThread* callThread = iTMSCallServList[i];
+        if (callThread)
+            {
+            TmsCallMsgBufPckg pckg;
+            TIpcArgs args(&pckg);
+            status = callThread->iTMSCallProxyLocal.ReceiveFromCallServer(
+                    TMS_GET_ACTIVE_CALL_PARAMS, args);
+            if (pckg().iBool || status != TMS_RESULT_SUCCESS)
+                {
+                iActiveCallType = static_cast<TMSCallType> (pckg().iInt);
+                break;
+                }
+            }
+        i++;
+        }
+    return status;
+    }
+
+// -----------------------------------------------------------------------------
+// TMSServer::HandleDTMFEvent
+//
+// -----------------------------------------------------------------------------
+//
+void TMSServer::HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
+        const gint status, const TChar /*tone*/)
+    {
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_IF_ERR(status);
+    gint cmd = ECmdDTMFTonePlayFinished;
+
+    switch (event)
+        {
+        case ECCPDtmfUnknown:               //Unknown
+            break;
+        case ECCPDtmfManualStart:           //DTMF sending started manually
+        case ECCPDtmfSequenceStart:         //Automatic DTMF sending initialized
+            cmd = ECmdDTMFToneUplPlayStarted;
+            break;
+        case ECCPDtmfManualStop:            //DTMF sending stopped manually
+        case ECCPDtmfManualAbort:           //DTMF sending aborted manually
+        case ECCPDtmfSequenceStop:          //Automatic DTMF sending stopped
+        case ECCPDtmfSequenceAbort:         //Automatic DTMF sending aborted
+        case ECCPDtmfStopInDtmfString:      //There was stop mark in DTMF string
+        case ECCPDtmfStringSendingCompleted://DTMF sending success
+        default:
+            break;
         }
 
+    NotifyDtmfClients(cmd, status);
     TRACE_PRN_FN_EXT;
-    return TMS_RESULT_SUCCESS;
     }
 
 // -----------------------------------------------------------------------------
@@ -1292,6 +1416,22 @@
     }
 
 // -----------------------------------------------------------------------------
+// TMSServer::HandleNotifyPSL
+//
+// -----------------------------------------------------------------------------
+//
+void TMSServer::HandleNotifyPSL(const TUid aUid, const TInt& aKey,
+            const TRequestStatus& aStatus)
+    {
+    TRACE_PRN_FN_ENT;
+    if(iEffectSettings)
+        {
+        iEffectSettings->ResetDefaultVolume();
+        }
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
 // TMSServer::RunServerL
 //
 // -----------------------------------------------------------------------------
@@ -1575,4 +1715,3 @@
     return r;
     }
 
-// End of file
--- a/mmserv/tms/tmsserver/src/tmsserversession.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsserversession.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -15,7 +15,6 @@
  *
  */
 
-#include <AudioPreference.h>
 #include "tmsutility.h"
 #include "tmsclientserver.h"
 #include "tmsshared.h"
@@ -231,13 +230,8 @@
             iServer.MuteRingTone();
             aMessage.Complete(TMS_RESULT_SUCCESS);
             break;
-        case ETMSStartDTMFNotifier:
-            iServer.StartDTMFNotifierL();
-            aMessage.Complete(TMS_RESULT_SUCCESS);
-            break;
-        case ETMSCancelDTMFNotifier:
-            iServer.CancelDTMFNotifier();
-            aMessage.Complete(TMS_RESULT_SUCCESS);
+        case ETMSInitDTMF:
+            iServer.InitDTMF(aMessage);
             break;
         case ETMSStartDTMF:
             iServer.StartDTMF(aMessage);
@@ -522,4 +516,3 @@
         }
     }
 
-// End of file
--- a/mmserv/tms/tmsserver/src/tmstareventhandler.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmstareventhandler.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -108,5 +108,12 @@
     TRACE_PRN_FN_EXT;
     }
 
-//  End of File
+// -----------------------------------------------------------------------------
+// TMSTarEventHandler::RunError
+// -----------------------------------------------------------------------------
+//
+TInt TMSTarEventHandler::RunError(TInt aError)
+    {
+    return aError;
+    }
 
--- a/mmserv/tms/tmsutility/bwins/tmsutility.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsutility/bwins/tmsutility.def	Wed Aug 18 10:17:22 2010 +0300
@@ -8,7 +8,8 @@
 	?FourCCToTMSFormat@TMSUtility@TMS@@SAHK@Z @ 7 NONAME ; int TMS::TMSUtility::FourCCToTMSFormat(unsigned long)
 	?NotifyAfter@TMSTimer@TMS@@QAEXHAAVTMSTimerObserver@2@@Z @ 8 NONAME ; void TMS::TMSTimer::NotifyAfter(int, class TMS::TMSTimerObserver &)
 	?ToTAROutput@TMSUtility@TMS@@SA?AW4TAudioOutput@CTelephonyAudioRouting@@H@Z @ 9 NONAME ; enum CTelephonyAudioRouting::TAudioOutput TMS::TMSUtility::ToTAROutput(int)
-	?ToFourCC@TMSUtility@TMS@@SAKH@Z @ 10 NONAME ; unsigned long TMS::TMSUtility::ToFourCC(int)
-	??1TMSTimer@TMS@@UAE@XZ @ 11 NONAME ; TMS::TMSTimer::~TMSTimer(void)
-	?NotifyAfter@TMSTimer@TMS@@QAEXHVTCallBack@@@Z @ 12 NONAME ; void TMS::TMSTimer::NotifyAfter(int, class TCallBack)
+	?SymbianResult@TMSUtility@TMS@@SAHH@Z @ 10 NONAME ; int TMS::TMSUtility::SymbianResult(int)
+	?ToFourCC@TMSUtility@TMS@@SAKH@Z @ 11 NONAME ; unsigned long TMS::TMSUtility::ToFourCC(int)
+	??1TMSTimer@TMS@@UAE@XZ @ 12 NONAME ; TMS::TMSTimer::~TMSTimer(void)
+	?NotifyAfter@TMSTimer@TMS@@QAEXHVTCallBack@@@Z @ 13 NONAME ; void TMS::TMSTimer::NotifyAfter(int, class TCallBack)
 
--- a/mmserv/tms/tmsutility/eabi/tmsutility.def	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsutility/eabi/tmsutility.def	Wed Aug 18 10:17:22 2010 +0300
@@ -1,18 +1,19 @@
 EXPORTS
 	_ZN3TMS10TMSUtility11ToTAROutputEi @ 1 NONAME
 	_ZN3TMS10TMSUtility11ToTMSOutputEN22CTelephonyAudioRouting12TAudioOutputE @ 2 NONAME
-	_ZN3TMS10TMSUtility15EtelToTMSResultEi @ 3 NONAME
-	_ZN3TMS10TMSUtility17FourCCToTMSFormatEm @ 4 NONAME
-	_ZN3TMS10TMSUtility8ToFourCCEi @ 5 NONAME
-	_ZN3TMS10TMSUtility9TMSResultEi @ 6 NONAME
-	_ZN3TMS8TMSTimer11NotifyAfterEi9TCallBack @ 7 NONAME
-	_ZN3TMS8TMSTimer11NotifyAfterEiRNS_16TMSTimerObserverE @ 8 NONAME
-	_ZN3TMS8TMSTimer12CancelNotifyEv @ 9 NONAME
-	_ZN3TMS8TMSTimer4NewLEi @ 10 NONAME
-	_ZN3TMS8TMSTimer9IsRunningEv @ 11 NONAME
-	_ZN3TMS8TMSTimerD0Ev @ 12 NONAME
-	_ZN3TMS8TMSTimerD1Ev @ 13 NONAME
-	_ZN3TMS8TMSTimerD2Ev @ 14 NONAME
-	_ZTIN3TMS8TMSTimerE @ 15 NONAME
-	_ZTVN3TMS8TMSTimerE @ 16 NONAME
+	_ZN3TMS10TMSUtility13SymbianResultEi @ 3 NONAME
+	_ZN3TMS10TMSUtility15EtelToTMSResultEi @ 4 NONAME
+	_ZN3TMS10TMSUtility17FourCCToTMSFormatEm @ 5 NONAME
+	_ZN3TMS10TMSUtility8ToFourCCEi @ 6 NONAME
+	_ZN3TMS10TMSUtility9TMSResultEi @ 7 NONAME
+	_ZN3TMS8TMSTimer11NotifyAfterEi9TCallBack @ 8 NONAME
+	_ZN3TMS8TMSTimer11NotifyAfterEiRNS_16TMSTimerObserverE @ 9 NONAME
+	_ZN3TMS8TMSTimer12CancelNotifyEv @ 10 NONAME
+	_ZN3TMS8TMSTimer4NewLEi @ 11 NONAME
+	_ZN3TMS8TMSTimer9IsRunningEv @ 12 NONAME
+	_ZN3TMS8TMSTimerD0Ev @ 13 NONAME
+	_ZN3TMS8TMSTimerD1Ev @ 14 NONAME
+	_ZN3TMS8TMSTimerD2Ev @ 15 NONAME
+	_ZTIN3TMS8TMSTimerE @ 16 NONAME
+	_ZTVN3TMS8TMSTimerE @ 17 NONAME
 
--- a/mmserv/tms/tmsutility/src/tmsutility.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/tms/tmsutility/src/tmsutility.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2009-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"
@@ -120,6 +120,52 @@
     }
 
 // -----------------------------------------------------------------------------
+// TMSUtility::SymbianResult
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt TMSUtility::SymbianResult(const gint aError)
+    {
+    TInt result(KErrNone);
+
+    if (aError <= TMS_RESULT_SUCCESS)
+        {
+        return aError; //return Symbian error
+        }
+
+    switch (aError)
+        {
+        case TMS_RESULT_DOES_NOT_EXIST:
+            result = KErrNotFound;
+            break;
+        case TMS_RESULT_OPERATION_CANCELLED:
+            result = KErrCancel;
+            break;
+        case TMS_RESULT_INSUFFICIENT_MEMORY:
+            result = KErrNoMemory;
+            break;
+        case TMS_RESULT_ILLEGAL_OPERATION:
+            result = KErrNotSupported;
+            break;
+        case TMS_RESULT_INVALID_ARGUMENT:
+            result = KErrArgument;
+            break;
+        case TMS_RESULT_BUFFER_LATENCY_ERROR:
+            result = KErrUnderflow;
+            break;
+        case TMS_RESULT_ALREADY_EXIST:
+            result = KErrAlreadyExists;
+            break;
+        case TMS_RESULT_FATAL_ERROR:
+        case TMS_RESULT_GENERAL_ERROR:
+        default:
+            result = KErrGeneral;
+            break;
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
 // TMSUtility::EtelToTMSResult
 //
 // -----------------------------------------------------------------------------
--- a/mmserv/voipaudioservices/VoIPIntfc/src/VoIPUtilityFactoryImpl.cpp	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPIntfc/src/VoIPUtilityFactoryImpl.cpp	Wed Aug 18 10:17:22 2010 +0300
@@ -71,7 +71,7 @@
     // deny access to audio resources.
     iPriorityDn.iPref = KAudioPrefVoipAudioDownlink;
     iPriorityDn.iPriority = KAudioPriorityVoipAudioDownlink;
-    iPriorityUp.iPref = KAudioPrefVoipAudioUplink;
+    iPriorityUp.iPref = KAudioPrefVoipAudioUplinkNonSignal; //for DTMF mixing
     iPriorityUp.iPriority = KAudioPriorityVoipAudioUplink;
     }
 
--- a/mmserv/voipaudioservices/VoIPServer/inc/VoIPQueueHandlerSrv.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPServer/inc/VoIPQueueHandlerSrv.h	Wed Aug 18 10:17:22 2010 +0300
@@ -22,8 +22,6 @@
 #include <e32base.h>
 #include <e32msgqueue.h>
 #include "VoIPAudioClientServer.h"   // for TVoIPMsgBuf
-// FORWARD DECLARATIONS
-
 
 /**
  *  MQueueHandlerObserver
--- a/mmserv/voipaudioservices/VoIPServer/inc/VoIPServerThread.h	Tue Jul 06 14:50:35 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPServer/inc/VoIPServerThread.h	Wed Aug 18 10:17:22 2010 +0300
@@ -16,8 +16,8 @@
  *
  */
 
-#ifndef __VOIPAUDIOSERVERTHREAD_H
-#define __VOIPAUDIOSERVERTHREAD_H
+#ifndef VOIPAUDIOSERVERTHREAD_H
+#define VOIPAUDIOSERVERTHREAD_H
 
 #include <e32msgqueue.h>
 #include <sounddevice.h>
@@ -281,6 +281,6 @@
 
     };
 
-#endif  // __VOIPAUDIOSERVERTHREAD_H
+#endif  // VOIPAUDIOSERVERTHREAD_H
 
 // End of file
--- a/package_definition.xml	Tue Jul 06 14:50:35 2010 +0300
+++ b/package_definition.xml	Wed Aug 18 10:17:22 2010 +0300
@@ -1,79 +1,178 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
-  <package id="mmmw" name="Multimedia Middleware" levels="plugin framework server generic specific">
-    <collection id="khronosfws" name="Khronos Frameworks" level="framework">
-      <component id="openmax_al" filter="s60" name="OpenMAX AL" class="framework" introduced="^4">
+<SystemDefinition schema="3.0.1">
+ <package id="mmmw" name="Multimedia Middleware" levels="plugin framework server generic specific">
+  <collection id="mmmw_plat" name="Multimedia Middleware Platform Interfaces" level="specific">
+      <meta rel="testbuild">
+       <group name="mmmw_tsrc_group"/>
+      </meta>
+   <component id="audio_metadata_reader_api" name="Audio MetaData Reader API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/audio_metadata_reader_api/audio_metadata_reader_api.metaxml"/>
+    <unit bldFile="mmmw_plat/audio_metadata_reader_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/audio_metadata_reader_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="audio_output_control_utility_api" name="Audio Output Control Utility API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/audio_output_control_utility_api/audio_output_control_utility_api.metaxml"/>
+    <unit bldFile="mmmw_plat/audio_output_control_utility_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/audio_output_control_utility_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="audio_output_control_utility_proxy_api" name="Audio Output Control Utility Proxy API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/audio_output_control_utility_proxy_api/audio_output_control_utility_proxy_api.metaxml"/>
+    <unit bldFile="mmmw_plat/audio_output_control_utility_proxy_api/group"/>
+   </component>
+   <component id="call_audio_control_api" name="Call AudioControl API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/call_audio_control_api/call_audio_control_api.metaxml"/>
+    <unit bldFile="mmmw_plat/call_audio_control_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/call_audio_control_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="configuration_components_factory_api" name="Configuration Components Factory API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/configuration_components_factory_api/configuration_components_factory_api.metaxml"/>
+    <unit bldFile="mmmw_plat/configuration_components_factory_api/group"/>
+   </component>
+   <component id="emc_audio_effects_api" name="EMC Audio Effects API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/emc_audio_effects_api/emc_audio_effects_api.metaxml"/>
+    <unit bldFile="mmmw_plat/emc_audio_effects_api/group"/>
+   </component>
+   <component id="emc_balance_effect_api" name="EMC Balance Effect API" class="api" filter="s60">
+    <unit bldFile="mmmw_plat/emc_balance_effect_api/group"/>
+   </component>
+   <component id="emc_buffer_source_api" name="EMC Buffer Source API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/emc_buffer_source_api/emc_buffer_source_api.metaxml"/>
+    <unit bldFile="mmmw_plat/emc_buffer_source_api/group"/>
+   </component>
+   <component id="emc_descriptor_source_api" name="EMC Descriptor Source API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/emc_descriptor_source_api/emc_descriptor_source_api.metaxml"/>
+    <unit bldFile="mmmw_plat/emc_descriptor_source_api/group"/>
+   </component>
+   <component id="emc_drm_config_intfc_api" name="EMC DRM Config Intfc API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/emc_drm_config_intfc_api/emc_drm_config_intfc_api.metaxml"/>
+    <unit bldFile="mmmw_plat/emc_drm_config_intfc_api/group"/>
+   </component>
+   <component id="emc_file_source_api" name="EMC File Source API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/emc_file_source_api/emc_file_source_api.metaxml"/>
+    <unit bldFile="mmmw_plat/emc_file_source_api/group"/>
+   </component>
+   <component id="emc_volume_effect_api" name="EMC Volume Effect API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/emc_volume_effect_api/emc_volume_effect_api.metaxml"/>
+    <unit bldFile="mmmw_plat/emc_volume_effect_api/group"/>
+   </component>
+   <component id="enhanced_media_client_api" name="Enhanced Media Client API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/enhanced_media_client_api/enhanced_media_client_api.metaxml"/>
+    <unit bldFile="mmmw_plat/enhanced_media_client_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/enhanced_media_client_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="multimedia_data_source_api" name="Multimedia Data Source API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/multimedia_data_source_api/multimedia_data_source_api.metaxml"/>
+    <unit bldFile="mmmw_plat/multimedia_data_source_api/group"/>
+   </component>
+   <component id="openmax_al_api" name="OpenMAX AL API" class="api" filter="s60" introduced="^4">
+      <meta rel="Api" href="mmmw_plat/openmax_al_api/openmax_al_api.metaxml"/>
+      <unit bldFile="mmmw_plat/openmax_al_api/group" filter="!test"/>
+      <unit bldFile="mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="openmax_al_ext_api" name="OpenMAX AL Extensions API" class="api" filter="s60" introduced="^4">
+      <meta rel="Api" href="mmmw_plat/openmax_al_ext_api/openmax_al_ext_api.metaxml"/>
+      <unit bldFile="mmmw_plat/openmax_al_ext_api/group"/>
+   </component>
+   <component id="radio_monitor_api" name="Radio Monitor API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/radio_monitor_api/radio_monitor_api.metaxml"/>
+    <unit bldFile="mmmw_plat/radio_monitor_api/group"/>
+   </component>
+   <component id="radio_preset_utilities_api" name="Radio Preset Utilities API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/radio_preset_utilities_api/radio_preset_utilities_api.metaxml"/>
+    <unit bldFile="mmmw_plat/radio_preset_utilities_api/group"/>
+   </component>
+   <component id="radio_utilities_api" name="Radio Utilities API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/radio_utilities_api/radio_utilities_api.metaxml"/>
+    <unit bldFile="mmmw_plat/radio_utilities_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/radio_utilities_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="stream_control_custom_command_api" name="Stream Control Custom Command API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/stream_control_custom_command_api/stream_control_custom_command_api.metaxml"/>
+    <unit bldFile="mmmw_plat/stream_control_custom_command_api/group"/>
+   </component>
+   <component id="system_tone_service_api" name="System Tone Service API" class="api" filter="s60" introduced="^4">
+      <unit bldFile="mmmw_plat/system_tone_service_api/group"/>
+      <unit bldFile="mmmw_plat/system_tone_service_api/tsrc/group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="telephony_multimedia_service_api" name="Telephony Multimedia Service API" class="api" filter="s60">
+      <meta rel="testbuild">
+       <group name="mmmw_tms_tsrc_group"/>
+      </meta>
+    <unit bldFile="mmmw_plat/telephony_multimedia_service_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/telephony_multimedia_service_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW,TA_TMS"/>
+   </component>
+   <component id="thumbnail_engine_api" name="Thumbnail Engine API" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/thumbnail_engine_api/thumbnail_engine_api.metaxml"/>
+    <unit bldFile="mmmw_plat/thumbnail_engine_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/thumbnail_engine_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+   <component id="voip_audio_services_api" name="VoIP Audio Services" class="api" filter="s60">
+    <meta rel="Api" href="mmmw_plat/voip_audio_services_api/voip_audio_services_api.metaxml"/>
+    <unit bldFile="mmmw_plat/voip_audio_services_api/group" filter="!test"/>
+    <unit bldFile="mmmw_plat/voip_audio_services_api/tsrc/Group" filter="test,api_test,pref_test,TA_MMMW"/>
+   </component>
+  </collection>
+  <collection id="khronosfws" name="Khronos Frameworks" level="framework">
+      <component id="openmax_al" filter="s60" name="OpenMAX AL" introduced="^4">
         <unit bldFile="khronosfws/openmax_al/group"/>
       </component>
-    </collection>
-    <collection id="mmfenh" name="MMF Enhancements" level="generic">
-      <component id="advancedaudiocontroller" filter="s60" name="Advanced Audio Controllers" class="plugin">
-        <unit bldFile="mmfenh/advancedaudiocontroller/group"/>
-      </component>
-      <component id="audiooutputcontrolutility" filter="s60" name="Audio Output Control Utility">
-        <unit bldFile="mmfenh/audiooutputcontrolutility/group"/>
-      </component>
-      <component id="configurationcomponentsfactory" filter="s60" name="Configuration Components Factory">
-        <unit bldFile="mmfenh/configurationcomponentsfactory/group"/>
-      </component>
-      <component id="enhancedaudioplayerutility" filter="s60" name="Enhanced Audio Player Utility">
-        <unit bldFile="mmfenh/enhancedaudioplayerutility/group"/>
-      </component>
-      <component id="enhancedmediaclient" filter="s60" name="Enhanced Media Client">
-        <unit bldFile="mmfenh/enhancedmediaclient/group"/>
-      </component>
-      <component id="profilesettingsmonitor" filter="s60" name="Profile Settings Monitor">
-        <unit bldFile="mmfenh/profilesettingsmonitor/group"/>
-      </component>
-      <component id="progressivedownload" filter="s60" name="Progressive Download">
-        <unit bldFile="mmfenh/progressivedownload/group"/>
-      </component>
-      <component id="mmfenh_test" filter="s60,test,module_test,pref_test" name="MMF Enhancements Tests" purpose="development">
-        <unit bldFile="mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/group"/>
-      </component>      
-    </collection>
-    <collection id="mmserv" name="Multimedia Services" level="specific">
-      <component id="audioeffectsui" filter="s60" name="Audio Effects UI">
-        <unit bldFile="mmserv/audioeffectsui/group"/>
-      </component>
-      <component id="callaudiocontrol" filter="s60" name="Call Audio Control">
-        <unit bldFile="mmserv/callaudiocontrol/group"/>
-      </component>
-      <component id="metadatautility" filter="s60" name="Metadata Utility">
-        <unit bldFile="mmserv/metadatautility/group"/>
-      </component>
-      <component id="radioutility" filter="s60" name="Radio Utility">
-        <unit bldFile="mmserv/radioutility/group"/>
-      </component>
-      <component id="sts" filter="s60" name="System Tone Service" introduced="^4">
-        <unit bldFile="mmserv/sts/group"/>
-      </component>
-      <component id="thumbnailengine" filter="s60" name="Thumbnail Engine" introduced="^2">
-        <unit bldFile="mmserv/thumbnailengine/group"/>
-      </component>
-      <component id="tms" filter="s60" name="Telephony Multimedia Service" introduced="^3">
-        <unit bldFile="mmserv/tms/group"/>
-      </component>
-      <component id="voipaudioservices" filter="s60" name="VoIP Audio Services">
-        <unit bldFile="mmserv/voipaudioservices/group"/>
-      </component>
-      <component id="lib3gpextparser" filter="s60"  name="3GP Extension Metadata Parser Library">
-        <unit bldFile="mmserv/metadatautility/3GPExtParserLib_stub/group" filter="sf_build"/>
-      </component>
-    </collection>    
-    <collection id="mmmw_info" name="Multimedia Middleware Info" level="specific">
-      <component id="mmmw_test" filter="s60,test,api_test,pref_test" name="Multimedia Middleware Tests" purpose="development">
-        <unit bldFile="tsrc/group"/>
-      </component>
-      <component id="mmmw_api_test" filter="s60,test,api_test" name="Multimedia Middleware API Tests" purpose="development">
-        <unit bldFile="mmmw_plat/telephony_multimedia_service_api/tsrc/group"/>
-      </component>
-      <component id="mmmw_plat" filter="s60" name="Multimedia Middleware Platform Interfaces" class="api">
-        <unit bldFile="mmmw_plat/group"/>
-      </component>
-      <component id="mmmw_metadata" name="Multimedia Middleware Metadata" class="config" introduced="^2" purpose="development" target="desktop">
-        <unit mrp="mmmw_info/mmmw_metadata/mmmw_metadata.mrp"/>
-      </component>
-    </collection>
-  </package>
+  </collection>
+  <collection id="mmfenh" name="MMF Enhancements" level="generic">
+   <component id="advancedaudiocontroller" filter="s60" name="Advanced Audio Controllers" class="plugin">
+    <unit bldFile="mmfenh/advancedaudiocontroller/group"/>
+   </component>
+   <component id="audiooutputcontrolutility" filter="s60" name="Audio Output Control Utility">
+    <unit bldFile="mmfenh/audiooutputcontrolutility/group"/>
+   </component>
+   <component id="configurationcomponentsfactory" filter="s60" name="Configuration Components Factory">
+    <unit bldFile="mmfenh/configurationcomponentsfactory/group"/>
+   </component>
+   <component id="enhancedaudioplayerutility" filter="s60" name="Enhanced Audio Player Utility">
+    <unit bldFile="mmfenh/enhancedaudioplayerutility/group"/>
+   </component>
+   <component id="enhancedmediaclient" filter="s60" name="Enhanced Media Client">
+    <unit bldFile="mmfenh/enhancedmediaclient/group"/>
+   </component>
+   <component id="profilesettingsmonitor" filter="s60" name="Profile Settings Monitor">
+    <unit bldFile="mmfenh/profilesettingsmonitor/group"/>
+   </component>
+   <component id="mmfenh_test" filter="s60,test,module_test,pref_test" name="MMF Enhancements Tests" purpose="development">
+      <meta rel="testbuild">
+       <group name="advancedaudiocontroller_tsrc_group"/>
+      </meta>
+    <unit bldFile="mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/group"/>
+   </component>
+  </collection>
+  <collection id="mmserv" name="Multimedia Services" level="specific">
+   <component id="callaudiocontrol" filter="s60" name="Call Audio Control">
+    <unit bldFile="mmserv/callaudiocontrol/group"/>
+   </component>
+   <component id="metadatautility" filter="s60" name="Metadata Utility">
+    <unit bldFile="mmserv/metadatautility/group"/>
+   </component>
+   <component id="radioutility" filter="s60" name="Radio Utility">
+    <unit bldFile="mmserv/radioutility/group"/>
+   </component>
+   <component id="sts" filter="s60" name="System Tone Service" introduced="^4">
+    <unit bldFile="mmserv/sts/group"/>
+   </component>
+   <component id="thumbnailengine" filter="s60" name="Thumbnail Engine" introduced="^2">
+    <unit bldFile="mmserv/thumbnailengine/group"/>
+   </component>
+   <component id="tms" filter="s60" name="Telephony Multimedia Service" introduced="^3">
+    <unit bldFile="mmserv/tms/group"/>
+   </component>
+   <component id="voipaudioservices" filter="s60" name="VoIP Audio Services">
+    <unit bldFile="mmserv/voipaudioservices/group"/>
+   </component>
+   <component id="lib3gpextparser" filter="s60" name="3GP Extension Metadata Parser Library">
+    <unit bldFile="mmserv/metadatautility/3GPExtParserLib_stub/group"/>
+   </component>
+  </collection>
+  <collection id="mmmw_info" name="Multimedia Middleware Info" level="specific">
+   <component id="mmmw_test" filter="s60,test,api_test,pref_test" name="Multimedia Middleware Tests" purpose="development">
+    <unit bldFile="tsrc/group"/>
+   </component>
+  </collection>
+ </package>
 </SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml	Wed Aug 18 10:17:22 2010 +0300
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="mw"/>