[MPlayer-dev-eng] [PATCH] avoid flickering while resize

Tomas Simonaitis haden at homelan.lt
Mon Aug 25 21:39:24 CEST 2003


On Monday 25 August 2003 21:41, Attila Kinali wrote:
> On Fri, 22 Aug 2003 13:41:57 +0300
>
> Tomas Simonaitis <haden at homelan.lt> wrote:
> > Patch applies for vo_xv only.
>
> That's bad ;)

Then I'll update other vo's too ;)

>
> Allocating and freeing a GC al the time when an Exposure event is caught
> isn't a good idea. Please allocate it on init (wasnt' there one already ?)
> and free it on uninit.
>
No argue, I'll fix that.

>
> Just curious, what for do you need gravitiy here?
>
Well based on Xlib documentation:
"A bit-gravity of ForgetGravity [which is default] indicates that the window's 
contents are always discarded after a size change, even if a backing store or 
save under has been requested."

> > @@ -424,9 +438,9 @@
> >       mp_msg(MSGT_VO,MSGL_V, "[xv-fs] dx: %d dy: %d dw: %d dh:
> > %d\n",drwX,drwY,vo_dwidth,vo_dheight ); }
> >    }
> > - if ( e & VO_EVENT_EXPOSE )
> > + if ( e & VO_EVENT_EXPOSE && int_pause)
> >    {
> > -#ifdef HAVE_SHM
> > +/*#ifdef HAVE_SHM
>
> Oops.. this will break compile on systems that do not have shared
> memory.

How come? I didn't really understood why this code:
//
#ifdef HAVE_SHM
   if ( Shmem_Flag )
    {
     XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[current_buf], 
0, 0,  image_width, image_height, drwX, drwY, 1, 1, False);
     XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[current_buf], 
0, 0,  image_width, image_height, drwX,drwY,vo_dwidth,(vo_fs?vo_dheight - 
1:vo_dheight), False);
    }
   else
#endif
    {
     XvPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[current_buf], 0, 
0,  image_width, image_height, drwX, drwY, 1, 1);
     XvPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[current_buf], 0, 
0,  image_width, image_height, drwX,drwY,vo_dwidth,(vo_fs?vo_dheight - 
1:vo_dheight));
    }
  }
//
 is used while there is flip_page() function which draws current frame (and  
also has ifdefs for shared memory.
So I comented it out and changed with flip_code().
Of course there might be difference, I don't know really...

>
> Otherwise i'd say the patch is ok (although i had only a quick look at it)
>
> 			Attila Kinali

I've found little bug with pausing, I'll fix it together with other fixes you 
mentioned.
-------------------------------------------------------------------------------------

I have additional idea: currently unused borders due different aspect ratio 
are, well, unused :)
It would be nice idea to put some OSD data there (time, progress), or maybe 
even subtitles, so they won't interfare with movie. 
What do you think?





More information about the MPlayer-dev-eng mailing list