Index: media/cast/sender/video_sender.h |
diff --git a/media/cast/sender/video_sender.h b/media/cast/sender/video_sender.h |
index 3c82b06d7c1a63bbc12b9c682d1c025a00e0a1df..30177c4e2fd76da90af11f2f89c2e97be2f05dc9 100644 |
--- a/media/cast/sender/video_sender.h |
+++ b/media/cast/sender/video_sender.h |
@@ -17,6 +17,7 @@ |
#include "media/cast/logging/logging_defines.h" |
#include "media/cast/net/rtcp/rtcp.h" |
#include "media/cast/sender/congestion_control.h" |
+#include "media/cast/sender/frame_sender.h" |
#include "media/cast/sender/rtp_timestamp_helper.h" |
namespace media { |
@@ -35,7 +36,7 @@ class VideoEncoder; |
// RTCP packets. |
// Additionally it posts a bunch of delayed tasks to the main thread for various |
// timeouts. |
-class VideoSender : public RtcpSenderFeedback, |
+class VideoSender : public FrameSender, |
public base::NonThreadSafe, |
public base::SupportsWeakPtr<VideoSender> { |
public: |
@@ -60,19 +61,11 @@ class VideoSender : public RtcpSenderFeedback, |
void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, |
const base::TimeTicks& capture_time); |
- // Only called from the main cast thread. |
- void IncomingRtcpPacket(scoped_ptr<Packet> packet); |
- |
protected: |
// Protected for testability. |
- virtual void OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) |
- OVERRIDE; |
+ void OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback); |
private: |
- // Schedule and execute periodic sending of RTCP report. |
- void ScheduleNextRtcpReport(); |
- void SendRtcpReport(bool schedule_future_reports); |
- |
// Schedule and execute periodic checks for re-sending packets. If no |
// acknowledgements have been received for "too long," VideoSender will |
// speculatively re-send certain packets of an unacked frame to kick-start |
@@ -92,8 +85,6 @@ class VideoSender : public RtcpSenderFeedback, |
void SendEncodedVideoFrame(int requested_bitrate_before_encode, |
scoped_ptr<EncodedFrame> encoded_frame); |
- const scoped_refptr<CastEnvironment> cast_environment_; |
- |
// The total amount of time between a frame's capture/recording on the sender |
// and its playback on the receiver (i.e., shown to a user). This is fixed as |
// a value large enough to give the system sufficient time to encode, |
@@ -102,13 +93,6 @@ class VideoSender : public RtcpSenderFeedback, |
// etc.). |
const base::TimeDelta target_playout_delay_; |
- // Sends encoded frames over the configured transport (e.g., UDP). In |
- // Chromium, this could be a proxy that first sends the frames from a renderer |
- // process to the browser process over IPC, with the browser process being |
- // responsible for "packetizing" the frames and pushing packets into the |
- // network layer. |
- CastTransportSender* const transport_sender_; |
- |
// Maximum number of outstanding frames before the encoding and sending of |
// new frames shall halt. |
const int max_unacked_frames_; |
@@ -118,14 +102,6 @@ class VideoSender : public RtcpSenderFeedback, |
// a hardware-based encoder. |
scoped_ptr<VideoEncoder> video_encoder_; |
- // Manages sending/receiving of RTCP packets, including sender/receiver |
- // reports. |
- Rtcp rtcp_; |
- |
- // Records lip-sync (i.e., mapping of RTP <--> NTP timestamps), and |
- // extrapolates this mapping to any other point in time. |
- RtpTimestampHelper rtp_timestamp_helper_; |
- |
// 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. |