[MPlayer-dev-eng] Re: changing file mid-playback

David Toso dtoso at optushome.com.au
Wed Dec 4 09:34:48 CET 2002


Hi mplayer developers,

I am prototyping a PVR (like TiVo) software system with a number of differences.
I have decided to use mplayer & mencoder as the basis for most playback/recording
tasks within the software.
 
Specifically I am working atm on a "recorded movies" paged-menu subsystem. Each
page of the menu has (up to) 6 mplayer "objects". Each mplayer is playing a different
20-second 352x240 MPEG1 stream. 
 
I'll spare you the details of how I've butchered mplayer itself but to say:
  - uses vo_sdl, frameless windows
  - vo_sdl talks directly via socket to hacked wm2 (window manager) so that 
    initial placement of each mplayer window is pre-arranged. (stops drag
    artifacts associated with XMoveWindow).
  - in slave mode, the playback window does not accept mouse/key events. 
  - mplayer starts "paused", so a pause (slave-mode) command must be 
    given to play the movie. (used for multi-mplayer syncronisation).
  - various means employed to give input focus to (menu) window _behind_ the 
    mplayer windows, and the mouse has been totally disabled.

The main problem I am currently having is that moving between "pages"
of the menu is slow due to the time necessary to rip-down 6 and set-up
6 new mplayer instances. (with 6 completely different files btw).
 
I am trying to figure out if it would be possible to start playing one MPEG
file, then at some point later during it's playback, switch to another MPEG 
file, without of course completely restarting mplayer. I don't know what the 
file will be in advance (but will play the rotating symlinks game if that is 
an option :-).
 
To do this I was thinking about hacking vo_sdl (sorry author) again so
that it does not uninit & init. I was guessing I then need to hack something
in the demuxer. (and add input options for all this).
 
Can you provide any advice as to where I should start (and NOT start :-)
in the demuxer to achieve this? Or if that sounds like a dumb idea, is
there a better way to do it?

Also, assuming that this would work, can I avoid uninit & reinit of any other
subsystems? (I can guarantee that movies will all be of the same encoding
and codec -- most likely MPEG1).
 
Thanks in advance for any advice.
 
David Toso.
 



More information about the MPlayer-dev-eng mailing list