Index: media/cast/sender/frame_sender.h |
diff --git a/media/cast/sender/frame_sender.h b/media/cast/sender/frame_sender.h |
index 5da3927961f7262aca2774ffd60254610c4b17b6..09211da62fe7156c0c9193a9b56246d9c5b99557 100644 |
--- a/media/cast/sender/frame_sender.h |
+++ b/media/cast/sender/frame_sender.h |
@@ -74,6 +74,15 @@ class FrameSender { |
base::TimeDelta max_rtt_; |
protected: |
+ // Schedule and execute periodic checks for re-sending packets. If no |
+ // acknowledgements have been received for "too long," AudioSender will |
+ // speculatively re-send certain packets of an unacked frame to kick-start |
+ // re-transmission. This is a last resort tactic to prevent the session from |
+ // getting stuck after a long outage. |
+ void ScheduleNextResendCheck(); |
+ void ResendCheck(); |
+ void ResendForKickstart(); |
+ |
const base::TimeDelta rtcp_interval_; |
// The total amount of time between a frame's capture/recording on the sender |
@@ -94,6 +103,40 @@ class FrameSender { |
// new frames shall halt. |
int max_unacked_frames_; |
+ // 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. |
+ int num_aggressive_rtcp_reports_sent_; |
+ |
+ // This is "null" until the first frame is sent. Thereafter, this tracks the |
+ // last time any frame was sent or re-sent. |
+ base::TimeTicks last_send_time_; |
+ |
+ // The ID of the last frame sent. Logic throughout AudioSender assumes this |
+ // can safely wrap-around. This member is invalid until |
+ // |!last_send_time_.is_null()|. |
+ uint32 last_sent_frame_id_; |
+ |
+ // The ID of the latest (not necessarily the last) frame that has been |
+ // acknowledged. Logic throughout AudioSender assumes this can safely |
+ // wrap-around. This member is invalid until |!last_send_time_.is_null()|. |
+ uint32 latest_acked_frame_id_; |
+ |
+ // Counts the number of duplicate ACK that are being received. When this |
+ // number reaches a threshold, the sender will take this as a sign that the |
+ // receiver hasn't yet received the first packet of the next frame. In this |
+ // case, VideoSender will trigger a re-send of the next frame. |
+ int duplicate_ack_counter_; |
+ |
+ // If this sender is ready for use, this is STATUS_AUDIO_INITIALIZED or |
+ // STATUS_VIDEO_INITIALIZED. |
+ CastInitializationStatus cast_initialization_status_; |
+ |
+ // This is a "good enough" mapping for finding the RTP timestamp associated |
+ // with a video frame. The key is the lowest 8 bits of frame id (which is |
+ // what is sent via RTCP). This map is used for logging purposes. |
+ RtpTimestamp frame_id_to_rtp_timestamp_[256]; |
+ |
private: |
// NOTE: Weak pointers must be invalidated before all other member variables. |
base::WeakPtrFactory<FrameSender> weak_factory_; |