]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9697 #resolve [Video compat changes to support older clients]
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 3 Nov 2016 22:38:31 +0000 (17:38 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 3 Nov 2016 22:38:31 +0000 (17:38 -0500)
src/include/switch_rtp.h
src/switch_core_media.c
src/switch_rtp.c

index 440b5cc9a46ac51cf1cc0003d3fee1132a0c859b..885ee2ac12639c40b6e72a725f56ca9bec820df9 100644 (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 */
index 1a85f64ab7d00f6fb01d9c9e0afc76b7d88c84f6..6e43e31e9e3f76e13c192375d4ce955eed716d81 100644 (file)
@@ -5838,8 +5838,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)) {
index 1acd1d5b0846fa5147094f0033e5f74e43407c5b..80c815a38f28b99b439decd4db6308d934d1e4b9 100644 (file)
@@ -5943,7 +5943,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
@@ -5951,7 +5951,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, "Aincent 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);
@@ -6226,7 +6231,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);