Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 0.2.135
+Version: 0.2.136
Release: 0
Group: Multimedia/API
License: Apache-2.0
#include "webrtc.h"
#include "webrtc_private.h"
+//LCOV_EXCL_START
static void __data_channel_on_open_cb(GObject *data_channel, gpointer user_data)
{
webrtc_data_channel_s *channel = (webrtc_data_channel_s *)user_data;
__invoke_data_channel_cb(webrtc, channel);
}
+//LCOV_EXCL_STOP
int _create_data_channel(webrtc_s *webrtc, const char *label, bundle *options, webrtc_data_channel_s **channel)
{
video_decoded_data_info_s *info;
} media_packet_finalize_data_s;
+//LCOV_EXCL_START
static guint32 __convert_fourcc_string_to_value(const gchar *format_name)
{
return format_name[0] | (format_name[1] << 8) | (format_name[2] << 16) | (format_name[3] << 24);
mm_display_interface_evas_render(display->mm_display, packet);
}
+//LCOV_EXCL_STOP
static int __set_overlay_display(webrtc_display_s *display)
{
[GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED] = { "CLOSED", WEBRTC_ICE_CONNECTION_STATE_CLOSED },
};
+//LCOV_EXCL_START
static const char *__get_error_string(webrtc_error_e error)
{
switch (error) {
return "(invalid error)";
}
}
+//LCOV_EXCL_STOP
void _generate_dot(GstElement *pipeline, const gchar *name)
{
GENERATE_DOT(webrtc, webrtc->gst.pipeline, "%s.state_%s", GST_ELEMENT_NAME(webrtc->gst.pipeline), __state_str[webrtc->state]);
}
+//LCOV_EXCL_START
static void __invoke_error_cb(webrtc_s *webrtc, webrtc_error_e error)
{
RET_IF(webrtc == NULL, "webrtc is NULL");
LOG_DEBUG("<<< end of the callback");
}
}
+//LCOV_EXCL_STOP
static void __invoke_signaling_state_change_cb(webrtc_s *webrtc, GstWebRTCPeerConnectionState state)
{
}
}
+//LCOV_EXCL_START
static void __invoke_ice_connection_state_change_cb(webrtc_s *webrtc, GstWebRTCICEConnectionState state)
{
webrtc_callbacks_s *cb;
return TRUE;
}
+//LCOV_EXCL_STOP
typedef enum _post_idle_cb_type_e {
POST_IDLE_CB_TYPE_STATE,
LOG_DEBUG("state will be changed [%s] -> [%s]", __state_str[webrtc->state], __state_str[new_state]);
}
+//LCOV_EXCL_START
void _post_error_cb_in_idle(webrtc_s *webrtc, webrtc_error_e error)
{
idle_userdata_s *data;
LOG_DEBUG("connection state will be changed to [%u]", state);
}
+//LCOV_EXCL_STOP
static void __post_signaling_state_change_cb_in_idle(webrtc_s *webrtc, webrtc_signaling_state_e state)
{
LOG_DEBUG("ICE gathering state will be changed to [%u]", state);
}
+//LCOV_EXCL_START
static void __post_ice_connection_state_change_cb_in_idle(webrtc_s *webrtc, webrtc_ice_connection_state_e state)
{
idle_userdata_s *data;
LOG_DEBUG("ICE connection state will be changed to [%u]", state);
}
+//LCOV_EXCL_STOP
GstElement *_create_element(const char *factory_name, const char *name)
{
free(_param_candidate);
}
+//LCOV_EXCL_START
static void __webrtcbin_peer_connection_state_cb(GstElement *webrtcbin, GParamSpec * pspec, gpointer user_data)
{
webrtc_s *webrtc = (webrtc_s *)user_data;
break;
}
}
+//LCOV_EXCL_STOP
static void __webrtcbin_signaling_state_cb(GstElement *webrtcbin, GParamSpec * pspec, gpointer user_data)
{
__post_ice_gathering_state_change_cb_in_idle(webrtc, state);
}
+//LCOV_EXCL_START
static void __webrtcbin_ice_connection_state_cb(GstElement *webrtcbin, GParamSpec *pspec, gpointer user_data)
{
webrtc_s *webrtc = (webrtc_s *)user_data;
if (state == GST_WEBRTC_ICE_CONNECTION_STATE_FAILED)
__invoke_error_cb(webrtc, WEBRTC_ERROR_CONNECTION_FAILED);
}
+//LCOV_EXCL_STOP
static GstPad* __add_no_target_ghostpad(GstBin *bin, const char *pad_name, bool is_src)
{
return ghost_pad;
}
+//LCOV_EXCL_START
static bool __is_existing_pad(webrtc_gst_slot_s *source, const char *pad_name)
{
GstIterator *iter = NULL;
return exist;
}
+//LCOV_EXCL_STOP
int _add_no_target_ghostpad_to_slot(webrtc_gst_slot_s *slot, bool is_src, GstPad **new_pad)
{
gst_object_unref(rtpbin);
}
+//LCOV_EXCL_START
static int __get_media_type_from_pad(GstPad *pad, bool *is_video)
{
GstCaps *caps;
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_STOP
static void __webrtcbin_pad_added_cb(GstElement *webrtcbin, GstPad *new_pad, gpointer user_data)
{
GENERATE_DOT(webrtc, webrtc->gst.pipeline, "%s.webrtcbin-%s", GST_ELEMENT_NAME(webrtc->gst.pipeline), GST_PAD_NAME(new_pad));
}
+//LCOV_EXCL_START
static void __webrtcbin_no_more_pads_cb(GstElement *webrtcbin, gpointer user_data)
{
webrtc_s *webrtc = (webrtc_s *)user_data;
LOG_DEBUG_LEAVE();
}
+//LCOV_EXCL_STOP
static void __webrtcbin_on_new_transceiver_cb(GstElement *webrtcbin, GstWebRTCRTPTransceiver *transceiver, gpointer user_data)
{
return ret;
}
+//LCOV_EXCL_START
static int __resource_release_cb(mm_resource_manager_h mgr,
mm_resource_manager_res_h res, void *user_data)
{
return ret;
}
+//LCOV_EXCL_STOP
int _create_resource_manager(webrtc_s *webrtc)
{
LOG_DEBUG("smack_label[%s] uid[%s]\n", smack_label, uid);
cynara_ret = cynara_check(cynara_h, smack_label, "", uid, privilege);
+//LCOV_EXCL_START
if (cynara_ret != CYNARA_API_ACCESS_ALLOWED) {
LOG_ERROR("NOT ALLOWED, privilege[%s], cynara_ret[%d]", privilege, cynara_ret);
ret = WEBRTC_ERROR_PERMISSION_DENIED;
goto exit;
}
+//LCOV_EXCL_STOP
LOG_INFO("ALLOWED, privilege[%s]", privilege);
RET_VAL_IF(feature == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "feature is NULL");
if (system_info_get_platform_bool(feature, &supported) != SYSTEM_INFO_ERROR_NONE) {
+//LCOV_EXCL_START
LOG_ERROR("failed to system_info_get_platform_bool(), feature[%s]", feature);
return WEBRTC_ERROR_INVALID_OPERATION;
+//LCOV_EXCL_STOP
}
if (!supported) {
+//LCOV_EXCL_START
LOG_ERROR("feature[%s] is not supported", feature);
return WEBRTC_ERROR_NOT_SUPPORTED;
+//LCOV_EXCL_STOP
}
LOG_INFO("feature[%s] is supported", feature);
#include <gst/video/videooverlay.h>
#include <media_packet_internal.h>
+//LCOV_EXCL_START
bool _is_owner_of_track_build_context(webrtc_s *webrtc, unsigned int track_id)
{
GMainContext *context;
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_STOP
\ No newline at end of file
return caps;
}
+//LCOV_EXCL_START
/* Use g_free() to free the media_type parameter. */
static GstCaps *__make_encoded_caps_from_media_format(webrtc_gst_slot_s *source, gchar **media_type)
{
return caps;
}
+//LCOV_EXCL_STOP
static GstCaps *__make_rtp_caps(const gchar *media_type, unsigned int payload_id)
{
return WEBRTC_ERROR_INVALID_OPERATION;
}
+//LCOV_EXCL_START
static int __create_rest_of_elements_for_encoded_format(webrtc_s *webrtc, webrtc_gst_slot_s *source,
GstElement **payloader, GstElement **queue, GstElement **capsfilter)
{
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_STOP
static const char *__get_default_element(int type)
{
return ret;
}
+//LCOV_EXCL_START
static int __build_custom_videosrc(webrtc_s *webrtc, webrtc_gst_slot_s *source)
{
int ret = WEBRTC_ERROR_NONE;
return TRUE;
}
+//LCOV_EXCL_STOP
static void __destroy_filesrc_pipeline(webrtc_gst_slot_s *source)
{
return ret;
}
+//LCOV_EXCL_START
static int __complete_mediapacketsrc_from_encoded_format(webrtc_s *webrtc, webrtc_gst_slot_s *source)
{
int ret = WEBRTC_ERROR_NONE;
return _set_ghost_pad_target(*src_pad, capsfilter, true);
}
+//LCOV_EXCL_STOP
static int __build_source_bin(webrtc_s *webrtc, webrtc_gst_slot_s *source)
{
return true;
}
+//LCOV_EXCL_START
static void __release_filesrc_resources(webrtc_gst_slot_s *source)
{
GstElement *appsrc = NULL;
source->media_types = 0;
}
-//LCOV_EXCL_START
int _set_media_path(webrtc_s *webrtc, unsigned int source_id, const char *path)
{
webrtc_gst_slot_s *source = NULL;
g_free(packet_buffer);
}
+//LCOV_EXCL_START
static GstBuffer* __make_buffer_from_zerocopy_video_packet(webrtc_gst_slot_s *source, media_packet_h packet)
{
int ret = MEDIA_PACKET_ERROR_NONE;
return buffer;
}
+//LCOV_EXCL_STOP
int _push_media_packet(webrtc_s *webrtc, unsigned int source_id, media_packet_h packet)
{
return ret;
}
+//LCOV_EXCL_START
static GstPadProbeReturn __camerasrc_probe_cb(GstPad *pad, GstPadProbeInfo *info, gpointer u_data)
{
GstBuffer *buffer = gst_pad_probe_info_get_buffer(info);
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_STOP
static int __mute_videotestsrc(webrtc_gst_slot_s *source, bool mute)
{
return ret;
}
+//LCOV_EXCL_START
int _set_audio_mute(webrtc_s *webrtc, unsigned int source_id, bool mute)
{
webrtc_gst_slot_s *source = NULL;
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int _get_video_mute(webrtc_s *webrtc, unsigned int source_id, bool *muted)
{
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_START
int _get_audio_mute(webrtc_s *webrtc, unsigned int source_id, bool *muted)
{
webrtc_gst_slot_s *source = NULL;
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_STOP
static int __build_loopback_audiosink(webrtc_gst_slot_s *source, GstElement *link_with)
{
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_START
static void __loopback_decodebin_pad_added_cb(GstElement *decodebin, GstPad *new_pad, gpointer user_data)
{
int ret = WEBRTC_ERROR_NONE;
_post_error_cb_in_idle(source->webrtc, ret);
}
}
+//LCOV_EXCL_STOP
static int __build_loopback_render_pipeline(webrtc_s *webrtc, webrtc_gst_slot_s *source, media_type_e type, unsigned int *track_id)
{
#include "webrtc.h"
#include "webrtc_private.h"
+//LCOV_EXCL_START
static void __tbm_bo_destroy_cb(webrtc_tbm_bo_s *tbm_bo)
{
if (tbm_bo == NULL)
g_free(tbm);
}
+//LCOV_EXCL_STOP
\ No newline at end of file