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

Issue 2071473002: 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
Reviewers:
mflodman
CC:
webrtc-reviews_webrtc.org, video-team_agora.io, yujie_mao (webrtc), zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, pbos-webrtc, perkj_webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Reland of Split IncomingVideoStream into two implementations, with smoothing and without. Original issue's description: Split IncomingVideoStream into two implementations, with smoothing and without. This CL fixes an issue with the non-smoothing implementation where frames were delivered on the decoder thread. No-smoothing is now done in a separate class that uses a TaskQueue. The implementation may drop frames if the renderer doesn't keep up and it doesn't block the decoder thread. Further work done: * I added TODOs and documentation for VideoReceiveStream::OnFrame, where we today grab 5 locks. * I 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. * I 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 non-smoothing IncomingVideoStream implementation currently allows only 1 outstanding pending frame. If we exceed that, the current frame won't be delivered to the renderer and instead we deliver the next one (since when this happens, the renderer is falling behind). * 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 TBR=mflodman Committed: https://crrev.com/e03f8787377bbc03a4e00184bb14b7561b108cbb Cr-Commit-Position: refs/heads/master@{#13175}

Patch Set 1 #

Patch Set 2 : Remove frame dropping logic in the non-smoothing case #

Patch Set 3 : Fix check in test #

Patch Set 4 : add explicit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -210 lines) Patch
M webrtc/common_video/BUILD.gn View 1 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/common_video/common_video.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/common_video/common_video_unittests.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/common_video/include/incoming_video_stream.h View 1 2 chunks +28 lines, -28 lines 0 comments Download
M webrtc/common_video/incoming_video_stream.cc View 1 4 chunks +48 lines, -101 lines 0 comments Download
A webrtc/common_video/incoming_video_stream_unittest.cc View 1 2 3 1 chunk +88 lines, -0 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 9 chunks +50 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: 32 (14 generated)
tommi
Created Reland of Split IncomingVideoStream into two implementations, with smoothing and without.
4 years, 6 months ago (2016-06-15 13:46:48 UTC) #1
tommi
Remove frame dropping logic in the non-smoothing case
4 years, 6 months ago (2016-06-15 14:04:19 UTC) #3
tommi
Please take a look Magnus. I had intended for the 2nd patch set to show ...
4 years, 6 months ago (2016-06-15 14:13:14 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2071473002/250001
4 years, 6 months ago (2016-06-15 14:15:07 UTC) #6
commit-bot: I haz the power
Dry run: Exceeded global retry quota
4 years, 6 months ago (2016-06-15 14:25:17 UTC) #8
tommi
Fix check in test
4 years, 6 months ago (2016-06-15 15:03:02 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2071473002/270001
4 years, 6 months ago (2016-06-15 15:03:16 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/6319)
4 years, 6 months ago (2016-06-15 15:08:06 UTC) #14
tommi
tbr-ing since the only change is to remove the drop logic for non-smoothing.
4 years, 6 months ago (2016-06-16 15:40:38 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2071473002/270001
4 years, 6 months ago (2016-06-16 15:40:48 UTC) #18
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/6354)
4 years, 6 months ago (2016-06-16 15:47:19 UTC) #20
tommi
add explicit
4 years, 6 months ago (2016-06-16 15:55:16 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2071473002/290001
4 years, 6 months ago (2016-06-16 15:55:50 UTC) #23
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/14261)
4 years, 6 months ago (2016-06-16 16:05:45 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2071473002/290001
4 years, 6 months ago (2016-06-16 20:01:46 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:290001)
4 years, 6 months ago (2016-06-16 20:29:08 UTC) #29
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/e03f8787377bbc03a4e00184bb14b7561b108cbb Cr-Commit-Position: refs/heads/master@{#13175}
4 years, 6 months ago (2016-06-16 20:29:21 UTC) #31
tommi
4 years, 6 months ago (2016-06-16 22:43:51 UTC) #32
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:290001) has been created in
https://codereview.webrtc.org/2071093002/ by tommi@webrtc.org.

The reason for reverting is: Reverting again.  The perf regression does not seem
to be related to dropping frames..

Powered by Google App Engine
This is Rietveld 408576698