[asterisk-commits] main/bridge: Add some verbose logging for video source changes (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 7 17:49:23 CST 2016
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4315 )
Change subject: main/bridge: Add some verbose logging for video source changes
......................................................................
main/bridge: Add some verbose logging for video source changes
It's actually quite useful to see the source of a video stream change.
This doesn't happen terribly often, even with talk detection - but when
it does, it's nice to know which channel is now providing your video
stream.
As a verbose 5 level message, it shouldn't be terribly spammy or costly
to have, and is 'lower level' then most other verbose messages that the
bridge system emits.
ASTERISK-26555
Change-Id: Ia1c20ecafa9670171fd38bddcf3beccae47fb15c
---
M main/bridge.c
1 file changed, 12 insertions(+), 0 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/main/bridge.c b/main/bridge.c
index cd8ce99..1bb60eb 100644
--- a/main/bridge.c
+++ b/main/bridge.c
@@ -3770,6 +3770,10 @@
cleanup_video_mode(bridge);
bridge->softmix.video_mode.mode = AST_BRIDGE_VIDEO_MODE_SINGLE_SRC;
bridge->softmix.video_mode.mode_data.single_src_data.chan_vsrc = ast_channel_ref(video_src_chan);
+ ast_verb(5, "Video source in bridge '%s' (%s) is now '%s' (%s)\n",
+ bridge->name, bridge->uniqueid,
+ ast_channel_name(video_src_chan),
+ ast_channel_uniqueid(video_src_chan));
ast_test_suite_event_notify("BRIDGE_VIDEO_MODE", "Message: video mode set to single source\r\nVideo Mode: %u\r\nVideo Channel: %s",
bridge->softmix.video_mode.mode, ast_channel_name(video_src_chan));
ast_indicate(video_src_chan, AST_CONTROL_VIDUPDATE);
@@ -3810,6 +3814,10 @@
}
data->chan_vsrc = ast_channel_ref(chan);
data->average_talking_energy = talker_energy;
+ ast_verb(5, "Video source in bridge '%s' (%s) is now '%s' (%s)\n",
+ bridge->name, bridge->uniqueid,
+ ast_channel_name(data->chan_vsrc),
+ ast_channel_uniqueid(data->chan_vsrc));
ast_test_suite_event_notify("BRIDGE_VIDEO_SRC", "Message: video source updated\r\nVideo Channel: %s", ast_channel_name(data->chan_vsrc));
ast_indicate(data->chan_vsrc, AST_CONTROL_VIDUPDATE);
} else if ((data->average_talking_energy < talker_energy) && !is_keyframe) {
@@ -3817,6 +3825,10 @@
} else if (!data->chan_vsrc && is_keyframe) {
data->chan_vsrc = ast_channel_ref(chan);
data->average_talking_energy = talker_energy;
+ ast_verb(5, "Video source in bridge '%s' (%s) is now '%s' (%s)\n",
+ bridge->name, bridge->uniqueid,
+ ast_channel_name(data->chan_vsrc),
+ ast_channel_uniqueid(data->chan_vsrc));
ast_test_suite_event_notify("BRIDGE_VIDEO_SRC", "Message: video source updated\r\nVideo Channel: %s", ast_channel_name(data->chan_vsrc));
ast_indicate(chan, AST_CONTROL_VIDUPDATE);
} else if (!data->chan_old_vsrc && is_keyframe) {
--
To view, visit https://gerrit.asterisk.org/4315
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1c20ecafa9670171fd38bddcf3beccae47fb15c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
More information about the asterisk-commits
mailing list