Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1948)

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller_unittest.cc

Issue 806413004: Plumb allow_overlay flag for video path into cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed v4l2 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 base::TimeDelta(), 138 base::TimeDelta(),
139 base::Closure()); 139 base::Closure());
140 } 140 }
141 141
142 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( 142 scoped_refptr<media::VideoFrame> WrapMailboxBuffer(
143 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, 143 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer,
144 scoped_ptr<gpu::MailboxHolder> holder, 144 scoped_ptr<gpu::MailboxHolder> holder,
145 const media::VideoFrame::ReleaseMailboxCB& release_cb, 145 const media::VideoFrame::ReleaseMailboxCB& release_cb,
146 gfx::Size dimensions) { 146 gfx::Size dimensions) {
147 return media::VideoFrame::WrapNativeTexture( 147 return media::VideoFrame::WrapNativeTexture(
148 holder.Pass(), 148 holder.Pass(), release_cb, dimensions, gfx::Rect(dimensions),
149 release_cb, 149 dimensions, base::TimeDelta(), media::VideoFrame::ReadPixelsCB(),
150 dimensions, 150 false);
151 gfx::Rect(dimensions),
152 dimensions,
153 base::TimeDelta(),
154 media::VideoFrame::ReadPixelsCB());
155 } 151 }
156 152
157 TestBrowserThreadBundle bundle_; 153 TestBrowserThreadBundle bundle_;
158 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_; 154 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_;
159 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_; 155 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_;
160 scoped_ptr<VideoCaptureController> controller_; 156 scoped_ptr<VideoCaptureController> controller_;
161 scoped_ptr<media::VideoCaptureDevice::Client> device_; 157 scoped_ptr<media::VideoCaptureDevice::Client> device_;
162 158
163 private: 159 private:
164 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest); 160 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest);
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 device_->OnIncomingCapturedData( 658 device_->OnIncomingCapturedData(
663 static_cast<unsigned char*>(buffer.get()->data()), 659 static_cast<unsigned char*>(buffer.get()->data()),
664 buffer.get()->size(), 660 buffer.get()->size(),
665 params.requested_format, 661 params.requested_format,
666 0, 662 0,
667 base::TimeTicks()); 663 base::TimeTicks());
668 } 664 }
669 } 665 }
670 666
671 } // namespace content 667 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698