[Asterisk-code-review] rtp: Add support for RTP extension negotiation and abs-send-... (asterisk[15])

Richard Mudgett asteriskteam at digium.com
Thu May 3 16:11:35 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/8883 )

Change subject: rtp: Add support for RTP extension negotiation and abs-send-time.
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.asterisk.org/#/c/8883/2/res/res_rtp_asterisk.c
File res/res_rtp_asterisk.c:

https://gerrit.asterisk.org/#/c/8883/2/res/res_rtp_asterisk.c@4424
PS2, Line 4424: 			/* 4 bytes for the shared information, 4 bytes for abs-send-time */
              : 			hdrlen += 8;
> It's not adding two uint32s. It's 4 + 1 + 3. 4 bytes for shared information
Ah.  I see.  Then we don't need to put the whole second uint32 in the buffer to then overwrite most of it with the uint24.


https://gerrit.asterisk.org/#/c/8883/2/res/res_rtp_asterisk.c@4446
PS2, Line 4446: 			put_unaligned_uint32(rtpheader + 16, htonl((abs_send_time_id << 28) | (2 << 24)));
This can be replaced with:
rtpheader[16] = (abs_send_time_id << (28 - 24) | 2 << (24 - 24);
or simplified
rtpheader[16] = (abs_send_time_id << 4) | 2;

since we only care about the most significant byte.  The next three are set to the time.



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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: comment
Gerrit-Change-Id: I508deac557867b1e27fc7339be890c8018171588
Gerrit-Change-Number: 8883
Gerrit-PatchSet: 2
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Thu, 03 May 2018 21:11:35 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180503/f99298f2/attachment-0001.html>


More information about the asterisk-code-review mailing list