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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Subscribes to raw events. | 111 // Subscribes to raw events. |
112 // Processes raw audio events to be sent over to the cast receiver via RTCP. | 112 // Processes raw audio events to be sent over to the cast receiver via RTCP. |
113 SenderRtcpEventSubscriber event_subscriber_; | 113 SenderRtcpEventSubscriber event_subscriber_; |
114 RtpSenderStatistics rtp_stats_; | 114 RtpSenderStatistics rtp_stats_; |
115 scoped_ptr<LocalRtcpVideoSenderFeedback> rtcp_feedback_; | 115 scoped_ptr<LocalRtcpVideoSenderFeedback> rtcp_feedback_; |
116 scoped_ptr<VideoEncoder> video_encoder_; | 116 scoped_ptr<VideoEncoder> video_encoder_; |
117 scoped_ptr<Rtcp> rtcp_; | 117 scoped_ptr<Rtcp> rtcp_; |
118 uint8 max_unacked_frames_; | 118 uint8 max_unacked_frames_; |
119 int last_acked_frame_id_; | 119 int last_acked_frame_id_; |
120 int last_sent_frame_id_; | 120 int last_sent_frame_id_; |
| 121 int frames_in_encoder_; |
121 int duplicate_ack_; | 122 int duplicate_ack_; |
122 base::TimeTicks last_send_time_; | 123 base::TimeTicks last_send_time_; |
123 base::TimeTicks last_checked_skip_count_time_; | 124 base::TimeTicks last_checked_skip_count_time_; |
124 int last_skip_count_; | 125 int last_skip_count_; |
125 int current_requested_bitrate_; | 126 int current_requested_bitrate_; |
126 CongestionControl congestion_control_; | 127 CongestionControl congestion_control_; |
127 | 128 |
128 // This is a "good enough" mapping for finding the RTP timestamp associated | 129 // This is a "good enough" mapping for finding the RTP timestamp associated |
129 // with a video frame. The key is the lowest 8 bits of frame id (which is | 130 // with a video frame. The key is the lowest 8 bits of frame id (which is |
130 // what is sent via RTCP). This map is used for logging purposes. The only | 131 // what is sent via RTCP). This map is used for logging purposes. The only |
131 // time when this mapping will be incorrect is when it receives an ACK for a | 132 // time when this mapping will be incorrect is when it receives an ACK for a |
132 // old enough frame such that 8-bit wrap around has already occurred, which | 133 // old enough frame such that 8-bit wrap around has already occurred, which |
133 // should be pretty rare. | 134 // should be pretty rare. |
134 RtpTimestamp frame_id_to_rtp_timestamp_[256]; | 135 RtpTimestamp frame_id_to_rtp_timestamp_[256]; |
135 | 136 |
136 bool initialized_; | 137 bool initialized_; |
137 // Indicator for receiver acknowledgments. | 138 // Indicator for receiver acknowledgments. |
138 bool active_session_; | 139 bool active_session_; |
139 | 140 |
140 // NOTE: Weak pointers must be invalidated before all other member variables. | 141 // NOTE: Weak pointers must be invalidated before all other member variables. |
141 base::WeakPtrFactory<VideoSender> weak_factory_; | 142 base::WeakPtrFactory<VideoSender> weak_factory_; |
142 | 143 |
143 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 144 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
144 }; | 145 }; |
145 | 146 |
146 } // namespace cast | 147 } // namespace cast |
147 } // namespace media | 148 } // namespace media |
148 | 149 |
149 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 150 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
OLD | NEW |