From: hj kim Date: Tue, 12 Jul 2022 06:57:56 +0000 (+0900) Subject: webrtc_source: fix wrong payload type for file source X-Git-Tag: submit/tizen/20220714.015855~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F277688%2F7;p=platform%2Fcore%2Fapi%2Fwebrtc.git webrtc_source: fix wrong payload type for file source plus, rearrange some included header files. [Version] 0.3.151 [Issue Type] Bug fix Change-Id: I4a23a38a1b203f05cd9abfe5dfa299c830ed931a --- diff --git a/include/webrtc_private.h b/include/webrtc_private.h index dc750f85..98aad0d6 100644 --- a/include/webrtc_private.h +++ b/include/webrtc_private.h @@ -24,17 +24,17 @@ #define GST_USE_UNSTABLE_API #include #endif -#include #include #include #ifndef TIZEN_TV #include #endif -#include #include #include #include +#include "webrtc.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 7c76be7a..602c6426 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.3.150 +Version: 0.3.151 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_private.c b/src/webrtc_private.c index af355137..193f5b90 100644 --- a/src/webrtc_private.c +++ b/src/webrtc_private.c @@ -18,6 +18,7 @@ #include "webrtc_private.h" #include #include +#include #define DEFAULT_DOT_FILE_NAME_PREFIX "webrtc" diff --git a/src/webrtc_sink.c b/src/webrtc_sink.c index eab48e35..7e5a6496 100644 --- a/src/webrtc_sink.c +++ b/src/webrtc_sink.c @@ -17,6 +17,8 @@ #include "webrtc.h" #include "webrtc_private.h" #include +#include +#include //LCOV_EXCL_START bool _is_owner_of_track_build_context(webrtc_s *webrtc, unsigned int track_id) diff --git a/src/webrtc_source.c b/src/webrtc_source.c index ea488322..c5d4bb22 100644 --- a/src/webrtc_source.c +++ b/src/webrtc_source.c @@ -23,8 +23,8 @@ #include "webrtc_source_mediapacket.h" #include -#include #include +#include #define MIN_DYNAMIC_PAYLOAD_TYPE 96 #define MAX_DYNAMIC_PAYLOAD_TYPE 127 @@ -1470,7 +1470,6 @@ static GstElement * __prepare_capsfilter_for_filesrc_pipeline(webrtc_gst_slot_s { GstElement *capsfilter = NULL; GstCaps *sink_caps = NULL; - unsigned int payload_type = 0; RET_VAL_IF(source == NULL, NULL, "source is NULL"); @@ -1482,7 +1481,7 @@ static GstElement * __prepare_capsfilter_for_filesrc_pipeline(webrtc_gst_slot_s return NULL; } - if ((sink_caps = _make_rtp_caps(GET_MEDIA_TYPE_NAME(is_audio), payload_type, source))) { + if ((sink_caps = _make_rtp_caps(GET_MEDIA_TYPE_NAME(is_audio), source->av[GET_AV_IDX(is_audio)].pt, source))) { g_object_set(G_OBJECT(capsfilter), "caps", sink_caps, NULL); gst_caps_unref(sink_caps); } @@ -2755,7 +2754,8 @@ static int __complete_mediapacketsrc_from_raw_format(webrtc_s *webrtc, webrtc_gs goto exit; SAFE_G_LIST_FREE(element_list); - return ret; + + return WEBRTC_ERROR_NONE; exit: SAFE_G_LIST_FREE_FULL(element_list, gst_object_unref); @@ -2814,7 +2814,7 @@ int _set_media_format(webrtc_s *webrtc, unsigned int source_id, media_format_h f LOG_INFO("webrtc[%p] source_id[%u] format[%p]", webrtc, source_id, format); - return ret; + return WEBRTC_ERROR_NONE; error: media_format_unref(format); diff --git a/src/webrtc_source_file.c b/src/webrtc_source_file.c index b9fa67aa..06865a4c 100644 --- a/src/webrtc_source_file.c +++ b/src/webrtc_source_file.c @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "webrtc_internal.h" #include "webrtc_private.h" #include "webrtc_source_common.h" diff --git a/src/webrtc_source_mediapacket.c b/src/webrtc_source_mediapacket.c index 130952b5..a9b7edc8 100644 --- a/src/webrtc_source_mediapacket.c +++ b/src/webrtc_source_mediapacket.c @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "webrtc_internal.h" #include "webrtc_private.h" #include "webrtc_source_common.h" #include @@ -586,7 +585,7 @@ int _complete_rest_of_mediapacketsrc(webrtc_gst_slot_s *source, GstPad **src_pad if ((ret = _set_ghost_pad_target(*src_pad, capsfilter, true)) != WEBRTC_ERROR_NONE) goto error; - return ret; + return WEBRTC_ERROR_NONE; error: _remove_elements_from_bin(source->bin, element_list); @@ -629,7 +628,8 @@ int _complete_mediapacketsrc_from_encoded_format(webrtc_s *webrtc, webrtc_gst_sl goto exit; SAFE_G_LIST_FREE(element_list); - return ret; + + return WEBRTC_ERROR_NONE; exit: SAFE_G_LIST_FREE_FULL(element_list, gst_object_unref); diff --git a/src/webrtc_source_screen.c b/src/webrtc_source_screen.c index e0818b32..fe51bed1 100644 --- a/src/webrtc_source_screen.c +++ b/src/webrtc_source_screen.c @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "webrtc_internal.h" #include "webrtc_private.h" #include "webrtc_source_common.h"