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

Issue 1949533002: WIP: Move the creation of AudioCodecFactory into PeerConnectionFactory. (Closed)

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

Description

WIP: Move the creation of AudioCodecFactory into PeerConnectionFactory. NOTE: This CL has been split up into the following constituent CLs, in order: https://codereview.webrtc.org/1990803004/ https://codereview.webrtc.org/1992763002/ https://codereview.webrtc.org/1993783002/ https://codereview.webrtc.org/1991233004/ Original description follows: The interface of CreatePeerConnectionFactory has not changed, since the current state of the code requires our AudioCodecFactory to implement exactly that which was previously implemented in the audio coding module. Since this change cuts straight through many layers of WebRTC it's put up early, so that it can be given a long, hard look at. The flow is roughly as follows: The PeerConnectionFactory constructor now takes an AudioDecoderFactory as a parameter. The CreatePeerConnectionFactory call has not been changed yet, and provides our builtin AudioDecoderFactory for that parameter (i.e. CreateBuiltinAudioDecoderFactory()). PeerConnectionFactory creates a WebRtcMediaEngine2, which takes the AudioDecoderFactory as a constructor parameter. WebRtcMediaEngine2 contains a WebRtcVoiceEngine, which is passed the AudioDecoderFactory as a constructor parameter. WebRtcVoiceEngine holds on to the factory and uses it when constructing WebRtcVoiceMediaChannel, providing it as a parameter to VoEBase::Init, which creates an AudioCodingModule, which creates an AcmReceiver which in turn creates a NetEq instance that has a DecoderDatabase. This DecoderDatabase is constructed with the AudioDecoderFactory as a parameter. Eventually, we want to get to a point where AudioReceiveStream has an AudioCodingModule it creates and owns itself. At that point, the path we pass the AudioDecoderFactory along will go straight through AudioReceiveStream, instead of VoEBase, ChannelManager etc. That path has been laid out in this CL, but the actual setting of the AudioDecoderFactory must be done earlier. There is instead a check here, to make sure the factories being sent down both paths are one and the same. BUG=webrtc:5805

Patch Set 1 #

Total comments: 8

Patch Set 2 : Retained Channel API by adding overloads; also add intended AudioReceiveStream API #

Total comments: 20
Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -103 lines) Patch
M webrtc/api/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/api/peerconnectionfactory.h View 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/api/peerconnectionfactory.cc View 5 chunks +16 lines, -8 lines 2 comments Download
M webrtc/api/peerconnectioninterface.h View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/audio/audio_receive_stream.cc View 1 1 chunk +8 lines, -0 lines 2 comments Download
M webrtc/audio_receive_stream.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M webrtc/media/base/fakemediaengine.h View 2 chunks +5 lines, -2 lines 0 comments Download
M webrtc/media/base/mediaengine.h View 2 chunks +5 lines, -1 line 0 comments Download
M webrtc/media/engine/fakewebrtcvoiceengine.h View 1 chunk +4 lines, -2 lines 0 comments Download
M webrtc/media/engine/nullwebrtcvideoengine_unittest.cc View 1 chunk +12 lines, -7 lines 0 comments Download
M webrtc/media/engine/webrtcmediaengine.h View 1 chunk +3 lines, -2 lines 0 comments Download
M webrtc/media/engine/webrtcmediaengine.cc View 3 chunks +25 lines, -12 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 2 chunks +0 lines, -5 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine.h View 1 2 chunks +8 lines, -2 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine.cc View 1 5 chunks +24 lines, -14 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine_unittest.cc View 9 chunks +27 lines, -8 lines 5 comments Download
M webrtc/modules/audio_coding/acm2/acm_receiver.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/acm2/audio_coding_module.cc View 3 chunks +3 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/include/audio_coding_module.h View 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/decoder_database.h View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/decoder_database.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/include/neteq.h View 2 chunks +4 lines, -1 line 2 comments Download
M webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h View 1 chunk +3 lines, -1 line 1 comment Download
M webrtc/modules/audio_coding/neteq/neteq.cc View 1 chunk +6 lines, -2 lines 2 comments Download
M webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.h View 1 chunk +3 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.cc View 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc View 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc View 2 chunks +3 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc View 2 chunks +3 lines, -1 line 0 comments Download
M webrtc/test/mock_voice_engine.h View 1 chunk +3 lines, -2 lines 0 comments Download
M webrtc/voice_engine/channel.h View 1 3 chunks +18 lines, -1 line 0 comments Download
M webrtc/voice_engine/channel.cc View 1 6 chunks +23 lines, -3 lines 0 comments Download
M webrtc/voice_engine/channel_manager.h View 1 3 chunks +9 lines, -1 line 0 comments Download
M webrtc/voice_engine/channel_manager.cc View 1 2 chunks +18 lines, -4 lines 0 comments Download
M webrtc/voice_engine/channel_proxy.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/voice_engine/channel_proxy.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/voice_engine/include/voe_base.h View 2 chunks +7 lines, -1 line 3 comments Download
M webrtc/voice_engine/voe_base_impl.h View 2 chunks +4 lines, -1 line 0 comments Download
M webrtc/voice_engine/voe_base_impl.cc View 5 chunks +11 lines, -3 lines 3 comments Download

