| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // normal operation 3 full frames), hence this is the last resort to prevent | 78 // normal operation 3 full frames), hence this is the last resort to prevent |
| 79 // us getting stuck after a long outage. | 79 // us getting stuck after a long outage. |
| 80 void ScheduleNextResendCheck(); | 80 void ScheduleNextResendCheck(); |
| 81 void ResendCheck(); | 81 void ResendCheck(); |
| 82 | 82 |
| 83 // Monitor how many frames that are silently dropped by the video sender | 83 // Monitor how many frames that are silently dropped by the video sender |
| 84 // per time unit. | 84 // per time unit. |
| 85 void ScheduleNextSkippedFramesCheck(); | 85 void ScheduleNextSkippedFramesCheck(); |
| 86 void SkippedFramesCheck(); | 86 void SkippedFramesCheck(); |
| 87 | 87 |
| 88 void SendEncodedVideoFrame(const transport::EncodedVideoFrame* video_frame, | |
| 89 const base::TimeTicks& capture_time); | |
| 90 void ResendFrame(uint32 resend_frame_id); | 88 void ResendFrame(uint32 resend_frame_id); |
| 91 void ReceivedAck(uint32 acked_frame_id); | 89 void ReceivedAck(uint32 acked_frame_id); |
| 92 void UpdateFramesInFlight(); | 90 void UpdateFramesInFlight(); |
| 93 | 91 |
| 94 void SendEncodedVideoFrameMainThread( | 92 void SendEncodedVideoFrameMainThread( |
| 95 int requested_bitrate_before_encode, | 93 int requested_bitrate_before_encode, |
| 96 scoped_ptr<transport::EncodedVideoFrame> encoded_frame, | 94 scoped_ptr<transport::EncodedFrame> encoded_frame); |
| 97 const base::TimeTicks& capture_time); | |
| 98 | 95 |
| 99 void InitializeTimers(); | 96 void InitializeTimers(); |
| 100 | 97 |
| 101 void UpdateBitrate(int32 new_bitrate); | 98 void UpdateBitrate(int32 new_bitrate); |
| 102 | 99 |
| 103 base::TimeDelta rtp_max_delay_; | 100 base::TimeDelta rtp_max_delay_; |
| 104 const int max_frame_rate_; | 101 const int max_frame_rate_; |
| 105 | 102 |
| 106 scoped_refptr<CastEnvironment> cast_environment_; | 103 scoped_refptr<CastEnvironment> cast_environment_; |
| 107 transport::CastTransportSender* const transport_sender_; | 104 transport::CastTransportSender* const transport_sender_; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // NOTE: Weak pointers must be invalidated before all other member variables. | 137 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 141 base::WeakPtrFactory<VideoSender> weak_factory_; | 138 base::WeakPtrFactory<VideoSender> weak_factory_; |
| 142 | 139 |
| 143 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 140 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
| 144 }; | 141 }; |
| 145 | 142 |
| 146 } // namespace cast | 143 } // namespace cast |
| 147 } // namespace media | 144 } // namespace media |
| 148 | 145 |
| 149 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 146 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
| OLD | NEW |