[GEM-dev] Broken gem support for UYVY V4L capture? WAS V4l2 :: Debugging an issue with cx8800 card.
B. Bogart
ben at ekran.org
Fri Sep 12 02:44:57 CEST 2008
Hey Johannes,
I've read through the v4l code in Gem and realized an important issue:
1. My previous post about resolution and problems with "VIDIOCMCAPTURE1:
Invalid argument" messages was due to me using v4l1 not 2!
2. As best as I can tell, while using v4l2, my UYVY card does not work
at all.
In the PD window I get:
video driver 0: video4linux2
video driver 1: ieee1394 for linux
v4l2: wanted 6408, got 'RGB4'
v4l2: GEM: pix_video: Opened video connection 0x12
STDERR gives me:
VIDIOC_DQBUF: stopping capture thread!: Resource temporarily unavailable
Resulting in an all black image.
I could not understand the reqFormat vs format stuff but I do know the
card produces V4L2_PIX_FMT_UYVY video.
I inserted a few statements at line 450 of videoV4L2.cpp (attached)
These statements result in:
bbogart: fmt.fmt.pix.pixelformat = 876758866
bbogart: m_reqFormat = 6408
bbogart: GL_YCBCR_422_GEM = 34233
bbogart: GL_LUMINANCE = 6409
bbogart: GL_RGB= 6407
bbogart: V4L2_PIX_FMT_UYVY = 1498831189
bbogart: V4L2_PIX_FMT_SBGGR8 = 825770306
bbogart: V4L2_PIX_FMT_GREY = 1497715271
bbogart: V4L2_PIX_FMT_YUYV = 1448695129
bbogart: V4L2_PIX_FMT_Y41P = 1345401945
bbogart: V4L2_PIX_FMT_YVU420 = 842094169
bbogart: V4L2_PIX_FMT_YVU410 = 961893977
bbogart: V4L2_PIX_FMT_YUV422P = 1345466932
bbogart: V4L2_PIX_FMT_YUV411P = 1345401140
bbogart: V4L2_PIX_FMT_NV12 = 842094158
Ok, so 6408 is RGBA.
So I send the "colorspace YUV" message to pix_video.
Now I see:
bbogart: fmt.fmt.pix.pixelformat = 1498831189
bbogart: m_reqFormat = 34233
bbogart: GL_YCBCR_422_GEM = 34233
bbogart: V4L2_PIX_FMT_UYVY = 1498831189
so that all looks correct fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY
and m_reqFormat = GL_YCBCR_422_GEM
BUT the PD console still prints:
v4l2: wanted 34233, got 'UYVY'
v4l2: GEM: pix_video: Opened video connection 0xE
But 34233 is a YUV format...
I still get the VIDIOC_DQBUF: stopping capture thread!: Resource
temporarily unavailable error.
So I'm stuck here, but I hope this helps enough that you can give me
more hints on what else to try.
Thanks,
B. Bogart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: videoV4L2.cpp
Type: text/x-c++src
Size: 18942 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20080911/490c9721/attachment.cpp>
More information about the GEM-dev
mailing list