Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

MTP Implementation Guidelines for Portable Media Players

windows



+ Font mai mare | - Font mai mic



MTP Implementation Guidelines for Portable Media Players



Revision 1.2

Microsoft Corporation

March 2007

Applies to:

   Microsoft Windows Media Player 10

   Microsoft Windows Media Player 11

Summary: This paper presents guidelines for the design of portable media players. Microsoft defined the Media Transfer Protocol (MTP) to eliminate difficulties that consumers had experienced while configuring their portable media players to communicate with desktop applications. Microsoft initiated the PlaysForSure logo program to remove confusion by consumers about whether content downloaded from online music and video stores will work correctly with their portable media players. This paper summarizes the features that a portable media player should implement to support MTP and to meet the requirements of the PlaysForSure logo program. However, to ensure correct implementation of these features, hardware vendors should refer directly to the documents that are listed in 'References' at the end of the paper.

Legal Notice

Contents

1 Introduction

Terminology 

1.1.1 Acronyms

1.1.2 Terms 

2 MTP Commands

Mandatory Core MTP Commands

2.1.1 GetDeviceInfo (0x1001)

2.1.2 OpenSession (0x1002)

2.1.3 CloseSession (0x1003)

2.1.4 GetStorageIDs (0x1004)

2.1.5 GetStorageInfo (0x1005)

2.1.6 GetNumObjects (0x1006)

2.1.7 GetObjectHandles (0x1007)

2.1.8 GetObjectInfo (0x1008)

2.1.9 GetObject (0x1009)

2.1.10 DeleteObject (0x100B)

2.1.11 SendObjectInfo (0x100C)

2.1.12 SendObject (0x100D)

2.1.13 GetDevicePropDesc (0x1014)

2.1.14 GetDevicePropValue (0x1015)

2.1.15 SetDevicePropValue (0x1016)

2.1.16 GetPartialObject (0x101B)

2.1.17 GetObjectPropsSupported (0x9801)

2.1.18 GetObjectPropDesc (0x9802)

2.1.19 GetObjectPropValue (0x9803)

2.1.20 SetObjectPropValue (0x9804)

2.1.21 GetObjectReferences (0x9810)

2.1.22 SetObjectReferences (0x9811)

Mandatory Commands from the Windows Media DRM 10 for Portable Devices Extension 

2.2.1 GetSecureTimeChallenge (0x9101)

2.2.2 SetSecureTimeResponse (0x9102)

2.2.3 SetLicenseResponse (0x9103)

2.2.4 GetSyncList (0x9104)

2.2.5 SendMeterChallengeQuery (0x9105)

2.2.6 GetMeterChallenge (0x9106)

2.2.7 SetMeterResponse (0x9107)

2.2.8 CleanDataStore (0x9108)

2.2.9 GetLicenseState (0x9109)

Recommended MTP Commands

2.3.1 Core MTP Commands

2.3.1.1 FormatStore (0x100F)

2.3.1.2 GetObjectPropList (0x9805)

2.3.1.3 SetObjectPropList (0x9806)

2.3.1.4 GetInterdependentPropDesc (0x9807)

2.3.1.5 SendObjectPropList (0x9808)

2.3.2 Windows Media Player 10 Extension Commands

2.3.2.1 WMPMetadataRoundTrip (0x9201)

2.3.3 Windows Media Player 11 Extension Commands

2.3.3.1 WMPReportAcquiredContent (0x9202)

2.3.4 PlayFromDevice Extension Commands for One-Wire Playback

2.3.5 Core MTP Commands for Two-Wire Playback

2.3.5.1 Skip (0x9820)

3 Control Requests and Events

Control Requests

3.1.1 Get Device Status Request

3.1.2 Cancel Request

3.1.3 Device Reset Request

Events 

4 StorageInfo Requirements

VolumeIdentifier 

5 DeviceInfo and Device Properties

DeviceInfo Data Set

5.1.1 Manufacturer, Model, and DeviceVersion

5.1.2 SerialNumber

Mandatory MTP Device Properties

5.2.1 SynchronizationPartner (0xD401)

5.2.2 DeviceFriendlyName (0xD402)

Mandatory Device Properties from the Windows Media DRM 10 for Portable Devices Extension 

5.3.1 SecureTime (0xD101)

5.3.2 DeviceCertificate (0xD102)

Recommended MTP Device Properties

5.4.1 BatteryLevel (0x5001)

Recommended Device Properties from the Windows Media DRM 10 for Portable Devices Extension 

5.5.1 RevocationInfo (0xD103)

Device Properties Required to Support Two-Wire Playback

5.6.1 VolumeLevel (0xD403)

5.6.2 PlaybackRate (0xD410)

5.6.3 PlaybackObject (0xD411)

5.6.4 PlaybackContainerIndex (0xD412)

5.6.5 PlaybackPosition (0xD413)

6 Object Format Support

Mandatory Formats

Recommended Formats

7 Object Property Support

Mandatory Object Properties for All Formats

7.1.1 StorageID (0xDC01)

7.1.2 ObjectFormat (0xDC02)

7.1.3 ProtectionStatus (0xDC03)

7.1.4 ObjectSize (0xDC04)

7.1.5 ObjectFileName (0xDC07)

7.1.6 ParentObject (0xDC0B)

7.1.7 PersistentUniqueObjectIdentifier (0xDC41)

7.1.8 Name (0xDC44)

7.1.9 NonConsumable (0xDC4F)

Recommended Object Properties for All Formats

7.2.1 DateModified (0xDC09)

Mandatory Object Properties for Audio Formats

7.3.1 Artist (0xDC46)

7.3.2 Track (0xDC8B)

7.3.3 Genre (0xDC8C)

7.3.4 UseCount (0xDC91)

7.3.5 AlbumName (0xDC9A)

7.3.6 AlbumArtist (0xDC9B)

7.3.7 SampleRate (0xDE93)

7.3.8 NumberOfChannels (0xDE94)

7.3.9 AudioWAVECodec (0xDE99)

7.3.10 AudioBitRate (0xDE9A)

Recommended Object Properties for Audio Formats

7.4.1 Duration (0xDC89)

7.4.2 UserRating (0xDC8A)

7.4.3 OriginalReleaseDate (0xDC99)

7.4.4 ParentalRating (0xDC94)

7.4.5 BitrateType (0xDE92)

Mandatory Object Property Support for Video Formats

7.5.1 Width (0xDC87)

7.5.2 Height (0xDC88)

7.5.3 Genre (0xDC8C)

7.5.4 UseCount (0xDC91)

7.5.5 SampleRate (0xDE93)

7.5.6 NumberOfChannels (0xDE94)

7.5.7 ScanType (0xDE97)

7.5.8 AudioWAVECodecs (0xDE99)

7.5.9 AudioBitRate (0xDE9A)

7.5.10 VideoFourCCCodec (0xDE9B)

7.5.11 VideoBitRate (0xDE9C)

7.5.12 FramesPerThousandSeconds (0xDE9D)

7.5.13 KeyFrameDistance (0xDE9E)

7.5.14 EncodingProfile (0xDEA1)

Recommended Object Properties for Video Formats

7.6.1 Description (0xDC48)

7.6.2 Duration (0xDC89)

7.6.3 UserRating (0xDC8A)

7.6.4 Parental Rating (0xDC94)

7.6.5 OriginalReleaseDate (0xDC99)

Multiple Codec Capabilities for the Same Format

Mandatory Object Properties for AbstractAudioAlbum

7.8.1 Genre (0xDC8C)

7.8.2 AlbumArtist (0xDC9B)

Recommended Object Properties for AbstractAudioAlbum

7.9.1 PurchaseFlag (0xD901)

7.9.2 RepresentativeSampleFormat (0xDC81)

7.9.3 RepresentativeSampleHeight (0xDC83)

7.9.4 RepresentativeSampleWidth (0xDC84)

7.9.5 RepresentativeSampleData (0xDC86)

8 Supporting Windows Media Player Playlists

Mandatory Commands

8.1.1 GetObjectReferences (0x9810)

8.1.2 SetObjectReferences (0x9811)

Mandatory Formats

8.2.1 AbstractAudioVideoPlaylist (0xBA05)

9 Tuning MTP Performance

Object Property Groups

Handling Metadata on the Device

9.2.1 Database or Accelerator File

9.2.2 Constructing a Property List

9.2.3 Profiling Applications

10 References 

Introduction

This paper presents guidelines for the design of a portable media player.

Microsoft provides additional documents that specify the Media Transfer Protocol (MTP) and the requirements of the PlaysForSure logo program for portable media players. Although this paper conveniently summarizes the relevant requirements from the MTP and PlaysForSure documents, the summary in this paper is not sufficient to ensure compliance with these requirements. Hardware vendors should refer to these documents directly to obtain the detailed information required to implement the required features correctly.

MTP is a new protocol for communication between a portable device and a desktop application. MTP allows a computer to control a portable device and to transfer digital content and metadata between the computer and the device. Microsoft has developed MTP drivers for the Microsoft Windows XP and Windows VistaT operating systems that can communicate with any MTP-compatible device. In addition, Microsoft has developed MTP drivers for the Windows 2000, Windows Millennium Edition, and Windows 98 Second Edition operating systems that enable applications to communicate with MTP devices through the Windows Media Device Manager API. Thus, consumers can conveniently connect their MTP-compatible devices to their desktop computers without having to install any special drivers. In addition to desktop computers, the same portable devices can communicate with other MTP host devices, including car stereos, media servers, and the XBox 360T.

Microsoft initiated the PlaysForSure logo program to eliminate compatibility problems between portable media players and online content. When the PlaysForSure logo appears on a portable device, the consumer knows that the device is capable of downloading and rendering content offered by any number of certified providers. When this logo appears on a content-provider's Web site, consumers know that the content will be compatible with their devices.

After purchasing an MTP-compatible portable device with a PlaysForSure logo, the consumer removes the device from the retail packaging and simply connects the device to a host computer through a USB cable (or other hardware interface). At that point, the consumer can immediately begin using an application such as Windows Media Player 10 to communicate with the device and download online content to it.

This paper provides a concise list of the MTP commands, formats, and properties that are required by or recommended for portable media devices that conform to the requirements of the PlaysForSure logo program. For detailed information regarding requirements, hardware vendors should refer to the documents that are listed in 'References' at the end of this paper.

For information about the PlaysForSure logo testing program for MTP devices, see https://www.microsoft.com/getplaysforsure or send e-mail to pfsinfo@microsoft.com. For other questions about MTP or portable media players, send e-mail to askdmd@microsoft.com.

