[asterisk-commits] kmoore: branch kmoore/stasis-bridge_events r384735 - in /team/kmoore/stasis-b...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 4 10:33:38 CDT 2013


Author: kmoore
Date: Thu Apr  4 10:33:33 2013
New Revision: 384735

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384735
Log:
Add video mode and video source to the bridge snapshot

Modified:
    team/kmoore/stasis-bridge_events/include/asterisk/stasis_bridging.h
    team/kmoore/stasis-bridge_events/main/stasis_bridging.c

Modified: team/kmoore/stasis-bridge_events/include/asterisk/stasis_bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridge_events/include/asterisk/stasis_bridging.h?view=diff&rev=384735&r1=384734&r2=384735
==============================================================================
--- team/kmoore/stasis-bridge_events/include/asterisk/stasis_bridging.h (original)
+++ team/kmoore/stasis-bridge_events/include/asterisk/stasis_bridging.h Thu Apr  4 10:33:33 2013
@@ -23,7 +23,7 @@
 extern "C" {
 #endif
 
-struct ast_bridge;
+#include "asterisk/bridging.h"
 
 /*!
  * \brief Structure that contains a snapshot of information about a bridge
@@ -34,9 +34,13 @@
 		AST_STRING_FIELD(uniqueid);
 		/*! Bridge technology that is handling the bridge */
 		AST_STRING_FIELD(technology);
+		/*! The current source for video if any */
+		AST_STRING_FIELD(video_source);
 	);
 	/*! Linked list of channels participating in the bridge */
 	struct ao2_container *channels;
+	/*! Video mode currently set on the bridge */
+	enum ast_bridge_video_mode_type video_mode;
 	/*! Bridge flags to tweak behavior */
 	struct ast_flags feature_flags;
 	/*! Number of channels participating in the bridge */

Modified: team/kmoore/stasis-bridge_events/main/stasis_bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridge_events/main/stasis_bridging.c?view=diff&rev=384735&r1=384734&r2=384735
==============================================================================
--- team/kmoore/stasis-bridge_events/main/stasis_bridging.c (original)
+++ team/kmoore/stasis-bridge_events/main/stasis_bridging.c Thu Apr  4 10:33:33 2013
@@ -70,6 +70,7 @@
 {
 	RAII_VAR(struct ast_bridge_snapshot *, snapshot, NULL, ao2_cleanup);
 	struct ast_bridge_channel *bridge_channel;
+	enum ast_bridge_video_mode_type video_mode;
 
 	snapshot = ao2_alloc(sizeof(*snapshot), bridge_snapshot_dtor);
 	if (!snapshot || ast_string_field_init(snapshot, 128)) {
@@ -98,6 +99,14 @@
 	ast_string_field_set(snapshot, uniqueid, bridge->uniqueid);
 	ast_string_field_set(snapshot, technology, bridge->technology->name);
 
+	video_mode = bridge->video_mode.mode;
+	if ((video_mode == AST_BRIDGE_VIDEO_MODE_SINGLE_SRC
+		|| video_mode == AST_BRIDGE_VIDEO_MODE_TALKER_SRC)
+		&& bridge->video_mode.mode_data.talker_src_data.chan_vsrc) {
+		ast_string_field_set(snapshot, video_source, ast_channel_uniqueid(bridge->video_mode.mode_data.talker_src_data.chan_vsrc));
+	}
+
+	snapshot->video_mode = video_mode;
 	snapshot->feature_flags = bridge->feature_flags;
 	snapshot->num_channels = bridge->num_channels;
 	snapshot->num_active = bridge->num_active;




More information about the asterisk-commits mailing list