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 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/base/constructormagic.h" |
18 #include "webrtc/base/thread_checker.h" | 18 #include "webrtc/base/thread_checker.h" |
19 #include "webrtc/call/audio_send_stream.h" | 19 #include "webrtc/call/audio_send_stream.h" |
20 #include "webrtc/call/audio_state.h" | 20 #include "webrtc/call/audio_state.h" |
21 #include "webrtc/call/bitrate_allocator.h" | 21 #include "webrtc/call/bitrate_allocator.h" |
22 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 22 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
23 #include "webrtc/voice_engine/transport_feedback_packet_loss_tracker.h" | 23 #include "webrtc/voice_engine/transport_feedback_packet_loss_tracker.h" |
24 | 24 |
25 namespace webrtc { | 25 namespace webrtc { |
26 class SendSideCongestionController; | |
27 class VoiceEngine; | 26 class VoiceEngine; |
28 class RtcEventLog; | 27 class RtcEventLog; |
29 class RtcpBandwidthObserver; | 28 class RtcpBandwidthObserver; |
30 class RtcpRttStats; | 29 class RtcpRttStats; |
31 class PacketRouter; | 30 class RtpTransportControllerSendInterface; |
32 | 31 |
33 namespace voe { | 32 namespace voe { |
34 class ChannelProxy; | 33 class ChannelProxy; |
35 } // namespace voe | 34 } // namespace voe |
36 | 35 |
37 namespace internal { | 36 namespace internal { |
38 class AudioSendStream final : public webrtc::AudioSendStream, | 37 class AudioSendStream final : public webrtc::AudioSendStream, |
39 public webrtc::BitrateAllocatorObserver, | 38 public webrtc::BitrateAllocatorObserver, |
40 public webrtc::PacketFeedbackObserver { | 39 public webrtc::PacketFeedbackObserver { |
41 public: | 40 public: |
42 AudioSendStream(const webrtc::AudioSendStream::Config& config, | 41 AudioSendStream(const webrtc::AudioSendStream::Config& config, |
43 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, | 42 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
44 rtc::TaskQueue* worker_queue, | 43 rtc::TaskQueue* worker_queue, |
45 PacketRouter* packet_router, | 44 RtpTransportControllerSendInterface* transport, |
46 SendSideCongestionController* send_side_cc, | |
47 BitrateAllocator* bitrate_allocator, | 45 BitrateAllocator* bitrate_allocator, |
48 RtcEventLog* event_log, | 46 RtcEventLog* event_log, |
49 RtcpRttStats* rtcp_rtt_stats); | 47 RtcpRttStats* rtcp_rtt_stats); |
50 ~AudioSendStream() override; | 48 ~AudioSendStream() override; |
51 | 49 |
52 // webrtc::AudioSendStream implementation. | 50 // webrtc::AudioSendStream implementation. |
53 void Start() override; | 51 void Start() override; |
54 void Stop() override; | 52 void Stop() override; |
55 bool SendTelephoneEvent(int payload_type, int payload_frequency, int event, | 53 bool SendTelephoneEvent(int payload_type, int payload_frequency, int event, |
56 int duration_ms) override; | 54 int duration_ms) override; |
(...skipping 23 matching lines...) Expand all Loading... |
80 bool SetupSendCodec(); | 78 bool SetupSendCodec(); |
81 | 79 |
82 rtc::ThreadChecker worker_thread_checker_; | 80 rtc::ThreadChecker worker_thread_checker_; |
83 rtc::ThreadChecker pacer_thread_checker_; | 81 rtc::ThreadChecker pacer_thread_checker_; |
84 rtc::TaskQueue* worker_queue_; | 82 rtc::TaskQueue* worker_queue_; |
85 const webrtc::AudioSendStream::Config config_; | 83 const webrtc::AudioSendStream::Config config_; |
86 rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 84 rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
87 std::unique_ptr<voe::ChannelProxy> channel_proxy_; | 85 std::unique_ptr<voe::ChannelProxy> channel_proxy_; |
88 | 86 |
89 BitrateAllocator* const bitrate_allocator_; | 87 BitrateAllocator* const bitrate_allocator_; |
90 SendSideCongestionController* const send_side_cc_; | 88 RtpTransportControllerSendInterface* const transport_; |
91 std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; | 89 std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; |
92 | 90 |
93 rtc::CriticalSection packet_loss_tracker_cs_; | 91 rtc::CriticalSection packet_loss_tracker_cs_; |
94 TransportFeedbackPacketLossTracker packet_loss_tracker_ | 92 TransportFeedbackPacketLossTracker packet_loss_tracker_ |
95 GUARDED_BY(&packet_loss_tracker_cs_); | 93 GUARDED_BY(&packet_loss_tracker_cs_); |
96 | 94 |
97 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); | 95 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); |
98 }; | 96 }; |
99 } // namespace internal | 97 } // namespace internal |
100 } // namespace webrtc | 98 } // namespace webrtc |
101 | 99 |
102 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ | 100 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ |
OLD | NEW |