Bug 902000 - Make the load adaption depend on a pref. r=jesup

This commit is contained in:
Gian-Carlo Pascutto 2013-10-29 15:00:28 +01:00
parent f58a807d09
commit cef96a16b8
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "mozilla/TimeStamp.h"
#include "mozilla/Util.h"
#include "mozilla/Services.h"
#include "mozilla/Preferences.h"
#if defined(ANDROID) || defined(LINUX) || defined(XP_MACOSX)
#include <sys/time.h>
@ -322,6 +323,10 @@ LoadMonitor::GetSystemLoad() {
nsresult
LoadMonitor::Init(nsRefPtr<LoadMonitor> &self)
{
if (!Preferences::GetBool("media.navigator.load_adapt", false)) {
return NS_OK;
}
#if defined(PR_LOGGING)
if (!gLoadMonitorLog)
gLoadMonitorLog = PR_NewLogModule("LoadMonitor");

View File

@ -232,6 +232,7 @@ pref("media.navigator.video.default_fps",30);
pref("media.navigator.video.default_minfps",10);
pref("media.navigator.video.max_fs", 0); // unrestricted
pref("media.navigator.video.max_fr", 0); // unrestricted
pref("media.navigator.load_adapt", false);
pref("media.peerconnection.enabled", true);
pref("media.navigator.permission.disabled", false);
pref("media.peerconnection.default_iceservers", "[{\"url\": \"stun:stun.services.mozilla.com\"}]");