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

Side by Side Diff: media/video/capture/fake_video_capture_device.cc

Issue 101843005: Convert video capture pipline to base::TimeTicks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 9890509b Rebase, Windows compile fixes 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 "media/video/capture/fake_video_capture_device.h" 5 #include "media/video/capture/fake_video_capture_device.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Generate a synchronized beep sound if there is one audio input 209 // Generate a synchronized beep sound if there is one audio input
210 // stream created. 210 // stream created.
211 FakeAudioInputStream::BeepOnce(); 211 FakeAudioInputStream::BeepOnce();
212 } 212 }
213 213
214 frame_count_++; 214 frame_count_++;
215 215
216 // Give the captured frame to the client. 216 // Give the captured frame to the client.
217 client_->OnIncomingCapturedFrame(fake_frame_.get(), 217 client_->OnIncomingCapturedFrame(fake_frame_.get(),
218 frame_size, 218 frame_size,
219 base::Time::Now(), 219 base::TimeTicks::Now(),
220 0, 220 0,
221 capture_format_); 221 capture_format_);
222 if (!(frame_count_ % kFakeCaptureCapabilityChangePeriod) && 222 if (!(frame_count_ % kFakeCaptureCapabilityChangePeriod) &&
223 format_roster_.size() > 0U) { 223 format_roster_.size() > 0U) {
224 Reallocate(); 224 Reallocate();
225 } 225 }
226 // Reschedule next CaptureTask. 226 // Reschedule next CaptureTask.
227 capture_thread_.message_loop()->PostDelayedTask( 227 capture_thread_.message_loop()->PostDelayedTask(
228 FROM_HERE, 228 FROM_HERE,
229 base::Bind(&FakeVideoCaptureDevice::OnCaptureTask, 229 base::Bind(&FakeVideoCaptureDevice::OnCaptureTask,
(...skipping 20 matching lines...) Expand all
250 media::VideoCaptureFormat(gfx::Size(320, 240), 30, PIXEL_FORMAT_I420)); 250 media::VideoCaptureFormat(gfx::Size(320, 240), 30, PIXEL_FORMAT_I420));
251 format_roster_.push_back( 251 format_roster_.push_back(
252 media::VideoCaptureFormat(gfx::Size(640, 480), 30, PIXEL_FORMAT_I420)); 252 media::VideoCaptureFormat(gfx::Size(640, 480), 30, PIXEL_FORMAT_I420));
253 format_roster_.push_back( 253 format_roster_.push_back(
254 media::VideoCaptureFormat(gfx::Size(800, 600), 30, PIXEL_FORMAT_I420)); 254 media::VideoCaptureFormat(gfx::Size(800, 600), 30, PIXEL_FORMAT_I420));
255 255
256 format_roster_index_ = 0; 256 format_roster_index_ = 0;
257 } 257 }
258 258
259 } // namespace media 259 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/android/video_capture_device_android.cc ('k') | media/video/capture/file_video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698