Media Transfer Protocol Implementation Details Blake Manders Program Manager Windows Portable Devices Microsoft Corporation Donby Mathieu Program Manager DMD Deployment Microsoft Corporation.
Download
Report
Transcript Media Transfer Protocol Implementation Details Blake Manders Program Manager Windows Portable Devices Microsoft Corporation Donby Mathieu Program Manager DMD Deployment Microsoft Corporation.
Media Transfer Protocol Implementation
Details
Blake Manders
Program Manager
Windows Portable Devices
Microsoft Corporation
Donby Mathieu
Program Manager
DMD Deployment
Microsoft Corporation
Session Outline
Session Outline
Background
What is MTP?
MTP Fundamentals
Implementation Details
Suggested Schedule
Hardware Requirements
Resources Available
Identifying Device Capabilities
Using MTP with Windows Media Player
Using MTP with Image Acquisition
Designing for success - Gotchas
Future directions
Background – What is MTP?
A protocol for intelligent storage devices
Based on and compatible with Picture Transfer Protocol
(PTP)
Enables:
Metadata-based enumeration
Object transfer
Command & control
Eventing
Optimized for:
Very large storages
Multifunction devices
High-power initiators, low-power responders
A key part of WMDRM10-PD and PlaysForSure
Background – MTP Fundamentals
Binary protocol
Initiator-responder model
Initiator initiates, responder must respond
Initiator builds model of responder contents
Transport-independent
Implemented over USB, IP
Multi-session aware
Device UI is a session
Extensible
Background – MTP Fundamentals (con’t)
Device contents exposed as objects
Identified by session-based 32-bit object handles
Device described by device properties
Provide description & control
Objects described by object properties
Provide description & constraints
Device-initiated events
Multi-session support
Implementation – Suggested Schedule
Phase 1: Installation
Install, setup & respond to GetDeviceInfo
Phase 2: Browsing
Add support for storage(s)
Object enumeration using GetObjectInfo
Phase 3: Object Transfer
SendObject, GetObject
DeleteObject
Phase 4: Object Properties
GetObjectPropDesc, GetObjectPropValue, SetObjectPropValue
Phase 5: Round out support
Miscellaneous remaining operations
Phase 6: Optimize
Enable optimized enumeration (GetObjectPropList,
SendObjectPropList)
Enable transport optimizations
Implementation – Suggested Schedule
In parallel:
Set up a simulation system:
MTP Simulator
MTP Monitor
DirectMTP
Develop device-side metadata store
Database recommended
Optimize for MTP row retrieval
Optimize database use and data transformations
Transform on the fly where possible
No buffering of responses
Implementation – Hardware Requirements
Mass Storage Optimized
not suitable for MTP
MTP Compatible
Driver Framework
Driver Framework
MTP
MSC
USBScan
USBStor
PC
With MSC,
content
storage is
managed by
the PC
Device
USB controller
Device CPU
With MTP, the
Device CPU
actively manages
content storage
USB/ATAPI Bridge
File
Transfer
using
DMA
Device Storage
Automatic
Switch
Device Storage
Device
Player CPU
Implementation – Available Resources
MTP Specification
MTP Porting Kit:
DirectMTP
MTPMon
MTP Simulator
MTP sample ANSI-C implementation
PlaysForSure test kit
Identifying Device Capabilities
Basic device format support in DeviceInfo
Device playback capabilities exposed indirectly
through Object Properties
Object Properties are not only descriptive
metadata, they are also functional
To get device capabilities, call
GetObjectPropDesc
Property Description dataset contains constraints on
allowed property values in FORM section
Allowed property values imply encoding parameters
Some parameters are interdependent
GetInterdependentPropDesc
Using MTP With Windows Media Player
There is a Windows Media Player-specified MTP
extension
Windows Media Player puts an XML file in root
directory
Windows Media Player arranges content in an
Artist -> Album -> Title file path hierarchy
Windows Media Player will leverage the device
friendly name device property
Use MTPMon to profile Windows Media Player
interaction with expected device setup (storage
size, format support, etc.) and optimize
accordingly
Using MTP for Image Acquisition
PTP compatibility
No MTP-specific USB optimizations
Don’t limit functionality to enhanced operations
Implement SendObjectInfo as well as SendObjectPropList
Implement GetObjectInfo as well as GetObjectPropList
Refer to PIMA 15740 for complete specification
Support thumbnails
For dedicated imaging device, identify as USB
PTP camera.
Designing for Success – Gotchas
Architect for your system
Architect per the MTP specification, using MTP Porting Kit as a
reference.
Identify high risk performance issues early.
Hashing algorithms?
Memory management?
Minimizing storage access?
Run PlaysForSure test kit early and often
Even if PlaysForSure isn’t a goal, it provides valuable feedback on
performance and MTP conformance.
Read the documentation
A majority of answers to MTP questions can be found in the
documentation
In the MTP specification
In the “Overview Of Portable Device Design” help file
In the “Portable Device Installation Considerations” document
Future direction
Support for IP connected devices
Support more object types
More media types
Personal Information Management (PIM) data
Property definitions
Enhanced abstract object support
Additional functions
Media playback control
Auxiliary display
Sync primitives
Community Resources
Windows Hardware & Driver Central (WHDC)
www.microsoft.com/whdc/default.mspx
Technical Communities
www.microsoft.com/communities/products/default.mspx
Non-Microsoft Community Sites
www.microsoft.com/communities/related/default.mspx
Microsoft Public Newsgroups
www.microsoft.com/communities/newsgroups
Technical Chats and Webcasts
www.microsoft.com/communities/chats/default.mspx
www.microsoft.com/webcasts
Microsoft Blogs
www.microsoft.com/communities/blogs
Additional Resources
MTPInfo @ microsoft.com
Web Resources:
MTP Specification available at http://download.microsoft.com
MTP Porting Kit available at http://download.microsoft.com
Plays For Sure test kit available at
http://www.microsoft.com/windows/windowsmedia/
consumerelectronics/p4skit/p4s_why.aspx
Related Sessions
PlaysForSure: A Key Asset for Your Device and Windows PC
Cellular Phone connectivity in Longhorn
Auxillary Display Platform for Longhorn
© 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.