Changeset View
Changeset View
Standalone View
Standalone View
mail/thunderbird/files/patch-z-bug517422
| # Allow more config/external/ libs built against system-wide version. | # Allow more config/external/ libs built against system-wide version. | ||||
| diff --git build/moz.configure/old.configure build/moz.configure/old.configure | diff --git build/moz.configure/old.configure build/moz.configure/old.configure | ||||
| index d0fe7accffe6..c46bdd023225 100644 | index d0fe7accffe6..c46bdd023225 100644 | ||||
| --- mozilla/build/moz.configure/old.configure | --- build/moz.configure/old.configure | ||||
| +++ mozilla/build/moz.configure/old.configure | +++ build/moz.configure/old.configure | ||||
| @@ -288,7 +288,12 @@ def old_configure_options(*options): | @@ -285,7 +285,12 @@ def old_configure_options(*options): | ||||
| '--with-system-libvpx', | '--with-system-libvpx', | ||||
| '--with-system-nspr', | '--with-system-nspr', | ||||
| '--with-system-nss', | '--with-system-nss', | ||||
| + '--with-system-ogg', | + '--with-system-ogg', | ||||
| '--with-system-png', | '--with-system-png', | ||||
| + '--with-system-soundtouch', | + '--with-system-soundtouch', | ||||
| + '--with-system-theora', | + '--with-system-theora', | ||||
| + '--with-system-tremor', | + '--with-system-tremor', | ||||
| + '--with-system-vorbis', | + '--with-system-vorbis', | ||||
| '--with-system-zlib', | '--with-system-zlib', | ||||
| '--with-thumb', | '--with-thumb', | ||||
| '--with-thumb-interwork', | '--with-thumb-interwork', | ||||
| diff --git config/Makefile.in config/Makefile.in | |||||
| index a6206bb0ff30..f20987c61754 100644 | |||||
| --- mozilla/config/Makefile.in | |||||
| +++ mozilla/config/Makefile.in | |||||
| @@ -51,6 +51,11 @@ export:: $(export-preqs) | |||||
| -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \ | |||||
| -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \ | |||||
| -DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \ | |||||
| + -DMOZ_SYSTEM_OGG=$(MOZ_SYSTEM_OGG) \ | |||||
| + -DMOZ_SYSTEM_THEORA=$(MOZ_SYSTEM_THEORA) \ | |||||
| + -DMOZ_SYSTEM_VORBIS=$(MOZ_SYSTEM_VORBIS) \ | |||||
| + -DMOZ_SYSTEM_TREMOR=$(MOZ_SYSTEM_TREMOR) \ | |||||
| + -DMOZ_SYSTEM_SOUNDTOUCH=$(MOZ_SYSTEM_SOUNDTOUCH) \ | |||||
| $(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers | |||||
| $(INSTALL) system_wrappers $(DIST) | |||||
| diff --git config/external/moz.build config/external/moz.build | diff --git config/external/moz.build config/external/moz.build | ||||
| index 029ff8504795..2c3a40caa1ba 100644 | index 029ff8504795..2c3a40caa1ba 100644 | ||||
| --- mozilla/config/external/moz.build | --- config/external/moz.build | ||||
| +++ mozilla/config/external/moz.build | +++ config/external/moz.build | ||||
| @@ -21,12 +21,21 @@ if CONFIG['MOZ_UPDATER']: | @@ -23,12 +23,21 @@ external_dirs += ['modules/woff2'] | ||||
| external_dirs += ['modules/brotli'] | |||||
| external_dirs += ['modules/woff2'] | |||||
| external_dirs += ['modules/xz-embedded'] | |||||
| -if CONFIG['MOZ_VORBIS']: | -if CONFIG['MOZ_VORBIS']: | ||||
| +if not CONFIG['MOZ_SYSTEM_OGG']: | +if not CONFIG['MOZ_SYSTEM_OGG']: | ||||
| + external_dirs += ['media/libogg'] | + external_dirs += ['media/libogg'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_SYSTEM_VORBIS']: | +if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_SYSTEM_VORBIS']: | ||||
| external_dirs += ['media/libvorbis'] | external_dirs += ['media/libvorbis'] | ||||
| -if CONFIG['MOZ_TREMOR']: | -if CONFIG['MOZ_TREMOR']: | ||||
| +if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_SYSTEM_TREMOR']: | +if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_SYSTEM_TREMOR']: | ||||
| external_dirs += ['media/libtremor'] | external_dirs += ['media/libtremor'] | ||||
| +if not CONFIG['MOZ_SYSTEM_THEORA']: | +if not CONFIG['MOZ_SYSTEM_THEORA']: | ||||
| + external_dirs += ['media/libtheora'] | + external_dirs += ['media/libtheora'] | ||||
| + | + | ||||
| +if not CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: | +if not CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: | ||||
| + external_dirs += ['media/libsoundtouch'] | + external_dirs += ['media/libsoundtouch'] | ||||
| + | + | ||||
| if CONFIG['MOZ_WEBM_ENCODER']: | if CONFIG['MOZ_WEBM_ENCODER']: | ||||
| external_dirs += ['media/libmkv'] | external_dirs += ['media/libmkv'] | ||||
| @@ -52,12 +61,9 @@ external_dirs += [ | @@ -51,11 +60,8 @@ external_dirs += [ | ||||
| 'media/kiss_fft', | 'media/kiss_fft', | ||||
| 'media/libcubeb', | 'media/libcubeb', | ||||
| 'media/libnestegg', | 'media/libnestegg', | ||||
| - 'media/libogg', | - 'media/libogg', | ||||
| 'media/libopus', | 'media/libopus', | ||||
| - 'media/libtheora', | - 'media/libtheora', | ||||
| 'media/libspeex_resampler', | 'media/libspeex_resampler', | ||||
| 'media/libstagefright', | |||||
| - 'media/libsoundtouch', | - 'media/libsoundtouch', | ||||
| 'media/mp4parse-rust', | |||||
| 'media/psshparser' | 'media/psshparser' | ||||
| ] | ] | ||||
| diff --git config/system-headers.mozbuild config/system-headers.mozbuild | |||||
| index 09d3db5ca8c0..c6533b84c470 100644 | |||||
| --- config/system-headers.mozbuild | |||||
| +++ config/system-headers.mozbuild | |||||
| @@ -1325,6 +1325,28 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | |||||
| 'harfbuzz/hb.h', | |||||
| ] | |||||
| diff --git config/system-headers config/system-headers | +if CONFIG['MOZ_SYSTEM_OGG']: | ||||
| index 5ee7f71f9634..13178ac3b3ab 100644 | + system_headers += [ | ||||
| --- mozilla/config/system-headers | + 'ogg/ogg.h', | ||||
| +++ mozilla/config/system-headers | + 'ogg/os_types.h', | ||||
| @@ -1348,3 +1348,17 @@ unicode/utypes.h | + ] | ||||
| libutil.h | + | ||||
| unwind.h | +if CONFIG['MOZ_SYSTEM_THEORA']: | ||||
| fenv.h | + system_headers += [ | ||||
| +#if MOZ_SYSTEM_OGG==1 | + 'theora/theoradec.h', | ||||
| +ogg/ogg.h | + ] | ||||
| +ogg/os_types.h | + | ||||
| +#endif | +if CONFIG['MOZ_SYSTEM_VORBIS']: | ||||
| +#if MOZ_SYSTEM_THEORA==1 | + system_headers += [ | ||||
| +theora/theoradec.h | + 'vorbis/codec.h', | ||||
| +#endif | + 'vorbis/vorbisenc.h', | ||||
| +#if MOZ_SYSTEM_VORBIS==1 | + ] | ||||
| +vorbis/codec.h | + | ||||
| +vorbis/vorbisenc.h | +if CONFIG['MOZ_SYSTEM_TREMOR']: | ||||
| +#endif | + system_headers += [ | ||||
| +#if MOZ_SYSTEM_TREMOR==1 | + 'tremor/ivorbiscodec.h', | ||||
| +tremor/ivorbiscodec.h | + ] | ||||
| +#endif | + | ||||
| if CONFIG['MOZ_SYSTEM_LIBVPX']: | |||||
| system_headers += [ | |||||
| 'vpx_mem/vpx_mem.h', | |||||
| diff --git dom/media/AudioStream.cpp dom/media/AudioStream.cpp | diff --git dom/media/AudioStream.cpp dom/media/AudioStream.cpp | ||||
| index 93ecda4319af..ff674c64ea07 100644 | index 93ecda4319af..ff674c64ea07 100644 | ||||
| --- mozilla/dom/media/AudioStream.cpp | --- dom/media/AudioStream.cpp | ||||
| +++ mozilla/dom/media/AudioStream.cpp | +++ dom/media/AudioStream.cpp | ||||
| @@ -115,7 +115,9 @@ AudioStream::AudioStream(DataSource& aSource) | @@ -121,7 +121,9 @@ AudioStream::AudioStream(DataSource& aSource) | ||||
| : mMonitor("AudioStream") | : mMonitor("AudioStream") | ||||
| , mChannels(0) | , mChannels(0) | ||||
| , mOutChannels(0) | , mOutChannels(0) | ||||
| +#ifndef MOZ_SYSTEM_SOUNDTOUCH | +#ifndef MOZ_SYSTEM_SOUNDTOUCH | ||||
| , mTimeStretcher(nullptr) | , mTimeStretcher(nullptr) | ||||
| +#endif | +#endif | ||||
| , mDumpFile(nullptr) | , mDumpFile(nullptr) | ||||
| , mState(INITIALIZED) | , mState(INITIALIZED) | ||||
| , mDataSource(aSource) | , mDataSource(aSource) | ||||
| @@ -130,9 +132,11 @@ AudioStream::~AudioStream() | @@ -142,9 +144,11 @@ AudioStream::~AudioStream() | ||||
| if (mDumpFile) { | if (mDumpFile) { | ||||
| fclose(mDumpFile); | fclose(mDumpFile); | ||||
| } | } | ||||
| +#ifndef MOZ_SYSTEM_SOUNDTOUCH | +#ifndef MOZ_SYSTEM_SOUNDTOUCH | ||||
| if (mTimeStretcher) { | if (mTimeStretcher) { | ||||
| soundtouch::destroySoundTouchObj(mTimeStretcher); | soundtouch::destroySoundTouchObj(mTimeStretcher); | ||||
| } | } | ||||
| +#endif | +#endif | ||||
| } | #if defined(XP_WIN) | ||||
| if (XRE_IsContentProcess()) { | |||||
| size_t | audio::AudioNotificationReceiver::Unregister(this); | ||||
| @@ -151,7 +155,11 @@ nsresult AudioStream::EnsureTimeStretcherInitializedUnlocked() | @@ -168,7 +172,11 @@ nsresult AudioStream::EnsureTimeStretcherInitializedUnlocked() | ||||
| { | { | ||||
| mMonitor.AssertCurrentThreadOwns(); | mMonitor.AssertCurrentThreadOwns(); | ||||
| if (!mTimeStretcher) { | if (!mTimeStretcher) { | ||||
| +#ifdef MOZ_SYSTEM_SOUNDTOUCH | +#ifdef MOZ_SYSTEM_SOUNDTOUCH | ||||
| + mTimeStretcher = new soundtouch::SoundTouch(); | + mTimeStretcher = new soundtouch::SoundTouch(); | ||||
| +#else | +#else | ||||
| mTimeStretcher = soundtouch::createSoundTouchObj(); | mTimeStretcher = soundtouch::createSoundTouchObj(); | ||||
| +#endif | +#endif | ||||
| mTimeStretcher->setSampleRate(mAudioClock.GetInputRate()); | mTimeStretcher->setSampleRate(mAudioClock.GetInputRate()); | ||||
| mTimeStretcher->setChannels(mOutChannels); | mTimeStretcher->setChannels(mOutChannels); | ||||
| mTimeStretcher->setPitch(1.0); | mTimeStretcher->setPitch(1.0); | ||||
| diff --git dom/media/AudioStream.h dom/media/AudioStream.h | diff --git dom/media/AudioStream.h dom/media/AudioStream.h | ||||
| index 7dc1f60f95cc..67d402a4117f 100644 | index 7dc1f60f95cc..67d402a4117f 100644 | ||||
| --- mozilla/dom/media/AudioStream.h | --- dom/media/AudioStream.h | ||||
| +++ mozilla/dom/media/AudioStream.h | +++ dom/media/AudioStream.h | ||||
| @@ -16,7 +16,11 @@ | @@ -15,7 +15,11 @@ | ||||
| #include "mozilla/TimeStamp.h" | #include "mozilla/TimeStamp.h" | ||||
| #include "mozilla/UniquePtr.h" | #include "mozilla/UniquePtr.h" | ||||
| #include "CubebUtils.h" | #include "CubebUtils.h" | ||||
| +#ifdef MOZ_SYSTEM_SOUNDTOUCH | +#ifdef MOZ_SYSTEM_SOUNDTOUCH | ||||
| +#include "soundtouch/SoundTouch.h" | +#include "soundtouch/SoundTouch.h" | ||||
| +#else | +#else | ||||
| #include "soundtouch/SoundTouchFactory.h" | #include "soundtouch/SoundTouchFactory.h" | ||||
| +#endif | +#endif | ||||
| namespace mozilla { | #if defined(XP_WIN) | ||||
| #include "mozilla/audio/AudioNotificationReceiver.h" | |||||
| @@ -287,7 +291,11 @@ private: | @@ -297,7 +301,11 @@ private: | ||||
| uint32_t mChannels; | uint32_t mChannels; | ||||
| uint32_t mOutChannels; | uint32_t mOutChannels; | ||||
| AudioClock mAudioClock; | AudioClock mAudioClock; | ||||
| +#ifdef MOZ_SYSTEM_SOUNDTOUCH | +#ifdef MOZ_SYSTEM_SOUNDTOUCH | ||||
| + nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher; | + nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher; | ||||
| +#else | +#else | ||||
| soundtouch::SoundTouch* mTimeStretcher; | soundtouch::SoundTouch* mTimeStretcher; | ||||
| +#endif | +#endif | ||||
| // Output file for dumping audio | // Output file for dumping audio | ||||
| FILE* mDumpFile; | FILE* mDumpFile; | ||||
| diff --git dom/media/moz.build dom/media/moz.build | diff --git dom/media/moz.build dom/media/moz.build | ||||
| index 86b051c58d33..fb6186dce78b 100644 | index 86b051c58d33..fb6186dce78b 100644 | ||||
| --- mozilla/dom/media/moz.build | --- dom/media/moz.build | ||||
| +++ mozilla/dom/media/moz.build | +++ dom/media/moz.build | ||||
| @@ -308,6 +308,21 @@ if CONFIG['MOZ_WEBRTC']: | @@ -326,6 +326,21 @@ if CONFIG['MOZ_WEBRTC']: | ||||
| DEFINES['MOZILLA_INTERNAL_API'] = True | DEFINES['MOZILLA_INTERNAL_API'] = True | ||||
| +if CONFIG['MOZ_SYSTEM_OGG']: | +if CONFIG['MOZ_SYSTEM_OGG']: | ||||
| + CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_THEORA']: | +if CONFIG['MOZ_SYSTEM_THEORA']: | ||||
| + CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_VORBIS']: | +if CONFIG['MOZ_SYSTEM_VORBIS']: | ||||
| + CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_TREMOR']: | +if CONFIG['MOZ_SYSTEM_TREMOR']: | ||||
| + CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: | +if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: | ||||
| + CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS'] | ||||
| + | + | ||||
| if CONFIG['OS_TARGET'] == 'WINNT': | if CONFIG['MOZ_ANDROID_HLS_SUPPORT']: | ||||
| DEFINES['WEBRTC_WIN'] = True | DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True | ||||
| else: | |||||
| diff --git dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | diff --git dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | ||||
| index 078f6ea5ef60..c600db067539 100644 | index 078f6ea5ef60..c600db067539 100644 | ||||
| --- mozilla/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | --- dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | ||||
| +++ mozilla/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | +++ dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | ||||
| @@ -11,9 +11,13 @@ | @@ -15,9 +15,13 @@ | ||||
| #include "prmem.h" | #include <windows.h> | ||||
| #include "prlink.h" | #endif | ||||
| +#ifdef MOZ_SYSTEM_SOUNDTOUCH | +#ifdef MOZ_SYSTEM_SOUNDTOUCH | ||||
| +#include "nsXPCOMPrivate.h" // for XUL_DLL | +#include "nsXPCOMPrivate.h" // for XUL_DLL | ||||
| +#else | +#else | ||||
| // We use a known symbol located in lgpllibs to determine its location. | // We use a known symbol located in lgpllibs to determine its location. | ||||
| // soundtouch happens to be always included in lgpllibs | // soundtouch happens to be always included in lgpllibs | ||||
| #include "soundtouch/SoundTouch.h" | #include "soundtouch/SoundTouch.h" | ||||
| +#endif | +#endif | ||||
| namespace mozilla { | namespace mozilla { | ||||
| @@ -50,6 +54,12 @@ FFVPXRuntimeLinker::Init() | @@ -64,6 +68,12 @@ FFVPXRuntimeLinker::Init() | ||||
| sLinkStatus = LinkStatus_FAILED; | sLinkStatus = LinkStatus_FAILED; | ||||
| +#ifdef MOZ_SYSTEM_SOUNDTOUCH | +#ifdef MOZ_SYSTEM_SOUNDTOUCH | ||||
| + // We retrieve the path of the XUL library as this is where mozavcodec and | + // We retrieve the path of the XUL library as this is where mozavcodec and | ||||
| + // mozavutil libs are located. | + // mozavutil libs are located. | ||||
| + char* path = | + char* path = | ||||
| + PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init); | + PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init); | ||||
| +#else | +#else | ||||
| // We retrieve the path of the lgpllibs library as this is where mozavcodec | // We retrieve the path of the lgpllibs library as this is where mozavcodec | ||||
| // and mozavutil libs are located. | // and mozavutil libs are located. | ||||
| char* lgpllibsname = PR_GetLibraryName(nullptr, "lgpllibs"); | PathString lgpllibsname = GetLibraryName(nullptr, "lgpllibs"); | ||||
| @@ -60,6 +70,7 @@ FFVPXRuntimeLinker::Init() | @@ -73,6 +83,7 @@ FFVPXRuntimeLinker::Init() | ||||
| PR_GetLibraryFilePathname(lgpllibsname, | PathString path = | ||||
| GetLibraryFilePathname(lgpllibsname.get(), | |||||
| (PRFuncPtr)&soundtouch::SoundTouch::getVersionId); | (PRFuncPtr)&soundtouch::SoundTouch::getVersionId); | ||||
| PR_FreeLibraryName(lgpllibsname); | |||||
| +#endif | +#endif | ||||
| if (!path) { | if (path.IsEmpty()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA | diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA | ||||
| index 6213fdc7770c..ada799916a17 100644 | index 6213fdc7770c..ada799916a17 100644 | ||||
| --- mozilla/media/libogg/README_MOZILLA | --- media/libogg/README_MOZILLA | ||||
| +++ mozilla/media/libogg/README_MOZILLA | +++ media/libogg/README_MOZILLA | ||||
| @@ -6,3 +6,6 @@ package downloaded from xiph.org and copied using the update.sh script. | @@ -6,3 +6,6 @@ package downloaded from xiph.org and copied using the update.sh script. | ||||
| The int-types.patch address a bug that config_types.h generated from | The int-types.patch address a bug that config_types.h generated from | ||||
| Linux platform can't be used on OpenSolaris directly see Mozilla bug | Linux platform can't be used on OpenSolaris directly see Mozilla bug | ||||
| 449754 | 449754 | ||||
| + | + | ||||
| +The in-tree copy may be omitted during build by --with-system-ogg. | +The in-tree copy may be omitted during build by --with-system-ogg. | ||||
| +Keep version in old-configure.in in sync on updates. | +Keep version in old-configure.in in sync on updates. | ||||
| diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA | diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA | ||||
| index dc0dbe8f6886..ea73b55e3e39 100644 | index dc0dbe8f6886..ea73b55e3e39 100644 | ||||
| --- mozilla/media/libsoundtouch/README_MOZILLA | --- media/libsoundtouch/README_MOZILLA | ||||
| +++ mozilla/media/libsoundtouch/README_MOZILLA | +++ media/libsoundtouch/README_MOZILLA | ||||
| @@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree, | @@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree, | ||||
| using the script `update.sh`. Some changes have been made to the files, using | using the script `update.sh`. Some changes have been made to the files, using | ||||
| the patch `moz-libsoundtouch.patch`. We also use a custom soundtouch_config.h. | the patch `moz-libsoundtouch.patch`. We also use a custom soundtouch_config.h. | ||||
| +The in-tree copy may be omitted during build by --with-system-soundtouch. | +The in-tree copy may be omitted during build by --with-system-soundtouch. | ||||
| +Keep version in old-configure.in in sync on updates. | +Keep version in old-configure.in in sync on updates. | ||||
| diff --git media/libsoundtouch/src/soundtouch_perms.h media/libsoundtouch/src/soundtouch_perms.h | diff --git media/libsoundtouch/src/soundtouch_perms.h media/libsoundtouch/src/soundtouch_perms.h | ||||
| index 0af2fe618311..10973564e7a4 100644 | index 0af2fe618311..10973564e7a4 100644 | ||||
| --- mozilla/media/libsoundtouch/src/soundtouch_perms.h | --- media/libsoundtouch/src/soundtouch_perms.h | ||||
| +++ mozilla/media/libsoundtouch/src/soundtouch_perms.h | +++ media/libsoundtouch/src/soundtouch_perms.h | ||||
| @@ -12,7 +12,9 @@ | @@ -12,7 +12,9 @@ | ||||
| #pragma GCC visibility push(default) | #pragma GCC visibility push(default) | ||||
| #include "SoundTouch.h" | #include "SoundTouch.h" | ||||
| +#ifndef MOZ_SYSTEM_SOUNDTOUCH | +#ifndef MOZ_SYSTEM_SOUNDTOUCH | ||||
| #include "SoundTouchFactory.h" | #include "SoundTouchFactory.h" | ||||
| +#endif | +#endif | ||||
| #pragma GCC visibility pop | #pragma GCC visibility pop | ||||
| #endif // MOZILLA_SOUNDTOUCH_PERMS_H | #endif // MOZILLA_SOUNDTOUCH_PERMS_H | ||||
| diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA | diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA | ||||
| index d48dbfa6f63d..6f30f250220e 100644 | index d48dbfa6f63d..6f30f250220e 100644 | ||||
| --- mozilla/media/libtheora/README_MOZILLA | --- media/libtheora/README_MOZILLA | ||||
| +++ mozilla/media/libtheora/README_MOZILLA | +++ media/libtheora/README_MOZILLA | ||||
| @@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh, | @@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh, | ||||
| the addition/update of Makefile.in files for the Mozilla build system. | the addition/update of Makefile.in files for the Mozilla build system. | ||||
| The subversion revision used was r17578. | The subversion revision used was r17578. | ||||
| + | + | ||||
| +The in-tree copy may be omitted during build by --with-system-theora. | +The in-tree copy may be omitted during build by --with-system-theora. | ||||
| +Keep version in old-configure.in in sync on updates. | +Keep version in old-configure.in in sync on updates. | ||||
| diff --git media/libtheora/moz.build media/libtheora/moz.build | diff --git media/libtheora/moz.build media/libtheora/moz.build | ||||
| index c7f85eebff95..aae7b814adb5 100644 | index c7f85eebff95..aae7b814adb5 100644 | ||||
| --- mozilla/media/libtheora/moz.build | --- media/libtheora/moz.build | ||||
| +++ mozilla/media/libtheora/moz.build | +++ media/libtheora/moz.build | ||||
| @@ -21,6 +21,9 @@ FINAL_LIBRARY = 'gkmedias' | @@ -21,6 +21,9 @@ FINAL_LIBRARY = 'gkmedias' | ||||
| # The encoder is currently not included. | # The encoder is currently not included. | ||||
| DEFINES['THEORA_DISABLE_ENCODE'] = True | DEFINES['THEORA_DISABLE_ENCODE'] = True | ||||
| +if CONFIG['MOZ_SYSTEM_OGG']: | +if CONFIG['MOZ_SYSTEM_OGG']: | ||||
| + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | ||||
| + | + | ||||
| # Suppress warnings in third-party code. | # Suppress warnings in third-party code. | ||||
| if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: | if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'): | ||||
| CFLAGS += ['-Wno-type-limits'] | CFLAGS += ['-Wno-type-limits'] | ||||
| diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA | diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA | ||||
| index ee67b53a05c5..81c971773d55 100644 | index ee67b53a05c5..81c971773d55 100644 | ||||
| --- mozilla/media/libtremor/README_MOZILLA | --- media/libtremor/README_MOZILLA | ||||
| +++ mozilla/media/libtremor/README_MOZILLA | +++ media/libtremor/README_MOZILLA | ||||
| @@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system. | @@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system. | ||||
| The upstream release used was http://svn.xiph.org/trunk/Tremor/ | The upstream release used was http://svn.xiph.org/trunk/Tremor/ | ||||
| The subversion revision used was r17547. | The subversion revision used was r17547. | ||||
| + | + | ||||
| +The in-tree copy may be omitted during build by --with-system-tremor. | +The in-tree copy may be omitted during build by --with-system-tremor. | ||||
| +Keep version in old-configure.in in sync on updates. | +Keep version in old-configure.in in sync on updates. | ||||
| diff --git media/libtremor/moz.build media/libtremor/moz.build | diff --git media/libtremor/moz.build media/libtremor/moz.build | ||||
| index 83afc8e37c64..71ef159da3d7 100644 | index 83afc8e37c64..71ef159da3d7 100644 | ||||
| --- mozilla/media/libtremor/moz.build | --- media/libtremor/moz.build | ||||
| +++ mozilla/media/libtremor/moz.build | +++ media/libtremor/moz.build | ||||
| @@ -9,3 +9,5 @@ with Files('*'): | @@ -9,3 +9,5 @@ with Files('*'): | ||||
| DIRS += ['include/tremor', 'lib'] | DIRS += ['include/tremor', 'lib'] | ||||
| +if CONFIG['MOZ_SYSTEM_OGG']: | +if CONFIG['MOZ_SYSTEM_OGG']: | ||||
| + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | ||||
| diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA | diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA | ||||
| index 1211ac074b33..eb31084aed25 100644 | index 1211ac074b33..eb31084aed25 100644 | ||||
| --- mozilla/media/libvorbis/README_MOZILLA | --- media/libvorbis/README_MOZILLA | ||||
| +++ mozilla/media/libvorbis/README_MOZILLA | +++ media/libvorbis/README_MOZILLA | ||||
| @@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.5@19464 | @@ -8,3 +8,6 @@ from https://git.xiph.org/vorbis.git | ||||
| Some files are renamed during the copy to prevent clashes with object | Some files are renamed during the copy to prevent clashes with object | ||||
| file names with other Mozilla libraries. | file names with other Mozilla libraries. | ||||
| + | + | ||||
| +The in-tree copy may be omitted during build by --with-system-vorbis. | +The in-tree copy may be omitted during build by --with-system-vorbis. | ||||
| +Keep version in old-configure.in in sync on updates. | +Keep version in old-configure.in in sync on updates. | ||||
| diff --git media/libvorbis/moz.build media/libvorbis/moz.build | diff --git media/libvorbis/moz.build media/libvorbis/moz.build | ||||
| index adf393782cc9..923b76231107 100644 | index adf393782cc9..923b76231107 100644 | ||||
| --- mozilla/media/libvorbis/moz.build | --- media/libvorbis/moz.build | ||||
| +++ mozilla/media/libvorbis/moz.build | +++ media/libvorbis/moz.build | ||||
| @@ -56,3 +56,6 @@ FINAL_LIBRARY = 'gkmedias' | @@ -56,3 +56,6 @@ FINAL_LIBRARY = 'gkmedias' | ||||
| # Suppress warnings in third-party code. | # Suppress warnings in third-party code. | ||||
| if CONFIG['GNU_CC']: | if CONFIG['CC_TYPE'] in ('clang', 'gcc'): | ||||
| CFLAGS += ['-Wno-uninitialized'] | CFLAGS += ['-Wno-uninitialized'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_OGG']: | +if CONFIG['MOZ_SYSTEM_OGG']: | ||||
| + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] | ||||
| diff --git old-configure.in old-configure.in | diff --git old-configure.in old-configure.in | ||||
| index b614eef85c89..85f9099dba4d 100644 | index b614eef85c89..85f9099dba4d 100644 | ||||
| --- mozilla/old-configure.in | --- old-configure.in | ||||
| +++ mozilla/old-configure.in | +++ old-configure.in | ||||
| @@ -2941,6 +2941,111 @@ if test -n "$MOZ_OMX_PLUGIN"; then | @@ -2627,6 +2627,111 @@ if test -n "$MOZ_APPLEMEDIA"; then | ||||
| fi | fi | ||||
| fi | fi # COMPILE_ENVIRONMENT | ||||
| +dnl ======================================================== | +dnl ======================================================== | ||||
| +dnl Check for libogg | +dnl Check for libogg | ||||
| +dnl ======================================================== | +dnl ======================================================== | ||||
| + | + | ||||
| +MOZ_ARG_WITH_BOOL(system-ogg, | +MOZ_ARG_WITH_BOOL(system-ogg, | ||||
| +[ --with-system-ogg Use system libogg (located with pkgconfig)], | +[ --with-system-ogg Use system libogg (located with pkgconfig)], | ||||
| +MOZ_SYSTEM_OGG=1, | +MOZ_SYSTEM_OGG=1, | ||||
| +MOZ_SYSTEM_OGG=) | +MOZ_SYSTEM_OGG=) | ||||
| + | + | ||||
| +if test -n "$MOZ_SYSTEM_OGG"; then | +if test -n "$MOZ_SYSTEM_OGG"; then | ||||
| + PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.0) | + PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.3) | ||||
| + | + | ||||
| + _SAVE_LIBS=$LIBS | + _SAVE_LIBS=$LIBS | ||||
| + LIBS="$LIBS $MOZ_OGG_LIBS" | + LIBS="$LIBS $MOZ_OGG_LIBS" | ||||
| + AC_CHECK_FUNC(ogg_set_mem_functions, [], | + AC_CHECK_FUNC(ogg_set_mem_functions, [], | ||||
| + [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)]) | + [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)]) | ||||
| + LIBS=$_SAVE_LIBS | + LIBS=$_SAVE_LIBS | ||||
| +fi | +fi | ||||
| + | + | ||||
| +AC_SUBST(MOZ_SYSTEM_OGG) | +AC_SUBST(MOZ_SYSTEM_OGG) | ||||
| + | + | ||||
| +dnl ======================================================== | +dnl ======================================================== | ||||
| +dnl Check for libvorbis | +dnl Check for libvorbis | ||||
| +dnl ======================================================== | +dnl ======================================================== | ||||
| + | + | ||||
| +MOZ_ARG_WITH_BOOL(system-vorbis, | +MOZ_ARG_WITH_BOOL(system-vorbis, | ||||
| +[ --with-system-vorbis Use system libvorbis (located with pkgconfig)], | +[ --with-system-vorbis Use system libvorbis (located with pkgconfig)], | ||||
| +MOZ_SYSTEM_VORBIS=1, | +MOZ_SYSTEM_VORBIS=1, | ||||
| +MOZ_SYSTEM_VORBIS=) | +MOZ_SYSTEM_VORBIS=) | ||||
| + | + | ||||
| +if test -n "$MOZ_SYSTEM_VORBIS"; then | +if test -n "$MOZ_SYSTEM_VORBIS"; then | ||||
| + PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5) | + PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.6) | ||||
| +fi | +fi | ||||
| + | + | ||||
| +AC_SUBST(MOZ_SYSTEM_VORBIS) | +AC_SUBST(MOZ_SYSTEM_VORBIS) | ||||
| + | + | ||||
| +dnl ======================================================== | +dnl ======================================================== | ||||
| +dnl Check for integer-only libvorbis aka tremor | +dnl Check for integer-only libvorbis aka tremor | ||||
| +dnl ======================================================== | +dnl ======================================================== | ||||
| + | + | ||||
| ▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
| +fi | +fi | ||||
| +AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH) | +AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH) | ||||
| + | + | ||||
| dnl system libvpx Support | dnl system libvpx Support | ||||
| dnl ======================================================== | dnl ======================================================== | ||||
| MOZ_ARG_WITH_BOOL(system-libvpx, | MOZ_ARG_WITH_BOOL(system-libvpx, | ||||
| diff --git toolkit/library/moz.build toolkit/library/moz.build | diff --git toolkit/library/moz.build toolkit/library/moz.build | ||||
| index 079a575adec3..514d901195de 100644 | index 079a575adec3..514d901195de 100644 | ||||
| --- mozilla/toolkit/library/moz.build | --- toolkit/library/moz.build | ||||
| +++ mozilla/toolkit/library/moz.build | +++ toolkit/library/moz.build | ||||
| @@ -237,6 +237,21 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | @@ -240,6 +240,21 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | ||||
| if CONFIG['MOZ_SYSTEM_HUNSPELL']: | if CONFIG['MOZ_SYSTEM_HUNSPELL']: | ||||
| OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] | OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] | ||||
| +if CONFIG['MOZ_SYSTEM_OGG']: | +if CONFIG['MOZ_SYSTEM_OGG']: | ||||
| + OS_LIBS += CONFIG['MOZ_OGG_LIBS'] | + OS_LIBS += CONFIG['MOZ_OGG_LIBS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_THEORA']: | +if CONFIG['MOZ_SYSTEM_THEORA']: | ||||
| + OS_LIBS += CONFIG['MOZ_THEORA_LIBS'] | + OS_LIBS += CONFIG['MOZ_THEORA_LIBS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_VORBIS']: | +if CONFIG['MOZ_SYSTEM_VORBIS']: | ||||
| + OS_LIBS += CONFIG['MOZ_VORBIS_LIBS'] | + OS_LIBS += CONFIG['MOZ_VORBIS_LIBS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_TREMOR']: | +if CONFIG['MOZ_SYSTEM_TREMOR']: | ||||
| + OS_LIBS += CONFIG['MOZ_TREMOR_LIBS'] | + OS_LIBS += CONFIG['MOZ_TREMOR_LIBS'] | ||||
| + | + | ||||
| +if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: | +if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: | ||||
| + OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS'] | + OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS'] | ||||
| + | + | ||||
| if CONFIG['MOZ_SYSTEM_LIBEVENT']: | if CONFIG['MOZ_SYSTEM_LIBEVENT']: | ||||
| OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] | OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] | ||||
| diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp | diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp | ||||
| index c083ab4bc4f3..62b917043a2c 100644 | index c083ab4bc4f3..62b917043a2c 100644 | ||||
| --- mozilla/xpcom/build/XPCOMInit.cpp | --- xpcom/build/XPCOMInit.cpp | ||||
| +++ mozilla/xpcom/build/XPCOMInit.cpp | +++ xpcom/build/XPCOMInit.cpp | ||||
| @@ -154,7 +154,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**); | @@ -132,7 +132,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**); | ||||
| #include "mozilla/ipc/GeckoChildProcessHost.h" | #include "mozilla/ipc/GeckoChildProcessHost.h" | ||||
| +#ifndef MOZ_OGG_NO_MEM_REPORTING | +#ifndef MOZ_OGG_NO_MEM_REPORTING | ||||
| #include "ogg/ogg.h" | #include "ogg/ogg.h" | ||||
| +#endif | +#endif | ||||
| #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) | #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) | ||||
| #if defined(HAVE_STDINT_H) | #if defined(HAVE_STDINT_H) | ||||
| // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in | // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in | ||||
| @@ -664,11 +666,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult, | @@ -639,11 +641,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult, | ||||
| // this oddness. | // this oddness. | ||||
| mozilla::SetICUMemoryFunctions(); | mozilla::SetICUMemoryFunctions(); | ||||
| +#ifndef MOZ_OGG_NO_MEM_REPORTING | +#ifndef MOZ_OGG_NO_MEM_REPORTING | ||||
| // Do the same for libogg. | // Do the same for libogg. | ||||
| ogg_set_mem_functions(OggReporter::CountingMalloc, | ogg_set_mem_functions(OggReporter::CountingMalloc, | ||||
| OggReporter::CountingCalloc, | OggReporter::CountingCalloc, | ||||
| OggReporter::CountingRealloc, | OggReporter::CountingRealloc, | ||||
| OggReporter::CountingFree); | OggReporter::CountingFree); | ||||
| +#endif | +#endif | ||||
| #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) | #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) | ||||
| // And for VPX. | // And for VPX. | ||||