Commit 9b06b2f0 authored by jansson@chromium.org's avatar jansson@chromium.org

Swapped force OPUS to iSAC

Chrome uses OPUS by default hence it makes sense to force ISAC instead.

BUG=279101
NOTRY=TRUE
TEST=Manual test verifying that iSAC is used instead of OPUS in chrome://webrtc-internals and that the sound is played back OK.

Review URL: https://chromiumcodereview.appspot.com/23460010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220550 0039d316-1c4b-4281-b951-d872f2087c98
parent 46644a6b
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
<input type="text" id="dtmf-tones-gap" size="10" value="50" /> <input type="text" id="dtmf-tones-gap" size="10" value="50" />
<button onclick="insertDtmfFromHere();">Send</button><br/> <button onclick="insertDtmfFromHere();">Send</button><br/>
Options: Options:
<input type="checkbox" id="force-opus" onclick="forceOpusChanged();"/> <input type="checkbox" id="force-isac" onclick="forceIsacChanged();"/>
Force Opus in Outgoing SDP<br/> Force iSAC in Outgoing SDP<br/>
<button onclick="clearLog();">Clear Logs</button> <button onclick="clearLog();">Clear Logs</button>
<h2>Messages</h2> <h2>Messages</h2>
......
...@@ -117,10 +117,10 @@ function insertDtmfFromHere() { ...@@ -117,10 +117,10 @@ function insertDtmfFromHere() {
insertDtmfOnSender(tones, duration, gap); insertDtmfOnSender(tones, duration, gap);
} }
function forceOpusChanged() { function forceIsacChanged() {
var forceOpus = $('force-opus').checked; var forceIsac = $('force-isac').checked;
if (forceOpus) { if (forceIsac) {
forceOpus_(); forceIsac_();
} else { } else {
dontTouchSdp_(); dontTouchSdp_();
} }
...@@ -332,12 +332,13 @@ function preferOpus_() { ...@@ -332,12 +332,13 @@ function preferOpus_() {
} }
/** @private */ /** @private */
function forceOpus_() { function forceIsac_() {
setOutgoingSdpTransform(function(sdp) { setOutgoingSdpTransform(function(sdp) {
// Remove all other codecs (not the video codecs though). // Remove all other codecs (not the video codecs though).
sdp = sdp.replace(/m=audio (\d+) RTP\/SAVPF.*\r\n/g, sdp = sdp.replace(/m=audio (\d+) RTP\/SAVPF.*\r\n/g,
'm=audio $1 RTP/SAVPF 111\r\n'); 'm=audio $1 RTP/SAVPF 104\r\n');
sdp = sdp.replace(/a=rtpmap:(?!111)\d{1,3} (?!VP8|red|ulpfec).*\r\n/g, ''); sdp = sdp.replace('a=fmtp:111 minptime=10', 'a=fmtp:104 minptime=10');
sdp = sdp.replace(/a=rtpmap:(?!104)\d{1,3} (?!VP8|red|ulpfec).*\r\n/g, '');
return sdp; return sdp;
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment