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

Issue 2492473002: Stop caching supported codecs in WebRtcVideoEngine2 (Closed)

Created:
4 years, 1 month ago by magjed_webrtc
Modified:
4 years, 1 month ago
Reviewers:
tommi
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, the sun
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Stop caching supported codecs in WebRtcVideoEngine2 We currently cache the result of GetSupportedCodecs in a member variable |video_codecs_| in WebRtcVideoEngine2. This means we need to keep |video_codecs_| and the result of GetSupportedCodecs in sync, which is error prone. It's simpler to just call GetSupportedCodecs when we need it, and we actually end up making fewer calls, so it's faster as well. This CL also returns all std::vectors by-value instead of by-ref. Move semantic together with in-place filtering of codecs actually end up with fewer copies, and it's also simpler to not return references. BUG=webrtc:6337 Committed: https://crrev.com/9f71ec5a3e3175751f4475b126cfda89767363f2 Cr-Commit-Position: refs/heads/master@{#15007}

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -27 lines) Patch
M webrtc/media/base/mediaengine.h View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.h View 2 chunks +1 line, -3 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 3 chunks +2 lines, -5 lines 0 comments Download
M webrtc/pc/channelmanager.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/pc/channelmanager.cc View 2 chunks +9 lines, -11 lines 4 comments Download
M webrtc/pc/channelmanager_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/pc/mediasession.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (11 generated)
magjed1
tommi - please take a look.
4 years, 1 month ago (2016-11-09 15:25:27 UTC) #8
tommi
lgtm. Minor thing below that might be good to get right and consistent, but not ...
4 years, 1 month ago (2016-11-09 16:24:31 UTC) #9
magjed_webrtc
https://codereview.webrtc.org/2492473002/diff/1/webrtc/pc/channelmanager.cc File webrtc/pc/channelmanager.cc (right): https://codereview.webrtc.org/2492473002/diff/1/webrtc/pc/channelmanager.cc#newcode33 webrtc/pc/channelmanager.cc:33: return _stricmp(kRtxCodecName, codec.name.c_str()) == 0; On 2016/11/09 16:24:30, tommi ...
4 years, 1 month ago (2016-11-09 20:37:53 UTC) #11
tommi
https://codereview.webrtc.org/2492473002/diff/1/webrtc/pc/channelmanager.cc File webrtc/pc/channelmanager.cc (right): https://codereview.webrtc.org/2492473002/diff/1/webrtc/pc/channelmanager.cc#newcode33 webrtc/pc/channelmanager.cc:33: return _stricmp(kRtxCodecName, codec.name.c_str()) == 0; On 2016/11/09 20:37:53, magjed_webrtc ...
4 years, 1 month ago (2016-11-09 20:59:50 UTC) #12
magjed_webrtc
https://codereview.webrtc.org/2492473002/diff/1/webrtc/pc/channelmanager.cc File webrtc/pc/channelmanager.cc (right): https://codereview.webrtc.org/2492473002/diff/1/webrtc/pc/channelmanager.cc#newcode33 webrtc/pc/channelmanager.cc:33: return _stricmp(kRtxCodecName, codec.name.c_str()) == 0; On 2016/11/09 20:59:50, tommi ...
4 years, 1 month ago (2016-11-09 21:15:10 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2492473002/1
4 years, 1 month ago (2016-11-10 07:43:36 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-10 07:45:14 UTC) #17
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/9f71ec5a3e3175751f4475b126cfda89767363f2 Cr-Commit-Position: refs/heads/master@{#15007}
4 years, 1 month ago (2016-11-10 07:45:26 UTC) #19
magjed_webrtc
4 years, 1 month ago (2016-11-10 11:36:42 UTC) #20
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.webrtc.org/2489173004/ by magjed@webrtc.org.

The reason for reverting is: This CL probably broke Chromium FYI..

Powered by Google App Engine
This is Rietveld 408576698