Media Transfer Protocol

Download Report

Transcript Media Transfer Protocol

Media Transfer Protocol
supported
Session Outline

Overview





Technical details








USB optimizations & design considerations
Implementation example
Development resources


Fundamentals
Objects, properties, enumeration, references
Implementation details


Why use a class protocol?
Core scenarios & functionality
Non-goals
Origins
Direct MTP
MTP Monitor
MTP Simulator
Summary
Additional resources
Questions & Answers
2
Why Use A Class Protocol?

No driver required


Match communication paradigm to API


MTP mirrors current and future device connectivity API
Better user experience


No driver development, installation or support costs
“Just works”
Interoperability


Future-compatible
Device ecosystem development
3
Core Scenarios

Plug and Play experience


Device content synchronization




Send and retrieve media on portable players
Synchronize contacts/messages/schedules on PIMs
Acquire images from a digital still camera
Device control and management



Self-describing protocol
Set device clock, volume, display options
Play, pause, rewind media player
Remote content browsing



Identify objects by metadata
View representative samples of objects
Metadata-defined abstract objects
4
Core Functionality

Rich object enumeration




Generic object transfer


Does not require a standard acceleration file
Retrieve metadata separately from data
Representative samples
Abstract, opaque and combination objects
Device description


Device capabilities
Device metadata
5
Non-Goals

Streaming




Device discovery, pairing


Requires and ensures bit-correctness
Has no quality of service guarantees
Playback from device requires buffering
Relies on underlying transport
DRM

Enables, but does not define, DRM
6
Origins

Origins in Picture Transfer Protocol




Bi-directionally compatible



Dominant protocol for digital still cameras
Used in PictBridge
MTP = PTP and Extensions
MTP devices can work with PTP devices
PTP devices will work with MTP devices
MTP Enhanced and Basic


Devices designed for Windows should implement MTP Enhanced
MTP Basic is an OS-neutral subset, proposed for standardization
7
Connection Walk-Through
Connect, identifies as using MTP
Request device information
Device capability
Request list of contents
Array of handles to content
Request metadata describing content
Send metadata
Object exchange
8
Fundamentals


Binary
Actions



Device roles: Initiator-Responder






Operation  Response
Events
Initiator can send Operations
Responder responds, fires events
Device content represented by objects
Device represented by device properties
File system, file structure and transport neutral
Device UI can remain active
9
Objects

All data is represented by objects


Objects can be binary, abstract or both



Abstract objects have no binary data, such as albums
and playlists
Objects are identified by 32-bit handles
Objects are described by properties



Audio, Video, Image, File, Album, etc.
Device-constrained values
Interdependent properties enabled
Data, Properties and References are sent and
retrieved independently
10
Object Components
Array of Object References that refer to other
related objects on the device.
Set of Object Properties, which define metadata and
properties. These values are understood by and
restricted by the device.
Static and overview set of fundamental information
about this object, included for PTP compatibility.
Binary Object contents
11
Object References


File system neutral → objects identified by
32-bit object handles
References used to associate objects




Playlists, Albums, etc.
Unidirectional
Meaning derived from context
Reference maintenance performed
by device
12
Object References
13
Object enumeration


Quickly enumerate interesting content
Select by




Example return sets



Object format
Desired properties
Folder hierarchy
All properties for all objects
Title, Artist and Duration for all WMA files
Optimized for




