Commit 2065e802 authored by Jianhui Dai's avatar Jianhui Dai Committed by Commit Bot

[webcodecs] Remove hard constrain on accelerated encoders

The constrain is not needed, as the method to detect supported hardware
encoder profiles is implemented.

Bug: 1119636
Change-Id: Ic3fe4f1ea319f9adc1391d6e0a2203c09264bbf3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551624Reviewed-by: default avatarEugene Zemtsov <eugene@chromium.org>
Commit-Queue: Eugene Zemtsov <eugene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830543}
parent 28ff715b
...@@ -271,20 +271,9 @@ bool VideoEncoder::VerifyCodecSupport(ParsedConfig* config, ...@@ -271,20 +271,9 @@ bool VideoEncoder::VerifyCodecSupport(ParsedConfig* config,
ExceptionState& exception_state) { ExceptionState& exception_state) {
switch (config->codec) { switch (config->codec) {
case media::kCodecVP8: case media::kCodecVP8:
if (config->acc_pref == AccelerationPreference::kRequire) {
exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError,
"Accelerated vp8 is not supported");
return false;
}
break; break;
case media::kCodecVP9: case media::kCodecVP9:
if (config->acc_pref == AccelerationPreference::kRequire) {
exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError,
"Accelerated vp9 is not supported");
return false;
}
// TODO(https://crbug.com/1119636): Implement / call a proper method for // TODO(https://crbug.com/1119636): Implement / call a proper method for
// detecting support of encoder configs. // detecting support of encoder configs.
if (config->profile == media::VideoCodecProfile::VP9PROFILE_PROFILE1 || if (config->profile == media::VideoCodecProfile::VP9PROFILE_PROFILE1 ||
......
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