зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1284007 - Remove obsolete OS X version checks in dom/media. r=cpearce, jesup.
This commit is contained in:
Родитель
b5ca635c39
Коммит
51626f0a16
|
@ -75,9 +75,6 @@
|
|||
#include "MediaPermissionGonk.h"
|
||||
#endif
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#include "nsCocoaFeatures.h"
|
||||
#endif
|
||||
#if defined (XP_WIN)
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include <winsock2.h>
|
||||
|
@ -2128,24 +2125,17 @@ MediaManager::GetUserMedia(nsPIDOMWindowInner* aWindow,
|
|||
case MediaSourceEnum::Window:
|
||||
// Deny screensharing request if support is disabled, or
|
||||
// the requesting document is not from a host on the whitelist, or
|
||||
// we're on Mac OSX 10.6 and WinXP until proved that they work
|
||||
// we're on WinXP until proved that it works
|
||||
if (!Preferences::GetBool(((videoType == MediaSourceEnum::Browser)?
|
||||
"media.getusermedia.browser.enabled" :
|
||||
"media.getusermedia.screensharing.enabled"),
|
||||
false) ||
|
||||
#if defined(XP_MACOSX) || defined(XP_WIN)
|
||||
#if defined(XP_WIN)
|
||||
(
|
||||
// Allow tab sharing for all platforms including XP and OSX 10.6
|
||||
// Allow tab sharing for all platforms including XP
|
||||
(videoType != MediaSourceEnum::Browser) &&
|
||||
!Preferences::GetBool("media.getusermedia.screensharing.allow_on_old_platforms",
|
||||
false) &&
|
||||
#if defined(XP_MACOSX)
|
||||
!nsCocoaFeatures::OnLionOrLater()
|
||||
#endif
|
||||
#if defined (XP_WIN)
|
||||
!IsVistaOrLater()
|
||||
#endif
|
||||
) ||
|
||||
false) && !IsVistaOrLater()) ||
|
||||
#endif
|
||||
(!privileged && !HostIsHttps(*docURI)) ||
|
||||
!(loop || HostHasPermission(*docURI))) {
|
||||
|
|
|
@ -17,9 +17,6 @@
|
|||
#include "mozilla/WindowsVersion.h"
|
||||
#include "WMFDecoderModule.h"
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
#include "nsCocoaFeatures.h"
|
||||
#endif
|
||||
#include "nsContentCID.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
|
@ -291,12 +288,6 @@ MediaKeySystemAccess::GetKeySystemStatus(const nsAString& aKeySystem,
|
|||
aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Adobe EME");
|
||||
return MediaKeySystemStatus::Cdm_not_supported;
|
||||
}
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
if (!nsCocoaFeatures::OnLionOrLater()) {
|
||||
aOutMessage = NS_LITERAL_CSTRING("Minimum MacOSX version (10.7) not met for Adobe EME");
|
||||
return MediaKeySystemStatus::Cdm_not_supported;
|
||||
}
|
||||
#endif
|
||||
return EnsureMinCDMVersion(mps, aKeySystem, aMinCdmVersion, aOutMessage, aOutCdmVersion);
|
||||
}
|
||||
|
@ -310,12 +301,6 @@ MediaKeySystemAccess::GetKeySystemStatus(const nsAString& aKeySystem,
|
|||
aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Widevine EME");
|
||||
return MediaKeySystemStatus::Cdm_not_supported;
|
||||
}
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
if (!nsCocoaFeatures::OnLionOrLater()) {
|
||||
aOutMessage = NS_LITERAL_CSTRING("Minimum MacOSX version (10.7) not met for Widevine EME");
|
||||
return MediaKeySystemStatus::Cdm_not_supported;
|
||||
}
|
||||
#endif
|
||||
if (!Preferences::GetBool("media.gmp-widevinecdm.enabled", false)) {
|
||||
aOutMessage = NS_LITERAL_CSTRING("Widevine EME disabled");
|
||||
|
|
|
@ -10,10 +10,6 @@
|
|||
#include "mozilla/ArrayUtils.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
#ifndef MOZ_WIDGET_UIKIT
|
||||
#include "nsCocoaFeatures.h"
|
||||
#endif
|
||||
|
||||
#define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -51,11 +47,6 @@ AppleCMLinker::Link()
|
|||
goto fail;
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_UIKIT
|
||||
if (true) {
|
||||
#else
|
||||
if (nsCocoaFeatures::OnLionOrLater()) {
|
||||
#endif
|
||||
#define LINK_FUNC2(func) \
|
||||
func = (typeof(func))dlsym(sLink, #func); \
|
||||
if (!func) { \
|
||||
|
@ -73,22 +64,6 @@ AppleCMLinker::Link()
|
|||
skPropFullRangeVideo =
|
||||
GetIOConst("kCMFormatDescriptionExtension_FullRangeVideo");
|
||||
|
||||
} else {
|
||||
#define LINK_FUNC2(cm, fig) \
|
||||
cm = (typeof(cm))dlsym(sLink, #fig); \
|
||||
if (!cm) { \
|
||||
NS_WARNING("Couldn't load CoreMedia function " #fig ); \
|
||||
goto fail; \
|
||||
}
|
||||
#define LINK_FUNC(func) LINK_FUNC2(CM ## func, Fig ## func)
|
||||
#include "AppleCMFunctions.h"
|
||||
#undef LINK_FUNC
|
||||
#undef LINK_FUNC2
|
||||
|
||||
skPropExtensionAtoms =
|
||||
GetIOConst("kFigFormatDescriptionExtension_SampleDescriptionExtensionAtoms");
|
||||
}
|
||||
|
||||
if (!skPropExtensionAtoms) {
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "gfxPlatform.h"
|
||||
|
||||
#ifndef MOZ_WIDGET_UIKIT
|
||||
#include "nsCocoaFeatures.h"
|
||||
#include "MacIOSurfaceImage.h"
|
||||
#endif
|
||||
|
||||
|
@ -67,10 +66,8 @@ AppleVDADecoder::AppleVDADecoder(const VideoInfo& aConfig,
|
|||
, mIsShutDown(false)
|
||||
#ifdef MOZ_WIDGET_UIKIT
|
||||
, mUseSoftwareImages(true)
|
||||
, mIs106(false)
|
||||
#else
|
||||
, mUseSoftwareImages(false)
|
||||
, mIs106(!nsCocoaFeatures::OnLionOrLater())
|
||||
#endif
|
||||
, mMonitor("AppleVideoDecoder")
|
||||
, mIsFlushing(false)
|
||||
|
@ -539,17 +536,6 @@ AppleVDADecoder::DoDecode(MediaRawData* aSample)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (mIs106) {
|
||||
// TN2267:
|
||||
// frameInfo: A CFDictionaryRef containing information to be returned in
|
||||
// the output callback for this frame.
|
||||
// This dictionary can contain client provided information associated with
|
||||
// the frame being decoded, for example presentation time.
|
||||
// The CFDictionaryRef will be retained by the framework.
|
||||
// In 10.6, it is released one too many. So retain it.
|
||||
CFRetain(frameInfo);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,6 @@ private:
|
|||
Atomic<uint32_t> mInputIncoming;
|
||||
Atomic<bool> mIsShutDown;
|
||||
const bool mUseSoftwareImages;
|
||||
const bool mIs106;
|
||||
|
||||
// Protects mReorderQueue.
|
||||
Monitor mMonitor;
|
||||
|
|
Загрузка…
Ссылка в новой задаче