Microsoft has implemented the MTP protocol as a client extension to the Picture Transfer Protocol (PTP) for digital still cameras. For information about PTP, see the PIMA 15740 (PTP) specification.

Terminology

This paper uses the following acronyms and terms.

Acronyms

This paper uses the following acronyms:

DRM

Digital rights management

MTP

Media Transfer Protocol

PDA

Personal digital assistant

PDDRM

Portable device DRM

PTP

Picture Transfer Protocol

PUOID

Persistent unique object identifier

USB

Universal Serial Bus

Terms

This paper uses the following terms:

Anti-rollback clock

A hardware clock in a portable media player that detects when the user rolls back the clock to an earlier time. Upon detecting a clock rollback, the portable device scans the licenses in its store to determine whether any licenses should be deleted or disabled in response to the rollback.

Base64

An ASCII-encoded, base-64 numbering system. The value 64 is the largest power-of-two base that can be represented by the set of printable ASCII characters. The digits for the values 0 through 63 are represented by characters 0-9, a-z, A-Z, and two additional characters, for example, a period (.) and a hyphen (-).

Initiator

The host computer or other device that initiates MTP operations over a USB (or other hardware interface bus) that connects to a responder.

Metering

Keeping track of the number of times that a particular consumer uses (typically, by playing or copying) an item of protected content. The license that the user obtains to allow use of protected content might specify limits on usage that are enforced by the digital rights management system.

Metering challenge

A request that is sent to a metering aggregation service from a device to obtain updated metering data for a particular content-usage license. The device's metering challenge and the server's response are both encrypted.

Media Transfer Protocol (MTP) driver

A driver that is supplied by Microsoft that runs on a Windows-based computer and initiates MTP operations over a USB cable (or other hardware interface bus) that connects to a responder.

Persistent unique object identifier (PUOID)

Identifies an object that is stored on the portable media player. The portable device generates the PUOID at the time that it receives the object. The PUOID should be unique among all objects that the device has ever received, including those that have since been deleted.

Responder

The portable media player, digital camera, PDA, or other portable device that responds to MTP operations that are initiated by an initiator.

Time challenge

A request that is sent to a trusted time server by a device to obtain the current date and time. The device's time challenge and the server's response are both encrypted.

MTP Commands

The following MTP commands are required or recommended for a portable media player that qualifies to use the PlaysForSure logo.

Mandatory Core MTP Commands

The MTP specification defines the set of core MTP commands. For information about obtaining the MTP specification, see 'References' at the end of this paper.

To qualify to use the PlaysForSure logo, a portable media player must support the following core MTP commands.

GetDeviceInfo (0x1001)

This command retrieves the DeviceInfo data set from the portable media player. This data set contains information, such as model and serial number, to identify the portable device and describe the capabilities of the device.

Typically, GetDeviceInfo is the first command issued by an initiator after connecting to a portable device. GetDeviceInfo is the only command that an initiator can send without first opening an MTP session by sending an OpenSession command.

For more information about the DeviceInfo data set, see section 3.5.1 of the MTP specification, 'DeviceInfo Dataset Description.'

OpenSession (0x1002)

This command opens a new MTP session for communication between the initiator and portable media player. An MTP session is a communications context consisting of a persistent connection with a connection state. Operations that depend on state parameters, such as object handles or storage IDs, require an active session. All operations that are described in this paper require an active session, unless otherwise specified.

CloseSession (0x1003)

This command closes an active session. Upon closing the session, the portable media player should discard all of the state information that belongs to the session.

GetStorageIDs (0x1004)

This command retrieves a list of storage IDs for the storage areas on the portable media player.

GetStorageInfo (0x1005)

This command retrieves a StorageInfo data set that describes a storage area on the portable media player. When sending the command, the initiator specifies a storage ID to identify the storage area.

For more information about the StorageInfo data set, see section 5.2.2 of the MTP specification, 'StorageInfo Dataset Description.'

GetNumObjects (0x1006)

This command retrieves a count of the number of MTP objects that are stored on the portable media player. As an option, the initiator can use the first three command parameters to restrict the command to a subset of the objects on the portable device.

This command is mandated by the PIMA 15740 (PTP) specification but is not currently used by the MTP drivers that ship with Windows Media Player 10 and Windows Media Player 11.

GetObjectHandles (0x1007)

This command retrieves an array of object handles that the initiator can use to access the MTP objects that are stored on the portable media player. When sending the command, the initiator specifies whether to fetch the handles for all the objects on the portable device or just the objects that are contained in a particular storage area.

GetObjectInfo (0x1008)

This command retrieves the ObjectInfo data set for the specified MTP object on the portable media player. When sending the command, the initiator specifies an object handle to identify the object.

This command is mandated by the PIMA 15740 (PTP) specification. The MTP drivers that ship with Windows Media Player 10 and Windows Media Player 11 require that a portable device supports either the GetObjectPropList or the GetObjectInfo command, but not both. To improve performance, the drivers preferentially use GetObjectPropList if the device supports it. Otherwise, the drivers use GetObjectInfo.

For more information about the ObjectInfo data set, see section 5.3.1 of the MTP specification, 'ObjectInfo Dataset Description.'

GetObject (0x1009)

This command retrieves the binary data component of the specified object on the portable media player. When sending the command, the initiator specifies an object handle to identify the object.

DeleteObject (0x100B)

This command deletes an object or set of objects from the portable media player. When sending the command, the initiator specifies an object handle to identify the object or set of objects to delete.

When the portable media player deletes an object, it should delete all of the metadata that belongs to that object. In addition, it should remove all internal references to the deleted object (for example, from playlists and associations). The device should avoid assigning the handle value for a deleted object to a new object for the remainder of the session in which the object is deleted. Depending on the internal implementation of this policy, the device might allow the handle for the deleted object to persist until the session ends.

SendObjectInfo (0x100C)

This command sends an ObjectInfo data set to the portable media player to prepare it to receive a new object. The command provides the portable device with information about the upcoming object transfer and allows the device to indicate whether it can receive the object. Upon successful completion of this command, the initiator sends a SendObject command that sends the binary data component of the object to the device. Finally, the initiator can issue a series of SetObjectPropValue commands to send any additional object properties that are not in the ObjectInfo data set.

The SendObjectInfo command is not required if the portable device supports both the SendObjectPropList command and the set of object properties that replace the metadata in the ObjectInfo data set.

A device that implements the SendObjectInfo command must allow the initiator to specify a destination storage ID and parent handle for the object as optional command parameters.

For more information about the ObjectInfo data set, see section 5.3.1 of the MTP specification, 'ObjectInfo Dataset Description.'

SendObject (0x100D)

This command sends the binary data component of an MTP object to the portable media player. A SendObject command always follows a successfully completed SendObjectInfo or SendObjectPropList command. The data component that is sent in a SendObject command conforms to the object description in the ObjectInfo data set that was sent in the SendObjectInfo or SendObjectPropList command that preceded it.

GetDevicePropDesc (0x1014)

This command retrieves a DevicePropDesc data set that describes a device property. When sending the command, the initiator specifies a property code to identify the property.

For more information about the DevicePropDesc data set, see section 5.1.2.1 of the MTP specification, 'Device Property Describing Dataset.'

GetDevicePropValue (0x1015)

This command retrieves the current value of a device property. When sending the command, the initiator specifies a property code to identify the property.

SetDevicePropValue (0x1016)

This command sets the value of a device property. When sending the command, the initiator specifies both a property code to identify the property, and a property value. The initiator-supplied property value conforms to the type and range information in the property descriptor that the initiator retrieved during a previous GetDevicePropDesc command.

GetPartialObject (0x101B)

This command retrieves a partial object from the portable media player. With this command, the initiator can play content that is stored as an MTP object on the portable device. As the initiator plays the content, the portable device streams the object to the initiator as a series of partial objects. This command allows only unprotected content to be played in this fashion.

If the portable device supports the one-wire PlayFromDevice extension to MTP, the MTP driver uses the commands in this extension instead of the GetPartialObject command. With this extension, the device can stream both protected and unprotected content to the initiator. For more information, see section 2.3.4 of this paper, 'PlayFromDevice Extension Commands for One-Wire Playback.'

GetObjectPropsSupported (0x9801)

This command retrieves a list of object properties that the portable media player supports for a class of MTP objects that share a particular object-format type.

GetObjectPropDesc (0x9802)

This command retrieves an ObjectPropDesc data set that describes a particular property of a class of MTP objects that share a particular object-format type.

For more information about the ObjectPropDesc data set, see section 5.3.2.3 of the MTP specification, 'Defining Object Properties.'

GetObjectPropValue (0x9803)

This command retrieves the current value of an object property. When sending the command, the initiator specifies the object handle and property code.

SetObjectPropValue (0x9804)

This command sets the current value of an object property. When sending the command, the initiator specifies the object handle and property code. The initiator-supplied property value conforms to the type and range information in the property descriptor that the initiator retrieved during a previous GetObjectPropDesc command.

GetObjectReferences (0x9810)

This command retrieves a list of objects to which the target object holds references. When sending the command, the initiator specifies an object handle to identify the target object. In response, the portable media device supplies a list of object handles that identify the objects to which the target object holds references.

SetObjectReferences (0x9811)

This command replaces the list of objects to which the target object holds references. When sending the command, the initiator specifies an object handle to identify the target object, and a list of object handles that identify the objects to which the target object should hold references.

Mandatory Commands from the Windows Media DRM 10 for Portable Devices Extension

The Windows Media DRM 10 for Portable Devices extension to MTP defines an extended set of MTP commands to manage digital rights on portable devices. For more information about this extension, see 'References' at the end of this paper.

To qualify to use the PlaysForSure logo, the portable media player must support the following commands from this extension.

GetSecureTimeChallenge (0x9101)

This command retrieves a secure time challenge from the portable media player. The initiator forwards the challenge to the URL that is specified in the response data. When the time service at the specified URL responds to the challenge, the MTP driver issues a SetSecureTimeResponse command to send the response to the portable device.

This command is required only if the portable device uses a hardware real-time clock to determine whether the user's license has expired. It is not required if the device uses an anti-rollback clock.

SetSecureTimeResponse (0x9102)

This command sends the portable media player a response to a secure time challenge. The MTP driver sends the command after the initiator receives a response from a time service that previously received a secure time challenge from the portable device.

This command is required only if the portable device uses a hardware real-time clock to determine whether the user's license has expired. It is not required if the device uses an anti-rollback clock.

SetLicenseResponse (0x9103)

This command sends a license response to the portable media player. The license-response data for this command is in the form of an XML document that contains some number of Base64-encoded licenses. Typically, the license response includes a single license, but it might contain two or more licenses. Regardless of the number of licenses, the portable device can receive all of the data in the license response in a single SetLicenseResponse command.

