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

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

Issue 2818513003: [Mojo Video Capture] Adapt video_capture service to refactored video capture stack (Closed)
Patch Set: Fix compile errors Created 3 years, 8 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/BUILD.gn ('k') | media/capture/video/shared_memory_buffer_handle.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/fake_video_capture_device.h" 5 #include "media/capture/video/fake_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 22 matching lines...) Expand all
33 namespace media { 33 namespace media {
34 34
35 namespace { 35 namespace {
36 36
37 class StubBufferHandle : public VideoCaptureBufferHandle { 37 class StubBufferHandle : public VideoCaptureBufferHandle {
38 public: 38 public:
39 StubBufferHandle(size_t mapped_size, uint8_t* data) 39 StubBufferHandle(size_t mapped_size, uint8_t* data)
40 : mapped_size_(mapped_size), data_(data) {} 40 : mapped_size_(mapped_size), data_(data) {}
41 41
42 size_t mapped_size() const override { return mapped_size_; } 42 size_t mapped_size() const override { return mapped_size_; }
43 uint8_t* data() override { return data_; } 43 uint8_t* data() const override { return data_; }
44 const uint8_t* data() const override { return data_; } 44 const uint8_t* const_data() const override { return data_; }
45 45
46 private: 46 private:
47 const size_t mapped_size_; 47 const size_t mapped_size_;
48 uint8_t* const data_; 48 uint8_t* const data_;
49 }; 49 };
50 50
51 class StubBufferHandleProvider 51 class StubBufferHandleProvider
52 : public VideoCaptureDevice::Client::Buffer::HandleProvider { 52 : public VideoCaptureDevice::Client::Buffer::HandleProvider {
53 public: 53 public:
54 StubBufferHandleProvider(size_t mapped_size, uint8_t* data) 54 StubBufferHandleProvider(size_t mapped_size, uint8_t* data)
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 4u, 610 4u,
611 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16, 611 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16,
612 PIXEL_FORMAT_MJPEG, PIXEL_FORMAT_I420}}, 612 PIXEL_FORMAT_MJPEG, PIXEL_FORMAT_I420}},
613 CommandLineTestData{"device-count=4,ownership=client", 613 CommandLineTestData{"device-count=4,ownership=client",
614 20, 614 20,
615 4u, 615 4u,
616 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16, 616 {PIXEL_FORMAT_I420, PIXEL_FORMAT_Y16,
617 PIXEL_FORMAT_MJPEG, PIXEL_FORMAT_I420}}, 617 PIXEL_FORMAT_MJPEG, PIXEL_FORMAT_I420}},
618 CommandLineTestData{"device-count=0", 20, 0u, {PIXEL_FORMAT_I420}})); 618 CommandLineTestData{"device-count=0", 20, 0u, {PIXEL_FORMAT_I420}}));
619 }; // namespace media 619 }; // namespace media
OLDNEW
« no previous file with comments | « media/capture/BUILD.gn ('k') | media/capture/video/shared_memory_buffer_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698