platform/core/api/webrtc.git
3 years agoRemove duplicated defines 10/261710/5
Sangchul Lee [Fri, 23 Jul 2021 05:55:12 +0000 (14:55 +0900)]
Remove duplicated defines

[Version] 0.2.56
[Issue Type] Clean-up

Change-Id: I237113cb2a427ba26e4c8f1624079c1d627276cb
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_signaling_server: use g_autoptr with g_mutex_locker_new 89/261789/2
Seungbae Shin [Mon, 26 Jul 2021 09:13:33 +0000 (18:13 +0900)]
webrtc_signaling_server: use g_autoptr with g_mutex_locker_new

This makes it convenient to manipulate concurrent mechanisms such as mutex,
including unintentional infinite possessing of the resource.

https://developer.gnome.org/glib/stable/glib-Threads.html#g-mutex-locker-new
https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#g-autoptr

[Version] 0.2.55
[Issue Type] Refactoring

Change-Id: If724556eec0fd61a22026f819f72e95543c7ca44

3 years agoAdd out-parameter 'track id' to loopback setting functions 08/261708/4
Sangchul Lee [Fri, 23 Jul 2021 04:19:49 +0000 (13:19 +0900)]
Add out-parameter 'track id' to loopback setting functions

This newly added parameter will be utilized by other functions that
are for setting properties/operations per the track id.

[Version] 0.2.54
[Issue Type] API

Change-Id: Ib3d8c1fea15d7a762fba0320ca8b6b875118f66a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoCorrect typos 01/261701/1
Sangchul Lee [Fri, 23 Jul 2021 02:42:24 +0000 (11:42 +0900)]
Correct typos

[Version] 0.2.53
[Issue Type] Doxygen

Change-Id: I077edfc7996da516146cea66845402cef32ef420
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_display: Add _set_display_type_and_surface() and use it 79/261579/4
Sangchul Lee [Wed, 21 Jul 2021 11:53:59 +0000 (20:53 +0900)]
webrtc_display: Add _set_display_type_and_surface() and use it

display 'object' is renamed to 'surface'.
Some codes regarding locking/unlocking display mutex are revised.
Level of some logs are changed.

[Version] 0.2.52
[Issue Type] Improvement

Change-Id: Ib2e70ea2ac6506cb91edf4a3f036a22e6b3cf17f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_sink: Add __find_sink_slot_by_id() and use it 66/261466/5
Sangchul Lee [Mon, 19 Jul 2021 11:54:21 +0000 (20:54 +0900)]
webrtc_sink: Add __find_sink_slot_by_id() and use it

[Version] 0.2.51
[Issue Type] Refactoring

Change-Id: I6d47ae258ca28cb8d3137a2040120d758b000552
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoAdd a description of file source mute 52/261452/2
backto.kim [Mon, 19 Jul 2021 09:03:44 +0000 (18:03 +0900)]
Add a description of file source mute

[Version] 0.2.50
[Issue Type] Doxygen

Change-Id: I35b0774364eb460c7b207b31f7b96bfe820d0dc7

3 years agoAdd API to set media path to the file src 17/261317/18
backto.kim [Thu, 15 Jul 2021 07:59:08 +0000 (16:59 +0900)]
Add API to set media path to the file src

webrtc_file_source_set_path() is added.

This is different from sending files over a data channel.
Audio/video streams that extracted through demuxing the media are treated as a media source.

[Version] 0.2.49
[Issue Type] API

Change-Id: If673fd26d355c0a73093fe9ed046e1bd11300f4d

3 years agowebrtc_source: Remove meaningless property setting of media packet source 61/261361/3
Sangchul Lee [Fri, 16 Jul 2021 02:32:56 +0000 (11:32 +0900)]
webrtc_source: Remove meaningless property setting of media packet source

Setting 'do-timestamp' to 'true' to appsrc element is removed in case of
the media packet source. Actually, it does not have any effect internally.
Because the media packet usually have its own timestamp set by user.

Multiple lines are used for g_object_set() in case of setting multiple
properties.

[Version] 0.2.48
[Issue Type] Improvement

Change-Id: I9718af8f79bf818cbfd7c7d14dfc73a36d81280f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoAdd API to set/get ICE transport policy 04/261204/4
Sangchul Lee [Tue, 13 Jul 2021 07:55:27 +0000 (16:55 +0900)]
Add API to set/get ICE transport policy

Enums are added as below.
 - WEBRTC_ICE_TRANSPORT_POLICY_ALL
 - WEBRTC_ICE_TRANSPORT_POLICY_RELAY

Functions are added as below
 - webrtc_set_ice_transport_policy()
 - webrtc_get_ice_transport_policy()

[Version] 0.2.47
[Issue Type] API

Change-Id: I4d882d48038dc77fb2be848ae45d228de7a907c8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_sink: Fix rendering issue getting late in case of the EVAS display 79/261279/4
Sangchul Lee [Wed, 14 Jul 2021 09:57:12 +0000 (18:57 +0900)]
webrtc_sink: Fix rendering issue getting late in case of the EVAS display

'qos' and 'sync' properties are enabled to the element resposible for
video frame handoff.

[Version] 0.2.46
[Issue Type] Improvement

Change-Id: I35fbc990637d6893d1d56b2dfe08a88b90ca3b04
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoAdd API for audio source loopback rendering 03/261103/8
Sangchul Lee [Mon, 12 Jul 2021 04:40:46 +0000 (13:40 +0900)]
Add API for audio source loopback rendering

webrtc_media_source_set_audio_loopback() is added.

This will be used to render the audio source with the particular
sound stream information before sending the data to the remote peer.

[Version] 0.2.45
[Issue Type] API

Change-Id: Iab4815b3b41da3cc529fa4fe29cdfca7537bacaa
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_sink: Add null check code 20/261220/3
Sangchul Lee [Tue, 13 Jul 2021 09:55:34 +0000 (18:55 +0900)]
webrtc_sink: Add null check code

[Version] 0.2.44
[Issue Type] Improvement

Change-Id: Id6d50f255c07becae55f28a89f135cefb16c5bb4
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoMove missing webrtc_display_type_e enumeration to CAPI_MEDIA_WEBRTC_MEDIA_RENDER_MODU... 10/261210/3
Sangchul Lee [Tue, 13 Jul 2021 08:54:21 +0000 (17:54 +0900)]
Move missing webrtc_display_type_e enumeration to CAPI_MEDIA_WEBRTC_MEDIA_RENDER_MODULE group

