Fredrik Solenberg | 23fba1f | 2015-04-29 15:24:01 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 11 | #ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ |
| 12 | #define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ |
Fredrik Solenberg | 23fba1f | 2015-04-29 15:24:01 +0200 | [diff] [blame] | 13 | |
| 14 | #include "webrtc/audio_receive_stream.h" |
| 15 | #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h" |
| 16 | |
| 17 | namespace webrtc { |
| 18 | |
| 19 | class RemoteBitrateEstimator; |
| 20 | |
| 21 | namespace internal { |
| 22 | |
| 23 | class AudioReceiveStream : public webrtc::AudioReceiveStream { |
| 24 | public: |
| 25 | AudioReceiveStream(RemoteBitrateEstimator* remote_bitrate_estimator, |
| 26 | const webrtc::AudioReceiveStream::Config& config); |
pbos | a2f30de | 2015-10-15 05:22:13 -0700 | [diff] [blame^] | 27 | ~AudioReceiveStream() override; |
Fredrik Solenberg | 23fba1f | 2015-04-29 15:24:01 +0200 | [diff] [blame] | 28 | |
Jelena Marusic | cd67022 | 2015-07-16 09:30:09 +0200 | [diff] [blame] | 29 | // webrtc::ReceiveStream implementation. |
| 30 | void Start() override; |
| 31 | void Stop() override; |
| 32 | void SignalNetworkState(NetworkState state) override; |
| 33 | bool DeliverRtcp(const uint8_t* packet, size_t length) override; |
stefan | 68786d2 | 2015-09-08 05:36:15 -0700 | [diff] [blame] | 34 | bool DeliverRtp(const uint8_t* packet, |
| 35 | size_t length, |
| 36 | const PacketTime& packet_time) override; |
Fredrik Solenberg | 04f4931 | 2015-06-08 13:04:56 +0200 | [diff] [blame] | 37 | |
Jelena Marusic | cd67022 | 2015-07-16 09:30:09 +0200 | [diff] [blame] | 38 | // webrtc::AudioReceiveStream implementation. |
| 39 | webrtc::AudioReceiveStream::Stats GetStats() const override; |
Fredrik Solenberg | 23fba1f | 2015-04-29 15:24:01 +0200 | [diff] [blame] | 40 | |
pbos | a2f30de | 2015-10-15 05:22:13 -0700 | [diff] [blame^] | 41 | const webrtc::AudioReceiveStream::Config& config() const; |
Fredrik Solenberg | 23fba1f | 2015-04-29 15:24:01 +0200 | [diff] [blame] | 42 | |
| 43 | private: |
| 44 | RemoteBitrateEstimator* const remote_bitrate_estimator_; |
| 45 | const webrtc::AudioReceiveStream::Config config_; |
| 46 | rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; |
| 47 | }; |
| 48 | } // namespace internal |
| 49 | } // namespace webrtc |
| 50 | |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 51 | #endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ |