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

Side by Side Diff: media/capture/video/win/video_capture_device_win.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 "media/capture/video/win/video_capture_device_win.h" 5 #include "media/capture/video/win/video_capture_device_win.h"
6 6
7 #include <ks.h> 7 #include <ks.h>
8 #include <ksmedia.h> 8 #include <ksmedia.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <list> 11 #include <list>
12 #include <utility>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/strings/sys_string_conversions.h" 15 #include "base/strings/sys_string_conversions.h"
15 #include "base/win/scoped_co_mem.h" 16 #include "base/win/scoped_co_mem.h"
16 #include "base/win/scoped_variant.h" 17 #include "base/win/scoped_variant.h"
17 18
18 using base::win::ScopedCoMem; 19 using base::win::ScopedCoMem;
19 using base::win::ScopedComPtr; 20 using base::win::ScopedComPtr;
20 using base::win::ScopedVariant; 21 using base::win::ScopedVariant;
21 22
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 return CreateCapabilityMap(); 328 return CreateCapabilityMap();
328 } 329 }
329 330
330 void VideoCaptureDeviceWin::AllocateAndStart( 331 void VideoCaptureDeviceWin::AllocateAndStart(
331 const VideoCaptureParams& params, 332 const VideoCaptureParams& params,
332 scoped_ptr<VideoCaptureDevice::Client> client) { 333 scoped_ptr<VideoCaptureDevice::Client> client) {
333 DCHECK(thread_checker_.CalledOnValidThread()); 334 DCHECK(thread_checker_.CalledOnValidThread());
334 if (state_ != kIdle) 335 if (state_ != kIdle)
335 return; 336 return;
336 337
337 client_ = client.Pass(); 338 client_ = std::move(client);
338 339
339 // Get the camera capability that best match the requested format. 340 // Get the camera capability that best match the requested format.
340 const CapabilityWin found_capability = 341 const CapabilityWin found_capability =
341 GetBestMatchedCapability(params.requested_format, capabilities_); 342 GetBestMatchedCapability(params.requested_format, capabilities_);
342 343
343 // Reduce the frame rate if the requested frame rate is lower 344 // Reduce the frame rate if the requested frame rate is lower
344 // than the capability. 345 // than the capability.
345 const float frame_rate = 346 const float frame_rate =
346 std::min(params.requested_format.frame_rate, 347 std::min(params.requested_format.frame_rate,
347 found_capability.supported_format.frame_rate); 348 found_capability.supported_format.frame_rate);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 } 575 }
575 576
576 void VideoCaptureDeviceWin::SetErrorState( 577 void VideoCaptureDeviceWin::SetErrorState(
577 const tracked_objects::Location& from_here, 578 const tracked_objects::Location& from_here,
578 const std::string& reason) { 579 const std::string& reason) {
579 DCHECK(thread_checker_.CalledOnValidThread()); 580 DCHECK(thread_checker_.CalledOnValidThread());
580 state_ = kError; 581 state_ = kError;
581 client_->OnError(from_here, reason); 582 client_->OnError(from_here, reason);
582 } 583 }
583 } // namespace media 584 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/win/video_capture_device_mf_win.cc ('k') | media/cdm/ppapi/external_clear_key/cdm_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698