mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 964559 - Remove MOZ_OGG. r=doublec,ted
We are unable to maintain all the --disable-foo build-time options for the media code. Just support ogg unconditionally.
This commit is contained in:
parent
d09ef4dcaf
commit
24597e8179
5
config/external/moz.build
vendored
5
config/external/moz.build
vendored
@ -33,15 +33,14 @@ if CONFIG['MOZ_WEBM_ENCODER']:
|
||||
if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
|
||||
external_dirs += ['media/libvpx']
|
||||
|
||||
if CONFIG['MOZ_OGG']:
|
||||
external_dirs += ['media/libogg', 'media/libtheora']
|
||||
|
||||
if not CONFIG['MOZ_NATIVE_PNG']:
|
||||
external_dirs += ['media/libpng']
|
||||
|
||||
external_dirs += [
|
||||
'media/kiss_fft',
|
||||
'media/libcubeb',
|
||||
'media/libogg',
|
||||
'media/libtheora',
|
||||
'media/libspeex_resampler',
|
||||
'media/libsoundtouch',
|
||||
]
|
||||
|
63
configure.in
63
configure.in
@ -3867,7 +3867,6 @@ MOZ_FEEDS=1
|
||||
MOZ_WEBAPP_RUNTIME=
|
||||
MOZ_JSDEBUGGER=1
|
||||
MOZ_AUTH_EXTENSION=1
|
||||
MOZ_OGG=1
|
||||
MOZ_RAW=
|
||||
MOZ_VORBIS=
|
||||
MOZ_TREMOR=
|
||||
@ -5109,37 +5108,25 @@ fi
|
||||
|
||||
AC_SUBST(MOZ_RAW)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Disable Ogg Codecs
|
||||
dnl ========================================================
|
||||
MOZ_ARG_DISABLE_BOOL(ogg,
|
||||
[ --disable-ogg Disable support for OGG media (Theora video and Vorbis audio)],
|
||||
MOZ_OGG=,
|
||||
MOZ_OGG=1)
|
||||
|
||||
if test -n "$MOZ_OGG"; then
|
||||
AC_DEFINE(MOZ_OGG)
|
||||
|
||||
dnl Checks for __attribute__(aligned()) directive
|
||||
AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
|
||||
[ac_cv_c_attribute_aligned],
|
||||
[ac_cv_c_attribute_aligned=0
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -Werror"
|
||||
for ac_cv_c_attr_align_try in 64 32 16 8; do
|
||||
echo "trying $ac_cv_c_attr_align_try"
|
||||
AC_TRY_COMPILE([],
|
||||
[static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
|
||||
[ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
|
||||
if test "$ac_cv_c_attribute_aligned" != 0; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
CFLAGS="${CFLAGS_save}"])
|
||||
if test "${ac_cv_c_attribute_aligned}" != "0"; then
|
||||
AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
|
||||
[${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
|
||||
fi
|
||||
dnl Checks for __attribute__(aligned()) directive need by libogg
|
||||
AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
|
||||
[ac_cv_c_attribute_aligned],
|
||||
[ac_cv_c_attribute_aligned=0
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -Werror"
|
||||
for ac_cv_c_attr_align_try in 64 32 16 8; do
|
||||
echo "trying $ac_cv_c_attr_align_try"
|
||||
AC_TRY_COMPILE([],
|
||||
[static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
|
||||
[ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
|
||||
if test "$ac_cv_c_attribute_aligned" != 0; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
CFLAGS="${CFLAGS_save}"])
|
||||
if test "${ac_cv_c_attribute_aligned}" != "0"; then
|
||||
AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
|
||||
[${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
@ -5323,7 +5310,7 @@ AC_SUBST(MOZ_NATIVE_LIBVPX)
|
||||
AC_SUBST(MOZ_LIBVPX_CFLAGS)
|
||||
AC_SUBST(MOZ_LIBVPX_LIBS)
|
||||
|
||||
if test "$MOZ_WEBM" -o "$MOZ_OGG"; then
|
||||
if test "$MOZ_WEBM"; then
|
||||
if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then
|
||||
MOZ_VORBIS=1
|
||||
else
|
||||
@ -5430,15 +5417,6 @@ dnl ========================================================
|
||||
dnl = Handle dependent MEDIA defines
|
||||
dnl ========================================================
|
||||
|
||||
if test -n "$MOZ_OPUS" -a -z "$MOZ_OGG"; then
|
||||
AC_MSG_ERROR([MOZ_OPUS requires MOZ_OGG which is disabled.])
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_VORBIS" -a -z "$MOZ_OGG"; then
|
||||
AC_MSG_ERROR([MOZ_VORBIS requires MOZ_OGG which is disabled.
|
||||
Note that you need vorbis support for WebM playback.])
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_VORBIS" -a -n "$MOZ_TREMOR"; then
|
||||
AC_MSG_ERROR([MOZ_VORBIS and MOZ_TREMOR are mutually exclusive! The build system should not allow them both to be set, but they are. Please file a bug at https://bugzilla.mozilla.org/])
|
||||
fi
|
||||
@ -8619,7 +8597,6 @@ AC_SUBST(MOZ_APPLEMEDIA)
|
||||
AC_SUBST(MOZ_OMX_PLUGIN)
|
||||
AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT)
|
||||
AC_SUBST(MOZ_VPX)
|
||||
AC_SUBST(MOZ_OGG)
|
||||
AC_SUBST(VPX_AS)
|
||||
AC_SUBST(VPX_ASFLAGS)
|
||||
AC_SUBST(VPX_DASH_C_FLAG)
|
||||
|
@ -205,16 +205,12 @@ nsresult HTMLAudioElement::SetAcceptHeader(nsIHttpChannel* aChannel)
|
||||
#ifdef MOZ_WEBM
|
||||
"audio/webm,"
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
"audio/ogg,"
|
||||
#endif
|
||||
#ifdef MOZ_WAVE
|
||||
"audio/wav,"
|
||||
#endif
|
||||
"audio/*;q=0.9,"
|
||||
#ifdef MOZ_OGG
|
||||
"application/ogg;q=0.7,"
|
||||
#endif
|
||||
"video/*;q=0.6,*/*;q=0.5");
|
||||
|
||||
return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
|
||||
|
@ -137,13 +137,9 @@ nsresult HTMLVideoElement::SetAcceptHeader(nsIHttpChannel* aChannel)
|
||||
#ifdef MOZ_WEBM
|
||||
"video/webm,"
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
"video/ogg,"
|
||||
#endif
|
||||
"video/*;q=0.9,"
|
||||
#ifdef MOZ_OGG
|
||||
"application/ogg;q=0.7,"
|
||||
#endif
|
||||
"audio/*;q=0.6,*/*;q=0.5");
|
||||
|
||||
return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
|
||||
|
@ -13,10 +13,8 @@
|
||||
#include "MediaPluginHost.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_OGG
|
||||
#include "OggDecoder.h"
|
||||
#include "OggReader.h"
|
||||
#endif
|
||||
#ifdef MOZ_WAVE
|
||||
#include "WaveDecoder.h"
|
||||
#include "WaveReader.h"
|
||||
@ -102,7 +100,6 @@ IsRawType(const nsACString& aType)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_OGG
|
||||
// See http://www.rfc-editor.org/rfc/rfc5334.txt for the definitions
|
||||
// of Ogg media types and codec types
|
||||
static const char* const gOggTypes[4] = {
|
||||
@ -134,7 +131,6 @@ IsOggType(const nsACString& aType)
|
||||
|
||||
return CodecListContains(gOggTypes, aType);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WAVE
|
||||
// See http://www.rfc-editor.org/rfc/rfc2361.txt for the definitions
|
||||
@ -203,10 +199,8 @@ IsGStreamerSupportedType(const nsACString& aMimeType)
|
||||
if (IsWebMType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false))
|
||||
return false;
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return GStreamerDecoder::CanHandleMediaType(aMimeType, nullptr);
|
||||
}
|
||||
@ -376,12 +370,10 @@ DecoderTraits::CanHandleMediaType(const char* aMIMEType,
|
||||
result = CANPLAY_MAYBE;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(nsDependentCString(aMIMEType))) {
|
||||
codecList = MediaDecoder::IsOpusEnabled() ? gOggCodecsWithOpus : gOggCodecs;
|
||||
result = CANPLAY_MAYBE;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WAVE
|
||||
if (IsWaveType(nsDependentCString(aMIMEType))) {
|
||||
codecList = gWaveCodecs;
|
||||
@ -480,12 +472,10 @@ InstantiateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
|
||||
return decoder.forget();
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(aType)) {
|
||||
decoder = new OggDecoder();
|
||||
return decoder.forget();
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WAVE
|
||||
if (IsWaveType(aType)) {
|
||||
decoder = new WaveDecoder();
|
||||
@ -590,11 +580,9 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
|
||||
decoderReader = new RawReader(aDecoder);
|
||||
} else
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(aType)) {
|
||||
decoderReader = new OggReader(aDecoder);
|
||||
} else
|
||||
#endif
|
||||
#ifdef MOZ_WAVE
|
||||
if (IsWaveType(aType)) {
|
||||
decoderReader = new WaveReader(aDecoder);
|
||||
@ -647,9 +635,7 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
|
||||
bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
|
||||
{
|
||||
return
|
||||
#ifdef MOZ_OGG
|
||||
IsOggType(aType) ||
|
||||
#endif
|
||||
#ifdef MOZ_OMX_DECODER
|
||||
// We support amr inside WebApps on firefoxOS but not in general web content.
|
||||
// Ensure we dont create a VideoDocument when accessing amr URLs directly.
|
||||
|
@ -1735,7 +1735,6 @@ MediaDecoder::IsRawEnabled()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_OGG
|
||||
bool
|
||||
MediaDecoder::IsOpusEnabled()
|
||||
{
|
||||
@ -1751,7 +1750,6 @@ MediaDecoder::IsOggEnabled()
|
||||
{
|
||||
return Preferences::GetBool("media.ogg.enabled");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WAVE
|
||||
bool
|
||||
|
@ -816,10 +816,8 @@ public:
|
||||
static bool IsRawEnabled();
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_OGG
|
||||
static bool IsOggEnabled();
|
||||
static bool IsOpusEnabled();
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WAVE
|
||||
static bool IsWaveEnabled();
|
||||
|
@ -9,9 +9,7 @@
|
||||
#include "prlog.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#ifdef MOZ_OGG
|
||||
#include "OggWriter.h"
|
||||
#endif
|
||||
#ifdef MOZ_OPUS
|
||||
#include "OpusTrackEncoder.h"
|
||||
|
||||
@ -127,7 +125,6 @@ MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes)
|
||||
mimeType = NS_LITERAL_STRING(VIDEO_MP4);
|
||||
}
|
||||
#endif // MOZ_OMX_ENCODER
|
||||
#ifdef MOZ_OGG
|
||||
else if (MediaDecoder::IsOggEnabled() && MediaDecoder::IsOpusEnabled() &&
|
||||
(aMIMEType.EqualsLiteral(AUDIO_OGG) ||
|
||||
(aTrackTypes & ContainerWriter::CREATE_AUDIO_TRACK))) {
|
||||
@ -137,7 +134,6 @@ MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes)
|
||||
NS_ENSURE_TRUE(audioEncoder, nullptr);
|
||||
mimeType = NS_LITERAL_STRING(AUDIO_OGG);
|
||||
}
|
||||
#endif // MOZ_OGG
|
||||
else {
|
||||
LOG(PR_LOG_ERROR, ("Can not find any encoder to record this media stream"));
|
||||
return nullptr;
|
||||
|
@ -7,6 +7,7 @@
|
||||
PARALLEL_DIRS += [
|
||||
'encoder',
|
||||
'mediasource',
|
||||
'ogg',
|
||||
'webaudio',
|
||||
'webvtt'
|
||||
]
|
||||
@ -14,9 +15,6 @@ PARALLEL_DIRS += [
|
||||
if CONFIG['MOZ_RAW']:
|
||||
PARALLEL_DIRS += ['raw']
|
||||
|
||||
if CONFIG['MOZ_OGG']:
|
||||
PARALLEL_DIRS += ['ogg']
|
||||
|
||||
if CONFIG['MOZ_WAVE']:
|
||||
PARALLEL_DIRS += ['wave']
|
||||
|
||||
|
@ -140,7 +140,6 @@ cubeb_stream_init
|
||||
cubeb_stream_start
|
||||
cubeb_stream_stop
|
||||
cubeb_stream_get_latency
|
||||
#ifdef MOZ_OGG
|
||||
th_comment_clear
|
||||
th_comment_init
|
||||
th_decode_alloc
|
||||
@ -154,7 +153,6 @@ th_info_init
|
||||
th_packet_isheader
|
||||
th_packet_iskeyframe
|
||||
th_setup_free
|
||||
#endif
|
||||
#ifdef MOZ_OPUS
|
||||
opus_decoder_create
|
||||
opus_decoder_destroy
|
||||
|
@ -208,9 +208,7 @@ pref("media.fragmented-mp4.use-blank-decoder", false);
|
||||
#ifdef MOZ_RAW
|
||||
pref("media.raw.enabled", true);
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
pref("media.ogg.enabled", true);
|
||||
#endif
|
||||
#ifdef MOZ_OPUS
|
||||
pref("media.opus.enabled", true);
|
||||
#endif
|
||||
|
@ -83,7 +83,7 @@ def build_dict(config, env=os.environ):
|
||||
d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1"
|
||||
d['bin_suffix'] = substs.get('BIN_SUFFIX', '')
|
||||
|
||||
d['ogg'] = bool(substs.get('MOZ_OGG'))
|
||||
d['ogg'] = True
|
||||
d['webm'] = bool(substs.get('MOZ_WEBM'))
|
||||
d['wave'] = bool(substs.get('MOZ_WAVE'))
|
||||
|
||||
|
@ -432,7 +432,6 @@ static nsDefaultMimeTypeEntry defaultMimeEntries [] =
|
||||
{ "application/xhtml+xml", "xhtml" },
|
||||
{ "application/xhtml+xml", "xht" },
|
||||
{ TEXT_PLAIN, "txt" },
|
||||
#ifdef MOZ_OGG
|
||||
{ VIDEO_OGG, "ogv" },
|
||||
{ VIDEO_OGG, "ogg" },
|
||||
{ APPLICATION_OGG, "ogg" },
|
||||
@ -440,7 +439,6 @@ static nsDefaultMimeTypeEntry defaultMimeEntries [] =
|
||||
#ifdef MOZ_OPUS
|
||||
{ AUDIO_OGG, "opus" },
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MOZ_WEBM
|
||||
{ VIDEO_WEBM, "webm" },
|
||||
{ AUDIO_WEBM, "webm" },
|
||||
|
Loading…
Reference in New Issue
Block a user