return "(invalid error)";
}
}
-//LCOV_EXCL_STOP
void _generate_dot(GstElement *pipeline, const gchar *name)
{
g_free(dot_name);
}
+//LCOV_EXCL_STOP
/* Use g_free() to release the return value. */
static gchar* __get_string_from_json_object(JsonObject *object)
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_START
int _set_packet_drop_probability(webrtc_s *webrtc, bool sender, float probability)
{
const char *prop_name = sender ? "drop-probability-sender" : "drop-probability-receiver";
return WEBRTC_ERROR_NONE;
}
+//LCOV_EXCL_STOP
\ No newline at end of file
if (mm_resource_manager_create(MM_RESOURCE_MANAGER_APP_CLASS_MEDIA,
__resource_release_cb, webrtc,
&webrtc->resource.mgr) != MM_RESOURCE_MANAGER_ERROR_NONE) {
+//LCOV_EXCL_START
LOG_ERROR("failed to init resource manager for media");
return WEBRTC_ERROR_RESOURCE_FAILED;
+//LCOV_EXCL_STOP
}
return WEBRTC_ERROR_NONE;
return WEBRTC_ERROR_NONE;
if (webrtc->resource.res[type] != NULL) {
+//LCOV_EXCL_START
LOG_ERROR("type[%d] resource was already acquired", type);
return WEBRTC_ERROR_RESOURCE_FAILED;
+//LCOV_EXCL_STOP
}
LOG_DEBUG("mark for acquire type[%d] resource", type);
ret = mm_resource_manager_mark_for_acquire(webrtc->resource.mgr, type,
MM_RESOURCE_MANAGER_RES_VOLUME_FULL, &webrtc->resource.res[type]);
if (ret != MM_RESOURCE_MANAGER_ERROR_NONE) {
+//LCOV_EXCL_START
LOG_ERROR("failed to mark resource for acquire, ret[0x%x]", ret);
return WEBRTC_ERROR_RESOURCE_FAILED;
+//LCOV_EXCL_STOP
}
LOG_DEBUG("commit type[%d] resource", type);
ret = mm_resource_manager_commit(webrtc->resource.mgr);
if (ret != MM_RESOURCE_MANAGER_ERROR_NONE) {
+//LCOV_EXCL_START
LOG_ERROR("failed to commit of resource, ret([0x%x]", ret);
return WEBRTC_ERROR_RESOURCE_FAILED;
+//LCOV_EXCL_STOP
}
return WEBRTC_ERROR_NONE;
return WEBRTC_ERROR_NONE;
if (webrtc->resource.release_cb_is_calling) {
+//LCOV_EXCL_START
LOG_INFO("__resource_release_cb is calling, so skip");
return WEBRTC_ERROR_NONE;
+//LCOV_EXCL_STOP
}
ret = mm_resource_manager_mark_all_for_release(webrtc->resource.mgr);
if (ret != MM_RESOURCE_MANAGER_ERROR_NONE) {
+//LCOV_EXCL_START
LOG_ERROR("failed to mark all for release, ret[0x%x]", ret);
return WEBRTC_ERROR_RESOURCE_FAILED;
+//LCOV_EXCL_STOP
}
ret = mm_resource_manager_commit(webrtc->resource.mgr);
if (ret != MM_RESOURCE_MANAGER_ERROR_NONE) {
+//LCOV_EXCL_START
LOG_ERROR("failed to commit resource, ret[0x%x]", ret);
return WEBRTC_ERROR_RESOURCE_FAILED;
+//LCOV_EXCL_STOP
}
LOG_DEBUG("all resources were released by resource manager");
ret = mm_resource_manager_destroy(webrtc->resource.mgr);
if (ret != MM_RESOURCE_MANAGER_ERROR_NONE) {
+//LCOV_EXCL_START
LOG_ERROR("failed to destroy resource manager, ret[0x%x]", ret);
return WEBRTC_ERROR_RESOURCE_FAILED;
+//LCOV_EXCL_STOP
}
webrtc->resource.mgr = NULL;
LOG_DEBUG("destroyed resource manager");
return false;
}
+//LCOV_EXCL_START
static GstElement *__get_hw_encoder_element(webrtc_s *webrtc, webrtc_gst_slot_s *source)
{
const ini_item_media_source_s *ini_source;
LOG_DEBUG("no hw encoder is requested, source_type(%d), media_types(0x%x)", source->type, source->media_types);
return NULL;
}
+//LCOV_EXCL_STOP
static bool __is_encoded_format_supported(webrtc_media_source_type_e type, webrtc_ini_s *ini)
{
source->av[idx].src_pad = NULL;
}
+//LCOV_EXCL_START
static bool __remove_elements_from_bin(GstBin *bin, GList *element_list)
{
GstElement *element;
return true;
}
+//LCOV_EXCL_STOP
static void __foreach_unref_object_cb(gpointer data, gpointer user_data)
{