Bug 985253: Send rtcp-fb for all video codecs, and fix answer generation for H.264 for rtcp-fb r=ehugg

This commit is contained in:
Randell Jesup 2014-04-30 18:18:35 -04:00
parent 2c56220bf1
commit 85fb0aad9b
4 changed files with 17 additions and 6 deletions

View File

@ -4545,7 +4545,7 @@ gsmsdp_add_rtcp_fb (int level, sdp_t *sdp_p,
for (pt_index = 1; pt_index <= num_pts; pt_index++) {
pt_codec = sdp_get_media_payload_type (sdp_p, level, pt_index,
&indicator);
if ((pt_codec & 0xFF) == codec) {
if (codec == RTP_NONE || (pt_codec & 0xFF) == codec) {
int pt = GET_DYN_PAYLOAD_TYPE_VALUE(pt_codec);
/* Add requested a=rtcp-fb:nack attributes */
@ -4665,7 +4665,11 @@ gsmsdp_negotiate_rtcp_fb (cc_sdp_t *cc_sdp_p,
* Mask out the types that we do not support
*/
switch (codec) {
/* Really should be all video codecs... */
case RTP_VP8:
case RTP_H263:
case RTP_H264_P0:
case RTP_H264_P1:
case RTP_I420:
fb_types &=
sdp_rtcp_fb_nack_to_bitmap(SDP_RTCP_FB_NACK_BASIC) |
@ -4674,6 +4678,7 @@ gsmsdp_negotiate_rtcp_fb (cc_sdp_t *cc_sdp_p,
break;
default:
fb_types = 0;
break;
}
/*
@ -5688,7 +5693,7 @@ gsmsdp_add_media_line (fsmdef_dcb_t *dcb_p, const cc_media_cap_t *media_cap,
}
/*
* Setup the local soruce address.
* Setup the local source address.
*/
if (addr_type == CPR_IP_ADDR_IPV6) {
gsmsdp_get_local_source_v6_address(media);
@ -5719,7 +5724,7 @@ gsmsdp_add_media_line (fsmdef_dcb_t *dcb_p, const cc_media_cap_t *media_cap,
/* Add supported rtcp-fb types */
if (media_cap->type == SDP_MEDIA_VIDEO) {
gsmsdp_add_rtcp_fb (level, dcb_p->sdp->src_sdp, RTP_VP8,
gsmsdp_add_rtcp_fb (level, dcb_p->sdp->src_sdp, RTP_NONE, /* RTP_NONE == all */
sdp_rtcp_fb_nack_to_bitmap(SDP_RTCP_FB_NACK_BASIC) |
sdp_rtcp_fb_nack_to_bitmap(SDP_RTCP_FB_NACK_PLI) |
sdp_rtcp_fb_ccm_to_bitmap(SDP_RTCP_FB_CCM_FIR));

View File

@ -539,6 +539,7 @@ typedef enum sdp_srtp_crypto_suite_t_ {
#define SDP_DEFAULT_PACKETIZATION_MODE_VALUE 0 /* max packetization mode for H.264 */
#define SDP_MAX_PACKETIZATION_MODE_VALUE 2 /* max packetization mode for H.264 */
#define SDP_INVALID_PACKETIZATION_MODE_VALUE 255
#define SDP_MAX_LEVEL_ASYMMETRY_ALLOWED_VALUE 1 /* max level asymmetry allowed value for H.264 */
#define SDP_DEFAULT_LEVEL_ASYMMETRY_ALLOWED_VALUE 1 /* default level asymmetry allowed value for H.264 */

View File

@ -492,7 +492,7 @@ sdp_result_e sdp_parse_attr_fmtp (sdp_t *sdp_p, sdp_attr_t *attr_p,
* default value will be assumed for remote sdp. If remote sdp does specify
* any value for these parameters, then default value will be overridden.
*/
fmtp_p->packetization_mode = 0;
fmtp_p->packetization_mode = SDP_DEFAULT_PACKETIZATION_MODE_VALUE;
fmtp_p->level_asymmetry_allowed = SDP_DEFAULT_LEVEL_ASYMMETRY_ALLOWED_VALUE;
/* BEGIN - a typical macro fn to replace '/' with ';' from fmtp line*/

View File

@ -228,7 +228,7 @@ sdp_result_e sdp_add_new_attr (void *sdp_ptr, u16 level, u8 cap_num,
fmtp_p = &(new_attr_p->attr.fmtp);
fmtp_p->fmtp_format = SDP_FMTP_UNKNOWN_TYPE;
// set to invalid value
fmtp_p->packetization_mode = 0xff;
fmtp_p->packetization_mode = SDP_INVALID_PACKETIZATION_MODE_VALUE;
fmtp_p->level_asymmetry_allowed = SDP_INVALID_LEVEL_ASYMMETRY_ALLOWED_VALUE;
fmtp_p->annexb_required = FALSE;
fmtp_p->annexa_required = FALSE;
@ -7972,7 +7972,12 @@ sdp_result_e sdp_attr_get_fmtp_pack_mode (void *sdp_ptr, u16 level,
sdp_p->conf_p->num_invalid_param++;
return (SDP_INVALID_PARAMETER);
} else {
*val = attr_p->attr.fmtp.packetization_mode;
if (SDP_INVALID_PACKETIZATION_MODE_VALUE == attr_p->attr.fmtp.packetization_mode) {
/* packetization mode unspecified (optional) */
*val = SDP_DEFAULT_PACKETIZATION_MODE_VALUE;
} else {
*val = attr_p->attr.fmtp.packetization_mode;
}
return (SDP_SUCCESS);
}
}