summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-12-01 09:35:02 -0600
committertrav90 <travawine@palemoon.org>2018-12-01 09:35:02 -0600
commitf68b57c0bd3863d9057508929354ec34a3fd6205 (patch)
treebff1356d8bdef559f434de92d8c1831abc0c5814
parentf8e83e7e6dacb7fe00ccb52f62af634bc05dbdfc (diff)
downloadUXP-f68b57c0bd3863d9057508929354ec34a3fd6205.tar
UXP-f68b57c0bd3863d9057508929354ec34a3fd6205.tar.gz
UXP-f68b57c0bd3863d9057508929354ec34a3fd6205.tar.lz
UXP-f68b57c0bd3863d9057508929354ec34a3fd6205.tar.xz
UXP-f68b57c0bd3863d9057508929354ec34a3fd6205.zip
Remove DirectShowReader Part 1: Conditional code
-rw-r--r--dom/media/DecoderTraits.cpp40
-rw-r--r--dom/media/ThreadPoolCOMListener.h4
-rw-r--r--modules/libpref/init/all.js3
3 files changed, 3 insertions, 44 deletions
diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp
index 56ebd9ce9..473ca9533 100644
--- a/dom/media/DecoderTraits.cpp
+++ b/dom/media/DecoderTraits.cpp
@@ -23,10 +23,6 @@
#include "AndroidMediaReader.h"
#include "AndroidMediaPluginHost.h"
#endif
-#ifdef MOZ_DIRECTSHOW
-#include "DirectShowDecoder.h"
-#include "DirectShowReader.h"
-#endif
#ifdef MOZ_FMP4
#include "MP4Decoder.h"
#include "MP4Demuxer.h"
@@ -125,14 +121,6 @@ IsAndroidMediaType(const nsACString& aType)
}
#endif
-#ifdef MOZ_DIRECTSHOW
-static bool
-IsDirectShowSupportedType(const nsACString& aType)
-{
- return DirectShowDecoder::GetSupportedCodecs(aType, nullptr);
-}
-#endif
-
#ifdef MOZ_FMP4
static bool
IsMP4SupportedType(const MediaContentType& aParsedType,
@@ -247,9 +235,6 @@ CanHandleCodecsType(const MediaContentType& aType,
if (IsFlacSupportedType(aType.GetMIMEType(), aType.GetCodecs())) {
return CANPLAY_YES;
}
-#ifdef MOZ_DIRECTSHOW
- DirectShowDecoder::GetSupportedCodecs(aType.GetMIMEType(), &codecList);
-#endif
#ifdef MOZ_ANDROID_OMX
if (MediaDecoder::IsAndroidMediaPluginEnabled()) {
EnsureAndroidMediaPluginHost()->FindDecoder(aType.GetMIMEType(), &codecList);
@@ -320,11 +305,6 @@ CanHandleMediaType(const MediaContentType& aType,
if (IsFlacSupportedType(aType.GetMIMEType())) {
return CANPLAY_MAYBE;
}
-#ifdef MOZ_DIRECTSHOW
- if (DirectShowDecoder::GetSupportedCodecs(aType.GetMIMEType(), nullptr)) {
- return CANPLAY_MAYBE;
- }
-#endif
#ifdef MOZ_ANDROID_OMX
if (MediaDecoder::IsAndroidMediaPluginEnabled() &&
EnsureAndroidMediaPluginHost()->FindDecoder(aType.GetMIMEType(), nullptr)) {
@@ -424,15 +404,6 @@ InstantiateDecoder(const nsACString& aType,
return decoder.forget();
}
-#ifdef MOZ_DIRECTSHOW
- // Note: DirectShow should come before WMF, so that we prefer DirectShow's
- // MP3 support over WMF's.
- if (IsDirectShowSupportedType(aType)) {
- decoder = new DirectShowDecoder(aOwner);
- return decoder.forget();
- }
-#endif
-
return nullptr;
}
@@ -484,13 +455,7 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
if (IsWebMSupportedType(aType)) {
decoderReader =
new MediaFormatReader(aDecoder, new WebMDemuxer(aDecoder->GetResource()));
- } else
-#ifdef MOZ_DIRECTSHOW
- if (IsDirectShowSupportedType(aType)) {
- decoderReader = new DirectShowReader(aDecoder);
- } else
-#endif
- if (false) {} // dummy if to take care of the dangling else
+ }
return decoderReader;
}
@@ -518,9 +483,6 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
IsMP3SupportedType(aType) ||
IsAACSupportedType(aType) ||
IsFlacSupportedType(aType) ||
-#ifdef MOZ_DIRECTSHOW
- IsDirectShowSupportedType(aType) ||
-#endif
false;
}
diff --git a/dom/media/ThreadPoolCOMListener.h b/dom/media/ThreadPoolCOMListener.h
index 881013a78..424ca65d2 100644
--- a/dom/media/ThreadPoolCOMListener.h
+++ b/dom/media/ThreadPoolCOMListener.h
@@ -13,8 +13,8 @@
namespace mozilla {
// Thread pool listener which ensures that MSCOM is initialized and
-// deinitialized on the thread pool thread. We may call into WMF or
-// DirectShow on this thread, so we need MSCOM working.
+// deinitialized on the thread pool thread. We may call into WMF on
+// this thread, so we need MSCOM working.
class MSCOMInitThreadPoolListener final : public nsIThreadPoolListener {
~MSCOMInitThreadPoolListener() {}
public:
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index 546c836f0..a841bde55 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -362,9 +362,6 @@ pref("media.play-stand-alone", true);
pref("media.hardware-video-decoding.enabled", true);
pref("media.hardware-video-decoding.force-enabled", false);
-#ifdef MOZ_DIRECTSHOW
-pref("media.directshow.enabled", true);
-#endif
#ifdef MOZ_FMP4
pref("media.mp4.enabled", true);
// Specifies whether the PDMFactory can create a test decoder that