[Clientapps-cvs] symbianMmf hxmmfctrlimpl.cpp,1.26,1.27
cybette at helixcommunity.org cybette at helixcommunity.orgUpdate of /cvsroot/clientapps/symbianMmf
In directory cvs:/tmp/cvs-serv7002
Modified Files:
hxmmfctrlimpl.cpp
Log Message:
"Nokia submits this code under the terms of a commercial
contribution agreement with RealNetworks, and I am authorized
to contribute this code under said agreement."
Modified by:
carol.i.chen at nokia.com
Reviewed by:
ehyche at real.com, gwright at real.com
Date:
3-3-2006
Project:
Helix plug-in for Symbian
Synopsis:
-- Priority settings passed to the MMF from the Client/UI needs
to be passed down to DevSound. There are two integer values in
the settings: iPriority and iPref. Currently these values are ignored
in MMF and a default value is passed to DevSound instead.
The change will allow iPriority and iPref to be set to the desired
values, and this is required for the Video Ringtone feature to work
properly, as Video Ringtones have a higher priority than normal
video playback and Audio Policy needs to be aware of the difference.
-- The MMF Controller code is changed to store priority values
through the IHXPreferences interface. The AudioDevice code (for both
MDF and non-MDF) is modified to retrieve these saved values, and
pass them down to DevSound in place of the previous default values.
Helix core is not affected by this implementation.
-- [Update from original submission] Instead of creating an instance
of HXCommonClassFactory in HXMMFCtrlImpl, context pointer is obtained
by query of HXMMFStateCtrl. Support for QI of IHXCommonClassFactory
is also added in HXMMFStateCtrl. In addition, since QI can be done on
a context, usage of IHXPreferences is not needed and thus removed from
the audio device code.
Files Modified:
clientapps\symbianMmf\hxmmfctrlimpl.cpp
clientapps\symbianMmf\hxmmfstatectrl.cpp
audio\device\pub\platform\symbian\audsymbian.h
audio\device\platform\symbian\audsymbian.cpp
audio\device\platform\symbian\audiosvr\audio_svr.h
audio\device\platform\symbian\audiosvr\audio_svr.cpp
audio\device\platform\symbian\audiosvr\mmf\audio_session-mmf.h
audio\device\platform\symbian\audiosvr\mmf\audio_session-mmf.cpp
datatype\mdf\audio\dsp\mdfauddevice.h
datatype\mdf\audio\dsp\mdfauddevice.cpp
datatype\mdf\audio\dsp\mdfdevsound.h
datatype\mdf\audio\dsp\mdfdevsound.cpp
datatype\mdf\audio\dsp\Umakefil
Files Added:
none
Image Size and Heap Use impact:
minor
Platforms and Profiles Build Verified:
helix-client-s60-mmf-basic, helix-client-s60-mmf-mdf-basic
Platforms and Profiles Functionality verified:
armv5, winscw
Branch:
hxclient_2_1_0_cayennes, head
Index: hxmmfctrlimpl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfctrlimpl.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- hxmmfctrlimpl.cpp 27 Feb 2006 16:16:48 -0000 1.26
+++ hxmmfctrlimpl.cpp 7 Mar 2006 18:08:38 -0000 1.27
@@ -73,6 +73,7 @@
#include "hxmmfmimetypes.h"
#include "hxmmfconfigutil.h"
#include "chxavbuffer.h"
+#include "hxapihelp.h"
#include "rtsputil.h"
#include "ihxmmfdatasource.h"
#include "hxdatasourcemmfclip.h"
@@ -898,7 +899,26 @@
void
HXMMFCtrlImpl::SetPrioritySettings(const TMMFPrioritySettings& aPriority)
{
- // Not implemented
+ HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::SetPrioritySettings() iPriority(%d) iPref(%d)",
+ aPriority.iPriority, aPriority.iPref);
+
+ // use prefs namespace (IHXPreferences helpers) to store Priority Settings to prefs
+ if (m_pPrefs)
+ {
+ IHXCommonClassFactory *pCCF = NULL;
+ m_pStateCtrl->QueryInterface(IID_IHXCommonClassFactory, (void **) &pCCF);
+
+ if (pCCF != NULL)
+ {
+ UINT32 prio = (aPriority.iPriority <= 0) ? 0 : aPriority.iPriority;
+ UINT32 pref = (aPriority.iPref <= 0) ? 0 : aPriority.iPref;
+ prefs::Write(pCCF, m_pPrefs, "MMFPriority", prio);
+ prefs::Write(pCCF, m_pPrefs, "MMFPriorityPref", pref);
+ HXLOGL3(HXLOG_SMMF,
+ "HXMMFCtrlImpl::SetPrioritySettings (%u,%u) written to prefs", prio, pref);
+ HX_RELEASE(pCCF);
+ }
+ }
}