void janus_serial_incoming_rtcp(janus_plugin_session *handle, int video, char *buf, int len) { if(handle == NULL || handle->stopped || g_atomic_int_get(&stopping) || !g_atomic_int_get(&initialized)) return; /* Simple echo test */ if(gateway) { janus_serial_session *session = (janus_serial_session *)handle->plugin_handle; if(!session) { JANUS_LOG(LOG_ERR, "No session associated with this handle...\n"); return; } if(session->destroyed) return; if(session->bitrate > 0) janus_rtcp_cap_remb(buf, len, session->bitrate); gateway->relay_rtcp(handle, video, buf, len); } }
void janus_videocall_incoming_rtcp(janus_plugin_session *handle, int video, char *buf, int len) { if(handle == NULL || handle->stopped || stopping || !initialized) return; if(gateway) { janus_videocall_session *session = (janus_videocall_session *)handle->plugin_handle; if(!session) { JANUS_LOG(LOG_ERR, "No session associated with this handle...\n"); return; } if(!session->peer) { JANUS_LOG(LOG_ERR, "Session has no peer...\n"); return; } if(session->destroy || session->peer->destroy) return; if((!video && !session->audio_active) || (video && !session->video_active)) len = janus_rtcp_remove_nacks(buf, len); if(session->bitrate > 0) janus_rtcp_cap_remb(buf, len, session->bitrate); gateway->relay_rtcp(session->peer->handle, video, buf, len); } }