OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SENDER_AUDIO_SENDER_H_ | 5 #ifndef MEDIA_CAST_SENDER_AUDIO_SENDER_H_ |
6 #define MEDIA_CAST_SENDER_AUDIO_SENDER_H_ | 6 #define MEDIA_CAST_SENDER_AUDIO_SENDER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 void OnEncodedAudioFrame(int encoder_bitrate, | 56 void OnEncodedAudioFrame(int encoder_bitrate, |
57 std::unique_ptr<SenderEncodedFrame> encoded_frame, | 57 std::unique_ptr<SenderEncodedFrame> encoded_frame, |
58 int samples_skipped); | 58 int samples_skipped); |
59 | 59 |
60 // Encodes AudioBuses into EncodedFrames. | 60 // Encodes AudioBuses into EncodedFrames. |
61 std::unique_ptr<AudioEncoder> audio_encoder_; | 61 std::unique_ptr<AudioEncoder> audio_encoder_; |
62 | 62 |
63 // The number of audio samples enqueued in |audio_encoder_|. | 63 // The number of audio samples enqueued in |audio_encoder_|. |
64 int samples_in_encoder_; | 64 int samples_in_encoder_; |
65 | 65 |
66 // NOTE: Weak pointers must be invalidated before all other member variables. | |
67 base::WeakPtrFactory<AudioSender> weak_factory_; | |
miu
2017/05/08 20:04:31
We can't do this: When ~AudioSender() is called, t
Chandan
2017/05/08 21:04:30
In that case, will remove SupportsWeakPtr instead
| |
68 | |
69 DISALLOW_COPY_AND_ASSIGN(AudioSender); | 66 DISALLOW_COPY_AND_ASSIGN(AudioSender); |
70 }; | 67 }; |
71 | 68 |
72 } // namespace cast | 69 } // namespace cast |
73 } // namespace media | 70 } // namespace media |
74 | 71 |
75 #endif // MEDIA_CAST_SENDER_AUDIO_SENDER_H_ | 72 #endif // MEDIA_CAST_SENDER_AUDIO_SENDER_H_ |
OLD | NEW |