The expected minimum size of the license-response data is 5 to 6 kilobytes (for a single Base64-encoded 4-kilobyte license) in the Windows Media DRM 10 for Portable Devices extension to MTP, but it might grow larger in future versions of this extension.

GetSyncList (0x9104)

This command retrieves a license-synchronization list from the portable media player. When sending the command, the MTP driver specifies four parameters that the portable device must use to filter the list: MaxCountRemaining, MaxHoursRemaining, StartingIndex, and ItemsToProcess. The device should retrieve only the items in the list with a usage count less than MaxCountRemaining and an expiration date less than MaxHoursRemaining. The usage count for a particular item is a tally of the number of times that a particular content item has been used (for example, played or copied).

The MTP driver can use the StartingIndex and ItemsToProcess parameters to retrieve a large synchronization list one piece at a time through a series of GetSyncList commands. StartingIndex specifies the index of the first item in the piece of the list that is to be retrieved by the current command; if the complete list contains n items, the items are numbered 0 to n-1. ItemsToProcess specifies the maximum number of consecutive list items to retrieve during the current command.

In addition to the sync list, the response from the portable device includes two parameters, ItemsProcessed and NextStartingIndex. ItemsProcessed specifies the number of items retrieved by the current command (which might be less than ItemsToProcess). NextStartingIndex specifies the starting index for the next GetSyncList command.

SendMeterChallengeQuery (0x9105)

This command sends a metering query to the portable media player. The metering query is a MeterChallengeQuery data set that defines the information that the portable device should provide in a subsequent metering challenge. If this command is immediately followed by a GetMeterChallenge command, then the device should construct the data set for the metering challenge according to the metering query. If the SendMeterChallengeQuery command is followed by any command other than GetMeterChallenge, then the device should immediately discard the metering query from the SendMeterChallengeQuery command.

GetMeterChallenge (0x9106)

This command retrieves the metering challenge from the portable media player. This command must be immediately preceded by a SendMeterChallengeQuery command that specifies the metering query that the portable device should use to define the metering challenge. Otherwise, the device should fail the GetMeterChallenge command.

In response to this command, the portable device gathers the metering data from its DRM data store and passes the data to the MTP driver. The response data is encoded in the form of a metering certificate (XML string).

The portable device might be unable to immediately report metering data for all of the items that are requested in a particular SendMeterChallengeQuery command. When this occurs, the device includes as much of requested metering data as it can in the metering challenge. After sending the response for this metering challenge to the device, the MTP driver sends a subsequent SendMeterChallengeQuery command to the device to define a new challenge that reports the metering data that the initial challenge omitted.

SetMeterResponse (0x9107)

This command sends the metering response to the portable media player. This is the metering response to the metering challenge that the MTP driver retrieved from the portable device during a previous GetMeterChallenge command.

The SetMeterResponse command resets the usage counts for all items that were included in the previous metering challenge.

In the event that the device is unable to report all metering data that was requested in the initial metering query, the metering response data contains a flag bit that indicates that the MTP driver should initiate another metering data cycle to process the unreported items.

CleanDataStore (0x9108)

This command instructs the portable media player to initiate a data-store cleaning operation.

The data store requires routine maintenance to achieve the best performance. The CleanDataStore cleans up the data store by performing the following operations:

Deletes licenses that have expired and licenses for which all usage counts are zero.

Defragments blocks of all the root stores.

The process of cleaning the data store may take some time, depending on how many licenses are in the store.

GetLicenseState (0x9109)

This command retrieves the license state for a particular content item from the portable media player. The license state data from the portable device includes a license challenge (XML string). The challenge contains the key ID, which identifies the content. Optionally, the license state data can include the license ID and action data. The action data specifies the type of usage (for example, playback or copying) that the device is requesting for the content.

The command retrieves one or both of the following parameters:

The number of usage counts remaining.

The number of hours remaining until expiration.

Recommended MTP Commands

To achieve the best customer experience, we recommend that a portable media player support the following core and extended MTP commands, but they are not required by the PlaysForSure logo program.

Core MTP Commands

The MTP specification defines the set of core MTP commands. For information about obtaining the MTP specification, see 'References' at the end of this paper.

A portable media player performs best if it supports the following core MTP commands, but they are not required by the PlaysForSure logo program.

FormatStore (0x100F)

This command provides a quick way to purge the portable media player of all content. It is faster than individually deleting each of the objects in the store. In response to this command, the portable device deletes all user-accessible objects in its store, but it does not delete the license store, DRM software, device firmware, the WMPInfo.xml file (the file that maintains the synchronization relationship with Windows Media Player), or other protected information.

GetObjectPropList (0x9805)

This command retrieves an ObjectPropList data set that contains a list of property values from the portable media player. When retrieving the values of several properties, this command provides a performance improvement over using a series of GetObjectPropValue commands.

When sending this command, the initiator specifies an object identifier and either a property code or a property group code. As an option, the initiator can also specify an object format and a depth. The depth indicates how much of the object hierarchy below the object to traverse in constructing the property list.

For more information about the ObjectPropList data set, see section E.2.1 of the MTP specification, 'GetObjectPropList.'

SetObjectPropList (0x9806)

This command sets a list of property values in the portable media player. When sending the command, the initiator specifies an ObjectPropList data set that contains the property values. When setting the values of several properties, this command provides a performance improvement over using a series of SetObjectPropValue commands.

For more information about the ObjectPropList data set, see section E.2.1 of the MTP specification, 'GetObjectPropList.'

GetInterdependentPropDesc (0x9807)

This command retrieves information about the interdependent properties of the portable media player. Two or more properties are interdependent if changing the value of one property can change the constraints on the values that the other properties can assume. When sending the command, the initiator specifies an object-format code that restricts the response to the list of interdependent properties for objects with the specified format.

For example, the range of allowed values for the bit rate of an audio file might depend on the sample rate, and vice versa. Each possible configuration of bit rate and sample rate values can be represented as a pair of property descriptors:

One descriptor specifies the bit rate value or range of values.

The other descriptor specifies a sample rate value or range of values.

All of the possible configurations of the two interdependent properties can be represented as a collection of such descriptor pairs.

The GetInterdependentPropDesc command retrieves an array of ObjectPropertyDesc arrays. Each ObjectPropDesc array element is a descriptor that specifies a value or range of values that a particular property can assume. Each ObjectPropDesc array describes a possible configuration of two or more interdependent properties. The array of ObjectPropDesc arrays is an exhaustive list of all of the possible configurations of all of the device's interdependent properties.

For a detailed example of an interdependent-property description, see section 7.5 of this paper, 'Multiple Codec Capabilities for the Same Format.'

SendObjectPropList (0x9808)

This command sends an ObjectPropList data set to the portable media player to prepare the device to receive a new object. The command supplies the portable device with information about the upcoming object transfer and allows the device to indicate whether it can receive the object. Upon successful completion of this command, the initiator sends a SendObject command that transfers the binary data component of the object to the device.

This command is an optional replacement for the SendObjectInfo command, which is designed primarily to send information about objects that contain digital images. For content other than image data, the SendObjectPropList command typically provides improved performance over the SendObjectInfo command. When writing a new object to the portable device, the MTP driver uses the SendObjectPropList command if the device supports it. Otherwise, the driver uses the SendObjectInfo command to send the object information.

For more information about the ObjectPropList data set, see section B.2 of the MTP specification, 'Object Property Descriptions.'

Windows Media Player 10 Extension Commands

The Windows Media Player 10 extension to MTP defines a set of commands for supporting album art. For information about obtaining documentation for the Windows Media Player 10 extension, see 'References' at the end of this paper.

To achieve the best customer experience, we recommend that a portable media player support the following Windows Media Player 10 extension command, but it is not required by the PlaysForSure logo program.

WMPMetadataRoundTrip (0x9201)

This command performs an exchange of metadata between the initiator and portable media player. To receive album art, a portable device should implement this command. In addition, a device that supports this command should support the following object properties on all audio content:

PurchaseFlag (0xD901)

Specifies whether the media object has been flagged by the user as belonging to an album that the user wants to purchase. This property is defined in the Windows Media DRM 10 for Portable Devices extension to MTP.

UseCount (0xDC91)

Specifies the number of times that the user has played or viewed this object. This property is defined in the MTP specification.

UserRating (0xDC8A)

Specifies how much the user likes this object, as a rating number in the range 1 (worst) to 100 (best). A 0 value indicates that the object is not rated. This property is defined in the MTP specification.

In response to the WMPMetadataRoundTrip command, the device provides:

A list of the objects whose metadata has changed.

A list of the objects that have been deleted.

The first list identifies all of the objects whose PurchaseFlag, UseCount, or UserRating properties have changed. For each object in the list, Windows Media Player will query the device for the new object property values. The Player will conditionally copy the files in the second list to the device according to the user's synchronization rules.

For information about obtaining the MTP specification and the documentation for the Windows Media DRM 10 for Portable Devices extension to MTP, see 'References' at the end of this paper.

Windows Media Player 11 Extension Commands

The Windows Media Player 11 extension to MTP defines a set of commands for synchronizing the initiator to additions that the portable media player has made to its list of stored objects since the previous synchronization. For information about obtaining documentation for the Windows Media Player 11 extension, see 'References' at the end of this paper.

To achieve the best customer experience, we recommend that a portable media player support the following Windows Media Player 11 extension command, but it is not required by the PlaysForSure logo program.

WMPReportAcquiredContent (0x9202)

This command enables Windows Media Player to obtain a list of new content that the portable media player or other MTP device has acquired since the last time the Player and device synchronized to each other. In response to the command, the device reports wireless downloads, content that the device has captured (for example, through a built-in camera or microphone), and any other acquired content. The device should not report content obtained through an MTP session. The device must establish a synchronization partnership with the Player before it can use this command.

PlayFromDevice Extension Commands for One-Wire Playback

The PlayFromDevice extensions to MTP enable an initiator to select and play content that is stored on a portable media player. Technical information about these extensions is available in the Windows Media DRM 10 for Network Devices Transmitter Porting Kit. For information about obtaining this kit, see 'References' at the end of this paper.

A single cable (for example, USB) connects the initiator and the portable device. This playback configuration is referred to as the 'one-wire' configuration to distinguish it from the 'two-wire' playback configuration that requires two cables and is described in section 2.3.5 of this paper, 'Core MTP Commands for Two-Wire Playback.'

In the one-wire playback configuration, the device streams the digital content to the initiator, which plays it. If the content is protected, the initiator must decrypt the content.

