Presentation is loading. Please wait.

Presentation is loading. Please wait.

EMB311 Enabling Media Playback On Windows CE Aaron Cheng Program Manager Windows CE Microsoft Corporation.

Similar presentations


Presentation on theme: "EMB311 Enabling Media Playback On Windows CE Aaron Cheng Program Manager Windows CE Microsoft Corporation."— Presentation transcript:

1 EMB311 Enabling Media Playback On Windows CE Aaron Cheng Program Manager Windows CE Microsoft Corporation

2 M anagement T ools C ommunications & M essaging Device Update Agent Software Update Services Live Communications Server Exchange Server Internet Security and Acceleration Server Speech Server Image Update L ocation S ervices M ultimedia MapPoint DirectX Windows Media Visual Studio 2005 D evelopment T ools MFC 8.0, ATL 8.0 Win32 N ative M anaged S erver S ide L ightweight R elational SQL Server 2005 Express EditionEDB D ata P rogramming M odel D evice B uilding T ools D evice B uilding T ools H ardware/ D rivers Windows XP DDK Windows Embedded Studio Platform Builder OEM/IHV Supplied BSP (ARM, SH4, MIPS) OEM Hardware and Standard Drivers Standard PC Hardware and Drivers SQL Server 2005SQL Server 2005 Mobile Edition ASP.NET Mobile ControlsASP.NET.NET Compact Framework.NET Framework Microsoft Operations Manager Systems Management Server

3 Agenda Multimedia Overview and Architecture Windows Media Playback Pipeline Streaming features on CE 5.0 Dealing with Window Media Digital Rights Management Protected Content Window Media Digital Rights Management 10 for Portable Devices Overview Features and limitations of Digital Rights Management 10 PD on CE Setup and configuration Digital Rights Management 10 PD on CE Developing custom DRM-enabled applications

4 CE Multimedia Goals Provide a rich set of multimedia technologies that enable customers to rapidly build a variety of consumer devices Small, Fast, Hardware Assisted Compatibility with desktop Windows when possible Optimized support for multiple CPUs and Systems on Chip

5 Current MM Technologies CE v5.0 Windows Media v9 improvements/new codecs Direct3D Mobile CE v4.2 Windows Media v9 CE v 4.0 Windows Media Player Application Windows Media v8 DVD CE v 3.0 DirectShow, DirectDraw Windows Media Player OCX v6.4 Increasing Stability and Performance

6 Windows CE Multimedia TechnologiesAudioVideo 2D and 3D Graphics CodecsStreamingDVD-Video Digital Rights Management ProductsMSTVMSNTV Windows for Automotive Portable Media Center SmartPhonePocketPC VOIP Phone IP Set-Top-Box PVRDMR

7 Technology Breakdown DirectDraw Drawing surfaces, blting, flipping, overlays, alpha blend, video ports Direct3D Mobile 3D polygon rendering Direct3D Mobile uses the same API signatures as Direct3D Lightweight, integer based Waveform Audio Playback, capture, mixing, sample rate conversion, gain classes DirectShow Media playback DVD-Video DVD navigation and playback DVD Player app Windows Media Audio/video codecs Streaming/Local File WM Player OCX WM Player app

8 Windows Media Components Streaming HTTP, MMS, local file ASX play list parser and handler ASF parser and splitter DRM/decryption Software Codecs WMV 9 Advanced Profile (new in 5.0) WMVWMA WMA lossless (new in 5.0) WMA Pro (new in 5.0) DirectShow standard renderer filters

9 CE Multimedia Architecture Network, File system, Graphics, Audio, DVD Drivers Filter Graph Filter Graph WM Player ActiveX Control WMP Sample App, IE 6 DirectDraw/GDI WaveDev WaveDev Hardware Network/ File System Source Codecs DirectShow Filter Graph Manager DVD- Video D3DM Renderers DirectShow App D3D Mobile, DVD, DDraw Apps DDraw Apps WMV WMA MPE G

