| 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 <sys/fcntl.h> | 5 #include <sys/fcntl.h> |
| 6 #include <sys/ioctl.h> | 6 #include <sys/ioctl.h> |
| 7 | 7 |
| 8 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 media::VideoPixelFormat, | 163 media::VideoPixelFormat, |
| 164 media::VideoPixelStorage, | 164 media::VideoPixelStorage, |
| 165 int)); | 165 int)); |
| 166 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, | 166 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, |
| 167 const VideoCaptureFormat& frame_format, | 167 const VideoCaptureFormat& frame_format, |
| 168 base::TimeTicks reference_time, | 168 base::TimeTicks reference_time, |
| 169 base::TimeDelta timestamp) override { | 169 base::TimeDelta timestamp) override { |
| 170 DoOnIncomingCapturedBuffer(); | 170 DoOnIncomingCapturedBuffer(); |
| 171 } | 171 } |
| 172 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); | 172 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); |
| 173 void OnIncomingCapturedBufferExt( | 173 void OnIncomingCapturedVideoFrame( |
| 174 std::unique_ptr<Buffer> buffer, | 174 std::unique_ptr<Buffer> buffer, |
| 175 const VideoCaptureFormat& format, | 175 scoped_refptr<media::VideoFrame> frame) override { |
| 176 base::TimeTicks reference_time, | |
| 177 base::TimeDelta timestamp, | |
| 178 gfx::Rect visible_rect, | |
| 179 const VideoFrameMetadata& additional_metadata) override { | |
| 180 DoOnIncomingCapturedVideoFrame(); | 176 DoOnIncomingCapturedVideoFrame(); |
| 181 } | 177 } |
| 182 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void)); | 178 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void)); |
| 183 MOCK_METHOD4(ResurrectLastOutputBuffer, | 179 MOCK_METHOD4(ResurrectLastOutputBuffer, |
| 184 std::unique_ptr<Buffer>(const gfx::Size&, | 180 std::unique_ptr<Buffer>(const gfx::Size&, |
| 185 VideoPixelFormat, | 181 VideoPixelFormat, |
| 186 VideoPixelStorage, | 182 VideoPixelStorage, |
| 187 int)); | 183 int)); |
| 188 MOCK_METHOD2(OnError, | 184 MOCK_METHOD2(OnError, |
| 189 void(const tracked_objects::Location& from_here, | 185 void(const tracked_objects::Location& from_here, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // their |default_value|s. | 248 // their |default_value|s. |
| 253 { | 249 { |
| 254 base::ScopedFD device_fd( | 250 base::ScopedFD device_fd( |
| 255 HANDLE_EINTR(open(device_descriptor_.device_id.c_str(), O_RDWR))); | 251 HANDLE_EINTR(open(device_descriptor_.device_id.c_str(), O_RDWR))); |
| 256 ASSERT_TRUE(device_fd.is_valid()); | 252 ASSERT_TRUE(device_fd.is_valid()); |
| 257 VerifyUserControlsAreSetToDefaultValues(device_fd.get()); | 253 VerifyUserControlsAreSetToDefaultValues(device_fd.get()); |
| 258 } | 254 } |
| 259 } | 255 } |
| 260 | 256 |
| 261 }; // namespace media | 257 }; // namespace media |
| OLD | NEW |