| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 base::Closure()); | 140 base::Closure()); |
| 141 } | 141 } |
| 142 | 142 |
| 143 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( | 143 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( |
| 144 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, | 144 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, |
| 145 scoped_ptr<gpu::MailboxHolder> holder, | 145 scoped_ptr<gpu::MailboxHolder> holder, |
| 146 const media::VideoFrame::ReleaseMailboxCB& release_cb, | 146 const media::VideoFrame::ReleaseMailboxCB& release_cb, |
| 147 gfx::Size dimensions) { | 147 gfx::Size dimensions) { |
| 148 return media::VideoFrame::WrapNativeTexture( | 148 return media::VideoFrame::WrapNativeTexture( |
| 149 holder.Pass(), release_cb, dimensions, gfx::Rect(dimensions), | 149 holder.Pass(), release_cb, dimensions, gfx::Rect(dimensions), |
| 150 dimensions, base::TimeDelta(), media::VideoFrame::ReadPixelsCB(), | 150 dimensions, base::TimeDelta(), false); |
| 151 false); | |
| 152 } | 151 } |
| 153 | 152 |
| 154 TestBrowserThreadBundle bundle_; | 153 TestBrowserThreadBundle bundle_; |
| 155 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_; | 154 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_; |
| 156 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_; | 155 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_; |
| 157 scoped_ptr<VideoCaptureController> controller_; | 156 scoped_ptr<VideoCaptureController> controller_; |
| 158 scoped_ptr<media::VideoCaptureDevice::Client> device_; | 157 scoped_ptr<media::VideoCaptureDevice::Client> device_; |
| 159 | 158 |
| 160 private: | 159 private: |
| 161 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest); | 160 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest); |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 device_->OnIncomingCapturedData( | 658 device_->OnIncomingCapturedData( |
| 660 static_cast<unsigned char*>(buffer.get()->data()), | 659 static_cast<unsigned char*>(buffer.get()->data()), |
| 661 buffer.get()->size(), | 660 buffer.get()->size(), |
| 662 params.requested_format, | 661 params.requested_format, |
| 663 0, | 662 0, |
| 664 base::TimeTicks()); | 663 base::TimeTicks()); |
| 665 } | 664 } |
| 666 } | 665 } |
| 667 | 666 |
| 668 } // namespace content | 667 } // namespace content |
| OLD | NEW |