mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
wrappercamerabinsrc: avoid reseting caps to the same value
Reduces capture latency when the new caps are the same as the old one, avoiding resetting the source state for a forced renegotiation.
This commit is contained in:
parent
477aaba617
commit
79a74089d4
1 changed files with 12 additions and 0 deletions
|
@ -153,6 +153,18 @@ gst_wrapper_camera_bin_reset_video_src_caps (GstWrapperCameraBinSrc * self,
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Resetting src caps to %" GST_PTR_FORMAT, caps);
|
||||
if (self->src_vid_src) {
|
||||
GstCaps *old_caps;
|
||||
|
||||
g_object_get (G_OBJECT (self->src_filter), "caps", &old_caps, NULL);
|
||||
if (gst_caps_is_equal (caps, old_caps)) {
|
||||
GST_DEBUG_OBJECT (self, "old and new caps are same, do not reset it");
|
||||
if (old_caps)
|
||||
gst_caps_unref (old_caps);
|
||||
return;
|
||||
}
|
||||
if (old_caps)
|
||||
gst_caps_unref (old_caps);
|
||||
|
||||
clock = gst_element_get_clock (self->src_vid_src);
|
||||
base_time = gst_element_get_base_time (self->src_vid_src);
|
||||
|
||||
|
|
Loading…
Reference in a new issue