For example, a portable media player can stream music content to a car head unit (the initiator), which plays the music.

In contrast, the two-wire playback configuration requires the portable device to play the content, which simplifies the role of the initiator-especially if the content is protected.

Core MTP Commands for Two-Wire Playback

The core MTP commands support a two-wire playback configuration in which the initiator enumerates and initiates playback of content that is stored on a portable media player. The initiator sends transport control commands to the portable device, and the device plays the content.

In contrast to the one-wire playback configuration that is described in section 2.3.4 of this paper, 'PlayFromDevice Extension Commands for One-Wire Playback,' the two-wire playback configuration requires two cables rather than one cable to connect the portable device to the initiator.

For example, a portable media player can play music content under the control of a car head unit (the initiator). The portable device connects to the head unit through two cables:

An analog stereo cable to transmit the audio signal from the portable device to the head unit.

A USB cable to transmit MTP commands.

The head unit provides amplification for the audio signal from the portable device. In addition, as the user adjusts the manual controls on the head unit to select the content to play, the head unit transmits the corresponding MTP commands to the portable device.

For more information about two-wire playback, see 'Playback Control of an MTP Device' in the MTP Porting Kit. That document describes commands and device properties that have been added to the core MTP specification for playback control.

To support two-wire playback, the following core MTP command is recommended for a portable media player.

Skip (0x9820)

This command changes the object that is currently being played by skipping forward or backward in a device-specific ordering of objects. This command is part of the transport controls addendum to the core MTP specification. That addendum also includes the device properties that are described in section 5.6 of this paper, 'Device Properties Required to Support Two-Wire Playback.'

Control Requests and Events

The following MTP control requests and events are required or recommended for a portable media player that qualifies to use the PlaysForSure logo.

Control Requests

An initiator can send control requests to a portable media player to configure the portable device or to initiate other device-specific functions. The device always responds to a control request regardless of the current state of the device.

For more information about control requests, see section D.5 of the PIMA 15740 (PTP) specification, 'Device Requests.' For information about obtaining that specification, see 'References' at the end of this paper.

To qualify to use the PlaysForSure logo, a portable media player must support the following MTP control requests.

Get Device Status Request

This control request retrieves information regarding the status or protocol state of the portable media player. While executing certain MTP commands, the portable device might not respond for a significant period of time. When a response is delayed, the initiator can issue a Get Device Status Request to determine whether the device is still operating correctly or has entered an invalid state.

For more information, see section D.5.2.4 of the PIMA 15740 (PTP) specification, 'Get Device Status Request.'

Cancel Request

This control request cancels a transaction that the initiator previously requested. For example, the initiator can issue a Cancel Request to halt a previously initiated file transfer to the portable media player if the user clicks the Cancel Transfer button in Windows Media Player before the transfer completes.

For more information, see section D.5.2.1 of the PIMA 15740 (PTP) specification, 'Cancel Request.'

Device Reset Request

This control request resets the portable media player. If the portable device experiences a severe failure, the MTP driver can issue a Device Reset Request to reset the device to its default idle state.

For more information, see section D.5.2.3 of the PIMA 15740 (PTP) specification, 'Device Reset Request.'

Events

To qualify to use the PlaysForSure logo, a portable media player must meet the requirements for event support that are set forth in section 14 of the PIMA 15740 (PTP) specification, 'Conformance Section.' In particular, if the device supports removable storage, it must support the following events:

StoreAdded (0x4004)

StoreRemoved (0x4005)

For more information about these events, see section 12 of the PIMA 15740 (PTP) specification. For information about obtaining this specification, see 'References' at the end of this paper.

StorageInfo Requirements

The MTP specification defines the StorageInfo data set. For information about obtaining this specification, see 'References' at the end of this paper.

The MTP specification requires a portable media player to support the StorageInfo data set. In addition, to qualify to use the PlaysForSure logo, a portable media player must satisfy the following requirements in its implementation of the VolumeIdentifier field in the StorageInfo data set.

VolumeIdentifier

This field contains a volume identifier that uniquely identifies the storage area across all portable media players from the same manufacturer. Typically, the volume identifier is the serial number of the embedded or plug-in storage device that implements the storage area. The volume identifier is expressed as a string of 2-byte, Unicode characters that conforms to the string format that is described in section 5.3.4 of the PIMA 15740 (PTP) specification, 'Strings.'

This field can contain a string of up to 255 characters in length (including the terminating null), but the MTP driver uses only the first 128 characters to identify the portable device. The first 128 characters of the volume identifier must be unique across all storage areas in all devices, regardless of model name or device version, that are made by the same manufacturer. If this field does not contain a string in which the first 128 characters are unique, it must contain an empty string.

DeviceInfo and Device Properties

The following device information and properties are required or recommended for a portable media player that qualifies to use the PlaysForSure logo.

DeviceInfo Data Set

The MTP specification defines the DeviceInfo data set. For information about obtaining this specification, see 'References' at the end of this paper.

The MTP specification requires a portable media player to support the DeviceInfo data set. In addition, to qualify to use the PlaysForSure logo, a portable device must satisfy the following requirements in its implementation of this data set.

Manufacturer, Model, and DeviceVersion

These three fields are optional in the PIMA 15740 (PTP) specification, but are required for all portable media players. Each field is expressed as a string of 2-byte, Unicode characters that conforms to the string format that is described in section 5.3.4 of the PIMA 15740 (PTP) specification, 'Strings.' The Manufacturer and Model fields should contain the user-friendly names of the device manufacturer and device model. The DeviceVersion field should contain the device version number in a vendor-specific format.

SerialNumber

This field contains a serial number to identify the portable media player. The serial number is expressed as a string of 2-byte, Unicode characters that conforms to the string format that is described in section 5.3.4 of the PIMA 15740 (PTP) specification, 'Strings.' Device serial numbers must be unique among all portable devices that share identical Model and DeviceVersion fields. This field is optional in the PIMA 15740 (PTP) specification, but is required for all portable media players.

For compatibility with legacy portable device drivers and applications, the serial number should be represented by a string of exactly 32 characters, including the terminating null. The string should express the serial number as a hexadecimal number, but no prefix (such as '0x') is required to indicate that the string contains a hexadecimal number. To ensure that the string length is exactly 32 characters, insert zeros (character '0') at the beginning of the string before the serial number to bring the length to 32 characters.

Mandatory MTP Device Properties

The MTP specification defines a set of core device properties. For information about obtaining this specification, see 'References' at the end of this paper.

To qualify to use the PlaysForSure logo, a portable media player must support the following core MTP properties.

SynchronizationPartner (0xD401)

This device property specifies a human-readable, friendly name of a synchronization partner for the portable media player. A synchronization partner can be either another device, a software application on a device, or a server on a network. This is a get-only property. The property value is a string of 2-byte, Unicode characters that conforms to the string format that is described in section 5.3.4 of the PIMA 15740 (PTP) specification, 'Strings.' The string is suitable for display by a user-interface application that runs on the initiator.

The following table shows an example of a DevicePropDesc data set for a GetDevicePropDesc command that retrieves a description of the SynchronizationPartner property.

Field

Bytes

Value

OperationCode

0x1014 (GetDevicePropDesc)

DevicePropCode

0XD401 (SynchronizationPartner)

DataType

0xFFFF (string)

GetSet

0x01 (get and set)

FactoryDefaultValue

'Microsoft Windows'

CurrentValue

'Longhorn Sync Engine'

FormFlag

0x00 (no form fields)

DeviceFriendlyName (0xD402)

This device property specifies the human-readable, friendly name of the portable media player. The initiator can get and set this property. The property value is a string of 2-byte, Unicode characters that conforms to the string format that is described in section 5.3.4 of the PIMA 15740 (PTP) specification, 'Strings.' The string is suitable for display by the user-interface of an application that runs on the initiator device.

The following table shows an example of a DevicePropDesc data set for a GetDevicePropDesc command that retrieves a description of the DeviceFriendlyName property.

Field

Bytes

Value

OperationCode

0x1014 (GetDevicePropDesc)

DevicePropCode

0XD402 (DeviceFriendlyName)

DataType

0xFFFF (string)

GetSet

0x01 (get and set)

FactoryDefaultValue

'Microsoft MTP Device Simulator'

CurrentValue

'Microsoft MTP Device Simulator V0.85'

FormFlag

0x00 (no form fields)

Mandatory Device Properties from the Windows Media DRM 10 for Portable Devices Extension

The Windows Media DRM 10 for Portable Devices extension to MTP defines some additional device properties. These properties are required in order to enable Microsoft DRM technology for portable devices. For information about obtaining documentation for this extension, see 'References' at the end of this paper.

To qualify to use the PlaysForSure logo, a portable media player must support the following device properties from this extension.

SecureTime (0xD101)

This device property specifies the secure clock time, which the initiator must retrieve from the portable media player so that time-based licenses can be enforced. This is a get-only property. The property value is a string of 2-byte, Unicode characters that conforms to the string format that is described in section 5.3.4 of the PIMA 15740 (PTP) specification, 'Strings.' The string is an XML document that contains the secure clock time and related status information.

DeviceCertificate (0xD102)

This device property specifies the device certificate, which the initiator must retrieve from the portable media player to verify that the player device is authorized to process DRM-protected content. This is a get-only property. The property value is a string of 2-byte, Unicode characters that conforms to the array format that is described in section 5.4 of the PIMA 15740 (PTP) specification, 'Arrays.' The string is an XML document that contains the device certificate and related status information.

Recommended MTP Device Properties

The MTP specification defines a set of core device properties. For information about obtaining this specification, see 'References' at the end of this paper.

A portable media player performs best if it supports the following core MTP property, but it is not required by the PlaysForSure logo program.

BatteryLevel (0x5001)

This device property specifies the current battery level of the portable media player. This is a get-only property. The constraints on the battery level value can be specified by either an enumeration or a range of integers. The highest value in the enumeration or range indicates that the battery is fully charged, and the lowest value indicates that no battery power remains. A value of 0 indicates that the device has an alternate power source.

The following table shows an example of a DevicePropDesc data set for a GetDevicePropDesc command that retrieves a description of the BatteryLevel property.

Field

Bytes

Value

OperationCode

2

0x1014 (GetDevicePropDesc)

DevicePropCode

2

0X5001 (BatteryLevel)

DataType

2

0x0002 (UINT8)

GetSet

1

0x00 (get-only)

FactoryDefaultValue

1

0x64 (fully charged)

CurrentValue

1

0x64 (fully charged)

FormFlag

1

0x01 (range form)

MinimumValue

1

0x00 (alternate power source)

MaximumValue

1

0x64 (fully charged)

StepSize

1

0x0A

