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

Side by Side Diff: content/renderer/media/video_capture_impl_unittest.cc

Issue 83793004: Implement IPCs and VideoCapture::Client interfaces for texture capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5744a8bbb Nits. Created 6 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 | Annotate | Revision Log
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 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "content/child/child_process.h" 7 #include "content/child/child_process.h"
8 #include "content/common/media/video_capture_messages.h" 8 #include "content/common/media/video_capture_messages.h"
9 #include "content/renderer/media/video_capture_impl.h" 9 #include "content/renderer/media/video_capture_impl.h"
10 #include "media/base/bind_to_current_loop.h" 10 #include "media/base/bind_to_current_loop.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const media::VideoCaptureParams& params) { 65 const media::VideoCaptureParams& params) {
66 OnStateChanged(VIDEO_CAPTURE_STATE_STARTED); 66 OnStateChanged(VIDEO_CAPTURE_STATE_STARTED);
67 } 67 }
68 68
69 void DevicePauseCapture(int device_id) {} 69 void DevicePauseCapture(int device_id) {}
70 70
71 void DeviceStopCapture(int device_id) { 71 void DeviceStopCapture(int device_id) {
72 OnStateChanged(VIDEO_CAPTURE_STATE_STOPPED); 72 OnStateChanged(VIDEO_CAPTURE_STATE_STOPPED);
73 } 73 }
74 74
75 void DeviceReceiveEmptyBuffer(int device_id, int buffer_id) {} 75 void DeviceReceiveEmptyBuffer(int device_id,
76 int buffer_id,
77 uint32 sync_point) {}
76 }; 78 };
77 79
78 VideoCaptureImplTest() { 80 VideoCaptureImplTest() {
79 params_small_.requested_format = media::VideoCaptureFormat( 81 params_small_.requested_format = media::VideoCaptureFormat(
80 gfx::Size(176, 144), 30, media::PIXEL_FORMAT_I420); 82 gfx::Size(176, 144), 30, media::PIXEL_FORMAT_I420);
81 83
82 params_large_.requested_format = media::VideoCaptureFormat( 84 params_large_.requested_format = media::VideoCaptureFormat(
83 gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420); 85 gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420);
84 86
85 child_process_.reset(new ChildProcess()); 87 child_process_.reset(new ChildProcess());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 video_capture_impl_->StartCapture(client_small.get(), params_small_); 194 video_capture_impl_->StartCapture(client_small.get(), params_small_);
193 video_capture_impl_->StartCapture(client_large.get(), params_large_); 195 video_capture_impl_->StartCapture(client_large.get(), params_large_);
194 video_capture_impl_->StopCapture(client_small.get()); 196 video_capture_impl_->StopCapture(client_small.get());
195 video_capture_impl_->StopCapture(client_large.get()); 197 video_capture_impl_->StopCapture(client_large.get());
196 video_capture_impl_->DeInit( 198 video_capture_impl_->DeInit(
197 media::BindToCurrentLoop(run_loop_.QuitClosure())); 199 media::BindToCurrentLoop(run_loop_.QuitClosure()));
198 run_loop_.Run(); 200 run_loop_.Run();
199 } 201 }
200 202
201 } // namespace content 203 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698