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

Issue 2078873002: Reland of Split IncomingVideoStream into two implementations, with smoothing and without. (Closed)

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

Description

Reland of IncomingVideoStream refactoring. This reland does not contain the non-smoothing part of the original implementation. Instead, when smoothing is turned off, frame callbacks run on the decoder thread, as they did before. This code path is used in Chrome. As far as Chrome goes, the difference now is that there won't be an instance of IncomingVideoStream in between the decoder and the callback (i.e. fewer locks). Other than that, no change for Chrome. Original issue's description (with non-smoothing references removed): Split IncomingVideoStream into two implementations, with smoothing and without. * Added TODOs and documentation for VideoReceiveStream::OnFrame, where we today grab 6 locks. * Removed the Start/Stop methods from the IncomingVideoStream implementations. Now, when an instance is created, it should be considered to be "running" and when it is deleted, it's "not running". This saves on resources and also reduces the amount of locking required and I could remove one critical section altogether. * Changed the VideoStreamDecoder class to not depend on IncomingVideoStream but rather use the generic rtc::VideoSinkInterface<VideoFrame> interface. This means that any implementation of that interface can be used and the decoder can be made to just use the 'renderer' from the config. Once we do that, we can decouple the IncomingVideoStream implementations from the decoder and VideoReceiveStream implementations and leave it up to the application for how to do smoothing. The app can choose to use the Incoming* classes or roll its own (which may be preferable since applications often have their own scheduling mechanisms). * The lifetime of the VideoStreamDecoder instance is now bound to Start/Stop in VideoReceiveStream and not all of the lifetime of VideoReceiveStream. * Fixed VideoStreamDecoder to unregister callbacks in the dtor that were registered in the ctor. (this was open to a use-after-free regression) * Delay and callback pointers are now passed via the ctors to the IncomingVideoStream classes. The thread primitives in the IncomingVideoStream classes are also constructed/destructed at the same time as the owning object, which allowed me to remove one more lock. * Removed code in the VideoStreamDecoder that could overwrite the VideoReceiveStream render delay with a fixed value of 10ms on construction. This wasn't a problem with the previous implementation (it would be now though) but seemed to me like the wrong place to be setting that value. * Made the render delay value in VideoRenderFrames, const. BUG=chromium:620232 R=mflodman@webrtc.org, nisse@webrtc.org Committed: https://crrev.com/884c336c345d988974c2a69cea402b0fb8b07a63 Cr-Commit-Position: refs/heads/master@{#13219}

Patch Set 1 #

Patch Set 2 : Remove test code for non-smoothing implementation #

Patch Set 3 : Remove non-smoothing implementation #

Patch Set 4 : Fix renderer pointer #

Total comments: 14

Patch Set 5 : Remove unused header #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -214 lines) Patch
M webrtc/common_video/include/incoming_video_stream.h View 1 2 3 2 chunks +12 lines, -28 lines 0 comments Download
M webrtc/common_video/incoming_video_stream.cc View 1 2 3 4 4 chunks +38 lines, -105 lines 0 comments Download
M webrtc/common_video/video_render_frames.h View 1 3 chunks +3 lines, -8 lines 0 comments Download
M webrtc/common_video/video_render_frames.cc View 1 3 chunks +11 lines, -23 lines 0 comments Download
M webrtc/media/base/videosinkinterface.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/video/end_to_end_tests.cc View 1 6 chunks +16 lines, -1 line 0 comments Download
M webrtc/video/video_receive_stream.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/video/video_receive_stream.cc View 1 2 3 9 chunks +35 lines, -21 lines 0 comments Download
M webrtc/video/video_stream_decoder.h View 1 4 chunks +5 lines, -7 lines 0 comments Download
M webrtc/video/video_stream_decoder.cc View 1 5 chunks +17 lines, -15 lines 0 comments Download

Messages

