mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
camerabin: stop ongoing capture if changing resolution
This commit is contained in:
parent
cad76384b3
commit
cbcd4e3330
1 changed files with 3 additions and 0 deletions
|
@ -2937,6 +2937,9 @@ gst_camerabin_user_res_fps (GstCameraBin * camera, gint width, gint height,
|
||||||
GST_INFO_OBJECT (camera, "switching resolution to %dx%d and fps to %d/%d",
|
GST_INFO_OBJECT (camera, "switching resolution to %dx%d and fps to %d/%d",
|
||||||
width, height, fps_n, fps_d);
|
width, height, fps_n, fps_d);
|
||||||
|
|
||||||
|
/* Interrupt ongoing capture */
|
||||||
|
gst_camerabin_do_stop (camera);
|
||||||
|
|
||||||
gst_element_get_state (GST_ELEMENT (camera), &state, &pending, 0);
|
gst_element_get_state (GST_ELEMENT (camera), &state, &pending, 0);
|
||||||
if (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING) {
|
if (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING) {
|
||||||
GST_INFO_OBJECT (camera,
|
GST_INFO_OBJECT (camera,
|
||||||
|
|
Loading…
Reference in a new issue