Full (or sub-range) enumerations
High bandwidth
High transaction cost
Processing power imbalance
14
Object Enumeration – One At A Time
Handle
Format
Title
Artist
Duration
FileName
0x00000001
WMA
Title1
Artist1
180000
Song1.wma
0x00000002
MP3
Title2
Artist2
200000
Song2.mp3
0x00000003
WMA
Title3
Artist3
137000
Song3.wma
0x00000004
WMA
Title4
Artist2
257000
Song4.wma
0x00000005
MP3
Title5
Artist4
171000
Song5.mp3
0x00000006
WMA
Title6
Artist3
148000
Song6.wma
0x00000007
WMV
Title7
Artist1
3600000
Vid1.wmv
0x00000008
WPL
Title8
0x00000009
WMA
Title9
Artist5
37000
Song7.wma
0x0000000A
WMV
Title10
Artist2
130000
Vid2.wmv
0x0000000B
MP3
Title11
Artist4
550000
Song8.mp3
0x0000000C
Unknown
Title12
0x0000000D
WMA
Title13
Favorites
WinHec.ppt
Artist6
15
110000
Song9.wma
Object Enumeration – Prop By Prop By Format
Handle
Format
Title
Artist
Duration
FileName
0x00000001
WMA
Title1
Artist1
180000
Song1.wma
0x00000002
MP3
Title2
Artist2
200000
Song2.mp3
0x00000003
WMA
Title3
Artist3
137000
Song3.wma
0x00000004
WMA
Title4
Artist2
257000
Song4.wma
0x00000005
MP3
Title5
Artist4
171000
Song5.mp3
0x00000006
WMA
Title6
Artist3
148000
Song6.wma
0x00000007
WMV
Title7
Artist1
3600000
Vid1.wmv
0x00000008
WPL
Title8
0x00000009
WMA
Title9
Artist5
37000
Song7.wma
0x0000000A
WMV
Title10
Artist2
130000
Vid2.wmv
0x0000000B
MP3
Title11
Artist4
550000
Song8.mp3
0x0000000C
Unknown
Title12
0x0000000D
WMA
Title13
Favorites
WinHec.ppt
Artist6
16
110000
Song9.wma
Object Enumeration – All By Format
Handle
Format
Title
Artist
Duration
FileName
0x00000001
WMA
Title1
Artist1
180000
Song1.wma
0x00000002
MP3
Title2
Artist2
200000
Song2.mp3
0x00000003
WMA
Title3
Artist3
137000
Song3.wma
0x00000004
WMA
Title4
Artist2
257000
Song4.wma
0x00000005
MP3
Title5
Artist4
171000
Song5.mp3
0x00000006
WMA
Title6
Artist3
148000
Song6.wma
0x00000007
WMV
Title7
Artist1
3600000
Vid1.wmv
0x00000008
WPL
Title8
0x00000009
WMA
Title9
Artist5
37000
Song7.wma
0x0000000A
WMV
Title10
Artist2
130000
Vid2.wmv
0x0000000B
MP3
Title11
Artist4
550000
Song8.mp3
0x0000000C
Unknown
Title12
0x0000000D
WMA
Title13
Favorites
WinHec.ppt
Artist6
17
110000
Song9.wma
Object Enumeration – All By Property
Handle
Format
Title
Artist
Duration
FileName
0x00000001
WMA
Title1
Artist1
180000
Song1.wma
0x00000002
MP3
Title2
Artist2
200000
Song2.mp3
0x00000003
WMA
Title3
Artist3
137000
Song3.wma
0x00000004
WMA
Title4
Artist2
257000
Song4.wma
0x00000005
MP3
Title5
Artist4
171000
Song5.mp3
0x00000006
WMA
Title6
Artist3
148000
Song6.wma
0x00000007
WMV
Title7
Artist1
3600000
Vid1.wmv
0x00000008
WPL
Title8
0x00000009
WMA
Title9
Artist5
37000
Song7.wma
0x0000000A
WMV
Title10
Artist2
130000
Vid2.wmv
0x0000000B
MP3
Title11
Artist4
550000
Song8.mp3
0x0000000C
Unknown
Title12
0x0000000D
WMA
Title13
Favorites
WinHec.ppt
Artist6
18
110000
Song9.wma
Object Enumeration – All By Group
Handle
Format
Title
Artist
Duration
FileName
0x00000001
WMA
Title1
Artist1
180000
Song1.wma
0x00000002
MP3
Title2
Artist2
200000
Song2.mp3
0x00000003
WMA
Title3
Artist3
137000
Song3.wma
0x00000004
WMA
Title4
Artist2
257000
Song4.wma
0x00000005
MP3
Title5
Artist4
171000
Song5.mp3
0x00000006
WMA
Title6
Artist3
148000
Song6.wma
0x00000007
WMV
Title7
Artist1
3600000
Vid1.wmv
0x00000008
WPL
Title8
0x00000009
WMA
Title9
Artist5
37000
Song7.wma
0x0000000A
WMV
Title10
Artist2
130000
Vid2.wmv
0x0000000B
MP3
Title11
Artist4
550000
Song8.mp3
0x0000000C
Unknown
Title12
0x0000000D
WMA
Title13
Favourites
WinHec.ppt
Artist6
19
110000
Song9.wma
Object Enumeration – All
Handle
Format
Title
Artist
Duration
FileName
0x00000001
WMA
Title1
Artist1
180000
Song1.wma
0x00000002
MP3
Title2
Artist2
200000
Song2.mp3
0x00000003
WMA
Title3
Artist3
137000
Song3.wma
0x00000004
WMA
Title4
Artist2
257000
Song4.wma
0x00000005
MP3
Title5
Artist4
171000
Song5.mp3
0x00000006
WMA
Title6
Artist3
148000
Song6.wma
0x00000007
WMV
Title7
Artist1
3600000
Vid1.wmv
0x00000008
WPL
Title8
0x00000009
WMA
Title9
Artist5
37000
Song7.wma
0x0000000A
WMV
Title10
Artist2
130000
Vid2.wmv
0x0000000B
MP3
Title11
Artist4
550000
Song8.mp3
0x0000000C
Unknown
Title12
0x0000000D
WMA
Title13
Favourites
WinHec.ppt
Artist6
20
110000
Song9.wma
Optimizations





