Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Issue 1845673002: Removing `preference` field from `cricket::Codec`. (Closed)

Created:
4 years, 8 months ago by Taylor Brandstetter
Modified:
4 years, 8 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Removing `preference` field from `cricket::Codec`. This field only existed as an implementation detail for getting the codecs sorted, so it doesn't need to be in the public interface. It cluttered the code and undesirably affected codec comparisons, causing the video encoder to be reconfigured if a codec's preference changed but nothing else did. BUG=webrtc:5690 Committed: https://crrev.com/67cf2c1294e65d270e860a3103f7dd630656766d Cr-Commit-Position: refs/heads/master@{#12349}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Removing `preference` from `cricket::Codec` #

Patch Set 3 : Adding back a unit test. #

Total comments: 6

Patch Set 4 : Fixing typo. #

Patch Set 5 : Making comment more clear. #

Total comments: 2

Patch Set 6 : Improve codec sorting performance. #

Total comments: 4

Patch Set 7 : Optimize in another place. #

Patch Set 8 : Fixing patch conflicts. #

Patch Set 9 : #

Patch Set 10 : Fixing sort order (got reversed when optimizations were made) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -378 lines) Patch
M webrtc/api/jsepsessiondescription.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/api/jsepsessiondescription.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/api/jsepsessiondescription_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/api/webrtcsdp.cc View 1 2 3 4 5 6 7 8 9 20 chunks +56 lines, -53 lines 0 comments Download
M webrtc/api/webrtcsdp_unittest.cc View 1 2 3 4 5 6 7 6 chunks +13 lines, -13 lines 0 comments Download
M webrtc/api/webrtcsession_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/media/base/codec.h View 1 6 chunks +4 lines, -19 lines 0 comments Download
M webrtc/media/base/codec.cc View 1 8 chunks +16 lines, -28 lines 0 comments Download
M webrtc/media/base/codec_unittest.cc View 1 6 chunks +68 lines, -76 lines 0 comments Download
M webrtc/media/base/fakemediaengine.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/media/base/rtpdataengine.cc View 1 3 chunks +3 lines, -4 lines 0 comments Download
M webrtc/media/base/videoengine_unittest.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -18 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 1 2 3 4 5 6 7 11 chunks +39 lines, -20 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine.cc View 1 2 3 4 5 6 7 3 chunks +20 lines, -27 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +39 lines, -41 lines 0 comments Download
M webrtc/media/sctp/sctpdataengine.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/pc/channel_unittest.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -6 lines 0 comments Download
M webrtc/pc/channelmanager_unittest.cc View 1 2 chunks +4 lines, -6 lines 0 comments Download
M webrtc/pc/mediasession.h View 1 2 chunks +2 lines, -6 lines 0 comments Download
M webrtc/pc/mediasession.cc View 1 2 3 4 5 6 7 8 9 6 chunks +20 lines, -10 lines 0 comments Download
M webrtc/pc/mediasession_unittest.cc View 1 4 chunks +27 lines, -39 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
Taylor Brandstetter
4 years, 8 months ago (2016-03-30 20:05:11 UTC) #2
pbos-webrtc
Change LG but I think we should remove cricket::VideoCodec from here if we can. https://codereview.webrtc.org/1845673002/diff/1/webrtc/media/engine/webrtcvideoengine2.cc ...
4 years, 8 months ago (2016-04-04 07:58:58 UTC) #3
Taylor Brandstetter
On 2016/04/04 07:58:58, pbos-webrtc wrote: > Change LG but I think we should remove cricket::VideoCodec ...
4 years, 8 months ago (2016-04-04 17:45:19 UTC) #4
Taylor Brandstetter
PTAL Peter. This CL may seem big, but in all but a few files, it's ...
4 years, 8 months ago (2016-04-04 23:30:03 UTC) #7
pbos-webrtc
lgtm, I'd like at least one more eye on it though. :) https://codereview.webrtc.org/1845673002/diff/40001/webrtc/api/webrtcsdp_unittest.cc File webrtc/api/webrtcsdp_unittest.cc ...
4 years, 8 months ago (2016-04-05 09:30:32 UTC) #8
Taylor Brandstetter
Oh, when I said "PTAL Peter" I meant Thatcher since he's an /api/ owner. Thanks ...
4 years, 8 months ago (2016-04-05 17:57:13 UTC) #9
pbos-webrtc
https://codereview.webrtc.org/1845673002/diff/40001/webrtc/api/webrtcsdp_unittest.cc File webrtc/api/webrtcsdp_unittest.cc (right): https://codereview.webrtc.org/1845673002/diff/40001/webrtc/api/webrtcsdp_unittest.cc#newcode2150 webrtc/api/webrtcsdp_unittest.cc:2150: // The codecs in the AudioContentDescription will be sorted ...
4 years, 8 months ago (2016-04-05 18:11:35 UTC) #10
Taylor Brandstetter
https://codereview.webrtc.org/1845673002/diff/40001/webrtc/api/webrtcsdp_unittest.cc File webrtc/api/webrtcsdp_unittest.cc (right): https://codereview.webrtc.org/1845673002/diff/40001/webrtc/api/webrtcsdp_unittest.cc#newcode2150 webrtc/api/webrtcsdp_unittest.cc:2150: // The codecs in the AudioContentDescription will be sorted ...
4 years, 8 months ago (2016-04-06 01:11:15 UTC) #11
pbos-webrtc
thanks, lgtm
4 years, 8 months ago (2016-04-06 09:24:27 UTC) #12
pthatcher1
lgtm https://codereview.webrtc.org/1845673002/diff/80001/webrtc/api/webrtcsdp.cc File webrtc/api/webrtcsdp.cc (right): https://codereview.webrtc.org/1845673002/diff/80001/webrtc/api/webrtcsdp.cc#newcode2225 webrtc/api/webrtcsdp.cc:2225: media_desc->set_codecs(codecs); It would be nice if this weren't ...
4 years, 8 months ago (2016-04-11 21:53:40 UTC) #13
Taylor Brandstetter
https://codereview.webrtc.org/1845673002/diff/80001/webrtc/api/webrtcsdp.cc File webrtc/api/webrtcsdp.cc (right): https://codereview.webrtc.org/1845673002/diff/80001/webrtc/api/webrtcsdp.cc#newcode2225 webrtc/api/webrtcsdp.cc:2225: media_desc->set_codecs(codecs); On 2016/04/11 21:53:40, pthatcher1 wrote: > It would ...
4 years, 8 months ago (2016-04-12 00:18:01 UTC) #14
pthatcher1
Oh, you're right. Even worse :) https://codereview.webrtc.org/1845673002/diff/100001/webrtc/api/webrtcsdp.cc File webrtc/api/webrtcsdp.cc (right): https://codereview.webrtc.org/1845673002/diff/100001/webrtc/api/webrtcsdp.cc#newcode2232 webrtc/api/webrtcsdp.cc:2232: }); A https://en.wikipedia.org/wiki/Schwartzian_transform ...
4 years, 8 months ago (2016-04-12 00:35:20 UTC) #15
Taylor Brandstetter
https://codereview.webrtc.org/1845673002/diff/100001/webrtc/api/webrtcsdp.cc File webrtc/api/webrtcsdp.cc (right): https://codereview.webrtc.org/1845673002/diff/100001/webrtc/api/webrtcsdp.cc#newcode2232 webrtc/api/webrtcsdp.cc:2232: }); On 2016/04/12 00:35:19, pthatcher1 wrote: > A https://en.wikipedia.org/wiki/Schwartzian_transform ...
4 years, 8 months ago (2016-04-12 01:23:29 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845673002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845673002/120001
4 years, 8 months ago (2016-04-12 22:37:49 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_x64_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_compile_x64_dbg/builds/3110) android_compile_x86_dbg on tryserver.webrtc (JOB_FAILED, ...
4 years, 8 months ago (2016-04-12 22:39:02 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845673002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845673002/180001
4 years, 8 months ago (2016-04-13 00:32:43 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: win_baremetal on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 8 months ago (2016-04-13 02:33:11 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845673002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845673002/180001
4 years, 8 months ago (2016-04-13 17:05:18 UTC) #28
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 8 months ago (2016-04-13 17:07:21 UTC) #30
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/67cf2c1294e65d270e860a3103f7dd630656766d Cr-Commit-Position: refs/heads/master@{#12349}
4 years, 8 months ago (2016-04-13 17:07:35 UTC) #32
sanmrtn96
On 2016/04/13 17:07:35, commit-bot: I haz the power wrote: > Patchset 10 (id:??) landed as ...
4 years, 8 months ago (2016-04-14 15:55:44 UTC) #33
pbos-webrtc
On 2016/04/14 15:55:44, sanmrtn96 wrote: > On 2016/04/13 17:07:35, commit-bot: I haz the power wrote: ...
4 years, 8 months ago (2016-04-14 15:59:59 UTC) #34
sanmrtn96
4 years, 8 months ago (2016-04-14 17:03:27 UTC) #35
Message was sent while issue was closed.
On 2016/04/14 15:59:59, pbos-webrtc wrote:
> On 2016/04/14 15:55:44, sanmrtn96 wrote:
> > On 2016/04/13 17:07:35, commit-bot: I haz the power wrote:
> > > Patchset 10 (id:??) landed as
> > > https://crrev.com/67cf2c1294e65d270e860a3103f7dd630656766d
> > > Cr-Commit-Position: refs/heads/master@{#12349}
> > 
> > Hi,
> > 
> > since this recent commit on, JsepSessionDescription::Initialize throws
> > std::bad_alloc for some unknown reasons. After some investigations I found
out
> > that it's ParseMediaDescription throwing the mentioned exception. Everything
> > used to work before this commit.
> > 
> > You can try to reproduce the issue with passing the SDP string below to
> > Initialize(), the string in my case is generated by the Google API itself at
> > some point in my program (I did not invent anything in the SDP):
> > 
> > Code sample:
> >     webrtc::JsepSessionDescription jsep_session_desc("dummy");
> >     webrtc::SdpParseError parseerror;
> >     if (!jsep_session_desc.Initialize(sdp, &parseerror)) { // throws
> > std::bad_alloc
> >           // error
> > 
> > SDP string:
> > 
> > 
> > v=0
> > o=- 3689508302284005197 2 IN IP4 127.0.0.1
> > s=-
> > t=0 0
> > a=group:BUNDLE audio video
> > a=msid-semantic: WMS stream_label
> > m=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 106 105 13 127 126
> > c=IN IP4 0.0.0.0
> > a=rtcp:9 IN IP4 0.0.0.0
> > a=ice-ufrag:q48RnQP8moDmhl3r
> > a=ice-pwd:94EEJYcM478FE2PvrIeT/sDd
> > a=fingerprint:sha-256
> >
>
1F:E3:BF:30:FA:64:27:0C:6A:EC:E8:36:AE:F6:35:C7:80:F6:0A:46:B1:88:80:8D:E8:2E:F8:A2:F4:64:28:4C
> > a=setup:actpass
> > a=mid:audio
> > a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
> > a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
> > a=recvonly
> > a=rtcp-mux
> > a=rtpmap:111 opus/48000/2
> > a=rtcp-fb:111 transport-cc
> > a=fmtp:111 minptime=10; useinbandfec=1
> > a=rtpmap:103 ISAC/16000
> > a=rtpmap:9 G722/8000
> > a=rtpmap:102 ILBC/8000
> > a=rtpmap:0 PCMU/8000
> > a=rtpmap:8 PCMA/8000
> > a=rtpmap:106 CN/32000
> > a=rtpmap:105 CN/16000
> > a=rtpmap:13 CN/8000
> > a=rtpmap:127 red/8000
> > a=rtpmap:126 telephone-event/8000
> > a=maxptime:60
> > m=video 9 UDP/TLS/RTP/SAVPF 100 101 116 117 120 96 97 98
> > c=IN IP4 0.0.0.0
> > a=rtcp:9 IN IP4 0.0.0.0
> > a=ice-ufrag:q48RnQP8moDmhl3r
> > a=ice-pwd:94EEJYcM478FE2PvrIeT/sDd
> > a=fingerprint:sha-256
> >
>
1F:E3:BF:30:FA:64:27:0C:6A:EC:E8:36:AE:F6:35:C7:80:F6:0A:46:B1:88:80:8D:E8:2E:F8:A2:F4:64:28:4C
> > a=setup:actpass
> > a=mid:video
> > a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
> > a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
> > a=extmap:4 urn:3gpp:video-orientation
> > a=sendrecv
> > a=rtcp-mux
> > a=rtcp-rsize
> > a=rtpmap:100 VP8/90000
> > a=rtcp-fb:100 ccm fir
> > a=rtcp-fb:100 nack
> > a=rtcp-fb:100 nack pli
> > a=rtcp-fb:100 goog-remb
> > a=rtcp-fb:100 transport-cc
> > a=rtpmap:101 VP9/90000
> > a=rtcp-fb:101 ccm fir
> > a=rtcp-fb:101 nack
> > a=rtcp-fb:101 nack pli
> > a=rtcp-fb:101 goog-remb
> > a=rtcp-fb:101 transport-cc
> > a=rtpmap:116 red/90000
> > a=rtpmap:117 ulpfec/90000
> > a=rtpmap:120 H264/90000
> > a=rtcp-fb:120 ccm fir
> > a=rtcp-fb:120 nack
> > a=rtcp-fb:120 nack pli
> > a=rtcp-fb:120 goog-remb
> > a=rtcp-fb:120 transport-cc
> > a=rtpmap:96 rtx/90000
> > a=fmtp:96 apt=100
> > a=rtpmap:97 rtx/90000
> > a=fmtp:97 apt=101
> > a=rtpmap:98 rtx/90000
> > a=fmtp:98 apt=116
> > a=ssrc-group:FID 3784504217 2216658055
> > a=ssrc:3784504217 cname:bd13e4/xvZtv4u8o
> > a=ssrc:3784504217 msid:stream_label video_label
> > a=ssrc:3784504217 mslabel:stream_label
> > a=ssrc:3784504217 label:video_label
> > a=ssrc:2216658055 cname:bd13e4/xvZtv4u8o
> > a=ssrc:2216658055 msid:stream_label video_label
> > a=ssrc:2216658055 mslabel:stream_label
> > a=ssrc:2216658055 label:video_label
> 
> Can you/have you filed a bug at http://bugs.webrtc.org ? Please link it here
with repro
> instructions (what's your setup, etc?).

This is the bug report
https://bugs.chromium.org/p/webrtc/issues/detail?id=5786

Powered by Google App Engine
This is Rietveld 408576698