mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-13 05:32:23 +00:00
move rtp stats up to where they will be more useful
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13017 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0cecd465b1
commit
300bb301b7
@ -411,6 +411,9 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
|||||||
*tech_pvt->sofia_private->uuid = '\0';
|
*tech_pvt->sofia_private->uuid = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sofia_glue_set_rtp_stats(tech_pvt);
|
||||||
|
|
||||||
switch_mutex_unlock(tech_pvt->sofia_mutex);
|
switch_mutex_unlock(tech_pvt->sofia_mutex);
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
@ -854,3 +854,4 @@ switch_status_t sofia_set_loglevel(const char *name, int level);
|
|||||||
int sofia_get_loglevel(const char *name);
|
int sofia_get_loglevel(const char *name);
|
||||||
sofia_cid_type_t sofia_cid_name2type(const char *name);
|
sofia_cid_type_t sofia_cid_name2type(const char *name);
|
||||||
void sofia_glue_tech_set_local_sdp(private_object_t *tech_pvt, const char *sdp_str, switch_bool_t dup);
|
void sofia_glue_tech_set_local_sdp(private_object_t *tech_pvt, const char *sdp_str, switch_bool_t dup);
|
||||||
|
void sofia_glue_set_rtp_stats(private_object_t *tech_pvt);
|
||||||
|
@ -1723,6 +1723,17 @@ static void set_stats(switch_rtp_t *rtp_session, private_object_t *tech_pvt, con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sofia_glue_set_rtp_stats(private_object_t *tech_pvt)
|
||||||
|
{
|
||||||
|
if (tech_pvt->rtp_session) {
|
||||||
|
set_stats(tech_pvt->rtp_session, tech_pvt, "audio");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tech_pvt->video_rtp_session) {
|
||||||
|
set_stats(tech_pvt->video_rtp_session, tech_pvt, "video");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sofia_glue_deactivate_rtp(private_object_t *tech_pvt)
|
void sofia_glue_deactivate_rtp(private_object_t *tech_pvt)
|
||||||
{
|
{
|
||||||
int loops = 0;
|
int loops = 0;
|
||||||
@ -1734,14 +1745,12 @@ void sofia_glue_deactivate_rtp(private_object_t *tech_pvt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tech_pvt->rtp_session) {
|
if (tech_pvt->rtp_session) {
|
||||||
set_stats(tech_pvt->rtp_session, tech_pvt, "audio");
|
|
||||||
switch_rtp_destroy(&tech_pvt->rtp_session);
|
switch_rtp_destroy(&tech_pvt->rtp_session);
|
||||||
} else if (tech_pvt->local_sdp_audio_port) {
|
} else if (tech_pvt->local_sdp_audio_port) {
|
||||||
switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_audio_port);
|
switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_audio_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tech_pvt->video_rtp_session) {
|
if (tech_pvt->video_rtp_session) {
|
||||||
set_stats(tech_pvt->video_rtp_session, tech_pvt, "video");
|
|
||||||
switch_rtp_destroy(&tech_pvt->video_rtp_session);
|
switch_rtp_destroy(&tech_pvt->video_rtp_session);
|
||||||
} else if (tech_pvt->local_sdp_video_port) {
|
} else if (tech_pvt->local_sdp_video_port) {
|
||||||
switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_video_port);
|
switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_video_port);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user