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

Issue 560223002: [Cast] Limit frames in flight by duration, and not by number of frames. (Closed)

Created:
6 years, 3 months ago by miu
Modified:
6 years, 3 months ago
Reviewers:
kenrb, hubbe
CC:
chromium-reviews, hclam+watch_chromium.org, cbentzel+watch_chromium.org, imcheng+watch_chromium.org, feature-media-reviews_chromium.org, hguihot+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, mcasas+watch_chromium.org, pwestin+watch_google.com, posciak+watch_chromium.org, miu+watch_chromium.org, wjia+watch_chromium.org, hubbe+watch_chromium.org, mikhal+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Cast] Limit frames in flight by duration, and not by number of frames. FrameSender now decides whether to drop frames based on the media duration in-flight (instead of the number of frames in-flight). The maximum allowed in-flight duration is the target playout delay plus the one-way network trip time, the latter of which accounts for the time it takes for an ACK to travel back from the receiver. ShouldDropNextFrame() still limits by the number of frames in-flight, but only so that a client cannot flood the FrameSender with frames at a rate greater than the configured maximum frame rate. Some burstiness is allowed to mitigate false-positive detections. In a typical session, frames should never be dropped based upon the in-flight count. This change also alters the design of PacketStorage where, instead of being a fixed "large enough for anything" size, it only holds the frames that are in-flight. This is needed because we no longer limit by the number of frames in-flight, and there's no way to determine what the "large enough for anything" size has to be. It's now the duty of FrameSender to "cancel out" acknowledged frames, and of RtpSender to release them from storage. BUG=404813 Committed: https://crrev.com/5f2dd387974082aad17a8603308d1a6acc2bce8d Cr-Commit-Position: refs/heads/master@{#295857}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : Fix PacketStorage DCHECK (64-->32 bits wraparound issue). #

Patch Set 4 : Account for faster input than configured max FPS. #

Total comments: 6

Patch Set 5 : Reduce common functionality into FrameSender. #

Patch Set 6 : Removed auto-eviction from PacketStorage, since that should never happen. #

Total comments: 14

Patch Set 7 : Tweaks addressing review comments on PS6. #

Total comments: 2

Patch Set 8 : Tweaks. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -152 lines) Patch
M chrome/browser/media/cast_transport_host_filter_unittest.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/cast_messages.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M media/cast/net/cast_transport_config.h View 1 chunk +0 lines, -4 lines 0 comments Download
M media/cast/net/cast_transport_config.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/cast_transport_sender_impl_unittest.cc View 1 2 chunks +0 lines, -2 lines 0 comments Download
M media/cast/net/rtp/packet_storage.h View 2 chunks +9 lines, -20 lines 0 comments Download
M media/cast/net/rtp/packet_storage.cc View 1 2 3 4 5 2 chunks +30 lines, -17 lines 0 comments Download
M media/cast/net/rtp/packet_storage_unittest.cc View 1 2 3 4 5 4 chunks +42 lines, -28 lines 0 comments Download
M media/cast/net/rtp/rtp_packetizer_unittest.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M media/cast/net/rtp/rtp_sender.h View 1 chunk +1 line, -1 line 0 comments Download
M media/cast/net/rtp/rtp_sender.cc View 1 2 3 4 5 6 7 4 chunks +7 lines, -9 lines 0 comments Download
M media/cast/sender/audio_sender.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/cast/sender/audio_sender.cc View 1 2 3 4 4 chunks +10 lines, -12 lines 0 comments Download
M media/cast/sender/frame_sender.h View 1 2 3 4 6 chunks +19 lines, -8 lines 0 comments Download
M media/cast/sender/frame_sender.cc View 1 2 3 4 11 chunks +80 lines, -34 lines 0 comments Download
M media/cast/sender/video_sender.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M media/cast/sender/video_sender.cc View 1 2 3 4 5 6 7 6 chunks +43 lines, -10 lines 0 comments Download
M media/cast/test/end2end_unittest.cc View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (8 generated)
miu
hubbe: PTAL. Everything we've discussed over the past few days has been incorporated into this ...
6 years, 3 months ago (2014-09-11 20:32:45 UTC) #2
miu
On 2014/09/11 20:32:45, miu wrote: > hubbe: PTAL. Everything we've discussed over the past few ...
6 years, 3 months ago (2014-09-11 20:40:42 UTC) #3
hubbe
I don't think audio and video are fundamentally different. Perhaps we can unify the calculations ...
6 years, 3 months ago (2014-09-11 23:05:06 UTC) #4
miu
Addressed comments. Code is simpler now. PTAL. https://codereview.chromium.org/560223002/diff/60001/media/cast/net/rtp/packet_storage.cc File media/cast/net/rtp/packet_storage.cc (right): https://codereview.chromium.org/560223002/diff/60001/media/cast/net/rtp/packet_storage.cc#newcode40 media/cast/net/rtp/packet_storage.cc:40: if (frames_.size() ...
6 years, 3 months ago (2014-09-18 01:10:52 UTC) #5
hubbe
Looks much nicer than before, now it's down to minor fixes/nits. https://codereview.chromium.org/560223002/diff/100001/media/cast/net/rtp/rtp_sender.cc File media/cast/net/rtp/rtp_sender.cc (right): ...
6 years, 3 months ago (2014-09-18 17:56:05 UTC) #6
miu
https://codereview.chromium.org/560223002/diff/100001/media/cast/net/rtp/rtp_sender.cc File media/cast/net/rtp/rtp_sender.cc (right): https://codereview.chromium.org/560223002/diff/100001/media/cast/net/rtp/rtp_sender.cc#newcode53 media/cast/net/rtp/rtp_sender.cc:53: LOG_IF(DFATAL, storage_.GetNumberOfStoredFrames() == kMaxUnackedFrames) On 2014/09/18 17:56:05, hubbe wrote: ...
6 years, 3 months ago (2014-09-18 21:38:43 UTC) #7
hubbe
https://codereview.chromium.org/560223002/diff/100001/media/cast/sender/video_sender.cc File media/cast/sender/video_sender.cc (right): https://codereview.chromium.org/560223002/diff/100001/media/cast/sender/video_sender.cc#newcode159 media/cast/sender/video_sender.cc:159: base::TimeDelta::FromMicroseconds(1000000.0 / max_frame_rate_ + 0.5); On 2014/09/18 21:38:43, miu ...
6 years, 3 months ago (2014-09-18 22:22:59 UTC) #8
miu
kenrb: Need OWNERS for chrome/common/cast_messages.h. hubbe: Addressed final tweaks. LGTY? https://codereview.chromium.org/560223002/diff/100001/media/cast/sender/video_sender.cc File media/cast/sender/video_sender.cc (right): https://codereview.chromium.org/560223002/diff/100001/media/cast/sender/video_sender.cc#newcode159 ...
6 years, 3 months ago (2014-09-19 19:39:43 UTC) #10
hubbe
lgtm
6 years, 3 months ago (2014-09-19 19:45:52 UTC) #12
kenrb
ipc lgtm
6 years, 3 months ago (2014-09-19 19:48:19 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/560223002/140001
6 years, 3 months ago (2014-09-19 20:26:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/560223002/140001
6 years, 3 months ago (2014-09-19 20:26:06 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/11440)
6 years, 3 months ago (2014-09-19 20:59:03 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/11440)
6 years, 3 months ago (2014-09-19 20:59:28 UTC) #21
hubbe
PTAL Compiles. (The IOS fail is unrelated.)
6 years, 3 months ago (2014-09-19 23:18:36 UTC) #22
hubbe
On 2014/09/19 23:18:36, hubbe wrote: > PTAL > Compiles. (The IOS fail is unrelated.) Disregard, ...
6 years, 3 months ago (2014-09-19 23:18:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/560223002/140001
6 years, 3 months ago (2014-09-20 06:20:02 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/560223002/140001
6 years, 3 months ago (2014-09-20 06:20:02 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:140001) as e2d590f7c4c5c0ebde3d2749b7fee6f2f28e021b
6 years, 3 months ago (2014-09-20 13:12:47 UTC) #27
commit-bot: I haz the power
6 years, 3 months ago (2014-09-20 13:13:25 UTC) #28
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/5f2dd387974082aad17a8603308d1a6acc2bce8d
Cr-Commit-Position: refs/heads/master@{#295857}

Powered by Google App Engine
This is Rietveld 408576698