Hi,
Currently uvcvideo does not work in transcode because the uvcvideo
driver does not implement all the v4l2 ioctl (those that do not have
to do with digital video are not implemented), in this patch
VIDIOC_G_STD is allowed to fail.
Further, this patch (against svn HEAD) fixes STREAMON/STREAMOFF ioctl calls.

Anyway, when i run:
transcode -x v4l2 -o tv2.avi -f 30 -i /dev/video0 -y ffmpeg -F mpeg4
-p /dev/dsp -b 128 -g 640x480 -u 128  -H 0  -w 1500
I always encode at 1.0 fps. Is this another bug or am i doing
something wrong in the command line?


Index: import/v4l/import_v4l2.c
===================================================================
RCS file: /cvstc/transcode/import/v4l/import_v4l2.c,v
retrieving revision 1.31
diff -u -r1.31 import_v4l2.c
--- import/v4l/import_v4l2.c    6 Oct 2006 06:08:18 -0000       1.31
+++ import/v4l/import_v4l2.c    21 Aug 2007 02:49:46 -0000
@@ -420,7 +420,7 @@
 static int v4l2_video_init(int layout, const char * device, int width,
                           int height, int fps, const char * options)
 {
-       int ix, found;
+       int ix, found, dummy;
        v4l2_format_convert_table_t * fcp;

        struct v4l2_cropcap cropcap;
@@ -521,7 +521,10 @@
                format.fmt.pix.pixelformat      = fcp[ix].v4l_format;

                if(ioctl(v4l2_video_fd, VIDIOC_S_FMT, &format) < 0)
+               {
                        tc_log_perror(MOD_NAME, "VIDIOC_S_FMT: ");
+                       tc_log_error(MOD_NAME, "Pixel format conversion: %s", 
fcp[ix].description);
+               }
                else
                {
                        tc_log_info(MOD_NAME, "Pixel format conversion: %s", 
fcp[ix].description);
@@ -607,8 +610,9 @@

        if(ioctl(v4l2_video_fd, VIDIOC_G_STD, &stdid) < 0)
        {
-               tc_log_perror(MOD_NAME, "VIDIOC_QUERYSTD: ");
-               return(1);
+        tc_log_warn(MOD_NAME, "driver does not support get std
(ioctl(VIDIOC_G_STD) returns \"%s\")",
+            errno <= sys_nerr ? sys_errlist[errno] : "unknown");
+        memset(&stdid, 0, sizeof(v4l2_std_id));
        }

        if(stdid & V4L2_STD_525_60)
@@ -819,8 +823,9 @@
                return(1);

        // start capture
+    dummy = V4L2_BUF_TYPE_VIDEO_CAPTURE;

-       if(ioctl(v4l2_video_fd, VIDIOC_STREAMON, &v4l2_video_fd /* ugh,
needs valid memory location */) < 0)
+       if(ioctl(v4l2_video_fd, VIDIOC_STREAMON, &dummy /* ugh, needs
VIDEO_CAPTURE */) < 0)
        {
                tc_log_perror(MOD_NAME, "VIDIOC_STREAMON");
                return(1);
@@ -845,6 +850,8 @@
                                    v4l2_buffers_count - buffers_filled,
                                    v4l2_buffers_count);

+            dummy = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
                        if(ioctl(v4l2_video_fd, VIDIOC_STREAMOFF, &dummy) < 0)
                                tc_log_perror(MOD_NAME, "VIDIOC_STREAMOFF");

@@ -931,6 +938,8 @@
        if(!v4l2_mute(1))
                return(1);

+    dummy = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
        if(ioctl(v4l2_video_fd, VIDIOC_STREAMOFF, &dummy /* ugh */) < 0)
        {
                tc_log_perror(MOD_NAME, "VIDIOC_STREAMOFF");



-- 
Ciao
Maurizio
http://stregatto.wordpress.com

"Well we all shine on
Like the moon and the stars and the sun" (John Lennon)

Reply via email to