[Request] MediaTransferProtocol (MTP, PlaysForSure) fplugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jj42
Junior Member
Junior Member
Posts: 50
Joined: 2007-08-18, 23:17 UTC

Post by *jj42 »

I just did some more tests, putting mp3s and oggs in the "root" Music directory and in other places. It's still the same, so I guess it's not the directory problem. And it's also not the file-type problem, because the same mp3 put on via the Samsung software or the explorer does work.

When I disconnect the player after putting on the files with the plugin it _does_ show "updating DB..." on its display. So it seems to realize that there are new files, but it still can't put them into its database.

I also noticed that when I add OGGs with the plugin, they show up in the "songs" menu only with their filename.ogg. When I use the Samsung software, they show up with their title (from the tag). When I play any of them, the player reads the artist and title tag correctly. Looks like the software actually does "parse" the OGGs a bit and puts them into the database just half-assedly (only in the songs-menu, not in artist or album). I have already e-mailed Samsung support - they agree that OGGs aren't integrated in this player as fully as MP3s... and they relayed my request for a better compatibility to the "appropiate places". I hope that's not just polite talk, and maybe someone writes a few lines of OGG support into the next firmware update.

oops... sorry for going a bit off-topic, this hasn't much to do with the plugin ;) So, if you can find a command to force a re-build of the database, that would be great! If there's no such command, I'll still use the plugin to give my player more of a USB-stick capability.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I made some reasearch on the net, and found some interesting information at:
http://ureader.com/message/1341155.aspx
I found a very IMPORTANT thing about IWMDMStorageControl->Insert, this method should be replaced with IWMDMStorageControl3->Insert3.

The reason is: IWMDMStorageControl->Insert just support the portable devices which is compatible with WMP9, but not WMP10. The structure in WMP10 is totally changed, and we can not use IWMDMStorageControl->Insert to insert WMA or MP3 files to make device accept it. Even the file was inserted, we will never see the file listed in the file list of device.......
It seems that the "Samsung YP-U3" is a WMP10 device, so you really have a problem with my first plugin version. I have changed it to use Insert3 instead of Insert if available, but with empty meta data as suggested in this Microsoft knowledge base article.

I have uploaded the new beta to the same address, you can get it here:
Windows Media Device plugin 0.2 beta
The sources

I haven't had the time yet to work on playlists, but I found some useful interfaces and sample code for them, so there is hope. But first we have to get it to work with your devices...
Author of Total Commander
https://www.ghisler.com
jj42
Junior Member
Junior Member
Posts: 50
Joined: 2007-08-18, 23:17 UTC

Post by *jj42 »

Hi Christian,

thanks again for your quick work!
I've installed the new plugin, but the behaviour of my player hasn't changed. :(
I don't know if it's a WMP10 device - there's no detailed information in the manual. Probably it is, since it's quite a new model, and I suspect they'd not use the "old" standard. I had to install WMP10 to get Windows to see it at all (I don't think you can get MTP-drivers without WMP10). But maybe they already use some WMP11 features? Or they just were a bit lazy and just checked that it works with their own software ;)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, MTP devices also work with WMP9. Unfortunately I have no idea which functions are used by WMP to upload the files. It's a big mess of functions, many of them in 2 or 3 variations and with multiple parameters...

All I could try is to set the Artist/Title fields manually (although Micorosft recommends not to do that). Please contact me by e-mail if you want to test this, it takes too long via the forum.
Author of Total Commander
https://www.ghisler.com
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

I've also tried the new plugin but after installing it I was not able to copy files into my device (see screenshot).
Sceenshot

Some feedback about the version beta1
-After having disconnected the device if I select the tab where the device was connected by mistake TC give the following access violation message :
Screenshot
- Same remarks/behaviours than jj42 with Zen Creative M

Wishlist :
- Being able to add mp3s, playlists, videos, images to the device and that they get indexed in the player's database. Currently they don't show up in the player's menus, so they can't be played.
- Would it be possible to display the rating of the mp3 in the WFX panel.

Thanks
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2gbo
Could you try beta 2 please? It uses a new upload function.

However, I fear that it will not work with your device either. Other developpers seem to have the same troubles, see for example:
http://www.ureader.com/message/33373689.aspx

Unfortunately the suggested fix via SetMetaData doesn't seem to help either...
Author of Total Commander
https://www.ghisler.com
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

ghisler(Author) wrote:2gbo
Could you try beta 2 please? It uses a new upload function.
I have tested with the beta 2 and it was with this version that I got the :
Error uploading file! message
I just made some more tests and I noticed that the above errors doesn't appear when I overwrite a file but only when I copy a new file


with the beta 1 I can copy without problem but mp3 are not displayed in the player's menu.
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I see - the new function used by beta 2 is probably the right one, just the empty meta data fields cause the problems with the player...
Author of Total Commander
https://www.ghisler.com
kovacsgejza
Junior Member
Junior Member
Posts: 14
Joined: 2006-06-05, 23:22 UTC

Post by *kovacsgejza »

Using beta2 with a Samsung YP-P2, I can't copy new files either, and I'm really looking forward to this plugin!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I haven't found out why the copying fails. I'm doing the copying just like in Microsoft's example. Maybe you habe a player which doesn't work with Windows Media Player 9?
Author of Total Commander
https://www.ghisler.com
kovacsgejza
Junior Member
Junior Member
Posts: 14
Joined: 2006-06-05, 23:22 UTC

Post by *kovacsgejza »

I solved the problem! Before calling pIWMDMStorageControl3->Insert3, pIStorage2 must be initialized to NULL. And that's all, now it's working perfectly for me.

And before I found that, I also found that you should set some basic metadata, altough it's not required. You can find samples in the SDK (GetFormatCodeFromFile(), GetMetaDataFromWMFSDK(), the help suggests that the file type is the most important).

Could you make a new release so others can confirm, too?
kovacsgejza
Junior Member
Junior Member
Posts: 14
Joined: 2006-06-05, 23:22 UTC

Post by *kovacsgejza »

I see that there are other functions which use pIStorage2 as an output parameter, like directory creation, and that works without initializing it to NULL, however that uses Insert, not Insert3. Anyway I think it's best if you always initialize those output parameters to NULL, just to be safe.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's very strange, thanks for the hint! I have added that now.

I have uploaded the new beta to the same address, you can get it here:
Windows Media Device plugin 0.4 beta
The sources

Btw, do the uploaded songs appear in the playlist then?
Author of Total Commander
https://www.ghisler.com
kovacsgejza
Junior Member
Junior Member
Posts: 14
Joined: 2006-06-05, 23:22 UTC

Post by *kovacsgejza »

It works for me, but I'm not using playlists. Let's wait for the others to confirm it's really good now.
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

With the beta 4 I can copy without problem (it was not working with beta2 see post above) but mp3 are still not displayed in the player's menu (Zen Creative M) :(
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
Post Reply