Recommended Device Properties from the Windows Media DRM 10 for Portable Devices Extension

The Windows Media DRM 10 for Portable Devices extension to MTP defines some additional device properties. These properties are required in order to enable Microsoft DRM technology for network devices. For information about obtaining documentation for this extension, see 'References' at the end of this paper.

A portable media player performs best if it supports the following device property from this extension, but it is not required by the PlaysForSure logo program.

RevocationInfo (0xD103)

This device property specifies the revocation status of the device. The property value is specified as an XML document encoded as a string of 2-byte, Unicode characters that conforms to the string format that is described in section 5.3.4 of the PIMA 15740 (PTP) specification, 'Strings.' The initiator can get but not set this property.

Device Properties Required to Support Two-Wire Playback

As an option, a portable media player can support two-wire playback. Two-wire playback is described in section 2.3.5 of this paper, 'Core MTP Commands for Two-Wire Playback.'

The core MTP device properties support a two-wire playback configuration in which the initiator enumerates and initiates playback of content that is stored on a portable media player. This configuration supports scenarios in which the initiator sends transport-control commands to the portable device, and the device plays the content (for example, a portable media player that connects to a car head unit).

For more information about two-wire playback, see 'Playback Control of an MTP Device' in the MTP Porting Kit. That document describes commands and device properties that have been added to the core MTP specification for playback control.

To enable two-wire playback, a portable media player must support the following device properties, but they are not required by the PlaysForSure logo program.

VolumeLevel (0xD403)

This device property specifies the current audio volume level of the portable media player. This property is part of the transport controls addendum to the core MTP specification. The initiator can get and set this property.

PlaybackRate (0xD410)

This device property specifies the current playback speed of the portable media player. This property is part of the transport controls addendum to the core MTP specification. The initiator can get and set this property.

PlaybackObject (0xD411)

This device property identifies the object that is currently being played by the portable media player. This property is part of the transport controls addendum to the core MTP specification. The initiator can get and set this property.

PlaybackContainerIndex (0xD412)

This device property can be used in conjunction with the PlaybackObject property to identify the object that is currently being played on the portable media player. A PlaybackObject get property request might retrieve a container object (for example, an album or playlist) rather than the object that contains the content that is playing. In this case, a PlaybackContainerIndex get property request retrieves an index into the container object's array of object references. The index points to the array element that contains the object handle for the content that the device is playing. This property is part of the transport controls addendum to the core MTP specification. The initiator can get and set this property.

PlaybackPosition (0xD413)

This device property specifies the offset from the start of the stream of the object that is currently being played on the portable media player. The offset is expressed in milliseconds. This property is part of the transport controls addendum to the core MTP specification. The initiator can get and set this property.

Object Format Support

The following object formats are required or recommended for a portable media player device that qualifies to use the PlaysForSure logo.

Mandatory Formats

To qualify to use the PlaysForSure logo, a portable media player must support the following object formats:

Undefined Object (0x3000)

This format allows a portable device to receive an object that is encoded in an arbitrary format regardless of whether the device explicitly supports the format.

Association (0x3001)

This format is required for synchronization with Windows Media Player 10 and Windows Media Player 11.

MP3 (0x3009)

MPEG-1 Audio Layer 3 format. This format is recommended for all portable media players.

ASF (0x300C)

Advanced Systems Format.

WMA (0xB901)

Windows Media Audio format.

WMV (0xB981)

Windows Media Video format. This format is mandatory only for PlaysForSure video devices.

AbstractAudioAlbum (0xBA03)

The AbstractAudioAlbum format is recommended for two reasons:

It is required to support album art.

It enables the device to organize its content to provide a better browsing experience. It enables compilation albums to be consolidated under a Various Artists menu rather than having songs scattered across multiple artist entries one or two tracks at a time.

For information about the object property requirements for this format, see section 7.6 of this paper, 'Mandatory Object Properties for AbstractAudioAlbum.'

AbstractAudioVideoPlaylist (0xBA05)

This format is required in order to receive playlists from Windows Media Player 10 and Windows Media Player 11.

Recommended Formats

A portable media player performs best if it supports the following object formats, but they are not required by the PlaysForSure logo program:

EXIF/JPEG (0x3801)

An image file format used by digital cameras. This format is recommended for portable devices that support digital photographs.

Undefined Firmware (0xB802)

This format is recommended to enable the user to install firmware support for future device-usage scenarios. It allows the device vendor to install firmware upgrades that are encoded in a proprietary data format.

Object Property Support

The following object properties are required or recommended for a portable media player that qualifies to use the PlaysForSure logo. These properties are defined in the MTP specification. For information about obtaining the MTP specification, see 'References' at the end of this paper.

Mandatory Object Properties for All Formats

To qualify to use the PlaysForSure logo, a portable media player must support the following object properties, regardless of which object formats the device supports.

StorageID (0xDC01)

This object property identifies the storage area that the object is stored in. A storage ID is a 4-byte, unsigned integer that the portable media player assigns to identify a storage area on the device. A storage ID is unique among all storage areas on a particular device.

The value of this property must be the same as the value in the first field of the ObjectInfo data set.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the StorageID property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC01 (Storage ID)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000

GroupCode

4

0x00000004

FormFlag

1

0x00 (no form fields)

ObjectFormat (0xDC02)

This object property specifies the data format for the object.

The value of this property must be the same as the value in the second field of the ObjectInfo data set.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the ObjectFormat property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC02 (ObjectFormat)

DataType

2

0x0004 (UINT16)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x3000 (undefined object)

GroupCode

4

0x00000003

FormFlag

1

0x00 (no form fields)

ProtectionStatus (0xDC03)

This object property specifies the protection status of the object.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the ProtectionStatus property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC03 (ProtectionStatus)

DataType

2

0x0004 (UINT16)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x0000 (no protection)

GroupCode

4

0x00000004

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0002 (2 values in enumeration)

SupportedValue1

2

0x0000 (no protection)

SupportedValue2

2

0x0001 (read-only)

ObjectSize (0xDC04)

This object property specifies the size of the object (that is, the data component of the object) in bytes.

The value of this property must be the same as the value in the fourth field of the ObjectInfo data set (that is, the ObjectCompressedSize field), unless it is greater than the maximum size that can be represented in that field.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the ObjectSize property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC04 (ObjectSize)

DataType

2

0x0008 (UINT64)

GetSet

1

0x00 (get-only)

DefaultValue

8

0x0000000000000000 (0 bytes)

GroupCode

4

0x00000002

FormFlag

1

0x00 (no form field)

ObjectFileName (0xDC07)

This object property specifies the file name of the object.

The value of this property must be the same as the value in field 16 of the ObjectInfo data set.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the ObjectFileName property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC07 (ObjectFileName)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000002

FormFlag

1

0x00 (no form fields)

ParentObject (0xDC0B)

This object property specifies the parent object of the object. The property value is the object handle of the parent object. If the object has no parent object, the property value is 0x00000000.

The value of this property must be identical to the value of field 12 of the ObjectInfo data set.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the ParentObject property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC0B (ParentObject)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000 (no parent object)

GroupCode

4

0x00000004

FormFlag

1

0x00 (no form fields)

PersistentUniqueObjectIdentifier (0xDC41)

This object property specifies the persistent unique object identifier (PUOID) of the object. The portable media player assigns the PUOID to the object at the time that it receives the object from the initiator. The initiator cannot alter the PUOID. No two objects on the same device should have the same PUOID. The PUOID should be unique among all objects that the device has ever received, including those that have since been deleted.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the PersistentUniqueObjectIdentifier property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC41 (PersistentUniqueObjectIdentifier)

DataType

2

0x000A (UINT128)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000000000000000000000000000

GroupCode

4

0x00000000

FormFlag

1

0x00 (no form fields)

Name (0xDC44)

This object property represents the name of the object. Frequently, the object name is the same as the file name (as represented by the FileName object property). However, the Name property provides a unique and human-readable identifier that is consistently available regardless of whether the object has a file name and the file name is unique.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Name property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC44 (Name)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000002

FormFlag

1

0x00 (no form fields)

NonConsumable (0xDC4F)

This object property indicates whether the object has been placed on the portable media player for storage only and is, therefore, not available to be consumed (for example, played) by the portable device.

If a portable device supports this property for any object, it must support the property for all objects on the device. If the device does not support the property, then the lack of support for the property implies that all object data on the device is available for consumption by the device.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the NonConsumable property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC4F (NonConsumable)

DataType

2

0x0002 (UINT8)

GetSet

1

0x01 (get and set)

DefaultValue

4

0x00 (consumable)

GroupCode

4

0x00000002

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0002 (2 values in enumeration)

SupportedValue1

1

0x00 (consumable)

SupportedValue2

1

0x01 (not consumable)

Recommended Object Properties for All Formats

A portable media player performs best if it supports the following object properties, regardless of which object formats the device supports, but these properties are not required by the PlaysForSure logo program.

DateModified (0xDC09)

This property represents the date and time when the object was last altered.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the DateModified property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC09 (DateModified)

DataType

2

0xFFFF (string)

GetSet

37

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000003

FormFlag

1

0x03 (date-time form)

Mandatory Object Properties for Audio Formats

To qualify to use the PlaysForSure logo, a portable media player that supports objects with audio formats (for example, WMA and MP3) must also support the following object properties. (However, support for the AlbumName and AlbumArtist properties is mandatory only if the device does not support the AbstractAudioAlbum format.)

Artist (0xDC46)

This object property identifies the artist. The property value is a string that contains the name of the artist (or names of the artists).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Artist property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC46 (Artist)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000003

FormFlag

1

0x00 (no form fields)

Track (0xDC8B)

This object property specifies the track number of the object on the album that the object belongs to.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Track property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC8B (Track)

DataType

2

0x0004 (UINT16)

GetSet

1

0x01 (get and set)

DefaultValue

2

0x0000 (track number 0)

GroupCode

4

0x00000003

FormFlag

1

0x00 (no form fields)

Genre (0xDC8C)

This object property identifies the genre of this object. The property value is a human-readable string that the initiator selects to identify the genre of the object (for example, 'Jazz' or 'Classical').

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Genre property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC8C (Genre)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000003

FormFlag

1

0x00 (no form fields)

In the example in the preceding table, the portable media player specifies a FormFlag value of 0x00, which allows the initiator to supply any human-readable string to identify the genre for an object. As an option, the portable device can instead specify a FormFlag value of 0x02 to restrict the initiator's choice of genre names to a set of enumerated string values. For more information, see the MTP specification.

UseCount (0xDC91)