Total messages: 33 (12 generated)
tommi
Created Reland of Split IncomingVideoStream into two implementations, with smoothing and without.
4 years, 6 months ago (2016-06-17 08:00:06 UTC) #1
tommi
Remove test code for non-smoothing implementation
4 years, 6 months ago (2016-06-17 08:15:13 UTC) #4
tommi
Remove non-smoothing implementation
4 years, 6 months ago (2016-06-17 08:25:33 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/2078873002/280001
4 years, 6 months ago (2016-06-17 08:26:05 UTC) #7
tommi
Hej Magnus - yet another attempt at landing. This time around, I've removed the non ...
4 years, 6 months ago (2016-06-17 08:33:38 UTC) #9
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_ubsan_vptr on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_ubsan_vptr/builds/3374)
4 years, 6 months ago (2016-06-17 08:44:26 UTC) #11
tommi
Fix last minute gaffe
4 years, 6 months ago (2016-06-17 10:09:28 UTC) #12
tommi
Fix renderer pointer
4 years, 6 months ago (2016-06-17 11:48:04 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2078873002/320001
4 years, 6 months ago (2016-06-17 11:56:56 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-17 13:51:48 UTC) #18
tommi
mflodman - I'm asking nisse to take a look since you're very busy. Moved you ...
4 years, 6 months ago (2016-06-20 12:49:58 UTC) #20
nisse-webrtc
https://codereview.webrtc.org/2078873002/diff/320001/webrtc/common_video/include/incoming_video_stream.h File webrtc/common_video/include/incoming_video_stream.h (right): https://codereview.webrtc.org/2078873002/diff/320001/webrtc/common_video/include/incoming_video_stream.h#newcode41 webrtc/common_video/include/incoming_video_stream.h:41: void OnFrame(const VideoFrame& video_frame) override; This is a public ...
4 years, 6 months ago (2016-06-20 13:47:55 UTC) #21
tommi
Remove unused header
4 years, 6 months ago (2016-06-20 14:24:49 UTC) #22
tommi
https://codereview.webrtc.org/2078873002/diff/320001/webrtc/common_video/include/incoming_video_stream.h File webrtc/common_video/include/incoming_video_stream.h (right): https://codereview.webrtc.org/2078873002/diff/320001/webrtc/common_video/include/incoming_video_stream.h#newcode41 webrtc/common_video/include/incoming_video_stream.h:41: void OnFrame(const VideoFrame& video_frame) override; On 2016/06/20 13:47:55, nisse-webrtc ...
4 years, 6 months ago (2016-06-20 14:24:52 UTC) #23
nisse-webrtc
lgtm https://codereview.webrtc.org/2078873002/diff/320001/webrtc/common_video/include/incoming_video_stream.h File webrtc/common_video/include/incoming_video_stream.h (right): https://codereview.webrtc.org/2078873002/diff/320001/webrtc/common_video/include/incoming_video_stream.h#newcode41 webrtc/common_video/include/incoming_video_stream.h:41: void OnFrame(const VideoFrame& video_frame) override; On 2016/06/20 14:24:51, ...
4 years, 6 months ago (2016-06-20 14:51:40 UTC) #24
mflodman
LGTM But, Philip encountered crashes in Chromium due do to the video sink interface being ...
4 years, 6 months ago (2016-06-20 15:20:51 UTC) #26
tommi
On 2016/06/20 15:20:51, mflodman wrote: > LGTM > > But, > Philip encountered crashes in ...
4 years, 6 months ago (2016-06-20 15:36:21 UTC) #27
mflodman
On 2016/06/20 15:36:21, tommi-webrtc wrote: > On 2016/06/20 15:20:51, mflodman wrote: > > LGTM > ...
4 years, 6 months ago (2016-06-20 15:53:37 UTC) #28
philipel
On 2016/06/20 15:36:21, tommi-webrtc wrote: > On 2016/06/20 15:20:51, mflodman wrote: > > LGTM > ...
4 years, 6 months ago (2016-06-20 15:54:47 UTC) #29
tommi
Committed patchset #5 (id:340001) manually as 884c336c345d988974c2a69cea402b0fb8b07a63 (presubmit successful).
4 years, 6 months ago (2016-06-20 17:43:17 UTC) #31
sakal
4 years, 6 months ago (2016-06-21 07:08:33 UTC) #33
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:340001) has been created in
https://codereview.webrtc.org/2084873002/ by sakal@webrtc.org.

The reason for reverting is: Breaks chromium.webrtc.fyi

https://uberchromegw.corp.google.com/i/chromium.webrtc.fyi/builders/Win7%20Te...
https://uberchromegw.corp.google.com/i/chromium.webrtc.fyi/builders/Win10%20T....

Powered by Google App Engine
This is Rietveld 408576698