Blame SOURCES/remove-ogg.patch

bff7fb
diff -up mozilla-aurora/config/external/moz.build.remove-ogg mozilla-aurora/config/external/moz.build
bff7fb
--- mozilla-aurora/config/external/moz.build.remove-ogg	2014-05-06 13:17:17.000000000 +0200
bff7fb
+++ mozilla-aurora/config/external/moz.build	2014-06-03 13:51:14.450340480 +0200
bff7fb
@@ -33,14 +33,15 @@ if CONFIG['MOZ_WEBM_ENCODER']:
bff7fb
 if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
bff7fb
     external_dirs += ['media/libvpx']
bff7fb
 
bff7fb
+if CONFIG['MOZ_OGG']:
bff7fb
+    external_dirs += ['media/libogg', 'media/libtheora']
bff7fb
+
bff7fb
 if not CONFIG['MOZ_NATIVE_PNG']:
bff7fb
     external_dirs += ['media/libpng']
bff7fb
 
bff7fb
 external_dirs += [
bff7fb
     'media/kiss_fft',
bff7fb
     'media/libcubeb',
bff7fb
-    'media/libogg',
bff7fb
-    'media/libtheora',
bff7fb
     'media/libspeex_resampler',
bff7fb
     'media/libsoundtouch',
bff7fb
 ]
bff7fb
diff -up mozilla-aurora/configure.in.remove-ogg mozilla-aurora/configure.in
bff7fb
--- mozilla-aurora/configure.in.remove-ogg	2014-05-06 13:17:17.000000000 +0200
bff7fb
+++ mozilla-aurora/configure.in	2014-06-03 13:51:14.452340483 +0200
bff7fb
@@ -3938,6 +3938,7 @@ MOZ_FEEDS=1
bff7fb
 MOZ_WEBAPP_RUNTIME=
bff7fb
 MOZ_JSDEBUGGER=1
bff7fb
 MOZ_AUTH_EXTENSION=1
bff7fb
+MOZ_OGG=1
bff7fb
 MOZ_RAW=
bff7fb
 MOZ_VORBIS=
bff7fb
 MOZ_TREMOR=
bff7fb
@@ -5191,25 +5192,37 @@ fi
bff7fb
 
bff7fb
 AC_SUBST(MOZ_RAW)
bff7fb
 
