Bug 1853448 - part4 : modify pref to allow more flexible strategy for enabling HEVC. r=media-playback-reviewers,padenot

For now, I'd like to only enable HEVC for the media engine playback, but
keep the HEVC default off on the MFT. Because the media engine is an
experimental feature, which is off by default, it's fine to enable HEVC
for that.

Differential Revision: https://phabricator.services.mozilla.com/D188540
This commit is contained in:
alwu 2023-09-27 19:03:17 +00:00
Родитель c3fcdccc4d
Коммит 4df8d0280b
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -237,7 +237,7 @@ HRESULT WMFDecoderModule::CreateMFTDecoder(const WMFStreamType& aType,
MFVideoFormat_NV12);
#endif
case WMFStreamType::HEVC:
if (!StaticPrefs::media_wmf_hevc_enabled() || !sDXVAEnabled) {
if (StaticPrefs::media_wmf_hevc_enabled() != 1 || !sDXVAEnabled) {
return E_FAIL;
}
return SUCCEEDED(aDecoder->Create(
@ -283,7 +283,7 @@ bool WMFDecoderModule::CanCreateMFTDecoder(const WMFStreamType& aType) {
break;
#endif
case WMFStreamType::HEVC:
if (!StaticPrefs::media_wmf_hevc_enabled()) {
if (StaticPrefs::media_wmf_hevc_enabled() != 1) {
return false;
}
break;

Просмотреть файл

@ -10119,9 +10119,11 @@
mirror: always
# Enable HEVC support via the windows media foundation
# 0 : disable, 1 : enable for media engine and MFT,
# 2 : enable for media engine only
- name: media.wmf.hevc.enabled
type: RelaxedAtomicBool
value: false
type: RelaxedAtomicUint32
value: 2
mirror: always
#endif # MOZ_WMF