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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // with a video frame. The key is the lowest 8 bits of frame id (which is | 134 // with a video frame. The key is the lowest 8 bits of frame id (which is |
135 // what is sent via RTCP). This map is used for logging purposes. The only | 135 // what is sent via RTCP). This map is used for logging purposes. The only |
136 // time when this mapping will be incorrect is when it receives an ACK for a | 136 // time when this mapping will be incorrect is when it receives an ACK for a |
137 // old enough frame such that 8-bit wrap around has already occurred, which | 137 // old enough frame such that 8-bit wrap around has already occurred, which |
138 // should be pretty rare. | 138 // should be pretty rare. |
139 RtpTimestamp frame_id_to_rtp_timestamp_[256]; | 139 RtpTimestamp frame_id_to_rtp_timestamp_[256]; |
140 | 140 |
141 bool initialized_; | 141 bool initialized_; |
142 // Indicator for receiver acknowledgments. | 142 // Indicator for receiver acknowledgments. |
143 bool active_session_; | 143 bool active_session_; |
| 144 |
| 145 // NOTE: Weak pointers must be invalidated before all other member variables. |
144 base::WeakPtrFactory<VideoSender> weak_factory_; | 146 base::WeakPtrFactory<VideoSender> weak_factory_; |
145 | 147 |
146 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 148 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
147 }; | 149 }; |
148 | 150 |
149 } // namespace cast | 151 } // namespace cast |
150 } // namespace media | 152 } // namespace media |
151 | 153 |
152 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 154 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
OLD | NEW |