Bug 1232223 - Part 3: Remove MOZ_WAVE #ifdefs because Wave is always supported. r=jya

This commit is contained in:
Chris Peterson 2015-12-18 00:51:16 -08:00
parent 6ef290e177
commit 90c0e0da61
7 changed files with 3 additions and 43 deletions

View File

@ -3692,7 +3692,6 @@ fi
MOZ_RAW=
MOZ_VORBIS=
MOZ_TREMOR=
MOZ_WAVE=1
MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16=
MOZ_GSTREAMER=
@ -5489,18 +5488,6 @@ if test -z "$MOZ_NATIVE_LIBVPX"; then
AC_DEFINE(MOZ_VPX_NO_MEM_REPORTING)
fi
dnl ========================================================
dnl = Disable Wave decoder support
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(wave,
[ --disable-wave Disable Wave decoder support],
MOZ_WAVE=,
MOZ_WAVE=1)
if test -n "$MOZ_WAVE"; then
AC_DEFINE(MOZ_WAVE)
fi
dnl ========================================================
dnl = Handle dependent MEDIA defines
dnl ========================================================
@ -8905,7 +8892,6 @@ AC_SUBST(NS_ENABLE_TSF)
AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
AC_SUBST(WIN32_GUI_EXE_LDFLAGS)
AC_SUBST(MOZ_WAVE)
AC_SUBST(MOZ_VORBIS)
AC_SUBST(MOZ_TREMOR)
AC_SUBST(MOZ_WMF)

View File

@ -12,10 +12,9 @@
#include "OggDecoder.h"
#include "OggReader.h"
#ifdef MOZ_WAVE
#include "WaveDecoder.h"
#include "WaveReader.h"
#endif
#include "WebMDecoder.h"
#include "WebMReader.h"
@ -128,7 +127,6 @@ IsOggType(const nsACString& aType)
return CodecListContains(gOggTypes, aType);
}
#ifdef MOZ_WAVE
// See http://www.rfc-editor.org/rfc/rfc2361.txt for the definitions
// of WAVE media types and codec types. However, the audio/vnd.wave
// MIME type described there is not used.
@ -154,7 +152,6 @@ IsWaveType(const nsACString& aType)
return CodecListContains(gWaveTypes, aType);
}
#endif
static bool
IsWebMSupportedType(const nsACString& aType,
@ -359,7 +356,6 @@ IsAACSupportedType(const nsACString& aType,
/* static */
bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType)
{
#ifdef MOZ_WAVE
if (IsWaveType(nsDependentCString(aMIMEType))) {
// We should not return true for Wave types, since there are some
// Wave codecs actually in use in the wild that we don't support, and
@ -368,7 +364,6 @@ bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType)
// means.
return false;
}
#endif
return CanHandleMediaType(aMIMEType, false, EmptyString()) != CANPLAY_NO;
}
@ -386,11 +381,9 @@ DecoderTraits::CanHandleCodecsType(const char* aMIMEType,
if (IsOggType(nsDependentCString(aMIMEType))) {
codecList = MediaDecoder::IsOpusEnabled() ? gOggCodecsWithOpus : gOggCodecs;
}
#ifdef MOZ_WAVE
if (IsWaveType(nsDependentCString(aMIMEType))) {
codecList = gWaveCodecs;
}
#endif
#if !defined(MOZ_OMX_WEBM_DECODER)
if (IsWebMTypeAndEnabled(nsDependentCString(aMIMEType))) {
if (IsWebMSupportedType(nsDependentCString(aMIMEType), aRequestedCodecs)) {
@ -488,11 +481,9 @@ DecoderTraits::CanHandleMediaType(const char* aMIMEType,
if (IsOggType(nsDependentCString(aMIMEType))) {
return CANPLAY_MAYBE;
}
#ifdef MOZ_WAVE
if (IsWaveType(nsDependentCString(aMIMEType))) {
return CANPLAY_MAYBE;
}
#endif
if (IsMP4TypeAndEnabled(nsDependentCString(aMIMEType))) {
return CANPLAY_MAYBE;
}
@ -575,12 +566,10 @@ InstantiateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
decoder = new OggDecoder(aOwner);
return decoder.forget();
}
#ifdef MOZ_WAVE
if (IsWaveType(aType)) {
decoder = new WaveDecoder(aOwner);
return decoder.forget();
}
#endif
#ifdef MOZ_OMX_DECODER
if (IsOmxSupportedType(aType)) {
// we are discouraging Web and App developers from using those formats in
@ -674,11 +663,9 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
if (IsOggType(aType)) {
decoderReader = new OggReader(aDecoder);
} else
#ifdef MOZ_WAVE
if (IsWaveType(aType)) {
decoderReader = new WaveReader(aDecoder);
} else
#endif
#ifdef MOZ_OMX_DECODER
if (IsOmxSupportedType(aType)) {
decoderReader = new MediaOmxReader(aDecoder);

View File

@ -39,7 +39,7 @@ static const int DEFAULT_HEURISTIC_DORMANT_TIMEOUT_MSECS = 60000;
namespace mozilla {
// The amount of instability we tolerate in calls to
// The amount of instability we tollerate in calls to
// MediaDecoder::UpdateEstimatedMediaDuration(); changes of duration
// less than this are ignored, as they're assumed to be the result of
// instability in the duration estimation.
@ -1641,13 +1641,11 @@ MediaDecoder::IsOggEnabled()
return Preferences::GetBool("media.ogg.enabled");
}
#ifdef MOZ_WAVE
bool
MediaDecoder::IsWaveEnabled()
{
return Preferences::GetBool("media.wave.enabled");
}
#endif
bool
MediaDecoder::IsWebMEnabled()

View File

@ -662,11 +662,7 @@ private:
static bool IsOggEnabled();
static bool IsOpusEnabled();
#ifdef MOZ_WAVE
static bool IsWaveEnabled();
#endif
static bool IsWebMEnabled();
#ifdef NECKO_PROTOCOL_rtsp

View File

@ -30,6 +30,7 @@ DIRS += [
'ogg',
'platforms',
'systemservices',
'wave',
'webaudio',
'webm',
'webrtc',
@ -41,9 +42,6 @@ DIRS += [
if CONFIG['MOZ_RAW']:
DIRS += ['raw']
if CONFIG['MOZ_WAVE']:
DIRS += ['wave']
if CONFIG['MOZ_GSTREAMER']:
DIRS += ['gstreamer']

View File

@ -335,10 +335,7 @@ pref("media.raw.enabled", true);
#endif
pref("media.ogg.enabled", true);
pref("media.opus.enabled", true);
#ifdef MOZ_WAVE
pref("media.wave.enabled", true);
#endif
pref("media.webm.enabled", true);
#if defined(MOZ_FMP4) && defined(MOZ_WMF)
pref("media.webm.intel_decoder.enabled", false);

View File

@ -92,8 +92,6 @@ def build_dict(config, env=os.environ):
d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1"
d['bin_suffix'] = substs.get('BIN_SUFFIX', '')
d['addon_signing'] = substs.get('MOZ_ADDON_SIGNING') == '1'
d['wave'] = bool(substs.get('MOZ_WAVE'))
d['official'] = bool(substs.get('MOZILLA_OFFICIAL'))
def guess_platform():