[Version] 0.2.43
[Issue Type] Doxygen

Change-Id: I459ba1f8db83ee2a1d9206216af1c6e95640f4a8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoThe file source can have more than one src pad for the same source id 08/261208/6
backto.kim [Tue, 13 Jul 2021 08:35:37 +0000 (17:35 +0900)]
The file source can have more than one src pad for the same source id

[Version] 0.2.42
[Issue Type] Improvement

Change-Id: I47f00b5500496ee3dffd8afb3265d351532bb293

3 years agowebrtc_private: Checking caps before creating payload elements 40/261140/6
backto.kim [Mon, 12 Jul 2021 09:22:17 +0000 (18:22 +0900)]
webrtc_private: Checking caps before creating payload elements

"media" in caps must be "audio" or "video" for normal communication.
However, some payload's media is "applications".
So let these elements skip when searching.

[Version] 0.2.41
[Issue Type] Improvement

Change-Id: I3cdbc33b61c3d337aa38115a04c7e7a93f789454

3 years agoAdd API for video source loopback rendering 08/261008/11
Sangchul Lee [Wed, 7 Jul 2021 10:51:19 +0000 (19:51 +0900)]
Add API for video source loopback rendering

webrtc_media_source_set_video_loopback() is added.

This will be used to render the video source to the particular
display surface before sending the data to the remote peer.

[Version] 0.2.40
[Issue Type] API

Change-Id: Ia6c63fd5da758c35dd337c2ab0a12347a06cd0fc
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoRevise doxygen 17/261117/2
Sangchul Lee [Wed, 23 Jun 2021 08:29:45 +0000 (17:29 +0900)]
Revise doxygen

Remarks regarding callback thread are added.
Fix invalid parameter direction.
Add missing release handle information.
Put a space after using '\n' command.

[Version] 0.2.39
[Issue Type] Doxygen

Change-Id: I0dc23a36b4cab50cc74809df20168f5f11e94f12
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Use gst_audio_info_to_caps() 14/261114/2
Sangchul Lee [Mon, 12 Jul 2021 07:14:04 +0000 (16:14 +0900)]
webrtc_source: Use gst_audio_info_to_caps()

It also set the layout to 'interleaved' internally.

[Version] 0.2.38
[Issue Type] Refactoring

Change-Id: If10b12445a8e252a7af8940625ab222a9719c8bc
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Add missing error conditions 92/261092/1
Sangchul Lee [Mon, 12 Jul 2021 00:21:08 +0000 (09:21 +0900)]
webrtc_source: Add missing error conditions

_set[get]_video_resolution() are revised to return an error
in case of the file source type.

[Version] 0.2.37
[Issue Type] Bug fix

Change-Id: Ib12ead787d395199d999f9951072af6bf9306221
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Add callback parmeter to __add_probe_to_pad() 17/261017/2
Sangchul Lee [Thu, 8 Jul 2021 09:48:15 +0000 (18:48 +0900)]
webrtc_source: Add callback parmeter to __add_probe_to_pad()

Ordering of parameters are changed.
__remove_probe_from_pad() is also added.

[Version] 0.2.36
[Issue Type] Refactoring

Change-Id: Ief06006b2ad8cbbf0a9fef958da3fb5706734844
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Rename variable 55/260955/1
Sangchul Lee [Wed, 7 Jul 2021 11:03:01 +0000 (20:03 +0900)]
webrtc_source: Rename variable

This variable is used only for camerasrc mute functionality.

[Version] 0.2.35
[Issue Type] Rename

Change-Id: I7fdf3399df13f04a97d4b96c3c1996d3a65c7140
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_test: Apply external audio input device if available 32/260932/2
Sangchul Lee [Wed, 7 Jul 2021 07:12:49 +0000 (16:12 +0900)]
webrtc_test: Apply external audio input device if available

It is only for the test case of WEBRTC_MEDIA_SOURCE_TYPE_MIC.

[Version] 0.2.34
[Issue Type] Improvement

Change-Id: Ib4f989f78840be18b5bec2c958d167fd3d9aee74
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_test: Revise media packet source test 39/258039/6
Sangchul Lee [Mon, 10 May 2021 01:01:40 +0000 (10:01 +0900)]
webrtc_test: Revise media packet source test

In case of the test using H264 format, infinite loop is applied to
the h264 source pipeline by using seek 0 and modifying pts/dts values
of the media packet. A bus watch message handler is also added to
detect EOS situation.

[Version] 0.2.33
[Issue Type] Improvement

Change-Id: I55d285905baf4de19803d5e569a401cb0512d9b2
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoAdd webrtc_doc.h file 77/260577/5
Sangchul Lee [Tue, 29 Jun 2021 07:58:22 +0000 (16:58 +0900)]
Add webrtc_doc.h file

[Version] 0.2.32
[Issue Type] Doxygen

Change-Id: I2aa0f8384f92ee2bdb366b817a10c9e1526ab2e1
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoAdd new group - CAPI_MEDIA_WEBRTC_MEDIA_RENDER_MODULE 38/260738/4
Sangchul Lee [Fri, 2 Jul 2021 03:27:09 +0000 (12:27 +0900)]
Add new group - CAPI_MEDIA_WEBRTC_MEDIA_RENDER_MODULE

Functions below are included in this group.
 - webrtc_set_sound_stream_info()
 - webrtc_set_display()
 - webrtc_set_encoded_audio_frame_cb()
 - webrtc_unset_encoded_audio_frame_cb()
 - webrtc_set_encoded_video_frame_cb()
 - webrtc_unset_encoded_video_frame_cb()

[Version] 0.2.31
[Issue Type] Doxygen

Change-Id: I70900fa9ab4ded21f5283f611b8e4dddca6b9442
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoAdd API to set sound stream info. to audio track received by the remote peer 24/260724/5
Sangchul Lee [Fri, 2 Jul 2021 01:30:25 +0000 (10:30 +0900)]
Add API to set sound stream info. to audio track received by the remote peer

webrtc_set_sound_stream_info() is added.

When calling this new API with the stream info handle, the audio policy
including routing and volume of the audio track is under control by the
handle.

