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

Side by Side Diff: content/renderer/media/video_capture_message_filter_unittest.cc

Issue 2398463003: 16 bit capture and GPU&CPU memory buffer support.
Patch Set: fixes. Created 4 years, 2 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 | « content/renderer/media/video_capture_message_filter.cc ('k') | media/base/video_frame.h » ('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 (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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/process/process_handle.h" 8 #include "base/process/process_handle.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/common/media/video_capture_messages.h" 10 #include "content/common/media/video_capture_messages.h"
(...skipping 18 matching lines...) Expand all
29 29
30 class MockVideoCaptureDelegate : public VideoCaptureMessageFilter::Delegate { 30 class MockVideoCaptureDelegate : public VideoCaptureMessageFilter::Delegate {
31 public: 31 public:
32 MockVideoCaptureDelegate() : device_id_(0) {} 32 MockVideoCaptureDelegate() : device_id_(0) {}
33 33
34 // VideoCaptureMessageFilter::Delegate implementation. 34 // VideoCaptureMessageFilter::Delegate implementation.
35 MOCK_METHOD3(OnBufferCreated, 35 MOCK_METHOD3(OnBufferCreated,
36 void(base::SharedMemoryHandle handle, 36 void(base::SharedMemoryHandle handle,
37 int length, 37 int length,
38 int buffer_id)); 38 int buffer_id));
39 MOCK_METHOD3(OnBufferCreated2, 39 MOCK_METHOD4(OnBufferCreated2,
40 void(const std::vector<gfx::GpuMemoryBufferHandle>& handles, 40 void(const std::vector<gfx::GpuMemoryBufferHandle>& handles,
41 const gfx::Size& size, 41 const gfx::Size& size,
42 media::VideoPixelFormat format,
42 int buffer_id)); 43 int buffer_id));
43 MOCK_METHOD1(OnBufferDestroyed, void(int buffer_id)); 44 MOCK_METHOD1(OnBufferDestroyed, void(int buffer_id));
44 MOCK_METHOD7(OnBufferReceived, 45 MOCK_METHOD7(OnBufferReceived,
45 void(int buffer_id, 46 void(int buffer_id,
46 base::TimeDelta timestamp, 47 base::TimeDelta timestamp,
47 const base::DictionaryValue& metadata, 48 const base::DictionaryValue& metadata,
48 media::VideoPixelFormat pixel_format, 49 media::VideoPixelFormat pixel_format,
49 media::VideoFrame::StorageType storage_type, 50 media::VideoFrame::StorageType storage_type,
50 const gfx::Size& coded_size, 51 const gfx::Size& coded_size,
51 const gfx::Rect& visible_rect)); 52 const gfx::Rect& visible_rect));
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 MockVideoCaptureDelegate delegate; 215 MockVideoCaptureDelegate delegate;
215 filter->AddDelegate(&delegate); 216 filter->AddDelegate(&delegate);
216 ASSERT_EQ(1, delegate.device_id()); 217 ASSERT_EQ(1, delegate.device_id());
217 218
218 EXPECT_CALL(delegate, OnDeviceFormatsInUseReceived(_)); 219 EXPECT_CALL(delegate, OnDeviceFormatsInUseReceived(_));
219 media::VideoCaptureFormats formats_in_use; 220 media::VideoCaptureFormats formats_in_use;
220 filter->OnMessageReceived(VideoCaptureMsg_DeviceFormatsInUseReceived( 221 filter->OnMessageReceived(VideoCaptureMsg_DeviceFormatsInUseReceived(
221 delegate.device_id(), formats_in_use)); 222 delegate.device_id(), formats_in_use));
222 } 223 }
223 } // namespace content 224 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_message_filter.cc ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698