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_AUDIO_SENDER_H_ | 5 #ifndef MEDIA_CAST_AUDIO_SENDER_H_ |
6 #define MEDIA_CAST_AUDIO_SENDER_H_ | 6 #define MEDIA_CAST_AUDIO_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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const MissingFramesAndPacketsMap& missing_frames_and_packets); | 61 const MissingFramesAndPacketsMap& missing_frames_and_packets); |
62 | 62 |
63 void ResendPacketsOnTransportThread( | 63 void ResendPacketsOnTransportThread( |
64 const transport::MissingFramesAndPacketsMap& missing_packets); | 64 const transport::MissingFramesAndPacketsMap& missing_packets); |
65 | 65 |
66 void ScheduleNextRtcpReport(); | 66 void ScheduleNextRtcpReport(); |
67 void SendRtcpReport(); | 67 void SendRtcpReport(); |
68 | 68 |
69 void InitializeTimers(); | 69 void InitializeTimers(); |
70 | 70 |
71 base::WeakPtrFactory<AudioSender> weak_factory_; | |
72 | |
73 scoped_refptr<CastEnvironment> cast_environment_; | 71 scoped_refptr<CastEnvironment> cast_environment_; |
74 transport::CastTransportSender* const transport_sender_; | 72 transport::CastTransportSender* const transport_sender_; |
75 scoped_ptr<AudioEncoder> audio_encoder_; | 73 scoped_ptr<AudioEncoder> audio_encoder_; |
76 scoped_ptr<LocalRtpSenderStatistics> rtp_audio_sender_statistics_; | 74 scoped_ptr<LocalRtpSenderStatistics> rtp_audio_sender_statistics_; |
77 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_; | 75 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_; |
78 Rtcp rtcp_; | 76 Rtcp rtcp_; |
79 bool timers_initialized_; | 77 bool timers_initialized_; |
80 CastInitializationStatus cast_initialization_cb_; | 78 CastInitializationStatus cast_initialization_cb_; |
81 | 79 |
| 80 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 81 base::WeakPtrFactory<AudioSender> weak_factory_; |
| 82 |
82 DISALLOW_COPY_AND_ASSIGN(AudioSender); | 83 DISALLOW_COPY_AND_ASSIGN(AudioSender); |
83 }; | 84 }; |
84 | 85 |
85 } // namespace cast | 86 } // namespace cast |
86 } // namespace media | 87 } // namespace media |
87 | 88 |
88 #endif // MEDIA_CAST_AUDIO_SENDER_H_ | 89 #endif // MEDIA_CAST_AUDIO_SENDER_H_ |
OLD | NEW |