Messages

Total messages: 18 (7 generated)
ossu
https://codereview.webrtc.org/1949533002/diff/1/webrtc/media/engine/webrtcvideoengine2_unittest.cc File webrtc/media/engine/webrtcvideoengine2_unittest.cc (left): https://codereview.webrtc.org/1949533002/diff/1/webrtc/media/engine/webrtcvideoengine2_unittest.cc#oldcode100 webrtc/media/engine/webrtcvideoengine2_unittest.cc:100: : WebRtcVideoEngine2Test(nullptr, field_trials) {} This got removed when updating ...
4 years, 7 months ago (2016-05-03 16:13:22 UTC) #1
the sun
This is a good proof of concept; I don't think we need to do this ...
4 years, 7 months ago (2016-05-03 21:07:30 UTC) #3
ossu
I've put the previous CreateChannel signatures back and added versions that take audio decoder factories ...
4 years, 7 months ago (2016-05-11 11:22:32 UTC) #5
ossu
Hej Karl!
4 years, 7 months ago (2016-05-16 12:40:26 UTC) #8
kwiberg-webrtc
Looks good. And yes please, split it up! https://codereview.webrtc.org/1949533002/diff/40001/webrtc/api/peerconnectionfactory.cc File webrtc/api/peerconnectionfactory.cc (right): https://codereview.webrtc.org/1949533002/diff/40001/webrtc/api/peerconnectionfactory.cc#newcode91 webrtc/api/peerconnectionfactory.cc:91: CreateBuiltinAudioDecoderFactory()), ...
4 years, 7 months ago (2016-05-17 13:33:48 UTC) #9
ossu
-solenberg since he's out of office for a while. I should have the changes neatly ...
4 years, 7 months ago (2016-05-17 14:25:36 UTC) #11
kwiberg-webrtc
> Would you prefer it if I fixed the things you commented on here > ...
4 years, 7 months ago (2016-05-18 03:06:35 UTC) #12
ossu
On 2016/05/18 03:06:35, kwiberg-webrtc wrote: > One of the advantages of small CLs is that ...
4 years, 7 months ago (2016-05-18 10:51:48 UTC) #13
ossu
I've put up all the changes from this CL, and then some, as separate CLs. ...
4 years, 7 months ago (2016-05-20 08:24:10 UTC) #15
kwiberg-webrtc
On 2016/05/20 08:24:10, ossu wrote: > I've put up all the changes from this CL, ...
4 years, 7 months ago (2016-05-20 08:29:11 UTC) #16
ossu
4 years, 7 months ago (2016-05-20 08:34:47 UTC) #18
Message was sent while issue was closed.
Closed the CL and updated the description with links to constituent CLs.

Powered by Google App Engine
This is Rietveld 408576698