[Version] 0.2.30
[Issue Type] API

Change-Id: I3ba47c6f84d00023ef2b0bf09511a6d019444e20
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoAdd API to set sound stream info. to the MIC source 14/260714/8
Sangchul Lee [Thu, 1 Jul 2021 12:04:51 +0000 (21:04 +0900)]
Add API to set sound stream info. to the MIC source

webrtc_mic_source_set_sound_stream_info() is added.

For example, audio device(e.g. USB) can be set by the stream info
handle of capi-media-sound-manager. By passing this handle to the
new function, the MIC source will be read data from the device.

[Version] 0.2.29
[Issue Type] API

Change-Id: I0027109ae5ee3b546e40aadef1740551ad6a2e40
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Improve to get caps for encoded format 77/260477/11
Sangchul Lee [Fri, 25 Jun 2021 09:13:28 +0000 (18:13 +0900)]
webrtc_source: Improve to get caps for encoded format

A bug making invalid caps in __make_default_encoded_caps()
is fixed.

Tainted array index is also fixed in webrtc_test.

[Version] 0.2.28
[Issue Type] Bug fix

Change-Id: I49fd509fa04836199baa19b25b36f59e45040222
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoChange precondition of webrtc_media_packet_source_push_packet() 94/260494/5
Sangchul Lee [Fri, 25 Jun 2021 10:48:05 +0000 (19:48 +0900)]
Change precondition of webrtc_media_packet_source_push_packet()

New preconditions are added before calling this function.
 1. webrtc_media_packet_source_set_format() must be called.
 2. webrtc_media_packet_source_buffer_state_changed_cb() must be set.

The previous state limitation is removed.

[Version] 0.2.27
[Issue Type] API

Change-Id: I63f69dad4341c3d3aeb19b68c0650c0be2672796
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agofixup! webrtc_private: Ensure the NEGOTIATING state to get ready for negotiation... 16/260516/4
Sangchul Lee [Mon, 28 Jun 2021 07:12:25 +0000 (16:12 +0900)]
fixup! webrtc_private: Ensure the NEGOTIATING state to get ready for negotiation operation

Change-Id: I3d08d1f38c68ba4e9e801a43cc95418b22717dbb
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agofixup! webrtc_source: Revise assigning payload identifier 80/260480/3
Sangchul Lee [Fri, 25 Jun 2021 09:29:47 +0000 (18:29 +0900)]
fixup! webrtc_source: Revise assigning payload identifier

Change-Id: I8d4800349ae895c5acc1eeb308f7f165c5cbc672
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_internal: Add support for internal source types 43/260443/5
Sangchul Lee [Fri, 25 Jun 2021 03:38:12 +0000 (12:38 +0900)]
webrtc_internal: Add support for internal source types

WEBRTC_MEDIA_SOURCE_TYPE_CUSTOM_AUDIO and WEBRTC_MEDIA_SOURCE_TYPE_CUSTOM_VIDEO
are added for internal use.

[Version] 0.2.26
[Issue Type] Internal API

Change-Id: I71257ba153aaf16f83a77e65214953803c1ba017
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Improve codes for getting payload identifier 74/260374/2
Sangchul Lee [Thu, 24 Jun 2021 04:58:02 +0000 (13:58 +0900)]
webrtc_source: Improve codes for getting payload identifier

Use bitwise operation instead of array traverse.

[Version] 0.2.25
[Issue Type] Refactoring

Change-Id: I0a9a513e9074d02c3a3c1e08b9a5c54a920a85d2
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_sink: Add omitted type in __get_videosink_factory_name() 65/260365/1
Sangchul Lee [Thu, 24 Jun 2021 03:05:09 +0000 (12:05 +0900)]
webrtc_sink: Add omitted type in __get_videosink_factory_name()

[Version] 0.2.24
[Issue Type] Bug fix

Change-Id: I24057f88b527f5af099a9328378c6232204944ea
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_test: Apply RET_IF() macro for checking condition 56/260356/2
Sangchul Lee [Wed, 23 Jun 2021 23:14:30 +0000 (08:14 +0900)]
webrtc_test: Apply RET_IF() macro for checking condition

_webrtc_destroy() releases more resources regarding its handle.

[Version] 0.2.23
[Issue Type] Improvement

Change-Id: Ica04303942f9294702134a62c8941b7135b3934f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Revise assigning payload identifier 57/260357/1
Sangchul Lee [Thu, 24 Jun 2021 00:29:26 +0000 (09:29 +0900)]
webrtc_source: Revise assigning payload identifier

One media source id can have two audio/video streams.
e.g.)file source

Assigning payload id logic is revised to get it per
each stream all over the webrtc handle.

[Version] 0.2.22
[Issue Type] Improvement

Change-Id: I47aa84e56f58fffc34e2d3735cad0eddc94a8439
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Remove setting of 'encoding-name' and 'clock-rate' 87/260287/3
Sangchul Lee [Wed, 23 Jun 2021 06:36:40 +0000 (15:36 +0900)]
webrtc_source: Remove setting of 'encoding-name' and 'clock-rate'

Normally, these values are fixed inside of a payloader element.
Hence, we don't need to set these values via a capsfilter for the payloader.

[Version] 0.2.21
[Issue Type] Improvement

Change-Id: I5d2c9d5f0462cd2000a616cc82971c36657e55b1
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_test: Revise layout for rendering surfaces 37/260237/2
Sangchul Lee [Tue, 22 Jun 2021 09:25:29 +0000 (18:25 +0900)]
webrtc_test: Revise layout for rendering surfaces

It is limited to evas surface type.

[Version] 0.2.20
[Issue Type] Improvement

Change-Id: I5e8ce24ba096897dd144727614da8093c29eea8a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoRevise codes to comply with coding convention 20/260220/4
Sangchul Lee [Tue, 22 Jun 2021 06:45:32 +0000 (15:45 +0900)]
Revise codes to comply with coding convention

Use tab for spacing.
Add or remove space.
Some set/unset callback functions are moved to it's getter API.
Revise doxygen.

[Version] 0.2.19
[Issue Type] Improvement