10 Encoding For Local Playback Variable bit rate is good for conserving disk space CE 5.0 supports high content bit rates Make sure indexing is turned on The playback pipeline uses the index to rapidly seek for trick modes Trick mode performance is degraded without an index

11 New Streaming Features FastStart Enables stream to buffer at speeds higher than the bit rate of the requested content Buffer fill rate governed by bandwidth of the pipe and limits set on the Windows Media server Supported for live broadcast and on demand Only supported on unicast streams Startup profile Improves stream start time over FastStart Important for IPTV channel change latency Only for the HTTP unicast protocol

12 How Startup Profile Works Windows CE will look at the content and calculates an acceleration duration based on the content preroll, bit rate, and the FSAccBandwitdth The Windows Media Server (WMS) uses this acceleration duration value as the length of time to scan the content for the startup buffering requirements WMS then determines a minimal buffer (essentially a preroll) that the client decoder requires to play the acceleration duration without starving the decoder

13 Streaming Protocols Multicast Each packet is broadcast to multiple clients Microsoft Media Stream (MMS) TCP connection for commands between client and server UDP connection for commands between client and server Automatic protocol roll-over (UDP, TCP) HTTP Will automatically come through corporate firewalls Will use Internet Explorer’s proxy-settings, or configure its own settings RTSP Not supported on Windows CE File-based (local or network redirector)

14 Protocol Comparison On CE MMS is good for up to 2Mb/s No fast start and startup profile Lighter network load (no ack’s) Requires more reliable hardware and well dimensioned networks MMS is getting deprecated in servers in favor of RTSP and HTTP HTTP is better at high bit rates – internally tested up to 10Mb/s on CE 5.0 Fast start and startup profile

15 Encoding For Streaming Preroll We use 5 seconds for HTTP unicast MMS as low as 1 second for a quiet network No startup profile Multicast as low as 1 second for a quiet network No fast start and startup profile Bit rate Highest for your pipe Key frame distance 5 seconds for HTTP/MMS unicast 1 second for Multicast (faster startup)

16 Current DRM Status On CE Windows Media DRM v10 for Portable Devices ‘Janus’ available on 5.0 for x86 and ARM platforms Support for all other platforms available by summer Backward compatible with all previous versions of Windows Media DRM PD DRM and DRM v7.1 only available on CE 4.2

17 Digital Rights Management Ecosystem Distribution Authorization Protected Content Window Media Rights Manager Content Server

18 Windows Media Digital Rights Management 10 PD Overview A flexible platform to protect audio/video content for playback on devices connected to IP networks or portable devices connect to another device Store and playback audio/video content Support playback of VOD content Separate license for each piece of content Each license specify rights for content usage

19 Windows Media Digital Rights Management 10 PD Overview Acquire and store licenses/content Allow offline access No ‘server’ type capabilities Enable devices and PC to play back the same content No change to content encryption format Secure Unique keys for every OEM/device Compromised devices can be revoked

20 How Are Digital Rights Management Files Different H Packet Header ASF / WMA / WMV Packet Packet Packet Packet Packet Packet Packet Packet Packet PayloadHeader DRMdata DRM Header Obj. Header not encrypted Packet-basedFault-tolerant Efficient encryption

21 Digital Rights Management 10 License Rights Playback on device Play count Output restrictions Time-based rights Device/application security level Copy to device Copy count Device capability restrictions CD burning

22 How To Acquire Digital Rights Management License Direct License Acquisition (DLA) Device directly talks to license server Licenses are tied to the device Three different forms: silent, non-silent and Pre-delivery Indirect License Acquisition (ILA) Require PC to acquire license first PC generates new license to transfer to a connected device

23 Windows Media Digital Rights Management 10 PD Advantages Enable new business model for content owners and resellers Provides interoperable platform for protected content to flow to devices Enhanced security capabilities for protecting content Provides greater flexibility for ISV interaction with DRM content Improvement in overall performance

24 Digital Rights Management 10-Content Decrypt Perf Data from internal Microsoft testing

