mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Remove DirectShowReader Part 1: Conditional code
This commit is contained in:
parent
2180b84b22
commit
93510088fb
3 changed files with 3 additions and 44 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue