OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/media/capture/desktop_capture_device_aura.h" | 5 #include "content/browser/media/capture/desktop_capture_device_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); | 66 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); |
67 DoReserveOutputBuffer(); | 67 DoReserveOutputBuffer(); |
68 return std::unique_ptr<Buffer>(); | 68 return std::unique_ptr<Buffer>(); |
69 } | 69 } |
70 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, | 70 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, |
71 const media::VideoCaptureFormat& frame_format, | 71 const media::VideoCaptureFormat& frame_format, |
72 base::TimeTicks reference_time, | 72 base::TimeTicks reference_time, |
73 base::TimeDelta timestamp) override { | 73 base::TimeDelta timestamp) override { |
74 DoOnIncomingCapturedBuffer(); | 74 DoOnIncomingCapturedBuffer(); |
75 } | 75 } |
76 void OnIncomingCapturedVideoFrame( | 76 void OnIncomingCapturedBufferExt( |
77 std::unique_ptr<Buffer> buffer, | 77 std::unique_ptr<Buffer> buffer, |
78 scoped_refptr<media::VideoFrame> frame) override { | 78 const media::VideoCaptureFormat& format, |
| 79 base::TimeTicks reference_time, |
| 80 base::TimeDelta timestamp, |
| 81 gfx::Rect visible_rect, |
| 82 const media::VideoFrameMetadata& additional_metadata) override { |
79 DoOnIncomingCapturedVideoFrame(); | 83 DoOnIncomingCapturedVideoFrame(); |
80 } | 84 } |
81 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( | 85 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( |
82 const gfx::Size& dimensions, | 86 const gfx::Size& dimensions, |
83 media::VideoPixelFormat format, | 87 media::VideoPixelFormat format, |
84 media::VideoPixelStorage storage, | 88 media::VideoPixelStorage storage, |
85 int frame_feedback_id) override { | 89 int frame_feedback_id) override { |
86 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); | 90 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); |
87 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); | 91 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); |
88 DoResurrectLastOutputBuffer(); | 92 DoResurrectLastOutputBuffer(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 media::VideoCaptureParams capture_params; | 158 media::VideoCaptureParams capture_params; |
155 capture_params.requested_format.frame_size.SetSize(640, 480); | 159 capture_params.requested_format.frame_size.SetSize(640, 480); |
156 capture_params.requested_format.frame_rate = kFrameRate; | 160 capture_params.requested_format.frame_rate = kFrameRate; |
157 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; | 161 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; |
158 capture_device->AllocateAndStart(capture_params, std::move(client)); | 162 capture_device->AllocateAndStart(capture_params, std::move(client)); |
159 capture_device->StopAndDeAllocate(); | 163 capture_device->StopAndDeAllocate(); |
160 } | 164 } |
161 | 165 |
162 } // namespace | 166 } // namespace |
163 } // namespace content | 167 } // namespace content |
OLD | NEW |