[PATCH] -wid: get initial window geometry
When -wid option is used, most VOs that support it start playing video at its original (unscaled) size in the top left corner of the window, and only scale it to the full window upon receipt of a ConfigureNotify event, if and when the window is resized. Also some VOs forget to map the window back after unmapping it and setting attributes, again when -wid is in use. Attached patch solved the problem here. It would remove the need for (some of) ugly hackery in MPlayer frontends. -- kiriuja
When -wid option is used, most VOs that support it start playing video at its original (unscaled) size in the top left corner of the window, and only scale it to the full window upon receipt of a ConfigureNotify event, if and when the window is resized.
Also some VOs forget to map the window back after unmapping it and setting attributes, again when -wid is in use.
Attached patch solved the problem here. It would remove the need for (some of) ugly hackery in MPlayer frontends.
This has been ready to be applied since July 16, but produced no response. http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-July/027318.html http://bugzilla.mplayerhq.hu/show_bug.cgi?id=36 It still applies cleanly (with offsets) against the current CVS. Please consider. -- kiriuja
Updated patch, compiles against the current CVS. The patch would help avoid unnecessary flicker in MPlayer frontends that use the -wid option. Please consider. -- kiriuja
kiriuja writes:
Updated patch, compiles against the current CVS.
The patch would help avoid unnecessary flicker in MPlayer frontends that use the -wid option.
Ivan, beastd, could you check and apply this? Diego
On Fri, 17 Sep 2004 03:28:38 +0200 Diego Biurrun <diego@biurrun.de> wrote:
kiriuja writes:
Updated patch, compiles against the current CVS.
The patch would help avoid unnecessary flicker in MPlayer frontends that use the -wid option.
Ivan, beastd, could you check and apply this?
Yes, could someone check this ? Attila Kinali -- egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger -- reeler in +kaosu
On Sun, 17 Oct 2004 17:03:22 +0200 Attila Kinali <attila@kinali.ch> wrote:
On Fri, 17 Sep 2004 03:28:38 +0200 Diego Biurrun <diego@biurrun.de> wrote:
kiriuja writes:
Updated patch, compiles against the current CVS.
The patch would help avoid unnecessary flicker in MPlayer frontends that use the -wid option.
Ivan, beastd, could you check and apply this?
Yes, could someone check this ?
I haven't tested the patch, but I don't see any reason not to be applied. At least the changes appear in if(win_id) block so there is no way to affect normal functionality. Beastd take a look please. Wish You Best Ivan Kalvachev iive p.s. the border variable could be defined in the if(){int border...} for nicer reading. Not critical btw.
Ivan Kalvachev wrote ( On Thu, Dec 09, 2004 at 05:02:13AM +0200 ):
On Sun, 17 Oct 2004 17:03:22 +0200 Attila Kinali <attila@kinali.ch> wrote:
On Fri, 17 Sep 2004 03:28:38 +0200 Diego Biurrun <diego@biurrun.de> wrote:
kiriuja writes:
Updated patch, compiles against the current CVS.
The patch would help avoid unnecessary flicker in MPlayer frontends that use the -wid option.
Ivan, beastd, could you check and apply this?
Yes, could someone check this ?
I haven't tested the patch, but I don't see any reason not to be applied. At least the changes appear in if(win_id) block so there is no way to affect normal functionality.
Beastd take a look please.
Seems ok for xv and x11. Tested it a bit and the behaviour introduced by this patch is imho better and more consistent. For what to do about the others, i'm not sure. I don't think Attila has time for reviewing the changes and the other one no idea. I can take a look at the other parts too, but don't expect it earlier than in a week. I don't think i can even test all of them, so for some i can at most only review the code with my imagination. At least i could apply the changes for vo xv and vo x11. But it think if the others have bugs and it fairly seems so, they should be fixed too ( mplayer vos are inconsistent enough ). Alex (beastd)
This patch has been pending since July, and I haven't seen any response, so I am reposting it. The attached version still applies, compiles and works. It fixes some X11 based VOs that don't take into account the size of the window given by the -wid option. So the video is placed unscaled in the top left corner of the window. When the window gets a resize event, the video takes up the entire window area. So the patch changes the -wid part of each VO config function to get the window geometry just like a resize event does. The affected VOs are x11, xmga, xv and xvmc. The patch also fixes X11 based VOs that forget to map the window back after unmapping it and changing the attributes, again when the window is given by the -wid option. (I have no idea why it needs to be unmapped in the first place, but I am assuming there is a reason.) The affected VOs are xmga, xover and xvidix. This is not a huge deal since I was able to hack around these things, but it took me a lot of time and frustration back in the days, and I'm sure everyone who tries to write an MPlayer frontend will struggle badly as well. Plus sometimes the video still flickers because of this. Please consider. -- kiriuja
Updated version of the patch attached. Sets the initial window coordinates correctly. -- kiriuja
kiriuja wrote:
Updated version of the patch attached.
Sets the initial window coordinates correctly.
Finally applied this version with some modifications. Alex (beastd)
participants (5)
-
Alexander Strasser -
Attila Kinali -
Diego Biurrun -
Ivan Kalvachev -
kiriuja