| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // normal operation 3 full frames), hence this is the last resort to prevent | 84 // normal operation 3 full frames), hence this is the last resort to prevent |
| 85 // us getting stuck after a long outage. | 85 // us getting stuck after a long outage. |
| 86 void ScheduleNextResendCheck(); | 86 void ScheduleNextResendCheck(); |
| 87 void ResendCheck(); | 87 void ResendCheck(); |
| 88 | 88 |
| 89 // Monitor how many frames that are silently dropped by the video sender | 89 // Monitor how many frames that are silently dropped by the video sender |
| 90 // per time unit. | 90 // per time unit. |
| 91 void ScheduleNextSkippedFramesCheck(); | 91 void ScheduleNextSkippedFramesCheck(); |
| 92 void SkippedFramesCheck(); | 92 void SkippedFramesCheck(); |
| 93 | 93 |
| 94 void SendEncodedVideoFrame(const transport::EncodedVideoFrame* video_frame, | 94 void SendEncodedVideoFrame(const EncodedVideoFrame* video_frame, |
| 95 const base::TimeTicks& capture_time); | 95 const base::TimeTicks& capture_time); |
| 96 void ResendFrame(uint32 resend_frame_id); | 96 void ResendFrame(uint32 resend_frame_id); |
| 97 void ReceivedAck(uint32 acked_frame_id); | 97 void ReceivedAck(uint32 acked_frame_id); |
| 98 void UpdateFramesInFlight(); | 98 void UpdateFramesInFlight(); |
| 99 | 99 |
| 100 void SendEncodedVideoFrameMainThread( | 100 void SendEncodedVideoFrameMainThread( |
| 101 scoped_ptr<transport::EncodedVideoFrame> video_frame, | 101 scoped_ptr<EncodedVideoFrame> video_frame, |
| 102 const base::TimeTicks& capture_time); | 102 const base::TimeTicks& capture_time); |
| 103 | 103 |
| 104 void InitializeTimers(); | 104 void InitializeTimers(); |
| 105 | 105 |
| 106 // Caller must allocate the destination |encrypted_video_frame| the data | 106 // Caller must allocate the destination |encrypted_video_frame| the data |
| 107 // member will be resized to hold the encrypted size. | 107 // member will be resized to hold the encrypted size. |
| 108 bool EncryptVideoFrame(const transport::EncodedVideoFrame& encoded_frame, | 108 bool EncryptVideoFrame(const EncodedVideoFrame& encoded_frame, |
| 109 transport::EncodedVideoFrame* encrypted_video_frame); | 109 EncodedVideoFrame* encrypted_video_frame); |
| 110 | 110 |
| 111 const base::TimeDelta rtp_max_delay_; | 111 const base::TimeDelta rtp_max_delay_; |
| 112 const int max_frame_rate_; | 112 const int max_frame_rate_; |
| 113 | 113 |
| 114 scoped_refptr<CastEnvironment> cast_environment_; | 114 scoped_refptr<CastEnvironment> cast_environment_; |
| 115 scoped_ptr<LocalRtcpVideoSenderFeedback> rtcp_feedback_; | 115 scoped_ptr<LocalRtcpVideoSenderFeedback> rtcp_feedback_; |
| 116 scoped_ptr<LocalRtpVideoSenderStatistics> rtp_video_sender_statistics_; | 116 scoped_ptr<LocalRtpVideoSenderStatistics> rtp_video_sender_statistics_; |
| 117 scoped_ptr<VideoEncoder> video_encoder_; | 117 scoped_ptr<VideoEncoder> video_encoder_; |
| 118 scoped_ptr<Rtcp> rtcp_; | 118 scoped_ptr<Rtcp> rtcp_; |
| 119 scoped_ptr<transport::RtpSender> rtp_sender_; | 119 scoped_ptr<transport::RtpSender> rtp_sender_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 132 bool initialized_; | 132 bool initialized_; |
| 133 base::WeakPtrFactory<VideoSender> weak_factory_; | 133 base::WeakPtrFactory<VideoSender> weak_factory_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 135 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace cast | 138 } // namespace cast |
| 139 } // namespace media | 139 } // namespace media |
| 140 | 140 |
| 141 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 141 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
| OLD | NEW |