This object property specifies the number of times an object has been played or viewed. Windows Media Player 10 and Windows Media Player 11 use this property to intelligently generate playlists (for example, My Favorites).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the UseCount property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

0XDC91 (UseCount)

DataType

0x0006 (UINT32)

GetSet

0x01 (get and set)

DefaultValue

0x00000000 (count of 0)

GroupCode

0x00000001

FormFlag

0x00 (no form fields)

AlbumName (0xDC9A)

This object property specifies the album name for an object. The property value is a human-readable string that contains the album name.

This property is mandatory only if the portable media player does not support the AbstractAudioAlbum format (object format code 0xBA03).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the AlbumName property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC9A (AlbumName)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000004

FormFlag

1

0x00 (no form fields)

AlbumArtist (0xDC9B)

This object property identifies the artist for the album that that the object belongs to. In contrast, the Artist property identifies the artist for the individual track that the object represents. Although an object's AlbumArtist property is frequently the same as its Artist property, the two properties might be different. For example, a compilation album is a collection of tracks created by several artists. If a user-interface (UI) program on the initiator uses the Artist property to categorize the tracks in a compilation album, the listings for the individual tracks will be scattered under the names of the various track artists. By using the AlbumArtist property instead, the UI program can list compilation albums under a single 'Various Artists' category so that users can more easily find the content in compilation albums.

The property value is a human-readable string that contains the name of the album artist (or names of the album artists).

This property is mandatory only if the portable media player does not support the AbstractAudioAlbum format (object format code 0xBA03).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the AlbumArtist property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC9B (AlbumArtist)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000004

FormFlag

1

0x00 (no form fields)

SampleRate (0xDE93)

This object property specifies the set of audio sampling rates that the portable media player supports for the data format of the object. The initiator can use this information either to block transfer of content that has been sampled at an unsupported rate, or to perform rate conversion prior to transferring the data to the device. The device has the option of specifying the sampling rates that it supports either in range form or enumeration form.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the SampleRate property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDE93 (SampleRate)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000 (0 kHz)

GroupCode

4

0x00000000

FormFlag

1

0x01 (range form)

MinimumValue

4

0x00001F40 (8 kHz)

MaximumValue

4

0x0000BB80 (48 kHz)

StepSize

4

0x00000032 (32 Hz)

NumberOfChannels (0xDE94)

This object property specifies the number of channels that the portable media player supports for the data format of the object. The initiator can use this information either to block transfer of content with an unsupported number of channels, or to convert the content to a supported number of channels.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the NumberOfChannels property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDE94 (NumberOfChannels)

DataType

2

0x0004 (UINT16)

GetSet

1

0x00 (get-only)

DefaultValue

2

0x0000 (unknown)

GroupCode

4

0x00000000

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0003 (3 values in enumeration)

SupportedValue1

2

0x0000 (unknown)

SupportedValue2

2

0x0001 (1 channel)

SupportedValue3

2

0x0002 (2 channel)

The enumeration values in the preceding table indicate that the portable media player in this example can support 1-channel (monophonic) and 2-channel (stereophonic) audio.

AudioWAVECodec (0xDE99)

This object property specifies the WAVE codec tag for an object that contains audio content that is encoded in a registered WAVE format. The list of valid WAVE codec tags for this property is presented in the article 'Registered FOURCC Codes and WAVE Formats' at https://msdn.microsoft.com/library/en-us/dnwmt/html/registeredfourcccodesandwaveformats.asp. This property is useful for managing file container formats that support more than one audio data format. For example, an Advanced Systems Format (ASF) file might contain audio data that has been encoded in WMA or WMA Pro format.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the AudioWAVECodec property. For this example, the ObjectFormatCode parameter for the command is 0x300C (PTP_FORMATCODE_ASF).

Field

Bytes

Value

ObjectPropCode

2

0XDE99 (AudioWAVECodec)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000 (MTP_WAVEFORMAT_UNKNOWN)

GroupCode

4

0x00000000

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0002 (2 values in enumeration)

SupportedValue1

4

0x00000160 (MTP_WAVEFORMAT_MSAUDIO1)

SupportedValue2

4

0x00000161 (MTP_WAVEFORMAT_MSAUDIO2)

In the example in the preceding table, the two values in the enumeration indicate all of the WAVE formats that the portable media player supports. The portable device cannot play an ASF file that is encoded in a format that does not appear in the enumeration.

AudioBitRate (0xDE9A)

This object property specifies the bit rate for the audio content of the object. The property applies to either an audio file or to a file that combines audio with other types of content (for example, a video file). An object with no audio content is not required to support this property. For playback of compressed audio, the property value represents the number of bits per second of compressed audio that the portable media player processes per second.

As an option, the portable device can support the BitRateType property, which indicates whether the bit rate for a particular object is constant, variable (as it is for some compressed formats), or free (meaning that the audio content consumes none of the device's processing bandwidth).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the AudioBitRate property. For this example, the ObjectFormatCode parameter for the command is 0xB901 (MTP_FORMATCODE_WMA).

Field

Bytes

Value

ObjectPropCode

2

0XDE9A (AudioBitRate)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x0000FA00 (64,000 bits per second)

GroupCode

4

0x00000000

FormFlag

1

0x01 (range form)

MinimumValue

4

0x00000001 (1 bit per second)

MaximumValue

4

0x0016E360 (1,500,000 bits per second)

StepSize

4

0x00000001 (1 bit per second)

In the example in the preceding table, the portable device uses the range form to specify the bit rates that it can handle. As an option, the device can instead use the enumeration form to specify its supported bit rates. In either case, any object that requires a bit rate that is outside the specified capabilities of the device cannot be played by the device.

Recommended Object Properties for Audio Formats

A portable media player that supports audio formats (for example, WMA and MP3) performs best if it also supports the following object properties, but they are not required by the PlaysForSure logo program.

Duration (0xDC89)

The duration property specifies the running time of the audio content in the object. The property value is the duration in milliseconds of the audio content.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Duration property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC89 (Duration)

DataType

2

0x0006 (UINT32)

GetSet

1

0x01 (get and set)

DefaultValue

4

0x00000000

GroupCode

4

0x00000000

FormFlag

1

0x00 (no form fields)

UserRating (0xDC8A)

This object property specifies the user rating for the object. This rating indicates how much the user likes the object, and is similar to a star rating of from one to five stars. The property value is either a rating value in the range 1 (worst) to 100 (best) or 0 if the content is unrated.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the UserRating property. For this example, the ObjectFormatCode parameter for the command is 0xB901 (MTP_FORMATCODE_WMA).

Field

Bytes

Value

ObjectPropCode

2

0XDC8A (Rating)

DataType

2

0x0004 (UINT16)

GetSet

1

0x01 (get and set)

DefaultValue

2

0x0000 (unrated)

GroupCode

4

0x00000001

FormFlag

1

0x01 (range form)

MinimumValue

2

0x0000 (unrated)

MaximumValue

2

0x0064 (best)

StepSize

2

0x0001

OriginalReleaseDate (0xDC99)

This object property specifies the date and time when the object was originally released. It applies to content that is released on physical media, to video works that are broadcast on television, and to audio works that are broadcast on radio.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the OriginalReleaseDate property. For this example, the ObjectFormatCode parameter for the command is 0x3009 (PTP_FORMATCODE_MP3).

Field

Bytes

Value

ObjectPropCode

2

0XDC99 (OriginalReleaseDate)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

0x00000001

FormFlag

1

0x03 (date-time form)

ParentalRating (0xDC94)

This property identifies the parental rating assigned to this object. The purpose of this property is to identify objects that may not be appropriate to be viewed or heard by minors.

The contents of this field are intended to be human-readable, but may be further defined in the future to facilitate machine interpretation.

Field

Bytes

Value

ObjectPropCode

2

0XDC94 (ParentalRating)

DataType

2

0xFFFF (string)

GetSet

1

0x01 (get and set)

DefaultValue

1

0x00 (empty string)

GroupCode

4

Device defined

FormFlag

1

0x00 (None)

BitrateType (0xDE92)

This object property indicates whether playing the audio content in the object consumes a constant portion of the portable media player's total available bit rate, consumes a variable portion (which is the case for some compressed formats), or is 'free' (consumes none of the device's available bit rate).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the BitRateType property. For this example, the ObjectFormatCode parameter for the command is 0xB901 (MTP_FORMATCODE_WMA).

Field

Bytes

Value

ObjectPropCode

2

0XDE92 (BitRateType)

DataType

2

0x0004 (UINT16)

GetSet

1

0x00 (get-only)

DefaultValue

2

0x0000 (unused)

GroupCode

4

0x00000000

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0004 (4 values in enumeration)

SupportedValue1

2

0x0000 (unused)

SupportedValue2

2

0x0001 (constant)

SupportedValue3

2

0x0002 (variable)

SupportedValue4

2

0x0003 (free)

Mandatory Object Property Support for Video Formats

Width (0xDC87)

This object property identifies the width of an object in pixels.

The FORM fields in the Object Property Description dataset should indicate the supported widths of objects of this format type in a Range FORM.

If this property is read-only, it must be calculated by the device based on the object, when requested. If this property is read-write, the device may return the default value (0x00000000) when it has not yet extracted the correct value from the object and may allow the value to be set in by the initiator (though it should correct the value, when possible, if the value set by the initiator is incorrect).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Width property.

Field

Bytes

Value

ObjectPropCode

0XDC87 (Width)

DataType

0x0006 (UINT16)

GetSet

Device-Defined

DefaultValue

0x00000000

GroupCode

0x00000000

FormFlag

0x01 (range form)

Height (0xDC88)

This object property identifies the height of an object in pixels.

The FORM fields in the Object Property Description dataset should indicate the supported heights of objects of this format type in a Range FORM.

If this property is read-only, it must be calculated by the device based on the object when requested. If this property is read-write, the device may return the default value (0x00000000) when it has not yet extracted the correct value from the object, and may allow the value to be set in by the initiator (though it should correct the value, when possible, if the value set by the initiator is incorrect).

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Height property.

Field

Bytes

Value

ObjectPropCode

0XDC88 (Height)

DataType

0x0006 (UINT16)

GetSet

Device-Defined

DefaultValue

0x00000000

GroupCode

0x00000000

FormFlag

0x01 (range form)

Genre (0xDC8C)

Refer to section 7.3.3

UseCount (0xDC91)

Refer to section 7.3.4

SampleRate (0xDE93)

Refer to section 7.3.7

NumberOfChannels (0xDE94)

Refer to section 7.3.8

ScanType (0xDE97)

This object property identifies the scan type used in video objects.

Valid values of this property are defined as follows:

0x0000 Unused

Unused

0x0001 Progressive

Indicates progressive frames.

