Commit edb701a7 authored by Ricky Liang's avatar Ricky Liang Committed by Commit Bot

Re-enable native input mode in RTCVideoEncoder

We now have GpuMemoryBuffer support in fake and file video capture
devices, so we can re-enable native input mode in RTCVideoEncoder
without causing test regression.

Bug: 1014209, 982201
Test: Verify that tast.webrtc.DecodeAccelUsedVP8 passes
Change-Id: Ica0b61865aa97105f8dde6258f901bbf20d8aa9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864503
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706855}
parent 2a5046b3
......@@ -372,8 +372,15 @@ void RTCVideoEncoder::Impl::CreateAndInitializeVEA(
media::VideoPixelFormat pixel_format = media::PIXEL_FORMAT_I420;
auto storage_type =
media::VideoEncodeAccelerator::Config::StorageType::kShmem;
// TODO(crbug.com/1014209): Enable native input mode after fake video capture
// device supports delivering GpuMemoryBuffer frames.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kVideoCaptureUseGpuMemoryBuffer) &&
video_content_type_ != webrtc::VideoContentType::SCREENSHARE) {
// Use import mode for camera when GpuMemoryBuffer-based video capture is
// enabled.
pixel_format = media::PIXEL_FORMAT_NV12;
storage_type = media::VideoEncodeAccelerator::Config::StorageType::kDmabuf;
use_native_input_ = true;
}
const media::VideoEncodeAccelerator::Config config(
pixel_format, input_visible_size_, profile, bitrate * 1000, base::nullopt,
base::nullopt, base::nullopt, storage_type,
......
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