| 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 // Unit test for VideoCaptureController. | 5 // Unit test for VideoCaptureController. |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, | 128 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, |
| 129 gfx::Size dimensions) { | 129 gfx::Size dimensions) { |
| 130 return media::VideoFrame::WrapExternalPackedMemory( | 130 return media::VideoFrame::WrapExternalPackedMemory( |
| 131 media::VideoFrame::I420, | 131 media::VideoFrame::I420, |
| 132 dimensions, | 132 dimensions, |
| 133 gfx::Rect(dimensions), | 133 gfx::Rect(dimensions), |
| 134 dimensions, | 134 dimensions, |
| 135 reinterpret_cast<uint8*>(buffer->data()), | 135 reinterpret_cast<uint8*>(buffer->data()), |
| 136 media::VideoFrame::AllocationSize(media::VideoFrame::I420, dimensions), | 136 media::VideoFrame::AllocationSize(media::VideoFrame::I420, dimensions), |
| 137 base::SharedMemory::NULLHandle(), | 137 base::SharedMemory::NULLHandle(), |
| 138 0, |
| 138 base::TimeDelta(), | 139 base::TimeDelta(), |
| 139 base::Closure()); | 140 base::Closure()); |
| 140 } | 141 } |
| 141 | 142 |
| 142 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( | 143 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( |
| 143 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, | 144 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, |
| 144 scoped_ptr<gpu::MailboxHolder> holder, | 145 scoped_ptr<gpu::MailboxHolder> holder, |
| 145 const media::VideoFrame::ReleaseMailboxCB& release_cb, | 146 const media::VideoFrame::ReleaseMailboxCB& release_cb, |
| 146 gfx::Size dimensions) { | 147 gfx::Size dimensions) { |
| 147 return media::VideoFrame::WrapNativeTexture( | 148 return media::VideoFrame::WrapNativeTexture( |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 device_->OnIncomingCapturedData( | 663 device_->OnIncomingCapturedData( |
| 663 static_cast<unsigned char*>(buffer.get()->data()), | 664 static_cast<unsigned char*>(buffer.get()->data()), |
| 664 buffer.get()->size(), | 665 buffer.get()->size(), |
| 665 params.requested_format, | 666 params.requested_format, |
| 666 0, | 667 0, |
| 667 base::TimeTicks()); | 668 base::TimeTicks()); |
| 668 } | 669 } |
| 669 } | 670 } |
| 670 | 671 |
| 671 } // namespace content | 672 } // namespace content |
| OLD | NEW |