mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
camerabin: Preserve unused imagebin or videobin on NULL
If video or image mode is never selected then respective bin is in NULL state. Preserve this state when resetting camerabin from PAUSED to READY.
This commit is contained in:
parent
cb0d2e9da0
commit
26553bfb1d
1 changed files with 6 additions and 2 deletions
|
@ -3851,8 +3851,12 @@ gst_camerabin_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
/* all processing should stop and those elements could have their state
|
||||
* locked, so set them explicitly here */
|
||||
gst_element_set_state (camera->imgbin, GST_STATE_READY);
|
||||
gst_element_set_state (camera->vidbin, GST_STATE_READY);
|
||||
if (GST_STATE (camera->imgbin) != GST_STATE_NULL) {
|
||||
gst_element_set_state (camera->imgbin, GST_STATE_READY);
|
||||
}
|
||||
if (GST_STATE (camera->vidbin) != GST_STATE_NULL) {
|
||||
gst_element_set_state (camera->vidbin, GST_STATE_READY);
|
||||
}
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
gst_element_set_locked_state (camera->imgbin, FALSE);
|
||||
|
|
Loading…
Reference in a new issue