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

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

Issue 1671943003: Use system timestamp as capture timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « media/capture/video/mac/video_capture_device_mac.mm ('k') | no next file » | 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 "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>
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 445
446 client_.reset(); 446 client_.reset();
447 state_ = kIdle; 447 state_ = kIdle;
448 } 448 }
449 449
450 // Implements SinkFilterObserver::SinkFilterObserver. 450 // Implements SinkFilterObserver::SinkFilterObserver.
451 void VideoCaptureDeviceWin::FrameReceived(const uint8_t* buffer, 451 void VideoCaptureDeviceWin::FrameReceived(const uint8_t* buffer,
452 int length, 452 int length,
453 base::TimeTicks timestamp) { 453 base::TimeTicks timestamp) {
454 client_->OnIncomingCapturedData(buffer, length, capture_format_, 0, 454 client_->OnIncomingCapturedData(buffer, length, capture_format_, 0,
455 timestamp); 455 base::TimeTicks::Now());
456 } 456 }
457 457
458 bool VideoCaptureDeviceWin::CreateCapabilityMap() { 458 bool VideoCaptureDeviceWin::CreateCapabilityMap() {
459 DCHECK(thread_checker_.CalledOnValidThread()); 459 DCHECK(thread_checker_.CalledOnValidThread());
460 ScopedComPtr<IAMStreamConfig> stream_config; 460 ScopedComPtr<IAMStreamConfig> stream_config;
461 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive()); 461 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive());
462 if (FAILED(hr)) { 462 if (FAILED(hr)) {
463 DPLOG(ERROR) << "Failed to get IAMStreamConfig interface from " 463 DPLOG(ERROR) << "Failed to get IAMStreamConfig interface from "
464 "capture device: " << logging::SystemErrorCodeToString(hr); 464 "capture device: " << logging::SystemErrorCodeToString(hr);
465 return false; 465 return false;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 } 574 }
575 575
576 void VideoCaptureDeviceWin::SetErrorState( 576 void VideoCaptureDeviceWin::SetErrorState(
577 const tracked_objects::Location& from_here, 577 const tracked_objects::Location& from_here,
578 const std::string& reason) { 578 const std::string& reason) {
579 DCHECK(thread_checker_.CalledOnValidThread()); 579 DCHECK(thread_checker_.CalledOnValidThread());
580 state_ = kError; 580 state_ = kError;
581 client_->OnError(from_here, reason); 581 client_->OnError(from_here, reason);
582 } 582 }
583 } // namespace media 583 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/mac/video_capture_device_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698