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

Side by Side Diff: content/browser/renderer_host/media/web_contents_video_capture_device.cc

Issue 13554003: Use NTP time for video frame timestamp. Add tracing for timestamps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix RenderFrame using timestamp as nanoseconds. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_capturer.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 // Implementation notes: This needs to work on a variety of hardware 5 // Implementation notes: This needs to work on a variety of hardware
6 // configurations where the speed of the CPU and GPU greatly affect overall 6 // configurations where the speed of the CPU and GPU greatly affect overall
7 // performance. Spanning several threads, the process of capturing has been 7 // performance. Spanning several threads, the process of capturing has been
8 // split up into four conceptual stages: 8 // split up into four conceptual stages:
9 // 9 //
10 // 1. Reserve Buffer: Before a frame can be captured, a slot in the consumer's 10 // 1. Reserve Buffer: Before a frame can be captured, a slot in the consumer's
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 is_started_ = false; 522 is_started_ = false;
523 consumer_ = NULL; 523 consumer_ = NULL;
524 } 524 }
525 525
526 void CaptureOracle::DidCaptureFrame( 526 void CaptureOracle::DidCaptureFrame(
527 const scoped_refptr<media::VideoFrame>& frame, 527 const scoped_refptr<media::VideoFrame>& frame,
528 base::Time timestamp, 528 base::Time timestamp,
529 bool success) { 529 bool success) {
530 base::AutoLock guard(lock_); 530 base::AutoLock guard(lock_);
531 531
532 TRACE_EVENT_ASYNC_END1("mirroring", "Capture", frame.get(), 532 TRACE_EVENT_ASYNC_END2("mirroring", "Capture", frame.get(),
533 "success", success); 533 "success", success,
534 "timestamp", timestamp.ToInternalValue());
534 535
535 if (!consumer_ || !is_started_) 536 if (!consumer_ || !is_started_)
536 return; // Capture is stopped. 537 return; // Capture is stopped.
537 538
538 if (success) 539 if (success)
539 consumer_->OnIncomingCapturedVideoFrame(frame, timestamp); 540 consumer_->OnIncomingCapturedVideoFrame(frame, timestamp);
540 } 541 }
541 542
542 bool FrameSubscriber::ShouldCaptureFrame( 543 bool FrameSubscriber::ShouldCaptureFrame(
543 scoped_refptr<media::VideoFrame>* storage, 544 scoped_refptr<media::VideoFrame>* storage,
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 return false; 1319 return false;
1319 else 1320 else
1320 return true; 1321 return true;
1321 } 1322 }
1322 1323
1323 base::Time SmoothEventSampler::GetLastSampledEvent() { 1324 base::Time SmoothEventSampler::GetLastSampledEvent() {
1324 return last_sample_; 1325 return last_sample_;
1325 } 1326 }
1326 1327
1327 } // namespace content 1328 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698