if (old == new)
return;
- LOG_INFO("state is changed [%s] -> [%s]", __state_str[old], __state_str[new]);
+ LOG_INFO("webrtc[%p] state is changed [%s] -> [%s]", webrtc, __state_str[old], __state_str[new]);
if (webrtc->state_changed_cb.callback) {
- LOG_DEBUG(">>> callback[%p], user_data[%p]", webrtc->state_changed_cb.callback, webrtc->state_changed_cb.user_data);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", webrtc->state_changed_cb.callback, webrtc->state_changed_cb.user_data);
((webrtc_state_changed_cb)(webrtc->state_changed_cb.callback))((webrtc_h)webrtc, old, new, webrtc->state_changed_cb.user_data);
LOG_DEBUG("<<< end of the callback");
}
{
RET_IF(webrtc == NULL, "webrtc is NULL");
- LOG_ERROR("error[0x%x, %s]", error, __get_error_string(error));
+ LOG_ERROR("webrtc[%p] error[0x%x, %s]", webrtc, 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);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", webrtc->error_cb.callback, webrtc->error_cb.user_data);
((webrtc_error_cb)(webrtc->error_cb.callback))((webrtc_h)webrtc, error, webrtc->state, webrtc->error_cb.user_data);
LOG_DEBUG("<<< end of the callback");
}
cb = &webrtc->peer_connection_state_change_cb;
+ LOG_INFO("webrtc[%p] peer connection state is changed to [%s]", webrtc, __peer_connection_state_info[state].str);
+
if (cb->callback) {
- LOG_DEBUG(">>> callback[%p], user_data[%p]", cb->callback, cb->user_data);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", cb->callback, cb->user_data);
((webrtc_peer_connection_state_change_cb)(cb->callback))((webrtc_h)webrtc, __peer_connection_state_info[state].state, cb->user_data);
LOG_DEBUG("<<< end of the callback");
}
cb = &webrtc->signaling_state_change_cb;
+ LOG_INFO("webrtc[%p] signaling state is changed to [%s]", webrtc, __signaling_state_info[state].str);
+
if (cb->callback) {
- LOG_DEBUG(">>> callback[%p], user_data[%p]", cb->callback, cb->user_data);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", cb->callback, cb->user_data);
((webrtc_signaling_state_change_cb)(cb->callback))((webrtc_h)webrtc, __signaling_state_info[state].state, cb->user_data);
LOG_DEBUG("<<< end of the callback");
}
cb = &webrtc->ice_gathering_state_change_cb;
+ LOG_INFO("webrtc[%p] ICE gathering state is changed to [%s]", webrtc, __ice_gathering_state_info[state].str);
+
if (cb->callback) {
- LOG_DEBUG(">>> callback[%p], user_data[%p]", cb->callback, cb->user_data);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", cb->callback, cb->user_data);
((webrtc_ice_gathering_state_change_cb)(cb->callback))((webrtc_h)webrtc, __ice_gathering_state_info[state].state, cb->user_data);
LOG_DEBUG("<<< end of the callback");
}
cb = &webrtc->ice_connection_state_change_cb;
+ LOG_INFO("webrtc[%p] ICE connection state is changed to [%s]", webrtc, __ice_connection_state_info[state].str);
+
if (cb->callback) {
- LOG_DEBUG(">>> callback[%p], user_data[%p]", cb->callback, cb->user_data);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", cb->callback, cb->user_data);
((webrtc_ice_connection_state_change_cb)(cb->callback))((webrtc_h)webrtc, __ice_connection_state_info[state].state, cb->user_data);
LOG_DEBUG("<<< end of the callback");
}
element = gst_element_factory_make(factory_name, name);
RET_VAL_IF(!element, NULL, "element is NULL [%s]", factory_name);
- LOG_INFO("created element [%s, %s]", factory_name, SAFE_STR(name));
+ LOG_INFO("created element[%p, %s, %s]", element, factory_name, SAFE_STR(name));
return element;
}
return;
}
- LOG_DEBUG(">>> invoke negotiation_needed_cb[%p], user_data[%p]",
- webrtc->negotiation_needed_cb.callback, webrtc->negotiation_needed_cb.user_data);
+ LOG_DEBUG(">>> webrtc[%p] invoke negotiation_needed_cb[%p] user_data[%p]",
+ webrtc, webrtc->negotiation_needed_cb.callback, webrtc->negotiation_needed_cb.user_data);
((webrtc_negotiation_needed_cb)(webrtc->negotiation_needed_cb.callback))((webrtc_h)webrtc, webrtc->negotiation_needed_cb.user_data);
LOG_DEBUG("<<< end of the callback");
}
RET_IF(webrtc == NULL, "webrtc is NULL");
RET_IF(webrtc->ice_candidate_cb.callback == NULL, "ice_candidate_cb is NULL");
- LOG_DEBUG("mlineindex[%u], candidate[%s]", mlineindex, candidate);
+ LOG_DEBUG("webrtc[%p] mlineindex[%u] candidate[%s]", webrtc, mlineindex, candidate);
_candidate = __make_ice_candidate_message(mlineindex, candidate);
if (!_candidate)
_param_candidate = strdup(_candidate);
g_free(_candidate);
- LOG_DEBUG(">>> invoke ice_candidate_cb[%p], user_data[%p]",
- webrtc->ice_candidate_cb.callback, webrtc->ice_candidate_cb.user_data);
+ LOG_DEBUG(">>> webrtc[%p] invoke ice_candidate_cb[%p] user_data[%p]",
+ webrtc, webrtc->ice_candidate_cb.callback, webrtc->ice_candidate_cb.user_data);
((webrtc_ice_candidate_cb)(webrtc->ice_candidate_cb.callback))((webrtc_h)webrtc, (const char *)_param_candidate, webrtc->ice_candidate_cb.user_data);
LOG_DEBUG("<<< end of the callback");
g_object_get(webrtcbin, "connection-state", &state, NULL);
- LOG_DEBUG("[PeerConnectionState] is changed to [%s]", __peer_connection_state_info[state].str);
+ LOG_DEBUG("webrtc[%p] [PeerConnectionState] is changed to [%s]", webrtc, __peer_connection_state_info[state].str);
webrtc->negotiation_states.peer_connection_state = __peer_connection_state_info[state].state;
__post_peer_connection_state_change_cb_in_idle(webrtc, state);
g_object_get(webrtcbin, "signaling-state", &state, NULL);
- LOG_DEBUG("[SignalingState] is changed to [%s]", __signaling_state_info[state].str);
+ LOG_DEBUG("webrtc[%p] [SignalingState] is changed to [%s]", webrtc, __signaling_state_info[state].str);
webrtc->negotiation_states.signaling_state = __signaling_state_info[state].state;
__post_signaling_state_change_cb_in_idle(webrtc, state);
g_object_get(webrtcbin, "ice-gathering-state", &state, NULL);
- LOG_DEBUG("[IceGatheringState] is changed to [%s]", __ice_gathering_state_info[state].str);
+ LOG_DEBUG("webrtc[%p] [IceGatheringState] is changed to [%s]", webrtc, __ice_gathering_state_info[state].str);
webrtc->negotiation_states.ice_gathering_state = __ice_gathering_state_info[state].state;
__post_ice_gathering_state_change_cb_in_idle(webrtc, state);
g_object_get(webrtcbin, "ice-connection-state", &state, NULL);
- LOG_DEBUG("[IceConnectionState] is changed to [%s]", __ice_connection_state_info[state].str);
+ LOG_DEBUG("webrtc[%p] [IceConnectionState] is changed to [%s]", webrtc, __ice_connection_state_info[state].str);
webrtc->negotiation_states.ice_connection_state = __ice_connection_state_info[state].state;
__post_ice_connection_state_change_cb_in_idle(webrtc, state);
RET_IF(transceiver == NULL, "transceiver is NULL");
RET_IF(webrtc == NULL, "webrtc is NULL");
- LOG_INFO("new transceiver[%p, mline:%u, mid:%s, direction:%d], user_data[%p]",
- transceiver, transceiver->mline, transceiver->mid, transceiver->direction, user_data);
+ LOG_INFO("webrtc[%p] new transceiver[%p, mline:%u, mid:%s, direction:%d] user_data[%p]",
+ webrtc, transceiver, transceiver->mline, transceiver->mid, transceiver->direction, user_data);
if (g_hash_table_size(webrtc->gst.source_slots) == 0) {
/* In this case, it might be an answerer without setting any media source.
g_free(webrtc->desc_answer);
webrtc->desc_answer = sdp_msg;
}
+ LOG_INFO("webrtc[%p, %s] %s", webrtc, is_offer ? "offer" : "answer",
+ is_offer ? webrtc->desc_offer : webrtc->desc_answer);
}
static void __offer_created_cb(GstPromise *promise, gpointer user_data)
LOG_DEBUG_ENTER();
__update_session_description(promise, true, webrtc);
+
if (data->callback) {
- LOG_DEBUG(">>> callback[%p], user_data[%p]", data->callback, data->user_data);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", data->callback, data->user_data);
((webrtc_session_description_created_cb)(data->callback))((webrtc_h)webrtc, webrtc->desc_offer, data->user_data);
LOG_DEBUG("<<< end of the callback");
g_mutex_unlock(&webrtc->desc_mutex);
__update_session_description(promise, false, webrtc);
if (data->callback) {
- LOG_DEBUG(">>> callback[%p], user_data[%p]", data->callback, data->user_data);
+ LOG_DEBUG(">>> callback[%p] user_data[%p]", data->callback, data->user_data);
((webrtc_session_description_created_cb)(data->callback))((webrtc_h)webrtc, webrtc->desc_answer, data->user_data);
LOG_DEBUG("<<< end of the callback");
g_mutex_unlock(&webrtc->desc_mutex);
g_mutex_unlock(&webrtc->desc_mutex);
- LOG_INFO("%s", *desc);
-
return WEBRTC_ERROR_NONE;
}
RET_IF(webrtc == NULL, "webrtc is NULL");
RET_IF(name == NULL, "name is NULL");
- LOG_INFO("[%s] track[%s] is added", is_video ? "video" : "audio", name);
+ LOG_INFO("webrtc[%p] [%s] track[%s] is added", webrtc, is_video ? "video" : "audio", name);
if (webrtc->track_added_cb.callback) {
unsigned int id = __get_id_from_name(name);
return;
media_type = gst_structure_get_name(gst_caps_get_structure(gst_pad_get_current_caps(new_pad), 0));
- LOG_INFO("[%s], new_pad[%s], media_type[%s]", GST_ELEMENT_NAME(decodebin), GST_PAD_NAME(new_pad), media_type);
+ LOG_INFO("decodebin[%p, name:%s] new_pad[%s] media_type[%s]", decodebin, GST_ELEMENT_NAME(decodebin), GST_PAD_NAME(new_pad), media_type);
sink = __find_sink_slot(webrtc, GST_ELEMENT_NAME(decodebin));
RET_IF(sink == NULL, "could not find an item by [%s] in sink slots", GST_ELEMENT_NAME(decodebin));
factory_name = GST_OBJECT_NAME(factory);
klass = gst_element_factory_get_metadata(factory, GST_ELEMENT_METADATA_KLASS);
- LOG_INFO("factory [name:%s, klass:%s]", factory_name, klass);
+ LOG_INFO("decodebin[%p] factory[name:%s, klass:%s]", decodebin, factory_name, klass);
str_arr = webrtc->ini.general.gst_excluded_elements;
while (str_arr && *str_arr) {
return WEBRTC_ERROR_INVALID_OPERATION;
}
- LOG_INFO("added a sink slot[%p, id:%u]", sink, sink->id);
+ LOG_INFO("added a sink slot[%p, id:%u] to webrtc[%p]", sink, sink->id, webrtc);
return WEBRTC_ERROR_NONE;
sink->sound_stream_info.type = strdup(stream_type);
sink->sound_stream_info.index = stream_index;
- LOG_INFO("track_id[%u] stream_info[%p, type:%s, index:%d]", track_id, stream_info, stream_type, stream_index);
+ LOG_INFO("webrtc[%p] track_id[%u] stream_info[%p, type:%s, index:%d]", webrtc, track_id, stream_info, stream_type, stream_index);
return WEBRTC_ERROR_NONE;
}
RET_VAL_IF(sink->display == NULL, WEBRTC_ERROR_INVALID_OPERATION, "sink->display is NULL");
}
- LOG_INFO("track_id[%u]", track_id);
+ LOG_INFO("webrtc[%p] track_id[%u]", webrtc, track_id);
_set_display_type_and_surface(sink->display, type, display);