Data aligned with packet boundaries
No object size limit
Property datasets are unordered
Property datasets may be piped
without pre-compilation
Datasets designed to avoid
back-referencing
21
Implementation Details –
Hardware Considerations
MTP Compatible
Mass Storage Optimized
not suitable for MTP
Driver Framework
Driver Framework
MTP
MSC
USBScan
USBStor
PC
Device
USB controller
Device CPU
USB /ATAPI Bridge
File
Transfer
using
DMA
Automatic
Switch
Device Storage
Portable Media Player
CPU
Device Storage
22
Development Resources

Direct MTP




MTP Monitor



Useful for sending MTP operations to the device
All operation parameters can be fully specified
Device responses are displayed in the UI
Monitors & logs USB bus traffic for MTP exchanges
Parses and interprets MTP operations/responses/events
MTP Simulator




Software MTP device
Requires simulator board to expose as device to the PC
Provides a protocol reference
Useful for debugging device behavior with the MTP driver
23
Development Resources –
Direct MTP
24
Development Resources –
MTP Monitor



Simple bus analyzer
Displays and parses
MTP traffic
Very useful for
debugging device
implementations
25
Summary

A class protocol for portable media devices



Based on Picture Transfer Protocol (PTP)


Widely used standard for digital still cameras
MTP enables




Digital Cameras, Portable Media Players, Cellular
Phones, etc
Enable hybrid devices, generic firmware
Generic object transfer between devices
Rich object description
Device management and control
File system, transport, file structure neutral
26
Call To Action

Use MTP as a connectivity protocol for portable
media players


Consider MTP as an upgrade path for Digital Still
Cameras


Support shipping in the next Windows Media Player
(codenamed Crescent)
PTP will continue to be fully supported and endorsed
Consider MTP as an object transfer & control
protocol any intelligent portable device with storage


Cellular handsets, hybrid devices
Supported in Vista
27
Community Resources

Community Sites


List of Newsgroups



http://www.microsoft.com/communities/chats/default.mspx
http://www.microsoft.com/seminar/events/webcasts/default.mspx
Locate a local user group(s)


http://communities2.microsoft.com/communities/newsgroups/enus/default.aspx
Attend a free chat or webcast


http://www.microsoft.com/communities/default.mspx
http://www.microsoft.com/communities/usergroups/default.mspx
Non-Microsoft Community Sites

http://www.microsoft.com/communities/related/default.mspx
28