[MPlayer-users] [wxPython-users] Re: how to embed a mplayer vidio play window into wxpython

Timothy W. Grove tim_grove at sil.org
Wed Feb 17 01:57:09 CET 2010


Thanks for the suggestions, Reimar, but they didn't really get me much 
further.

Reimar Döffinger wrote:
> On Tue, Feb 16, 2010 at 05:16:03AM +0000, Timothy W. Grove wrote:
>   
>> I started out using
>> "-vo direct3d" for my target driver which worked well but I couldn't
>> get mplayer to resize along with containing window. Fortunately,
>> this issue went away when I switched to "-vo gl".
>>     
>
> Hm? Those two use the same code for handling the resizing, and SMPlayer
> seems to work fine with both.
>   
Well, not in my application. Sure, if I resize the containing window (in 
my case a wx.SplitterWindow) and then play the movie from paused, it 
will rescale to fill the window, but I want it to rescale as I resize 
the window with the splitter. This latter action works when I use "-vo 
gl", so I am happy enough. Incidentally, my argument list is:

args = [self.MPLAYER_PATH,
                    '-nofontconfig', 
                    '-slave', '-idle',
                    '-msglevel', 'all=5', #default all=5
                    '-nosound',
                    '-noconsolecontrols',
                    '-fixed-vo',
                    '-vo', 'gl',
                    '-vf', 'crop=448:416:108:112',
                    '-wid', str(self.window),
                    ]
I load my movie files elsewhere in the application using the slave 
command 'loadfile' through a named PIPE.
>   
>> The real puzzler is how to get a player window to refresh when
>> another window has covered it. The behaviour that I'm seeing under
>> WindowsXP (and Vista with 'desktop composition' disabled) is that
>> when another window is placed over the mplayer window and removed,
>> it either leaves an imprint of itself on mplayer (XP) or erases the
>> mplayer image to a white background (Vista). When the mplayer window
>> is then resized or movie playback restarted, the window will refresh
>> itself, but I'd prefer that the window wasn't invalidated in the
>> first place! A further observation is that this only seems to happen
>> when a movie is allowed to run to its end and the player is in an
>> idle state. (My arguments read 'mplayer.exe -slave -idle ... ') When
>> it is first loaded or paused during play, then a covering window has
>> no damaging effect. I think you did mention something along these
>> lines as a possible issue; have you (or anyone else on these lists)
>> found a possible solution? Thanks for any suggestions.
>>     
>
> Just don't use -fixed-vo, there is no real advantage in your use case,
> and it allows you to draw whatever you want on the window while MPlayer
> is idle.
>   
If I remove "-fixed-vo" from my list of arguments, then I end up with 
black screen when my video finishes instead of the final frame showing.

Thanks anyway. Best regards,
Tim
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
> X-Quarantine ID  /var/spool/MD-Quarantine/13/qdir-2010-02-16-13.12.00-001
>
>   


More information about the MPlayer-users mailing list