mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
camerabin2: Also reset video/audio filters before capturing
Video and audio custom filter element should also be reset before starting a new capture, otherwise we get wrong-state errors
This commit is contained in:
parent
7664e28a0c
commit
524c478fa1
1 changed files with 9 additions and 0 deletions
|
@ -984,6 +984,10 @@ gst_camera_bin_video_reset_elements (gpointer u_data)
|
|||
/* reset element states to clear eos/flushing pads */
|
||||
gst_element_set_state (camerabin->video_encodebin, GST_STATE_READY);
|
||||
gst_element_set_state (camerabin->videobin_capsfilter, GST_STATE_READY);
|
||||
if (camerabin->video_filter) {
|
||||
gst_element_set_state (camerabin->video_filter, GST_STATE_READY);
|
||||
gst_element_sync_state_with_parent (camerabin->video_filter);
|
||||
}
|
||||
gst_element_sync_state_with_parent (camerabin->videobin_capsfilter);
|
||||
gst_element_sync_state_with_parent (camerabin->video_encodebin);
|
||||
|
||||
|
@ -999,6 +1003,11 @@ gst_camera_bin_video_reset_elements (gpointer u_data)
|
|||
* and running until we really need them */
|
||||
gst_element_set_state (camerabin->audio_src, GST_STATE_NULL);
|
||||
|
||||
if (camerabin->audio_filter) {
|
||||
gst_element_set_state (camerabin->audio_filter, GST_STATE_READY);
|
||||
gst_element_sync_state_with_parent (camerabin->audio_filter);
|
||||
}
|
||||
|
||||
gst_element_sync_state_with_parent (camerabin->audio_capsfilter);
|
||||
gst_element_sync_state_with_parent (camerabin->audio_volume);
|
||||
|
||||
|
|
Loading…
Reference in a new issue