[Asterisk-code-review] bridge_softmix: Add additional old states for adding new source. (asterisk[16])

Joshua Colp asteriskteam at digium.com
Wed Jun 10 12:12:14 CDT 2020


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14512 )


Change subject: bridge_softmix: Add additional old states for adding new source.
......................................................................

bridge_softmix: Add additional old states for adding new source.

There are three states that an old stream can be in to allow
becoming a source stream in a new stream:

1. Removed
2. Inactive
3. Sendonly

This change adds the two missing ones, inactive and sendonly,
so if a stream transitions from those to a state where they are
providing video to Asterisk we properly re-negotiate the other
participants.

ASTERISK-28944

Change-Id: Id8256b9b254b403411586284bbaedbf50452de01
---
M bridges/bridge_softmix.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/12/14512/1

diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index 36d82a5..817f8b2 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -2293,7 +2293,8 @@
 				ast_stream_get_state(new_stream) != AST_STREAM_STATE_SENDRECV && ast_stream_get_state(new_stream) != AST_STREAM_STATE_RECVONLY) {
 			/* If a stream renegotiates and is removed then we remove it */
 			removed_streams[removed_streams_count++] = index;
-		} else if (ast_stream_get_state(old_stream) == AST_STREAM_STATE_REMOVED &&
+		} else if ((ast_stream_get_state(old_stream) == AST_STREAM_STATE_REMOVED || ast_stream_get_state(old_stream) == AST_STREAM_STATE_INACTIVE ||
+				ast_stream_get_state(old_stream) == AST_STREAM_STATE_SENDONLY) &&
 				ast_stream_get_state(new_stream) != AST_STREAM_STATE_INACTIVE && ast_stream_get_state(new_stream) != AST_STREAM_STATE_SENDONLY &&
 				ast_stream_get_state(new_stream) != AST_STREAM_STATE_REMOVED) {
 			/* If a stream renegotiates and is added then we add it */

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14512
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Id8256b9b254b403411586284bbaedbf50452de01
Gerrit-Change-Number: 14512
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200610/2ae17f38/attachment.html>


More information about the asterisk-code-review mailing list