[MPlayer-users] Slave mode bugs (?) and Java Swing embedding

Javier Gálvez Guerrero javier.galvez.guerrero at gmail.com
Tue Sep 30 12:39:01 CEST 2008


Hi all,

I'm searching for a video player to embed in a Java Swing application,
then the video frame appears in a Java Swing window, not only the
commands interface.

In order to analyze if MPlayer is such a possible candidate I've
downloaded it (1.0rc2-4.2.3 in Ubuntu Linux, through Synaptics) and
given it a try.

I've read that it can be embedded into a Java Swing application
through the -wid and/or --guiwid options, but I don't know how the
window ID works. This is, how can I know the window ID for a Java
JFrame or the convenient window component? Is this way the correct one
to achieve what I want? Any idea, suggestion or example to make it
clearer?

Beside that, I've been testing slave mode capabilities, given that
this is the interface to use in case I got a MPlayer video frame
embedded. I need to manage playlists with the media player, so I've
been testing the 'loadfile' command and found some weird behaviors.

I start MPlayer this way:
$: mplayer -slave -quiet -idle

Then, I open the first item of the playlist:
loadfile path/to/file0 0

While this item is being played, I add some files (no matter how many they are):
loadfile path/to/file1 1
loadfile path/to/file2 2
loadfile path/to/file3 3

MPlayer plays nicely all added items but if I try to "restart" the
playlist (loadfile path/to/new/file0 0) MPlayer stops playing the
current item, and starts playing it again (the one that was being
played at the time of adding the new file0). After finishing playing
this item, the player stops and doesn't play anything more till more
items are added, so items added after the last played are never
played. Calling 'stop' before "restarting" the playlist doesn't help
('stop' doesn't work at all, MPlayer keeps on playing without taking
care of 'stop' command). I've tried with local files of different
formats and RTSP streams with same results.

So, my doubts are:

- Am I using correctly MPlayer and slave mode?
- Are these issues bugs?
- If yes, are they known and/or are going to be solved?


Any help would be much appreciated. Thank you all.

Regards,
Javi



More information about the MPlayer-users mailing list