Change-Id: Ia9ffa82d93b91b77aa2dfd61e4466297d8da48ac
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_ini: Add new category for resource acquisition 57/259957/5
Sangchul Lee [Thu, 17 Jun 2021 02:52:25 +0000 (11:52 +0900)]
webrtc_ini: Add new category for resource acquisition

'resource acquisition' category is added.
'camera', 'video encoder', 'video decoder' and 'video overlay'
items are added for this category.

e.g.)
[resource acquisition]
camera = yes
video encoder = no
video decoder = no
video overlay = no

The previous 'video overlay resource required' item is migrated
to this new 'video overlay' item.

Now it is possible to determine whether these resources must be
acquired or not by the configuration file.

[Version] 0.2.18
[Issue Type] Improvement

Change-Id: I58ae4076643394562e7e24819421edf9ea650ec9
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Add support for MJPEG encoded format 93/259493/5
Sangchul Lee [Wed, 9 Jun 2021 02:43:32 +0000 (11:43 +0900)]
webrtc_source: Add support for MJPEG encoded format

[Version] 0.2.17
[Issue Type] New feature

Change-Id: Ic75efda737780d29a327d03e6f60b9ddbb8673e8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_source: Revise source pipeline to support to get data with encoded format... 89/259489/5
Sangchul Lee [Wed, 9 Jun 2021 02:32:30 +0000 (11:32 +0900)]
webrtc_source: Revise source pipeline to support to get data with encoded format directly

[Version] 0.2.16
[Issue Type] Improvement

Change-Id: Ib8c122a29e7b0f40e75c27a370308bd395a98b3e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agowebrtc_ini: Add new item to check source element supports encoded format 13/259413/6
Sangchul Lee [Mon, 7 Jun 2021 11:58:45 +0000 (20:58 +0900)]
webrtc_ini: Add new item to check source element supports encoded format

If the encoded format is supported for a particular source,
'video encoded format support' item should be set to 'yes'
in ini configuration file. Then, it will get buffers from the
source with the encoded format based on the value of 'video codec'
item in this file.

e.g.)
[source camera]
video encoded format support = yes

[Version] 0.2.15
[Issue Type] Improvement

Change-Id: I0321b442a9239269a8c6f83f26ec78f34926f7bd
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
3 years agoRename functions belong to CAPI_MEDIA_WEBRTC_MEDIA_SOURCE_MODULE to have consistency 34/259934/5
Sangchul Lee [Wed, 16 Jun 2021 23:58:54 +0000 (08:58 +0900)]
Rename functions belong to CAPI_MEDIA_WEBRTC_MEDIA_SOURCE_MODULE to have consistency

[Version] 0.2.14
[Issue Type] API

Change-Id: Ic3b9c708a6a41420dee146f005cb457e697cfa90
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd new group - CAPI_MEDIA_WEBRTC_MEDIA_SOURCE_MODULE 49/259849/4
Sangchul Lee [Wed, 16 Jun 2021 02:17:44 +0000 (11:17 +0900)]
Add new group - CAPI_MEDIA_WEBRTC_MEDIA_SOURCE_MODULE

[Version] 0.2.13
[Issue Type] Doxygen

Change-Id: I8488b4f2cfa0a8ce18fcd668317fd57ae78843a7
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoChange ordering of webrtc_media_source_type_e enum 44/259844/4
Sangchul Lee [Wed, 16 Jun 2021 01:31:17 +0000 (10:31 +0900)]
Change ordering of webrtc_media_source_type_e enum

WEBRTC_MEDIA_SOURCE_TYPE_FILE is also added to support for media files.
The implementation will be updated in the near future.

typedef enum {
    WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST,    /**<  Audio test */
    WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST,    /**<  Video test */
    WEBRTC_MEDIA_SOURCE_TYPE_MIC,          /**<  Audio from microphone */
    WEBRTC_MEDIA_SOURCE_TYPE_CAMERA,       /**<  Camera preview */
    WEBRTC_MEDIA_SOURCE_TYPE_SCREEN,       /**<  Screen capture */
    WEBRTC_MEDIA_SOURCE_TYPE_FILE,         /**<  Media file */
    WEBRTC_MEDIA_SOURCE_TYPE_MEDIA_PACKET  /**<  Media packet */
} webrtc_media_source_type_e;

Unnecessary structure is also removed.

[Version] 0.2.12
[Issue Type] API

Change-Id: I2d939c0aee848a44b3ea68445d31bc1696b08217
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agofixup! Remove unnecessary build definition 78/259878/1
Sangchul Lee [Wed, 16 Jun 2021 07:55:04 +0000 (16:55 +0900)]
fixup! Remove unnecessary build definition

Change-Id: I6dc1cd5ac1e99d02677a4549561204a4f325a419
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_ini: Add new item to get audio/video sink element 43/259843/2
Sangchul Lee [Wed, 16 Jun 2021 01:10:16 +0000 (10:10 +0900)]
webrtc_ini: Add new item to get audio/video sink element

Sink pipeline applies this change.

e.g.)
[rendering sink]
audio sink element = pulsesrc
video sink element = tizenwlsink

[Version] 0.2.11
[Issue Type] Improvement

Change-Id: I58d549c56cb7a9323ff77aa732966a1a9e815e04
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_ini: Add new item to check for requirement of video overlay resource 90/259590/6
Sangchul Lee [Thu, 10 Jun 2021 05:17:36 +0000 (14:17 +0900)]
webrtc_ini: Add new item to check for requirement of video overlay resource

If the video sink element for video overlay requires a resource
acquisition, 'video overlay resource required' item should be set
to 'yes' in the configuration file.

e.g.)
[rendering sink]
video overlay resource required = yes

Some logs in __dump_ini() is revised.
Coding style is a little changed in _acquire_resource_if_needed().
It is changed that creating video sink element before acquiring a resource.

[Version] 0.2.10
[Issue Type] Improvement

Change-Id: I5ae7948a155c1c1b02f129610ee00a491cab0c96
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoRemove unnecessary build definition 94/259594/2
Sangchul Lee [Thu, 10 Jun 2021 05:35:16 +0000 (14:35 +0900)]
Remove unnecessary build definition

These are the resource manager dependency codes for public tizen platform.
It's not necessary to make a particular definition as the previous one.

For tizen tv binary building, since the resource management is not used
rather, '#ifndef TIZEN_TV' is now used.

[Version] 0.2.9
[Issue Type] Build definition

