webrtc_source: fix wrong payload type for file source 88/277688/7
authorhj kim <backto.kim@samsung.com>
Tue, 12 Jul 2022 06:57:56 +0000 (15:57 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 13 Jul 2022 02:12:19 +0000 (11:12 +0900)
plus, rearrange some included header files.

[Version] 0.3.151
[Issue Type] Bug fix

Change-Id: I4a23a38a1b203f05cd9abfe5dfa299c830ed931a

include/webrtc_private.h
packaging/capi-media-webrtc.spec
src/webrtc_private.c
src/webrtc_sink.c
src/webrtc_source.c
src/webrtc_source_file.c
src/webrtc_source_mediapacket.c
src/webrtc_source_screen.c

index dc750f85c14ecbc899c39bb6d27fc24ce9491ab8..98aad0d6bbe150559b59a716c7a847ceb41c88e2 100644 (file)
 #define GST_USE_UNSTABLE_API
 #include <gst/webrtc/webrtc.h>
 #endif
-#include <gst/video/videooverlay.h>
 #include <iniparser.h>
 #include <mm_display_interface.h>
 #ifndef TIZEN_TV
 #include <mm_resource_manager.h>
 #endif
-#include <sound_manager_internal.h>
 #include <tbm_bufmgr.h>
 #include <libwebsockets.h>
 #include <libsoup/soup.h>
 
+#include "webrtc.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 7c76be7acc96be3a6f0eabc68c643aa4a1bb807c..602c64261bb57e500a48e1f081533cc5ced8c9a4 100644 (file)
@@ -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
index af3551376b4f766db476d7b9215c18af7d502e58..193f5b904150c617ea8e6ca69337ea20a419d696 100644 (file)
@@ -18,6 +18,7 @@
 #include "webrtc_private.h"
 #include <json-glib/json-glib.h>
 #include <pulse/proplist.h>
+#include <sound_manager_internal.h>
 
 #define DEFAULT_DOT_FILE_NAME_PREFIX   "webrtc"
 
index eab48e350aa8309ea110cca614cf2666d9d549c9..7e5a6496769f67271c0d0424064ec3674b4842fd 100644 (file)
@@ -17,6 +17,8 @@
 #include "webrtc.h"
 #include "webrtc_private.h"
 #include <media_packet_internal.h>
+#include <sound_manager_internal.h>
+#include <gst/video/videooverlay.h>
 
 //LCOV_EXCL_START
 bool _is_owner_of_track_build_context(webrtc_s *webrtc, unsigned int track_id)
index ea4883228e6738392e02d6edc5f472c7ece11c81..c5d4bb22e33fd6faa4193d5cfd7e737f3bf3e33b 100644 (file)
@@ -23,8 +23,8 @@
 #include "webrtc_source_mediapacket.h"
 
 #include <tbm_surface_internal.h>
-#include <media_packet_internal.h>
 #include <Elementary.h>
+#include <sound_manager_internal.h>
 
 #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);
index b9fa67aaa100e19d6322464ccdf28aa243e56799..06865a4c2cb35573dd0da80d8168356e85adeead 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include "webrtc_internal.h"
 #include "webrtc_private.h"
 #include "webrtc_source_common.h"
 
index 130952b5dbbffd7f226838d7e9134c2f629ccbff..a9b7edc8e0ba2e5e7f6fd537c5e20bef859295f5 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include "webrtc_internal.h"
 #include "webrtc_private.h"
 #include "webrtc_source_common.h"
 #include <gst/audio/audio.h>
@@ -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);
index e0818b32364d8ab9c50fe40855e9d06e049cf048..fe51bed187dcd5817d389f89fe71dc1b12712412 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include "webrtc_internal.h"
 #include "webrtc_private.h"
 #include "webrtc_source_common.h"