Skip to main content

Open Source

Go Search
Home
ALchemy
Beta - Audigy [CLOSED]
Beta - Linux
Beta - Windows
Developer
E-MU
MarCom
OpenAL
Open Source
  
Creative Labs: Connect > Open Source > Wiki > mtp_xfer_art  

mtp_xfer_art


MTP File Transfer With Artwork on Windows


Introduction:

When transferring audio files to an MTP device, it is often desired to transfer a thumbnail image showing artwork to be displayed during playback. This is done two different ways, depending on the device manufacturer:

  • a) The artwork may be contained in the media file itself. For instance, in MP3 files this would be in the ID3v2 tag. Media file types which don't support embedded artwork would be displayed without artwork.
  • b) The artwork may be contained in an album object on the media player, which is associated with one or more media files of arbitrary type. The artwork need not be embedded in each individual file.
Creative MTP devices use method "b," which is what is going to be described below.

Instructions:

1) Download the Windows Media Format 9.5 SDK, which includes the Windows Media Device Manager 10 SDK. The SDK should be available at http://msdn.microsoft.com/windowsmedia/downloads/default.aspx (wmformat95sdk.exe).

2) Install the SDK.

3) Add the new lib and include directories (by default, c:\wmsdk\wmfsdk95\include, c:\wmsdk\wmfsdk95\wmdm\inc, c:\wmsdk\wmfsdk95\lib, and c:\wmsdk\wmfsdk95\wmdm\lib) into your IDE. For VS2005, this is done by selecting the panel at Tools..Options..Projects&Solutions..VC++ Directories. Other Microsoft development environments are similar.

4) Create a new 32-bit C++ command-line application template and test to make sure it compiles and links properly.

5) Replace the template code with MTP Transfer with Art Code
.

6) Download the test file testfile.mp3
and place it in c:\music\ (or change the code to match where you put it).

7) Download the test file Test Image for Transfer with Arttestart.jpg 
and place it in c:\music\ (or change the code to match where you put it).

8) Add the library "mssachlp.lib" to the debug and release build linker input library settings.

9) Build the revised project and run it.

Depending on what devices are available on your system, you should now be able to enumerate and see the properties of various media devices on your system, including connected Creative media devices.

Notes:


The file wmdm.chm (default location c:\wmsdk\wmfsdk95\docs\wmdm.chm) is the help file -- very useful.

If you are running 64-bit Windows, the Windows Media Format 9.5 SDK installer isn't going to run. You can probably extract the contents of the SDK manually if necessary, but if you have a 32-bit installation available, use that and then transfer the files over manually to your 64-bit machine.

Last modified at 12/5/2007 2:41 PM  by Phillip Williams