25 Windows Media Digital Rights Management 10 PD On WinCE Provides E2E solution for play back of DRM protected content Underlying DRM system exposed to other apps through the CE DRM v10 API Built-in DLA support for devices directly connected to IP networks Non-silent DLA and Pre-delivery supported through DRM OCX Need MTP and DRM extension implementation for ILA support

26 Generic Playback Process All starts with selecting the content that you want to play Unencrypted ASF header contains the ID of the selected content DRM system searches the local license store for a valid license Playback begins if a valid license is found Otherwise, DRM system obtains a license through the license server URL indicated in the ASF header

27 Digital Rights Management System Interactions In CE

28 WinCE Digital Rights Management 10 PD Features License Chaining Require root and leaf license to access content Metering Track usage for subscription services Output Protection Levels (OPL) Control content flow to unprotected outputs Device Individualization Allow each device to be uniquely identified Data Store Garbage Collection Periodically delete invalid licenses

29 WinCE Digital Rights Management 10 PD Limitations What are not supported? CD burning rights Application exclusion Additional work required to support the following features ILAMetering Communication with audio/video drivers to enforce OPL Secure Clock

30 How To Get The Digital Rights Management 10 Bits? Out-of-Band process, must request through CE distributor or Direct Account Manager Separate license agreement from WMLA Receive two separate packages MSI installer – documentation, header files, Lib file and samples Zip file – actual DRM 10 DLL, two.dat files Zip file unique for each OEM/device, individually tested before release

31 How To Enable Digital Rights Management 10 In Build Catalog entries Add ‘Windows Media DRM 10’ and ‘DRM License Acquisition OCX’ Remove ‘Digital Rights Management’ and ‘DRM for Portable Devices’ Move Janus DLL and the two.dat files to the release directory Add entries to the project.bib file Add entries to the registry (optional) Do a clean build

32 Sample Project.bib File MODULES ; Name Path Memory Type ; Janus_WINCE.dll $(_FLATRELEASEDIR)\Janus_WINCE.dll NK SHD FILES ; Name Path Memory Type ; devcerttemplate.dat $(_FLATRELEASEDIR)\devcerttemplate.dat NK SH wmdrmpd.dat $(_FLATRELEASEDIR)\wmdrmpd.dat NK SH

33 Digital Rights Management 10 DAT Files Included in DRM 10 package Devcerttemplate.dat – base template for a device certificate, contain info such as device make/model & device security level Wmdrmpd.dat – Obfuscated DRM file Generated on device after 1st attempt to play back DRM-protected content: Drmstore.dat – license store file to store the acquired DRM licenses Devcert.dat – actual device certificate generated from the template, an unique instance is generated every time

34 Digital Rights Management 10 Registry Settings HKLM\Software\Microsoft\WMDRMPD CertTemplatePath – location of wmdrmpd.dat & devcerttemplate.dat, defaults to \Windows CertPath – location of devcert.dat, defaults to the root of the file system PreAllocateDataStore – pre-allocate the DRM license store to a specific size, potential to improve perf on hard drive-based devices HKLM\Software\Microsoft\DRM DataPath – path & filename of the DRM license store file, defaults to root

35 What Else Must Be Done to Ship A DRM-Enabled Device? OAL support IOCTL_HAL_GET_DEVICEID and return at least 128 bits of unique data Media playback app must be able to either enforce the OPL rights specified in a license or stop playback of the content Media playback app must call the IMediaControl::Stop method after receiving a EC_COMPLETE event PB install must include Windows CE 5.0 QFE _KB885285

36 Working With The DRM OCX Hosted by the browser to perform non-silent DLA & pre-delivery Interaction from the user to confirm acquisition of the content Other application may also host the OCX OCX exposes the same methods as the RMGetLicense object from the Windows Media Rights Manager SDK OCX methods abstract the CE DRM v10 API Use the NetObj.GetLicenseFromURL() method to perform pre-delivery

37 Diagnosing Digital Rights Management Problems Common DRM-related issues/failures DRM license server not updated with the latest verification keys Attempting to playback content that require high security level Devices fails to playback content after a reboot or power failure Devcert.dat and Drmstore.dat are never created on the device Attaching the debugger to a DRM image Trying to perform non-silent DLA with an image that doesn’t include a browser

