Chromium Code Reviews| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/threading/non_thread_safe.h" | 12 #include "base/threading/non_thread_safe.h" |
| 13 #include "base/time/tick_clock.h" | 13 #include "base/time/tick_clock.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "crypto/encryptor.h" | |
| 15 #include "media/cast/cast_config.h" | 16 #include "media/cast/cast_config.h" |
| 16 #include "media/cast/cast_environment.h" | 17 #include "media/cast/cast_environment.h" |
| 17 #include "media/cast/congestion_control/congestion_control.h" | 18 #include "media/cast/congestion_control/congestion_control.h" |
| 18 #include "media/cast/rtcp/rtcp.h" | 19 #include "media/cast/rtcp/rtcp.h" |
| 19 #include "media/cast/rtp_sender/rtp_sender.h" | 20 #include "media/cast/rtp_sender/rtp_sender.h" |
| 20 | 21 |
| 21 namespace media { | 22 namespace media { |
| 22 namespace cast { | 23 namespace cast { |
| 23 | 24 |
| 24 class VideoEncoder; | 25 class VideoEncoder; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 const base::TimeTicks& capture_time); | 95 const base::TimeTicks& capture_time); |
| 95 void OnReceivedIntraFrameRequest(); | 96 void OnReceivedIntraFrameRequest(); |
| 96 void ResendFrame(uint8 resend_frame_id); | 97 void ResendFrame(uint8 resend_frame_id); |
| 97 void ReceivedAck(uint8 acked_frame_id); | 98 void ReceivedAck(uint8 acked_frame_id); |
| 98 void UpdateFramesInFlight(); | 99 void UpdateFramesInFlight(); |
| 99 | 100 |
| 100 void SendEncodedVideoFrameMainThread( | 101 void SendEncodedVideoFrameMainThread( |
| 101 scoped_ptr<EncodedVideoFrame> video_frame, | 102 scoped_ptr<EncodedVideoFrame> video_frame, |
| 102 const base::TimeTicks& capture_time); | 103 const base::TimeTicks& capture_time); |
| 103 | 104 |
| 105 bool EncryptVideoFrame(const EncodedVideoFrame* encoded_frame, | |
| 106 EncodedVideoFrame* encrypted_video_frame); | |
|
Alpha Left Google
2013/11/08 22:40:02
Need a comment to explain how |encrypted_video_fra
pwestin
2013/11/12 22:07:23
Done.
| |
| 107 | |
| 104 const uint32 incoming_feedback_ssrc_; | 108 const uint32 incoming_feedback_ssrc_; |
| 105 const base::TimeDelta rtp_max_delay_; | 109 const base::TimeDelta rtp_max_delay_; |
| 106 const int max_frame_rate_; | 110 const int max_frame_rate_; |
| 107 | 111 |
| 108 scoped_refptr<CastEnvironment> cast_environment_; | 112 scoped_refptr<CastEnvironment> cast_environment_; |
| 109 scoped_ptr<LocalRtcpVideoSenderFeedback> rtcp_feedback_; | 113 scoped_ptr<LocalRtcpVideoSenderFeedback> rtcp_feedback_; |
| 110 scoped_ptr<LocalRtpVideoSenderStatistics> rtp_video_sender_statistics_; | 114 scoped_ptr<LocalRtpVideoSenderStatistics> rtp_video_sender_statistics_; |
| 111 scoped_refptr<VideoEncoder> video_encoder_; | 115 scoped_refptr<VideoEncoder> video_encoder_; |
| 112 scoped_ptr<Rtcp> rtcp_; | 116 scoped_ptr<Rtcp> rtcp_; |
| 113 scoped_ptr<RtpSender> rtp_sender_; | 117 scoped_ptr<RtpSender> rtp_sender_; |
| 114 VideoEncoderController* video_encoder_controller_; | 118 VideoEncoderController* video_encoder_controller_; |
| 115 uint8 max_unacked_frames_; | 119 uint8 max_unacked_frames_; |
| 120 scoped_ptr<crypto::Encryptor> encryptor_; | |
| 121 std::string iv_mask_; | |
| 116 int last_acked_frame_id_; | 122 int last_acked_frame_id_; |
| 117 int last_sent_frame_id_; | 123 int last_sent_frame_id_; |
| 118 int last_sent_key_frame_id_; | 124 int last_sent_key_frame_id_; |
| 119 int duplicate_ack_; | 125 int duplicate_ack_; |
| 120 base::TimeTicks last_send_time_; | 126 base::TimeTicks last_send_time_; |
| 121 base::TimeTicks last_checked_skip_count_time_; | 127 base::TimeTicks last_checked_skip_count_time_; |
| 122 int last_skip_count_; | 128 int last_skip_count_; |
| 123 CongestionControl congestion_control_; | 129 CongestionControl congestion_control_; |
| 124 | 130 |
| 125 base::WeakPtrFactory<VideoSender> weak_factory_; | 131 base::WeakPtrFactory<VideoSender> weak_factory_; |
| 126 | 132 |
| 127 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 133 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
| 128 }; | 134 }; |
| 129 | 135 |
| 130 } // namespace cast | 136 } // namespace cast |
| 131 } // namespace media | 137 } // namespace media |
| 132 | 138 |
| 133 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 139 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
| 134 | 140 |
| OLD | NEW |