Poll is_hardware_accelerated from VideoEncoder instead of VideoEncoderFactory.

Currently, CPU overuse settings for HW encoders are sometimes being used
even though the actual encoder is a SW encoder, e.g. in case of SW fallback
when the encoder is initialized. Polling is_hardware_accelerated after the
encoder has been created and initialized will improve choosing the correct
CPU overuse settings.

Bug: webrtc:10065
Change-Id: Ic6bd67630a040b5a121c13fa63dd074006973929
Reviewed-on: https://webrtc-review.googlesource.com/c/116688
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26266}
This commit is contained in:
Mirta Dvornicic
2019-01-15 12:42:18 +01:00
committed by Commit Bot
parent 29cbd85cce
commit ccc1b57e32
6 changed files with 44 additions and 12 deletions

View File

@ -88,7 +88,7 @@ VideoEncoder::EncoderInfo::EncoderInfo()
supports_native_handle(false),
implementation_name("unknown"),
has_trusted_rate_controller(false),
is_hardware_accelerated(false),
is_hardware_accelerated(true),
has_internal_source(false) {}
VideoEncoder::EncoderInfo::EncoderInfo(const EncoderInfo&) = default;