After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 98263 - XV patch for GStreamer
XV patch for GStreamer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-11-11 22:06 UTC by Christian Fredrik Kalager Schaller
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
XV patch (2.07 KB, patch)
2002-11-11 22:07 UTC, Christian Fredrik Kalager Schaller
none Details | Review

Description Christian Fredrik Kalager Schaller 2002-11-11 22:06:41 UTC
Patch from Ben Liblit <liblit@eecs.berkeley.edu> (adding it here so I will
not forget to get it merged)

My video card (a GeForce 3) offers several settable XVideo attributes, 
such as brightness, contrast, etc.  Two of those attributes are 
XV_COLORKEY and XV_AUTOPAINT_COLORKEY.  I don't *completely* understand 
these, but the impression that I get is that XV_COLORKEY is a pixel 
which will be used as a video output mask: video is only painted over 
those parts of the window which are colored using the XV_COLORKEY pixel.

In the common case where you don't want any masking at all, you can fill 
the entire window using XV_COLORKEY.  A simpler approach, though, is to 
set the boolean XV_AUTOPAINT_COLORKEY attribute to "true".  This 
apparently causes the driver to do the XV_COLORKEY window filling 
automatically.

Curiously, the Xine movie player turns XV_AUTOPAINT_COLORKEY off, and 
leaves it off even after it is done.  So any subsequent video player 
that comes along will not get any video in its video window unless it 
either turns XV_AUTOPAINT_COLORKEY back on or else does some painting of 
its own using the XV_COLORKEY pixel.  GStreamer suffers from exactly 
this bug.  If Xine has *ever* been run on a display, then GStreamer's 
xvideosink plugin will not yield any output.  :-(

Attached below please find a small patch to fix this problem by turning 
XV_AUTOPAINT_COLORKEY back on.  I've tested it on my system and it works 
like a charm.  It should harmlessly do nothing on video cards that don't 
have this attribute at all.  The patch fixes both videosink and 
xvideosink.  I fixed the former before learning that it has been 
deprecated by the later.  Feel free to ignore the videosink change if 
that code is truly dead.

MPlayer had this same bug until very recently; I discovered the problem 
and submitted essentially the same fix, which was incorporated into the 
recent mplayer 0.90-pre9 release.  If you're interested, see 
<http://mplayerhq.hu/pipermail/mplayer-users/2002-October/022024.html> 
and 
<http://mplayerhq.hu/pipermail/mplayer-dev-eng/2002-October/012071.html> 
for archives of the discussions which led to my current understanding of 
the issue.
Comment 1 Christian Fredrik Kalager Schaller 2002-11-11 22:07:37 UTC
Created attachment 12241 [details] [review]
XV patch
Comment 2 Christian Fredrik Kalager Schaller 2002-11-15 00:40:57 UTC
Patch reviwed by Wim Taymans and commited by me.