[WEBRTC_TRANSCEIVER_DIRECTION_SENDRECV] = { "SENDRECV", GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV }
};
+static const char *__get_error_string(webrtc_error_e error)
+{
+ switch (error) {
+ case WEBRTC_ERROR_NONE:
+ return "NONE";
+ case WEBRTC_ERROR_NOT_SUPPORTED:
+ return "NOT_SUPPORTED";
+ case WEBRTC_ERROR_PERMISSION_DENIED:
+ return "PERMISSION_DENIED";
+ case WEBRTC_ERROR_INVALID_PARAMETER:
+ return "INVALID_PARAMETER";
+ case WEBRTC_ERROR_INVALID_OPERATION:
+ return "INVALID_OPERATION";
+ case WEBRTC_ERROR_INVALID_STATE:
+ return "INVALID_STATE";
+ case WEBRTC_ERROR_CONNECTION_FAILED:
+ return "CONNECTION_FAILED";
+ case WEBRTC_ERROR_STREAM_FAILED:
+ return "STREAM_FAILED";
+ case WEBRTC_ERROR_RESOURCE_FAILED:
+ return "RESOURCE_FAILED";
+ case WEBRTC_ERROR_RESOURCE_CONFLICT:
+ return "RESOURCE_CONFLICT";
+ default:
+ LOG_ERROR_IF_REACHED("invalid error(0x%x)", error);
+ return "(invalid error)";
+ }
+}
+
void _generate_dot(webrtc_s *webrtc, const gchar *name)
{
gchar *dot_name;
{
RET_IF(webrtc == NULL, "webrtc is NULL");
- LOG_INFO("error[0x%x]", error);
+ LOG_ERROR("error[0x%x, %s]", error, __get_error_string(error));
if (webrtc->error_cb.callback) {
LOG_DEBUG(">>> callback[%p], user_data[%p]", webrtc->error_cb.callback, webrtc->error_cb.user_data);