mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
camerabin: set camerabin to READY before accessing the elements
This commit is contained in:
parent
65a2e3c605
commit
0a13cfdaf1
1 changed files with 7 additions and 7 deletions
|
@ -560,6 +560,13 @@ setup_pipeline (void)
|
||||||
|
|
||||||
GST_INFO_OBJECT (camera_bin, "elements created");
|
GST_INFO_OBJECT (camera_bin, "elements created");
|
||||||
|
|
||||||
|
if (GST_STATE_CHANGE_FAILURE ==
|
||||||
|
gst_element_set_state (camera_bin, GST_STATE_READY)) {
|
||||||
|
g_warning ("can't set camerabin to ready\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
GST_INFO_OBJECT (camera_bin, "camera ready");
|
||||||
|
|
||||||
/* set properties */
|
/* set properties */
|
||||||
g_object_set (camera_bin, "filename", filename->str, NULL);
|
g_object_set (camera_bin, "filename", filename->str, NULL);
|
||||||
|
|
||||||
|
@ -636,13 +643,6 @@ setup_pipeline (void)
|
||||||
video_height, view_framerate_num, view_framerate_den, NULL);
|
video_height, view_framerate_num, view_framerate_den, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GST_STATE_CHANGE_FAILURE ==
|
|
||||||
gst_element_set_state (camera_bin, GST_STATE_READY)) {
|
|
||||||
g_warning ("can't set camerabin to ready\n");
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
GST_INFO_OBJECT (camera_bin, "camera ready");
|
|
||||||
|
|
||||||
if (GST_STATE_CHANGE_FAILURE ==
|
if (GST_STATE_CHANGE_FAILURE ==
|
||||||
gst_element_set_state (camera_bin, GST_STATE_PLAYING)) {
|
gst_element_set_state (camera_bin, GST_STATE_PLAYING)) {
|
||||||
g_warning ("can't set camerabin to playing\n");
|
g_warning ("can't set camerabin to playing\n");
|
||||||
|
|
Loading…
Reference in a new issue