| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/video_capture/video_capture_service.h" | 5 #include "services/video_capture/video_capture_service.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "media/capture/video/fake_video_capture_device_factory.h" | 8 #include "media/capture/video/fake_video_capture_device_factory.h" |
| 9 #include "media/capture/video/video_capture_buffer_pool.h" | 9 #include "media/capture/video/video_capture_buffer_pool.h" |
| 10 #include "media/capture/video/video_capture_buffer_tracker.h" | 10 #include "media/capture/video/video_capture_buffer_tracker.h" |
| 11 #include "media/capture/video/video_capture_jpeg_decoder.h" | 11 #include "media/capture/video/video_capture_jpeg_decoder.h" |
| 12 #include "services/service_manager/public/cpp/interface_registry.h" | 12 #include "services/service_manager/public/cpp/interface_registry.h" |
| 13 #include "services/video_capture/device_factory_media_to_mojo_adapter.h" | 13 #include "services/video_capture/device_factory_media_to_mojo_adapter.h" |
| 14 #include "services/video_capture/mock_device_factory.h" | 14 #include "services/video_capture/mock_device_factory.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 |
| 17 // TODO(chfremer): Replace with an actual decoder factory. | 18 // TODO(chfremer): Replace with an actual decoder factory. |
| 18 // https://crbug.com/584797 | 19 // https://crbug.com/584797 |
| 19 std::unique_ptr<media::VideoCaptureJpegDecoder> CreateJpegDecoder() { | 20 std::unique_ptr<media::VideoCaptureJpegDecoder> CreateJpegDecoder() { |
| 20 return nullptr; | 21 return nullptr; |
| 21 } | 22 } |
| 22 | 23 |
| 23 } // anonymous namespace | 24 } // anonymous namespace |
| 24 | 25 |
| 25 namespace video_capture { | 26 namespace video_capture { |
| 26 | 27 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // We keep a pointer to the MockDeviceFactory as a member so that we can | 102 // We keep a pointer to the MockDeviceFactory as a member so that we can |
| 102 // invoke its AddMockDevice(). Ownership of the MockDeviceFactory is moved | 103 // invoke its AddMockDevice(). Ownership of the MockDeviceFactory is moved |
| 103 // to the DeviceFactoryMediaToMojoAdapter. | 104 // to the DeviceFactoryMediaToMojoAdapter. |
| 104 mock_device_factory_ = mock_device_factory.get(); | 105 mock_device_factory_ = mock_device_factory.get(); |
| 105 mock_device_factory_adapter_ = | 106 mock_device_factory_adapter_ = |
| 106 base::MakeUnique<DeviceFactoryMediaToMojoAdapter>( | 107 base::MakeUnique<DeviceFactoryMediaToMojoAdapter>( |
| 107 std::move(mock_device_factory), base::Bind(&CreateJpegDecoder)); | 108 std::move(mock_device_factory), base::Bind(&CreateJpegDecoder)); |
| 108 } | 109 } |
| 109 | 110 |
| 110 } // namespace video_capture | 111 } // namespace video_capture |
| OLD | NEW |