mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 973761 - [WebRTC] Check device capabilities (HW codec and Android ver) before enabling vp8 hardware acceleration on Fennec. r=bjacob, r=gcp
This commit is contained in:
parent
3a40673d1b
commit
e729c53d96
@ -277,6 +277,9 @@ pref("media.peerconnection.capture_delay", 50);
|
||||
pref("media.peerconnection.capture_delay", 50);
|
||||
#elif defined(ANDROID)
|
||||
pref("media.peerconnection.capture_delay", 100);
|
||||
// Whether to enable Webrtc Hardware acceleration support
|
||||
pref("media.navigator.hardware.vp8_encode.acceleration_enabled", false);
|
||||
pref("media.navigator.hardware.vp8_decode.acceleration_enabled", false);
|
||||
#elif defined(XP_LINUX)
|
||||
pref("media.peerconnection.capture_delay", 70);
|
||||
#else
|
||||
|
@ -480,7 +480,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
|
||||
{
|
||||
// Honeycomb Samsung devices are whitelisted.
|
||||
// All other Honeycomb devices are blacklisted.
|
||||
bool isWhitelisted =
|
||||
bool isWhitelisted =
|
||||
cManufacturer.Equals("samsung", nsCaseInsensitiveCStringComparator());
|
||||
|
||||
if (!isWhitelisted) {
|
||||
@ -549,6 +549,24 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (aFeature == FEATURE_WEBRTC_HW_ACCELERATION) {
|
||||
NS_LossyConvertUTF16toASCII cManufacturer(mManufacturer);
|
||||
NS_LossyConvertUTF16toASCII cModel(mModel);
|
||||
NS_LossyConvertUTF16toASCII cHardware(mHardware);
|
||||
|
||||
if (cHardware.Equals("hammerhead") &&
|
||||
CompareVersions(mOSVersion.get(), "4.4.2") >= 0 &&
|
||||
cManufacturer.Equals("lge", nsCaseInsensitiveCStringComparator()) &&
|
||||
cModel.Equals("nexus 5", nsCaseInsensitiveCStringComparator())) {
|
||||
*aStatus = nsIGfxInfo::FEATURE_NO_INFO;
|
||||
return NS_OK;
|
||||
} else {
|
||||
// Blocklist all other devices except Nexus 5 which VP8 hardware acceleration is supported
|
||||
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os);
|
||||
@ -623,4 +641,4 @@ uint32_t GfxInfo::OperatingSystemVersion()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,8 @@ interface nsIGfxInfo : nsISupports
|
||||
const long FEATURE_WEBGL_MSAA = 8;
|
||||
/* Whether Stagefright is supported */
|
||||
const long FEATURE_STAGEFRIGHT = 9;
|
||||
/* Whether Webrtc Hardware acceleration is supported */
|
||||
const long FEATURE_WEBRTC_HW_ACCELERATION = 10;
|
||||
|
||||
/*
|
||||
* A set of return values from GetFeatureStatus
|
||||
|
Loading…
Reference in New Issue
Block a user