[Clientapps-cvs] symbianMmf hxsystem_settings.cpp, 1.4.34.1, 1.4.34.2
jiau at helixcommunity.org jiau at helixcommunity.orgUpdate of /cvsroot/clientapps/symbianMmf
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv21189
Modified Files:
Tag: hxclient_4_2_0_brizo
hxsystem_settings.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: arnold.jiau at nokia.com
Reviewed by:
Date: 3/16/2010
Project: SymbianMmf_wm
ErrorId:
Synopsis: Helix 3rd party drm playback support. Including the fixes of the rights consumption and SetClientThreadId crashes when postprocessor is disabled.
Overview: This fix had been completed and checked into 210CanyS based on SUB 409-1052. The work here is to migrate the code from 210CanyS to 420Brizo.
In order to enable third party applications without DRM capability to play DRM protected content, new threading model (Secure DRM Model) was introduced to MMF, where server side of MMF will be created in a new secure DRM Plugin server process, in which MMF controller will still be loaded as a separate thread. This way a process boundary will be added between client and sensitive DRM content. This new threading model (a.k.a. Secure DRM mode) will be only activated when a third party app without DRM capability attempts to play DRM protected content.
In SecureDRM mode the standard custom command parsers disable CMMFDRMCustomCommandParser and CMMFVideoDRMExtCustomCommandParser commands, so helix controller will not get MdcDisableAutomaticIntent() indication from UI. Since helix controller currently doesnt consume OMAv2 content rights by default, this results in an OMAv2 protected file with rights for 3 plays being played indefinite number of times.
There are use cases such as video thumbnail generation, when postprocessor is not available;
CMDFDevVideoServerSession::SetClientThreadId() queries MMmfVideoClientThreadInfo custom interface (CI) on PostProcessor even if postprocessor is not available, which was causing crash.
Solution:
The following changes are needed in participating controllers ( e.g. helix):
- Include the <d> tag inside their resource files to be picked up by the MMF plugin resolver and loaded inside the secure DRM server process.
- Deliver a valid client application thread id to DevSound via SetClientThreadInfo (TThread& aTid) API. DevSound may need to be aware of real client identity in order to make correct audio policy and routing decisions.
- On DevVideoPlay side new custom interface (CI) MmfVideoClientThreadInfo::MvctSetClientThreadInfo (TThreadId & aTid) must be implemented by all decoder and post processing devices that use client application identity for policy and resource management decisions and controllers must attempt to query it from all media devices in use. If the interface is implemented, then controllers should deliver valid client application thread id
- To opt-in to new Secure DRM threading model, <d> tag is added to KMmfUidPluginInterfaceController INTERFACE_INFO structure in the resource files for helix video controller, helix audio controller and helix windows media video and helix windows media audio controller respectively
- Helix controller obtains client thread id in HXMMFBaseCtrl::InitResourcesL()
- Helix passes it to DevSound to enable Effective Client process to be set by DevSound. Effective Client Process is the process used when checking the client capabilities, secureId etc, rather than the Client Process which is the process in which the CMMFDevSound is running. This is done only once via CMMFDevSound::SetClientThreadInfo() API just after creation of DevSound and before any other calls to DevSound instance.
- the client thread id is also saved in HXMMFStateCtrl.
- On video side, mmfvideoadapter gets client thread id from HXMMFStateCtrl via new interface IHXSymbianClientThreadInfo and saves it to CDevVideoInitParams.
- then in CMDFDevVideoServerSession::CreateAndInitL() helix attempts to query MmvctSetClientThreadInfo() CI from DevVideoPlay and deliver client thread id to DevVideoPlay device.
- helix controller will consume rights for OMAv2 protected content by default.
- query MMmfVideoClientThreadInfo CI on video postprocessor only if the postprocessor is available
Files Added:
common/system/pub/platform/symbian/symbianclientthreadinfo.h
Files Modified:
/audio/device/platform/symbian/common/CHXMMFDevSound.cpp
/audio/device/pub/platform/symbian/CHXMMFDevSound.h
/clientapps/symbianMmf/hxmmfstatectrl.cpp
/clientapps/symbianMmf/hxmmfstatectrl.h
/clientapps/symbianMmf/hxmmfmetadata.cpp
/clientapps/symbianMmf/hxsystem_settings.cpp
/clientapps/symbianMmf/audiocontroller/10207B64.rss
/clientapps/symbianMmf/common/hxmmfbasectrl.cpp
/clientapps/symbianMmf/videocontroller/101F8513.rss
/common/include/hxiids.h
/datatype/mdf/video/renderer/mdfvideoadapter.cpp
/datatype/mdf/video/renderer/mdfdevice/server/CMDFDevVideoServerCmds.h
/datatype/mdf/video/renderer/mdfdevice/server/CMDFDevVideoServerSession.cpp
/datatype/mdf/video/renderer/mdfdevice/server/CMDFDevVideoServerSession.h
/datatype/mdf/video/renderer/pub/mdfvideoadapter.h
/datatype/mdf/audio/dsp/mdfaudfmt.h
Image Size and Heap Use impact: minor
Module Release testing (STIF) : MRT subset ongoing
Test case(s) Added : No.
Memory leak check performed : Yes. No new leaks introduced
Platforms and Profiles Build Verified:
helix-client-symbian-4
Platforms and Profiles Functionality verified: armv5, winscw
Branch: 420Brizo
Index: hxsystem_settings.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxsystem_settings.cpp,v
retrieving revision 1.4.34.1
retrieving revision 1.4.34.2
diff -u -d -r1.4.34.1 -r1.4.34.2
--- hxsystem_settings.cpp 26 Feb 2010 20:29:55 -0000 1.4.34.1
+++ hxsystem_settings.cpp 22 Mar 2010 17:27:48 -0000 1.4.34.2
@@ -75,7 +75,7 @@
#include <centralrepository.h>
-#include <webutilsinternalcrkeys.h>
+#include <WebUtilsInternalCRKeys.h>
CHXString CHXUAProfReader::ReadUAProfL(EUAProfEnum aUAProf)
{