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

Side by Side Diff: webrtc/audio/audio_send_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: that's all folks! (incl rebase), or is it? 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
« no previous file with comments | « webrtc/audio/audio_receive_stream_unittest.cc ('k') | webrtc/audio/audio_send_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 "webrtc/audio_send_stream.h" 14 #include "webrtc/audio_send_stream.h"
15 #include "webrtc/audio/scoped_voe_interface.h" 15 #include "webrtc/audio_state.h"
16 #include "webrtc/base/thread_checker.h" 16 #include "webrtc/base/thread_checker.h"
17 #include "webrtc/voice_engine/include/voe_base.h"
18 17
19 namespace webrtc { 18 namespace webrtc {
20
21 class VoiceEngine;
22
23 namespace internal { 19 namespace internal {
24 20
25 class AudioSendStream final : public webrtc::AudioSendStream { 21 class AudioSendStream final : public webrtc::AudioSendStream {
26 public: 22 public:
27 AudioSendStream(const webrtc::AudioSendStream::Config& config, 23 AudioSendStream(const webrtc::AudioSendStream::Config& config,
28 VoiceEngine* voice_engine); 24 const rtc::scoped_refptr<webrtc::AudioState>& audio_state);
29 ~AudioSendStream() override; 25 ~AudioSendStream() override;
30 26
31 // webrtc::SendStream implementation. 27 // webrtc::SendStream implementation.
32 void Start() override; 28 void Start() override;
33 void Stop() override; 29 void Stop() override;
34 void SignalNetworkState(NetworkState state) override; 30 void SignalNetworkState(NetworkState state) override;
35 bool DeliverRtcp(const uint8_t* packet, size_t length) override; 31 bool DeliverRtcp(const uint8_t* packet, size_t length) override;
36 32
37 // webrtc::AudioSendStream implementation. 33 // webrtc::AudioSendStream implementation.
38 webrtc::AudioSendStream::Stats GetStats() const override; 34 webrtc::AudioSendStream::Stats GetStats() const override;
39 35
40 const webrtc::AudioSendStream::Config& config() const; 36 const webrtc::AudioSendStream::Config& config() const;
41 37
42 private: 38 private:
43 rtc::ThreadChecker thread_checker_; 39 rtc::ThreadChecker thread_checker_;
44 const webrtc::AudioSendStream::Config config_; 40 const webrtc::AudioSendStream::Config config_;
45 VoiceEngine* voice_engine_; 41 rtc::scoped_refptr<webrtc::AudioState> audio_state_;
46 // We hold one interface pointer to the VoE to make sure it is kept alive.
47 ScopedVoEInterface<VoEBase> voe_base_;
48 42
49 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); 43 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream);
50 }; 44 };
51 } // namespace internal 45 } // namespace internal
52 } // namespace webrtc 46 } // namespace webrtc
53 47
54 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ 48 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream_unittest.cc ('k') | webrtc/audio/audio_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698