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
pull/20/head
Joshua C. Colp 5 years ago committed by Friendly Automation
parent 41f3a7da4d
commit 8ad06394c4

@ -2293,7 +2293,8 @@ static void softmix_bridge_stream_sources_update(struct ast_bridge *bridge, stru
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 */

Loading…
Cancel
Save