Commit 9c6d6340 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/VaapiVEA: Enable to encode GpuMemoryBuffer based VideoFrame

This CL enables VaapiVideoEncodeAccelerator encode GpuMemoryBuffer based
VideoFrame. VaapiideoEncodeAccelerator still can encode DMABUF based VideoFrame.

Bug: 1001413
Test: video_encode_accelerator_unittest on eve with crrev.com/c/1808939
Change-Id: I992d076a8c90eb7ad6f157e21d0f982cf2ca49dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809043
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697551}
parent 6cfaf6b6
...@@ -510,8 +510,11 @@ scoped_refptr<VaapiEncodeJob> VaapiVideoEncodeAccelerator::CreateEncodeJob( ...@@ -510,8 +510,11 @@ scoped_refptr<VaapiEncodeJob> VaapiVideoEncodeAccelerator::CreateEncodeJob(
scoped_refptr<VideoFrame> frame, scoped_refptr<VideoFrame> frame,
bool force_keyframe) { bool force_keyframe) {
DCHECK(encoder_thread_task_runner_->BelongsToCurrentThread()); DCHECK(encoder_thread_task_runner_->BelongsToCurrentThread());
if (native_input_mode_ != frame->HasDmaBufs()) { if (native_input_mode_ &&
NOTIFY_ERROR(kPlatformFailureError, "Unexpected storage"); frame->storage_type() != VideoFrame::STORAGE_DMABUFS &&
frame->storage_type() != VideoFrame::STORAGE_GPU_MEMORY_BUFFER) {
NOTIFY_ERROR(kPlatformFailureError,
"Unexpected storage: " << frame->storage_type());
return nullptr; return nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment