From 0f5661797345e7da0cf5ed92f84b19e1776fa5fd Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Wed, 7 Apr 2021 16:00:19 +0900 Subject: [PATCH] webrtc_source: Set 'empty-buffer-timeout' property to 0 if needed If camerasrc element has this property, set it to 0 not to emit an error even if there's no buffer consumption. [Version] 0.1.142 [Issue Type] Improvement Change-Id: Ie9ecc828c6a856aeb63beddae3aeea0cd7212fc0 Signed-off-by: Sangchul Lee --- packaging/capi-media-webrtc.spec | 2 +- src/webrtc_source.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 060cfb9f..0e41e2ce 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.1.141 +Version: 0.1.142 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_source.c b/src/webrtc_source.c index 5806a361..6baeefbc 100644 --- a/src/webrtc_source.c +++ b/src/webrtc_source.c @@ -726,6 +726,11 @@ static int __build_camerasrc(webrtc_s *webrtc, webrtc_gst_slot_s *source) } /* FIXME: set camera default setting from ini */ + /* NOTE: in case of an element that supports tizen zerocopy format, not to emit an error in GST_STATE_PLAYING + * without buffer consumption before finishing negotiation, set this property to 0 here. */ + if (g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(camerasrc)), "empty-buffer-timeout")) + g_object_set(G_OBJECT(camerasrc), "empty-buffer-timeout", 0, NULL); + if ((ret = __create_rest_of_elements(webrtc, source, &capsfilter, &videoenc, &videopay, &queue, &capsfilter2)) != WEBRTC_ERROR_NONE) return ret; -- 2.34.1