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

Unified Diff: media/gpu/v4l2_video_encode_accelerator.cc

Issue 2191263002: V4L2VideoDecodeAccelerator: support external buffer import (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small improvement Created 4 years, 3 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
« no previous file with comments | « media/gpu/v4l2_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_video_encode_accelerator.cc
diff --git a/media/gpu/v4l2_video_encode_accelerator.cc b/media/gpu/v4l2_video_encode_accelerator.cc
index 1ac5a18cfc4111742e36847a4e2aba944194ad78..e546c0c75bf93ed7d8546f1d1c534da4267d38c3 100644
--- a/media/gpu/v4l2_video_encode_accelerator.cc
+++ b/media/gpu/v4l2_video_encode_accelerator.cc
@@ -182,8 +182,8 @@ bool V4L2VideoEncodeAccelerator::Initialize(VideoPixelFormat input_format,
// processor and there will be no callbacks after processor destroys.
if (!image_processor_->Initialize(
input_format, device_input_format_, V4L2_MEMORY_USERPTR,
- visible_size_, visible_size_, visible_size_, input_allocated_size_,
- kImageProcBufferCount,
+ V4L2_MEMORY_MMAP, visible_size_, visible_size_, visible_size_,
+ input_allocated_size_, kImageProcBufferCount,
base::Bind(&V4L2VideoEncodeAccelerator::ImageProcessorError,
base::Unretained(this)))) {
LOG(ERROR) << "Failed initializing image processor";
@@ -258,11 +258,13 @@ void V4L2VideoEncodeAccelerator::Encode(const scoped_refptr<VideoFrame>& frame,
free_image_processor_output_buffers_.pop_back();
// Unretained is safe because |this| owns image processor and there will
// be no callbacks after processor destroys.
- image_processor_->Process(
- frame, output_buffer_index,
- base::Bind(&V4L2VideoEncodeAccelerator::FrameProcessed,
- base::Unretained(this), force_keyframe,
- frame->timestamp()));
+ if (!image_processor_->Process(
+ frame, output_buffer_index, std::vector<base::ScopedFD>(),
+ base::Bind(&V4L2VideoEncodeAccelerator::FrameProcessed,
+ base::Unretained(this), force_keyframe,
+ frame->timestamp()))) {
+ NOTIFY_ERROR(kPlatformFailureError);
+ }
} else {
ImageProcessorInputRecord record;
record.frame = frame;
« no previous file with comments | « media/gpu/v4l2_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698