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

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

Issue 2792383003: Rename ScopedComPtr::Release() to ScopedComPtr::Reset() (Closed)
Patch Set: Fix New Callers Created 3 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
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 <avrt.h> 7 #include <avrt.h>
8 #include <mmreg.h> 8 #include <mmreg.h>
9 #include <mmsystem.h> 9 #include <mmsystem.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if (!Initialize()) { 131 if (!Initialize()) {
132 Deinitialize(); 132 Deinitialize();
133 return false; 133 return false;
134 } 134 }
135 return true; 135 return true;
136 } 136 }
137 137
138 void AudioCapturerWin::Deinitialize() { 138 void AudioCapturerWin::Deinitialize() {
139 DCHECK(thread_checker_.CalledOnValidThread()); 139 DCHECK(thread_checker_.CalledOnValidThread());
140 wave_format_ex_.Reset(nullptr); 140 wave_format_ex_.Reset(nullptr);
141 mm_device_enumerator_.Release(); 141 mm_device_enumerator_.Reset();
142 audio_capture_client_.Release(); 142 audio_capture_client_.Reset();
143 audio_client_.Release(); 143 audio_client_.Reset();
144 mm_device_.Release(); 144 mm_device_.Reset();
145 audio_volume_.Release(); 145 audio_volume_.Reset();
146 } 146 }
147 147
148 bool AudioCapturerWin::Initialize() { 148 bool AudioCapturerWin::Initialize() {
149 DCHECK(!audio_capture_client_.get()); 149 DCHECK(!audio_capture_client_.get());
150 DCHECK(!audio_client_.get()); 150 DCHECK(!audio_client_.get());
151 DCHECK(!mm_device_.get()); 151 DCHECK(!mm_device_.get());
152 DCHECK(!audio_volume_.get()); 152 DCHECK(!audio_volume_.get());
153 DCHECK(static_cast<PWAVEFORMATEX>(wave_format_ex_) == nullptr); 153 DCHECK(static_cast<PWAVEFORMATEX>(wave_format_ex_) == nullptr);
154 DCHECK(thread_checker_.CalledOnValidThread()); 154 DCHECK(thread_checker_.CalledOnValidThread());
155 155
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 425
426 bool AudioCapturer::IsSupported() { 426 bool AudioCapturer::IsSupported() {
427 return true; 427 return true;
428 } 428 }
429 429
430 std::unique_ptr<AudioCapturer> AudioCapturer::Create() { 430 std::unique_ptr<AudioCapturer> AudioCapturer::Create() {
431 return base::WrapUnique(new AudioCapturerWin()); 431 return base::WrapUnique(new AudioCapturerWin());
432 } 432 }
433 433
434 } // namespace remoting 434 } // namespace remoting
OLDNEW
« no previous file with comments | « media/gpu/media_foundation_video_encode_accelerator_win.cc ('k') | remoting/host/setup/win/auth_code_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698