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

Side by Side Diff: remoting/host/audio_capturer_win.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 months 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 | « remoting/host/audio_capturer_mac.cc ('k') | remoting/host/audio_capturer_win.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 // 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 <memory>
12
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
14 #include "base/timer/timer.h" 15 #include "base/timer/timer.h"
15 #include "base/win/scoped_co_mem.h" 16 #include "base/win/scoped_co_mem.h"
16 #include "base/win/scoped_comptr.h" 17 #include "base/win/scoped_comptr.h"
17 #include "remoting/host/audio_capturer.h" 18 #include "remoting/host/audio_capturer.h"
18 #include "remoting/host/audio_silence_detector.h" 19 #include "remoting/host/audio_silence_detector.h"
19 #include "remoting/proto/audio.pb.h" 20 #include "remoting/proto/audio.pb.h"
20 21
21 namespace remoting { 22 namespace remoting {
22 23
(...skipping 17 matching lines...) Expand all
40 float GetAudioLevel(); 41 float GetAudioLevel();
41 42
42 // Processes a series of samples, and executes callback if the packet is 43 // Processes a series of samples, and executes callback if the packet is
43 // qualified to be sent to client. 44 // qualified to be sent to client.
44 void ProcessSamples(uint8_t* data, size_t frames, int32_t flags); 45 void ProcessSamples(uint8_t* data, size_t frames, int32_t flags);
45 46
46 PacketCapturedCallback callback_; 47 PacketCapturedCallback callback_;
47 48
48 AudioPacket::SamplingRate sampling_rate_; 49 AudioPacket::SamplingRate sampling_rate_;
49 50
50 scoped_ptr<base::RepeatingTimer> capture_timer_; 51 std::unique_ptr<base::RepeatingTimer> capture_timer_;
51 base::TimeDelta audio_device_period_; 52 base::TimeDelta audio_device_period_;
52 53
53 AudioSilenceDetector silence_detector_; 54 AudioSilenceDetector silence_detector_;
54 55
55 base::win::ScopedCoMem<WAVEFORMATEX> wave_format_ex_; 56 base::win::ScopedCoMem<WAVEFORMATEX> wave_format_ex_;
56 base::win::ScopedComPtr<IAudioCaptureClient> audio_capture_client_; 57 base::win::ScopedComPtr<IAudioCaptureClient> audio_capture_client_;
57 base::win::ScopedComPtr<IAudioClient> audio_client_; 58 base::win::ScopedComPtr<IAudioClient> audio_client_;
58 base::win::ScopedComPtr<IMMDevice> mm_device_; 59 base::win::ScopedComPtr<IMMDevice> mm_device_;
59 base::win::ScopedComPtr<ISimpleAudioVolume> audio_volume_; 60 base::win::ScopedComPtr<ISimpleAudioVolume> audio_volume_;
60 61
61 HRESULT last_capture_error_; 62 HRESULT last_capture_error_;
62 63
63 base::ThreadChecker thread_checker_; 64 base::ThreadChecker thread_checker_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(AudioCapturerWin); 66 DISALLOW_COPY_AND_ASSIGN(AudioCapturerWin);
66 }; 67 };
67 68
68 } // namespace remoting 69 } // namespace remoting
69 70
70 #endif // REMOTING_HOST_AUDIO_CAPTURER_WIN_H_ 71 #endif // REMOTING_HOST_AUDIO_CAPTURER_WIN_H_
OLDNEW
« no previous file with comments | « remoting/host/audio_capturer_mac.cc ('k') | remoting/host/audio_capturer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698