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

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

Issue 83793004: Implement IPCs and VideoCapture::Client interfaces for texture capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: e296ac98 Win32 bits. Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/file_video_capture_device.h" 5 #include "media/video/capture/file_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/command_line.h" 10 #include "base/command_line.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 current_byte_index_ = first_frame_byte_index_; 266 current_byte_index_ = first_frame_byte_index_;
267 CHECK_EQ(file_.Read(current_byte_index_, 267 CHECK_EQ(file_.Read(current_byte_index_,
268 reinterpret_cast<char*>(video_frame_.get()), 268 reinterpret_cast<char*>(video_frame_.get()),
269 frame_size_), 269 frame_size_),
270 frame_size_); 270 frame_size_);
271 } else { 271 } else {
272 current_byte_index_ += frame_size_ + kY4MSimpleFrameDelimiterSize; 272 current_byte_index_ += frame_size_ + kY4MSimpleFrameDelimiterSize;
273 } 273 }
274 274
275 // Give the captured frame to the client. 275 // Give the captured frame to the client.
276 client_->OnIncomingCapturedFrame(video_frame_.get(), 276 client_->OnIncomingCapturedData(video_frame_.get(),
277 frame_size_, 277 frame_size_,
278 base::TimeTicks::Now(), 278 capture_format_,
279 0, 279 0,
280 capture_format_); 280 base::TimeTicks::Now());
281 // Reschedule next CaptureTask. 281 // Reschedule next CaptureTask.
282 base::MessageLoop::current()->PostDelayedTask( 282 base::MessageLoop::current()->PostDelayedTask(
283 FROM_HERE, 283 FROM_HERE,
284 base::Bind(&FileVideoCaptureDevice::OnCaptureTask, 284 base::Bind(&FileVideoCaptureDevice::OnCaptureTask,
285 base::Unretained(this)), 285 base::Unretained(this)),
286 base::TimeDelta::FromSeconds(1) / capture_format_.frame_rate); 286 base::TimeDelta::FromSeconds(1) / capture_format_.frame_rate);
287 } 287 }
288 288
289 } // namespace media 289 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/fake_video_capture_device.cc ('k') | media/video/capture/linux/video_capture_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698