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

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: 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
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 is_started_ = false; 510 is_started_ = false;
511 consumer_ = NULL; 511 consumer_ = NULL;
512 } 512 }
513 513
514 void CaptureOracle::DidCaptureFrame( 514 void CaptureOracle::DidCaptureFrame(
515 const scoped_refptr<media::VideoFrame>& frame, 515 const scoped_refptr<media::VideoFrame>& frame,
516 base::Time timestamp, 516 base::Time timestamp,
517 bool success) { 517 bool success) {
518 base::AutoLock guard(lock_); 518 base::AutoLock guard(lock_);
519 519
520 TRACE_EVENT_ASYNC_END1("mirroring", "Capture", frame.get(), 520 TRACE_EVENT_ASYNC_END2("mirroring", "Capture", frame.get(),
521 "success", success); 521 "success", success,
522 "timestamp", timestamp.ToInternalValue());
522 523
523 if (!consumer_ || !is_started_) 524 if (!consumer_ || !is_started_)
524 return; // Capture is stopped. 525 return; // Capture is stopped.
525 526
526 if (success) 527 if (success)
527 consumer_->OnIncomingCapturedVideoFrame(frame, timestamp); 528 consumer_->OnIncomingCapturedVideoFrame(frame, timestamp);
528 } 529 }
529 530
530 bool FrameSubscriber::ShouldCaptureFrame( 531 bool FrameSubscriber::ShouldCaptureFrame(
531 scoped_refptr<media::VideoFrame>* storage, 532 scoped_refptr<media::VideoFrame>* storage,
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 return false; 1299 return false;
1299 else 1300 else
1300 return true; 1301 return true;
1301 } 1302 }
1302 1303
1303 base::Time SmoothEventSampler::GetLastSampledEvent() { 1304 base::Time SmoothEventSampler::GetLastSampledEvent() {
1304 return last_sample_; 1305 return last_sample_;
1305 } 1306 }
1306 1307
1307 } // namespace content 1308 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_capturer.h » ('j') | content/renderer/media/rtc_video_capturer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698