webrtc_source: Set 'empty-buffer-timeout' property to 0 if needed 64/256564/3
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 7 Apr 2021 07:00:19 +0000 (16:00 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 8 Apr 2021 03:56:20 +0000 (12:56 +0900)
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 <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
src/webrtc_source.c

index 060cfb9fc0aa5f9065d13f3563416b31652180bc..0e41e2ce587b4b05f5c7faf0e9ee73dd5167761b 100644 (file)
@@ -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
index 5806a361573f56947fedfaaa2a700731f0ff3744..6baeefbc764d88331ec15adae39a5f6d1be02080 100644 (file)
@@ -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;