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

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

Issue 1124723006: VideoCaptureDeviceLinux: Add support for SPLANE+DMABUF V4L2 type capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: posciak@ review and rebase (AsPlatformFile(), ...BufferPoolUtilization...)). Created 5 years, 6 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
« no previous file with comments | « no previous file | media/video/capture/linux/v4l2_capture_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/browser/renderer_host/media/video_capture_device_client.h" 5 #include "content/browser/renderer_host/media/video_capture_device_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "content/browser/compositor/image_transport_factory.h" 10 #include "content/browser/compositor/image_transport_factory.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 416
417 OnIncomingCapturedBuffer(buffer.Pass(), frame_format, timestamp); 417 OnIncomingCapturedBuffer(buffer.Pass(), frame_format, timestamp);
418 }; 418 };
419 419
420 scoped_ptr<media::VideoCaptureDevice::Client::Buffer> 420 scoped_ptr<media::VideoCaptureDevice::Client::Buffer>
421 VideoCaptureDeviceClient::ReserveOutputBuffer(media::VideoPixelFormat format, 421 VideoCaptureDeviceClient::ReserveOutputBuffer(media::VideoPixelFormat format,
422 const gfx::Size& dimensions) { 422 const gfx::Size& dimensions) {
423 DCHECK(format == media::PIXEL_FORMAT_I420 || 423 DCHECK(format == media::PIXEL_FORMAT_I420 ||
424 format == media::PIXEL_FORMAT_TEXTURE || 424 format == media::PIXEL_FORMAT_TEXTURE ||
425 format == media::PIXEL_FORMAT_GPUMEMORYBUFFER); 425 format == media::PIXEL_FORMAT_GPUMEMORYBUFFER)
426 << "format " << media::VideoCaptureFormat::PixelFormatToString(format);
426 DCHECK_GT(dimensions.width(), 0); 427 DCHECK_GT(dimensions.width(), 0);
427 DCHECK_GT(dimensions.height(), 0); 428 DCHECK_GT(dimensions.height(), 0);
428 429
429 if (format == media::PIXEL_FORMAT_GPUMEMORYBUFFER && !texture_wrap_helper_) { 430 if (format == media::PIXEL_FORMAT_GPUMEMORYBUFFER && !texture_wrap_helper_) {
430 texture_wrap_helper_ = 431 texture_wrap_helper_ =
431 new TextureWrapHelper(controller_, capture_task_runner_); 432 new TextureWrapHelper(controller_, capture_task_runner_);
432 } 433 }
433 434
434 int buffer_id_to_drop = VideoCaptureBufferPool::kInvalidId; 435 int buffer_id_to_drop = VideoCaptureBufferPool::kInvalidId;
435 const int buffer_id = 436 const int buffer_id =
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 void VideoCaptureDeviceClient::TextureWrapHelper::OnError( 680 void VideoCaptureDeviceClient::TextureWrapHelper::OnError(
680 const std::string& message) { 681 const std::string& message) {
681 DCHECK(capture_task_runner_->BelongsToCurrentThread()); 682 DCHECK(capture_task_runner_->BelongsToCurrentThread());
682 DLOG(ERROR) << message; 683 DLOG(ERROR) << message;
683 BrowserThread::PostTask( 684 BrowserThread::PostTask(
684 BrowserThread::IO, FROM_HERE, 685 BrowserThread::IO, FROM_HERE,
685 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_)); 686 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_));
686 } 687 }
687 688
688 } // namespace content 689 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/video/capture/linux/v4l2_capture_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698