rtp: Add REMB RTP property and set it on PJSIP video RTP.

This change adds a property to RTP instances to indicate that
REMB support is enabled and that sending/receiving should be
passed through.

This also enables it on video RTP instances in PJSIP if
WebRTC support is enabled.

Finally the goog-remb extension is added to the SDP using
the rtcp-fb attribute to indicate our support for it.

Details about REMB can be found on the draft document for it:
https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03

Change-Id: I1902dda1c0882bd1a0d71b2f120684b44b97e789
This commit is contained in:
Joshua Colp
2018-03-18 15:16:40 +00:00
parent 19196a98d0
commit 115939caeb
2 changed files with 6 additions and 0 deletions

View File

@@ -126,6 +126,8 @@ enum ast_rtp_property {
AST_RTP_PROPERTY_RETRANS_RECV, AST_RTP_PROPERTY_RETRANS_RECV,
/*! Enable packet retransmission for sent packets */ /*! Enable packet retransmission for sent packets */
AST_RTP_PROPERTY_RETRANS_SEND, AST_RTP_PROPERTY_RETRANS_SEND,
/*! Enable REMB sending and receiving passthrough support */
AST_RTP_PROPERTY_REMB,
/*! /*!
* \brief Maximum number of RTP properties supported * \brief Maximum number of RTP properties supported

View File

@@ -222,6 +222,7 @@ static int create_rtp(struct ast_sip_session *session, struct ast_sip_session_me
} else if (session_media->type == AST_MEDIA_TYPE_VIDEO) { } else if (session_media->type == AST_MEDIA_TYPE_VIDEO) {
ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_RETRANS_RECV, session->endpoint->media.webrtc); ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_RETRANS_RECV, session->endpoint->media.webrtc);
ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_RETRANS_SEND, session->endpoint->media.webrtc); ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_RETRANS_SEND, session->endpoint->media.webrtc);
ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_REMB, session->endpoint->media.webrtc);
if (session->endpoint->media.tos_video || session->endpoint->media.cos_video) { if (session->endpoint->media.tos_video || session->endpoint->media.cos_video) {
ast_rtp_instance_set_qos(session_media->rtp, session->endpoint->media.tos_video, ast_rtp_instance_set_qos(session_media->rtp, session->endpoint->media.tos_video,
session->endpoint->media.cos_video, "SIP RTP Video"); session->endpoint->media.cos_video, "SIP RTP Video");
@@ -1092,6 +1093,9 @@ static void add_rtcp_fb_to_stream(struct ast_sip_session *session,
*/ */
attr = pjmedia_sdp_attr_create(pool, "rtcp-fb", pj_cstr(&stmp, "* ccm fir")); attr = pjmedia_sdp_attr_create(pool, "rtcp-fb", pj_cstr(&stmp, "* ccm fir"));
pjmedia_sdp_attr_add(&media->attr_count, media->attr, attr); pjmedia_sdp_attr_add(&media->attr_count, media->attr, attr);
attr = pjmedia_sdp_attr_create(pool, "rtcp-fb", pj_cstr(&stmp, "* goog-remb"));
pjmedia_sdp_attr_add(&media->attr_count, media->attr, attr);
} }
/*! \brief Function which negotiates an incoming media stream */ /*! \brief Function which negotiates an incoming media stream */