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

Issue 1741933002: Prevent a voice channel from sending data before a renderer is set. (Closed)

Created:
4 years, 10 months ago by Taylor Brandstetter
Modified:
4 years, 9 months ago
Reviewers:
the sun, pthatcher1
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

Prevent a voice channel from sending data before a source is set. At the top level, setting a track on an RtpSender is equivalent to setting a source (previously called a renderer) on a voice send stream. An RtpSender without a track is not supposed to send data (not even muted data), so a send stream without a source shouldn't send data. Also replacing SendFlags with a boolean and implementing "Start" and "Stop" methods on AudioSendStream, which was planned anyway and simplifies this CL. R=pthatcher@webrtc.org, solenberg@webrtc.org Committed: https://crrev.com/1a018dcda39691c7cb91ef524003482944bc8960 Cr-Commit-Position: refs/heads/master@{#11918}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fixing unit test. #

Total comments: 14

Patch Set 3 : Renamed AudioRenderer to AudioSource. #

Patch Set 4 : Getting rid of PauseSend/ResumeSend/desired_send_ #

Patch Set 5 : Fixing patch conflict. #

Total comments: 13

Patch Set 6 : Getting rid of SendFlags as suggested. #

Patch Set 7 : Further simplification. #

Patch Set 8 : Adding unit test for the original problem this CL solves. #

Total comments: 1

Patch Set 9 : Adding a TODO and returning a const pointer. #

Total comments: 14

Patch Set 10 : Addressing comments. #

Patch Set 11 : Adding "need to apply options" flag, to retain the previous behavior with send_ and desired_send_ w… #

Total comments: 4

Patch Set 12 : Removing "need_to_apply_options_" in favor of simpler, slightly changed logic. #

Patch Set 13 : Merge with master #

Total comments: 6

Patch Set 14 : Adding stub file to avoid breaking Chromium build. #

Patch Set 15 : Modifying copyright header to satisfy presubmit bot. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -285 lines) Patch
M webrtc/api/mediastreamprovider.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/api/remoteaudiosource.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/api/rtpsender.h View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
M webrtc/api/rtpsender.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/api/rtpsenderreceiver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M webrtc/api/webrtcsession.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M webrtc/api/webrtcsession.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/api/webrtcsession_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +22 lines, -21 lines 0 comments Download
M webrtc/audio/audio_send_stream.cc View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -0 lines 0 comments Download
D webrtc/media/base/audiorenderer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -32 lines 0 comments Download
A + webrtc/media/base/audiosource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +13 lines, -11 lines 0 comments Download
M webrtc/media/base/fakemediaengine.h View 1 2 3 4 5 6 7 8 9 6 chunks +22 lines, -25 lines 0 comments Download
M webrtc/media/base/mediachannel.h View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -8 lines 0 comments Download
M webrtc/media/engine/fakewebrtccall.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M webrtc/media/engine/fakewebrtcvoiceengine.h View 1 2 3 4 5 7 chunks +2 lines, -26 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +5 lines, -8 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine.cc View 1 2 3 4 5 6 7 8 9 10 11 12 14 chunks +64 lines, -80 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine_unittest.cc View 1 2 3 4 5 6 7 8 9 16 chunks +59 lines, -46 lines 0 comments Download
M webrtc/media/media.gyp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M webrtc/pc/channel.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M webrtc/pc/channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -6 lines 0 comments Download

Messages

Total messages: 37 (12 generated)
Taylor Brandstetter
PTAL. I'm not sure if I'm going about this exactly the right way, but the ...
4 years, 10 months ago (2016-02-26 21:45:06 UTC) #2
Taylor Brandstetter
Adding Peter in case he has some thoughts. https://codereview.webrtc.org/1741933002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (left): https://codereview.webrtc.org/1741933002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#oldcode1954 webrtc/media/engine/webrtcvoiceengine.cc:1954: return ...
4 years, 9 months ago (2016-03-02 21:53:53 UTC) #4
pthatcher1
https://codereview.webrtc.org/1741933002/diff/20001/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/1741933002/diff/20001/webrtc/media/engine/webrtcvoiceengine.cc#newcode1200 webrtc/media/engine/webrtcvoiceengine.cc:1200: void StartRendering(AudioRenderer* renderer) { Since the AudioRenderer is really ...
4 years, 9 months ago (2016-03-02 22:18:40 UTC) #5
Taylor Brandstetter
https://codereview.webrtc.org/1741933002/diff/20001/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/1741933002/diff/20001/webrtc/media/engine/webrtcvoiceengine.cc#newcode1200 webrtc/media/engine/webrtcvoiceengine.cc:1200: void StartRendering(AudioRenderer* renderer) { On 2016/03/02 22:18:40, pthatcher1 wrote: ...
4 years, 9 months ago (2016-03-03 00:45:03 UTC) #6
the sun
Nice change! My biggest concern is that cricket::AudioSource is too close to webrtc::AudioSourceInterface. WDYT? https://codereview.webrtc.org/1741933002/diff/80001/webrtc/media/base/audiosource.h ...
4 years, 9 months ago (2016-03-03 15:15:25 UTC) #7
the sun
Nice change! My biggest concern is that cricket::AudioSource is too close to webrtc::AudioSourceInterface. WDYT?
4 years, 9 months ago (2016-03-03 15:15:26 UTC) #8
Taylor Brandstetter
I addressed all your comments (aside from renaming AudioSource, I'm still thinking about that). This ...
4 years, 9 months ago (2016-03-04 16:06:56 UTC) #11
pthatcher1
I think this looks really good. But about the name of "AudioSource": We had a ...
4 years, 9 months ago (2016-03-05 01:55:09 UTC) #12
the sun
On 2016/03/05 01:55:09, pthatcher1 wrote: > I think this looks really good. But about the ...
4 years, 9 months ago (2016-03-07 15:49:22 UTC) #13
the sun
FYI: Not through reviewing yet; will continue in ~4 hours. https://codereview.webrtc.org/1741933002/diff/140001/webrtc/api/webrtcsession_unittest.cc File webrtc/api/webrtcsession_unittest.cc (right): https://codereview.webrtc.org/1741933002/diff/140001/webrtc/api/webrtcsession_unittest.cc#newcode311 ...
4 years, 9 months ago (2016-03-07 16:35:15 UTC) #14
the sun
Great job on this! Just a few more things. As to your question about re-applying ...
4 years, 9 months ago (2016-03-07 21:24:54 UTC) #15
Taylor Brandstetter
https://codereview.webrtc.org/1741933002/diff/160001/webrtc/audio/audio_send_stream.cc File webrtc/audio/audio_send_stream.cc (right): https://codereview.webrtc.org/1741933002/diff/160001/webrtc/audio/audio_send_stream.cc#newcode102 webrtc/audio/audio_send_stream.cc:102: RTC_DCHECK_EQ(0, error); On 2016/03/07 21:24:53, the sun wrote: > ...
4 years, 9 months ago (2016-03-08 00:00:31 UTC) #16
Taylor Brandstetter
I ended up adding a "need_to_apply_options_" flag, so that ApplyOptions is called in the exact ...
4 years, 9 months ago (2016-03-08 02:09:14 UTC) #17
the sun
LGTM, except please remove the need_to_apply_options_ flag. I'd rather change the behavior slightly than (re-)introduce ...
4 years, 9 months ago (2016-03-08 10:54:12 UTC) #18
Taylor Brandstetter
No need to be sorry; thanks for the thorough review. https://codereview.webrtc.org/1741933002/diff/200001/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/1741933002/diff/200001/webrtc/media/engine/webrtcvoiceengine.cc#newcode1827 ...
4 years, 9 months ago (2016-03-08 16:24:42 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1741933002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1741933002/220001
4 years, 9 months ago (2016-03-08 16:25:41 UTC) #22
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/2278) android_compile_x86_dbg on tryserver.webrtc (JOB_FAILED, ...
4 years, 9 months ago (2016-03-08 16:26:53 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1741933002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1741933002/240001
4 years, 9 months ago (2016-03-08 16:29:41 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/3981)
4 years, 9 months ago (2016-03-08 16:47:31 UTC) #29
pthatcher1
lgtm Just random comments/thoughts. Although, you probably want to avoid breaking the Chrome FYI bots, ...
4 years, 9 months ago (2016-03-08 17:46:51 UTC) #30
Taylor Brandstetter
Committed patchset #15 (id:280001) manually as 1a018dcda39691c7cb91ef524003482944bc8960 (presubmit successful).
4 years, 9 months ago (2016-03-08 20:37:54 UTC) #32
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/1a018dcda39691c7cb91ef524003482944bc8960 Cr-Commit-Position: refs/heads/master@{#11918}
4 years, 9 months ago (2016-03-08 20:37:56 UTC) #34
the sun
https://codereview.webrtc.org/1741933002/diff/240001/webrtc/media/base/audiosource.h File webrtc/media/base/audiosource.h (right): https://codereview.webrtc.org/1741933002/diff/240001/webrtc/media/base/audiosource.h#newcode23 webrtc/media/base/audiosource.h:23: class Sink { On 2016/03/08 17:46:51, pthatcher1 wrote: > ...
4 years, 9 months ago (2016-03-08 20:48:40 UTC) #35
pthatcher1
https://codereview.webrtc.org/1741933002/diff/240001/webrtc/media/base/audiosource.h File webrtc/media/base/audiosource.h (right): https://codereview.webrtc.org/1741933002/diff/240001/webrtc/media/base/audiosource.h#newcode23 webrtc/media/base/audiosource.h:23: class Sink { On 2016/03/08 20:48:40, the sun wrote: ...
4 years, 9 months ago (2016-03-08 21:19:18 UTC) #36
Taylor Brandstetter
4 years, 9 months ago (2016-03-08 21:26:21 UTC) #37
Message was sent while issue was closed.
On 2016/03/08 21:19:18, pthatcher1 wrote:
>
https://codereview.webrtc.org/1741933002/diff/240001/webrtc/media/base/audios...
> File webrtc/media/base/audiosource.h (right):
> 
>
https://codereview.webrtc.org/1741933002/diff/240001/webrtc/media/base/audios...
> webrtc/media/base/audiosource.h:23: class Sink {
> On 2016/03/08 20:48:40, the sun wrote:
> > On 2016/03/08 17:46:51, pthatcher1 wrote:
> > > In the CL renaming this, we might as well rename
AudioSourceInterface::Sink
> to
> > > AudioSinkInterface as well, to match the AudioSourceInterface and
> > > AudioSinkInterface.
> > 
> > I think that may be confusing. We'd likely be better off adding an OnClose()
> > method to webrtc::AudioSinkInterface and start to use that in more places.
> 
> There's already a webrtc::AudioSinkInterface?  Yikes.  Well, we should
> definitely merge them in some way, if we can.

Yeah. In comment #11 I mentioned this. The only thing missing from the other
AudioSourceInterface is "OnClose" so we should just add it and converge the two.

Powered by Google App Engine
This is Rietveld 408576698