| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ | 11 #ifndef WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| 12 #define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ | 12 #define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "webrtc/base/constructormagic.h" | 16 #include "webrtc/base/constructormagic.h" |
| 17 #include "webrtc/base/onetimeevent.h" |
| 17 #include "webrtc/base/thread_checker.h" | 18 #include "webrtc/base/thread_checker.h" |
| 18 #include "webrtc/call/audio_send_stream.h" | 19 #include "webrtc/call/audio_send_stream.h" |
| 19 #include "webrtc/call/audio_state.h" | 20 #include "webrtc/call/audio_state.h" |
| 21 #include "webrtc/base/weak_ptr.h" |
| 20 #include "webrtc/call/bitrate_allocator.h" | 22 #include "webrtc/call/bitrate_allocator.h" |
| 21 | 23 |
| 22 namespace webrtc { | 24 namespace webrtc { |
| 23 class CongestionController; | 25 class CongestionController; |
| 24 class VoiceEngine; | 26 class VoiceEngine; |
| 25 class RtcEventLog; | 27 class RtcEventLog; |
| 26 class RtcpRttStats; | 28 class RtcpRttStats; |
| 27 class PacketRouter; | 29 class PacketRouter; |
| 28 | 30 |
| 29 namespace voe { | 31 namespace voe { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 58 // Implements BitrateAllocatorObserver. | 60 // Implements BitrateAllocatorObserver. |
| 59 uint32_t OnBitrateUpdated(uint32_t bitrate_bps, | 61 uint32_t OnBitrateUpdated(uint32_t bitrate_bps, |
| 60 uint8_t fraction_loss, | 62 uint8_t fraction_loss, |
| 61 int64_t rtt, | 63 int64_t rtt, |
| 62 int64_t probing_interval_ms) override; | 64 int64_t probing_interval_ms) override; |
| 63 | 65 |
| 64 const webrtc::AudioSendStream::Config& config() const; | 66 const webrtc::AudioSendStream::Config& config() const; |
| 65 void SetTransportOverhead(int transport_overhead_per_packet); | 67 void SetTransportOverhead(int transport_overhead_per_packet); |
| 66 | 68 |
| 67 private: | 69 private: |
| 70 class AdaptCodecTask; |
| 71 |
| 68 VoiceEngine* voice_engine() const; | 72 VoiceEngine* voice_engine() const; |
| 69 | 73 |
| 70 bool SetupSendCodec(); | 74 bool SetupSendCodec(); |
| 75 void AdaptCodec(); |
| 71 | 76 |
| 72 rtc::ThreadChecker thread_checker_; | 77 rtc::ThreadChecker thread_checker_; |
| 73 rtc::TaskQueue* worker_queue_; | 78 rtc::TaskQueue* worker_queue_; |
| 74 const webrtc::AudioSendStream::Config config_; | 79 const webrtc::AudioSendStream::Config config_; |
| 75 rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 80 rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
| 76 std::unique_ptr<voe::ChannelProxy> channel_proxy_; | 81 std::unique_ptr<voe::ChannelProxy> channel_proxy_; |
| 77 | 82 |
| 78 BitrateAllocator* const bitrate_allocator_; | 83 BitrateAllocator* const bitrate_allocator_; |
| 79 | 84 |
| 85 std::unique_ptr<rtc::WeakPtrFactory<AudioSendStream>> weak_ptr_factory_; |
| 80 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); | 86 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); |
| 81 }; | 87 }; |
| 82 } // namespace internal | 88 } // namespace internal |
| 83 } // namespace webrtc | 89 } // namespace webrtc |
| 84 | 90 |
| 85 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ | 91 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
| OLD | NEW |