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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_aura_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 | « no previous file | content/browser/media/capture/desktop_capture_device_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/media/capture/desktop_capture_device_aura.h" 5 #include "content/browser/media/capture/desktop_capture_device_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return std::unique_ptr<Buffer>(); 67 return std::unique_ptr<Buffer>();
68 } 68 }
69 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 69 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
70 const media::VideoCaptureFormat& frame_format, 70 const media::VideoCaptureFormat& frame_format,
71 base::TimeTicks reference_time, 71 base::TimeTicks reference_time,
72 base::TimeDelta timestamp) override { 72 base::TimeDelta timestamp) override {
73 DoOnIncomingCapturedBuffer(); 73 DoOnIncomingCapturedBuffer();
74 } 74 }
75 void OnIncomingCapturedVideoFrame( 75 void OnIncomingCapturedVideoFrame(
76 std::unique_ptr<Buffer> buffer, 76 std::unique_ptr<Buffer> buffer,
77 const scoped_refptr<media::VideoFrame>& frame, 77 const scoped_refptr<media::VideoFrame>& frame) override {
78 base::TimeTicks reference_time) override {
79 DoOnIncomingCapturedVideoFrame(); 78 DoOnIncomingCapturedVideoFrame();
80 } 79 }
81 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 80 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
82 const gfx::Size& dimensions, 81 const gfx::Size& dimensions,
83 media::VideoPixelFormat format, 82 media::VideoPixelFormat format,
84 media::VideoPixelStorage storage) override { 83 media::VideoPixelStorage storage) override {
85 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); 84 EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
86 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 85 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
87 DoResurrectLastOutputBuffer(); 86 DoResurrectLastOutputBuffer();
88 return std::unique_ptr<Buffer>(); 87 return std::unique_ptr<Buffer>();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 media::VideoCaptureParams capture_params; 153 media::VideoCaptureParams capture_params;
155 capture_params.requested_format.frame_size.SetSize(640, 480); 154 capture_params.requested_format.frame_size.SetSize(640, 480);
156 capture_params.requested_format.frame_rate = kFrameRate; 155 capture_params.requested_format.frame_rate = kFrameRate;
157 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 156 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
158 capture_device->AllocateAndStart(capture_params, std::move(client)); 157 capture_device->AllocateAndStart(capture_params, std::move(client));
159 capture_device->StopAndDeAllocate(); 158 capture_device->StopAndDeAllocate();
160 } 159 }
161 160
162 } // namespace 161 } // namespace
163 } // namespace content 162 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/capture/desktop_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698