Commit 78cde5e4 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/v4l2VEA: Notify V4L2VEA's EncoderInfo in the end of initialization

This notifies VEA client VideoEncoderInfo of
V4L2VideoEncodeAccelerator (V4L2VEA) at the end of the
initialization.
Since V4L2VEA doesn't update fps allocation and qp values are not
controllable, NotifyEncoderInfoChange() is not called except the
end of the initialization.

Bug: 1031965
Test: webrtc.RTCPeerConnection.vp8_enc
Change-Id: I38a3f63630f4c0c625d187ff1775d6762fbc415d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032763Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742962}
parent 2eb368c0
...@@ -307,6 +307,22 @@ void V4L2VideoEncodeAccelerator::InitializeTask(const Config& config, ...@@ -307,6 +307,22 @@ void V4L2VideoEncodeAccelerator::InitializeTask(const Config& config,
kInputBufferCount, input_frame_size_, kInputBufferCount, input_frame_size_,
output_buffer_byte_size_)); output_buffer_byte_size_));
// Notify VideoEncoderInfo after initialization.
VideoEncoderInfo encoder_info;
encoder_info.implementation_name = "V4L2VideoEncodeAccelerator";
encoder_info.has_trusted_rate_controller = true;
encoder_info.is_hardware_accelerated = true;
encoder_info.supports_native_handle = true;
encoder_info.supports_simulcast = false;
// V4L2VideoEncodeAccelerator doesn't support either temporal-SVC or
// spatial-SVC. A single stream shall be output at the desired FPS.
constexpr uint8_t kFullFramerate = 255;
encoder_info.fps_allocation[0] = {kFullFramerate};
child_task_runner_->PostTask(
FROM_HERE,
base::BindOnce(&Client::NotifyEncoderInfoChange, client_, encoder_info));
// Finish initialization. // Finish initialization.
*result = true; *result = true;
} }
......
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