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

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

Issue 967793002: Linux Video Capture: Add V4L2VideoCaptureDelegate{Single,Multi}Plane. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: magjed@ comments Created 5 years, 9 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 "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/base/video_capture_types.h" 10 #include "media/base/video_capture_types.h"
(...skipping 23 matching lines...) Expand all
34 const int kFrameRate = 30; 34 const int kFrameRate = 30;
35 35
36 class MockDeviceClient : public media::VideoCaptureDevice::Client { 36 class MockDeviceClient : public media::VideoCaptureDevice::Client {
37 public: 37 public:
38 MOCK_METHOD5(OnIncomingCapturedData, 38 MOCK_METHOD5(OnIncomingCapturedData,
39 void(const uint8* data, 39 void(const uint8* data,
40 int length, 40 int length,
41 const media::VideoCaptureFormat& frame_format, 41 const media::VideoCaptureFormat& frame_format,
42 int rotation, 42 int rotation,
43 const base::TimeTicks& timestamp)); 43 const base::TimeTicks& timestamp));
44 MOCK_METHOD9(OnIncomingCapturedYuvData,
45 void (const uint8* y_data,
46 const uint8* u_data,
47 const uint8* v_data,
48 size_t y_stride,
49 size_t u_stride,
50 size_t v_stride,
51 const media::VideoCaptureFormat& frame_format,
52 int clockwise_rotation,
53 const base::TimeTicks& timestamp));
44 MOCK_METHOD2(ReserveOutputBuffer, 54 MOCK_METHOD2(ReserveOutputBuffer,
45 scoped_refptr<Buffer>(media::VideoFrame::Format format, 55 scoped_refptr<Buffer>(media::VideoFrame::Format format,
46 const gfx::Size& dimensions)); 56 const gfx::Size& dimensions));
47 MOCK_METHOD3(OnIncomingCapturedVideoFrame, 57 MOCK_METHOD3(OnIncomingCapturedVideoFrame,
48 void(const scoped_refptr<Buffer>& buffer, 58 void(const scoped_refptr<Buffer>& buffer,
49 const scoped_refptr<media::VideoFrame>& frame, 59 const scoped_refptr<media::VideoFrame>& frame,
50 const base::TimeTicks& timestamp)); 60 const base::TimeTicks& timestamp));
51 MOCK_METHOD1(OnError, void(const std::string& reason)); 61 MOCK_METHOD1(OnError, void(const std::string& reason));
52 }; 62 };
53 63
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 media::VideoCaptureParams capture_params; 123 media::VideoCaptureParams capture_params;
114 capture_params.requested_format.frame_size.SetSize(640, 480); 124 capture_params.requested_format.frame_size.SetSize(640, 480);
115 capture_params.requested_format.frame_rate = kFrameRate; 125 capture_params.requested_format.frame_rate = kFrameRate;
116 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 126 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
117 capture_device->AllocateAndStart(capture_params, client.Pass()); 127 capture_device->AllocateAndStart(capture_params, client.Pass());
118 capture_device->StopAndDeAllocate(); 128 capture_device->StopAndDeAllocate();
119 } 129 }
120 130
121 } // namespace 131 } // namespace
122 } // namespace content 132 } // 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