]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8204 add sprop-stereo also
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 22 Sep 2015 20:31:09 +0000 (15:31 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 22 Sep 2015 20:31:20 +0000 (15:31 -0500)
html5/verto/js/src/jquery.FSRTC.js
html5/verto/video_demo/js/verto-min.js
src/mod/codecs/mod_opus/mod_opus.c

index 282d6e2e33488bd2e5462ec26c0253b716ec2dfb..c6296f36a8ead0f86a25d939ccffc4dee4570d17 100644 (file)
 
         if (fmtpLineIndex === null) {
            // create an fmtp line
-           sdpLines[opusIndex] = sdpLines[opusIndex] + '\r\na=fmtp:' + opusPayload.toString() + " stereo=1"
+           sdpLines[opusIndex] = sdpLines[opusIndex] + '\r\na=fmtp:' + opusPayload.toString() + " stereo=1; sprop-stereo=1"
        } else {
             // Append stereo=1 to fmtp line.
-            sdpLines[fmtpLineIndex] = sdpLines[fmtpLineIndex].concat('; stereo=1');
+            sdpLines[fmtpLineIndex] = sdpLines[fmtpLineIndex].concat('; stereo=1; sprop-stereo=1');
        }
 
         sdp = sdpLines.join('\r\n');
index 372e83341921002e95082e647dcc439a644166a4..622cfa10a49a4c90c10a99b1008a2e4e97277a68 100644 (file)
@@ -11,7 +11,7 @@ if(self.options.useVideo){self.options.useVideo.style.display='none';}
 setCompat();checkCompat();};$.FSRTC.validRes=[];$.FSRTC.prototype.useVideo=function(obj,local){var self=this;if(obj){self.options.useVideo=obj;self.options.localVideo=local;if(moz){self.constraints.offerToReceiveVideo=true;}else{self.constraints.mandatory.OfferToReceiveVideo=true;}}else{self.options.useVideo=null;self.options.localVideo=null;if(moz){self.constraints.offerToReceiveVideo=false;}else{self.constraints.mandatory.OfferToReceiveVideo=false;}}
 if(self.options.useVideo){self.options.useVideo.style.display='none';}};$.FSRTC.prototype.useStereo=function(on){var self=this;self.options.useStereo=on;};$.FSRTC.prototype.stereoHack=function(sdp){var self=this;if(!self.options.useStereo){return sdp;}
 var sdpLines=sdp.split('\r\n');var opusIndex=findLine(sdpLines,'a=rtpmap','opus/48000'),opusPayload;if(!opusIndex){return sdp;}else{opusPayload=getCodecPayloadType(sdpLines[opusIndex]);}
-var fmtpLineIndex=findLine(sdpLines,'a=fmtp:'+opusPayload.toString());if(fmtpLineIndex===null){sdpLines[opusIndex]=sdpLines[opusIndex]+'\r\na=fmtp:'+opusPayload.toString()+" stereo=1"}else{sdpLines[fmtpLineIndex]=sdpLines[fmtpLineIndex].concat('; stereo=1');}
+var fmtpLineIndex=findLine(sdpLines,'a=fmtp:'+opusPayload.toString());if(fmtpLineIndex===null){sdpLines[opusIndex]=sdpLines[opusIndex]+'\r\na=fmtp:'+opusPayload.toString()+" stereo=1; sprop-stereo=1"}else{sdpLines[fmtpLineIndex]=sdpLines[fmtpLineIndex].concat('; stereo=1; sprop-stereo=1');}
 sdp=sdpLines.join('\r\n');return sdp;};function setCompat(){$.FSRTC.moz=!!navigator.mozGetUserMedia;if(!navigator.getUserMedia){navigator.getUserMedia=navigator.mozGetUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia;}}
 function checkCompat(){if(!navigator.getUserMedia){alert('This application cannot function in this browser.');return false;}
 return true;}
index 6f56727667cac90e26f910ee0935802e5270733c..159a50c22b6fe28720f8e4dbe0c1210926c1946d 100644 (file)
@@ -253,6 +253,7 @@ static char *gen_fmtp(opus_codec_settings_t *settings, switch_memory_pool_t *poo
        }
 
        if (settings->stereo) {
+               settings->sprop_stereo = settings->stereo;
                snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "stereo=%d; ", settings->stereo);
        }