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/api/call/audio_send_stream.h" | 16 #include "webrtc/api/call/audio_send_stream.h" |
17 #include "webrtc/api/call/audio_state.h" | 17 #include "webrtc/api/call/audio_state.h" |
18 #include "webrtc/base/constructormagic.h" | 18 #include "webrtc/base/constructormagic.h" |
| 19 #include "webrtc/base/onetimeevent.h" |
19 #include "webrtc/base/thread_checker.h" | 20 #include "webrtc/base/thread_checker.h" |
20 #include "webrtc/call/bitrate_allocator.h" | 21 #include "webrtc/call/bitrate_allocator.h" |
21 | 22 |
22 namespace webrtc { | 23 namespace webrtc { |
23 class CongestionController; | 24 class CongestionController; |
24 class VoiceEngine; | 25 class VoiceEngine; |
25 class RtcEventLog; | 26 class RtcEventLog; |
26 | 27 |
27 namespace voe { | 28 namespace voe { |
28 class ChannelProxy; | 29 class ChannelProxy; |
(...skipping 27 matching lines...) Expand all Loading... |
56 uint8_t fraction_loss, | 57 uint8_t fraction_loss, |
57 int64_t rtt) override; | 58 int64_t rtt) override; |
58 | 59 |
59 const webrtc::AudioSendStream::Config& config() const; | 60 const webrtc::AudioSendStream::Config& config() const; |
60 void SetTransportOverhead(int transport_overhead_per_packet); | 61 void SetTransportOverhead(int transport_overhead_per_packet); |
61 | 62 |
62 private: | 63 private: |
63 VoiceEngine* voice_engine() const; | 64 VoiceEngine* voice_engine() const; |
64 | 65 |
65 bool SetupSendCodec(); | 66 bool SetupSendCodec(); |
| 67 void UpdateSmoothedBitrate(); |
66 | 68 |
67 rtc::ThreadChecker thread_checker_; | 69 rtc::ThreadChecker thread_checker_; |
68 rtc::TaskQueue* worker_queue_; | 70 rtc::TaskQueue* worker_queue_; |
69 const webrtc::AudioSendStream::Config config_; | 71 const webrtc::AudioSendStream::Config config_; |
70 rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 72 rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
71 std::unique_ptr<voe::ChannelProxy> channel_proxy_; | 73 std::unique_ptr<voe::ChannelProxy> channel_proxy_; |
72 | 74 |
73 BitrateAllocator* const bitrate_allocator_; | 75 BitrateAllocator* const bitrate_allocator_; |
| 76 OneTimeEvent first_update_bitrate_; |
74 | 77 |
75 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); | 78 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); |
76 }; | 79 }; |
77 } // namespace internal | 80 } // namespace internal |
78 } // namespace webrtc | 81 } // namespace webrtc |
79 | 82 |
80 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ | 83 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
OLD | NEW |