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

Unified Diff: media/capture/video/fake_video_capture_device.cc

Issue 1685713003: Remove V4L2CaptureDelegate{Single,Multi}Plane, VCD::Client::OnIncomingCapturedYuvData() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perkj@ comments and reverted change to WeakPtr Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: media/capture/video/fake_video_capture_device.cc
diff --git a/media/capture/video/fake_video_capture_device.cc b/media/capture/video/fake_video_capture_device.cc
index f4ef6addb86006f14b242c63e4febe791ffca8a1..5b61f9c41e9f3dbab72848515132cae0275db97c 100644
--- a/media/capture/video/fake_video_capture_device.cc
+++ b/media/capture/video/fake_video_capture_device.cc
@@ -73,10 +73,8 @@ void DrawPacman(bool use_argb,
}
FakeVideoCaptureDevice::FakeVideoCaptureDevice(BufferOwnership buffer_ownership,
- BufferPlanarity planarity,
float fake_capture_rate)
: buffer_ownership_(buffer_ownership),
- planarity_(planarity),
fake_capture_rate_(fake_capture_rate),
weak_factory_(this) {}
@@ -105,15 +103,9 @@ void FakeVideoCaptureDevice::AllocateAndStart(
capture_format_.frame_size.SetSize(320, 240);
if (buffer_ownership_ == BufferOwnership::CLIENT_BUFFERS) {
- if (planarity_ == BufferPlanarity::PACKED) {
- capture_format_.pixel_storage = PIXEL_STORAGE_CPU;
- capture_format_.pixel_format = PIXEL_FORMAT_ARGB;
- DVLOG(1) << "starting with client argb buffers";
- } else if (planarity_ == BufferPlanarity::TRIPLANAR) {
- capture_format_.pixel_storage = PIXEL_STORAGE_GPUMEMORYBUFFER;
- capture_format_.pixel_format = PIXEL_FORMAT_I420;
- DVLOG(1) << "starting with gmb I420 buffers";
- }
+ capture_format_.pixel_storage = PIXEL_STORAGE_CPU;
+ capture_format_.pixel_format = PIXEL_FORMAT_ARGB;
+ DVLOG(1) << "starting with client argb buffers";
} else if (buffer_ownership_ == BufferOwnership::OWN_BUFFERS) {
capture_format_.pixel_storage = PIXEL_STORAGE_CPU;
capture_format_.pixel_format = PIXEL_FORMAT_I420;
@@ -155,20 +147,9 @@ void FakeVideoCaptureDevice::CaptureUsingOwnBuffers(
fake_capture_rate_, capture_format_.frame_size);
// Give the captured frame to the client.
- if (planarity_ == BufferPlanarity::PACKED) {
- client_->OnIncomingCapturedData(fake_frame_.get(), frame_size,
- capture_format_, 0 /* rotation */,
- base::TimeTicks::Now());
- } else if (planarity_ == BufferPlanarity::TRIPLANAR) {
- client_->OnIncomingCapturedYuvData(
- fake_frame_.get(),
- fake_frame_.get() + capture_format_.frame_size.GetArea(),
- fake_frame_.get() + capture_format_.frame_size.GetArea() * 5 / 4,
- capture_format_.frame_size.width(),
- capture_format_.frame_size.width() / 2,
- capture_format_.frame_size.width() / 2, capture_format_,
- 0 /* rotation */, base::TimeTicks::Now());
- }
+ client_->OnIncomingCapturedData(fake_frame_.get(), frame_size,
+ capture_format_, 0 /* rotation */,
+ base::TimeTicks::Now());
BeepAndScheduleNextCapture(
expected_execution_time,
base::Bind(&FakeVideoCaptureDevice::CaptureUsingOwnBuffers,
« no previous file with comments | « media/capture/video/fake_video_capture_device.h ('k') | media/capture/video/fake_video_capture_device_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698