Change-Id: Ibc67d3f346c7016fddc5344b0626298e02222612
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_source: Use GList to carry elements via parameter 56/259456/7
Sangchul Lee [Tue, 8 Jun 2021 08:32:49 +0000 (17:32 +0900)]
webrtc_source: Use GList to carry elements via parameter

[Version] 0.2.8
[Issue Type] Refactoring

Change-Id: Id19b2b6052799491b4c7558ea18170e203d94746
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_private: Ensure the NEGOTIATING state to get ready for negotiation operation 85/259485/2
Sangchul Lee [Wed, 9 Jun 2021 00:28:02 +0000 (09:28 +0900)]
webrtc_private: Ensure the NEGOTIATING state to get ready for negotiation operation

Invoking state callback for NEGOTIATING state is moved to the inside of
negotiation needed callback. This ensures to get the SSRC parameter
successfully while creating offer SDP.

[Version] 0.2.7
[Issue Type] Improvement

Change-Id: I4cfe0f5214b12925170ba2cd6fbfa4c52a66daa5
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_source: Merge __build_audiosrc() with __build_audiotestsrc() 59/259459/1
Sangchul Lee [Tue, 8 Jun 2021 09:04:49 +0000 (18:04 +0900)]
webrtc_source: Merge __build_audiosrc() with __build_audiotestsrc()

[Version] 0.2.6
[Issue Type] Refactoring

Change-Id: Ice41abc6e0b92de41bacc95fac7dc2dd620df018
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd support for the dynamic resolution change 94/258094/5
Sangchul Lee [Mon, 10 May 2021 10:32:07 +0000 (19:32 +0900)]
Add support for the dynamic resolution change

webrtc_set_video_source_resolution() API is revised to support
for this feature during the streaming.
 - state limitation inside of this function is released.
 - doxygen is revised according to this change.

Note that if the source element does not support the DRC, this API
will return WEBRTC_ERROR_INVALID_OPERATION.

If the DRC is supported for a particular source, 'video drc support'
field should be set to 'yes' in ini configuration file.

e.g.)
[source videotest]
video drc support = yes

[Version] 0.2.5
[Issue Type] New feature

Change-Id: I145fe0cb139e06d75611eadb10d74b9ba0858198
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd new group - CAPI_MEDIA_WEBRTC_DATA_CHANNEL_MODULE 73/259273/2
Sangchul Lee [Thu, 3 Jun 2021 10:36:40 +0000 (19:36 +0900)]
Add new group - CAPI_MEDIA_WEBRTC_DATA_CHANNEL_MODULE

Some are fixed for coding convention.

[Version] 0.2.4
[Issue Type] Doxygen

Change-Id: I3cab0a43aa6c6afae726a592ee5992f186494004
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoChange path of configuration file 68/259268/2
Sangchul Lee [Thu, 3 Jun 2021 08:51:45 +0000 (17:51 +0900)]
Change path of configuration file

It is changed
 - from /etc/multimedia/mmfw_webrtc.ini
 - to /hal/etc/multimedia/mmfw_webrtc.ini

[Version] 0.2.3
[Issue Type] Update

Change-Id: I1b8e1356a88be40377d4234e44007acb9624fcf6
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_private: Set latency to webrtcbin directly 67/259267/2
Sangchul Lee [Thu, 3 Jun 2021 08:50:28 +0000 (17:50 +0900)]
webrtc_private: Set latency to webrtcbin directly

The webrtcbin based on 1.18 version has latency property that
set the latency property of rtpbin internally.

[Version] 0.2.2
[Issue Type] Update

Change-Id: I18716dacc202ad195b844365e9e8c21300d1d121
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_private: Set state to PLAYING when peer connection state is changed to CONNECTED 66/259266/1
Sangchul Lee [Thu, 3 Jun 2021 08:49:49 +0000 (17:49 +0900)]
webrtc_private: Set state to PLAYING when peer connection state is changed to CONNECTED

This state change is affected by webrtcbin changes based on 1.18 version.

[Version] 0.2.1
[Issue Type] Update

Change-Id: I4b590ccb43e468dc5add1b1282a97ea17083a514
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoUpdate spec file 39/259239/4
backto.kim [Thu, 3 Jun 2021 02:13:52 +0000 (11:13 +0900)]
Update spec file

[Version] 0.1.178
[Issue Type] Improvement

Change-Id: I4e5ccf682e8fccf83ae4132d6f9cdf4b7564999a

4 years agoAdd new API set for media source mute 70/257270/44
backto.kim [Thu, 22 Apr 2021 02:56:25 +0000 (11:56 +0900)]
Add new API set for media source mute

black frame or silent sound will be transmitted to the remote peer.
Functions are added as below.
-webrtc_set_media_source_mute()
-webrtc_get_media_source_muted()

[Version] 0.1.177
[Issue Type] API

Change-Id: I4134872691f5f4a46cbd0b510a15a4fd521fb8e7

4 years agoFix build error at emul 28/258928/5
YoungHun Kim [Fri, 28 May 2021 02:37:22 +0000 (11:37 +0900)]
Fix build error at emul

[Version] 0.1.176
[Issue Type] Improvement

Change-Id: I516cbe551b8af0a6c1777596b2594c62770d11e6

4 years agowebrtc_source: Set zerocopy_enabled variable outside of __create_rest_of_elements() 22/258922/2
Sangchul Lee [Fri, 28 May 2021 01:04:35 +0000 (10:04 +0900)]
webrtc_source: Set zerocopy_enabled variable outside of __create_rest_of_elements()

Warning log is added.
Invalid branch is fixed. (if -> else if)

[Version] 0.1.175
[Issue Type] Refactoring

Change-Id: Ifa4dd69b921ac39f572d34873505626991db6e35
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_source: Check if the extra field of media packet is gstreamer buffer 02/258902/4
Sangchul Lee [Thu, 27 May 2021 10:22:51 +0000 (19:22 +0900)]
webrtc_source: Check if the extra field of media packet is gstreamer buffer

It is added to avoid failure on 'push-buffer' signal function when the extra
field of the media packet is not a gstreamer buffer.

[Version] 0.1.174
[Issue Type] Improvement

