Xgl and v4l2

Piotr Maksymiuk movikun at o2.pl
Sun Mar 5 15:38:15 PST 2006


Ive been using Xgl since David posted his tarball on his site, then
cvsed out of the xorg tree. After having general problems with Ubuntu
and Xgl i switched to Gentoo to have more strict control and to be more
upstream with what is happening to it. 

Now i use it day to day except for one thing. The most crucial part to
me - v4l seems currently to be broken with just about any v4l2
viewing/recording app. Since i already sent an email to David, ill just
paste my findings here.

[snip]there seems to be a nasty bug when using v4l2 and xvideo
together (think tvtime, xawtv and tuner cards). First off, im using
2.6.15, X.org 7 (modular), Mesa 6.5 alpha, and fglrx 8.8.25 (and yes, on
display :1) and with a Radeon 9500Pro 64MB. 

When using tvtime (input v4l2 output xv) i get this [1]
gstreamer-properties fails to construct a pipeline for xv output, and
v4l2 follows if xv is set as output. However, if i set No XV output amd
try v4l2 i get the video [2]. Resizing the video crashes gstreamer
properties. 

xawtv shows more details. If i compile it with xv support, and set xv as
output i get a black screen. If i set grabimage as output, i get the
same results as tvtime. However, compiling xawtv without xv output
yields something more interesting. xv gives nothing, however, grabimage
works same as gstreamer-properties. The video plays nice, until i try to
resize it. If i DO resize it, i get this : [3].

xvinfo shows this : X-Video Extension version 2.2
screen #0
  Adaptor #0: "Xgl Generic Texture Video"
    number of ports: 32
    port base: 48
    operations supported: PutImage
    supported visuals:
      depth 24, visualID 0x2c
      depth 24, visualID 0x2d
      depth 32, visualID 0x2e
      depth 32, visualID 0x2f
    no port attributes defined
    maximum XvImage size: 2048 x 2048
    Number of image formats: 3
      id: 0x32595559 (YUY2)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x0
        guid: 03000000-0000-0010-8000-00aa00389b71
        bits per pixel: 32
        number of planes: 1
        type: RGB (packed)
        depth: 24
        red, green, blue masks: 0xff0000, 0xff00, 0xff

Using -accel xv:pbuffer or -accel xv or omiting xv options altogether
gives the same result.

Also, one more thing. When using v4l2 as input and xv as output MAJORLY
slows down Xgl. Usually it runs super smooth, but when using this
combination it seems VERY sluggish, about 3-4 fps. When using grabimage
in xawtv everything still runs smoothly.

[1] http://movikun.ormgas.com/Xgl/1.png
[2] http://movikun.ormgas.com/Xgl/2.png
[3] http://movikun.ormgas.com/Xgl/3.png

What interests me : where exactly does this bug lay, why and what has to
be fixed. Ill be more than happy to assist in any debugging.




More information about the xorg mailing list