OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_AUDIO_CAPTURER_WIN_H_ | 5 #ifndef REMOTING_HOST_AUDIO_CAPTURER_WIN_H_ |
6 #define REMOTING_HOST_AUDIO_CAPTURER_WIN_H_ | 6 #define REMOTING_HOST_AUDIO_CAPTURER_WIN_H_ |
7 | 7 |
8 #include <audioclient.h> | 8 #include <audioclient.h> |
9 #include <mmdeviceapi.h> | 9 #include <mmdeviceapi.h> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
15 #include "base/win/scoped_co_mem.h" | 15 #include "base/win/scoped_co_mem.h" |
16 #include "base/win/scoped_comptr.h" | 16 #include "base/win/scoped_comptr.h" |
17 #include "remoting/host/audio_capturer.h" | 17 #include "remoting/host/audio_capturer.h" |
18 #include "remoting/host/audio_silence_detector.h" | 18 #include "remoting/host/audio_silence_detector.h" |
19 #include "remoting/proto/audio.pb.h" | 19 #include "remoting/proto/audio.pb.h" |
20 | 20 |
21 namespace remoting { | 21 namespace remoting { |
22 | 22 |
23 class AudioCapturerWin : public AudioCapturer { | 23 class AudioCapturerWin : public AudioCapturer { |
24 public: | 24 public: |
25 AudioCapturerWin(); | 25 AudioCapturerWin(); |
26 virtual ~AudioCapturerWin(); | 26 virtual ~AudioCapturerWin(); |
27 | 27 |
28 // AudioCapturer interface. | 28 // AudioCapturer interface. |
29 virtual bool Start(const PacketCapturedCallback& callback) OVERRIDE; | 29 virtual bool Start(const PacketCapturedCallback& callback) override; |
30 virtual void Stop() OVERRIDE; | 30 virtual void Stop() override; |
31 virtual bool IsStarted() OVERRIDE; | 31 virtual bool IsStarted() override; |
32 | 32 |
33 private: | 33 private: |
34 // Receives all packets from the audio capture endpoint buffer and pushes them | 34 // Receives all packets from the audio capture endpoint buffer and pushes them |
35 // to the network. | 35 // to the network. |
36 void DoCapture(); | 36 void DoCapture(); |
37 | 37 |
38 PacketCapturedCallback callback_; | 38 PacketCapturedCallback callback_; |
39 | 39 |
40 AudioPacket::SamplingRate sampling_rate_; | 40 AudioPacket::SamplingRate sampling_rate_; |
41 | 41 |
(...skipping 10 matching lines...) Expand all Loading... |
52 HRESULT last_capture_error_; | 52 HRESULT last_capture_error_; |
53 | 53 |
54 base::ThreadChecker thread_checker_; | 54 base::ThreadChecker thread_checker_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(AudioCapturerWin); | 56 DISALLOW_COPY_AND_ASSIGN(AudioCapturerWin); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace remoting | 59 } // namespace remoting |
60 | 60 |
61 #endif // REMOTING_HOST_AUDIO_CAPTURER_WIN_H_ | 61 #endif // REMOTING_HOST_AUDIO_CAPTURER_WIN_H_ |
OLD | NEW |