зеркало из 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
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
|
if (!(StaticPrefs::media_utility_process_enabled() &&
|
||||||
|
StaticPrefs::media_utility_android_media_codec_enabled())) {
|
||||||
Unused << SendDecoderSupportedMimeTypes(
|
Unused << SendDecoderSupportedMimeTypes(
|
||||||
AndroidDecoderModule::GetSupportedMimeTypes());
|
AndroidDecoderModule::GetSupportedMimeTypes());
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Must send screen info before send initialData
|
// Must send screen info before send initialData
|
||||||
|
|
|
@ -567,6 +567,12 @@ void PDMFactory::CreateUtilityPDMs() {
|
||||||
mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
|
mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
|
||||||
FFmpegRuntimeLinker::LinkStatusCode());
|
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
|
#endif
|
||||||
CreateAndStartupPDM<AgnosticDecoderModule>();
|
CreateAndStartupPDM<AgnosticDecoderModule>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,11 @@
|
||||||
# include "mozilla/sandboxTarget.h"
|
# include "mozilla/sandboxTarget.h"
|
||||||
#endif // defined(XP_WIN) && defined(MOZ_SANDBOX)
|
#endif // defined(XP_WIN) && defined(MOZ_SANDBOX)
|
||||||
|
|
||||||
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
|
# include "mozilla/StaticPrefs_media.h"
|
||||||
|
# include "AndroidDecoderModule.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace mozilla::ipc {
|
namespace mozilla::ipc {
|
||||||
|
|
||||||
UtilityAudioDecoderParent::UtilityAudioDecoderParent() {
|
UtilityAudioDecoderParent::UtilityAudioDecoderParent() {
|
||||||
|
@ -57,6 +62,13 @@ void UtilityAudioDecoderParent::Start(
|
||||||
DebugOnly<bool> ok = std::move(aEndpoint).Bind(this);
|
DebugOnly<bool> ok = std::move(aEndpoint).Bind(this);
|
||||||
MOZ_ASSERT(ok);
|
MOZ_ASSERT(ok);
|
||||||
|
|
||||||
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
|
if (StaticPrefs::media_utility_android_media_codec_enabled()) {
|
||||||
|
AndroidDecoderModule::SetSupportedMimeTypes(
|
||||||
|
AndroidDecoderModule::GetSupportedMimeTypes());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
auto supported = PDMFactory::Supported();
|
auto supported = PDMFactory::Supported();
|
||||||
Unused << SendUpdateMediaCodecsSupported(std::move(supported));
|
Unused << SendUpdateMediaCodecsSupported(std::move(supported));
|
||||||
}
|
}
|
||||||
|
|
|
@ -9015,6 +9015,13 @@
|
||||||
value: true
|
value: true
|
||||||
mirror: always
|
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
|
- name: media.android-media-codec.preferred
|
||||||
type: RelaxedAtomicBool
|
type: RelaxedAtomicBool
|
||||||
value: true
|
value: true
|
||||||
|
|
Загрузка…
Ссылка в новой задаче