FS-9697 #resolve [Video compat changes to support older clients]

This commit is contained in:
Anthony Minessale 2016-11-03 17:38:31 -05:00 committed by Mike Jerris
parent b2abff82ee
commit 1cd9fee7f1
3 changed files with 11 additions and 5 deletions

View File

@ -113,6 +113,7 @@ typedef struct ice_s {
} ice_t;
typedef enum { /* RTCP Control Packet types (PT) http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-4 */
_RTCP_PT_FIR = 192, /* [RFC 2032] RTP Payload Format for H.261 Video Streams. types 192 (FIR) section 5.2.1 */
_RTCP_PT_IJ = 195, /* IJ: Extended inter-arrival jitter report RFC5450*/
_RTCP_PT_SR = 200, /* SR: sender report RFC3550 */
_RTCP_PT_RR = 201, /* RR: receiver report RFC3550 */

View File

@ -5273,8 +5273,8 @@ static void switch_core_session_write_blank_video(switch_core_session_t *session
width = smh->vid_params.width;
height = smh->vid_params.height;
if (!width) width = 640;
if (!height) height = 480;
if (!width) width = 352;
if (!height) height = 288;
if (!fps) fps = 15;
if (!(width && height && fps)) {

View File

@ -5930,7 +5930,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
"RTCP packet bytes %" SWITCH_SIZE_T_FMT " type %d pad %d\n",
bytes, msg->header.type, msg->header.p);
if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && (msg->header.type == _RTCP_PT_RTPFB || msg->header.type == _RTCP_PT_PSFB)) {
if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && (msg->header.type == _RTCP_PT_RTPFB || msg->header.type == _RTCP_PT_PSFB || msg->header.type < 200)) {
rtcp_ext_msg_t *extp = (rtcp_ext_msg_t *) msg;
if (extp->header.fmt != 15) { // <---- REMOVE WHEN BRIA STOPS SENDING UNSOLICITED REMB
@ -5938,7 +5938,12 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
rtp_type(rtp_session), msg->header.type, extp->header.fmt);
}
if (msg->header.type == _RTCP_PT_PSFB && (extp->header.fmt == _RTCP_PSFB_FIR || extp->header.fmt == _RTCP_PSFB_PLI)) {
if (msg->header.type == _RTCP_PT_FIR ||
(msg->header.type == _RTCP_PT_PSFB && (extp->header.fmt == _RTCP_PSFB_FIR || extp->header.fmt == _RTCP_PSFB_PLI))) {
if (msg->header.type == _RTCP_PT_FIR) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "Ancient FIR Received. Hello from 1996!\n");
}
switch_core_media_gen_key_frame(rtp_session->session);
if (rtp_session->vbw) {
switch_jb_reset(rtp_session->vbw);
@ -6213,7 +6218,7 @@ static switch_status_t process_rtcp_packet(switch_rtp_t *rtp_session, switch_siz
do {
len = ((switch_size_t)ntohs(msg->header.length) * 4) + 4;
if (msg->header.version != 2 || !(msg->header.type > 199 && msg->header.type < 208)) {
if (msg->header.version != 2 || !(msg->header.type > 191 && msg->header.type < 210)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING,
"INVALID RTCP PACKET TYPE %d VER %d LEN %" SWITCH_SIZE_T_FMT "\n", msg->header.type,
msg->header.version, len);