One exception is following original function prototype.
e.g) type of return value and callback function
[Version] 0.1.49
[Issue Type] Revision
Change-Id: I44bcd10c34c254d5b92b709deb7b8d518801ba56
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
void _disconnect_signal(gpointer data);
GstElement *_create_element(const char *factory_name, const char *name);
GstElement *_create_element_from_registry(element_info_s *elem_info);
-int _add_no_target_ghostpad_to_slot(webrtc_gst_slot_s *slot, gboolean is_src, GstPad **new_pad);
-int _set_ghost_pad_target(GstPad *ghost_pad, GstElement *target_element, gboolean is_src);
+int _add_no_target_ghostpad_to_slot(webrtc_gst_slot_s *slot, bool is_src, GstPad **new_pad);
+int _set_ghost_pad_target(GstPad *ghost_pad, GstElement *target_element, bool is_src);
int _add_rendering_sink_bin(webrtc_s *webrtc, GstPad *src_pad);
void _sink_slot_destroy_cb(gpointer data);
void _source_slot_destroy_cb(gpointer data);
int _webrtcbin_create_offer(webrtc_s *webrtc, char **offer);
int _webrtcbin_create_answer(webrtc_s *webrtc, char **answer);
-int _webrtcbin_set_session_description(webrtc_s *webrtc, const char *description, gboolean is_remote);
+int _webrtcbin_set_session_description(webrtc_s *webrtc, const char *description, bool is_remote);
int _webrtcbin_add_ice_candidate(webrtc_s *webrtc, const char *candidate);
void _webrtcbin_on_data_channel_cb(GstElement *webrtcbin, GObject *data_channel, gpointer user_data);
-gboolean _webrtcbin_have_remote_offer(webrtc_s *webrtc);
+bool _webrtcbin_have_remote_offer(webrtc_s *webrtc);
void _init_data_channels(webrtc_s *webrtc);
void _destroy_data_channels(webrtc_s *webrtc);
Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 0.1.48
+Version: 0.1.49
Release: 0
Group: Multimedia/API
License: Apache-2.0
LOG_INFO("description: %s", description);
- ret = _webrtcbin_set_session_description(webrtc, description, FALSE);
+ ret = _webrtcbin_set_session_description(webrtc, description, false);
g_mutex_unlock(&_webrtc->mutex);
LOG_INFO("description: %s", description);
- ret = _webrtcbin_set_session_description(webrtc, description, TRUE);
+ ret = _webrtcbin_set_session_description(webrtc, description, true);
g_mutex_unlock(&_webrtc->mutex);
#include "webrtc_private.h"
#define WEBRTC_INI_PATH "/etc/multimedia/mmfw_webrtc.ini"
-#define DEFAULT_GENERATE_DOT TRUE
+#define DEFAULT_GENERATE_DOT true
#define DEFAULT_DOT_PATH "/tmp"
/* categories */
return ret_val;
}
-static bool __ini_get_boolean(dictionary *dict, const char *category, const char *item, gboolean default_value)
+static bool __ini_get_boolean(dictionary *dict, const char *category, const char *item, bool default_value)
{
gchar *path;
bool ret_val;
return text;
}
-static gboolean __meet_gst_state(webrtc_state_e state, GstState gst_state)
+static bool __meet_gst_state(webrtc_state_e state, GstState gst_state)
{
if (state == WEBRTC_STATE_IDLE && gst_state == GST_STATE_READY)
- return TRUE;
+ return true;
if (state == WEBRTC_STATE_NEGOTIATING && gst_state == GST_STATE_PLAYING)
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void _invoke_state_changed_cb(webrtc_s *webrtc, webrtc_state_e old, webrtc_state_e new)
int argc = 1;
char **argv = NULL;
GError *err = NULL;
- gboolean gst_ret = 0;
+ gboolean gst_ret;
gchar **gst_args;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
return ghost_pad;
}
-int _add_no_target_ghostpad_to_slot(webrtc_gst_slot_s *slot, gboolean is_src, GstPad **new_pad)
+int _add_no_target_ghostpad_to_slot(webrtc_gst_slot_s *slot, bool is_src, GstPad **new_pad)
{
gchar *pad_name;
return WEBRTC_ERROR_NONE;
}
-int _set_ghost_pad_target(GstPad *ghost_pad, GstElement *target_element, gboolean is_src)
+int _set_ghost_pad_target(GstPad *ghost_pad, GstElement *target_element, bool is_src)
{
GstPad *target_pad;
LOG_DEBUG("<<< end of the callback");
}
-static void __update_session_description(GstPromise *promise, gboolean is_offer, gpointer user_data)
+static void __update_session_description(GstPromise *promise, bool is_offer, gpointer user_data)
{
GstWebRTCSessionDescription *desc = NULL;
const GstStructure *reply;
LOG_DEBUG_ENTER();
- __update_session_description(promise, TRUE, webrtc);
+ __update_session_description(promise, true, webrtc);
g_cond_signal(&webrtc->desc_cond);
LOG_DEBUG_ENTER();
- __update_session_description(promise, FALSE, webrtc);
+ __update_session_description(promise, false, webrtc);
g_cond_signal(&webrtc->desc_cond);
LOG_DEBUG_LEAVE();
}
-static int _create_session_description(webrtc_s *webrtc, gboolean is_offer, char **desc)
+static int _create_session_description(webrtc_s *webrtc, bool is_offer, char **desc)
{
GstPromise *promise;
gint64 end_time;
RET_VAL_IF(offer == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "offer is NULL");
RET_VAL_IF(webrtc->gst.webrtcbin == NULL, WEBRTC_ERROR_INVALID_OPERATION, "webrtcbin is NULL");
- return _create_session_description(webrtc, TRUE, offer);
+ return _create_session_description(webrtc, true, offer);
}
int _webrtcbin_create_answer(webrtc_s *webrtc, char **answer)
RET_VAL_IF(answer == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "answer is NULL");
RET_VAL_IF(webrtc->gst.webrtcbin == NULL, WEBRTC_ERROR_INVALID_OPERATION, "webrtcbin is NULL");
- return _create_session_description(webrtc, FALSE, answer);
+ return _create_session_description(webrtc, false, answer);
}
/* Use g_free() to release the sdp and type parameter. */
return ret;
}
-int _webrtcbin_set_session_description(webrtc_s *webrtc, const char *description, gboolean is_remote)
+int _webrtcbin_set_session_description(webrtc_s *webrtc, const char *description, bool is_remote)
{
int ret = WEBRTC_ERROR_NONE;
gchar *sdp;
return ret;
}
-gboolean _webrtcbin_have_remote_offer(webrtc_s *webrtc)
+bool _webrtcbin_have_remote_offer(webrtc_s *webrtc)
{
GstWebRTCSignalingState signaling_state;
return (unsigned int)id;
}
-static void __invoke_track_added_cb(webrtc_s *webrtc, const gchar *name, gboolean is_video)
+static void __invoke_track_added_cb(webrtc_s *webrtc, const gchar *name, bool is_video)
{
RET_IF(webrtc == NULL, "webrtc is NULL");
RET_IF(name == NULL, "name is NULL");
LOG_INFO("[%s], new_pad[%s], media_type[%s]", GST_ELEMENT_NAME(decodebin), GST_PAD_NAME(new_pad), media_type);
if (g_strrstr(media_type, "video")) {
- __invoke_track_added_cb(webrtc, GST_ELEMENT_NAME(decodebin), TRUE);
+ __invoke_track_added_cb(webrtc, GST_ELEMENT_NAME(decodebin), true);
ret = __build_videosink(webrtc, decodebin, new_pad);
} else if (g_strrstr(media_type, "audio")) {
- __invoke_track_added_cb(webrtc, GST_ELEMENT_NAME(decodebin), FALSE);
+ __invoke_track_added_cb(webrtc, GST_ELEMENT_NAME(decodebin), false);
ret = __build_audiosink(webrtc, decodebin, new_pad);
} else {
g_signal_connect(decodebin, "autoplug-select", G_CALLBACK(__decodebin_autoplug_select_cb), webrtc);
g_signal_connect(decodebin, "element-added", G_CALLBACK(__decodebin_element_added_cb), NULL);
- ret = _add_no_target_ghostpad_to_slot(sink, FALSE, &sink_pad);
+ ret = _add_no_target_ghostpad_to_slot(sink, false, &sink_pad);
if (ret != WEBRTC_ERROR_NONE)
goto error_before_insert;
- ret = _set_ghost_pad_target(sink_pad, decodebin, FALSE);
+ ret = _set_ghost_pad_target(sink_pad, decodebin, false);
if (ret != WEBRTC_ERROR_NONE)
goto error_before_insert;
{
gchar *caps_str;
GstCaps *caps;
- gboolean is_video;
+ bool is_video;
codec_type_e codec_type;
RET_VAL_IF(media_type == NULL, NULL, "media_type is NULL");
return WEBRTC_ERROR_INVALID_OPERATION;
}
- return _set_ghost_pad_target(ghost_src_pad, capsfilter2, TRUE);
+ return _set_ghost_pad_target(ghost_src_pad, capsfilter2, true);
}
static int __build_audiosrc(webrtc_s *webrtc, webrtc_gst_slot_s *source, GstPad *ghost_src_pad)
return WEBRTC_ERROR_INVALID_OPERATION;
}
- return _set_ghost_pad_target(ghost_src_pad, capsfilter2, TRUE);
+ return _set_ghost_pad_target(ghost_src_pad, capsfilter2, true);
}
static int __build_videotestsrc(webrtc_s *webrtc, webrtc_gst_slot_s *source, GstPad *ghost_src_pad)
return WEBRTC_ERROR_INVALID_OPERATION;
}
- return _set_ghost_pad_target(ghost_src_pad, capsfilter2, TRUE);
+ return _set_ghost_pad_target(ghost_src_pad, capsfilter2, true);
}
static int __build_audiotestsrc(webrtc_s *webrtc, webrtc_gst_slot_s *source, GstPad *ghost_src_pad)
return WEBRTC_ERROR_INVALID_OPERATION;
}
- return _set_ghost_pad_target(ghost_src_pad, capsfilter2, TRUE);
+ return _set_ghost_pad_target(ghost_src_pad, capsfilter2, true);
}
static int __build_source_bin(webrtc_s *webrtc, webrtc_gst_slot_s *source, webrtc_media_source_type_e type)
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
RET_VAL_IF(source->bin == NULL, WEBRTC_ERROR_INVALID_OPERATION, "bin is NULL");
- ret = _add_no_target_ghostpad_to_slot(source, TRUE, &src_pad);
+ ret = _add_no_target_ghostpad_to_slot(source, true, &src_pad);
RET_VAL_IF(ret != WEBRTC_ERROR_NONE, ret, "failed to _add_no_target_ghostpad_to_slot()");
switch (type) {