зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1767930 - Enable Utility AudioDecoder for Android r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D145785
This commit is contained in:
Родитель
74097ce09d
Коммит
c53de97817
|
@ -3001,8 +3001,11 @@ bool ContentParent::InitInternal(ProcessPriority aInitialPriority) {
|
|||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
Unused << SendDecoderSupportedMimeTypes(
|
||||
AndroidDecoderModule::GetSupportedMimeTypes());
|
||||
if (!(StaticPrefs::media_utility_process_enabled() &&
|
||||
StaticPrefs::media_utility_android_media_codec_enabled())) {
|
||||
Unused << SendDecoderSupportedMimeTypes(
|
||||
AndroidDecoderModule::GetSupportedMimeTypes());
|
||||
}
|
||||
#endif
|
||||
|
||||
// Must send screen info before send initialData
|
||||
|
|
|
@ -567,6 +567,12 @@ void PDMFactory::CreateUtilityPDMs() {
|
|||
mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
|
||||
FFmpegRuntimeLinker::LinkStatusCode());
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (StaticPrefs::media_utility_android_media_codec_enabled()) {
|
||||
StartupPDM(AndroidDecoderModule::Create(),
|
||||
StaticPrefs::media_android_media_codec_preferred());
|
||||
}
|
||||
#endif
|
||||
CreateAndStartupPDM<AgnosticDecoderModule>();
|
||||
}
|
||||
|
|
|
@ -19,6 +19,11 @@
|
|||
# include "mozilla/sandboxTarget.h"
|
||||
#endif // defined(XP_WIN) && defined(MOZ_SANDBOX)
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
# include "mozilla/StaticPrefs_media.h"
|
||||
# include "AndroidDecoderModule.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla::ipc {
|
||||
|
||||
UtilityAudioDecoderParent::UtilityAudioDecoderParent() {
|
||||
|
@ -57,6 +62,13 @@ void UtilityAudioDecoderParent::Start(
|
|||
DebugOnly<bool> ok = std::move(aEndpoint).Bind(this);
|
||||
MOZ_ASSERT(ok);
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (StaticPrefs::media_utility_android_media_codec_enabled()) {
|
||||
AndroidDecoderModule::SetSupportedMimeTypes(
|
||||
AndroidDecoderModule::GetSupportedMimeTypes());
|
||||
}
|
||||
#endif
|
||||
|
||||
auto supported = PDMFactory::Supported();
|
||||
Unused << SendUpdateMediaCodecsSupported(std::move(supported));
|
||||
}
|
||||
|
|
|
@ -9015,6 +9015,13 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Bug 1771196
|
||||
# Dont yet enable AndroidDecoderModule on Utility
|
||||
- name: media.utility-android-media-codec.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: media.android-media-codec.preferred
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
|
|
Загрузка…
Ссылка в новой задаче