v4l2: start streaming for the output as well

This commit is contained in:
Wim Taymans 2011-07-13 16:40:39 +02:00
parent d9e61954a1
commit 387e76114d

View file

@ -2351,21 +2351,19 @@ gst_v4l2_object_start (GstV4l2Object * v4l2object)
gst_v4l2_buffer_pool_get (v4l2object->pool, FALSE)) != NULL)
if (!gst_v4l2_buffer_pool_qbuf (v4l2object->pool, buf))
goto queue_failed;
break;
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
/* for output, we assume we already queued a buffer */
break;
default:
break;
}
if (!v4l2object->streaming) {
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_STREAMON,
&(v4l2object->type)) < 0)
goto start_failed;
v4l2object->streaming = TRUE;
}
break;
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
/* for output, do nothing. We will start streaming when we get the
* first buffer */
break;
default:
break;
}
}
return TRUE;