Change-Id: I30643df4cc86bedf0ff116c58eff1893659d947c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc: Add error condition in webrtc_set_display() 88/258888/2
Sangchul Lee [Thu, 27 May 2021 06:43:48 +0000 (15:43 +0900)]
webrtc: Add error condition in webrtc_set_display()

The track added callback will be invoked even if the encoded video frame callback
has been set. Within this callback, this patch let webrtc_set_display() return
the invalid operation error by looking the encoded video frame callback is set,
not by _is_owner_of_track_build_context() the previous one.

Doxygen is also updated.

[Version] 0.1.173
[Issue Type] Improvement

Change-Id: If889e51602de878cf369aaadbda1d99ca63b4fe9
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_test: Limit expected size of receiving data via data channel 83/258883/1
Sangchul Lee [Thu, 27 May 2021 06:01:34 +0000 (15:01 +0900)]
webrtc_test: Limit expected size of receiving data via data channel

[Version] 0.1.172
[Issue Type] Test application

Change-Id: I18a0ec0bc0f9925ce687859e8d3c771226d4d16c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd API set for media source pause 39/257839/10
Sangchul Lee [Tue, 4 May 2021 05:38:58 +0000 (14:38 +0900)]
Add API set for media source pause

These correspond to the 'replaceTrack()' method with 'null' or
'track' parameter of the RTCRtpSender.

Functions are added as below.
 - webrtc_set_media_source_pause()
 - webrtc_get_media_source_pause()

Test cases are also added in webrtc_test.
 p. Pause/play media source
 o. Get the pause of media source

[Version] 0.1.171
[Issue Type] API

Change-Id: I7a67eb4dea0c386876b901ece5aa5660968da776
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc: Add invalid operation error return value to webrtc_destroy() 54/258154/3
Sangchul Lee [Tue, 11 May 2021 08:26:12 +0000 (17:26 +0900)]
webrtc: Add invalid operation error return value to webrtc_destroy()

Gstreamer pipeline state change error or resource release error can
occur during destroying webrtc handle. In this case, it will return
WEBRTC_ERROR_INVALID_OPERATION error value.

[Version] 0.1.170
[Issue Type] Improvement

Change-Id: Ia17540054fbba9205820ac533fbbfb936d84f5aa
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_private: Add Macro definition for printing caps and apply it 87/258087/5
Sangchul Lee [Mon, 10 May 2021 09:01:15 +0000 (18:01 +0900)]
webrtc_private: Add Macro definition for printing caps and apply it

[Version] 0.1.169
[Issue Type] Improvement

Change-Id: I82a007e7ea059df648e0c4feecb48e932804293e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_private: Reset all the negotiation states in _webrtc_stop() 44/258044/3
Sangchul Lee [Mon, 10 May 2021 02:06:35 +0000 (11:06 +0900)]
webrtc_private: Reset all the negotiation states in _webrtc_stop()

The webrtc_stop() function changes the handle state to WEBRTC_STATE_IDLE.
It'll be changed to WEBRTC_STATE_NEGOTIATING again after calling
webrtc_start(), hence this patch is needed to set the states to
initial one.

Test case to get all the negotiation states is added.
 gan. Gets all the negotiation change callbacks

[Version] 0.1.168
[Issue Type] Improvement

Change-Id: Ib9aabafcdc2528303e65c58960f55c5451f49ecc
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_source: Get ready for audio/video source pads in a media source 95/257895/1
Sangchul Lee [Thu, 6 May 2021 05:43:19 +0000 (14:43 +0900)]
webrtc_source: Get ready for audio/video source pads in a media source

This patch is to prepare a media source that have two source pads.
Currently, we only support two kinds of stream, audio and video.

[Version] 0.1.167
[Issue Type] Improvement

Change-Id: I2fbccfc66d2fff36faa98ae98c01a8051a71216b
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_private: Replace some macro definitions to enum types 85/257885/3
Sangchul Lee [Thu, 6 May 2021 02:09:19 +0000 (11:09 +0900)]
webrtc_private: Replace some macro definitions to enum types

MLINES_IDX_AUDIO is replaced to AV_IDX_AUDIO.
MLINES_IDX_VIDEO is replaced to AV_IDX_VIDEO.
AV_IDX_MAX is added.

[Version] 0.1.166
[Issue Type] Improvement

Change-Id: Idb3ea3a120730f41b4c58f5984ae287b1937b016
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_test: Add test cases for new negotiation callbacks 87/257687/6
Sangchul Lee [Thu, 29 Apr 2021 10:51:20 +0000 (19:51 +0900)]
webrtc_test: Add test cases for new negotiation callbacks

san. Set all the negotiation change callbacks
uan. Unset all the negotiation change callbacks

[Version] 0.1.165
[Issue Type] Test application

Change-Id: Ib7eb8e7f89806d6fda22d32ecc12d94d2e5501c4
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd API set for the ICE connection state 55/257355/8
Sangchul Lee [Fri, 23 Apr 2021 04:09:16 +0000 (13:09 +0900)]
Add API set for the ICE connection state

These correspond to the 'iceConnectionState' and 'oniceconnectionstatechange'
property of the RTCPeerConnection respectively.

Enums are added as below.
 - WEBRTC_ICE_CONNECTION_STATE_NEW
 - WEBRTC_ICE_CONNECTION_STATE_CHECKING
 - WEBRTC_ICE_CONNECTION_STATE_CONNECTED
 - WEBRTC_ICE_CONNECTION_STATE_COMPLETED
 - WEBRTC_ICE_CONNECTION_STATE_FAILED
 - WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED
 - WEBRTC_ICE_CONNECTION_STATE_CLOSED

Functions are added as below.
 - webrtc_set[unset]_ice_connection_state_change_cb()
 - webrtc_get_ice_connection_state()

[Version] 0.1.164
[Issue Type] API

Change-Id: If11019e7d57667d031c676e12c8c688fcc03da30
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd API set for the ICE gathering state 12/257312/9
Sangchul Lee [Thu, 22 Apr 2021 11:18:52 +0000 (20:18 +0900)]
Add API set for the ICE gathering state

These correspond to the 'iceGatheringState' and 'onicegatheringstatechange'
property of the RTCPeerConnection respectively.

Enums are added as below.
 - WEBRTC_ICE_GATHERING_STATE_NEW
 - WEBRTC_ICE_GATHERING_STATE_GATHERING
 - WEBRTC_ICE_GATHERING_STATE_COMPLETE