bff7fb
-dnl Checks for __attribute__(aligned()) directive need by libogg
bff7fb
-AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
bff7fb
-    [ac_cv_c_attribute_aligned],
bff7fb
-    [ac_cv_c_attribute_aligned=0
bff7fb
-     CFLAGS_save="${CFLAGS}"
bff7fb
-     CFLAGS="${CFLAGS} -Werror"
bff7fb
-     for ac_cv_c_attr_align_try in 64 32 16 8; do
bff7fb
-       echo "trying $ac_cv_c_attr_align_try"
bff7fb
-       AC_TRY_COMPILE([],
bff7fb
-                      [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
bff7fb
-                      [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
bff7fb
-       if test "$ac_cv_c_attribute_aligned" != 0; then
bff7fb
-         break;
bff7fb
-       fi
bff7fb
-     done
bff7fb
-       CFLAGS="${CFLAGS_save}"])
bff7fb
-if test "${ac_cv_c_attribute_aligned}" != "0"; then
bff7fb
-  AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
bff7fb
-                     [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
bff7fb
+dnl ========================================================
bff7fb
+dnl = Disable Ogg Codecs
bff7fb
+dnl ========================================================
bff7fb
+MOZ_ARG_DISABLE_BOOL(ogg,
bff7fb
+[  --disable-ogg           Disable support for OGG media (Theora video and Vorbis audio)],
bff7fb
+    MOZ_OGG=,
bff7fb
+    MOZ_OGG=1)
bff7fb
+
bff7fb
+if test -n "$MOZ_OGG"; then
bff7fb
+    AC_DEFINE(MOZ_OGG)
bff7fb
+
bff7fb
+    dnl Checks for __attribute__(aligned()) directive
bff7fb
+    AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
bff7fb
+        [ac_cv_c_attribute_aligned],
bff7fb
+        [ac_cv_c_attribute_aligned=0
bff7fb
+         CFLAGS_save="${CFLAGS}"
bff7fb
+         CFLAGS="${CFLAGS} -Werror"
bff7fb
+         for ac_cv_c_attr_align_try in 64 32 16 8; do
bff7fb
+           echo "trying $ac_cv_c_attr_align_try"
bff7fb
+           AC_TRY_COMPILE([],
bff7fb
+                          [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
bff7fb
+                          [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
bff7fb
+           if test "$ac_cv_c_attribute_aligned" != 0; then
bff7fb
+             break;
bff7fb
+           fi
bff7fb
+         done
bff7fb
+           CFLAGS="${CFLAGS_save}"])
bff7fb
+    if test "${ac_cv_c_attribute_aligned}" != "0"; then
bff7fb
+      AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
bff7fb
+                         [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
bff7fb
+    fi
bff7fb
 fi
bff7fb
 
bff7fb
 dnl ========================================================
bff7fb
@@ -5426,7 +5439,7 @@ AC_SUBST(MOZ_NATIVE_LIBVPX)
bff7fb
 AC_SUBST(MOZ_LIBVPX_CFLAGS)
bff7fb
 AC_SUBST(MOZ_LIBVPX_LIBS)
bff7fb
 
bff7fb
-if test "$MOZ_WEBM"; then
bff7fb
+if test "$MOZ_WEBM" -o "$MOZ_OGG"; then
bff7fb
     if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then
bff7fb
         MOZ_VORBIS=1
bff7fb
     else
bff7fb
@@ -5533,6 +5546,15 @@ dnl ====================================
bff7fb
 dnl = Handle dependent MEDIA defines
bff7fb
 dnl ========================================================
bff7fb
 
bff7fb
+if test -n "$MOZ_OPUS" -a -z "$MOZ_OGG"; then
bff7fb
+    AC_MSG_ERROR([MOZ_OPUS requires MOZ_OGG which is disabled.])
bff7fb
+fi
bff7fb
+
bff7fb
+if test -n "$MOZ_VORBIS" -a -z "$MOZ_OGG"; then
bff7fb
+    AC_MSG_ERROR([MOZ_VORBIS requires MOZ_OGG which is disabled.
bff7fb
+Note that you need vorbis support for WebM playback.])
bff7fb
+fi
bff7fb
+
bff7fb
 if test -n "$MOZ_VORBIS" -a -n "$MOZ_TREMOR"; then
bff7fb
     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/])
bff7fb
 fi
bff7fb
@@ -8842,6 +8864,7 @@ AC_SUBST(MOZ_APPLEMEDIA)
bff7fb
 AC_SUBST(MOZ_OMX_PLUGIN)
bff7fb
 AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT)
bff7fb
 AC_SUBST(MOZ_VPX)
bff7fb
+AC_SUBST(MOZ_OGG)
bff7fb
 AC_SUBST(VPX_AS)
bff7fb
 AC_SUBST(VPX_ASFLAGS)
bff7fb
 AC_SUBST(VPX_DASH_C_FLAG)
bff7fb
diff -up mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp.remove-ogg mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp
bff7fb
--- mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp.remove-ogg	2014-05-06 13:17:19.000000000 +0200
bff7fb
+++ mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp	2014-06-03 13:51:14.452340483 +0200
bff7fb
@@ -81,12 +81,16 @@ nsresult HTMLAudioElement::SetAcceptHead
bff7fb
 #ifdef MOZ_WEBM
bff7fb
       "audio/webm,"
bff7fb
 #endif
bff7fb
+#ifdef MOZ_OGG
bff7fb
       "audio/ogg,"
bff7fb
+#endif
bff7fb
 #ifdef MOZ_WAVE
bff7fb
       "audio/wav,"
bff7fb
 #endif
bff7fb
       "audio/*;q=0.9,"
bff7fb
+#ifdef MOZ_OGG
bff7fb
       "application/ogg;q=0.7,"
bff7fb
+#endif
bff7fb
       "video/*;q=0.6,*/*;q=0.5");
bff7fb
 
bff7fb
     return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
bff7fb
diff -up mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp.remove-ogg mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp
bff7fb
--- mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp.remove-ogg	2014-05-06 13:17:19.000000000 +0200
bff7fb
+++ mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp	2014-06-03 13:51:14.452340483 +0200
bff7fb
@@ -136,9 +136,13 @@ nsresult HTMLVideoElement::SetAcceptHead
bff7fb
 #ifdef MOZ_WEBM
bff7fb
       "video/webm,"
bff7fb
 #endif
bff7fb
+#ifdef MOZ_OGG
bff7fb
       "video/ogg,"
bff7fb
+#endif
bff7fb
       "video/*;q=0.9,"
bff7fb
+#ifdef MOZ_OGG
bff7fb
       "application/ogg;q=0.7,"
bff7fb
+#endif
bff7fb
       "audio/*;q=0.6,*/*;q=0.5");
bff7fb
 
bff7fb
   return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
bff7fb
diff -up mozilla-aurora/content/media/DecoderTraits.cpp.remove-ogg mozilla-aurora/content/media/DecoderTraits.cpp
bff7fb
--- mozilla-aurora/content/media/DecoderTraits.cpp.remove-ogg	2014-05-06 13:17:20.000000000 +0200
bff7fb
+++ mozilla-aurora/content/media/DecoderTraits.cpp	2014-06-03 13:51:14.452340483 +0200
bff7fb
@@ -13,8 +13,10 @@
bff7fb
 #include "MediaPluginHost.h"
bff7fb
 #endif
bff7fb
 
bff7fb
+#ifdef MOZ_OGG
bff7fb
 #include "OggDecoder.h"
bff7fb
 #include "OggReader.h"
bff7fb
+#endif
bff7fb
 #ifdef MOZ_WAVE
bff7fb
 #include "WaveDecoder.h"
bff7fb
 #include "WaveReader.h"
bff7fb
@@ -100,6 +102,7 @@ IsRawType(const nsACString& aType)
bff7fb
 }
