webrtc_s *_webrtc = (webrtc_s*)webrtc;
RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
+ RET_VAL_IF(state == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "state is NULL");
g_mutex_lock(&_webrtc->mutex);
RET_VAL_WITH_UNLOCK_IF(_webrtc->track_added_cb.callback == NULL, WEBRTC_ERROR_INVALID_OPERATION, &_webrtc->mutex, "callback was not set");
RET_VAL_WITH_UNLOCK_IF(!_is_owner_of_track_build_context(_webrtc, track_id), WEBRTC_ERROR_INVALID_OPERATION, &_webrtc->mutex,
"this function should be called within the track added callback");
+ RET_VAL_IF(type > WEBRTC_DISPLAY_TYPE_EVAS, WEBRTC_ERROR_INVALID_PARAMETER, "invalid display type(%d)", type);
ret = _set_display_to_sink(webrtc, track_id, (unsigned int)type, (void *)display);
if (ret == WEBRTC_ERROR_NONE)
default:
LOG_ERROR_IF_REACHED("type(%d)", display->type);
- return WEBRTC_ERROR_INVALID_OPERATION;
+ return WEBRTC_ERROR_INVALID_PARAMETER;
}
return ret;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(webrtc->gst.source_slots == NULL, WEBRTC_ERROR_INVALID_OPERATION, "source_slots is NULL");
RET_VAL_IF(source_id == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source_id is NULL");
+ RET_VAL_IF(type > WEBRTC_MEDIA_SOURCE_TYPE_MEDIA_PACKET, WEBRTC_ERROR_INVALID_PARAMETER, "invalid source type(%d)", type);
/* bin_name/source will be freed by function which is set to g_hash_table_new_full() */
id = __get_unoccupied_id(webrtc->gst.source_slots);