webrtc_private: Move some structures to the proper source file 85/281185/4 accepted/tizen/unified/20220919.012611
authorhj kim <backto.kim@samsung.com>
Wed, 14 Sep 2022 05:55:02 +0000 (14:55 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 14 Sep 2022 06:01:38 +0000 (15:01 +0900)
[Version] 0.3.239
[Issue Type] Refactoring

Change-Id: Id3bfa94408aeaad06a19159dfdb33f2b06f04d53

include/webrtc_private.h
packaging/capi-media-webrtc.spec
src/webrtc_private.c
src/webrtc_signaling_client.c
src/webrtc_signaling_server.c
src/webrtc_tbm.c
src/webrtc_transceiver.c

index 1c71f0f8d2920e158d801e41616288d9a2fed479..8d7b1d861882b68c36eed453de82f5c0a320300f 100644 (file)
@@ -408,11 +408,6 @@ typedef struct _webrtc_callbacks {
        void *user_data;
 } webrtc_callbacks_s;
 
-typedef struct _webrtc_tbm_bo_s {
-       bool used;
-       void *bo;
-} webrtc_tbm_bo_s;
-
 typedef struct _webrtc_tbm_s {
        tbm_bufmgr bufmgr;
 
@@ -635,11 +630,6 @@ typedef struct _element_info_s {
        GStrv excluded_elements;
 } element_info_s;
 
-typedef struct {
-       const char *str;
-       GstWebRTCRTPTransceiverDirection gst;
-} direction_info_s;
-
 typedef struct {
        webrtc_transceiver_codec_e codec;
        const char *gst_media_type;
@@ -648,40 +638,11 @@ typedef struct {
        int clock_rate;
 } rtp_payload_info_s;
 
-typedef struct _webrtc_signal_s {
-       GObject *obj;
-       gulong signal_id;
-} webrtc_signal_s;
-
 typedef struct _webrtc_websocket_s {
        GMutex mutex;
        struct lws_context *context;
 } webrtc_websocket_s;
 
-typedef struct _webrtc_client_slot_s {
-       struct lws *wsi;
-       int id;
-       struct lws *peer_wsi;
-       int peer_id;
-} webrtc_client_slot_s;
-
-typedef struct _webrtc_signaling_server_s {
-       GMutex mutex;
-       webrtc_websocket_s *ws;
-       GThread *thread;
-       bool exit_thread;
-
-       GHashTable *clients;
-} webrtc_signaling_server_s;
-
-typedef struct webrtc_signaling_client_s {
-       SoupSession *session;
-       SoupWebsocketConnection *ws_conn;
-       int id;
-
-       webrtc_callbacks_s message_cb;
-} webrtc_signaling_client_s;
-
 /* ini */
 void _load_ini(webrtc_s *webrtc);
 void _unload_ini(webrtc_s *webrtc);
@@ -874,8 +835,6 @@ bool _sync_elements_state_with_parent(GList *element_list);
 bool _add_elements_to_bin(GstBin *bin, GList *element_list);
 bool _link_elements(GList *element_list);
 bool _remove_elements_from_bin(GstBin *bin, GList *element_list);
-
-void _update_transceivers_fec(webrtc_s *webrtc, bool is_offer);
 int _apply_stream_info(GstElement *element, const char *stream_type, int stream_index, int aec_ref_device_id);
 
 int _webrtcbin_create_session_description(webrtc_s *webrtc, bool is_offer, char **desc);
index c3ceb600c55300c16742d0ae2b5e400b33b494c5..f9455d6ed92b8c95a77012a924af8c9075a3c120 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.3.238
+Version:    0.3.239
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index a05b75fbec1a75a9d380f6832dafeda2ad071db2..f4d289864d5aa1accdd5eb0dfed623de6c82b679 100644 (file)
@@ -94,6 +94,11 @@ static bundle_policy_info_s _bundle_policy_info[] = {
        [GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE] = { "MAX-BUNDLE", WEBRTC_BUNDLE_POLICY_MAX_BUNDLE },
 };
 
+typedef struct _webrtc_signal_s {
+       GObject *obj;
+       gulong signal_id;
+} webrtc_signal_s;
+
 //LCOV_EXCL_START
 static const char *__get_error_string(webrtc_error_e error)
 {
@@ -597,7 +602,6 @@ static gboolean __bus_watch_cb(GstBus *bus, GstMessage *message, gpointer user_d
        return TRUE;
 }
 //LCOV_EXCL_STOP
-
 typedef struct _idle_userdata {
        webrtc_s *webrtc;
        idle_cb_type_e type;
index 223e3abaca0881d54e1afe7ef8236b77e19e2015..4084964252f610814b110e971efd6ab7feda25c8 100644 (file)
 #include "webrtc_private.h"
 #include "webrtc_internal.h"
 
+typedef struct _webrtc_signaling_client_s {
+       SoupSession *session;
+       SoupWebsocketConnection *ws_conn;
+       int id;
+       webrtc_callbacks_s message_cb;
+} webrtc_signaling_client_s;
+
 //LCOV_EXCL_START
 static int __parse_message(gchar *message, webrtc_signaling_message_type_e *type, gchar **content)
 {
index a663ae32180e596bdb1e510fd179040fd9e9c4bd..8fa123f0bfcae3190597acc4e8c4aa4bbc05e6c5 100644 (file)
@@ -35,6 +35,22 @@ typedef enum {
        VALUE_TYPE_STRING
 } value_type_e;
 
+typedef struct _webrtc_client_slot_s {
+       struct lws *wsi;
+       int id;
+       struct lws *peer_wsi;
+       int peer_id;
+} webrtc_client_slot_s;
+
+typedef struct _webrtc_signaling_server_s {
+       GMutex mutex;
+       webrtc_websocket_s *ws;
+       GThread *thread;
+       bool exit_thread;
+
+       GHashTable *clients;
+} webrtc_signaling_server_s;
+
 static void __send_message(struct lws *wsi, const char *message)
 {
        guchar *buffer;
index b8c424ad5673261c340862cd663317e0b7f4d5f6..2d80bb7783e84b296f382661ed614e915fcacdeb 100644 (file)
 #include "webrtc.h"
 #include "webrtc_private.h"
 
+typedef struct _webrtc_tbm_bo_s {
+       bool used;
+       void *bo;
+} webrtc_tbm_bo_s;
+
 //LCOV_EXCL_START
 static void __tbm_bo_destroy_cb(webrtc_tbm_bo_s *tbm_bo)
 {
index 29fe1bcda927f852f37ad009f11b6366a8d634c3..998d11e4c4eb35cf7de21e5e38c012939cbf0be0 100644 (file)
 
 #include "webrtc_private.h"
 
+typedef struct {
+       const char *str;
+       GstWebRTCRTPTransceiverDirection gst;
+} direction_info_s;
+
 static direction_info_s __direction_info[] = {
        [WEBRTC_TRANSCEIVER_DIRECTION_SENDONLY] = { "SENDONLY", GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY },
        [WEBRTC_TRANSCEIVER_DIRECTION_RECVONLY] = { "RECVONLY", GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY },