mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
v4l2camerasrc: Fix image capture
Once a image is captured, v4l2camerasrc should return to the preview mode and stop capturing.
This commit is contained in:
parent
6c7d7946f5
commit
596422d19c
1 changed files with 8 additions and 1 deletions
|
@ -147,8 +147,15 @@ gst_v4l2_camera_src_imgsrc_probe (GstPad * pad, GstBuffer * buffer,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GstV4l2CameraSrc *self = GST_V4L2_CAMERA_SRC (data);
|
GstV4l2CameraSrc *self = GST_V4L2_CAMERA_SRC (data);
|
||||||
|
gboolean ret;
|
||||||
GST_DEBUG_OBJECT (self, "pass buffer: %d", self->mode == MODE_IMAGE);
|
GST_DEBUG_OBJECT (self, "pass buffer: %d", self->mode == MODE_IMAGE);
|
||||||
return self->mode == MODE_IMAGE;
|
|
||||||
|
ret = self->mode == MODE_IMAGE;
|
||||||
|
if (ret) {
|
||||||
|
self->mode = MODE_PREVIEW;
|
||||||
|
g_object_notify (G_OBJECT (self), "mode");
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue