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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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_win.h ('k') | remoting/host/cast_extension_session.h » ('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 #include "remoting/host/audio_capturer_win.h" 5 #include "remoting/host/audio_capturer_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <avrt.h> 8 #include <avrt.h>
9 #include <mmreg.h> 9 #include <mmreg.h>
10 #include <mmsystem.h> 10 #include <mmsystem.h>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 bool AudioCapturerWin::Start(const PacketCapturedCallback& callback) { 51 bool AudioCapturerWin::Start(const PacketCapturedCallback& callback) {
52 DCHECK(!audio_capture_client_.get()); 52 DCHECK(!audio_capture_client_.get());
53 DCHECK(!audio_client_.get()); 53 DCHECK(!audio_client_.get());
54 DCHECK(!mm_device_.get()); 54 DCHECK(!mm_device_.get());
55 DCHECK(static_cast<PWAVEFORMATEX>(wave_format_ex_) == nullptr); 55 DCHECK(static_cast<PWAVEFORMATEX>(wave_format_ex_) == nullptr);
56 DCHECK(thread_checker_.CalledOnValidThread()); 56 DCHECK(thread_checker_.CalledOnValidThread());
57 57
58 callback_ = callback; 58 callback_ = callback;
59 59
60 // Initialize the capture timer. 60 // Initialize the capture timer.
61 capture_timer_.reset(new base::RepeatingTimer<AudioCapturerWin>()); 61 capture_timer_.reset(new base::RepeatingTimer());
62 62
63 HRESULT hr = S_OK; 63 HRESULT hr = S_OK;
64 64
65 base::win::ScopedComPtr<IMMDeviceEnumerator> mm_device_enumerator; 65 base::win::ScopedComPtr<IMMDeviceEnumerator> mm_device_enumerator;
66 hr = mm_device_enumerator.CreateInstance(__uuidof(MMDeviceEnumerator)); 66 hr = mm_device_enumerator.CreateInstance(__uuidof(MMDeviceEnumerator));
67 if (FAILED(hr)) { 67 if (FAILED(hr)) {
68 LOG(ERROR) << "Failed to create IMMDeviceEnumerator. Error " << hr; 68 LOG(ERROR) << "Failed to create IMMDeviceEnumerator. Error " << hr;
69 return false; 69 return false;
70 } 70 }
71 71
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 bool AudioCapturer::IsSupported() { 259 bool AudioCapturer::IsSupported() {
260 return true; 260 return true;
261 } 261 }
262 262
263 scoped_ptr<AudioCapturer> AudioCapturer::Create() { 263 scoped_ptr<AudioCapturer> AudioCapturer::Create() {
264 return make_scoped_ptr(new AudioCapturerWin()); 264 return make_scoped_ptr(new AudioCapturerWin());
265 } 265 }
266 266
267 } // namespace remoting 267 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/audio_capturer_win.h ('k') | remoting/host/cast_extension_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698