Functions are added as below.
 - webrtc_set[unset]_ice_gathering_state_change_cb()
 - webrtc_get_ice_gathering_state()

[Version] 0.1.163
[Issue Type] API

Change-Id: I3076aede623598d191b3792ec9cb2dcf849b325d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd API set for the signaling state 86/256986/11
Sangchul Lee [Fri, 16 Apr 2021 04:47:59 +0000 (13:47 +0900)]
Add API set for the signaling state

These correspond to the 'signalingState' and 'onsignalingstatechange'
property of the RTCPeerConnection respectively.

Enums are added as below.
 - WEBRTC_SIGNALING_STATE_STABLE
 - WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER
 - WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER
 - WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER
 - WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER
 - WEBRTC_SIGNALING_STATE_CLOSED

Functions are added as below.
 - webrtc_set[unset]_signaling_state_change_cb()
 - webrtc_get_signaling_state()

[Version] 0.1.162
[Issue Type] API

Change-Id: Ide27303b7905567654fa1a67359f60a237d20bb6
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd API set for the peer connection state 83/256983/10
Sangchul Lee [Fri, 16 Apr 2021 02:51:41 +0000 (11:51 +0900)]
Add API set for the peer connection state

These correspond to the 'connectionState' and 'onconnectionstatechange'
property of the RTCPeerConnection respectively.

Enums are added as below.
 - WEBRTC_PEER_CONNECTION_STATE_NEW
 - WEBRTC_PEER_CONNECTION_STATE_CONNECTING
 - WEBRTC_PEER_CONNECTION_STATE_CONNECTED
 - WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED
 - WEBRTC_PEER_CONNECTION_STATE_FAILED
 - WEBRTC_PEER_CONNECTION_STATE_CLOSED

Functions are added as below.
 - webrtc_set[unset]_peer_connection_state_change_cb()
 - webrtc_get_peer_connection_state()

[Version] 0.1.161
[Issue Type] API

Change-Id: I271413364e4e3704d1df021d9174aac6a18cd225
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd API set for video source resolution 79/257379/14
Sangchul Lee [Fri, 23 Apr 2021 07:13:21 +0000 (16:13 +0900)]
Add API set for video source resolution

Functions are added as below.
 - webrtc_set_video_source_resolution()
 - webrtc_get_video_source_resolution()

Test cases for these are added in webrtc_test.

[Version] 0.1.160
[Issue Type] API

Change-Id: Iea0ec96d4e05f900cd4d83e9480e38fb604ad1ab
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoInvoke state changed callback in the main context 80/257580/3
Sangchul Lee [Tue, 27 Apr 2021 23:27:20 +0000 (08:27 +0900)]
Invoke state changed callback in the main context

Some of caller of state changed callback invoked it in a thread context.
It is now fixed that all of the callbacks are called in the main context.

[Version] 0.1.159
[Issue Type] Improvement

Change-Id: Ib3e1047e306247405189bdd2bededed558edec37
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoRevise descriptions 69/257469/4
Sangchul Lee [Mon, 26 Apr 2021 10:28:36 +0000 (19:28 +0900)]
Revise descriptions

Add missing descriptions for enums.
Remove redundant @param.

[Version] 0.1.158
[Issue Type] Doxygen

Change-Id: Id1a2703304d3682f636a3f291ec4809da3abefeb
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoPrint turn server log in webrtc_foreach_turn_server() 92/257492/3
Sangchul Lee [Tue, 27 Apr 2021 02:03:51 +0000 (11:03 +0900)]
Print turn server log in webrtc_foreach_turn_server()

[Version] 0.1.157
[Issue Type] Logs

Change-Id: I1bf0532a90bf471b49d7c9758942eaecb54c865f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_source: Remove unnecessary capsfilter in screen source pipeline 62/257462/4
Sangchul Lee [Mon, 26 Apr 2021 09:03:42 +0000 (18:03 +0900)]
webrtc_source: Remove unnecessary capsfilter in screen source pipeline

Unnecessary logs are removed.

[Version] 0.1.156
[Issue Type] Improvement

Change-Id: I3dcc19f1bdb07c74cabd367bf4151c0138b4ebd6
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_source: Revise error values 70/257370/1
Sangchul Lee [Fri, 23 Apr 2021 06:17:14 +0000 (15:17 +0900)]
webrtc_source: Revise error values

Return WEBRTC_ERROR_INVALID_OPERATION if handle has a member of
not expected value.

[Version] 0.1.155
[Issue Type] Improvement

Change-Id: Ibeb30dc6b0864bb6ecd492af1ddf2444b2cc9bf7
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_test: Fix untrusted conversion from string to number 10/257310/3
Sangchul Lee [Thu, 22 Apr 2021 10:48:07 +0000 (19:48 +0900)]
webrtc_test: Fix untrusted conversion from string to number

Use g_ascii_strtoll() instead of atoi().

[Version] 0.1.154
[Issue Type] Improvement

Change-Id: I0e450dd2a7fc6a75bc3a70c997652745bafcdf9f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_source: Add WEBRTC_MEDIA_SOURCE_TYPE_SCREEN to media source type 12/256712/22
Hyunil [Fri, 9 Apr 2021 10:29:22 +0000 (19:29 +0900)]
webrtc_source: Add WEBRTC_MEDIA_SOURCE_TYPE_SCREEN to media source type

- Function to use screen as a media source

[Version] 0.1.153
[Issue Type] New API

Change-Id: Iadb687bd4f3b94cfc4b7d5d0555a8a4874184c30
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
4 years agowebrtc_source: Release gst resources in case of error 74/257274/3
Sangchul Lee [Thu, 22 Apr 2021 04:36:10 +0000 (13:36 +0900)]
webrtc_source: Release gst resources in case of error

[Version] 0.1.152
[Issue Type] Improvement

Change-Id: Ic9a5e8ffadae1384e5d3e2b7787e2df29382fabe
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoChange type GstElement to GstBin for bin 72/257272/3
backto.kim [Thu, 22 Apr 2021 03:59:35 +0000 (12:59 +0900)]
Change type GstElement to GstBin for bin

[Version] 0.1.151
[Issue Type] Improvement

Change-Id: I10ba655d266ba5c6ce1eaff125ed6283d989cc8d

