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

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

Issue 101843005: Convert video capture pipline to base::TimeTicks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 9890509b Rebase, Windows compile fixes Created 6 years, 11 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 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/renderer_host/media/desktop_capture_device_aura.h" 5 #include "content/browser/renderer_host/media/desktop_capture_device_aura.h"
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "content/browser/browser_thread_impl.h" 8 #include "content/browser/browser_thread_impl.h"
9 #include "content/public/browser/desktop_media_id.h" 9 #include "content/public/browser/desktop_media_id.h"
10 #include "media/video/capture/video_capture_types.h" 10 #include "media/video/capture/video_capture_types.h"
(...skipping 18 matching lines...) Expand all
29 29
30 class MockDeviceClient : public media::VideoCaptureDevice::Client { 30 class MockDeviceClient : public media::VideoCaptureDevice::Client {
31 public: 31 public:
32 MOCK_METHOD2(ReserveOutputBuffer, 32 MOCK_METHOD2(ReserveOutputBuffer,
33 scoped_refptr<Buffer>(media::VideoFrame::Format format, 33 scoped_refptr<Buffer>(media::VideoFrame::Format format,
34 const gfx::Size& dimensions)); 34 const gfx::Size& dimensions));
35 MOCK_METHOD0(OnError, void()); 35 MOCK_METHOD0(OnError, void());
36 MOCK_METHOD5(OnIncomingCapturedFrame, 36 MOCK_METHOD5(OnIncomingCapturedFrame,
37 void(const uint8* data, 37 void(const uint8* data,
38 int length, 38 int length,
39 base::Time timestamp, 39 base::TimeTicks timestamp,
40 int rotation, 40 int rotation,
41 const media::VideoCaptureFormat& frame_format)); 41 const media::VideoCaptureFormat& frame_format));
42 MOCK_METHOD5(OnIncomingCapturedBuffer, 42 MOCK_METHOD5(OnIncomingCapturedBuffer,
43 void(const scoped_refptr<Buffer>& buffer, 43 void(const scoped_refptr<Buffer>& buffer,
44 media::VideoFrame::Format format, 44 media::VideoFrame::Format format,
45 const gfx::Size& dimensions, 45 const gfx::Size& dimensions,
46 base::Time timestamp, 46 base::TimeTicks timestamp,
47 int frame_rate)); 47 int frame_rate));
48 }; 48 };
49 49
50 // Test harness that sets up a minimal environment with necessary stubs. 50 // Test harness that sets up a minimal environment with necessary stubs.
51 class DesktopCaptureDeviceAuraTest : public testing::Test { 51 class DesktopCaptureDeviceAuraTest : public testing::Test {
52 public: 52 public:
53 DesktopCaptureDeviceAuraTest() 53 DesktopCaptureDeviceAuraTest()
54 : browser_thread_for_ui_(BrowserThread::UI, &message_loop_) {} 54 : browser_thread_for_ui_(BrowserThread::UI, &message_loop_) {}
55 virtual ~DesktopCaptureDeviceAuraTest() {} 55 virtual ~DesktopCaptureDeviceAuraTest() {}
56 56
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 capture_params.requested_format.frame_rate = kFrameRate; 105 capture_params.requested_format.frame_rate = kFrameRate;
106 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 106 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
107 capture_params.allow_resolution_change = false; 107 capture_params.allow_resolution_change = false;
108 capture_device->AllocateAndStart( 108 capture_device->AllocateAndStart(
109 capture_params, client.PassAs<media::VideoCaptureDevice::Client>()); 109 capture_params, client.PassAs<media::VideoCaptureDevice::Client>());
110 capture_device->StopAndDeAllocate(); 110 capture_device->StopAndDeAllocate();
111 } 111 }
112 112
113 } // namespace 113 } // namespace
114 } // namespace content 114 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698