OLD | NEW |
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 "media/capture/video/video_capture_device.h" | 5 #include "media/capture/video/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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 DoReserveOutputBuffer(); | 128 DoReserveOutputBuffer(); |
129 NOTREACHED() << "This should never be called"; | 129 NOTREACHED() << "This should never be called"; |
130 return std::unique_ptr<Buffer>(); | 130 return std::unique_ptr<Buffer>(); |
131 } | 131 } |
132 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, | 132 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, |
133 const VideoCaptureFormat& format, | 133 const VideoCaptureFormat& format, |
134 base::TimeTicks reference_time, | 134 base::TimeTicks reference_time, |
135 base::TimeDelta timestamp) override { | 135 base::TimeDelta timestamp) override { |
136 DoOnIncomingCapturedBuffer(); | 136 DoOnIncomingCapturedBuffer(); |
137 } | 137 } |
138 void OnIncomingCapturedBufferExt( | 138 void OnIncomingCapturedVideoFrame(std::unique_ptr<Buffer> buffer, |
139 std::unique_ptr<Buffer> buffer, | 139 scoped_refptr<VideoFrame> frame) override { |
140 const VideoCaptureFormat& format, | |
141 base::TimeTicks reference_time, | |
142 base::TimeDelta timestamp, | |
143 gfx::Rect visible_rect, | |
144 const VideoFrameMetadata& additional_metadata) override { | |
145 DoOnIncomingCapturedVideoFrame(); | 140 DoOnIncomingCapturedVideoFrame(); |
146 } | 141 } |
147 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( | 142 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( |
148 const gfx::Size& dimensions, | 143 const gfx::Size& dimensions, |
149 media::VideoPixelFormat format, | 144 media::VideoPixelFormat format, |
150 media::VideoPixelStorage storage, | 145 media::VideoPixelStorage storage, |
151 int frame_feedback_id) { | 146 int frame_feedback_id) { |
152 DoResurrectLastOutputBuffer(); | 147 DoResurrectLastOutputBuffer(); |
153 NOTREACHED() << "This should never be called"; | 148 NOTREACHED() << "This should never be called"; |
154 return std::unique_ptr<Buffer>(); | 149 return std::unique_ptr<Buffer>(); |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 | 627 |
633 device->GetPhotoCapabilities(std::move(scoped_get_callback)); | 628 device->GetPhotoCapabilities(std::move(scoped_get_callback)); |
634 run_loop.Run(); | 629 run_loop.Run(); |
635 | 630 |
636 ASSERT_TRUE(image_capture_client_->capabilities()); | 631 ASSERT_TRUE(image_capture_client_->capabilities()); |
637 | 632 |
638 device->StopAndDeAllocate(); | 633 device->StopAndDeAllocate(); |
639 } | 634 } |
640 | 635 |
641 }; // namespace media | 636 }; // namespace media |
OLD | NEW |