[GEM-dev] Pix Video

ivan Chabanaud ivan at paradigme.org
Sun Aug 17 18:33:05 CEST 2008


Get into trouble with bttv card and v4l2

something go wrong
a go into
 Pixes/videoV4L2.cpp
in line 200

buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    buf.memory = V4L2_MEMORY_MMAP;

    if (-1 == xioctl (m_tvfd, VIDIOC_DQBUF, &buf)) {
      switch (errno) {
      case EAGAIN:
        //perror("VIDIOC_DQBUF: stopping capture thread!");
        /* goto stop_capturethread;*/
      case EIO:
        /* Could ignore EIO, see spec. */
        /* fall through */
      default:
        debugThread("V4L2: waited...");
        //post ("tat");
        //perror ("VIDIOC_DQBUF");
      }
    }

    //post("V4L2: grabbed %d", buf.index);

    me->m_currentBuffer=buffers[buf.index].start;
    //process_image (m_buffers[buf.index].start);



    /*   instruction non valide */
    //post("V4L2: entrée de  %d", m_tvfd);
    if (-1 == xioctl (m_tvfd, VIDIOC_QBUF, &buf)){

        switch (errno) {
                case EINVAL:
                        //post ("Argument");
                        /* Could ignore EIO, see spec. */
                        /* fall through */
                default:
                        debugThread("V4L2: waited...");
                        //post ("et cela en plus");
                        //perror ("VIDIOC_DQBUF");
        }


      //perror ("VIDIOC_QBUF");
    }


i must disconnect the error repport for running the video
and it's working OK with YUV, but the flow is not so good
thinking about prob with VIDIOC_DQBUF VIDIOC_QBUF
on
Linux version 2.6.24-19-server (buildd at terranova) (gcc version 4.2.3 with
pd 0.39.3
and Gem and Osprey 100


Ivan Chabanaud
06 21 03 76 13
http://www.chabalab.net





More information about the GEM-dev mailing list