| 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_RECEIVE_STREAM_H_ | 11 #ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ |
| 12 #define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 12 #define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ |
| 13 | 13 |
| 14 #include "webrtc/audio_receive_stream.h" | 14 #include "webrtc/audio_receive_stream.h" |
| 15 #include "webrtc/audio_state.h" | 15 #include "webrtc/audio_state.h" |
| 16 #include "webrtc/base/thread_checker.h" | 16 #include "webrtc/base/thread_checker.h" |
| 17 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 17 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
| 18 | 18 |
| 19 namespace webrtc { | 19 namespace webrtc { |
| 20 class RemoteBitrateEstimator; | 20 class RemoteBitrateEstimator; |
| 21 | 21 |
| 22 namespace voe { | 22 namespace voe { |
| 23 class ChannelProxy; | 23 class ChannelProxy; |
| 24 } // namespace voe | 24 } // namespace voe |
| 25 | 25 |
| 26 namespace internal { | 26 namespace internal { |
| 27 |
| 27 class AudioReceiveStream final : public webrtc::AudioReceiveStream { | 28 class AudioReceiveStream final : public webrtc::AudioReceiveStream { |
| 28 public: | 29 public: |
| 29 AudioReceiveStream(RemoteBitrateEstimator* remote_bitrate_estimator, | 30 AudioReceiveStream(RemoteBitrateEstimator* remote_bitrate_estimator, |
| 30 const webrtc::AudioReceiveStream::Config& config, | 31 const webrtc::AudioReceiveStream::Config& config, |
| 31 const rtc::scoped_refptr<webrtc::AudioState>& audio_state); | 32 const rtc::scoped_refptr<webrtc::AudioState>& audio_state); |
| 32 ~AudioReceiveStream() override; | 33 ~AudioReceiveStream() override; |
| 33 | 34 |
| 34 // webrtc::ReceiveStream implementation. | 35 // webrtc::ReceiveStream implementation. |
| 35 void Start() override; | 36 void Start() override; |
| 36 void Stop() override; | 37 void Stop() override; |
| 37 void SignalNetworkState(NetworkState state) override; | 38 void SignalNetworkState(NetworkState state) override; |
| 38 bool DeliverRtcp(const uint8_t* packet, size_t length) override; | 39 bool DeliverRtcp(const uint8_t* packet, size_t length) override; |
| 39 bool DeliverRtp(const uint8_t* packet, | 40 bool DeliverRtp(const uint8_t* packet, |
| 40 size_t length, | 41 size_t length, |
| 41 const PacketTime& packet_time) override; | 42 const PacketTime& packet_time) override; |
| 42 | 43 |
| 43 // webrtc::AudioReceiveStream implementation. | 44 // webrtc::AudioReceiveStream implementation. |
| 44 webrtc::AudioReceiveStream::Stats GetStats() const override; | 45 webrtc::AudioReceiveStream::Stats GetStats() const override; |
| 45 | 46 |
| 47 void SetSink(rtc::scoped_ptr<AudioSinkInterface> sink) override; |
| 48 |
| 46 const webrtc::AudioReceiveStream::Config& config() const; | 49 const webrtc::AudioReceiveStream::Config& config() const; |
| 47 | 50 |
| 48 private: | 51 private: |
| 49 VoiceEngine* voice_engine() const; | 52 VoiceEngine* voice_engine() const; |
| 50 | 53 |
| 51 rtc::ThreadChecker thread_checker_; | 54 rtc::ThreadChecker thread_checker_; |
| 52 RemoteBitrateEstimator* const remote_bitrate_estimator_; | 55 RemoteBitrateEstimator* const remote_bitrate_estimator_; |
| 53 const webrtc::AudioReceiveStream::Config config_; | 56 const webrtc::AudioReceiveStream::Config config_; |
| 54 rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 57 rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
| 55 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; | 58 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; |
| 56 rtc::scoped_ptr<voe::ChannelProxy> channel_proxy_; | 59 rtc::scoped_ptr<voe::ChannelProxy> channel_proxy_; |
| 57 | 60 |
| 58 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream); | 61 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream); |
| 59 }; | 62 }; |
| 60 } // namespace internal | 63 } // namespace internal |
| 61 } // namespace webrtc | 64 } // namespace webrtc |
| 62 | 65 |
| 63 #endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ | 66 #endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ |
| OLD | NEW |