Building a Network Device Compatible with Microsoft Windows Media Player 11<br />November 7, 2007<br />Abstract<br />This ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Building a Network Device Compatible with Microsoft Windows Media ...
Upcoming SlideShare
Loading in...5
×

Building a Network Device Compatible with Microsoft Windows Media ...

698

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
698
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Building a Network Device Compatible with Microsoft Windows Media ..."

  1. 1. Building a Network Device Compatible with Microsoft Windows Media Player 11<br />November 7, 2007<br />Abstract<br />This paper describes concepts that help manufacturers to build a network audio/video device that is compatible with the new Media Sharing feature in Microsoft® Windows Media® Player 11.<br />This information applies for the following operating systems:Windows Vista™Microsoft Windows® XP<br />The current version of this paper is maintained on the Web at: http://go.microsoft.com/fwlink/?LinkId=87957<br />References and resources discussed here are listed at the end of this paper.<br />Contents<br /> TOC o "1-3" h z u Introduction PAGEREF _Toc167791084 h 4<br />Media Sharing Feature in Windows Media Player 11 PAGEREF _Toc167791085 h 4<br />Baseline Technologies PAGEREF _Toc167791086 h 5<br />Architecture Overview PAGEREF _Toc167791087 h 5<br />Supported Formats PAGEREF _Toc167791088 h 6<br />Audio PAGEREF _Toc167791089 h 6<br />Pictures PAGEREF _Toc167791090 h 7<br />Video PAGEREF _Toc167791091 h 7<br />Playlists PAGEREF _Toc167791092 h 7<br />Additional Formats PAGEREF _Toc167791093 h 7<br />Supported Streaming Protocols PAGEREF _Toc167791094 h 8<br />PlaysForSure Network Devices PAGEREF _Toc167791095 h 8<br />Supported Versions of Microsoft Windows PAGEREF _Toc167791096 h 9<br />Accessing the Media Sharing Feature in Windows Vista PAGEREF _Toc167791097 h 9<br />WMP Sharing and DLNA Devices PAGEREF _Toc167791098 h 9<br />Network Configuration and Addressing PAGEREF _Toc167791099 h 10<br />Physical Layer PAGEREF _Toc167791100 h 10<br />IP Addresses PAGEREF _Toc167791101 h 10<br />Network Security PAGEREF _Toc167791102 h 10<br />Same Subnet PAGEREF _Toc167791103 h 10<br />IP Packet TTL PAGEREF _Toc167791104 h 10<br />Firewall Requirements PAGEREF _Toc167791105 h 10<br />Device Discovery and Description PAGEREF _Toc167791106 h 11<br />WMP Sharing User Interface Elements PAGEREF _Toc167791107 h 12<br />Device Description Document PAGEREF _Toc167791108 h 13<br />Device Authorization PAGEREF _Toc167791109 h 13<br />Windows Media DRM Authorization and Registration PAGEREF _Toc167791110 h 13<br />Accessing WMP Sharing PAGEREF _Toc167791111 h 14<br />Browsing PAGEREF _Toc167791112 h 14<br />Container Hierarchy PAGEREF _Toc167791113 h 15<br />Searching PAGEREF _Toc167791114 h 18<br />Sorting PAGEREF _Toc167791115 h 20<br />Filtering PAGEREF _Toc167791116 h 20<br />String Lengths PAGEREF _Toc167791117 h 21<br />Microsoft Extensions to UPnP Metadata PAGEREF _Toc167791118 h 21<br />Artist Attributes PAGEREF _Toc167791119 h 22<br />Author Attributes PAGEREF _Toc167791120 h 23<br />Ratings Attributes PAGEREF _Toc167791121 h 23<br />Service Provider Attribute PAGEREF _Toc167791122 h 25<br />Source URL Attribute PAGEREF _Toc167791123 h 25<br />Year Attribute PAGEREF _Toc167791124 h 25<br />Retrieving Album Art and Thumbnail Images PAGEREF _Toc167791125 h 26<br />AlbumArtURI PAGEREF _Toc167791126 h 26<br />Parameterized URLs PAGEREF _Toc167791127 h 26<br />Format Transcoding PAGEREF _Toc167791128 h 27<br />Support for “Trick Modes” and Seeking Using HTTP PAGEREF _Toc167791129 h 27<br />Identifying Codecs PAGEREF _Toc167791130 h 28<br />Setting Compatibility Flags PAGEREF _Toc167791131 h 28<br />User Compatibility Flags PAGEREF _Toc167791132 h 28<br />Device Compatibility Flags PAGEREF _Toc167791133 h 28<br />Compatibility Flag Values and Behaviors PAGEREF _Toc167791134 h 29<br />X_DeviceCaps Example PAGEREF _Toc167791135 h 30<br />Streaming DVR-MS files PAGEREF _Toc167791136 h 30<br />Timestamp values PAGEREF _Toc167791137 h 30<br />Audio and Video streams PAGEREF _Toc167791138 h 30<br />Other streams PAGEREF _Toc167791139 h 31<br />ASF Extensible Attribute Detail PAGEREF _Toc167791140 h 31<br />Errata PAGEREF _Toc167791141 h 32<br />Resources PAGEREF _Toc167791142 h 32<br />Microsoft Resources PAGEREF _Toc167791143 h 32<br />Industry Resources PAGEREF _Toc167791144 h 33<br />RFCs PAGEREF _Toc167791145 h 33<br />Appendixes PAGEREF _Toc167791146 h 34<br />Appendix 1. Sample SSDP Announcement Messages PAGEREF _Toc167791147 h 34<br />Appendix 2. Resource Elements for Transcoded Content PAGEREF _Toc167791148 h 35<br />Disclaimer<br />This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.<br />The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.<br />This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.<br />Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.<br />Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.<br />Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred.<br />© 2007 Microsoft Corporation. All rights reserved.<br />Microsoft, Windows, Windows Media, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.<br />The names of actual companies and products mentioned herein may be the trademarks of their respective owners.<br />Document History<br />DateChangeMay 8, 2007First publicationNovember 7, 2007Add KB link for hotfix that re-enables support for DVR-MS. See Update Note on page 7.<br />Introduction<br />Consumers want their personal media collections available all throughout their homes, and Windows® PCs are a key value-add component in the home media ecosystem. However, to truly enable consumers to unlock the potential of their PCs and enjoy ubiquitous media access, personal and premium content must flow smoothly between Windows PCs and networked audio/video devices.<br />This paper describes the Media Sharing functionality in Microsoft Windows Media® Player (WPM) 11, referred to as WMP Sharing, so that manufacturers of networked audio/video devices can develop products that are highly interoperable with WMP Sharing. Concepts and techniques discussed in this paper include:<br />Baseline technologies, general architecture, and supported formats<br />Network configuration and addressing requirements<br />Device discovery and description<br />Access to WMP Sharing content<br />Microsoft Extensions to UPnP Metadata<br />Identifying codecs used to encode content<br />Setting device compatibility flags<br />Note that for some constructs in this paper, Augmented Backus-Naur Form (ABNF) is used to define syntax. ABNF syntax is defined in RFC 4234, available in “Resources” at the end of this paper.<br />Media Sharing Feature in Windows Media Player 11<br />With the release of Windows Media Player 11 in Windows Vista™ and Windows XP SP2, Media Sharing technology has been integrated directly into WMP. This allows all users to share their WMP library content directly to network devices.<br />WMP Sharing provides several exciting new features for network devices:<br />Album art and enhanced metadata are exposed.<br />Performance has been enhanced to accommodate larger media libraries.<br />Devices can receive and play WMP auto-playlists.<br />Streaming capabilities are improved with the addition of Real-Time Streaming Protocol/Real-Time Transport Protocol (RTSP/RTP).<br />Content filtering has improved with personal and parental ratings.<br />Baseline Technologies<br />WMP Sharing is based on a core set of network protocols, codecs, and related technologies. These baseline technologies form the foundation for interoperability with WMP Sharing.<br />Table 1. Baseline Technologies for WMP Sharing<br />LayerProtocol/technologyCodecsAudio: WMA, MP3, LPCM, WAVVideo: WMV, VC-1, MPEG-1, MPEG-2, AVI, DVR-MSPhoto: JPEG, PNG, YUVContent ServicesWindows Media Digital Rights Management (DRM) 10 for Network Devices, Windows Media Player metadata storeControl, Discovery, and EventingUPnP MediaServer:1 (including Microsoft Extensions to UPnP Metadata), UPnP 1.0, RTSP, and RTCPAudio/Video TransportHypertext Transfer Protocol (HTTP) and RTPNetwork ProtocolsTransmission Control Protocol/User Datagram Protocol/Internet Protocol (TCP/UDP/IP)<br />Architecture Overview<br />WMP Sharing consists of multiple logical components, as shown in Figure 1.<br />X_MS_MediaReceiverRegistrar:1<br />Figure 1. WMP Sharing Architecture<br />WMP Sharing is a UPnP MediaServer:1 fully compliant with the UPnP ContentDirectory:1 and ConnectionManager:1 service types. Accordingly, WMP Sharing supports all of the required actions and state variables for these two services. As part of the Content Directory service, the optional A_ARG_TYPE_SearchCriteria and ContainerUpdateIDs state variables, as well as the optional UPnP Search action, are supported. The latter, in particular, allows device manufacturers to provide a richer multimedia experience for their users. WMP Sharing also supports the X_MS_MediaReceiverRegistrar:1 UPnP service, which is used for Windows Media DRM authorization and registration and is discussed later in this paper.<br />The WMP database provider supplies all of the metadata that is shared to network devices and allows enumeration and search of WMP library content. Metadata can be sourced from WMP metadata providers, from user input, or from a variety of other sources.<br />As indicated by the dotted box in the Figure 1, each user that has enabled WMP Sharing has a separate instance of the WMP database provider and MediaServer. The WMP database provider also interacts with the file system to update the metadata that is associated with a given media file.<br />The Media Delivery Engine is responsible for providing the streaming format support for WMP Sharing—retrieving content from the file system and delivering it to the networked device by using the supported streaming protocols described later in this paper. The Media Delivery Engine also communicates with other Windows media components to provide transcoded versions of shared media content when requested to do so by the device.<br />Collectively, these components form WMP Sharing, also known as Windows Media Player Network Sharing Service (WMPNSS). It is represented by a single executable—wmpnetwk.exe—that runs as a network service on the host machine.<br />Supported Formats<br />WMP Sharing supports the distribution of audio, picture, and video content, as well as playlists. The following sections describe the formats that are supported for each content type, including the associated file extension and Multipurpose Internet Mail Extensions (MIME) type.<br />WMP Sharing does not expose content for which the MIME type cannot be determined.<br />For a device to play a format supported by WMP Sharing, the device must also support the codec appropriate to the format. Note that various codecs can be used for some formats such as WAV and AVI.<br />Audio<br />WMP Sharing supports the audio formats shown in Table 2.<br />Table 2. Supported Audio Formats<br />Format File extensionMIME typeWMA.wmaaudio/x-ms-wmaMPEG-1 Layer 3.mp3audio/mpegWAV.wavaudio/wavLPCMN/Aaudio/L16<br />Note that the audio/L16 MIME type should include additional parameters specifying the sample rate and number of audio channels. These additional parameters are separated from the MIME type header by semicolons, as shown in the following example: “audio/L16;rate=44100;channels=2”. WMP Sharing will exclude these additional PCM parameters if the “WMC_COMPAT_EXCLUDE_PCMPARAMS” flag is set for the device. For more information on compatibility flags, see “Setting Compatibility Flags” later in this paper.<br />Pictures<br />WMP Sharing supports the picture formats shown in Table 3.<br />Table 3. Supported Picture Formats<br />Format File extensionMIME typeJPEG.jpgimage/jpegPNG.pngimage/pngRAW(codec specific)(codec specific)<br />RAW format support is available only on Windows Vista. For more information on RAW format support, see “Additional Formats” later in this paper.<br />Video<br />WMP Sharing supports the video formats shown in Table 4.<br />Table 4. Supported Video Formats<br />Format File extensionMIME typeWMV.wmvvideo/x-ms-wmvMPEG-2.mpeg, .mpgvideo/mpegMPEG-1.mpeg, .mpgvideo/mpegAVI.avivideo/aviDVR-MS.dvr-msvideo/x-ms-dvr<br />Update Note: To enable sharing of DVR-MS (.dvr-ms) video files, a Microsoft-supported hotfix must be downloaded and installed. For more information, see Microsoft Knowledge Base article 941282.<br />Playlists<br />WMP Sharing supports the playlist formats shown in Table 5.<br />Table 5. Supported Playlist Formats<br />Format File extensionMIME typeWindows Media Playlist.wpl, .asxn/aM3U.m3un/a<br />A Windows Media Playlist file can appear as a subcontainer under the Playlist container in each of the top-level nodes. A M3U playlist file appears as a subcontainer under the MusicPlaylist container, as well as under the PlaylistsAll Playlists container. Each playlist subcontainer contains the individual items that are associated with the corresponding playlist file and are exposed as UPnP objects by WMP Sharing.<br />Additional Formats<br />Format support in WMP is extensible. Media formats such as MPEG-4, H.264, or RAW, for example, can be added to WMP by installing the appropriate codec and creating the appropriate registry keys on the system running WMP. Formats that are supported and playable/viewable in WMP are also supported by WMP Sharing. For more information, refer to “Resources” at the end of this paper.<br />As an example, for WMP Sharing to expose RAW format images, the codec that is appropriate to the RAW format that the particular camera or camera manufacturer uses must be installed on the Windows Vista system. Although RAW formats may be exposed under the general “image/dcraw” MIME type, the MIME type (and associated file extension) that are specific to each RAW format codec must also be provided. Table 6 provides examples of current RAW formats for which Windows Vista codecs are available.<br />Table 6. Available RAW Formats for Windows Vista<br />RAW format File extensionMIME typeNikonSonySonyOlympusCanon.nef.sr2.srf.orf.cr2image/x-nikon-nefimage/x-sony-sr2image/x-sony-srfimage/x-olympus-orfimage/x-canon-cr2 <br />Supported Streaming Protocols<br />WMP Sharing on Windows Vista supports HTTP and RTSP/RTP protocols for delivering content to devices. WMP Sharing on Windows XP supports streaming only via HTTP.<br />PlaysForSure Network Devices<br />The PlaysForSure for Network Devices program is for manufacturers that want to create network audio and video devices that interoperate with WMP and PlaysForSure services, delivering premium content to end users.<br />PlaysForSure defines a set of requirements that provide a baseline-level of functionality for a network device in terms of design, components, and functionality. Compliance with PlaysForSure requirements, such as using only certified Windows Media audio/Windows Media video (WMA/WMV) decoders, supporting Windows Media DRM for Network Devices and implementing UPnP technologies, ensures a significant level of interoperability with WMP Sharing.<br />Several updates have been made in the version 2 PlaysForSure Requirements for Network Devices, including the addition of Digital Living Network Alliance (DLNA) conformance, expansion of performance requirements, addition of high-definition video requirements, provision of more stringent UPnP eventing, and alignment with the Media Center Extender program.<br />The PlaysForSure Requirements for Network Devices are divided into several major categories, including DLNA conformance, network connectivity, and discovery, device description, authorization and registration, user interface, and content playback. These requirements are verified by the PlaysForSure for Network Devices Test Kit.<br />The PlaysForSure for Network Devices program does not require a network device to be certified as DLNA Digital Media Player (DMP). However, DLNA 1.0 requirements that are mandatory for a DLNA DMP, as well as several “optional” DMP requirements, are mandatory requirements for the PlaysForSure program.<br />For network device manufacturers, participation in the PlaysForSure program provides access to the Certified for Windows Vista logo. Network devices certifying under the PlaysForSure 2.x requirements are eligible to use the Certified for Windows Vista logo.<br />For more information of PlaysForSure and the Certified for Windows Vista logo, see “Resources” at the end of this paper.<br />Supported Versions of Microsoft Windows<br />The following list includes the Microsoft Windows operating systems on which WMP 11 Media Sharing is available:<br />Windows XP Service Pack 2 (requires download of WMP 11)<br />Windows Vista Home Basic<br />Windows Vista Home Premium<br />Windows Vista Ultimate<br />Windows Vista Business<br />Windows Vista Enterprise<br />Accessing the Media Sharing Feature in Windows Vista<br />There are three methods for accessing the Media Sharing feature from within Windows Vista:<br />WMP 11On the Library tab, click Media Sharing. Note that this access method is the only way to access Media Sharing feature on Windows XP.<br />Windows Photo GalleryOn the File menu, click Share with devices. This access point opens the Windows Media Player Media Sharing dialog box.<br />Network ExplorerRight-click the icon for a UPnP MediaRenderer device, as illustrated in Figure 2. From the pop-up menu, select the Open media sharing menu item. This access point opens the Windows Media Player Media Sharing dialog box.<br />Figure 2. Network Explorer Icons for a UPnP MediaRenderer and MediaServer, respectively<br />In Windows Vista, WMP Sharing starts automatically if a “private” network profile is selected when a user connects to a new network. Windows XP does not use the network profile concept; after WMP 11 is installed, WMP Sharing starts only after the user enables Media Sharing. If Windows Media Connect was installed on Windows XP, WMP Sharing is enabled for all users who had previously enabled sharing. <br />WMP Sharing and DLNA Devices<br />DLNA is an industry forum of over 200 member companies in the computing and consumer electronics industries, dedicated to enabling device interoperability in the home media ecosystem. Built upon UPnP and other technologies, the DLNA Interoperability Guidelines provide a framework for this interoperability.<br />Although WMP Sharing includes DLNA tags and resource elements for media that it exposes to other devices and its device description document on both Windows XP and Windows Vista advertises support for DLNA with the inclusion of the <dlna:X_DLNADOC> element, WMP 11 does not fully support DLNA Guidelines as a DLNA Digital Media Server (DMS) device.<br />Network Configuration and Addressing<br />WMP Sharing uses a standard IP network for communicating with devices.<br />Physical Layer<br />WMP Sharing operates over any IP-based network. For improved usability, it is recommended that all devices use an Ethernet (802.3) or Wi-Fi connection (802.11 b for music and pictures and 802.11 g/a for video) for device connectivity.<br />IP Addresses<br />WMP Sharing supports sharing content to devices with either an IPv4 or IPv6 IP address.<br />If the device has a private IP address, it must be within the ranges in Table 7.<br />Table 7. Private IP Address Ranges<br />IP address typeRangeClass C Private IP addresses192.168.0.0 – 192.168.255.255Class B Private IP addresses172.16.0.0 – 172.31.255.255Class A Private IP addresses10.0.0.0 – 10.255.255.255AutoIP addresses169.254.1.0 – 169.254.255.255<br />Network Security<br />To prevent the illegal distribution of content and invasion of consumers' privacy, WMP Sharing has the following network security restrictions.<br />Same Subnet<br />WMP Sharing shares content only to devices on the same subnet as the computer on which WMP Sharing is running. WMP Sharing compares the subnet of a device’s IP address to the subnet of the WMP Sharing computer. If they are not the same, the device is not allowed to browse, search, or play content.<br />Devices can check the source IP address of incoming Simple Service Discovery Protocol (SSDP) announcements from WMP Sharing to confirm that the device and the computer are on the same subnet and alert the user if they are not.<br />IP Packet TTL<br />WMP Sharing sets all outgoing packets with a time-to-live (TTL) of 1 (one) which means that IP packets can cross only one router.<br />Firewall Requirements<br />WMP Sharing requires several TCP and UDP firewall ports to be open on the host computer to share media content to devices. WMP places entries in the registry so that firewalls can determine whether to open or close the ports that WMP Sharing uses.<br />Windows Firewall running on Windows Vista provides “preplumbed” exceptions that allow all of the ports that are required for WMP Sharing. These exceptions are automatically enabled on selection of a “private” network profile and are disabled on selection of a “public” network profile. For Windows Firewall on Windows XP, exceptions for each of the ports required by WMP Sharing are installed with WMP 11 and are individually enabled when Media Sharing is enabled in WMP, For domain-joined systems, group policy may prevent a user from enabling the Windows Firewall exceptions that WMP Sharing requires. <br />For more details on where to find the firewall port registry settings, as well as a list of the required ports that must be opened, refer to “Resources” at the end of this paper.<br />Device Discovery and Description<br />Discovery is the process through which UPnP devices announce their presence and find other devices. This is accomplished through the use of SSDP.<br />WMP Sharing announces itself as a MediaServer device by using SSDP, sending out two SSDP NOTIFY messages every 15 minutes. WMP Sharing also responds to any properly formatted M-SEARCH action searching for a MediaServer. Sample SSDP NOTIFY messages are shown in Appendix 1.<br />In addition to other information, WMP Sharing provides a manufacturer name, model name, and model number in its device description. The model number for WMP Sharing differs, depending on the operating system. The model number for WMP Sharing in Windows Vista is 4.0, and in Windows XP the model number is 3.0. For both operating systems, the manufacturer name is Microsoft and the model name is Windows Media Player Sharing.<br />WMP Sharing attempts to discover compatible devices on the network by examining UPnP SSDP NOTIFY announcements or responses to MSEARCH actions. For a device to be discovered, it must implement the UPnP MediaRenderer:1 device class. Compatible devices include UPnP MediaRenderers and UPnP Control Points.<br />UPnP MediaRenderers are recognized by a combination of MAC address and Unique Device Name (UDN). When WMP Sharing discovers a MediaRenderer device, the MAC/UDN pair of the device is compared to a stored list. If the MAC/UDN pair is not in this list, WMP Sharing stores the MAC/UDN pair in the list and presents the device as a new device.<br />UPnP Control Points are recognized only by MAC address. When WMP Sharing discovers a Control Point device, the MAC address of the device is compared to a stored list. If the MAC address is not in this list, WMP Sharing stores the MAC address for this device in the list but does not announce the device as a new device.<br />MediaRenderers must a supply a Unicode transformation format (UTF)-encoded UDN containing a 128-bit value in hexadecimal form. The ABNF syntax for the UDN is defined as follows:<br />uuid-value = 8HEXDIG "-" 4HEXDIG "-" 4HEXDIG "-" 15HEXDIG<br />UDN = "uuid:" uuid-value<br />Example:<br />uuid:11223344-1122-1122-123456789ABCDEF<br />After a MediaRenderer has been authorized, the device is automatically unauthorized if either the MAC address or UDN change for that device.<br />WMP Sharing User Interface Elements<br />When WMP Sharing initially discovers a compatible device, the user receives a device notification in the Windows Vista or Windows XP user interface (unless the appropriate compatibility flag has been set to suppress notifications for the connecting device—refer to the section on compatibility flags later in this paper.)<br />Figure 3. WMP Sharing Device Notification in Windows Vista<br />In Windows XP, the user must enable WMP Sharing before device notifications are shown. If Windows Media Connect was present at the time of WMP 11 installation, device notifications are enabled when WMP is installed.<br />Clicking the device notification (or alternatively on the WMP Sharing tray icon) opens the Windows Media Player Library Sharing dialog box, which allows the user to immediately Allow or Deny that specific device.<br />Figure 4. Windows Media Player Library Sharing Dialog Box<br />Clicking Sharing settings on the Windows Media Player Library Sharing dialog box without choosing to Allow or Deny the device opens the Media Sharing dialog box shown in Figure 5. This is the same Media Sharing dialog box that is invoked via the WMP user interface or one of the other methods described earlier in this paper. The device is shown in the list of available devices with a yellow exclamation point icon, indicating that the user must take action on that device.<br />Figure 5. Windows Media Player Media Sharing Dialog Box<br />Device Description Document<br />The majority of the information appearing in the WMP Sharing user interface is acquired from a UPnP MediaRenderer’s device description document. Every device should host a device description document so that WMP Sharing can examine the device properties. For a device to be discovered by WMP Sharing, it must host its own device description document.<br />MediaRenderers that do not provide a description document can only be recognized by their MAC address and will be identified as “Unknown Device.”<br />Figure 6. Device Notification for an "Unknown Device"<br />Figure 7. Device Properties Page for an "Unknown Device"<br />WMP Sharing expects icons represented in the device description to be 48×48 pixels with a color depth of 24 bits. Acceptable formats for icons include ICO, BMP, GIF, JPEG, PNG, and TIFF. If a 48×48 pixel icon is unavailable, the icon closest in size is used. The icon URLs must have the same host as the device URL host. Devices with no icon are represented by a generic device icon.<br />Device Authorization<br />Device authorization is the process by which a user grants a device permission to receive shared content from the computer running WMP Sharing. Devices must first be “Allowed” access to WMP Sharing before retrieving or playing media items. The user interface for accessing device authorization is the Media Sharing dialog box in WMP 11, as shown in REF _Ref164581374 h Figure 5. For more information about device authorization, refer to the “Change settings for sharing media in Windows Media Player” topic in WMP 11 Help.<br />Windows Media DRM Authorization and Registration<br />The authorization process required by Windows Media DRM for Network Devices (also known as WMDRM-ND) is different from the authorization process described in the previous section. In the context of WMP Sharing, authorization is the procedure by which a network device is granted access to Windows Media DRM-protected content from WMP Sharing. Authorization must be completed before a device can perform registration and access Windows Media DRM-protected content.<br />Authorization and registration use the X_MS_MediaReceiverRegistrar:1 UPnP service, which is defined in Appendix 1 of the “Windows Media DRM for Network Devices Specification.” Details describing how a device uses and interacts with the service are found in the WMDRM-ND specification, which is available only to licensees of Windows Media DRM. Links to Windows Media DRM licensing information can be found in "Resources" at the end of this paper.<br />Accessing WMP Sharing<br />Media content to be exposed by WMP Sharing can be located by using either the UPnP Browse or Search actions. Understanding how WMP Sharing structures its containers, how query results may be sorted or filtered, what metadata may be available, and what other properties it exposes is paramount to providing a high-quality user experience.<br />Browsing<br />Browse allows a device to examine the hierarchy of content that WMP Sharing exposes. To provide the best user experience on devices using the browse action, it is useful for the device to be aware of the WMP container hierarchy.<br />Container Hierarchy<br />Figure 8 illustrates the container hierarchy used by WMP, including the “top-level” containers for Music, Video, Pictures and Playlists (plus the Root) and their respective subcontainers.<br />Figure 8. WMP Sharing Container Hierarchy<br />Tables 8 through 11 describe each of the containers depicted in Figure 8, including the container name and ID number, as well as a description of the container and container type.<br />Table 8. Top-Level Containers<br />Container nameIDChild typeDescriptionRoot0object.containerIs the root container of the entire container hierarchyMusic1object.containerContains all containers and items relating to audioVideo2object.containerContains all containers and items relating to videoPictures3object.containerContains all containers and items relating to picturesPlaylists12object.containerContains all containers and items relating to playlists<br />Table 9. Music Subcontainers<br />Subontainer nameIDChild typeDescriptionMusic/All Music4object.item.audioItemobject.item.audioItem.musicTrackContains all of the music items in the Music containerMusic/Genre5object.container.genre.musicGenreContains genre information for all music items that have genre metadataMusic/Artist6object.container.person.musicArtistContains artist names for all music items that have artist metadataMusic/Album7object.container.album.musicAlbumContains album titles for all music items that have album metadataMusic/PlaylistsFobject.container.playlistContainerContains playlists for all music itemsMusic/Folders14object.storageFolderMusic/Contributing Artists100object.container.person.musicArtistContains artist names for all music items that have contributing artist metadataMusic/Album Artist107object.container.person.musicArtistContains artist names for all music items that have album artist metadataMusic/Composer108object.container.person.musicArtistContains artist names for all music items that have composer metadataMusic/Rating101object.containerMusic/Rating/1 or more stars102object.containerContains music items rated with 1 or more starsMusic/Rating/2 or more stars103object.containerContains music items rated with 2 or more starsMusic/Rating/3 or more stars104object.containerContains music items rated with 3 or more starsMusic/Rating/4 or more stars104object.containerContains music items rated with 4 or more starsMusic/Rating/5 or more stars106object.containerContains music items rated with 5 or more stars<br />Table 10. Video Subcontainers<br />Subcontainer nameIDChild typeDescriptionVideo/All Video8object.item.videoItemContains all of the video items in the Video containerVideo/Genre9object.container.genre.videoGenreContains genre information for all video items that have genre metadataVideo/ActorAobject.container.album.videoAlbumContains actor names for all video items that have actor metadataVideo/SeriesEobject.container.person.movieActorContains album titles for all video items that have album metadataVideo/Playlists10object.container.playlistContainerContains playlists for all video itemsVideo/Folders15object.storageFolderVideo/Rating200object.containerVideo/Rating/1 or more stars201object.containerContains video items rated with 1 or more starsVideo/Rating/2 or more stars202object.containerContains video items rated with 2 or more starsVideo/Rating/3 or more stars203object.containerContains video items rated with 3 or more starsVideo/Rating/4 or more stars204object.containerContains video items rated with 4 or more starsVideo/Rating/5 or more stars205object.containerContains video items rated with 5 or more stars<br />Table 11. Picture Subcontainers<br />Subcontainer nameIDChild typeDescriptionPictures/All PicturesBobject.item.imageItem.photoobject.item.imageItemContains all of the image items in the Pictures containerPictures/Date TakenCobject.container.album.photoAlbumContains the dates that pictures were taken for all image items that have date-taken metadataPictures/AlbumsDobject.container.album.photoAlbumContains album titles for all image items that have album metadataPictures/KeywordD2object.container.album.photoAlbumContains album titles for all image items that have keyword metadataPictures/Playlists11object.container.playlistContainerContains playlists for all picture itemsPictures/Folders16object.storageFolderPictures/Rating300object.containerPictures/Rating/1 or more stars301object.containerContains image items rated with 1 or more starsPictures/Rating/2 or more stars302object.containerContains image items rated with 2 or more starsPictures/Rating/3 or more stars303object.containerContains image items rated with 3 or more starsPictures/Rating/4 or more stars304object.containerContains image items rated with 4 or more starsPictures/Rating/5 or more stars305object.containerContains image items rated with 5 or more starsPictures/Rating/Unrated306object.containerContains image items that have not been star rated<br />Table 12. Playlist Subcontainers<br />Subcontainer nameIDChild typeDescriptionPlaylists/All Playlists13object.container.playlistContainerContains playlists for all itemsPlaylists/Folders17object.storageFolder<br />Searching<br />WMP Sharing supports the optional UPnP Search action. Using search instead of browse can be used to filter out unwanted content. The use of the search action can also provide a more robust user interface and user experience.<br />If metadata is not present for the file on the computer, the value for these properties are treated as NULL.<br />Some searchable metadata in WMP Sharing does not support UPnP-required operators. In addition, “compound” searches, such as the following example, are not supported:<br />upnp:class derivedfrom "object.item.videoItem" or dc:creator = “Bill"<br />As a result, WMP Sharing is not fully UPnP-compliant with respect to search. Devices supporting search parameters outside the scope of WMP Sharing may use the compatibility flags, described later in this paper, to disable search.<br />The list of searchable and nonsearchable attributes are presented in Tables 13 and 14. The supported operators for searchable attributes are also presented. The operator “exists” is supported for all searchable attributes. If “all” is indicated, supported operators include the following:<br />exists, < , < = , > = , > , = , !=, contains, derivedfrom, doesNotContain<br />Table 13. Searchable Attributes<br />MetadataSupported operators@id=. !=@refIDexists@restricted=, !=, containsdc:creatoralldc:date< , < = , > = , > , = , !=dc:descriptionalldc:languagealldc:publisheralldc:titleallmicrosoft:artistAlbumArtistallmicrosoft:artistConductorallmicrosoft:artistPerformerallmicrosoft:authorComposerallmicrosoft:authorOriginalLyricistallmicrosoft:authorWriterallmicrosoft:serviceProviderallmicrosoft:userEffectiveRating< , < = , > = , > , = , !=microsoft:userEffectiveRatingInStars< , < = , > = , > , = , !=microsoft:userRating< , < = , > = , > , = , !=microsoft:userRatingInStars< , < = , > = , > , = , !=res@bitrate< , < = , > = , > , = , !=res@duration< , < = , > = , > , = , !=res@protection=, containsres@protocolInfo=, contains, !=, doesNotContainres@size< , < = , > = , > , = , !=upnp:actorallupnp:albumallupnp:artist=, containsupnp:artist@role=, containsupnp:author=, containsupnp:author@role=, containsupnp:class=, derivedfromupnp:directorallupnp:genreallupnp:originalTrackNumberallupnp:producerallupnp:ratingallupnp:tocallupnp:userAnnotationall<br />Table 14. Nonsearchable Attributes<br />Nonsearchable attributes@childCount@parentID@searchabledescdesc@iddesc@namespacedesc@typemicrosoft:sourceURLmicrosoft:yearresres@bitsPerSampleres@colorDepthres@microsoft:codecres@nrAudioChannelsres@resolutionres@sampleFrequencyupnp:albumArtURIupnp:albumArtURI@dlna:profileIDupnp:searchClassupnp:searchClass@includeDerivedupnp:writeStatus<br />Sorting<br />WMP Sharing supports sorting containers and content items based on many metadata attributes. The list of sortable and nonsortable attributes are presented in Tables 15 and 16.<br />Note that “top-level” containers may not be sorted.<br />Table 15 Sortable Attributes<br />Sortable attributesdc:creatordc:datedc:descriptiondc:languagedc:publisherdc:titlemicrosoft:artistAlbumArtistmicrosoft:artistConductormicrosoft:artistPerformermicrosoft:authorComposermicrosoft:authorOriginalLyricistmicrosoft:authorWritermicrosoft:serviceProvidermicrosoft:sourceURLmicrosoft:userEffectiveRatingmicrosoft:userEffectiveRatingInStarsmicrosoft:userRatingmicrosoft:userRatingInStarsmicrosoft:yearres@bitrateres@durationres@sizeupnp:actorupnp:albumupnp:directorupnp:genreupnp:originalTrackNumberupnp:producerupnp:ratingupnp:tocupnp:userAnnotation<br />Table 16. Nonsortable Attributes<br />Nonsortable attributes@childCount@id@parentID@refID@restricted@searchabledescdesc@iddesc@namespacedesc@typeresres@bitsPerSampleres@colorDepthres@microsoft:codecres@nrAudioChannelsres@protectionres@protocolInfores@resolutionres@sampleFrequencyupnp:albumArtURIupnp:albumArtURI@dlna:profileIDupnp:artistupnp:artist@roleupnp:authorupnp:author@roleupnp:classupnp:searchClassupnp:searchClass@includeDerivedupnp:writeStatus<br />Filtering<br />WMP Sharing supports the filtering of containers and content.<br />Containers can be filtered through the use of the upnp:searchClass tag. A searchClass tag is provided for each UPnP object that can be found under a container. Devices can then use this information to determine whether to display a particular container.<br />Several methods can be employed to filter specific content. The device can inspect the file extension in the URL or the res@protocolInfo attribute and exclude content that represents unsupported file types.<br />Control points and MediaRenderers can also use the GetProtocolInfo action to inquire about the format and streaming capabilities of WMP Sharing. This action enables devices to filter out content that is supported by WMP Sharing, but not supported by the device.<br />When GetProtocolInfo is invoked, WMP Sharing (minimally) returns the following in a comma-separated list:<br />http-get:*:video/mpeg:*<br />http-get:*:audio/mpeg:*<br />http-get:*:audio/wav:*<br />http-get:*:audio/x-ms-wma*<br />http-get:*:video/x-ms-wmv:*<br />http-get:*:video/avi:*<br />http-get:*:audio/L16:*<br />http-get:*:audio/mp3:*<br />http-get:*image/jpeg:*<br />http-get:*image/png:*<br />String Lengths<br />The following fields should be 256 Unicode characters or less:<br />All upnp:class fields<br />All “recommended metadata” fields: dc:creator, upnp:album, upnp:genre, dc:date, upnp:channelName, and upnp:channelNR (regional)<br />All resource (<res>) attributes except uniform resource identifiers (URIs)<br />Object ID<br />The following fields should be 1024 Unicode characters or less:<br />All URIs<br />All fields not previously specified<br />Note that after conversion from Unicode to UTF-8, the number of bytes required to represent a string may be higher than the number of characters in the string. Device manufacturers should set buffer sizes accordingly.<br />Microsoft Extensions to UPnP Metadata<br />Microsoft Extensions to UPnP Metadata allow WMP Sharing to expose several Microsoft-defined media content properties. These properties are generally not expressible or are difficult to express with existing UPnP metadata attributes. To provide the desired query results with existing attributes requires additional processing capabilities on the device. By using these additional Microsoft-defined properties, the device is relieved of the “heavy-lifting” in generating similar results and can thus provide a richer media browsing experience to their users.<br />WMP Sharing supports searching and sorting on containers and content items based on these Microsoft-defined properties as indicated in the following sections, as well as in the corresponding "Searching" and "Sorting" sections earlier in this paper.<br />Although WMP Sharing supports all of the Microsoft Extensions to UPnP Metadata, these attributes are provided only when the corresponding information is available for a given media item.<br />For each attribute, a table is presented that contains the following information:<br />Attribute name as exposed by WMP Sharing<br />Corresponding attribute in the WMP database provider<br />Search, sort, and filter capability in WMP Sharing<br />Data type and valid range<br />An XML usage example is also provided for each attribute, if appropriate. In Windows Vista, WMP Sharing double-escapes the XML tags inside the descriptor (<desc>) element. For example, “<microsoft:artistAlbumArtist>” appears as “&lt;microsoft:artistAlbumArtist&gt;” in the XML response.<br />For a link to the complete list of metadata attributes used by WMP 11, see "Resources" at the end of this paper.<br />Artist Attributes<br />This group of attributes supports various roles that one or more artists may have in multimedia content: album artist, performer (also known as a contributing artist), and conductor. Support for the Artist attributes can allow devices to provide results for queries such as “browse by performer, then find albums by the selected performer.”<br />The following three tables list properties of the Artist attributes.<br />AttributeartistAlbumArtistWMP AttributeDisplayArtistSearchableYesSortableYesFilterableYesTypestringValid Range0 to 256 characters, inclusive<br />AttributeartistPerformerWMP AttributeAuthorSearchableYesSortableYesFilterableYesTypestringValid Range0 to 256 characters, inclusive<br />AttributeartistConductorWMP AttributeWM/ConductorSearchableYesSortableYesFilterableYesTypestringValid Range0 to 256 characters, inclusive<br />The following is an example of the usage of the Artist attributes in an XML response:<br /><desc id="Artist" xmlns:microsoft="urn:schemas-microsoft-com:metadata-1-0/WMPNSS/"><br /> <microsoft:artistAlbumArtist>ABC</microsoft:artistAlbumArtist><br /> <microsoft:artistPerformer>DEF</microsoft:artistPerformer><br /> <microsoft:artistConductor>GHI</microsoft:artistConductor><br /></desc><br />Author Attributes<br />This group of attributes supports various roles that one or more authors may have in multimedia content: Composer and Writer. Support for the Author attributes can allow devices to provide results for queries such as “browse by composer, then find genres for the selected composer.”<br />The following two tables list properties of the Author attributes.<br />AttributeauthorComposerWMP AttributeWM/ComposerSearchableYesSortableYesFilterableYesTypestringValid Range0 to 256 characters, inclusive<br />AttributeauthorWriterWMP AttributeWM/WriterSearchableYesSortableYesFilterableYesTypestringValid Range0 to 256 characters, inclusive<br />Note that assigning a value to “Lyricist” in the WMP Advanced Tag Editor is shown as “Writer” in the WMP library and is also exposed by WMP Sharing through the authorWriter attribute.<br />The following is an example of the usage of the Author attributes in an XML response:<br /><desc id="Author" xmlns:microsoft="urn:schemas-microsoft-com:metadata-1-0/WMPNSS/"><br /> <microsoft:authorComposer>JKL</microsoft:authorComposer><br /> <microsoft:authorWriter>MNP</microsoft:authorWriter><br /></desc><br />Ratings Attributes<br />The Ratings attributes support metadata supplied from both the user and from the metadata provider. These attributes allow devices to provide “prioritized” or “scoped” results to end users based on their preferences. This enables a user, for example, to choose browsing only music content that has been rated at “5 or more stars.”<br />There are four Ratings-related attributes. UserRating and UserEffectiveRating represent the user rating (if present) and an automatic rating, respectively. If UserRating is set, the automatic rating is set to the UserRating. If UserRating is not set, the automatic rating is the rating set by the metadata provider. In the absence of a metadata provider rating, the automatic rating is derived from playcount and usage data.<br />UserRatingInStars and UserEffectiveRatingInStars are runtime-generated properties based on UserRating and UserEffectiveRating, respectively. The values for UserRatingInStars and UserEffectiveRatingInStars are generated by remapping the values from the corresponding base attributes into a logical number of stars.<br />The following four tables list properties of the Ratings attributes:<br />AttributeuserRatingWMP AttributeUserRatingSearchableYesSortableYesFilterableYesTypeUnsigned integerValid Range0 - 99<br />AttributeuserEffectiveRatingWMP AttributeUserEffectiveRatingSearchableYesSortableYesFilterableYesTypeUnsigned integerValid Range0 - 99<br />AttributeuserRatingInStarsWMP AttributeUserRatingStarsSearchableYesSortableYesFilterableYesTypeUnsigned integerValid Range0 - 5<br />AttributeuserEffectiveRatingInStarsWMP AttributeUserEffectiveRatingStarsSearchableYesSortableYesFilterableYesTypeUnsigned integerValid Range0 - 5<br />The following is an example of the usage of the Ratings attributes in an XML response:<br /><desc id="UserRating" xmlns:microsoft="urn:schemas-microsoft-com:metadata-1-0/WMPNSS/"><br /> <microsoft:userRating>50</microsoft:userRating><br /> <microsoft:userEffectiveRating>60 </microsoft:userEffectiveRating><br /> <microsoft:userRatingInStars>3</microsoft:userRatingInStars><br /> <microsoft:userEffectiveRatingInStars>3 </microsoft:userEffectiveRatingInStars><br /></desc><br />Service Provider Attribute<br />The Service Provider attribute supports the WM/ContentDistributor metadata in WMP and represents the name of the distributor of the media item. The Service Provider attribute allows devices to return results categorized by the entity that provided the content.<br />The following table lists properties of the Service Provider attribute:<br />AttributeserviceProviderWMP AttributeWM/ContentDistributorSearchableYesSortableYesFilterableYesTypestringValid Range0 to 256 characters, inclusive<br />The following is an example of the usage of the Service Provider attribute in an XML response:<br /><desc id="ServiceProvider" xmlns:microsoft="urn:schemas-microsoft-com:metadata-1-0/WMPNSS/"><br /> <microsoft:serviceProvider>Windows Vista </microsoft:serviceProvider><br /></desc><br />Source URL Attribute<br />The Source URL attribute supports the grouping of results by address. This enables a device to group media files by parent folder. As an example, the device can return results enumerating all of the pictures in the “January Ski Trip to Canada” folder.<br />Note The use of @ParentID can provide results similar to Source URL, but only for a container hierarchy that replicates the filesystem hierarchy.<br />In consideration of privacy and security concerns, the value for Source URL is not returned by WMP Sharing. Source URL is used only for sorting queries sent to the WMP database provider.<br />The following table lists properties of the Source URL attribute:<br />AttributesourceURLWMP AttributeSourceURLSearchableNoSortableYesFilterableNoTypestringValid Range0 to 256 characters, inclusive<br />Year Attribute<br />The Year attribute allows organization of multimedia content based solely on year, whereas the commonly-used dc:date UPnP attribute provides the whole date. For example, use of the Year attribute enables a device to more easily return results for all of the pictures taken in “2006.”<br />The following table lists properties of the Year attribute:<br />AttributeyearWMP AttributeDefaultDateSearchableNoSortableYesFilterableYesTypeintegerValid Range<br />The following is an example of the usage of the Year attribute in an XML response (in Windows Vista):<br /><desc id="year" xmlns:microsoft="urn:schemas-microsoft-com:metadata-1-0/WMPNSS/"><br /> &lt;microsoft:year&gt;2007&lt;/microsoft:year&gt;<br /></desc><br />Retrieving Album Art and Thumbnail Images<br />WMP Sharing can provide album art images for music and video content, as well as thumbnail images for picture content. By having WMP Sharing supply the thumbnails, the device is relieved of the processing requirements that are necessary to generate thumbnail images on the fly.<br />To retrieve album art for music items, the device must complete Windows Media DRM registration and validation by using the X_MS_MediaReceiverRegistrar service as described earlier in this paper. There are no Windows Media DRM requirements to retrieve thumbnails for picture or video content.<br />WMP Sharing provides a thumbnail URI for all images that support transcoding. The most direct method for thumbnail retrieval is for the device to use the resource (<res>) element with the image of the desired format and resolution. For every JPEG and YUV image, WMP Sharing exposes at least one “thumbnail version” of the image with a resolution less than or equal to 160x160 pixels.<br />The other two specific methods for retrieving thumbnail images from WMP Sharing are described in the following sections.<br />AlbumArtURI<br />WMP stores a JPEG-format thumbnail in its cache for each item in its library. WMP Sharing exposes these thumbnails through the <upnp:albumArtURI> attribute. Devices can use the URI provided by this attribute to retrieve the thumbnail image.<br />Because thumbnails retrieved by using the <upnp:albumArtURI> attribute come from the WMP cache, this method tends to provide faster results to the device. However, if the device calling this method requires thumbnails in a format other than JPEG, the alternate method may be more suitable.<br />Parameterized URLs<br />A parameterized URL can be used by a device to specify the desired values for the thumbnail image. The parameterized thumbnail URL is expressed as the root item URL appended with “?format=z,width=x,height=y”, where z is either JPEG or YUV420 and x, y are integers representing the width and height for the desired thumbnail, respectively, in pixels.<br />The following example shows the use of a parameterized URL to retrieve a thumbnail:<br />http://192.168.1.1:10243/WMPNSSv4/5678/pic1.jpg?format=JPEG, width=64,height=48<br />Because thumbnails retrieved by using a parameterized URL must be transcoded from the original image, this method tends to provide slower results to the device than AlbumArtURI. However, this method provides additional flexibility in that the format and size of the thumbnails can be specified in advance.<br />Format Transcoding<br />As discussed earlier in this paper, WMP Sharing uses the Media Delivery Engine to deliver transcoded media content—content converted from one format to another—to the requesting device.<br />When WMP Sharing exposes a media file to a device, it provides multiple resource elements for the content. One resource element specifies an URL for the content in its original format. The subsequent resource elements each specify an URL for a transcoded version of the content.<br />For an example illustrating multiple resource elements for transcoded content, refer to Appendix 2.<br />Table 17 indicates transcoded formats exposed by WMP Sharing.<br />Table 17. Supported Transcoding Formats by Content Type<br />Content typeStarting format to transcoded formatAudioWMA to PCMMP3 to PCMPicturesJPG to YUVPNG to JPGPNG to YUVVideoNo transcoding available<br />Support for “Trick Modes” and Seeking Using HTTP<br /> “Seeking” is a feature that gives the user the ability to jump from one point in the stream to another at the time of rendering. “Trick mode” features include fast-forward and rewind operations and can be implemented by the server or the client. Server-based trick modes require stream modifications performed by the server. Client-side trick modes are performed by devices retrieving the entire stream or segments of the stream for processing. <br />For clear content, WMP Sharing supports seeking using a conventional HTTP Range request as defined in section 14.35 of the HTTP 1.1 specification. It also supports the DLNA-defined HTTP extension header “TimeSeekRange.DLNA.org.” WMP Sharing, however, does not support both methods for a single content item. The device must verify the appropriate seek method before attempting to seek within the content item. For content streamed by using Windows Media DRM for Network Devices, seeking requires the use of the “TimeSeekRange.DLNA.org” header.<br />WMP Sharing does not support server-side trick modes over HTTP. For clear or protected content that is retrieved from WMP Sharing in whole or in part on the device, device manufacturers may implement client-side trick modes at their discretion. For example, a device could implement support for trick modes by sending multiple Range header or multiple TimeSeekRange.dlna.org header requests in accordance with the preceding paragraph.<br />Identifying Codecs<br />The “res@microsoft:codec” attribute contains a globally unique identifier (GUID) that represents the codec used for the associated media file. For audio content, the GUID represents the audio codec used; for video content, it represents the video codec used. In the case of content that contains both audio and video, the GUID represents only the video codec used. This attribute is presented within a resource (<res>) element by using the following ABNF syntax:<br />guid-value = "{" 8HEXDIG "-" 4HEXDIG "-" 4HEXDIG "-"<br /> 4HEXDIG "-" 12HEXDIG "}"<br />MsftCodec = "microsoft:codec=" %x22 guid-value %x22<br />Example:<br />microsoft:codec="{11223344-1122-1122-1122-AABBCCDDEEFF}"<br />This attribute must also contain the following namespace definition:<br />xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"<br />The res@microsoft:codec attribute is not searchable or sortable; however, this property is returned with Browse results if explicitly requested in the Filter list or if “*” is used for the Filter parameter.<br />The following example indicates that the audio in the associated media file was encoded with the Windows Media Audio 9 Lossless codec:<br /><res size="1472902" duration="0:03:59.465" bitrate="6003" protocolInfo="http-get:*:audio/x-ms-wma:*" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00000163-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ... </res><br />Links to the list of GUID values as well as the corresponding descriptions of the various media types can be found in "Resources" at the end of this paper.<br />Setting Compatibility Flags<br />Compatibility flags are used to define specific behavior for a specific device to enhance compatibility with WMP Sharing. The following two types of compatibility flags may be stored in the registry for any device.<br />User Compatibility Flags<br />The User Compatibility flags are, accordingly, set by a user or by an application. This category of compatibility flags is given highest priority in defining behavior for a device:<br />Registry Path = HKLMSoftwareMicrosoftWindows Media Player NSS3.0Devices<DeviceMACAddress>CompatFlags<br />Type = REG_DWORD<br />Device Compatibility Flags<br />Device Compatibility flags are provided by a device via its device description document. To do so, the device must specify the Microsoft-defined microsoft:X_DeviceCaps attribute. This category of compatibility flags are prioritized after user compatibility flags:<br />Registry Path = HKLMSoftwareMicrosoftWindows Media Player NSS3.0Devices<DeviceMACAddress>DeviceCompatFlags<br />Type = REG_DWORD<br />Compatibility Flag Values and Behaviors<br />The following are the value and description of each individual compatibility flag:<br />WMC_COMPAT_EXCLUDE_HTTP<br />Value = 0x0001<br />Exclude HTTP URLs. If set with WMC_COMPAT_EXCLUDE_RTSP, then HTTP URLs are allowed.<br />WMC_COMPAT_EXCLUDE_RTSP<br />Value = 0x0002<br />Exclude RSTP URLs.<br />WMC_COMPAT_EXCLUDE_DLNA<br />Value= 0x0004<br />Exclude all DLNA tags.<br />WMC_COMPAT_EXCLUDE_DLNA_1_5<br />Value = 0x0008<br />Exclude DLNA 1.5 tags, but allow DLNA 1.0 tags.<br />WMC_COMPAT_EXCLUDE_PCMPARAMS<br />Value= 0x0010<br />Exclude rate and channels information from the protocolInfo res element for audio/L16 and audio/L8 MIME types.<br />WMC_COMPAT_EXCLUDE_WMDRMND<br />Value = 0x0020<br />Do not generate URLs for WMDRM protected media.<br />WMC_COMPAT_INCLUDE_RTSP_FOR_VIDEO<br />Value = 0x0040<br />Include RTSP URLs for video even if WMC_COMPAT_EXCLUDE_RTSP or WMC_COMPAT_EXCLUDE_DLNA_1_5 is set.<br />WMC_COMPAT_EXCLUDE_WMALOSSLESS_NONTRANSCODED<br />Value = 0x0080<br />Do not generate URLs for nontranscoded WMA Lossless content.<br />WMC_COMPAT_EXCLUDE_SEARCH<br />Value = 0x0100<br />Return no search capabilities (empty string) to this device.<br />WMC_COMPAT_DO_NOT_POP_TOAST<br />Value = 0x0200<br />Do not display device notifications (also called “toast”) for this device.<br />WMC_COMPAT_PLAYLIST_FAKECHILDCOUNT<br />Value = 0x1000<br />Return "1" for the child count of playlists because calculating the "real" child count for playlist containers can reduce performance.<br />X_DeviceCaps Example<br />Device compatibility flags are specified in a device description document by using the following format:<br /><device><br /> <UDN>uuid:00000000-1111-2222-3333-444444444444</UDN><br /> <friendlyName>Sample Renderer</friendlyName><br /> <deviceType>urn:schemas-upnp-org:device:MediaRenderer:1 </deviceType><br /> <manufacturer>Microsoft</manufacturer><br /> ...<br /> <microsoft:X_DeviceCaps xmlns:microsoft="urn:schemas- microsoft-com:WMPNSS-1-0"/>94</microsoft:X_DeviceCaps><br /></device><br />Note that usage of microsoft:X_DeviceCaps requires definition of the Microsoft namespace. The value for microsoft:X_DeviceCaps is given in decimal and represents a bitwise OR combination of the individual compatibility flag values described earlier in the paper. In the preceding example, the value of “94” for microsoft:X_DeviceCaps indicates the following compatibility flags:<br />WMC_COMPAT_EXCLUDE_RTSP<br />WMC_COMPAT_EXCLUDE_DLNA<br />WMC_COMPAT_EXCLUDE_DLNA_1_5<br />WMC_COMPAT_EXCLUDE_PCMPARAMS<br />WMC_COMPAT_INCLUDE_RTSP_FOR_VIDEO<br />Streaming DVR-MS files<br />Microsoft Digital Video Recording (DVR-MS) files are generally used to carry audio and video content as well as closed-captions or subtitles. The DVR-MS file format consists of one or more MPEG-2 Elementary Streams (ES) contained within an Advanced Systems Format (ASF) file. Note that these are not MPEG-2 Packetized Elementary Streams (PES). <br />Proper streaming of DVR-MS content requires knowledge of the presentation timestamps in the DVR-MS files.<br />Presentation Timestamp Values<br />The content carried in DVR-MS files is timestamped with presentation timestamps that are stored in ASF extensible attributes.<br />The streams carried in the DVR-MS file should be treated autonomously. Each stream may be stored in a staggered manner relative to the other streams. The presentation timestamps should be used for the same reason they exist in MPEG-2 systems: for audio-video synchronization purposes.<br />Within a DVR-MS file, the presentation timestamps are not guaranteed to be normalized or “close” to 0; they typically begin at a value that is offset from 0. If playback requires normalized presentation timestamps, the smallest presentation timestamp in all the streams should be discovered at the start of the content. That single presentation timestamp value should be used to normalize the presentation timestamps in all the streams. It is important to preserve the intra-stream presentation timestamp stagger within the file.<br />Audio and Video Streams<br />Timestamp values for audio and video are derived directly from the original Packetized Elementary Stream presentation timestamp (PES PTS) values.<br />A PES PTS differs from a DVR-MS presentation timestamp in the following ways:<br />1. PES PTS values are expressed using a 90khz frequency, whereas DVR-MS presentation timestamp values are expressed using a 10mhz frequency.<br />2. 90khz PES PTS values wrap approximately every 26 hours, whereas DVR-MS presentation timestamps do not wrap.<br />The presence or absence of the presentation timestamps follows the same rules as described in the MPEG-2 systems specification. Specifically, not all picture frames require a timestamp, and timestamps must not occur less frequently than every 700 milliseconds.<br />If video B-frames are present, the video presentation timestamps may jitter forward and backward rather than monotonically increase relative to each other. Note that the first video sample in a DVR-MS file is not guaranteed to be a sequence header or an I-frame.<br />Other Types of Streams<br />DVR-MS files usually also contain non-audio/video streams such as closed caption byte pairs, or teletext. These streams are also timestamped with presentation timestamps.<br />Whereas video timestamps can jitter forward and backward, samples with captions are stored in display order rather than in decode order. As such, the presentation timestamps on these samples will monotonically increase relative to each other.<br />ASF Extensible Attribute Detail<br />This section describes the ASF extensible attribute that is used to store the presentation timestamp of the sample.<br />Identifier<br />The extensible attribute identifier is the following GUID:<br />{FD3CC02A-06DB-4cfa-801C-7212D38745E4}<br />Payload Data Structure<br />The payload has the following data structure. All field values are stored in little-endian byte order. Non-reserved fields are described below.<br />typedef struct {<br /> DWORD dwVersion;<br /> REFERENCE_TIME rtStart ;<br /> REFERENCE_TIME rtStop ;<br /> DWORD dwReserved1 ;<br /> DWORD dwReserved2 ;<br /> DWORD dwFlags;<br /> DWORD dwReserved3;<br /> DWORD dwReserved4<br /> DWORD dwReserved5;<br />} ;<br />Field Descriptions<br />.dwVersion<br />This field always has value 1.<br />.rtStart<br />If this field is set, it has a value other than -1. If it is not set, the sample has no start time.<br />.rtStop<br />If this field is set, it has a value other than -1. If it is not set, the sample has no stop time.<br />.dwFlags<br />This field has the first bit set if the sample is a synchronization point. See the DirectShow documentation on MSDN for the definition of a synchronization point.<br />This field has the second bit set if the sample is a discontinuity from the previous sample in the same stream.<br />Errata<br />This section describes issues with WMP Sharing that may affect interoperability with network devices.<br />WMP Sharing may respond with an incorrect “WMDRMNDStatus” when a device registration has expired and the device must be re-registered. WMP Sharing should respond with “107 Must Register,” but may respond with “104 Transmitter Failure.” The associated error code (as shown in the system event log) for the “104 Transmitter Failure” error message is 0xc00d1910. If error code 0xc00d27e2 is observed with a “104 Transmitter Failure,” the correct error should be “107 Must Register.”<br />The Playlists container (ID 12) and its subcontainers are not searchable.<br />During search operations, WMP Sharing may return results that should not be included in the searchClass for certain containers:<br />ContainerObject Type Returned5object.item.audioItem.musicTrack6object.item.audioItem.musicTrack100object.item.audioItem.musicTrack107object.item.audioItem.musicTrack108object.item.audioItem.musicTrack7object.item.audioItem.musicTrack9object.item.videoItemAobject.item.videoItemEobject.item.videoItemCobject.item.imageItem.photoDobject.item.imageItem.photo<br />Resources<br />Microsoft Resources<br />Windows Media<br />A Technical Overview of Windows Media DRM 10 for Devices<br />http://go.microsoft.com/fwlink/?LinkId=28570<br />Windows Media Player 11 – Media Sharing Feature<br />http://www.microsoft.com/windows/windowsmedia/devices/athome/default.aspx<br />Windows Media Licensing Program<br />http://www.microsoft.com/windows/windowsmedia/licensing/default.mspx<br />Windows Media Player 11 SDK on MSDN<br />http://msdn2.microsoft.com/library/<br />Attribute Reference<br />File Name Extension Registry Settings<br />Firewall Port Registry Settings<br />IWMPLibrarySharingServices Interface<br />Media Type Identifiers<br />Media Types<br />PlaysForSure<br />PlaysForSure 2.x Resources and Test Kits<br />http://www.playsforsure.com/product/specifications/default.aspx<br />Windows Vista<br />Certified for Windows Vista Logo<br />http://www.windowsvista.com/lookforthelogo<br />Advanced Systems Format Specification<br />http://download.microsoft.com/download/7/9/0/790fecaa-f64a-4a5e-a430-0bccdab3f1b 4/ASF_Specification.doc <br />Industry Resources<br />UPnP MediaServer and MediaRenderer-related specifications<br /> http://www.upnp.org/standardizeddcps/mediaserver.asp<br />Digital Living Network Alliance (DLNA) Guidelines<br />http://www.dlna.org/en/consumer/learn/guidelines/<br />RFCs<br />RFC 4234: “Augmented BNF for Syntax Specifications: ABNF,” October 2005<br />http://go.microsoft.com/?linkid=5803258<br />Appendixes<br />Appendix 1. Sample SSDP Announcement Messages<br />The following examples illustrate sample NOTIFY messages sent by WMP Sharing. Depending on the computer hosting WMP Sharing, some fields may have different values:<br />NOTIFY * HTTP/1.1rn<br />Host:239.255.255.250:1900rn<br />NT:urn:schemas-upnp-org:service:ConnectionManager:1rn<br />NTS:ssdp:alivern<br />Location:http://192.168.1.100:2869/upnphost/udhisapi.dll?content=uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6crns<br />USN:uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6c::urn:schemas-upnp-org:service:ConnectionManager:1rn<br />Cache-Control:max-age=1800rn<br />Server:Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0rn<br />rn<br />NOTIFY * HTTP/1.1rn<br />Host:239.255.255.250:1900rn<br />NT:urn:schemas-upnp-org:service:ContentDirectory:1rn<br />NTS:ssdp:alivern Location:http://192.168.1.100:2869/upnphost/udhisapi.dll?content=uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6crn<br />USN:uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6c::urn:schemas-upnp-org:service:ContentDirectory:1rn<br />Cache-Control:max-age=1800rn<br />Server:Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0rn<br />rn<br />NOTIFY * HTTP/1.1rn<br />Host:239.255.255.250:1900rn<br />NT:urn:schemas-upnp-org:device:MediaServer:1rn<br />NTS:ssdp:alivern Location:http://192.168.1.100:2869/upnphost/udhisapi.dll?content=uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6crn<br />USN:uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6c::urn:schemas-upnp-org:device:MediaServer:1rn<br />Cache-Control:max-age=1800rn<br />Server:Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0rn<br />rn<br />NOTIFY * HTTP/1.1rn<br />Host:239.255.255.250:1900rn<br />NT:upnp:rootdevicern<br />NTS:ssdp:alivern<br />Location:http://192.168.1.100:2869/upnphost/udhisapi.dll?content=uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6crn<br />USN:uuid:224e2bb9-6961-4d79-b05f-f72cb415dc6c::upnp:rootdevicern<br />Cache-Control:max-age=1800rn<br />Server:Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0rn<br />rn<br />The next example shows a UPnP M-SEARCH message response by WMP Sharing:<br />M-SEARCH * HTTP/1.1rn<br />Host:239.255.255.250:1900rn<br />ST:urn:schemas-upnp-org:device:MediaServer:1rn<br />Man:"ssdp:discover"rn<br />MX:3rn<br />rn<br />The final example illustrates a sample SSDP announcement from a UPnP MediaRenderer:<br />NOTIFY * HTTP/1.1rn<br />HOST: 239.255.255.250:1900rn<br />CACHE-CONTROL: max-age=1800rn<br />LOCATION: http://192.168.1.100:80/description.xmlrn<br />NT: urn:schemas-upnp-org:device:MediaRenderer:1rn<br />NTS: ssdp:alivern<br />SERVER: NetDeviceOS/5.4 UPnP/1.0 DMP/5.0rn<br />USN: uuid: 224e2bb9-6961-4d79-b05f-f72cb415dc6c::urn:schemas-upnp-org:device:MediaRenderer:1rn<br />rn<br />Appendix 2. Resource Elements for Transcoded Content<br />The following example shows multiple resource elements exposed for the testImage.jpg file.<br />In each of the resource elements, the name of the file in the root URL has been intentionally shortened for brevity and clarity.<br /><item id="000000000000033F" parentID="B" restricted="1"><br /> <dc:title>testImage</dc:title><br /> <upnp:class>object.item.imageItem.photo</upnp:class><br /> <upnp:album>[No Keywords]</upnp:album><br /> <dc:date>2002-03-04</dc:date><br /> <upnp:albumArtURI>http://192.168.1.111:10243/WMPNSSv4/1234/{name}.jpg?albumArt=true</upnp:albumArtURI><br /> <res size="544643" resolution="3000x1968" protocolInfo="http-get:*:image/jpeg:*" colorDepth="24">http://192.168.1.111:10243/WMPNSSv4/1234/{name}.jpg</res><br /> <res resolution="160x104" protocolInfo="http-get:*:image/jpeg:*" colorDepth="24">http://192.168.1.111:10243/WMPNSSv4/1234/{name}.jpg?formatID=23,width=160,height=104</res><br /> <res resolution="640x419" protocolInfo="http-get:*:image/jpeg:*" colorDepth="24">http://192.168.1.111:10243/WMPNSSv4/1234/{name}.jpg?formatID=23,width=640,height=419</res><br /> <res resolution="1024x671" protocolInfo="http-get:*:image/jpeg:*" colorDepth="24">http://192.168.1.111:10243/WMPNSSv4/1234/{name}.?formatID=23,width=1024,height=671</res><br /> <res resolution="136x90" protocolInfo="http-get:*:image/x-ycbcr-yuv420:*" colorDepth="24">http://192.168.1.111:10243/WMPNSSv4/1234/{name}.jpg?formatID=24,width=136,height=90,thumbnail=false,aspectRatio=9:8,rFill=20,gFill=20,bFill=20</res><br /> <res resolution="684x456" protocolInfo="http-get:*:image/x-ycbcr-yuv420:*" colorDepth="24">http://192.168.1.111:10243/WMPNSSv4/1234/{name}.jpg?formatID=24,width=684,height=456,thumbnail=false,aspectRatio=9:8,rFill=20,gFill=20,bFill=20</res><br /> <res resolution="3000x1968" protocolInfo="http-get:*:image/x-ycbcr-yuv420:*" colorDepth="24">http://192.168.1.111:10243/WMPNSSv4/1234/{name}.jpg?formatID=24,width=3000,height=1968,thumbnail=false,aspectRatio=1:1,rFill=20,gFill=20,bFill=20</res><br />

×