OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 5 #ifndef MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // normal operation 3 full frames), hence this is the last resort to prevent | 83 // normal operation 3 full frames), hence this is the last resort to prevent |
84 // us getting stuck after a long outage. | 84 // us getting stuck after a long outage. |
85 void ScheduleNextResendCheck(); | 85 void ScheduleNextResendCheck(); |
86 void ResendCheck(); | 86 void ResendCheck(); |
87 | 87 |
88 // Monitor how many frames that are silently dropped by the video sender | 88 // Monitor how many frames that are silently dropped by the video sender |
89 // per time unit. | 89 // per time unit. |
90 void ScheduleNextSkippedFramesCheck(); | 90 void ScheduleNextSkippedFramesCheck(); |
91 void SkippedFramesCheck(); | 91 void SkippedFramesCheck(); |
92 | 92 |
93 void SendEncodedVideoFrame(const transport::EncodedVideoFrame* video_frame, | |
94 const base::TimeTicks& capture_time); | |
95 void ResendFrame(uint32 resend_frame_id); | 93 void ResendFrame(uint32 resend_frame_id); |
96 void ReceivedAck(uint32 acked_frame_id); | 94 void ReceivedAck(uint32 acked_frame_id); |
97 void UpdateFramesInFlight(); | 95 void UpdateFramesInFlight(); |
98 | 96 |
99 void SendEncodedVideoFrameMainThread( | 97 void SendEncodedVideoFrameMainThread( |
100 scoped_ptr<transport::EncodedVideoFrame> encoded_frame, | 98 scoped_ptr<transport::EncodedFrame> encoded_frame); |
101 const base::TimeTicks& capture_time); | |
102 | 99 |
103 void InitializeTimers(); | 100 void InitializeTimers(); |
104 | 101 |
105 void UpdateBitrate(int32 new_bitrate); | 102 void UpdateBitrate(int32 new_bitrate); |
106 | 103 |
107 base::TimeDelta rtp_max_delay_; | 104 base::TimeDelta rtp_max_delay_; |
108 const int max_frame_rate_; | 105 const int max_frame_rate_; |
109 | 106 |
110 scoped_refptr<CastEnvironment> cast_environment_; | 107 scoped_refptr<CastEnvironment> cast_environment_; |
111 transport::CastTransportSender* const transport_sender_; | 108 transport::CastTransportSender* const transport_sender_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // NOTE: Weak pointers must be invalidated before all other member variables. | 141 // NOTE: Weak pointers must be invalidated before all other member variables. |
145 base::WeakPtrFactory<VideoSender> weak_factory_; | 142 base::WeakPtrFactory<VideoSender> weak_factory_; |
146 | 143 |
147 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 144 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
148 }; | 145 }; |
149 | 146 |
150 } // namespace cast | 147 } // namespace cast |
151 } // namespace media | 148 } // namespace media |
152 | 149 |
153 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 150 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
OLD | NEW |