bff7fb
 #endif
bff7fb
 
bff7fb
+#ifdef MOZ_OGG
bff7fb
 // See http://www.rfc-editor.org/rfc/rfc5334.txt for the definitions
bff7fb
 // of Ogg media types and codec types
bff7fb
 static const char* const gOggTypes[4] = {
bff7fb
@@ -131,6 +134,7 @@ IsOggType(const nsACString& aType)
bff7fb
 
bff7fb
   return CodecListContains(gOggTypes, aType);
bff7fb
 }
bff7fb
+#endif
bff7fb
 
bff7fb
 #ifdef MOZ_WAVE
bff7fb
 // See http://www.rfc-editor.org/rfc/rfc2361.txt for the definitions
bff7fb
@@ -199,8 +203,10 @@ IsGStreamerSupportedType(const nsACStrin
bff7fb
   if (IsWebMType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false))
bff7fb
     return false;
bff7fb
 #endif
bff7fb
+#ifdef MOZ_OGG
bff7fb
   if (IsOggType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false))
bff7fb
     return false;
bff7fb
+#endif
bff7fb
 
bff7fb
   return GStreamerDecoder::CanHandleMediaType(aMimeType, nullptr);
bff7fb
 }
bff7fb
@@ -370,10 +376,12 @@ DecoderTraits::CanHandleMediaType(const
bff7fb
     result = CANPLAY_MAYBE;
bff7fb
   }
bff7fb
 #endif
bff7fb
+#ifdef MOZ_OGG
bff7fb
   if (IsOggType(nsDependentCString(aMIMEType))) {
bff7fb
     codecList = MediaDecoder::IsOpusEnabled() ? gOggCodecsWithOpus : gOggCodecs;
bff7fb
     result = CANPLAY_MAYBE;
bff7fb
   }
bff7fb
+#endif
bff7fb
 #ifdef MOZ_WAVE
