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

Side by Side Diff: media/capture/video/video_capture_device_unittest.cc

Issue 2045813003: Decouple capture timestamp and reference time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 years, 6 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/video_capture_device.h ('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/video_capture_device.h" 5 #include "media/capture/video/video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 DoReserveOutputBuffer(); 105 DoReserveOutputBuffer();
106 NOTREACHED() << "This should never be called"; 106 NOTREACHED() << "This should never be called";
107 return std::unique_ptr<Buffer>(); 107 return std::unique_ptr<Buffer>();
108 } 108 }
109 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 109 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
110 const VideoCaptureFormat& frame_format, 110 const VideoCaptureFormat& frame_format,
111 base::TimeTicks reference_time, 111 base::TimeTicks reference_time,
112 base::TimeDelta timestamp) override { 112 base::TimeDelta timestamp) override {
113 DoOnIncomingCapturedBuffer(); 113 DoOnIncomingCapturedBuffer();
114 } 114 }
115 void OnIncomingCapturedVideoFrame(std::unique_ptr<Buffer> buffer, 115 void OnIncomingCapturedVideoFrame(
116 const scoped_refptr<VideoFrame>& frame, 116 std::unique_ptr<Buffer> buffer,
117 base::TimeTicks reference_time) override { 117 const scoped_refptr<VideoFrame>& frame) override {
118 DoOnIncomingCapturedVideoFrame(); 118 DoOnIncomingCapturedVideoFrame();
119 } 119 }
120 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 120 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
121 const gfx::Size& dimensions, 121 const gfx::Size& dimensions,
122 media::VideoPixelFormat format, 122 media::VideoPixelFormat format,
123 media::VideoPixelStorage storage) { 123 media::VideoPixelStorage storage) {
124 DoResurrectLastOutputBuffer(); 124 DoResurrectLastOutputBuffer();
125 NOTREACHED() << "This should never be called"; 125 NOTREACHED() << "This should never be called";
126 return std::unique_ptr<Buffer>(); 126 return std::unique_ptr<Buffer>();
127 } 127 }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // GetDeviceSupportedFormats(). 476 // GetDeviceSupportedFormats().
477 std::unique_ptr<VideoCaptureDevice::Name> name = 477 std::unique_ptr<VideoCaptureDevice::Name> name =
478 GetFirstDeviceNameSupportingPixelFormat(PIXEL_FORMAT_MAX); 478 GetFirstDeviceNameSupportingPixelFormat(PIXEL_FORMAT_MAX);
479 // Verify no camera returned for PIXEL_FORMAT_MAX. Nothing else 479 // Verify no camera returned for PIXEL_FORMAT_MAX. Nothing else
480 // to test here 480 // to test here
481 // since we cannot forecast the hardware capabilities. 481 // since we cannot forecast the hardware capabilities.
482 ASSERT_FALSE(name); 482 ASSERT_FALSE(name);
483 } 483 }
484 484
485 }; // namespace media 485 }; // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/video_capture_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698