[Asterisk-code-review] (WIP) sdp: Add support for setting connection address and cl... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Thu Mar 30 13:20:40 CDT 2017


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/5350 )

Change subject: (WIP) sdp: Add support for setting connection address and clean up state.
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/#/c/5350/1/main/sdp_state.c
File main/sdp_state.c:

Line 370: 			if (type_local == AST_MEDIA_TYPE_AUDIO || type_joint == AST_MEDIA_TYPE_VIDEO) {
> This line is a bit weird. We know that type_local and type_joint are the sa
Whoops.


PS1, Line 368: 		/* If we can reuse an existing media stream then do so */
             : 		if (type_local == type_joint) {
             : 			if (type_local == AST_MEDIA_TYPE_AUDIO || type_joint == AST_MEDIA_TYPE_VIDEO) {
             : 				stream_state_local->instance = ao2_bump(stream_state_joint->instance);
             : 				continue;
             : 			}
             : 		}
             : 
             : 		if (type_local == AST_MEDIA_TYPE_AUDIO || type_local == AST_MEDIA_TYPE_VIDEO) {
             : 			/* We need to create a new RTP instance */
             : 			stream_state_local->instance = create_rtp(sdp_state->options, type_local);
             : 			if (!stream_state_local->instance) {
             : 				return -1;
             : 			}
             : 		}
             : 	}
> I'm having a hard time understanding what this function is intending to do.
So, I wrote this part as a basic implementation of how it can work. It lazily attempts to reuse RTP instances that may be present on the joint side already (which can happen if a re-invite occurs). I didn't want to go further because it starts to clash with your merging work.


-- 
To view, visit https://gerrit.asterisk.org/5350
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If7e5307239a9534420732de11c451a2705b6b681
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list