0x0002 FieldInterleavedUpperFirst

Line interleaved Frames with the Upper field on the first line.

0x0003 FieldInterleavedLowerFirst

Line interleaved frames with the Lower field on the first line.

0x0004 FieldSingleUpperFirst

Fields are sent as independent samples. The field is indicated (on a per sample basis).

0x0005 FieldSingleLowerFirst

Fields are sent as independent samples. The field is indicated (on a per sample basis).

0x0006 MixedInterlace

The content may contain a mix of interlaced modes.

0x0007 MixedInterlaceAndProgressive

The content may contain a mix of interlaced and progressive modes.

All other values where Bit 15 is 0 are reserved for MTP

All other values where Bit 15 is 1 are the MTP Vendor Extension range

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves the scantype property.

Field

Bytes

Value

ObjectPropCode

0XDE97 (Scantype)

DataType

0x0004 (UINT16)

GetSet

0x01 (get and set)

DefaultValue

0x0000

GroupCode

0x00000000

FormFlag

0x02 (enumeration form)

AudioWAVECodecs (0xDE99)

Refer to section 7.3.9

AudioBitRate (0xDE9A)

Refer to section 7.3.10

VideoFourCCCodec (0xDE9B)

This property provides the FourCC Codec Tag for video codecs as described in: https://msdn.microsoft.com/library/en-us/dnwmt/html/registeredfourcccodesandwaveformats.asp.

The FORM fields in the Object Property Description dataset should identify an enumeration of FourCC Codec Tags of allowed codecs for objects of this Object Format Type, and indicate that any object encoded with a codec not in this codec enumeration will not be playable. If the enumeration contains an entry with a value of 0x00000000, it indicates that any codec will be accepted for this Object Format.

Field

Bytes

Value

ObjectPropCode

0XDE9B (VideoFourCCCodec)

DataType

0x0004 (UINT16)

GetSet

0x01 (get and set)

DefaultValue

0x0000

GroupCode

Device-defined

FormFlag

0x02 (enumeration form)

VideoBitRate (0xDE9C)

This property applies to video data, and describes the total number of bits that one second of content will consume.

The FORM fields in the Object Property Description dataset should identify either a range or an enumeration of allowed values for the total video bit rate, and indicate that any object with a total video bitrate outside of this range will not be playable.

Field

Bytes

Value

ObjectPropCode

0XDE9C (VideoBitRate)

DataType

0x0006 (UINT32)

GetSet

Device Defined

DefaultValue

0x0000

GroupCode

Device defined

FormFlag

0x01 (range form)

0x02 (enumeration form)

FramesPerThousandSeconds (0xDE9D)

This property identifies the number of frames in one second of video content. It is represented in thousandths of a frame, so a value of 29.97 frames per second (such as NTSC) would be represented by a value of 29970.

The FORM fields in the Object Property Description dataset should identify the different values for this property that are supported by the device for objects of this Object Format Type and indicate that any object encoded with a number of frames per thousand seconds that is not identified by the FORM fields in this dataset will not be playable. The FORM fields of the dataset may be either an enumeration or a range. If the enumeration contains an entry with a value of 0x00000000, it indicates that any video content will be accepted regardless of the number of frames per thousand seconds.

Field

Bytes

Value

ObjectPropCode

0XDE9D (FramesPerThousandSeconds)

DataType

0x0006 (UINT32)

GetSet

0x01 (get and set)

DefaultValue

0x00000000

GroupCode

Device defined

FormFlag

0x01 (range form)

0x02 (enumeration form)

KeyFrameDistance (0xDE9E)

The Key Frame Distance determines the maximum spacing between key frames (I frames), and is specified in milliseconds.

The FORM fields in the Object Property Description dataset should identify a range of allowed values for the distance between key frames, and indicate that any object with a spacing outside of this range will not be playable.

Field

Bytes

Value

ObjectPropCode

0XDE9E (KeyFrame Distance)

DataType

0x0006 (UINT32)

GetSet

0x01 (get and set)

DefaultValue

0x00000000

GroupCode

Device defined

FormFlag

0x01 (range form)

EncodingProfile (0xDEA1)

Media codecs may be encoded in accordance with a profile, which defines a particular encoding algorithm or optimization process. The meaning of this property is dependent upon the codec of the media object to which it is applied, and the device should enumerate all valid values in a standard computer-readable format for each Object Format supporting this property.

In Windows Media Player 11 it is possible to declare support for the encoding profile.  This is a string parameter enumeration represented as "SP", "MP", "CP"", etc. Note that for ASF profiles the level is not represented (neither for video or audio). Thus the declaration should be "MP" not "MP@LL" for example. If a source file is not a simple profile (e.g. "main profile") but all the other parameters are within the device's capabilities the fill will still be converted.

Field

Bytes

Value

ObjectPropCode

0XDEA1 (EncodingProfile)

DataType

0xFFFF (String)

GetSet

0x01 (get and set)

DefaultValue

0x00000000

GroupCode

Device defined

FormFlag

0x02 (enumeration form)

Recommended Object Properties for Video Formats

Description (0xDC48)

This object property contains human-readable description of the object.  The property value is a string that contains the human-readable description.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the Description object property.

Field

Bytes

Value

ObjectPropCode

0XDC48 (Description)

DataType

0x4004 (AUINT16)

GetSet

0x01 (get and set)

DefaultValue

0x00 (empty array)

GroupCode

0x00000000

FormFlag

0xFF (long string form)

Duration (0xDC89)

Refer to section 7.4.1

UserRating (0xDC8A)

Refer to section 7.4.2

ParentalRating (0xDC94)

Refer to section 7.4.4

OriginalReleaseDate (0xDC99)

Refer to section 7.4.3

Multiple Codec Capabilities for the Same Format

As mentioned previously, two or more properties are interdependent if changing the value of one property can change the constraints on the values that the other properties can assume.

For example, consider the case where a portable media player supports decoding of audio files in both the WMA and WMA Lossless formats. The portable device can support multiple sampling frequencies for WMA playback. However, to avoid resampling, the device can play the WMA Lossless file only at the internal hardware clock frequency of 48 kHz.

If the portable device reports that it supports a single set of sampling frequencies for all formats, then a host might inadvertently send it content that it cannot play (namely, WMA Lossless content recorded at a sampling rate other than 48 kHz).

To avoid this problem, the MTP protocol provides the ability for a portable device to indicate support for combinations of properties using the GetInterdependentPropDesc command, which was described previously.

Example: Interdependent property descriptions

In the following example, the initiator sends a GetInterdependentPropDesc command (0x9807) to get the property independencies for objects with the ASF format (format code 0x300C). The portable media player reports that it can support 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz, and 48 kHz sampling frequencies for WMA content, but only 48 kHz for WMA Lossless content. The response data specifies two interdependencies. Each interdependency is described by a pair of ObjectPropDesc data sets (for the SampleRate and AudioFormatCode properties, respectively). The first interdependency description contains the two property descriptions for the WMA format, and the second interdependency description contains the two property descriptions for the WMA Lossless format.

In this example, the GetInterdependentPropDesc command retrieves an InterdependentPropDesc data set that begins with the two fields shown in the following table.

Field

Bytes

Value

NumberOfInterdepencies

2

0x0002

NumberOfPropDescs

2

0x0002

According to the fields in the preceding table, the InterdependentPropDesc data set describes two sets of interdependencies, and the first interdependency description consists of two object property data sets.

The two fields in the preceding table are followed immediately by the two ObjectPropDesc data sets shown in the following two tables, which describe the first configuration of the SampleRate and AudioFormatCode properties for the ASF format. The following table specifies the constraints on the SampleRate property for the WMA format.

Field

Bytes

Value

ObjectPropCode

2

0xDE93 (SampleRate)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000

GroupCode

4

0x00000000

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0005

SupportedValue1

4

0x00005622 (22.05 kHz)

SupportedValue2

4

0x00005DC0 (24 kHz)

SupportedValue3

4

0x00007D00 (32 kHz)

SupportedValue4

4

0x0000AC44 (44.1 kHz)

SupportedValue5

4

0x0000BB80 (48 kHz)

The following table describes the AudioFormatCode property for the WMA format.

Field

Bytes

Value

ObjectPropCode

2

AudioFormatCode (0xDE99)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000

GroupCode

4

0x00000000

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0001

SupportedValue1

4

0x00000161 (WMA version 2)

The fields in the preceding tables are followed immediately by the field shown in the following table.

Field

Bytes

Value

NumberOfPropDescs

2

0x0002

According to the fields in the preceding table, the second interdependency description consists of two object property data sets.

The fields in the preceding tables are followed by the two ObjectPropDesc data sets shown in the following two tables, which describe the second configuration of the SampleRate and AudioFormatCode properties for the ASF format. The following table specifies the constraints on the SampleRate property for the WMA Lossless format.

Field

Bytes

Value

ObjectPropCode

2

0xDE93 (SampleRate)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

1

0x00000000

GroupCode

4

0x00000000

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0001

SupportedValue1

4

0x0000BB80 (48 kHz)

The following table describes the AudioFormatCode property for the WMA Lossless format.

Field

Bytes

Value

ObjectPropCode

2

AudioFormatCode (0xDE99)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000

GroupCode

4

0x00000000

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0001

SupportedValue1

4

0x0163 (WMA Lossless)

Mandatory Object Properties for AbstractAudioAlbum

The AbstractAudioAlbum format (object format code 0xBA03) is required in order to support album art. This format provides a convenient way for an application to send album-level metadata to the portable media player. A portable device that supports the AbstractAudioAlbum format is not required to support the AlbumArtist and AlbumName properties on objects with audio formats. (Conversely, a device is required to support the AlbumArtist and AlbumName properties if it supports audio formats but does not support the AbstractAudioAlbum format.)

To qualify to use the PlaysForSure logo, a portable media player that supports the AbstractAudioAlbum format must also support the following object property.

Genre (0xDC8C)

This object property was described previously in section 7.3.3.

AlbumArtist (0xDC9B)

This object property was described previously in section 7.3.6.

Recommended Object Properties for AbstractAudioAlbum

A device that supports both the AbstractAudioAlbum format (object format code 0xBA03) and an image format can support album art. Supporting album art is not required by the PlaysForSure logo program, but if a device does support album art, then it must additionally support all of the following object properties.

PurchaseFlag (0xD901)

This object property specifies whether the media object has been flagged by the user as belonging to an album that the user wants to purchase. This property is defined in the Windows Media DRM 10 for Portable Devices extension to MTP. The initiator can get and set this property.

RepresentativeSampleFormat (0xDC81)

