locked
Why I cannot get thumbnail for audio file in MTP mode

    Question

  • Hi,

    Let me describe the strange phenomena I encountered. I use GetThumbnailAsync() this function to get thumbnail for a StoreFile. I do get thumbnail(album art) when device USB connection in MSC mode but just got default icon in MTP mode for an audio file. p.s. I can get thumbnail for an image file in both mode.

    This is weird because as I know MTP will transfer more metadata than MSC has. Does this mean that in WRT Windows.Device.Portable StorageDevice class treat phone device as MSC device(like USB flash)? This confused me so much.

    Thank you!

    Thursday, April 05, 2012 9:05 AM

Answers

  • For Win8, there are no WinRT (i.e. Windows.*) APIs that allow you to use MTP protocol to communicate with the device from a Metro style app.

    The Win32/COM PortableDeviceAPI.h is available from C++ in a Metro style app, but is more intended for IHV/OEM device developers writing Metro style device apps.

    That said, we appreciate your feedback. What scenario(s) are you looking to enable that needs MTP access? Are you an IHV/OEM developer?

    Thanks,

    Lisa


    Friday, April 06, 2012 8:07 AM
  • Seanhc,

    What you see with MTP and MSC devices using the Windows.Storage APIs will more closely match Explorer's behavior rather than Media Player's.  

    This is why you don't see thumbnails for audio files for MTP devices.  

    Lisa


    Friday, April 06, 2012 6:26 AM

All replies

  • In addition, windows explorer has the same behavior as my program. And media player has the same behavior in the first time, But it seems to retrieve files automatically and are able to show thumbnail at second time.

    Thursday, April 05, 2012 9:08 AM
  • Seanhc,

    What you see with MTP and MSC devices using the Windows.Storage APIs will more closely match Explorer's behavior rather than Media Player's.  

    This is why you don't see thumbnails for audio files for MTP devices.  

    Lisa


    Friday, April 06, 2012 6:26 AM
  • Thanks for reply Lisa,

    what I wonder to know is that are there WRT APIs using MTP protocol to communicate with device?

    or I have to use those win32 COM APIs(PortableDeviceApi.h, wpdmtpextensions.h...)

    Friday, April 06, 2012 7:53 AM
  • For Win8, there are no WinRT (i.e. Windows.*) APIs that allow you to use MTP protocol to communicate with the device from a Metro style app.

    The Win32/COM PortableDeviceAPI.h is available from C++ in a Metro style app, but is more intended for IHV/OEM device developers writing Metro style device apps.

    That said, we appreciate your feedback. What scenario(s) are you looking to enable that needs MTP access? Are you an IHV/OEM developer?

    Thanks,

    Lisa


    Friday, April 06, 2012 8:07 AM
  • I just want to get thumbnails from audio or video files that MSC mode provides. It's good to have device information such like battery capacity provided by WRT API. I even wish that MTP Device Service be supported. So I don't have to combined C++ and C# just for some MTP properties.

    Thanks your reply

    Friday, April 06, 2012 10:21 AM