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

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

Issue 545593002: [Cast] Track audio queued in encoder; account for it in ShouldDropNextFrame(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: media/cast/sender/frame_sender.h
diff --git a/media/cast/sender/frame_sender.h b/media/cast/sender/frame_sender.h
index 6cf02f563be0925a380b2ec6ae1627261695b290..b58c329b01f9448660ad1e834886069e2563f50b 100644
--- a/media/cast/sender/frame_sender.h
+++ b/media/cast/sender/frame_sender.h
@@ -88,6 +88,12 @@ class FrameSender {
base::TimeTicks GetRecordedReferenceTime(uint32 frame_id) const;
RtpTimestamp GetRecordedRtpTimestamp(uint32 frame_id) 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;
+
const base::TimeDelta rtcp_interval_;
// The total amount of time between a frame's capture/recording on the sender
@@ -108,6 +114,9 @@ class FrameSender {
// new frames shall halt.
int max_unacked_frames_;
+ // The number of frames queued for encoding, but not yet sent.
+ int frames_in_encoder_;
+
// Counts how many RTCP reports are being "aggressively" sent (i.e., one per
// frame) at the start of the session. Once a threshold is reached, RTCP
// reports are instead sent at the configured interval + random drift.

Powered by Google App Engine
This is Rietveld 408576698