This object property specifies the object format of the representative sample for the object. For a portable media player that supports the AbstractAudioAlbum format, this property is necessary to support album art.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the RepresentativeSampleFormat property. For this example, the ObjectFormatCode parameter for the command is 0xBA03 (MTP_FORMATCODE_ABSTRACT_AUDIO_ALBUM).

Field

Bytes

Value

ObjectPropCode

2

0XDC81 (RepresentativeSampleFormat)

DataType

2

0x0004 (UINT16)

GetSet

1

0x00 (get-only)

DefaultValue

2

0x0000

GroupCode

4

0x00000100

FormFlag

1

0x02 (enumeration form)

NumberOfValues

2

0x0001 (1 value in enumeration)

SupportedValue1

2

0x380F (JPEG2000 file format)

RepresentativeSampleHeight (0xDC83)

This object property specifies the height in pixels of the representative sample for the object. For a portable media player that supports the AbstractAudioAlbum format, this property is necessary to support album art.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the RepresentativeSampleHeight property. For this example, the ObjectFormatCode parameter for the command is 0xBA03 (MTP_FORMATCODE_ABSTRACT_AUDIO_ALBUM).

Field

Bytes

Value

ObjectPropCode

2

0XDC83 (RepresentativeSampleHeight)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000

GroupCode

4

0x00000000

FormFlag

1

0x01 (range form)

MinimumValue

4

0x00000000

MaximumValue

4

0x000000F0

StepSize

4

0x00000001

In the example in the preceding table, the portable device reports that it can support image heights of up to 240 pixels.

RepresentativeSampleWidth (0xDC84)

This object property specifies the width of the representative sample for the object, in pixels. For a portable media player that supports the AbstractAudioAlbum format, this property is necessary to support album art.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the RepresentativeSampleWidth property. For this example, the ObjectFormatCode parameter for the command is 0xBA03 (MTP_FORMATCODE_ABSTRACT_AUDIO_ALBUM).

Field

Bytes

Value

ObjectPropCode

2

0XDC84 (RepresentativeSampleWidth)

DataType

2

0x0006 (UINT32)

GetSet

1

0x00 (get-only)

DefaultValue

4

0x00000000

GroupCode

4

0x00000000

FormFlag

1

0x01 (range form)

MinimumValue

4

0x00000000

MaximumValue

4

0x00000140

StepSize

4

0x00000001

In the example in the preceding table, the portable device reports that it can support image widths of up to 320 pixels.

RepresentativeSampleData (0xDC86)

This object property is used to store the data for the album art image. For a portable media player that supports the AbstractAudioAlbum format, this property is necessary to support album art.

The following table shows an example of an ObjectPropDesc data set for a GetObjectPropDesc command that retrieves a description of the RepresentativeSampleData property. For this example, the ObjectFormatCode parameter for the command is 0xBA03 (MTP_FORMATCODE_ABSTRACT_AUDIO_ALBUM).

Field

Bytes

Value

ObjectPropCode

2

0XDC86 (RepresentativeSampleData)

DataType

2

0x4002 (AUINT8)

GetSet

1

0x01 (get and set)

DefaultValue

4

0x00000000 (empty array)

GroupCode

4

0x00000100

FormFlag

1

0x06 (byte-array form)

MaximumLength

4

00989680

In the example in the preceding table, the portable device reports that it can support up to 10 million bytes of data per representative sample.

Supporting Windows Media Player Playlists

To support playlists in Microsoft Windows Media Player 10 and Windows Media Player 11, a portable media player must support the following MTP commands and object formats, but they are not required by the PlaysForSure logo program.

Mandatory Commands

To receive playlists from Windows Media Player 10 and Windows Media Player 11, a portable media player must support object references. As mandated by the MTP specification, if a portable device supports object references at all, it must support object references on all object formats.

To provide support for object references, a portable media player is required to implement the following commands, but they are not required by the PlaysForSure logo program.

GetObjectReferences (0x9810)

This MTP command gets the object references that belong to the object. The property value is an array of object handles that represent the object's references to other objects.

SetObjectReferences (0x9811)

This MTP command sets the object references that belong to the object. The property value is an array of object handles that represent the object's references to other objects.

Mandatory Formats

To receive playlists from Windows Media Player 10 and Windows Media Player 11, a portable media player must support the following object format, but it is not required by the PlaysForSure logo program.

AbstractAudioVideoPlaylist (0xBA05)

This object format represents a playlist that contains audio and video tracks. A playlist object has a 0-byte data component and a list of object references that contains the object handles for all of the objects that are in the playlist.

Tuning MTP Performance

The following suggestions can help you to improve the performance of your portable media player by speeding up property retrieval and transfers of metadata.

Object Property Groups

As an option, a portable media player can speed up property retrieval by providing support for object-property groups. If the portable device lacks support for object-property groups, the MTP driver must individually retrieve the various properties of an object in a series of MTP operations. However, if the device does support object-property groups, the MTP driver can retrieve a group of object properties in a single GetObjectPropList command.

The portable device typically divides the set of object properties into several groups. Each object-property group is identified by a number called a group code.

One strategy for improving performance is to organize object properties into groups based on the relative retrieval speeds of the properties. The portable device should assign the smallest group-code values to the fastest properties and larger values to the slower properties.

Another strategy is to organize properties into groups based on how likely the MTP driver is to access all of the properties in the group if it accesses any property in the group. For example, to optimize retrieval speed for an application that does not provide album art to the portable device, the device should place the object properties that are required only for album art into a separate group. If the application does not use any of these properties, the MTP driver will not access the group that contains them.

The following example shows one mapping of object properties into groups according to function. The first group contains the properties that all applications are likely to use. The last two groups contain properties that are required only if the user runs an application that displays album art or buys content from an online store.

Example: Mapping object properties into groups

Group 1: Mandatory object properties

StorageID (0xDC01)

ObjectSize (0xDC04)

ObjectFormat (0xDC02)

ProtectionStatus (0xDC03)

ObjectFileName (0xDC07)

ParentObject (0xDC0B)

Name (0xDC44)

NonConsumable (0xDC4F)

Group 2: Audio metadata

Track (0xDC8B)

Artist (0xDC46)

Genre (0xDC8C)

AlbumName (0xDC9A)

Group 3: Windows Media Player extensions to MTP

UseCount (0xDC91)

PurchaseFlag (0xD901)

UserRating (0xDC8A)

The mapping of properties to groups in this example is for a hypothetical device and might not be optimal for your device.

Handling Metadata on the Device

Consider performance when you implement support for the following two basic actions on your portable media player:

Content enumeration

Content transfer

For both actions, performance depends on the ability to quickly access content metadata (for example, artist, album, PUOID, and parent) on the portable device. For content enumeration, metadata needs to be retrieved and sent to the initiator as quickly as possible. For content transfer, metadata transferred from the initiator needs to be stored on the device as quickly as possible to avoid impacting the overall throughput of data.

The following are suggestions for improving the overall efficiency with which metadata is handled.

Database or Accelerator File

The portable media player should store as many object properties as possible in a database or accelerator file. Ideally, this file should fit in fast memory to avoid the delay of accessing the data from a hard disk. Access to this file should be optimized for both reads and writes.

Avoid requiring the portable device to read or write tags (for example, ID3 tags) that are embedded in the content.

Constructing a Property List

When returning a list of object properties to an initiator, the portable media player should stream the property list in parallel with constructing the list. That is, the portable device can begin the transfer of property data to the initiator before it has finished constructing the entire list of properties. MTP provides a way for a device to transfer a property list of unknown length. Thus, the device can begin the transfer before it has determined the total amount of data to be transferred.

Profiling Applications

If you know which desktop applications your portable media player is likely to communicate with, you should profile those applications to understand their behavior. In particular, you should determine:

The object properties that the applications request.

The manner in which the applications send property requests to the device.

The order in which the applications request the properties.

Based on this profiling, organize the content metadata to improve the performance of property storage and retrieval by the applications.

References

The following references contain additional information about the PTP and MTP commands, properties, and formats that are discussed in this paper:

MTP specification

'Media Transfer Protocol: Enhanced,' Version 0.95 (https://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/mtp_spec.asp)

PIMA 15740 (PTP) specification

'Picture Transfer Protocol (PTP) for Digital Still Photography Devices,' Version 1.0 of the PIMA 15740: 2000 Picture Transfer Protocol specification (https://www.i3a.org/it10_pima15740.html)

Windows Media DRM 10 for Portable Devices extension to the MTP specification

'Windows Media DRM for Portable Devices Vendor Extensions to Media Transfer Protocol,' Version 1.1, in the Windows Media DRM 10 for Portable Devices Porting Kit (https://www.microsoft.com/windows/windowsmedia/forpros/drm/components.aspx)

Windows Media Player 10 extension to the MTP specification

'Media Transfer Protocol Device Extensions' (https://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay10/mmp_sdk/mtpdeviceextensions.asp)

Windows Media Player 11 extension to the MTP specification

'Windows Media Player Portable Device MTP Extension' in the Media Transfer Protocol Porting Kit (https://msdn.microsoft.com/windowsmedia/downloads/default.aspx).

Windows Media DRM 10 for Network Devices (PlayFromDevice) extension to the MTP specification

'MTP Extensions for Windows Media DRM for Network Devices Transmitter' in the Windows Media DRM 10 for Network Devices Transmitter Porting Kit (https://www.microsoft.com/windows/windowsmedia/forpros/drm/components.aspx)

Supporting album art

'Supporting Album Art for Windows Media DRM for Portable Devices' in the Windows Media DRM 10 for Portable Devices Porting Kit (https://www.microsoft.com/windows/windowsmedia/forpros/drm/components.aspx)

PlayFromDevice extension to MTP for one-wire playback

'MTP Extensions for PlayFromDevice' in the Windows Media DRM 10 for Network Devices Transmitter Porting Kit (https://www.microsoft.com/windows/windowsmedia/forpros/drm/components.aspx)

MTP transport controls for two-wire playback

'Playback Control of an MTP Device' in the Media Transfer Protocol Porting Kit (https://msdn.microsoft.com/windowsmedia/downloads/default.aspx)

PlaysForSure requirements for MTP portable devices

'Portable Device Requirements' (https://www.playsforsure/product/specifications/)

MTP device design guidelines

'Overview for MTP Device Developers' in the Media Transfer Protocol Porting Kit (https://msdn.microsoft.com/windowsmedia/downloads/default.aspx). Provides information about device synchronization, album art, DRM support, property groups, and other device design issues.

For more information about developing digital media solutions, see the Microsoft Windows Media Developer Center (https://msdn.microsoft.com/windowsmedia/default.aspx).



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 2402
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved