| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return std::unique_ptr<Buffer>(); | 67 return std::unique_ptr<Buffer>(); |
| 68 } | 68 } |
| 69 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, | 69 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, |
| 70 const media::VideoCaptureFormat& frame_format, | 70 const media::VideoCaptureFormat& frame_format, |
| 71 base::TimeTicks reference_time, | 71 base::TimeTicks reference_time, |
| 72 base::TimeDelta timestamp) override { | 72 base::TimeDelta timestamp) override { |
| 73 DoOnIncomingCapturedBuffer(); | 73 DoOnIncomingCapturedBuffer(); |
| 74 } | 74 } |
| 75 void OnIncomingCapturedVideoFrame( | 75 void OnIncomingCapturedVideoFrame( |
| 76 std::unique_ptr<Buffer> buffer, | 76 std::unique_ptr<Buffer> buffer, |
| 77 const scoped_refptr<media::VideoFrame>& frame, | 77 const scoped_refptr<media::VideoFrame>& frame) override { |
| 78 base::TimeTicks reference_time) override { | |
| 79 DoOnIncomingCapturedVideoFrame(); | 78 DoOnIncomingCapturedVideoFrame(); |
| 80 } | 79 } |
| 81 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( | 80 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( |
| 82 const gfx::Size& dimensions, | 81 const gfx::Size& dimensions, |
| 83 media::VideoPixelFormat format, | 82 media::VideoPixelFormat format, |
| 84 media::VideoPixelStorage storage) override { | 83 media::VideoPixelStorage storage) override { |
| 85 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); | 84 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); |
| 86 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); | 85 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); |
| 87 DoResurrectLastOutputBuffer(); | 86 DoResurrectLastOutputBuffer(); |
| 88 return std::unique_ptr<Buffer>(); | 87 return std::unique_ptr<Buffer>(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 media::VideoCaptureParams capture_params; | 153 media::VideoCaptureParams capture_params; |
| 155 capture_params.requested_format.frame_size.SetSize(640, 480); | 154 capture_params.requested_format.frame_size.SetSize(640, 480); |
| 156 capture_params.requested_format.frame_rate = kFrameRate; | 155 capture_params.requested_format.frame_rate = kFrameRate; |
| 157 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; | 156 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; |
| 158 capture_device->AllocateAndStart(capture_params, std::move(client)); | 157 capture_device->AllocateAndStart(capture_params, std::move(client)); |
| 159 capture_device->StopAndDeAllocate(); | 158 capture_device->StopAndDeAllocate(); |
| 160 } | 159 } |
| 161 | 160 |
| 162 } // namespace | 161 } // namespace |
| 163 } // namespace content | 162 } // namespace content |
| OLD | NEW |