38 Developing Custom Digital Rights Management Application CE’s E2E DRM solution Relies on the CE DirectShow splitter to parse the ASF header file and make the appropriate calls to the DRM system Custom DRM application Gain greater control over the license acquisition and playback process Use the CE DRM v10 API to directly access the DRM system, requires the Lib and header files from the installation package Custom application must be aware of the protected contents’ KIDs

39 CE Digital Rights Management V10 API Overview CeDRM_Mgr_Initialize() Initialize system’s internal DRM state CeDRM_Mgr_SetV2Header() Provides content header to the DRM system CeDRM_Mgr_Bind() Searches the license store for a valid license CeDRM_Mgr_GenerateChallenge() Generates a license challenge request CeDRM_Mgr_ProcessResponse() Store license returned from the license server to the local DRM store

40 CE Digital Rights Management V10 API Overview CeDRM_Mgr_Commit() Commit to disk all metering and play count changes in the license store CeDRM_Mgr_Decrypt() Protected content are decrypted in place CeDRM_Mgr_GetLicenseData() Retrieves the license rights for contents CeDRM_Mgr_GetDeviceProperty() Retrieves device properties for DLA Other APIs for metering & secure clock

41 Retrieving Digital Rights Management License Data // Create a DRM manager context DRM_MANAGER_CONTEXT *g_pManagerContext g_pManagerContext = (DRM_MANAGER_CONTEXT*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DRM_MANAGER_CONTEXT)); //Initialize the DRM system CeDRM_Mgr_Initialize(g_pManagerContext, &wszDeviceStoreName); //Set the V2 header CeDRM_Mgr_SetV2Header (g_pManagerContext, lpHeader, cbHeader); //Retrive the license rights for a piece of content const DRM_CONST_STRING *proparray[] = {&g_dstrWMDRM_PLAY}; DRM_LICENSE_STATE_DATA statedatavales[NO_OF(proparray)]; CeDRM_Mgr_GetLicenseData( g_pManagerContext, proparray, statedatavales, NO_OF( proparray ) );

42 Additional Digital Rights Management Resources Web Resources WM DRM Web Site: WM DRM Partners: Windows Media Community: Windows Media DRM Newsgroup: news://msnews.microsoft.com/microsoft.public.windowsmedia.drm for general questions

43 While At MEDC 2005… Fill out an evaluation for this session Randomly selected instant WIN prizes! Randomly selected instant WIN prizes! Use real technology in a lab Instructor led Reef E/F & Breakers L Self-paced Reef B/C Self-paced Reef B/C Visit the Microsoft Product Pavilion in the Exhibit Hall Shorelines B in the Exhibit Hall Shorelines B

44 After The Conference… Develop Build InstallBuildJoin Install Enter Enter Join Full-featured trial versions of Windows CE and/or Windows XP Embedded Cool stuff & tell us about it: msdn.microsoft.com/embedded/community msdn.microsoft.com/embedded/community Windows Embedded Partner Program: Windows Mobile 5.0 Eval Kit including Visual Studio 2005 Beta 2 Mobile2Market Contest and win up to $25000: mobile2marketcontest.com mobile2marketcontest.com Microsoft Solutions Partner Program: partner.microsoft.com partner.microsoft.com

45 Tools & Resources msdn.microsoft.com/ embedded microsoft.public. windowsxp.embedded windowsce.platbuilder windowsce.platbuilder windowsce.embedded.vc windowsce.embedded.vc blogs.msdn.com/ mikehall Windows CE 5.0 Eval Kit Windows XP Embedded Eval Kit msdn.microsoft.com/ mobility microsoft.public. pocketpc.developer smartphone.developer dotnet.framework.compactframework blogs.msdn.com/ windowsmobile vsdteam netcfteam Windows Mobile 5.0 Eval Kit Websites Newsgroups Blogs Tools Build Develop

46 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "EMB311 Enabling Media Playback On Windows CE Aaron Cheng Program Manager Windows CE Microsoft Corporation."

Similar presentations


Ads by Google