mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused: - media.autoplay.allow-muted pref - media.autoplay.blackList-override-default Differential Revision: https://phabricator.services.mozilla.com/D36396 --HG-- extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
This commit is contained in:
parent
5cbe9516b1
commit
d839ef58db
@ -120,7 +120,7 @@ class nsScreen : public mozilla::DOMEventTargetHelper {
|
||||
}
|
||||
|
||||
static bool MediaCapabilitiesEnabled(JSContext* aCx, JSObject* aGlobal) {
|
||||
return mozilla::StaticPrefs::MediaCapabilitiesScreenEnabled();
|
||||
return mozilla::StaticPrefs::media_media_capabilities_screen_enabled();
|
||||
}
|
||||
|
||||
IMPL_EVENT_HANDLER(change);
|
||||
|
@ -3713,7 +3713,7 @@ already_AddRefed<Promise> HTMLMediaElement::Play(ErrorResult& aRv) {
|
||||
}
|
||||
|
||||
void HTMLMediaElement::DispatchEventsWhenPlayWasNotAllowed() {
|
||||
if (StaticPrefs::MediaBlockEventEnabled()) {
|
||||
if (StaticPrefs::media_autoplay_block_event_enabled()) {
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("blocked"));
|
||||
}
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
@ -4107,7 +4107,7 @@ void HTMLMediaElement::HiddenVideoStart() {
|
||||
}
|
||||
NS_NewTimerWithFuncCallback(
|
||||
getter_AddRefs(mVideoDecodeSuspendTimer), VideoDecodeSuspendTimerCallback,
|
||||
this, StaticPrefs::MediaSuspendBkgndVideoDelayMs(),
|
||||
this, StaticPrefs::media_suspend_bkgnd_video_delay_ms(),
|
||||
nsITimer::TYPE_ONE_SHOT,
|
||||
"HTMLMediaElement::VideoDecodeSuspendTimerCallback",
|
||||
mMainThreadEventTarget);
|
||||
@ -4275,7 +4275,8 @@ void HTMLMediaElement::ReportTelemetry() {
|
||||
// Here, we have played *some* of the video, but didn't get more than 1
|
||||
// keyframe. Report '0' if we have played for longer than the video-
|
||||
// decode-suspend delay (showing recovery would be difficult).
|
||||
uint32_t suspendDelay_ms = StaticPrefs::MediaSuspendBkgndVideoDelayMs();
|
||||
uint32_t suspendDelay_ms =
|
||||
StaticPrefs::media_suspend_bkgnd_video_delay_ms();
|
||||
if (uint32_t(playTime * 1000.0) > suspendDelay_ms) {
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_MAX_MS, key, 0);
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_MAX_MS,
|
||||
|
@ -154,7 +154,7 @@ static bool IsAudioContextAllowedToPlay(const AudioContext& aContext) {
|
||||
static bool IsEnableBlockingWebAudioByUserGesturePolicy() {
|
||||
return DefaultAutoplayBehaviour() != nsIAutoplay::ALLOWED &&
|
||||
Preferences::GetBool("media.autoplay.block-webaudio", false) &&
|
||||
StaticPrefs::MediaAutoplayUserGesturesNeeded();
|
||||
StaticPrefs::media_autoplay_enabled_user_gestures_needed();
|
||||
}
|
||||
|
||||
/* static */
|
||||
@ -171,9 +171,9 @@ bool AutoplayPolicy::WouldBeAllowedToPlayIfAutoplayDisabled(
|
||||
}
|
||||
|
||||
static bool IsAllowedToPlayByBlockingModel(const HTMLMediaElement& aElement) {
|
||||
if (!StaticPrefs::MediaAutoplayUserGesturesNeeded()) {
|
||||
// If element is blessed, it would always be allowed to play().
|
||||
return aElement.IsBlessed() || EventStateManager::IsHandlingUserInput();
|
||||
if (!StaticPrefs::media_autoplay_enabled_user_gestures_needed()) {
|
||||
// If element is blessed, it would always be allowed to play().
|
||||
return aElement.IsBlessed() || EventStateManager::IsHandlingUserInput();
|
||||
}
|
||||
return IsWindowAllowedToPlay(aElement.OwnerDoc()->GetInnerWindow());
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ NS_IMETHODIMP
|
||||
BackgroundVideoDecodingPermissionObserver::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const char16_t* aData) {
|
||||
if (!StaticPrefs::MediaResumeBkgndVideoOnTabhover()) {
|
||||
if (!StaticPrefs::media_resume_bkgnd_video_on_tabhover()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ uint32_t VP9Benchmark::MediaBenchmarkVp9Fps() {
|
||||
if (!ShouldRun()) {
|
||||
return 0;
|
||||
}
|
||||
return StaticPrefs::MediaBenchmarkVp9Fps();
|
||||
return StaticPrefs::media_benchmark_vp9_fps();
|
||||
}
|
||||
|
||||
// static
|
||||
@ -78,8 +78,8 @@ bool VP9Benchmark::IsVP9DecodeFast(bool aDefault) {
|
||||
return false;
|
||||
}
|
||||
static StaticMutex sMutex;
|
||||
uint32_t decodeFps = StaticPrefs::MediaBenchmarkVp9Fps();
|
||||
uint32_t hadRecentUpdate = StaticPrefs::MediaBenchmarkVp9Versioncheck();
|
||||
uint32_t decodeFps = StaticPrefs::media_benchmark_vp9_fps();
|
||||
uint32_t hadRecentUpdate = StaticPrefs::media_benchmark_vp9_versioncheck();
|
||||
bool needBenchmark;
|
||||
{
|
||||
StaticMutexAutoLock lock(sMutex);
|
||||
@ -93,10 +93,11 @@ bool VP9Benchmark::IsVP9DecodeFast(bool aDefault) {
|
||||
new BufferMediaResource(sWebMSample, sizeof(sWebMSample)));
|
||||
RefPtr<Benchmark> estimiser = new Benchmark(
|
||||
demuxer,
|
||||
{StaticPrefs::MediaBenchmarkFrames(), // frames to measure
|
||||
{StaticPrefs::media_benchmark_frames(), // frames to measure
|
||||
1, // start benchmarking after decoding this frame.
|
||||
8, // loop after decoding that many frames.
|
||||
TimeDuration::FromMilliseconds(StaticPrefs::MediaBenchmarkTimeout())});
|
||||
TimeDuration::FromMilliseconds(
|
||||
StaticPrefs::media_benchmark_timeout())});
|
||||
estimiser->Run()->Then(
|
||||
AbstractThread::MainThread(), __func__,
|
||||
[](uint32_t aDecodeFps) {
|
||||
@ -121,7 +122,7 @@ bool VP9Benchmark::IsVP9DecodeFast(bool aDefault) {
|
||||
return aDefault;
|
||||
}
|
||||
|
||||
return decodeFps >= StaticPrefs::MediaBenchmarkVp9Threshold();
|
||||
return decodeFps >= StaticPrefs::media_benchmark_vp9_threshold();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ bool ChannelMediaDecoder::ShouldThrottleDownload(
|
||||
|
||||
int64_t length = aStats.mTotalBytes;
|
||||
if (length > 0 &&
|
||||
length <= int64_t(StaticPrefs::MediaMemoryCacheMaxSize()) * 1024) {
|
||||
length <= int64_t(StaticPrefs::media_memory_cache_max_size()) * 1024) {
|
||||
// Don't throttle the download of small resources. This is to speed
|
||||
// up seeking, as seeks into unbuffered ranges would require starting
|
||||
// up a new HTTP transaction, which adds latency.
|
||||
|
@ -326,19 +326,19 @@ class MediaCache {
|
||||
|
||||
static size_t CacheSize() {
|
||||
MOZ_ASSERT(sThread->IsOnCurrentThread());
|
||||
return sOnCellular ? StaticPrefs::MediaCacheCellularSize()
|
||||
: StaticPrefs::MediaCacheSize();
|
||||
return sOnCellular ? StaticPrefs::media_cache_size_cellular()
|
||||
: StaticPrefs::media_cache_size();
|
||||
}
|
||||
|
||||
static size_t ReadaheadLimit() {
|
||||
MOZ_ASSERT(sThread->IsOnCurrentThread());
|
||||
return sOnCellular ? StaticPrefs::MediaCacheCellularReadaheadLimit()
|
||||
: StaticPrefs::MediaCacheReadaheadLimit();
|
||||
return sOnCellular ? StaticPrefs::media_cache_readahead_limit_cellular()
|
||||
: StaticPrefs::media_cache_readahead_limit();
|
||||
}
|
||||
|
||||
static size_t ResumeThreshold() {
|
||||
return sOnCellular ? StaticPrefs::MediaCacheCellularResumeThreshold()
|
||||
: StaticPrefs::MediaCacheResumeThreshold();
|
||||
return sOnCellular ? StaticPrefs::media_cache_resume_threshold_cellular()
|
||||
: StaticPrefs::media_cache_resume_threshold();
|
||||
}
|
||||
|
||||
// Find a free or reusable block and return its index. If there are no
|
||||
@ -789,7 +789,7 @@ RefPtr<MediaCache> MediaCache::GetMediaCache(int64_t aContentLength) {
|
||||
|
||||
if (aContentLength > 0 &&
|
||||
aContentLength <=
|
||||
int64_t(StaticPrefs::MediaMemoryCacheMaxSize()) * 1024) {
|
||||
int64_t(StaticPrefs::media_memory_cache_max_size()) * 1024) {
|
||||
// Small-enough resource, use a new memory-backed MediaCache.
|
||||
RefPtr<MediaBlockCacheBase> bc = new MemoryBlockCache(aContentLength);
|
||||
nsresult rv = bc->Init();
|
||||
|
@ -1247,13 +1247,13 @@ RefPtr<SetCDMPromise> MediaDecoder::SetCDMProxy(CDMProxy* aProxy) {
|
||||
&MediaFormatReader::SetCDMProxy, aProxy);
|
||||
}
|
||||
|
||||
bool MediaDecoder::IsOpusEnabled() { return StaticPrefs::MediaOpusEnabled(); }
|
||||
bool MediaDecoder::IsOpusEnabled() { return StaticPrefs::media_opus_enabled(); }
|
||||
|
||||
bool MediaDecoder::IsOggEnabled() { return StaticPrefs::MediaOggEnabled(); }
|
||||
bool MediaDecoder::IsOggEnabled() { return StaticPrefs::media_ogg_enabled(); }
|
||||
|
||||
bool MediaDecoder::IsWaveEnabled() { return StaticPrefs::MediaWaveEnabled(); }
|
||||
bool MediaDecoder::IsWaveEnabled() { return StaticPrefs::media_wave_enabled(); }
|
||||
|
||||
bool MediaDecoder::IsWebMEnabled() { return StaticPrefs::MediaWebMEnabled(); }
|
||||
bool MediaDecoder::IsWebMEnabled() { return StaticPrefs::media_webm_enabled(); }
|
||||
|
||||
NS_IMETHODIMP
|
||||
MediaMemoryTracker::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
|
@ -173,7 +173,7 @@ static void DiscardFramesFromTail(MediaQueue<Type>& aQueue,
|
||||
// decoding is suspended.
|
||||
static TimeDuration SuspendBackgroundVideoDelay() {
|
||||
return TimeDuration::FromMilliseconds(
|
||||
StaticPrefs::MediaSuspendBkgndVideoDelayMs());
|
||||
StaticPrefs::media_suspend_bkgnd_video_delay_ms());
|
||||
}
|
||||
|
||||
class MediaDecoderStateMachine::StateObject {
|
||||
@ -695,7 +695,7 @@ class MediaDecoderStateMachine::DecodingState
|
||||
return;
|
||||
}
|
||||
|
||||
auto timeout = StaticPrefs::MediaDormantOnPauseTimeoutMs();
|
||||
auto timeout = StaticPrefs::media_dormant_on_pause_timeout_ms();
|
||||
if (timeout < 0) {
|
||||
// Disabled when timeout is negative.
|
||||
return;
|
||||
@ -2209,7 +2209,7 @@ void MediaDecoderStateMachine::DecodeMetadataState::OnMetadataRead(
|
||||
|
||||
// Check whether the media satisfies the requirement of seamless looing.
|
||||
// (Before checking the media is audio only, we need to get metadata first.)
|
||||
mMaster->mSeamlessLoopingAllowed = StaticPrefs::MediaSeamlessLooping() &&
|
||||
mMaster->mSeamlessLoopingAllowed = StaticPrefs::media_seamless_looping() &&
|
||||
mMaster->HasAudio() &&
|
||||
!mMaster->HasVideo();
|
||||
|
||||
@ -2956,7 +2956,7 @@ void MediaDecoderStateMachine::SetVideoDecodeModeInternal(
|
||||
mVideoDecodeSuspended ? 'T' : 'F');
|
||||
|
||||
// Should not suspend decoding if we don't turn on the pref.
|
||||
if (!StaticPrefs::MediaSuspendBkgndVideoEnabled() &&
|
||||
if (!StaticPrefs::media_suspend_bkgnd_video_enabled() &&
|
||||
aMode == VideoDecodeMode::Suspend) {
|
||||
LOG("SetVideoDecodeModeInternal(), early return because preference off and "
|
||||
"set to Suspend");
|
||||
|
@ -870,9 +870,9 @@ MediaFormatReader::MediaFormatReader(MediaFormatReaderInit& aInit,
|
||||
"MediaFormatReader::mTaskQueue",
|
||||
/* aSupportsTailDispatch = */ true)),
|
||||
mAudio(this, MediaData::Type::AUDIO_DATA,
|
||||
StaticPrefs::MediaAudioMaxDecodeError()),
|
||||
StaticPrefs::media_audio_max_decode_error()),
|
||||
mVideo(this, MediaData::Type::VIDEO_DATA,
|
||||
StaticPrefs::MediaVideoMaxDecodeError()),
|
||||
StaticPrefs::media_video_max_decode_error()),
|
||||
mDemuxer(new DemuxerProxy(aDemuxer)),
|
||||
mDemuxerInitDone(false),
|
||||
mPendingNotifyDataArrived(false),
|
||||
@ -1133,7 +1133,7 @@ void MediaFormatReader::OnDemuxerInitDone(const MediaResult& aResult) {
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
mDemuxerInitRequest.Complete();
|
||||
|
||||
if (NS_FAILED(aResult) && StaticPrefs::MediaPlaybackWarningsAsErrors()) {
|
||||
if (NS_FAILED(aResult) && StaticPrefs::media_playback_warnings_as_errors()) {
|
||||
mMetadataPromise.Reject(aResult, __func__);
|
||||
return;
|
||||
}
|
||||
@ -1332,7 +1332,7 @@ MediaFormatReader::DecoderData& MediaFormatReader::GetDecoderData(
|
||||
bool MediaFormatReader::ShouldSkip(TimeUnit aTimeThreshold) {
|
||||
MOZ_ASSERT(HasVideo());
|
||||
|
||||
if (!StaticPrefs::MediaDecoderSkipToNextKeyFrameEnabled()) {
|
||||
if (!StaticPrefs::media_decoder_skip_to_next_key_frame_enabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1899,7 +1899,7 @@ void MediaFormatReader::HandleDemuxedSamples(
|
||||
nsTArray<RefPtr<MediaRawData>> samples;
|
||||
if (decoder.mDecoder) {
|
||||
bool recyclable =
|
||||
StaticPrefs::MediaDecoderRecycleEnabled() &&
|
||||
StaticPrefs::media_decoder_recycle_enabled() &&
|
||||
decoder.mDecoder->SupportDecoderRecycling() &&
|
||||
(*info)->mCrypto.mCryptoScheme ==
|
||||
decoder.GetCurrentInfo()->mCrypto.mCryptoScheme &&
|
||||
|
@ -445,7 +445,7 @@ class MediaFormatReader final
|
||||
// Allow decode errors to be non-fatal, but give up
|
||||
// if we have too many, or if warnings should be treated as errors.
|
||||
return mNumOfConsecutiveError > mMaxConsecutiveError ||
|
||||
StaticPrefs::MediaPlaybackWarningsAsErrors();
|
||||
StaticPrefs::media_playback_warnings_as_errors();
|
||||
} else if (mError.ref() == NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER) {
|
||||
// If the caller asked for a new decoder we shouldn't treat
|
||||
// it as fatal.
|
||||
|
@ -132,7 +132,7 @@ enum MemoryBlockCacheTelemetryErrors {
|
||||
};
|
||||
|
||||
static int32_t CalculateMaxBlocks(int64_t aContentLength) {
|
||||
int64_t maxSize = int64_t(StaticPrefs::MediaMemoryCacheMaxSize()) * 1024;
|
||||
int64_t maxSize = int64_t(StaticPrefs::media_memory_cache_max_size()) * 1024;
|
||||
MOZ_ASSERT(aContentLength <= maxSize);
|
||||
MOZ_ASSERT(maxSize % MediaBlockCacheBase::BLOCK_SIZE == 0);
|
||||
// Note: It doesn't matter if calculations overflow, Init() would later fail.
|
||||
@ -193,8 +193,9 @@ bool MemoryBlockCache::EnsureBufferCanContain(size_t aContentLength) {
|
||||
static const size_t sysmem =
|
||||
std::max<size_t>(PR_GetPhysicalMemorySize(), 32 * 1024 * 1024);
|
||||
const size_t limit = std::min(
|
||||
size_t(StaticPrefs::MediaMemoryCachesCombinedLimitKb()) * 1024,
|
||||
sysmem * StaticPrefs::MediaMemoryCachesCombinedLimitPcSysmem() / 100);
|
||||
size_t(StaticPrefs::media_memory_caches_combined_limit_kb()) * 1024,
|
||||
sysmem * StaticPrefs::media_memory_caches_combined_limit_pc_sysmem() /
|
||||
100);
|
||||
const size_t currentSizes = static_cast<size_t>(gCombinedSizes);
|
||||
if (currentSizes + extra > limit) {
|
||||
LOG("EnsureBufferCanContain(%zu) - buffer size %zu, wanted + %zu = %zu;"
|
||||
|
@ -162,7 +162,7 @@ uint32_t DecideAudioPlaybackChannels(const AudioInfo& info) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (StaticPrefs::MediaForcestereoEnabled()) {
|
||||
if (StaticPrefs::media_forcestereo_enabled()) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,8 @@ static MediaKeySystemStatus EnsureCDMInstalled(const nsAString& aKeySystem,
|
||||
/* static */
|
||||
MediaKeySystemStatus MediaKeySystemAccess::GetKeySystemStatus(
|
||||
const nsAString& aKeySystem, nsACString& aOutMessage) {
|
||||
MOZ_ASSERT(StaticPrefs::MediaEmeEnabled() || IsClearkeyKeySystem(aKeySystem));
|
||||
MOZ_ASSERT(StaticPrefs::media_eme_enabled() ||
|
||||
IsClearkeyKeySystem(aKeySystem));
|
||||
|
||||
if (IsClearkeyKeySystem(aKeySystem)) {
|
||||
return EnsureCDMInstalled(aKeySystem, aOutMessage);
|
||||
@ -255,7 +256,7 @@ static nsTArray<KeySystemConfig> GetSupportedKeySystems() {
|
||||
clearkey.mSessionTypes.AppendElement(MediaKeySessionType::Temporary);
|
||||
clearkey.mEncryptionSchemes.AppendElement(NS_LITERAL_STRING("cenc"));
|
||||
// We do not have support for cbcs in clearkey yet. See bug 1516673.
|
||||
if (StaticPrefs::MediaClearkeyPersistentLicenseEnabled()) {
|
||||
if (StaticPrefs::media_clearkey_persistent_license_enabled()) {
|
||||
clearkey.mSessionTypes.AppendElement(
|
||||
MediaKeySessionType::Persistent_license);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ void MediaKeySystemAccessManager::Request(
|
||||
return;
|
||||
}
|
||||
|
||||
if (!StaticPrefs::MediaEmeEnabled() && !IsClearkeyKeySystem(aKeySystem)) {
|
||||
if (!StaticPrefs::media_eme_enabled() && !IsClearkeyKeySystem(aKeySystem)) {
|
||||
// EME disabled by user, send notification to chrome so UI can inform user.
|
||||
// Clearkey is allowed even when EME is disabled because we want the pref
|
||||
// "media.eme.enabled" only taking effect on proprietary DRMs.
|
||||
|
@ -990,7 +990,7 @@ void MediaEncoder::Stop() {
|
||||
|
||||
#ifdef MOZ_WEBM_ENCODER
|
||||
bool MediaEncoder::IsWebMEncoderEnabled() {
|
||||
return StaticPrefs::MediaEncoderWebMEnabled();
|
||||
return StaticPrefs::media_encoder_webm_enabled();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,7 @@ namespace mozilla {
|
||||
/* static */
|
||||
bool FlacDecoder::IsEnabled() {
|
||||
#ifdef MOZ_FFVPX
|
||||
return StaticPrefs::MediaFlacEnabled();
|
||||
return StaticPrefs::media_flac_enabled();
|
||||
#else
|
||||
// Until bug 1295886 is fixed.
|
||||
return false;
|
||||
|
@ -32,7 +32,7 @@ ChromiumCDMParent::ChromiumCDMParent(GMPContentParent* aContentParent,
|
||||
uint32_t aPluginId)
|
||||
: mPluginId(aPluginId),
|
||||
mContentParent(aContentParent),
|
||||
mVideoShmemLimit(StaticPrefs::MediaEmeChromiumApiVideoShmems()) {
|
||||
mVideoShmemLimit(StaticPrefs::media_eme_chromium_api_video_shmems()) {
|
||||
GMP_LOG(
|
||||
"ChromiumCDMParent::ChromiumCDMParent(this=%p, contentParent=%p, id=%u)",
|
||||
this, aContentParent, aPluginId);
|
||||
|
@ -773,7 +773,7 @@ already_AddRefed<GMPParent> GeckoMediaPluginServiceParent::SelectPluginForAPI(
|
||||
RefPtr<GMPParent> CreateGMPParent(AbstractThread* aMainThread) {
|
||||
#if defined(XP_LINUX) && defined(MOZ_SANDBOX)
|
||||
if (!SandboxInfo::Get().CanSandboxMedia()) {
|
||||
if (!StaticPrefs::MediaGmpInsecureAllow()) {
|
||||
if (!StaticPrefs::media_gmp_insecure_allow()) {
|
||||
NS_WARNING("Denying media plugin load due to lack of sandboxing.");
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ size_t HLSDecoder::sAllocatedInstances = 0;
|
||||
RefPtr<HLSDecoder> HLSDecoder::Create(MediaDecoderInit& aInit) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
return sAllocatedInstances < StaticPrefs::MediaHlsMaxAllocations()
|
||||
return sAllocatedInstances < StaticPrefs::media_hls_max_allocations()
|
||||
? new HLSDecoder(aInit)
|
||||
: nullptr;
|
||||
}
|
||||
@ -130,7 +130,7 @@ MediaDecoderStateMachine* HLSDecoder::CreateStateMachine() {
|
||||
}
|
||||
|
||||
bool HLSDecoder::IsEnabled() {
|
||||
return StaticPrefs::MediaHlsEnabled() && (jni::GetAPIVersion() >= 16);
|
||||
return StaticPrefs::media_hls_enabled() && (jni::GetAPIVersion() >= 16);
|
||||
}
|
||||
|
||||
bool HLSDecoder::IsSupportedType(const MediaContainerType& aContainerType) {
|
||||
|
@ -45,7 +45,7 @@ static inline bool IsRemoteAcceleratedCompositor(KnowsCompositor* aKnows) {
|
||||
|
||||
already_AddRefed<MediaDataDecoder> GpuDecoderModule::CreateVideoDecoder(
|
||||
const CreateDecoderParams& aParams) {
|
||||
if (!StaticPrefs::MediaGpuProcessDecoder() || !aParams.mKnowsCompositor ||
|
||||
if (!StaticPrefs::media_gpu_process_decoder() || !aParams.mKnowsCompositor ||
|
||||
!IsRemoteAcceleratedCompositor(aParams.mKnowsCompositor)) {
|
||||
return mWrapped->CreateVideoDecoder(aParams);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ bool RDDProcessHost::WaitForLaunch() {
|
||||
return !!mRDDChild;
|
||||
}
|
||||
|
||||
int32_t timeoutMs = StaticPrefs::MediaRddProcessStartupTimeoutMs();
|
||||
int32_t timeoutMs = StaticPrefs::media_rdd_process_startup_timeout_ms();
|
||||
|
||||
// If one of the following environment variables are set we can
|
||||
// effectively ignore the timeout - as we can guarantee the RDD
|
||||
|
@ -242,7 +242,7 @@ void RDDProcessManager::DestroyProcess() {
|
||||
bool RDDProcessManager::CreateContentBridge(
|
||||
base::ProcessId aOtherProcess,
|
||||
ipc::Endpoint<PRemoteDecoderManagerChild>* aOutRemoteDecoderManager) {
|
||||
if (!EnsureRDDReady() || !StaticPrefs::MediaRddProcessEnabled()) {
|
||||
if (!EnsureRDDReady() || !StaticPrefs::media_rdd_process_enabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -35,11 +35,11 @@ bool RemoteDecoderModule::SupportsMimeType(
|
||||
bool supports = false;
|
||||
|
||||
#ifdef MOZ_AV1
|
||||
if (StaticPrefs::MediaAv1Enabled()) {
|
||||
if (StaticPrefs::media_av1_enabled()) {
|
||||
supports |= AOMDecoder::IsAV1(aMimeType);
|
||||
}
|
||||
#endif
|
||||
if (StaticPrefs::MediaRddVorbisEnabled()) {
|
||||
if (StaticPrefs::media_rdd_vorbis_enabled()) {
|
||||
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ RemoteVideoDecoderParent::RemoteVideoDecoderParent(
|
||||
|
||||
#ifdef MOZ_AV1
|
||||
if (AOMDecoder::IsAV1(params.mConfig.mMimeType)) {
|
||||
if (StaticPrefs::MediaAv1UseDav1d()) {
|
||||
if (StaticPrefs::media_av1_use_dav1d()) {
|
||||
mDecoder = new DAV1DDecoder(params);
|
||||
} else {
|
||||
mDecoder = new AOMDecoder(params);
|
||||
|
@ -534,7 +534,7 @@ already_AddRefed<layers::KnowsCompositor> MediaCapabilities::GetCompositor() {
|
||||
}
|
||||
|
||||
bool MediaCapabilities::Enabled(JSContext* aCx, JSObject* aGlobal) {
|
||||
return StaticPrefs::MediaCapabilitiesEnabled();
|
||||
return StaticPrefs::media_media_capabilities_enabled();
|
||||
}
|
||||
|
||||
JSObject* MediaCapabilities::WrapObject(JSContext* aCx,
|
||||
|
@ -47,7 +47,7 @@ AudioSink::AudioSink(AbstractThread* aThread,
|
||||
mFramesParsed(0),
|
||||
mIsAudioDataAudible(false),
|
||||
mAudioQueue(aAudioQueue) {
|
||||
bool resampling = StaticPrefs::MediaResamplingEnabled();
|
||||
bool resampling = StaticPrefs::media_resampling_enabled();
|
||||
|
||||
if (resampling) {
|
||||
mOutputRate = 48000;
|
||||
@ -181,7 +181,7 @@ nsresult AudioSink::InitializeAudioStream(const PlaybackParams& aParams) {
|
||||
// The layout map used here is already processed by mConverter with
|
||||
// mOutputChannels into SMPTE format, so there is no need to worry if
|
||||
// StaticPrefs::accessibility_monoaudio_enable() or
|
||||
// StaticPrefs::MediaForcestereoEnabled() is applied.
|
||||
// StaticPrefs::media_forcestereo_enabled() is applied.
|
||||
nsresult rv = mAudioStream->Init(mOutputChannels, channelMap, mOutputRate,
|
||||
aParams.mSink);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -104,7 +104,7 @@ VideoSink::VideoSink(AbstractThread* aThread, MediaSink* aAudioSink,
|
||||
mHasVideo(false),
|
||||
mUpdateScheduler(aThread),
|
||||
mVideoQueueSendToCompositorSize(aVQueueSentToCompositerSize),
|
||||
mMinVideoQueueSize(StaticPrefs::MediaRuinAvSyncEnabled() ? 1 : 0)
|
||||
mMinVideoQueueSize(StaticPrefs::media_ruin_av_sync_enabled() ? 1 : 0)
|
||||
#ifdef XP_WIN
|
||||
,
|
||||
mHiResTimersRequested(false)
|
||||
|
@ -117,11 +117,11 @@ nsresult MediaSource::IsTypeSupported(const nsAString& aType,
|
||||
}
|
||||
if (mimeType == MEDIAMIMETYPE("video/webm")) {
|
||||
if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) ||
|
||||
StaticPrefs::MediaCapabilitiesEnabled() ||
|
||||
StaticPrefs::media_media_capabilities_enabled() ||
|
||||
containerType->ExtendedType().Codecs().Contains(
|
||||
NS_LITERAL_STRING("vp8")) ||
|
||||
#ifdef MOZ_AV1
|
||||
(StaticPrefs::MediaAv1Enabled() &&
|
||||
(StaticPrefs::media_av1_enabled() &&
|
||||
IsAV1CodecString(
|
||||
containerType->ExtendedType().Codecs().AsString())) ||
|
||||
#endif
|
||||
|
@ -934,7 +934,7 @@ void TrackBuffersManager::OnDemuxerResetDone(const MediaResult& aResult) {
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
mDemuxerInitRequest.Complete();
|
||||
|
||||
if (NS_FAILED(aResult) && StaticPrefs::MediaPlaybackWarningsAsErrors()) {
|
||||
if (NS_FAILED(aResult) && StaticPrefs::media_playback_warnings_as_errors()) {
|
||||
RejectAppend(aResult, __func__);
|
||||
return;
|
||||
}
|
||||
@ -1031,7 +1031,7 @@ void TrackBuffersManager::OnDemuxerInitDone(const MediaResult& aResult) {
|
||||
|
||||
mDemuxerInitRequest.Complete();
|
||||
|
||||
if (NS_FAILED(aResult) && StaticPrefs::MediaPlaybackWarningsAsErrors()) {
|
||||
if (NS_FAILED(aResult) && StaticPrefs::media_playback_warnings_as_errors()) {
|
||||
RejectAppend(aResult, __func__);
|
||||
return;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ bool MP4Decoder::IsAAC(const nsACString& aMimeType) {
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool MP4Decoder::IsEnabled() { return StaticPrefs::MediaMp4Enabled(); }
|
||||
bool MP4Decoder::IsEnabled() { return StaticPrefs::media_mp4_enabled(); }
|
||||
|
||||
/* static */
|
||||
nsTArray<UniquePtr<TrackInfo>> MP4Decoder::GetTracksInfo(
|
||||
|
@ -150,7 +150,7 @@ RefPtr<MP4Demuxer::InitPromise> MP4Demuxer::Init() {
|
||||
|
||||
auto audioTrackCount = metadata.GetNumberTracks(TrackInfo::kAudioTrack);
|
||||
if (audioTrackCount.Ref() == MP4Metadata::NumberTracksError()) {
|
||||
if (StaticPrefs::MediaPlaybackWarningsAsErrors()) {
|
||||
if (StaticPrefs::media_playback_warnings_as_errors()) {
|
||||
return InitPromise::CreateAndReject(
|
||||
MediaResult(
|
||||
NS_ERROR_DOM_MEDIA_DEMUXER_ERR,
|
||||
@ -163,7 +163,7 @@ RefPtr<MP4Demuxer::InitPromise> MP4Demuxer::Init() {
|
||||
|
||||
auto videoTrackCount = metadata.GetNumberTracks(TrackInfo::kVideoTrack);
|
||||
if (videoTrackCount.Ref() == MP4Metadata::NumberTracksError()) {
|
||||
if (StaticPrefs::MediaPlaybackWarningsAsErrors()) {
|
||||
if (StaticPrefs::media_playback_warnings_as_errors()) {
|
||||
return InitPromise::CreateAndReject(
|
||||
MediaResult(
|
||||
NS_ERROR_DOM_MEDIA_DEMUXER_ERR,
|
||||
@ -196,7 +196,7 @@ RefPtr<MP4Demuxer::InitPromise> MP4Demuxer::Init() {
|
||||
MP4Metadata::ResultAndTrackInfo info =
|
||||
metadata.GetTrackInfo(TrackInfo::kAudioTrack, i);
|
||||
if (!info.Ref()) {
|
||||
if (StaticPrefs::MediaPlaybackWarningsAsErrors()) {
|
||||
if (StaticPrefs::media_playback_warnings_as_errors()) {
|
||||
return InitPromise::CreateAndReject(
|
||||
MediaResult(NS_ERROR_DOM_MEDIA_DEMUXER_ERR,
|
||||
RESULT_DETAIL("Invalid MP4 audio track (%s)",
|
||||
@ -233,7 +233,7 @@ RefPtr<MP4Demuxer::InitPromise> MP4Demuxer::Init() {
|
||||
MP4Metadata::ResultAndTrackInfo info =
|
||||
metadata.GetTrackInfo(TrackInfo::kVideoTrack, i);
|
||||
if (!info.Ref()) {
|
||||
if (StaticPrefs::MediaPlaybackWarningsAsErrors()) {
|
||||
if (StaticPrefs::media_playback_warnings_as_errors()) {
|
||||
return InitPromise::CreateAndReject(
|
||||
MediaResult(NS_ERROR_DOM_MEDIA_DEMUXER_ERR,
|
||||
RESULT_DETAIL("Invalid MP4 video track (%s)",
|
||||
|
@ -14,7 +14,7 @@ namespace mozilla {
|
||||
|
||||
/* static */
|
||||
bool OggDecoder::IsSupportedType(const MediaContainerType& aContainerType) {
|
||||
if (!StaticPrefs::MediaOggEnabled()) {
|
||||
if (!StaticPrefs::media_ogg_enabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ bool PDMFactory::Supports(const TrackInfo& aTrackInfo,
|
||||
void PDMFactory::CreatePDMs() {
|
||||
RefPtr<PlatformDecoderModule> m;
|
||||
|
||||
if (StaticPrefs::MediaUseBlankDecoder()) {
|
||||
if (StaticPrefs::media_use_blank_decoder()) {
|
||||
m = CreateBlankDecoderModule();
|
||||
StartupPDM(m);
|
||||
// The Blank PDM SupportsMimeType reports true for all codecs; the creation
|
||||
@ -343,35 +343,37 @@ void PDMFactory::CreatePDMs() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (StaticPrefs::MediaRddProcessEnabled() && BrowserTabsRemoteAutostart()) {
|
||||
if (StaticPrefs::media_rdd_process_enabled() &&
|
||||
BrowserTabsRemoteAutostart()) {
|
||||
m = new RemoteDecoderModule;
|
||||
StartupPDM(m);
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
if (StaticPrefs::MediaWmfEnabled() && !IsWin7AndPre2000Compatible()) {
|
||||
if (StaticPrefs::media_wmf_enabled() && !IsWin7AndPre2000Compatible()) {
|
||||
m = new WMFDecoderModule();
|
||||
RefPtr<PlatformDecoderModule> remote = new GpuDecoderModule(m);
|
||||
StartupPDM(remote);
|
||||
mWMFFailedToLoad = !StartupPDM(m);
|
||||
} else {
|
||||
mWMFFailedToLoad = StaticPrefs::MediaDecoderDoctorWmfDisabledIsFailure();
|
||||
mWMFFailedToLoad =
|
||||
StaticPrefs::media_decoder_doctor_wmf_disabled_is_failure();
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_OMX
|
||||
if (StaticPrefs::MediaOmxEnabled()) {
|
||||
if (StaticPrefs::media_omx_enabled()) {
|
||||
m = OmxDecoderModule::Create();
|
||||
StartupPDM(m);
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_FFVPX
|
||||
if (StaticPrefs::MediaFfvpxEnabled()) {
|
||||
if (StaticPrefs::media_ffvpx_enabled()) {
|
||||
m = FFVPXRuntimeLinker::CreateDecoderModule();
|
||||
StartupPDM(m);
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_FFMPEG
|
||||
if (StaticPrefs::MediaFfmpegEnabled()) {
|
||||
if (StaticPrefs::media_ffmpeg_enabled()) {
|
||||
m = FFmpegRuntimeLinker::CreateDecoderModule();
|
||||
mFFmpegFailedToLoad = !StartupPDM(m);
|
||||
} else {
|
||||
@ -383,16 +385,16 @@ void PDMFactory::CreatePDMs() {
|
||||
StartupPDM(m);
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (StaticPrefs::MediaAndroidMediaCodecEnabled()) {
|
||||
if (StaticPrefs::media_android_media_codec_enabled()) {
|
||||
m = new AndroidDecoderModule();
|
||||
StartupPDM(m, StaticPrefs::MediaAndroidMediaCodecPreferred());
|
||||
StartupPDM(m, StaticPrefs::media_android_media_codec_preferred());
|
||||
}
|
||||
#endif
|
||||
|
||||
m = new AgnosticDecoderModule();
|
||||
StartupPDM(m);
|
||||
|
||||
if (StaticPrefs::MediaGmpDecoderEnabled()) {
|
||||
if (StaticPrefs::media_gmp_decoder_enabled()) {
|
||||
m = new GMPDecoderModule();
|
||||
mGMPPDMFailedToStartup = !StartupPDM(m);
|
||||
} else {
|
||||
|
@ -25,16 +25,17 @@ bool AgnosticDecoderModule::SupportsMimeType(
|
||||
bool supports =
|
||||
VPXDecoder::IsVPX(aMimeType) || OpusDataDecoder::IsOpus(aMimeType) ||
|
||||
WaveDataDecoder::IsWave(aMimeType) || TheoraDecoder::IsTheora(aMimeType);
|
||||
if (!StaticPrefs::MediaRddVorbisEnabled() ||
|
||||
!StaticPrefs::MediaRddProcessEnabled() || !BrowserTabsRemoteAutostart()) {
|
||||
if (!StaticPrefs::media_rdd_vorbis_enabled() ||
|
||||
!StaticPrefs::media_rdd_process_enabled() ||
|
||||
!BrowserTabsRemoteAutostart()) {
|
||||
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
|
||||
}
|
||||
#ifdef MOZ_AV1
|
||||
// We remove support for decoding AV1 here if RDD is enabled so that
|
||||
// decoding on the content process doesn't accidentally happen in case
|
||||
// something goes wrong with launching the RDD process.
|
||||
if (StaticPrefs::MediaAv1Enabled() &&
|
||||
!StaticPrefs::MediaRddProcessEnabled()) {
|
||||
if (StaticPrefs::media_av1_enabled() &&
|
||||
!StaticPrefs::media_rdd_process_enabled()) {
|
||||
supports |= AOMDecoder::IsAV1(aMimeType);
|
||||
}
|
||||
#endif
|
||||
@ -54,9 +55,9 @@ already_AddRefed<MediaDataDecoder> AgnosticDecoderModule::CreateVideoDecoder(
|
||||
#ifdef MOZ_AV1
|
||||
// see comment above about AV1 and the RDD process
|
||||
else if (AOMDecoder::IsAV1(aParams.mConfig.mMimeType) &&
|
||||
!StaticPrefs::MediaRddProcessEnabled() &&
|
||||
StaticPrefs::MediaAv1Enabled()) {
|
||||
if (StaticPrefs::MediaAv1UseDav1d()) {
|
||||
!StaticPrefs::media_rdd_process_enabled() &&
|
||||
StaticPrefs::media_av1_enabled()) {
|
||||
if (StaticPrefs::media_av1_use_dav1d()) {
|
||||
m = new DAV1DDecoder(aParams);
|
||||
} else {
|
||||
m = new AOMDecoder(aParams);
|
||||
|
@ -383,7 +383,7 @@ already_AddRefed<MediaDataDecoder> EMEDecoderModule::CreateVideoDecoder(
|
||||
const CreateDecoderParams& aParams) {
|
||||
MOZ_ASSERT(aParams.mConfig.mCrypto.IsEncrypted());
|
||||
|
||||
if (StaticPrefs::MediaEmeVideoBlank()) {
|
||||
if (StaticPrefs::media_eme_video_blank()) {
|
||||
EME_LOG("EMEDecoderModule::CreateVideoDecoder() creating a blank decoder.");
|
||||
RefPtr<PlatformDecoderModule> m(CreateBlankDecoderModule());
|
||||
return m->CreateVideoDecoder(aParams);
|
||||
@ -418,7 +418,7 @@ already_AddRefed<MediaDataDecoder> EMEDecoderModule::CreateAudioDecoder(
|
||||
MOZ_ASSERT(!SupportsMimeType(aParams.mConfig.mMimeType, nullptr));
|
||||
MOZ_ASSERT(mPDM);
|
||||
|
||||
if (StaticPrefs::MediaEmeAudioBlank()) {
|
||||
if (StaticPrefs::media_eme_audio_blank()) {
|
||||
EME_LOG("EMEDecoderModule::CreateAudioDecoder() creating a blank decoder.");
|
||||
RefPtr<PlatformDecoderModule> m(CreateBlankDecoderModule());
|
||||
return m->CreateAudioDecoder(aParams);
|
||||
|
@ -40,7 +40,7 @@ class FFmpegDecoderModule : public PlatformDecoderModule {
|
||||
}
|
||||
if (VPXDecoder::IsVPX(aParams.mConfig.mMimeType) &&
|
||||
aParams.mOptions.contains(CreateDecoderParams::Option::LowLatency) &&
|
||||
!StaticPrefs::MediaFfmpegLowLatencyEnabled()) {
|
||||
!StaticPrefs::media_ffmpeg_low_latency_enabled()) {
|
||||
// We refuse to create a decoder with low latency enabled if it's VP8 or
|
||||
// VP9 unless specifically allowed: this will fallback to libvpx later.
|
||||
// We do allow it for h264.
|
||||
|
@ -44,7 +44,7 @@ FFmpegLibWrapper::LinkResult FFmpegLibWrapper::Link() {
|
||||
}
|
||||
#ifdef MOZ_FFMPEG
|
||||
if (version < (54u << 16 | 35u << 8 | 1u) &&
|
||||
!StaticPrefs::MediaLibavcodecAllowObsolete()) {
|
||||
!StaticPrefs::media_libavcodec_allow_obsolete()) {
|
||||
// Refuse any libavcodec version prior to 54.35.1.
|
||||
// (Unless media.libavcodec.allow-obsolete==true)
|
||||
Unlink();
|
||||
|
@ -416,7 +416,7 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
|
||||
}
|
||||
|
||||
if ((adapter.VendorId == 0x1022 || adapter.VendorId == 0x1002) &&
|
||||
!StaticPrefs::PDMWMFSkipBlacklist()) {
|
||||
!StaticPrefs::media_wmf_skip_blacklist()) {
|
||||
for (const auto& model : sAMDPreUVD4) {
|
||||
if (adapter.DeviceId == model) {
|
||||
mIsAMDPreUVD4 = true;
|
||||
@ -506,7 +506,7 @@ DXVA2Manager* DXVA2Manager::CreateD3D9DXVA(
|
||||
|
||||
// DXVA processing takes up a lot of GPU resources, so limit the number of
|
||||
// videos we use DXVA with at any one time.
|
||||
uint32_t dxvaLimit = StaticPrefs::PDMWMFMaxDXVAVideos();
|
||||
uint32_t dxvaLimit = StaticPrefs::media_wmf_dxva_max_videos();
|
||||
|
||||
if (sDXVAVideosCount == dxvaLimit) {
|
||||
aFailureReason.AssignLiteral("Too many DXVA videos playing");
|
||||
@ -680,7 +680,7 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
|
||||
gfx::SurfaceFormat::NV12);
|
||||
|
||||
if (ImageBridgeChild::GetSingleton() &&
|
||||
StaticPrefs::PDMWMFUseSyncTexture() &&
|
||||
StaticPrefs::media_wmf_use_sync_texture() &&
|
||||
mDevice != DeviceManagerDx::Get()->GetCompositorDevice()) {
|
||||
// We use a syncobject to avoid the cost of the mutex lock when
|
||||
// compositing, and because it allows color conversion ocurring directly
|
||||
@ -695,7 +695,7 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
|
||||
} else {
|
||||
mTextureClientAllocator = new D3D11RecycleAllocator(
|
||||
aKnowsCompositor, mDevice, gfx::SurfaceFormat::NV12);
|
||||
if (StaticPrefs::PDMWMFUseSyncTexture()) {
|
||||
if (StaticPrefs::media_wmf_use_sync_texture()) {
|
||||
// We use a syncobject to avoid the cost of the mutex lock when
|
||||
// compositing, and because it allows color conversion ocurring directly
|
||||
// from this texture DXVA does not seem to accept IDXGIKeyedMutex textures
|
||||
@ -849,7 +849,7 @@ D3D11DXVA2Manager::InitInternal(layers::KnowsCompositor* aKnowsCompositor,
|
||||
}
|
||||
|
||||
if ((adapterDesc.VendorId == 0x1022 || adapterDesc.VendorId == 0x1002) &&
|
||||
!StaticPrefs::PDMWMFSkipBlacklist()) {
|
||||
!StaticPrefs::media_wmf_skip_blacklist()) {
|
||||
for (const auto& model : sAMDPreUVD4) {
|
||||
if (adapterDesc.DeviceId == model) {
|
||||
mIsAMDPreUVD4 = true;
|
||||
@ -1219,7 +1219,7 @@ DXVA2Manager* DXVA2Manager::CreateD3D11DXVA(
|
||||
ID3D11Device* aDevice) {
|
||||
// DXVA processing takes up a lot of GPU resources, so limit the number of
|
||||
// videos we use DXVA with at any one time.
|
||||
uint32_t dxvaLimit = StaticPrefs::PDMWMFMaxDXVAVideos();
|
||||
uint32_t dxvaLimit = StaticPrefs::media_wmf_dxva_max_videos();
|
||||
|
||||
if (sDXVAVideosCount == dxvaLimit) {
|
||||
aFailureReason.AssignLiteral("Too many DXVA videos playing");
|
||||
@ -1251,7 +1251,7 @@ bool DXVA2Manager::IsUnsupportedResolution(const uint32_t& aWidth,
|
||||
// AMD cards with UVD3 or earlier perform poorly trying to decode 1080p60 in
|
||||
// hardware, so use software instead. Pick 45 as an arbitrary upper bound for
|
||||
// the framerate we can handle.
|
||||
return !StaticPrefs::PDMWMFAMDHighResEnabled() && mIsAMDPreUVD4 &&
|
||||
return !StaticPrefs::media_wmf_amd_highres_enabled() && mIsAMDPreUVD4 &&
|
||||
(aWidth >= 1920 || aHeight >= 1088) && aFramerate > 45;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ void WMFDecoderModule::Init() {
|
||||
// If we're in the content process and the UseGPUDecoder pref is set, it
|
||||
// means that we've given up on the GPU process (it's been crashing) so we
|
||||
// should disable DXVA
|
||||
sDXVAEnabled = !StaticPrefs::MediaGpuProcessDecoder();
|
||||
sDXVAEnabled = !StaticPrefs::media_gpu_process_decoder();
|
||||
// We need to test for VPX in the content process as the GPUDecoderModule
|
||||
// directly calls WMFDecoderModule::Supports in the content process.
|
||||
// This unnecessary requirement will be fixed in bug 1534815.
|
||||
@ -89,7 +89,7 @@ void WMFDecoderModule::Init() {
|
||||
|
||||
sDXVAEnabled = sDXVAEnabled && gfx::gfxVars::CanUseHardwareVideoDecoding();
|
||||
testForVPx = testForVPx && gfx::gfxVars::CanUseHardwareVideoDecoding();
|
||||
if (testForVPx && StaticPrefs::MediaWmfVp9Enabled()) {
|
||||
if (testForVPx && StaticPrefs::media_wmf_vp9_enabled()) {
|
||||
gfx::WMFVPXVideoCrashGuard guard;
|
||||
if (!guard.Crashed()) {
|
||||
sUsableVPXMFT = CanCreateMFTDecoder(CLSID_WebmMfVpxDec);
|
||||
|
@ -443,11 +443,11 @@ class CreateDXVAManagerEvent : public Runnable {
|
||||
NS_ASSERTION(NS_IsMainThread(), "Must be on main thread.");
|
||||
const bool deblacklistingForTelemetry =
|
||||
XRE_IsGPUProcess() &&
|
||||
StaticPrefs::PDMWMFDeblacklistingForTelemetryInGPUProcess();
|
||||
StaticPrefs::media_wmf_deblacklisting_for_telemetry_in_gpu_process();
|
||||
nsACString* failureReason = &mFailureReason;
|
||||
nsCString secondFailureReason;
|
||||
if (mBackend == LayersBackend::LAYERS_D3D11 &&
|
||||
StaticPrefs::PDMWMFAllowD3D11() && IsWin8OrLater()) {
|
||||
StaticPrefs::media_wmf_dxva_d3d11_enabled() && IsWin8OrLater()) {
|
||||
const nsCString& blacklistedDLL = FindD3D11BlacklistedDLL();
|
||||
if (!deblacklistingForTelemetry && !blacklistedDLL.IsEmpty()) {
|
||||
failureReason->AppendPrintf("D3D11 blacklisted with DLL %s",
|
||||
@ -515,7 +515,8 @@ bool WMFVideoMFTManager::InitializeDXVA() {
|
||||
}
|
||||
|
||||
MediaResult WMFVideoMFTManager::ValidateVideoInfo() {
|
||||
if (mStreamType != H264 || StaticPrefs::PDMWMFAllowUnsupportedResolutions()) {
|
||||
if (mStreamType != H264 ||
|
||||
StaticPrefs::media_wmf_allow_unsupported_resolutions()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -586,8 +587,8 @@ MediaResult WMFVideoMFTManager::InitInternal() {
|
||||
attr->SetUINT32(CODECAPI_AVDecNumWorkerThreads,
|
||||
WMFDecoderModule::GetNumDecoderThreads());
|
||||
bool lowLatency =
|
||||
(StaticPrefs::PDMWMFLowLatencyEnabled() || IsWin10OrLater()) &&
|
||||
!StaticPrefs::PDMWMFLowLatencyForceDisabled();
|
||||
(StaticPrefs::media_wmf_low_latency_enabled() || IsWin10OrLater()) &&
|
||||
!StaticPrefs::media_mwf_low_latency_force_disabled();
|
||||
if (mLowLatency || lowLatency) {
|
||||
hr = attr->SetUINT32(CODECAPI_AVLowLatencyMode, TRUE);
|
||||
if (SUCCEEDED(hr)) {
|
||||
@ -1150,7 +1151,7 @@ nsCString WMFVideoMFTManager::GetDescriptionName() const {
|
||||
bool hw = IsHardwareAccelerated(failureReason);
|
||||
return nsPrintfCString("wmf %s video decoder - %s",
|
||||
hw ? "hardware" : "software",
|
||||
hw ? StaticPrefs::PDMWMFUseNV12Format() &&
|
||||
hw ? StaticPrefs::media_wmf_use_nv12_format() &&
|
||||
gfx::DeviceManagerDx::Get()->CanUseNV12()
|
||||
? "nv12"
|
||||
: "rgba32"
|
||||
|
@ -530,7 +530,7 @@ bool MediaChangeMonitor::CanRecycleDecoder() const {
|
||||
AssertOnTaskQueue();
|
||||
|
||||
MOZ_ASSERT(mDecoder);
|
||||
return StaticPrefs::MediaDecoderRecycleEnabled() &&
|
||||
return StaticPrefs::media_decoder_recycle_enabled() &&
|
||||
mDecoder->SupportDecoderRecycling();
|
||||
}
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ void AudioContext::ReportBlocked() {
|
||||
"BlockAutoplayWebAudioStartError");
|
||||
mWasAllowedToStart = false;
|
||||
|
||||
if (!StaticPrefs::MediaBlockEventEnabled()) {
|
||||
if (!StaticPrefs::media_autoplay_block_event_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ nsTArray<UniquePtr<TrackInfo>> WebMDecoder::GetTracksInfo(
|
||||
}
|
||||
}
|
||||
#ifdef MOZ_AV1
|
||||
if (StaticPrefs::MediaAv1Enabled() && IsAV1CodecString(codec)) {
|
||||
if (StaticPrefs::media_av1_enabled() && IsAV1CodecString(codec)) {
|
||||
tracks.AppendElement(
|
||||
CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
|
||||
NS_LITERAL_CSTRING("video/av1"), aType));
|
||||
@ -84,7 +84,7 @@ nsTArray<UniquePtr<TrackInfo>> WebMDecoder::GetTracksInfo(
|
||||
|
||||
/* static */
|
||||
bool WebMDecoder::IsSupportedType(const MediaContainerType& aContainerType) {
|
||||
if (!StaticPrefs::MediaWebMEnabled()) {
|
||||
if (!StaticPrefs::media_webm_enabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ already_AddRefed<nsISpeechRecognitionService> GetSpeechRecognitionService(
|
||||
speechRecognitionService = DEFAULT_RECOGNITION_SERVICE;
|
||||
}
|
||||
|
||||
if (StaticPrefs::MediaWebspeechTextFakeRecognitionService()) {
|
||||
if (StaticPrefs::media_webspeech_test_fake_recognition_service()) {
|
||||
speechRecognitionServiceCID =
|
||||
NS_SPEECH_RECOGNITION_SERVICE_CONTRACTID_PREFIX "fake";
|
||||
} else {
|
||||
@ -142,7 +142,7 @@ SpeechRecognition::SpeechRecognition(nsPIDOMWindowInner* aOwnerWindow)
|
||||
mMaxAlternatives(1) {
|
||||
SR_LOG("created SpeechRecognition");
|
||||
|
||||
if (StaticPrefs::MediaWebspeechTestEnable()) {
|
||||
if (StaticPrefs::media_webspeech_test_enable()) {
|
||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||
obs->AddObserver(this, SPEECH_RECOGNITION_TEST_EVENT_REQUEST_TOPIC, false);
|
||||
obs->AddObserver(this, SPEECH_RECOGNITION_TEST_END_TOPIC, false);
|
||||
@ -194,8 +194,8 @@ bool SpeechRecognition::IsAuthorized(JSContext* aCx, JSObject* aGlobal) {
|
||||
(speechRecognition == nsIPermissionManager::ALLOW_ACTION);
|
||||
|
||||
return (hasPermission ||
|
||||
StaticPrefs::MediaWebspeechRecognitionForceEnable() ||
|
||||
StaticPrefs::MediaWebspeechTestEnable()) &&
|
||||
StaticPrefs::media_webspeech_recognition_force_enable() ||
|
||||
StaticPrefs::media_webspeech_test_enable()) &&
|
||||
StaticPrefs::media_webspeech_recognition_enable();
|
||||
}
|
||||
|
||||
@ -608,7 +608,7 @@ SpeechRecognition::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||
obs->RemoveObserver(this, SPEECH_RECOGNITION_TEST_EVENT_REQUEST_TOPIC);
|
||||
obs->RemoveObserver(this, SPEECH_RECOGNITION_TEST_END_TOPIC);
|
||||
} else if (StaticPrefs::MediaWebspeechTextFakeFsmEvents() &&
|
||||
} else if (StaticPrefs::media_webspeech_test_fake_fsm_events() &&
|
||||
!strcmp(aTopic, SPEECH_RECOGNITION_TEST_EVENT_REQUEST_TOPIC)) {
|
||||
ProcessTestEventRequest(aSubject, nsDependentString(aData));
|
||||
}
|
||||
@ -626,7 +626,7 @@ void SpeechRecognition::ProcessTestEventRequest(nsISupports* aSubject,
|
||||
SpeechRecognitionErrorCode::Audio_capture, // TODO different codes?
|
||||
NS_LITERAL_STRING("AUDIO_ERROR test event"));
|
||||
} else {
|
||||
NS_ASSERTION(StaticPrefs::MediaWebspeechTextFakeRecognitionService(),
|
||||
NS_ASSERTION(StaticPrefs::media_webspeech_test_fake_recognition_service(),
|
||||
"Got request for fake recognition service event, but "
|
||||
"media.webspeech.test.fake_recognition_service is unset");
|
||||
|
||||
|
@ -58,7 +58,7 @@ FakeSpeechRecognitionService::Abort() { return NS_OK; }
|
||||
NS_IMETHODIMP
|
||||
FakeSpeechRecognitionService::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData) {
|
||||
MOZ_ASSERT(StaticPrefs::MediaWebspeechTextFakeRecognitionService(),
|
||||
MOZ_ASSERT(StaticPrefs::media_webspeech_test_fake_recognition_service(),
|
||||
"Got request to fake recognition service event, but "
|
||||
"media.webspeech.test.fake_recognition_service is not set");
|
||||
|
||||
|
@ -323,7 +323,7 @@ nsSynthVoiceRegistry::RemoveVoice(nsISpeechService* aService,
|
||||
mUriVoiceMap.Remove(aUri);
|
||||
|
||||
if (retval->mIsQueued &&
|
||||
!StaticPrefs::MediaWebspeechSynthForceGlobalQueue()) {
|
||||
!StaticPrefs::media_webspeech_synth_force_global_queue()) {
|
||||
// Check if this is the last queued voice, and disable the global queue if
|
||||
// it is.
|
||||
bool queued = false;
|
||||
@ -663,7 +663,8 @@ void nsSynthVoiceRegistry::Speak(const nsAString& aText, const nsAString& aLang,
|
||||
|
||||
aTask->SetChosenVoiceURI(voice->mUri);
|
||||
|
||||
if (mUseGlobalQueue || StaticPrefs::MediaWebspeechSynthForceGlobalQueue()) {
|
||||
if (mUseGlobalQueue ||
|
||||
StaticPrefs::media_webspeech_synth_force_global_queue()) {
|
||||
LOG(LogLevel::Debug,
|
||||
("nsSynthVoiceRegistry::Speak queueing text='%s' lang='%s' uri='%s' "
|
||||
"rate=%f pitch=%f",
|
||||
@ -733,8 +734,8 @@ void nsSynthVoiceRegistry::SetIsSpeaking(bool aIsSpeaking) {
|
||||
|
||||
// Only set to 'true' if global queue is enabled.
|
||||
mIsSpeaking =
|
||||
aIsSpeaking &&
|
||||
(mUseGlobalQueue || StaticPrefs::MediaWebspeechSynthForceGlobalQueue());
|
||||
aIsSpeaking && (mUseGlobalQueue ||
|
||||
StaticPrefs::media_webspeech_synth_force_global_queue());
|
||||
|
||||
nsTArray<SpeechSynthesisParent*> ssplist;
|
||||
GetAllSpeechSynthActors(ssplist);
|
||||
|
@ -936,7 +936,7 @@ bool GPUProcessManager::CreateContentVRManager(
|
||||
void GPUProcessManager::CreateContentRemoteDecoderManager(
|
||||
base::ProcessId aOtherProcess,
|
||||
ipc::Endpoint<PRemoteDecoderManagerChild>* aOutEndpoint) {
|
||||
if (!EnsureGPUReady() || !StaticPrefs::MediaGpuProcessDecoder() ||
|
||||
if (!EnsureGPUReady() || !StaticPrefs::media_gpu_process_decoder() ||
|
||||
!mDecodeVideoOnGpuProcess) {
|
||||
return;
|
||||
}
|
||||
|
@ -223,11 +223,11 @@ D3D11RecycleAllocator::D3D11RecycleAllocator(
|
||||
gfx::SurfaceFormat aPreferredFormat)
|
||||
: TextureClientRecycleAllocator(aAllocator),
|
||||
mDevice(aDevice),
|
||||
mCanUseNV12(StaticPrefs::PDMWMFUseNV12Format() &&
|
||||
mCanUseNV12(StaticPrefs::media_wmf_use_nv12_format() &&
|
||||
gfx::DeviceManagerDx::Get()->CanUseNV12()),
|
||||
mCanUseP010(StaticPrefs::PDMWMFUseNV12Format() &&
|
||||
mCanUseP010(StaticPrefs::media_wmf_use_nv12_format() &&
|
||||
gfx::DeviceManagerDx::Get()->CanUseP010()),
|
||||
mCanUseP016(StaticPrefs::PDMWMFUseNV12Format() &&
|
||||
mCanUseP016(StaticPrefs::media_wmf_use_nv12_format() &&
|
||||
gfx::DeviceManagerDx::Get()->CanUseP016()) {
|
||||
SetPreferredSurfaceFormat(aPreferredFormat);
|
||||
}
|
||||
@ -256,7 +256,7 @@ already_AddRefed<TextureClient> D3D11RecycleAllocator::CreateOrRecycleClient(
|
||||
mImageDevice = device;
|
||||
|
||||
TextureAllocationFlags allocFlags = TextureAllocationFlags::ALLOC_DEFAULT;
|
||||
if (StaticPrefs::PDMWMFUseSyncTexture() ||
|
||||
if (StaticPrefs::media_wmf_use_sync_texture() ||
|
||||
mDevice == DeviceManagerDx::Get()->GetCompositorDevice()) {
|
||||
// If our device is the compositor device, we don't need any synchronization
|
||||
// in practice.
|
||||
|
@ -449,7 +449,7 @@ bool D3D11Checks::DoesRemotePresentWork(IDXGIAdapter* adapter) {
|
||||
|
||||
auto doesP010Work = [&]() {
|
||||
if (gfxVars::DXP010Blocked() &&
|
||||
!StaticPrefs::PDMWMFForceAllowP010Format()) {
|
||||
!StaticPrefs::media_wmf_force_allow_p010_format()) {
|
||||
return false;
|
||||
}
|
||||
UINT formatSupport;
|
||||
@ -459,7 +459,7 @@ bool D3D11Checks::DoesRemotePresentWork(IDXGIAdapter* adapter) {
|
||||
|
||||
auto doesP016Work = [&]() {
|
||||
if (gfxVars::DXP016Blocked() &&
|
||||
!StaticPrefs::PDMWMFForceAllowP010Format()) {
|
||||
!StaticPrefs::media_wmf_force_allow_p010_format()) {
|
||||
return false;
|
||||
}
|
||||
UINT formatSupport;
|
||||
|
@ -2427,7 +2427,7 @@ void gfxPlatform::InitAcceleration() {
|
||||
gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
|
||||
discardFailureId, &status))) {
|
||||
if (status == nsIGfxInfo::FEATURE_STATUS_OK ||
|
||||
StaticPrefs::HardwareVideoDecodingForceEnabled()) {
|
||||
StaticPrefs::media_hardware_video_decoding_force_enabled()) {
|
||||
sLayersSupportsHardwareVideoDecoding = true;
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ WebrtcVideoEncoder* MediaCodecVideoCodec::CreateEncoder(CodecType aCodecType) {
|
||||
CSFLogDebug(LOGTAG, "%s ", __FUNCTION__);
|
||||
if (aCodecType == CODEC_VP8) {
|
||||
if (StaticPrefs::
|
||||
MediaNavigatorHardwareVp8encodeAccelerationRemoteEnabled()) {
|
||||
media_navigator_hardware_vp8_encode_acceleration_remote_enabled()) {
|
||||
return new WebrtcMediaCodecVP8VideoRemoteEncoder();
|
||||
} else {
|
||||
return new WebrtcMediaCodecVP8VideoEncoder();
|
||||
|
@ -20,12 +20,12 @@ WebrtcVideoDecoder* MediaDataDecoderCodec::CreateDecoder(
|
||||
switch (aCodecType) {
|
||||
case webrtc::VideoCodecType::kVideoCodecVP8:
|
||||
case webrtc::VideoCodecType::kVideoCodecVP9:
|
||||
if (!StaticPrefs::MediaNavigatorMediadatadecoderVPXEnabled()) {
|
||||
if (!StaticPrefs::media_navigator_mediadatadecoder_vpx_enabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
break;
|
||||
case webrtc::VideoCodecType::kVideoCodecH264:
|
||||
if (!StaticPrefs::MediaNavigatorMediadatadecoderH264Enabled()) {
|
||||
if (!StaticPrefs::media_navigator_mediadatadecoder_h264_enabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
break;
|
||||
|
@ -5474,29 +5474,15 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.autoplay.enabled.user-gestures-needed",
|
||||
MediaAutoplayUserGesturesNeeded,
|
||||
media_autoplay_enabled_user_gestures_needed,
|
||||
bool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.autoplay.allow-muted",
|
||||
MediaAutoplayAllowMuted,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.autoplay.blackList-override-default",
|
||||
MediaAutoplayBlackListOverrideDefault,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
// File-backed MediaCache size.
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.cache_size",
|
||||
MediaCacheSize,
|
||||
media_cache_size,
|
||||
RelaxedAtomicUint32, 512000 // Measured in KiB
|
||||
)
|
||||
|
||||
@ -5505,7 +5491,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.cache_size.cellular",
|
||||
MediaCacheCellularSize,
|
||||
media_cache_size_cellular,
|
||||
RelaxedAtomicUint32, 32768 // Measured in KiB
|
||||
)
|
||||
|
||||
@ -5515,7 +5501,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.memory_cache_max_size",
|
||||
MediaMemoryCacheMaxSize,
|
||||
media_memory_cache_max_size,
|
||||
uint32_t, 8192 // Measured in KiB
|
||||
)
|
||||
|
||||
@ -5524,7 +5510,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.memory_caches_combined_limit_kb",
|
||||
MediaMemoryCachesCombinedLimitKb,
|
||||
media_memory_caches_combined_limit_kb,
|
||||
uint32_t, 524288
|
||||
)
|
||||
|
||||
@ -5533,7 +5519,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.memory_caches_combined_limit_pc_sysmem",
|
||||
MediaMemoryCachesCombinedLimitPcSysmem,
|
||||
media_memory_caches_combined_limit_pc_sysmem,
|
||||
uint32_t, 5 // A percentage
|
||||
)
|
||||
|
||||
@ -5542,13 +5528,13 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.cache_resume_threshold",
|
||||
MediaCacheResumeThreshold,
|
||||
media_cache_resume_threshold,
|
||||
RelaxedAtomicUint32, 30
|
||||
)
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.cache_resume_threshold.cellular",
|
||||
MediaCacheCellularResumeThreshold,
|
||||
media_cache_resume_threshold_cellular,
|
||||
RelaxedAtomicUint32, 10
|
||||
)
|
||||
|
||||
@ -5558,13 +5544,13 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.cache_readahead_limit",
|
||||
MediaCacheReadaheadLimit,
|
||||
media_cache_readahead_limit,
|
||||
RelaxedAtomicUint32, 60
|
||||
)
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.cache_readahead_limit.cellular",
|
||||
MediaCacheCellularReadaheadLimit,
|
||||
media_cache_readahead_limit_cellular,
|
||||
RelaxedAtomicUint32, 30
|
||||
)
|
||||
|
||||
@ -5572,7 +5558,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.resampling.enabled",
|
||||
MediaResamplingEnabled,
|
||||
media_resampling_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
@ -5585,7 +5571,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.forcestereo.enabled",
|
||||
MediaForcestereoEnabled,
|
||||
media_forcestereo_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -5594,7 +5580,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.ruin-av-sync.enabled",
|
||||
MediaRuinAvSyncEnabled,
|
||||
media_ruin_av_sync_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
@ -5620,7 +5606,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.eme.enabled",
|
||||
MediaEmeEnabled,
|
||||
media_eme_enabled,
|
||||
bool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -5641,7 +5627,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.clearkey.persistent-license.enabled",
|
||||
MediaClearkeyPersistentLicenseEnabled,
|
||||
media_clearkey_persistent_license_enabled,
|
||||
bool, false
|
||||
)
|
||||
|
||||
@ -5652,7 +5638,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.gmp.insecure.allow",
|
||||
MediaGmpInsecureAllow,
|
||||
media_gmp_insecure_allow,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
#endif
|
||||
@ -5663,7 +5649,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.use-blank-decoder",
|
||||
MediaUseBlankDecoder,
|
||||
media_use_blank_decoder,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
@ -5675,7 +5661,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.gpu-process-decoder",
|
||||
MediaGpuProcessDecoder,
|
||||
media_gpu_process_decoder,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -5696,7 +5682,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.rdd-process.enabled",
|
||||
MediaRddProcessEnabled,
|
||||
media_rdd_process_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -5704,7 +5690,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.rdd-process.startup_timeout_ms",
|
||||
MediaRddProcessStartupTimeoutMs,
|
||||
media_rdd_process_startup_timeout_ms,
|
||||
RelaxedAtomicInt32, 5000
|
||||
)
|
||||
|
||||
@ -5720,7 +5706,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.rdd-vorbis.enabled",
|
||||
MediaRddVorbisEnabled,
|
||||
media_rdd_vorbis_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -5731,14 +5717,14 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.android-media-codec.enabled",
|
||||
MediaAndroidMediaCodecEnabled,
|
||||
media_android_media_codec_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.android-media-codec.preferred",
|
||||
MediaAndroidMediaCodecPreferred,
|
||||
media_android_media_codec_preferred,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -5748,7 +5734,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.omx.enabled",
|
||||
MediaOmxEnabled,
|
||||
media_omx_enabled,
|
||||
bool, false
|
||||
)
|
||||
#endif
|
||||
@ -5763,7 +5749,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.ffmpeg.enabled",
|
||||
MediaFfmpegEnabled,
|
||||
media_ffmpeg_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -5771,7 +5757,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.libavcodec.allow-obsolete",
|
||||
MediaLibavcodecAllowObsolete,
|
||||
media_libavcodec_allow_obsolete,
|
||||
bool, false
|
||||
)
|
||||
|
||||
@ -5781,7 +5767,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.ffvpx.enabled",
|
||||
MediaFfvpxEnabled,
|
||||
media_ffvpx_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
#endif
|
||||
@ -5790,7 +5776,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.ffmpeg.low-latency.enabled",
|
||||
MediaFfmpegLowLatencyEnabled,
|
||||
media_ffmpeg_low_latency_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
#endif
|
||||
@ -5800,7 +5786,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.enabled",
|
||||
MediaWmfEnabled,
|
||||
media_wmf_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -5808,91 +5794,91 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.decoder-doctor.wmf-disabled-is-failure",
|
||||
MediaDecoderDoctorWmfDisabledIsFailure,
|
||||
media_decoder_doctor_wmf_disabled_is_failure,
|
||||
bool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.dxva.d3d11.enabled",
|
||||
PDMWMFAllowD3D11,
|
||||
media_wmf_dxva_d3d11_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.dxva.max-videos",
|
||||
PDMWMFMaxDXVAVideos,
|
||||
media_wmf_dxva_max_videos,
|
||||
RelaxedAtomicUint32, 8
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.use-nv12-format",
|
||||
PDMWMFUseNV12Format,
|
||||
media_wmf_use_nv12_format,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.force.allow-p010-format",
|
||||
PDMWMFForceAllowP010Format,
|
||||
media_wmf_force_allow_p010_format,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Once,
|
||||
"media.wmf.use-sync-texture",
|
||||
PDMWMFUseSyncTexture,
|
||||
media_wmf_use_sync_texture,
|
||||
bool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.low-latency.enabled",
|
||||
PDMWMFLowLatencyEnabled,
|
||||
media_wmf_low_latency_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.low-latency.force-disabled",
|
||||
PDMWMFLowLatencyForceDisabled,
|
||||
media_mwf_low_latency_force_disabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.skip-blacklist",
|
||||
PDMWMFSkipBlacklist,
|
||||
media_wmf_skip_blacklist,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.deblacklisting-for-telemetry-in-gpu-process",
|
||||
PDMWMFDeblacklistingForTelemetryInGPUProcess,
|
||||
media_wmf_deblacklisting_for_telemetry_in_gpu_process,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.amd.highres.enabled",
|
||||
PDMWMFAMDHighResEnabled,
|
||||
media_wmf_amd_highres_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wmf.allow-unsupported-resolutions",
|
||||
PDMWMFAllowUnsupportedResolutions,
|
||||
media_wmf_allow_unsupported_resolutions,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Once,
|
||||
"media.wmf.vp9.enabled",
|
||||
MediaWmfVp9Enabled,
|
||||
media_wmf_vp9_enabled,
|
||||
bool, true
|
||||
)
|
||||
#endif // MOZ_WMF
|
||||
@ -5900,7 +5886,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Once,
|
||||
"media.hardware-video-decoding.force-enabled",
|
||||
HardwareVideoDecodingForceEnabled,
|
||||
media_hardware_video_decoding_force_enabled,
|
||||
bool, false
|
||||
)
|
||||
|
||||
@ -5913,7 +5899,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.decoder.recycle.enabled",
|
||||
MediaDecoderRecycleEnabled,
|
||||
media_decoder_recycle_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -5922,34 +5908,34 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.decoder.skip-to-next-key-frame.enabled",
|
||||
MediaDecoderSkipToNextKeyFrameEnabled,
|
||||
media_decoder_skip_to_next_key_frame_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.gmp.decoder.enabled",
|
||||
MediaGmpDecoderEnabled,
|
||||
media_gmp_decoder_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.eme.audio.blank",
|
||||
MediaEmeAudioBlank,
|
||||
media_eme_audio_blank,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.eme.video.blank",
|
||||
MediaEmeVideoBlank,
|
||||
media_eme_video_blank,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.eme.chromium-api.video-shmems",
|
||||
MediaEmeChromiumApiVideoShmems,
|
||||
media_eme_chromium_api_video_shmems,
|
||||
RelaxedAtomicUint32, 6
|
||||
)
|
||||
|
||||
@ -5957,7 +5943,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.suspend-bkgnd-video.enabled",
|
||||
MediaSuspendBkgndVideoEnabled,
|
||||
media_suspend_bkgnd_video_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -5966,14 +5952,14 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.suspend-bkgnd-video.delay-ms",
|
||||
MediaSuspendBkgndVideoDelayMs,
|
||||
media_suspend_bkgnd_video_delay_ms,
|
||||
RelaxedAtomicUint32, 10000
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.dormant-on-pause-timeout-ms",
|
||||
MediaDormantOnPauseTimeoutMs,
|
||||
media_dormant_on_pause_timeout_ms,
|
||||
RelaxedAtomicInt32, 5000
|
||||
)
|
||||
|
||||
@ -5996,28 +5982,28 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.webspeech.synth.force_global_queue",
|
||||
MediaWebspeechSynthForceGlobalQueue,
|
||||
media_webspeech_synth_force_global_queue,
|
||||
bool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.webspeech.test.enable",
|
||||
MediaWebspeechTestEnable,
|
||||
media_webspeech_test_enable,
|
||||
bool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.webspeech.test.fake_fsm_events",
|
||||
MediaWebspeechTextFakeFsmEvents,
|
||||
media_webspeech_test_fake_fsm_events,
|
||||
bool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.webspeech.test.fake_recognition_service",
|
||||
MediaWebspeechTextFakeRecognitionService,
|
||||
media_webspeech_test_fake_recognition_service,
|
||||
bool, false
|
||||
)
|
||||
|
||||
@ -6033,7 +6019,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.webspeech.recognition.force_enable",
|
||||
MediaWebspeechRecognitionForceEnable,
|
||||
media_webspeech_recognition_force_enable,
|
||||
bool, false
|
||||
)
|
||||
|
||||
@ -6054,7 +6040,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.encoder.webm.enabled",
|
||||
MediaEncoderWebMEnabled,
|
||||
media_encoder_webm_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -6068,7 +6054,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.audio-max-decode-error",
|
||||
MediaAudioMaxDecodeError,
|
||||
media_audio_max_decode_error,
|
||||
uint32_t, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -6082,7 +6068,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.video-max-decode-error",
|
||||
MediaVideoMaxDecodeError,
|
||||
media_video_max_decode_error,
|
||||
uint32_t, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -6091,7 +6077,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.opus.enabled",
|
||||
MediaOpusEnabled,
|
||||
media_opus_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -6099,7 +6085,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.wave.enabled",
|
||||
MediaWaveEnabled,
|
||||
media_wave_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -6107,7 +6093,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.ogg.enabled",
|
||||
MediaOggEnabled,
|
||||
media_ogg_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -6115,7 +6101,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.webm.enabled",
|
||||
MediaWebMEnabled,
|
||||
media_webm_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -6132,7 +6118,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.av1.enabled",
|
||||
MediaAv1Enabled,
|
||||
media_av1_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -6140,7 +6126,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.av1.use-dav1d",
|
||||
MediaAv1UseDav1d,
|
||||
media_av1_use_dav1d,
|
||||
#if defined(XP_WIN) && !defined(_ARM64_)
|
||||
RelaxedAtomicBool, true
|
||||
#elif defined(XP_MACOSX)
|
||||
@ -6155,7 +6141,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.flac.enabled",
|
||||
MediaFlacEnabled,
|
||||
media_flac_enabled,
|
||||
bool, true
|
||||
)
|
||||
|
||||
@ -6168,7 +6154,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.hls.enabled",
|
||||
MediaHlsEnabled,
|
||||
media_hls_enabled,
|
||||
bool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -6179,7 +6165,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.hls.max-allocations",
|
||||
MediaHlsMaxAllocations,
|
||||
media_hls_max_allocations,
|
||||
uint32_t, 20
|
||||
)
|
||||
#endif
|
||||
@ -6192,7 +6178,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.mp4.enabled",
|
||||
MediaMp4Enabled,
|
||||
media_mp4_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -6203,7 +6189,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.playback.warnings-as-errors",
|
||||
MediaPlaybackWarningsAsErrors,
|
||||
media_playback_warnings_as_errors,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
@ -6212,7 +6198,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.resume-bkgnd-video-on-tabhover",
|
||||
MediaResumeBkgndVideoOnTabhover,
|
||||
media_resume_bkgnd_video_on_tabhover,
|
||||
bool, true
|
||||
)
|
||||
|
||||
@ -6233,63 +6219,63 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.seamless-looping",
|
||||
MediaSeamlessLooping,
|
||||
media_seamless_looping,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.autoplay.block-event.enabled",
|
||||
MediaBlockEventEnabled,
|
||||
media_autoplay_block_event_enabled,
|
||||
bool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.media-capabilities.enabled",
|
||||
MediaCapabilitiesEnabled,
|
||||
media_media_capabilities_enabled,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.media-capabilities.screen.enabled",
|
||||
MediaCapabilitiesScreenEnabled,
|
||||
media_media_capabilities_screen_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.benchmark.vp9.fps",
|
||||
MediaBenchmarkVp9Fps,
|
||||
media_benchmark_vp9_fps,
|
||||
RelaxedAtomicUint32, 0
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.benchmark.vp9.threshold",
|
||||
MediaBenchmarkVp9Threshold,
|
||||
media_benchmark_vp9_threshold,
|
||||
RelaxedAtomicUint32, 150
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.benchmark.vp9.versioncheck",
|
||||
MediaBenchmarkVp9Versioncheck,
|
||||
media_benchmark_vp9_versioncheck,
|
||||
RelaxedAtomicUint32, 0
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.benchmark.frames",
|
||||
MediaBenchmarkFrames,
|
||||
media_benchmark_frames,
|
||||
RelaxedAtomicUint32, 300
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.benchmark.timeout",
|
||||
MediaBenchmarkTimeout,
|
||||
media_benchmark_timeout,
|
||||
RelaxedAtomicUint32, 1000
|
||||
)
|
||||
|
||||
@ -6368,7 +6354,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.navigator.hardware.vp8_encode.acceleration_remote_enabled",
|
||||
MediaNavigatorHardwareVp8encodeAccelerationRemoteEnabled,
|
||||
media_navigator_hardware_vp8_encode_acceleration_remote_enabled,
|
||||
bool, true
|
||||
)
|
||||
|
||||
@ -6389,7 +6375,7 @@ PREF("media.navigator.hardware.vp8_decode.acceleration_enabled", bool, false)
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.navigator.mediadatadecoder_vpx_enabled",
|
||||
MediaNavigatorMediadatadecoderVPXEnabled,
|
||||
media_navigator_mediadatadecoder_vpx_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
@ -6405,7 +6391,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"media.navigator.mediadatadecoder_h264_enabled",
|
||||
MediaNavigatorMediadatadecoderH264Enabled,
|
||||
media_navigator_mediadatadecoder_h264_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
Loading…
Reference in New Issue
Block a user