Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1145)

Side by Side Diff: webrtc/audio/audio_receive_stream.h

Issue 1403363003: Move VoiceEngineObserver into AudioSendStream so that we detect typing noises and return properly i… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: missing file Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/scoped_voe_interface.h"
16 #include "webrtc/base/thread_checker.h" 15 #include "webrtc/base/thread_checker.h"
17 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h" 16 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
18 #include "webrtc/voice_engine/include/voe_base.h"
19 17
20 namespace webrtc { 18 namespace webrtc {
21 19
22 class RemoteBitrateEstimator; 20 class RemoteBitrateEstimator;
23 class VoiceEngine;
24 21
25 namespace internal { 22 namespace internal {
26 23
24 class AudioState;
25
27 class AudioReceiveStream final : public webrtc::AudioReceiveStream { 26 class AudioReceiveStream final : public webrtc::AudioReceiveStream {
28 public: 27 public:
29 AudioReceiveStream(RemoteBitrateEstimator* remote_bitrate_estimator, 28 AudioReceiveStream(RemoteBitrateEstimator* remote_bitrate_estimator,
30 const webrtc::AudioReceiveStream::Config& config, 29 const webrtc::AudioReceiveStream::Config& config,
31 VoiceEngine* voice_engine); 30 AudioState* audio_state);
tommi 2015/11/02 13:46:53 this would also bypass the linked_ptr... but I thi
the sun 2015/11/03 12:41:07 Acknowledged.
32 ~AudioReceiveStream() override; 31 ~AudioReceiveStream() override;
33 32
34 // webrtc::ReceiveStream implementation. 33 // webrtc::ReceiveStream implementation.
35 void Start() override; 34 void Start() override;
36 void Stop() override; 35 void Stop() override;
37 void SignalNetworkState(NetworkState state) override; 36 void SignalNetworkState(NetworkState state) override;
38 bool DeliverRtcp(const uint8_t* packet, size_t length) override; 37 bool DeliverRtcp(const uint8_t* packet, size_t length) override;
39 bool DeliverRtp(const uint8_t* packet, 38 bool DeliverRtp(const uint8_t* packet,
40 size_t length, 39 size_t length,
41 const PacketTime& packet_time) override; 40 const PacketTime& packet_time) override;
42 41
43 // webrtc::AudioReceiveStream implementation. 42 // webrtc::AudioReceiveStream implementation.
44 webrtc::AudioReceiveStream::Stats GetStats() const override; 43 webrtc::AudioReceiveStream::Stats GetStats() const override;
45 44
46 const webrtc::AudioReceiveStream::Config& config() const; 45 const webrtc::AudioReceiveStream::Config& config() const;
47 46
48 private: 47 private:
49 rtc::ThreadChecker thread_checker_; 48 rtc::ThreadChecker thread_checker_;
50 RemoteBitrateEstimator* const remote_bitrate_estimator_; 49 RemoteBitrateEstimator* const remote_bitrate_estimator_;
51 const webrtc::AudioReceiveStream::Config config_; 50 const webrtc::AudioReceiveStream::Config config_;
52 VoiceEngine* voice_engine_; 51 AudioState* audio_state_;
53 // We hold one interface pointer to the VoE to make sure it is kept alive.
54 ScopedVoEInterface<VoEBase> voe_base_;
55 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; 52 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_;
56 53
57 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream); 54 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream);
58 }; 55 };
59 } // namespace internal 56 } // namespace internal
60 } // namespace webrtc 57 } // namespace webrtc
61 58
62 #endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ 59 #endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698