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

Issue 2042603002: Movable support for VideoReceiveStream::Config and avoid copies (Closed)

Created:
4 years, 6 months ago by tommi
Modified:
4 years, 6 months ago
Reviewers:
pbos-webrtc, mflodman
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, video-team_agora.io, yujie_mao (webrtc), zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc, the sun, perkj_webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Movable support for VideoReceiveStream::Config and avoid copies. Instead of the default copy constructor, the Copy() method has to be used. In this CL, the number of copies has been reduced significantly in production code. One case in the video engine remains, where we need to restart a video stream. Even in that case, I'm sure we could avoid it, but for this particular CL, I decided against it to keep things simple (and it's also an edge case). Most importantly, creating copies is made harder and the interface encourages ownership transfers. R=mflodman@webrtc.org, pbos@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/733b5478dd7a150cafa0e5796519ed89d43a78e6

Patch Set 1 #

Patch Set 2 : git cl format #

Total comments: 10

Patch Set 3 : Address comments #

Total comments: 3

Patch Set 4 : Add TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -68 lines) Patch
M webrtc/call.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/call/bitrate_estimator_tests.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/call/call.cc View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M webrtc/media/engine/fakewebrtccall.h View 2 chunks +3 lines, -4 lines 0 comments Download
M webrtc/media/engine/fakewebrtccall.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 1 2 4 chunks +7 lines, -14 lines 0 comments Download
M webrtc/test/call_test.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/video/end_to_end_tests.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/video/receive_statistics_proxy.h View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M webrtc/video/receive_statistics_proxy.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M webrtc/video/replay.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/video/rtp_stream_receiver.h View 2 chunks +3 lines, -2 lines 0 comments Download
M webrtc/video/rtp_stream_receiver.cc View 1 2 3 4 chunks +13 lines, -12 lines 0 comments Download
M webrtc/video/video_quality_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/video/video_receive_stream.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webrtc/video/video_receive_stream.cc View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
M webrtc/video_receive_stream.h View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (13 generated)
tommi
git cl format
4 years, 6 months ago (2016-06-04 21:54:16 UTC) #1
tommi
4 years, 6 months ago (2016-06-05 08:07:28 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2042603002/20001
4 years, 6 months ago (2016-06-05 08:07:38 UTC) #7
tommi
Worth mentioning that this changes the public interface in a way that requires callers of ...
4 years, 6 months ago (2016-06-05 08:11:46 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-05 08:43:47 UTC) #10
pbos-webrtc
Sorry this might be a bit confusing since I'm very shaky on rvalue references, but ...
4 years, 6 months ago (2016-06-06 16:15:34 UTC) #12
tommi
https://codereview.webrtc.org/2042603002/diff/20001/webrtc/call.h File webrtc/call.h (right): https://codereview.webrtc.org/2042603002/diff/20001/webrtc/call.h#newcode117 webrtc/call.h:117: VideoReceiveStream::Config configuration) = 0; On 2016/06/06 16:15:34, pbos-webrtc wrote: ...
4 years, 6 months ago (2016-06-08 09:49:40 UTC) #13
tommi
Address comments
4 years, 6 months ago (2016-06-08 09:49:42 UTC) #14
pbos-webrtc
Can you make the const-reference->const ptr change elsewhere under webrtc/video too? This could be done ...
4 years, 6 months ago (2016-06-08 11:24:05 UTC) #15
tommi
https://codereview.webrtc.org/2042603002/diff/20001/webrtc/video/receive_statistics_proxy.h File webrtc/video/receive_statistics_proxy.h (right): https://codereview.webrtc.org/2042603002/diff/20001/webrtc/video/receive_statistics_proxy.h#newcode40 webrtc/video/receive_statistics_proxy.h:40: ReceiveStatisticsProxy(const VideoReceiveStream::Config* config, On 2016/06/08 11:24:05, pbos-webrtc wrote: > ...
4 years, 6 months ago (2016-06-08 13:28:41 UTC) #16
pbos-webrtc
On 2016/06/08 13:28:41, tommi-webrtc wrote: > https://codereview.webrtc.org/2042603002/diff/20001/webrtc/video/receive_statistics_proxy.h > File webrtc/video/receive_statistics_proxy.h (right): > > https://codereview.webrtc.org/2042603002/diff/20001/webrtc/video/receive_statistics_proxy.h#newcode40 > ...
4 years, 6 months ago (2016-06-08 14:39:51 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2042603002/40001
4 years, 6 months ago (2016-06-08 14:48:18 UTC) #19
tommi
On 2016/06/08 14:48:18, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 6 months ago (2016-06-10 11:03:11 UTC) #21
mflodman
lgtm https://codereview.webrtc.org/2042603002/diff/40001/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2042603002/diff/40001/webrtc/video/receive_statistics_proxy.cc#newcode132 webrtc/video/receive_statistics_proxy.cc:132: if (config_.rtp.fec.ulpfec_payload_type != -1) { Currently is this ...
4 years, 6 months ago (2016-06-10 14:40:55 UTC) #22
tommi
https://codereview.webrtc.org/2042603002/diff/40001/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2042603002/diff/40001/webrtc/video/receive_statistics_proxy.cc#newcode132 webrtc/video/receive_statistics_proxy.cc:132: if (config_.rtp.fec.ulpfec_payload_type != -1) { On 2016/06/10 14:40:55, mflodman ...
4 years, 6 months ago (2016-06-10 15:42:37 UTC) #23
tommi
Add TODO
4 years, 6 months ago (2016-06-10 15:42:54 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2042603002/60001
4 years, 6 months ago (2016-06-10 15:43:06 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14083)
4 years, 6 months ago (2016-06-10 15:50:17 UTC) #29
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/733b5478dd7a150cafa0e5796519ed89d43a78e6 Cr-Commit-Position: refs/heads/master@{#13102}
4 years, 6 months ago (2016-06-10 15:58:21 UTC) #32
tommi
Committed patchset #4 (id:60001) manually as 733b5478dd7a150cafa0e5796519ed89d43a78e6 (presubmit successful).
4 years, 6 months ago (2016-06-10 15:58:22 UTC) #33
mflodman
4 years, 6 months ago (2016-06-12 05:55:19 UTC) #34
Message was sent while issue was closed.
https://codereview.webrtc.org/2042603002/diff/40001/webrtc/video/receive_stat...
File webrtc/video/receive_statistics_proxy.cc (right):

https://codereview.webrtc.org/2042603002/diff/40001/webrtc/video/receive_stat...
webrtc/video/receive_statistics_proxy.cc:132: if
(config_.rtp.fec.ulpfec_payload_type != -1) {
On 2016/06/10 15:42:37, tommi-webrtc wrote:
> On 2016/06/10 14:40:55, mflodman wrote:
> > Currently is this the only place we sue 'config_' after constructing an
> instance
> > of ReciveStatisticsProxy, so we could store only the ulpfec pl type instead
of
> > config if we'd like. We might need more parts of the config in the future,
so
> I
> > think it's fine either way.
> 
> That's a good point.  For now, I'll add a note in the header that points out
> that we really don't need the full config pointer and what changes could be
> made.

SGTM

Powered by Google App Engine
This is Rietveld 408576698