[Pkg-voip-commits] [janus] 241/282: Added missing properties to permanent save in AudioBridge and VideoRoom

Jonas Smedegaard dr at jones.dk
Wed Dec 20 21:53:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.2.6-1
in repository janus.

commit fb6ddbf2cdcdde1ef850f9c9bf698f2e7f73f4ae
Author: Lorenzo Miniero <lminiero at gmail.com>
Date:   Sat Dec 2 11:36:58 2017 +0100

    Added missing properties to permanent save in AudioBridge and VideoRoom
---
 ice.c                       | 10 +++++++---
 plugins/janus_audiobridge.c | 13 +++++++++++++
 plugins/janus_videoroom.c   | 19 +++++++++++++++++++
 3 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/ice.c b/ice.c
index 7e0f8a0..9518d47 100644
--- a/ice.c
+++ b/ice.c
@@ -1226,10 +1226,10 @@ void janus_ice_free(janus_ice_handle *handle) {
 void janus_ice_webrtc_hangup(janus_ice_handle *handle, const char *reason) {
 	if(handle == NULL)
 		return;
-	janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_CLEANING);
 	if(janus_flags_is_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_ALERT))
 		return;
 	janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_ALERT);
+	janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_CLEANING);
 	janus_plugin *plugin = (janus_plugin *)handle->app;
 	if(plugin != NULL) {
 		JANUS_LOG(LOG_VERB, "[%"SCNu64"] Telling the plugin about the hangup because of a %s (%s)\n",
@@ -2460,11 +2460,15 @@ void *janus_ice_thread(void *data) {
 		return NULL;
 	}
 	JANUS_LOG(LOG_DBG, "[%"SCNu64"] Looping (ICE)...\n", handle->handle_id);
-	g_main_loop_run (loop);
-	janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_CLEANING);
+	if(!janus_flags_is_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_ALERT)) {
+		g_main_loop_run (loop);
+	} else {
+		JANUS_LOG(LOG_WARN, "[%"SCNu64"] Skipping ICE loop because alert has been set\n", handle->handle_id);
+	}
 	if(handle->cdone == 0)
 		handle->cdone = -1;
 	if(!janus_flags_is_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_STOP)) {
+		janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_CLEANING);
 		janus_ice_webrtc_free(handle);
 	}
 	g_thread_unref(g_thread_self());
diff --git a/plugins/janus_audiobridge.c b/plugins/janus_audiobridge.c
index 1dcd943..a62193c 100644
--- a/plugins/janus_audiobridge.c
+++ b/plugins/janus_audiobridge.c
@@ -1795,6 +1795,19 @@ struct janus_plugin_result *janus_audiobridge_handle_message(janus_plugin_sessio
 				janus_config_add_item(config, cat, "secret", audiobridge->room_secret);
 			if(audiobridge->room_pin)
 				janus_config_add_item(config, cat, "pin", audiobridge->room_pin);
+			if(audiobridge->audiolevel_ext) {
+				janus_config_add_item(config, cat, "audiolevel_ext", "yes");
+				if(audiobridge->audiolevel_event)
+					janus_config_add_item(config, cat, "audiolevel_event", "yes");
+				if(audiobridge->audio_active_packets > 0) {
+					g_snprintf(value, BUFSIZ, "%d", audiobridge->audio_active_packets);
+					janus_config_add_item(config, cat, "audio_active_packets", value);
+				}
+				if(audiobridge->audio_level_average > 0) {
+					g_snprintf(value, BUFSIZ, "%d", audiobridge->audio_level_average);
+					janus_config_add_item(config, cat, "audio_level_average", value);
+				}
+			}
 			if(audiobridge->record_file) {
 				janus_config_add_item(config, cat, "record", "yes");
 				janus_config_add_item(config, cat, "record_file", audiobridge->record_file);
diff --git a/plugins/janus_videoroom.c b/plugins/janus_videoroom.c
index 6522f38..85cbf34 100644
--- a/plugins/janus_videoroom.c
+++ b/plugins/janus_videoroom.c
@@ -1882,6 +1882,25 @@ struct janus_plugin_result *janus_videoroom_handle_message(janus_plugin_session
 				janus_config_add_item(config, cat, "secret", videoroom->room_secret);
 			if(videoroom->room_pin)
 				janus_config_add_item(config, cat, "pin", videoroom->room_pin);
+			if(videoroom->audiolevel_ext) {
+				janus_config_add_item(config, cat, "audiolevel_ext", "yes");
+				if(videoroom->audiolevel_event)
+					janus_config_add_item(config, cat, "audiolevel_event", "yes");
+				if(videoroom->audio_active_packets > 0) {
+					g_snprintf(value, BUFSIZ, "%d", videoroom->audio_active_packets);
+					janus_config_add_item(config, cat, "audio_active_packets", value);
+				}
+				if(videoroom->audio_level_average > 0) {
+					g_snprintf(value, BUFSIZ, "%d", videoroom->audio_level_average);
+					janus_config_add_item(config, cat, "audio_level_average", value);
+				}
+			}
+			if(videoroom->videoorient_ext)
+				janus_config_add_item(config, cat, "videoorient_ext", "yes");
+			if(videoroom->playoutdelay_ext)
+				janus_config_add_item(config, cat, "playoutdelay_ext", "yes");
+			if(videoroom->notify_joining)
+				janus_config_add_item(config, cat, "notify_joining", "yes");
 			if(videoroom->record)
 				janus_config_add_item(config, cat, "record", "yes");
 			if(videoroom->rec_dir)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list