4 years agowebrtc_private: Destroy sink pipeline in case of webrtc_stop() 42/257242/2
Sangchul Lee [Wed, 21 Apr 2021 11:52:06 +0000 (20:52 +0900)]
webrtc_private: Destroy sink pipeline in case of webrtc_stop()

When the webrtc_stop() is called, the state is changed to IDLE.
The state will be changed to NEGOTIATING with following webrtc_start()
again which means the re-negotiation is required.

Therefore, releasing the previous sink pipeline should be performed
inside of webrtc_stop().

[Version] 0.1.150
[Issue Type] Improvement

Change-Id: I1bd03ecf8b8f27d93dec7d1488fa20223299a737
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_data_channel: Revise logs 34/257234/2
Sangchul Lee [Wed, 21 Apr 2021 10:20:49 +0000 (19:20 +0900)]
webrtc_data_channel: Revise logs

Printing channel handle logs are added.

[Version] 0.1.149
[Issue Type] Log

Change-Id: I36fd5d292af3817c33f239fe3e697ad5f888110f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc: Remove state change to READY in webrtc_create_data_channel() 24/256424/4
Sangchul Lee [Fri, 2 Apr 2021 08:28:46 +0000 (17:28 +0900)]
webrtc: Remove state change to READY in webrtc_create_data_channel()

Previously, READY state of webrtcbin was required to create the
data channel. Due to this condition, we raise the state to READY
right before creating a data channel. But this state change invokes
the negotiation needed callback unexpectedly.

In webrtcbin, the state limitation to create a data channel has been
removed.
 : https://review.tizen.org/gerrit/#/c/platform/upstream/gst-plugins-bad/+/256742/

Therefore, this state change is also no longer necessary and removed.

[Version] 0.1.148
[Issue Type] Improvement

Change-Id: Ibefe084aaf68639f2bfb750bac1866d7445e24d8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd API set for TURN server 03/256403/31
YoungHun Kim [Fri, 2 Apr 2021 03:16:37 +0000 (12:16 +0900)]
Add API set for TURN server

 Functions are added as below.
 - webrtc_add_turn_server()
 - webrtc_foreach_turn_server()

 Callback prototype
 - typedef bool (*webrtc_turn_server_cb)(
                 const char *turn_server, void *user_data);

[Version] 0.1.147
[Issue Type] API

Change-Id: Iadfd91db135167556b801ef9dab3a455ca0d3e1f

4 years agowebrtc_source: Add support for media packet with zerocopy buffer 52/256652/3
Sangchul Lee [Thu, 8 Apr 2021 12:21:40 +0000 (21:21 +0900)]
webrtc_source: Add support for media packet with zerocopy buffer

If the incoming media packet has tbm surface, it should be used to
allocate memory with gst_tizen_allocator_alloc_surface() to have
zerocopy method.

[Version] 0.1.146
[Issue Type] Improvement

Change-Id: I1686f25b7140bf47331b7cd036cba0b3b4e5584e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc: Change ownership of the pushed packet 53/256753/3
Sangchul Lee [Mon, 12 Apr 2021 08:46:11 +0000 (17:46 +0900)]
webrtc: Change ownership of the pushed packet

Regarding webrtc_media_packet_source_push_packet(), it is now changed
to take the ownership of the packet. Therefore, a caller should not
release the packet after pushing it using the API from now on.

Description about it is added to the function.
webrtc_test is modified according to this change.

[Version] 0.1.145
[Issue Type] API

Change-Id: I88dfc003365c6167c421feb594c037d79a90e5f6
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_test: Add missing gst_buffer_unref() 36/256636/2
Sangchul Lee [Thu, 8 Apr 2021 08:17:15 +0000 (17:17 +0900)]
webrtc_test: Add missing gst_buffer_unref()

[Version] 0.1.144
[Issue Type] Test application

Change-Id: I3e6b69854157ec5743475d6422605295dc26f1f5
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_private: Remove unused code 84/256684/4
hj kim [Fri, 9 Apr 2021 07:13:54 +0000 (16:13 +0900)]
webrtc_private: Remove unused code

[Version] 0.1.143
[Issue Type] Improvement

Change-Id: I6d6d7fe7f0b572ccbd040fde56955af33b535dd5

4 years agowebrtc_source: Set 'empty-buffer-timeout' property to 0 if needed 64/256564/3
Sangchul Lee [Wed, 7 Apr 2021 07:00:19 +0000 (16:00 +0900)]
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 <sc11.lee@samsung.com>
4 years agowebrtc_source: Support zerocopy format 52/256552/3
Sangchul Lee [Wed, 7 Apr 2021 01:15:10 +0000 (10:15 +0900)]
webrtc_source: Support zerocopy format

It affects to make it possible to use tizen zerocopy format(SN12, S420)
for camera source and media packet source.

[Version] 0.1.141
[Issue Type] Improvement

Change-Id: I3768aefe382e7dd43139a6e37a14e28671829c03
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agowebrtc_test: Add Quit menu to terminate program 19/256219/6
hj kim [Wed, 31 Mar 2021 05:07:59 +0000 (14:07 +0900)]
webrtc_test: Add Quit menu to terminate program

[Version] 0.1.140
[Issue Type] Test application

Change-Id: I3cbd5a1a6d9330876dcb365b89391706730e2e97

4 years agowebrtc: Add new API webrtc_data_channel_get_label() 39/256339/8
hj kim [Thu, 1 Apr 2021 07:59:27 +0000 (16:59 +0900)]
webrtc: Add new API webrtc_data_channel_get_label()

[Version] 0.1.139
[Issue Type] API

Change-Id: I02e845b4a53ba1e6c1c5c789eb368966a545037a

4 years agoAdd options parameter to webrtc_create_offer()/answer() 60/256460/3
Sangchul Lee [Mon, 5 Apr 2021 03:10:18 +0000 (12:10 +0900)]
Add options parameter to webrtc_create_offer()/answer()

This parameter is added to support offer/answer options of
https://www.w3.org/TR/webrtc/#offer-answer-options.

It currently has no effect, because the Gstreamer side also
does not support it yet.

[Version] 0.1.138
[Issue Type] API

Change-Id: Ied29c6a918a7634afaea4716e51358e5666ba506
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>