patch against softdevice-CVS to not change picture settings (contrast, ...)

Message ID 4468E8FA.4010506@gmx.net
State New
Headers

Commit Message

Martin Wache May 15, 2006, 8:47 p.m. UTC
  Matthias Schwarzott schrieb:
> Hi!
> 
> I have written this patch for the softdevice xv-output method to stop it from 
> changing all my xv output settings (contrast brightness hue saturation).
> I mainly use the new shm-output communication with xv.
> 
> I know that it is in some parts a hack, but I hope that a similar patch will 
> be incorporated into the official version.
> 
I see your problem, this really should be solved soon. Your patch
disables the use of saved values for contrast, hue etc. for Xv-out as
well as shm-out, which is quite a nice feature if one doesn't want to
use the default values.
I would propose just to switch off the settings as long as one can't
change them from shm-out. My following, untestet patch should do that, I
will apply it if it works for you.

> The other problem I could not solve myself is that the colorkey setting of xv 
> gets modified to colorkey=black, which makes every window containing black 
> areas transparent, this is just annoying.
> 
On the long term I planned to make the colorkey adjustable. The osd
system is already prepared for it, only video-xv needs to be tweaked. If
you want to work on this, look for "color key" comment inside SoftOsd.c,
and the COLOR_KEY constant in SoftOsd.h. In video-xv you obviously also
have to adjust the color key and either manualy draw a rectangle with
the color key where the video is to be displayed or switch on the auto
paint color key (which may collide with the osd drawing). The only
problem is to get it running for the different colour depth, the easiest
is 32bit, so you may want to start with that. For the other color depth
the color key has to be converted to the corresponding color depth.

Bye,
Martin
  

Comments

Stefan Lucke May 15, 2006, 10:26 p.m. UTC | #1
On Montag 15 Mai 2006 22:47, Martin Wache wrote:
> Matthias Schwarzott schrieb:
> > Hi!
> > 
> > I have written this patch for the softdevice xv-output method to stop it from 
> > changing all my xv output settings (contrast brightness hue saturation).
> > I mainly use the new shm-output communication with xv.
> > 
> > I know that it is in some parts a hack, but I hope that a similar patch will 
> > be incorporated into the official version.
> > 
> I see your problem, this really should be solved soon. Your patch
> disables the use of saved values for contrast, hue etc. for Xv-out as
> well as shm-out, which is quite a nice feature if one doesn't want to
> use the default values.

Another additional argument for xv-out (dfb-out) could be: leave settings as is.

> I would propose just to switch off the settings as long as one can't
> change them from shm-out. My following, untestet patch should do that, I
> will apply it if it works for you.
> 
> > The other problem I could not solve myself is that the colorkey setting of xv 
> > gets modified to colorkey=black, which makes every window containing black 
> > areas transparent, this is just annoying.

But this happens only for windows which overlap video window.

> > 
> On the long term I planned to make the colorkey adjustable. The osd
> system is already prepared for it, only video-xv needs to be tweaked. 

You could set color key to an arbitrary OSD color which has a alpha value
of 0 (full transparent), but then you'll get perhaps red, green or something
else colored stripes above and below during letterboxing (left/right
during pillar boxing).

> If you want to work on this, look for "color key" comment inside SoftOsd.c,
> and the COLOR_KEY constant in SoftOsd.h. In video-xv you obviously also
> have to adjust the color key and either manualy draw a rectangle with
> the color key where the video is to be displayed or switch on the auto
> paint color key (which may collide with the osd drawing). The only
> problem is to get it running for the different colour depth, the easiest
> is 32bit, so you may want to start with that. For the other color depth
> the color key has to be converted to the corresponding color depth.
> 
> Bye,
> Martin
>
  

Patch

Index: video-xv.c
===================================================================
RCS file: /cvsroot/softdevice/softdevice/video-xv.c,v
retrieving revision 1.54
diff -u -r1.54 video-xv.c
--- video-xv.c	24 Apr 2006 22:56:47 -0000	1.54
+++ video-xv.c	15 May 2006 20:32:17 -0000
@@ -705,7 +705,9 @@ 
       PutXvImage();
       XSync(dpy, False);
     }
+#ifndef STAND_ALONE
     attributeStore.CheckVideoParmChange();
+#endif
   }
 
   if(cursor_visible == True) {