Commit 4e979a0d authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

blink/webrtc: enable H264 encoding even if no sw-fallback available

crrev.com/c/1863153 introduced a regression when it started looking
at the kWebRtcHWH264Encoding flag, which was enabled by default.
This was caused by the convoluted logic around h264 sw/hw encoding
support. This CL removes that check entirely since the flag was
fully enabled anyway [1] so the original check:

if (webrtc_h264_sw_enabled || base::FeatureList::IsEnabled(blink::features::kWebRtcHWH264Encoding))

was always true (bc of the second member).
This CL thus removes all the code related to that flag, allowing
for h264 to be accepted even if there's no sw fallback, hence restoring
the original behaviour pre-deprecation.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1863153/4/third_party/blink/common/features.cc

Bug: webrtc:11244
Change-Id: Id9132181fdca08ede12e22a1cc66590f1062269d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2022929
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Reviewed-by: default avatarHarald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735541}
parent a1ec8acb
......@@ -33,17 +33,6 @@ base::Optional<webrtc::SdpVideoFormat> VEAToWebRTCFormat(
}
if (profile.profile >= media::H264PROFILE_MIN &&
profile.profile <= media::H264PROFILE_MAX) {
// Enable H264 HW encode for WebRTC when SW fallback is available, which is
// checked by kWebRtcH264WithOpenH264FFmpeg flag. This check should be
// removed when SW implementation is fully enabled.
bool webrtc_h264_sw_enabled = false;
#if BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
webrtc_h264_sw_enabled = base::FeatureList::IsEnabled(
blink::features::kWebRtcH264WithOpenH264FFmpeg);
#endif // BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
if (!webrtc_h264_sw_enabled)
return base::nullopt;
webrtc::H264::Profile h264_profile;
switch (profile.profile) {
case media::H264PROFILE_BASELINE:
......
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