mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +00:00
v4l2: start streaming for the output as well
This commit is contained in:
parent
d9e61954a1
commit
387e76114d
1 changed files with 7 additions and 9 deletions
|
@ -2351,21 +2351,19 @@ gst_v4l2_object_start (GstV4l2Object * v4l2object)
|
||||||
gst_v4l2_buffer_pool_get (v4l2object->pool, FALSE)) != NULL)
|
gst_v4l2_buffer_pool_get (v4l2object->pool, FALSE)) != NULL)
|
||||||
if (!gst_v4l2_buffer_pool_qbuf (v4l2object->pool, buf))
|
if (!gst_v4l2_buffer_pool_qbuf (v4l2object->pool, buf))
|
||||||
goto queue_failed;
|
goto queue_failed;
|
||||||
|
|
||||||
if (!v4l2object->streaming) {
|
|
||||||
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_STREAMON,
|
|
||||||
&(v4l2object->type)) < 0)
|
|
||||||
goto start_failed;
|
|
||||||
v4l2object->streaming = TRUE;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
|
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
|
||||||
/* for output, do nothing. We will start streaming when we get the
|
/* for output, we assume we already queued a buffer */
|
||||||
* first buffer */
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!v4l2object->streaming) {
|
||||||
|
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_STREAMON,
|
||||||
|
&(v4l2object->type)) < 0)
|
||||||
|
goto start_failed;
|
||||||
|
v4l2object->streaming = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue