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

Unified Diff: media/cast/sender/video_sender.h

Issue 502333002: [Cast] In Audio/VideoSender, drop frames when too-long a duration is in-flight. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing brace (rebase oops). Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/sender/rtp_timestamp_helper.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/video_sender.h
diff --git a/media/cast/sender/video_sender.h b/media/cast/sender/video_sender.h
index 5fe32611ffcd82927dd40cfcd5aa872dd0c88f33..d2dfa45f4212fe33c687f62cedb4db91eaf72e58 100644
--- a/media/cast/sender/video_sender.h
+++ b/media/cast/sender/video_sender.h
@@ -61,11 +61,11 @@ class VideoSender : public FrameSender,
void OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback);
private:
- // Returns true if there are too many frames in flight, as defined by the
- // configured target playout delay plus simple logic. When this is true,
- // InsertRawVideoFrame() will silenty drop frames instead of sending them to
- // the video encoder.
- bool AreTooManyFramesInFlight() const;
+ // Returns true if there are too many frames in flight, or if the media
+ // duration of the frames in flight would be too high by sending the next
+ // frame. The latter metric is determined from the given |capture_time|
+ // for the next frame to be encoded and sent.
+ bool ShouldDropNextFrame(base::TimeTicks capture_time) const;
// Called by the |video_encoder_| with the next EncodeFrame to send.
void SendEncodedVideoFrame(int requested_bitrate_before_encode,
« no previous file with comments | « media/cast/sender/rtp_timestamp_helper.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698