bff7fb
   if (IsWaveType(nsDependentCString(aMIMEType))) {
bff7fb
     codecList = gWaveCodecs;
bff7fb
@@ -479,10 +487,12 @@ InstantiateDecoder(const nsACString& aTy
bff7fb
     return decoder.forget();
bff7fb
   }
bff7fb
 #endif
bff7fb
+#ifdef MOZ_OGG
bff7fb
   if (IsOggType(aType)) {
bff7fb
     decoder = new OggDecoder();
bff7fb
     return decoder.forget();
bff7fb
   }
bff7fb
+#endif
bff7fb
 #ifdef MOZ_WAVE
bff7fb
   if (IsWaveType(aType)) {
bff7fb
     decoder = new WaveDecoder();
bff7fb
@@ -587,9 +597,11 @@ MediaDecoderReader* DecoderTraits::Creat
bff7fb
     decoderReader = new RawReader(aDecoder);
bff7fb
   } else
bff7fb
 #endif
bff7fb
+#ifdef MOZ_OGG
bff7fb
   if (IsOggType(aType)) {
bff7fb
     decoderReader = new OggReader(aDecoder);
bff7fb
   } else
bff7fb
+#endif
bff7fb
 #ifdef MOZ_WAVE
bff7fb
   if (IsWaveType(aType)) {
bff7fb
     decoderReader = new WaveReader(aDecoder);
bff7fb
@@ -642,7 +654,9 @@ MediaDecoderReader* DecoderTraits::Creat
bff7fb
 bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
bff7fb
 {
bff7fb
   return
bff7fb
+#ifdef MOZ_OGG
bff7fb
     IsOggType(aType) ||
bff7fb
+#endif
bff7fb
 #ifdef MOZ_OMX_DECODER
bff7fb
     // We support amr inside WebApps on firefoxOS but not in general web content.
bff7fb
     // Ensure we dont create a VideoDocument when accessing amr URLs directly.
bff7fb
diff -up mozilla-aurora/content/media/encoder/MediaEncoder.cpp.remove-ogg mozilla-aurora/content/media/encoder/MediaEncoder.cpp
bff7fb
--- mozilla-aurora/content/media/encoder/MediaEncoder.cpp.remove-ogg	2014-05-06 13:17:20.000000000 +0200
bff7fb
+++ mozilla-aurora/content/media/encoder/MediaEncoder.cpp	2014-06-03 13:51:14.453340485 +0200
bff7fb
@@ -9,7 +9,9 @@
bff7fb
 #include "prlog.h"
bff7fb
 #include "mozilla/Preferences.h"
bff7fb
 
bff7fb
+#ifdef MOZ_OGG
bff7fb
 #include "OggWriter.h"
bff7fb
+#endif
bff7fb
 #ifdef MOZ_OPUS
bff7fb
 #include "OpusTrackEncoder.h"
bff7fb
 
bff7fb
@@ -133,6 +135,7 @@ MediaEncoder::CreateEncoder(const nsAStr
bff7fb
     mimeType = NS_LITERAL_STRING(AUDIO_3GPP);
bff7fb
   }
bff7fb
 #endif // MOZ_OMX_ENCODER
bff7fb
+#ifdef MOZ_OGG
bff7fb
   else if (MediaDecoder::IsOggEnabled() && MediaDecoder::IsOpusEnabled() &&
bff7fb
            (aMIMEType.EqualsLiteral(AUDIO_OGG) ||
bff7fb
            (aTrackTypes & ContainerWriter::CREATE_AUDIO_TRACK))) {
bff7fb
@@ -142,6 +145,7 @@ MediaEncoder::CreateEncoder(const nsAStr
bff7fb
     NS_ENSURE_TRUE(audioEncoder, nullptr);
bff7fb
     mimeType = NS_LITERAL_STRING(AUDIO_OGG);
bff7fb
   }
bff7fb
+#endif  // MOZ_OGG
bff7fb
   else {
bff7fb
     LOG(PR_LOG_ERROR, ("Can not find any encoder to record this media stream"));
bff7fb
     return nullptr;
bff7fb
diff -up mozilla-aurora/content/media/MediaDecoder.cpp.remove-ogg mozilla-aurora/content/media/MediaDecoder.cpp
bff7fb
--- mozilla-aurora/content/media/MediaDecoder.cpp.remove-ogg	2014-05-06 13:17:20.000000000 +0200
bff7fb
+++ mozilla-aurora/content/media/MediaDecoder.cpp	2014-06-03 13:51:14.453340485 +0200
bff7fb
@@ -1653,6 +1653,7 @@ MediaDecoder::IsRawEnabled()
bff7fb
 }
bff7fb
 #endif
bff7fb
 
bff7fb
+#ifdef MOZ_OGG
bff7fb
 bool
bff7fb
 MediaDecoder::IsOpusEnabled()
bff7fb
 {
bff7fb
@@ -1668,6 +1669,7 @@ MediaDecoder::IsOggEnabled()
bff7fb
 {
bff7fb
   return Preferences::GetBool("media.ogg.enabled");
bff7fb
 }
bff7fb
+#endif
bff7fb
 
bff7fb
 #ifdef MOZ_WAVE
bff7fb
 bool
bff7fb
diff -up mozilla-aurora/content/media/MediaDecoder.h.remove-ogg mozilla-aurora/content/media/MediaDecoder.h
bff7fb
--- mozilla-aurora/content/media/MediaDecoder.h.remove-ogg	2014-05-06 13:17:20.000000000 +0200
bff7fb
+++ mozilla-aurora/content/media/MediaDecoder.h	2014-06-03 13:51:14.453340485 +0200
bff7fb
@@ -844,8 +844,10 @@ public:
bff7fb
   static bool IsRawEnabled();
bff7fb
 #endif
bff7fb
 
bff7fb
+#ifdef MOZ_OGG
bff7fb
   static bool IsOggEnabled();
bff7fb
   static bool IsOpusEnabled();
bff7fb
+#endif
bff7fb
 
bff7fb
 #ifdef MOZ_WAVE
bff7fb
   static bool IsWaveEnabled();
bff7fb
diff -up mozilla-aurora/content/media/moz.build.remove-ogg mozilla-aurora/content/media/moz.build
bff7fb
--- mozilla-aurora/content/media/moz.build.remove-ogg	2014-05-06 13:17:20.000000000 +0200
bff7fb
+++ mozilla-aurora/content/media/moz.build	2014-06-03 13:51:14.453340485 +0200
bff7fb
@@ -7,7 +7,6 @@
bff7fb
 PARALLEL_DIRS += [
bff7fb
   'encoder',
bff7fb
   'mediasource',
bff7fb
-  'ogg',
bff7fb
   'webaudio',
bff7fb
   'webvtt'
bff7fb
 ]
bff7fb
@@ -17,6 +16,9 @@ TEST_TOOL_DIRS += ['compiledtest']
bff7fb
 if CONFIG['MOZ_RAW']:
bff7fb
     PARALLEL_DIRS += ['raw']
bff7fb
 
bff7fb
+if CONFIG['MOZ_OGG']:
bff7fb
+    PARALLEL_DIRS += ['ogg']
bff7fb
+
bff7fb
 if CONFIG['MOZ_WAVE']:
bff7fb
     PARALLEL_DIRS += ['wave']
bff7fb
 
bff7fb
diff -up mozilla-aurora/layout/media/symbols.def.in.remove-ogg mozilla-aurora/layout/media/symbols.def.in
bff7fb
--- mozilla-aurora/layout/media/symbols.def.in.remove-ogg	2014-05-06 13:17:13.000000000 +0200
bff7fb
+++ mozilla-aurora/layout/media/symbols.def.in	2014-06-03 13:51:14.454340486 +0200
bff7fb
@@ -145,6 +145,7 @@ cubeb_stream_init
bff7fb
 cubeb_stream_start
bff7fb
 cubeb_stream_stop
bff7fb
 cubeb_stream_get_latency
bff7fb
+#ifdef MOZ_OGG
bff7fb
 th_comment_clear
bff7fb
 th_comment_init
bff7fb
 th_decode_alloc
bff7fb
@@ -158,6 +159,7 @@ th_info_init
bff7fb
 th_packet_isheader
bff7fb
 th_packet_iskeyframe
bff7fb
 th_setup_free
bff7fb
+#endif
bff7fb
 #ifdef MOZ_OPUS
bff7fb
 opus_decoder_create
bff7fb
 opus_decoder_destroy
bff7fb
diff -up mozilla-aurora/modules/libpref/src/init/all.js.remove-ogg mozilla-aurora/modules/libpref/src/init/all.js
bff7fb
--- mozilla-aurora/modules/libpref/src/init/all.js.remove-ogg	2014-05-19 11:43:49.000000000 +0200
bff7fb
+++ mozilla-aurora/modules/libpref/src/init/all.js	2014-06-03 13:51:25.028355239 +0200
bff7fb
@@ -212,7 +212,9 @@ pref("media.fragmented-mp4.use-blank-dec
bff7fb
 #ifdef MOZ_RAW
bff7fb
 pref("media.raw.enabled", true);
bff7fb
 #endif
bff7fb
+#ifdef MOZ_OGG
bff7fb
 pref("media.ogg.enabled", true);
bff7fb
+#endif
bff7fb
 #ifdef MOZ_OPUS
bff7fb
 pref("media.opus.enabled", true);
bff7fb
 #endif
bff7fb
diff -up mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py.remove-ogg mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py
bff7fb
--- mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py.remove-ogg	2014-05-06 13:17:17.000000000 +0200
bff7fb
+++ mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py	2014-06-03 13:51:25.028355239 +0200
bff7fb
@@ -84,6 +84,7 @@ def build_dict(config, env=os.environ):
bff7fb
     d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1"
bff7fb
     d['bin_suffix'] = substs.get('BIN_SUFFIX', '')
bff7fb
 
bff7fb
+    d['ogg'] = bool(substs.get('MOZ_OGG'))
bff7fb
     d['webm'] = bool(substs.get('MOZ_WEBM'))
bff7fb
     d['wave'] = bool(substs.get('MOZ_WAVE'))
bff7fb
 
bff7fb
diff -up mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp.remove-ogg mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp
bff7fb
--- mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp.remove-ogg	2014-05-06 13:17:27.000000000 +0200
bff7fb
+++ mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp	2014-06-03 13:51:25.030355242 +0200
bff7fb
@@ -462,6 +462,7 @@ static nsDefaultMimeTypeEntry defaultMim
bff7fb
   { "application/xhtml+xml", "xhtml" },
bff7fb
   { "application/xhtml+xml", "xht" },
bff7fb
   { TEXT_PLAIN, "txt" },
bff7fb
+#ifdef MOZ_OGG
bff7fb
   { VIDEO_OGG, "ogv" },
bff7fb
   { VIDEO_OGG, "ogg" },
bff7fb
   { APPLICATION_OGG, "ogg" },
bff7fb
@@ -469,6 +470,7 @@ static nsDefaultMimeTypeEntry defaultMim
bff7fb
 #ifdef MOZ_OPUS
bff7fb
   { AUDIO_OGG, "opus" },
bff7fb
 #endif
bff7fb
+#endif
bff7fb
 #ifdef MOZ_WEBM
bff7fb
   { VIDEO_WEBM, "webm" },
bff7fb
   { AUDIO_WEBM, "webm" },
bff7fb
diff -up mozilla-aurora/xpcom/build/nsXPComInit.cpp.remove-ogg mozilla-aurora/xpcom/build/nsXPComInit.cpp
bff7fb
--- mozilla-aurora/xpcom/build/nsXPComInit.cpp.remove-ogg	2014-06-03 14:04:38.913464144 +0200
bff7fb
+++ mozilla-aurora/xpcom/build/nsXPComInit.cpp	2014-06-03 14:06:03.282582245 +0200
bff7fb
@@ -133,7 +133,9 @@ extern nsresult nsStringInputStreamConst
bff7fb
 #include "mozilla/VisualEventTracer.h"
bff7fb
 #endif
bff7fb
 
bff7fb
+#if MOZ_OGG
bff7fb
 #include "ogg/ogg.h"
bff7fb
+#endif
bff7fb
 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
bff7fb
 #include "vpx_mem/vpx_mem.h"
bff7fb
 #endif
bff7fb
@@ -378,7 +380,7 @@ private:
bff7fb
 NS_IMPL_ISUPPORTS(ICUReporter, nsIMemoryReporter)
bff7fb
 
bff7fb
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<ICUReporter>::sAmount(0);
bff7fb
-
bff7fb
+#if MOZ_OGG
bff7fb
 class OggReporter MOZ_FINAL : public nsIMemoryReporter,
bff7fb
                               public CountingAllocatorBase<OggReporter>
bff7fb
 {
bff7fb
@@ -420,7 +422,7 @@ NS_IMPL_ISUPPORTS(VPXReporter, nsIMemory
bff7fb
 
bff7fb
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<VPXReporter>::sAmount(0);
bff7fb
 #endif /* MOZ_VPX */
bff7fb
-
bff7fb
+#endif /* MOZ_OGG */
bff7fb
 #ifdef MOZ_WEBM
bff7fb
 class NesteggReporter MOZ_FINAL : public nsIMemoryReporter
bff7fb
                                 , public CountingAllocatorBase<NesteggReporter>
bff7fb
@@ -606,12 +608,13 @@ NS_InitXPCOM2(nsIServiceManager* *result
bff7fb
     // depend on the XPCOM-based memory reporting goop.  So for now, we have
bff7fb
     // this oddness.
bff7fb
     mozilla::SetICUMemoryFunctions();
bff7fb
-
bff7fb
+#if MOZ_OGG
bff7fb
     // Do the same for libogg.
bff7fb
     ogg_set_mem_functions(OggReporter::CountingMalloc,
bff7fb
                           OggReporter::CountingCalloc,
bff7fb
                           OggReporter::CountingRealloc,
bff7fb
                           OggReporter::CountingFree);
bff7fb
+#endif
bff7fb
 
bff7fb
 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
bff7fb
     // And for VPX.
bff7fb
@@ -678,7 +681,9 @@ NS_InitXPCOM2(nsIServiceManager* *result
bff7fb
 
bff7fb
     // The memory reporter manager is up and running -- register our reporters.
bff7fb
     RegisterStrongMemoryReporter(new ICUReporter());
bff7fb
+#if MOZ_OGG
bff7fb
     RegisterStrongMemoryReporter(new OggReporter());
bff7fb
+#endif
bff7fb
 #ifdef MOZ_VPX
bff7fb
     RegisterStrongMemoryReporter(new VPXReporter());
bff7fb
 #endif