mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 14:28:34 +00:00
FS-9013 #resolve [Add vad talk time logging channel vars]
This commit is contained in:
1 parent
cc7d70b3cb
commit
fe6182260b
4 files changed
+70
-11
No files matched your search
@@ -1535,6 +1535,30 @@ static void set_stats(switch_core_session_t *session, switch_media_type_t type,
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_media_sync_stats(switch_core_session_t *session)
|
||||
{
|
||||
switch_media_handle_t *smh;
|
||||
switch_rtp_engine_t *a_engine, *v_engine;
|
||||
|
||||
switch_assert(session);
|
||||
|
||||
if (!(smh = session->media_handle)) {
|
||||
return;
|
||||
}
|
||||
|
||||
a_engine = &smh->engines[SWITCH_MEDIA_TYPE_AUDIO];
|
||||
v_engine = &smh->engines[SWITCH_MEDIA_TYPE_VIDEO];
|
||||
|
||||
if (a_engine->rtp_session) {
|
||||
switch_rtp_sync_stats(a_engine->rtp_session);
|
||||
}
|
||||
|
||||
if (v_engine->rtp_session) {
|
||||
switch_rtp_sync_stats(v_engine->rtp_session);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_media_set_stats(switch_core_session_t *session)
|
||||
{
|
||||
|
||||
@@ -1542,6 +1566,8 @@ SWITCH_DECLARE(void) switch_core_media_set_stats(switch_core_session_t *session)
|
||||
return;
|
||||
}
|
||||
|
||||
switch_core_media_sync_stats(session);
|
||||
|
||||
set_stats(session, SWITCH_MEDIA_TYPE_AUDIO, "audio");
|
||||
set_stats(session, SWITCH_MEDIA_TYPE_VIDEO, "video");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user