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

Issue 2276913002: DecoderDatabase: Made several methods nonvirtual to minimize mockable interface (Closed)

Created:
4 years, 4 months ago by ossu
Modified:
4 years, 3 months ago
Reviewers:
kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, kwiberg-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, peah-webrtc, minyue-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Removed virtual from several methods in DecoderDatabase to minimize the number of points that need to be mocked for testing. For the now non-virtual methods, DecoderDatabase now does a lookup through GetDecoderInfo and then delegates to the appropriate method in the DecoderInfo object, if one is found. A few other methods were also changed to look up through GetDecoderInfo. Also moved the audio decoder factory into DecoderInfo, so that DecoderInfo::GetDecoder can be used directly. Committed: https://crrev.com/84bc98509be67f5023e6eb663b1877b1c0b3937e Cr-Commit-Position: refs/heads/master@{#13933}

Patch Set 1 #

Total comments: 25

Patch Set 2 : Made CheckPayloadTypes nonvirtual. Turned the rest of DecoderDatabase getters const. Fixed a coupleā€¦ #

Total comments: 5

Patch Set 3 : Turned DecoderInfo factory into a raw pointer. Removed two unnecessary comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -148 lines) Patch
M webrtc/modules/audio_coding/neteq/decoder_database.h View 1 2 6 chunks +42 lines, -26 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/decoder_database.cc View 1 2 7 chunks +66 lines, -75 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h View 1 2 chunks +5 lines, -15 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc View 1 1 chunk +2 lines, -16 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/packet_buffer_unittest.cc View 4 chunks +0 lines, -16 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 23 (14 generated)
ossu
This is the first part in getting my changes to the ACM, where NetEqDecoder is ...
4 years, 4 months ago (2016-08-24 11:15:20 UTC) #3
kwiberg-webrtc
lgtm https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.cc File webrtc/modules/audio_coding/neteq/decoder_database.cc (right): https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.cc#newcode36 webrtc/modules/audio_coding/neteq/decoder_database.cc:36: factory_(factory), std::move here, to avoid unnecessary refcount updates? ...
4 years, 4 months ago (2016-08-24 22:28:49 UTC) #4
ossu
https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.cc File webrtc/modules/audio_coding/neteq/decoder_database.cc (right): https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.cc#newcode36 webrtc/modules/audio_coding/neteq/decoder_database.cc:36: factory_(factory), On 2016/08/24 22:28:49, kwiberg-webrtc wrote: > std::move here, ...
4 years, 3 months ago (2016-08-25 10:23:47 UTC) #5
kwiberg-webrtc
https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.cc File webrtc/modules/audio_coding/neteq/decoder_database.cc (right): https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.cc#newcode36 webrtc/modules/audio_coding/neteq/decoder_database.cc:36: factory_(factory), On 2016/08/25 10:23:47, ossu wrote: > On 2016/08/24 ...
4 years, 3 months ago (2016-08-25 10:49:53 UTC) #8
kwiberg-webrtc
https://codereview.webrtc.org/2276913002/diff/20001/webrtc/modules/audio_coding/neteq/decoder_database.cc File webrtc/modules/audio_coding/neteq/decoder_database.cc (right): https://codereview.webrtc.org/2276913002/diff/20001/webrtc/modules/audio_coding/neteq/decoder_database.cc#newcode212 webrtc/modules/audio_coding/neteq/decoder_database.cc:212: // Decoder not found. This should not be possible. ...
4 years, 3 months ago (2016-08-25 10:53:20 UTC) #9
ossu
https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.h File webrtc/modules/audio_coding/neteq/decoder_database.h (right): https://codereview.webrtc.org/2276913002/diff/1/webrtc/modules/audio_coding/neteq/decoder_database.h#newcode80 webrtc/modules/audio_coding/neteq/decoder_database.h:80: rtc::scoped_refptr<AudioDecoderFactory> factory_; On 2016/08/25 10:49:53, kwiberg-webrtc wrote: > On ...
4 years, 3 months ago (2016-08-25 13:43:04 UTC) #12
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/2276913002/40001
4 years, 3 months ago (2016-08-26 11:49:06 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-08-26 12:41:27 UTC) #21
commit-bot: I haz the power
4 years, 3 months ago (2016-08-26 12:41:34 UTC) #23
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/84bc98509be67f5023e6eb663b1877b1c0b3937e
Cr-Commit-Position: refs/heads/master@{#13933}

Powered by Google App Engine
This is Rietveld 408576698