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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 device_->OnIncomingCapturedData( | 659 device_->OnIncomingCapturedData( |
659 static_cast<unsigned char*>(buffer.get()->data()), | 660 static_cast<unsigned char*>(buffer.get()->data()), |
660 buffer.get()->size(), | 661 buffer.get()->size(), |
661 params.requested_format, | 662 params.requested_format, |
662 0, | 663 0, |
663 base::TimeTicks()); | 664 base::TimeTicks()); |
664 } | 665 } |
665 } | 666 } |
666 | 667 |
667 } // namespace content | 668 } // namespace content |
OLD | NEW |