Index: head/www/firefox/Makefile =================================================================== --- head/www/firefox/Makefile (revision 404716) +++ head/www/firefox/Makefile (revision 404717) @@ -1,98 +1,99 @@ # Created by: Alan Eldridge # $FreeBSD$ PORTNAME= firefox DISTVERSION= 43.0.3 DISTVERSIONSUFFIX=.source +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla BUILD_DEPENDS= nspr>=4.10.10:${PORTSDIR}/devel/nspr \ nss>=3.19.4:${PORTSDIR}/security/nss \ libevent2>=2.0.21_2:${PORTSDIR}/devel/libevent2 \ soundtouch>=1.8.0:${PORTSDIR}/audio/soundtouch \ harfbuzz>=0.9.42:${PORTSDIR}/print/harfbuzz \ graphite2>=1.2.4:${PORTSDIR}/graphics/graphite2 \ libvorbis>=1.3.5,3:${PORTSDIR}/audio/libvorbis \ libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \ sqlite3>=3.8.9:${PORTSDIR}/databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \ v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \ autoconf-2.13:${PORTSDIR}/devel/autoconf213 \ yasm:${PORTSDIR}/devel/yasm \ zip:${PORTSDIR}/archivers/zip \ unzip:${PORTSDIR}/archivers/unzip # opus>=1.1:${PORTSDIR}/audio/opus \ LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l USE_GECKO= gecko CONFLICTS_INSTALL= firefox-esr-45.* firefox-esr-3[18].* firefox-esr-24.* MOZ_PKGCONFIG_FILES= # empty USE_MOZILLA= -opus MOZILLA_NAME= Firefox USE_QT5= # empty QT_NONSTANDARD= yes USE_GL= gl USES= tar:xz FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \ --enable-application=browser \ --enable-official-branding OPTIONS_EXCLUDE= GSTREAMER LOGGING OPTIONS_DEFAULT= GTK2 OPTIONS_SINGLE+= TOOLKIT OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3 .include "${.CURDIR}/../../www/firefox/Makefile.options" .include WRKSRC:= ${WRKDIR}/${PORTNAME}-${DISTVERSION} .if ${PORT_OPTIONS:MALSA} RUN_DEPENDS+= alsa-lib>=1.0.27.2_1:${PORTSDIR}/audio/alsa-lib .endif .if ! ${PORT_OPTIONS:MBUNDLED_CAIRO} BUILD_DEPENDS+= cairo>=1.12.16_1,2:${PORTSDIR}/graphics/cairo .endif .if ${PORT_OPTIONS:MGSTREAMER} RUN_DEPENDS+= gstreamer1-libav>=1.2.4_1:${PORTSDIR}/multimedia/gstreamer1-libav .endif .if ${PORT_OPTIONS:MGTK3} BUILD_DEPENDS+= gtk3>=3.14.6:${PORTSDIR}/x11-toolkits/gtk30 .endif post-extract: @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' -e 's|@MOZILLA@|${MOZILLA}|' \ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|' \ <${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop post-patch: @${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \ ${WRKSRC}/configure.in @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp pre-configure: (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop ${STAGEDIR}${PREFIX}/share/applications/ ${LN} -sf ${FIREFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${FIREFOX_ICON} .include Index: head/www/firefox/files/patch-bug1209410 =================================================================== --- head/www/firefox/files/patch-bug1209410 (nonexistent) +++ head/www/firefox/files/patch-bug1209410 (revision 404717) @@ -0,0 +1,169 @@ +# Use MP3Demuxer/MediaFormatReader by default when available + +diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp +--- dom/media/DecoderTraits.cpp ++++ dom/media/DecoderTraits.cpp +@@ -200,10 +200,10 @@ DecoderTraits::IsWebMTypeAndEnabled(cons + static bool + IsGStreamerSupportedType(const nsACString& aMimeType) + { +- if (!MediaDecoder::IsGStreamerEnabled()) ++ if (DecoderTraits::IsWebMTypeAndEnabled(aMimeType)) + return false; + +- if (DecoderTraits::IsWebMTypeAndEnabled(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false)) ++ if (!MediaDecoder::IsGStreamerEnabled()) + return false; + + if (IsOggType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false)) +@@ -366,7 +366,7 @@ static bool + IsMP3SupportedType(const nsACString& aType, + const nsAString& aCodecs = EmptyString()) + { +- return aType.EqualsASCII("audio/mpeg") && MP3Decoder::IsEnabled(); ++ return MP3Decoder::CanHandleMediaType(aType, aCodecs); + } + + #ifdef MOZ_APPLEMEDIA +diff --git a/dom/media/MP3Decoder.cpp b/dom/media/MP3Decoder.cpp +--- dom/media/MP3Decoder.cpp ++++ dom/media/MP3Decoder.cpp +@@ -10,10 +10,7 @@ + #include "MediaFormatReader.h" + #include "MP3Demuxer.h" + #include "mozilla/Preferences.h" +- +-#ifdef MOZ_WIDGET_ANDROID +-#include "AndroidBridge.h" +-#endif ++#include "PlatformDecoderModule.h" + + namespace mozilla { + +@@ -32,14 +29,61 @@ MP3Decoder::CreateStateMachine() { + return new MediaDecoderStateMachine(this, reader); + } + ++static already_AddRefed ++CreateTestMP3Decoder(AudioInfo& aConfig) ++{ ++ PlatformDecoderModule::Init(); ++ ++ nsRefPtr platform = PlatformDecoderModule::Create(); ++ if (!platform || !platform->SupportsMimeType(aConfig.mMimeType)) { ++ return nullptr; ++ } ++ ++ nsRefPtr decoder( ++ platform->CreateDecoder(aConfig, nullptr, nullptr)); ++ if (!decoder) { ++ return nullptr; ++ } ++ ++ return decoder.forget(); ++} ++ ++static bool ++CanCreateMP3Decoder() ++{ ++ static bool haveCachedResult = false; ++ static bool result = false; ++ if (haveCachedResult) { ++ return result; ++ } ++ AudioInfo config; ++ config.mMimeType = "audio/mpeg"; ++ config.mRate = 48000; ++ config.mChannels = 2; ++ config.mBitDepth = 16; ++ nsRefPtr decoder(CreateTestMP3Decoder(config)); ++ if (decoder) { ++ result = true; ++ } ++ haveCachedResult = true; ++ return result; ++} ++ ++/* static */ + bool + MP3Decoder::IsEnabled() { +-#ifdef MOZ_WIDGET_ANDROID +- // We need android.media.MediaCodec which exists in API level 16 and higher. +- return AndroidBridge::Bridge()->GetAPIVersion() >= 16; +-#else +- return Preferences::GetBool("media.mp3.enabled"); +-#endif ++ return CanCreateMP3Decoder(); ++} ++ ++/* static */ ++bool MP3Decoder::CanHandleMediaType(const nsACString& aType, ++ const nsAString& aCodecs) ++{ ++ if (aType.EqualsASCII("audio/mp3") || aType.EqualsASCII("audio/mpeg")) { ++ return CanCreateMP3Decoder() && ++ (aCodecs.IsEmpty() || aCodecs.EqualsASCII("mp3")); ++ } ++ return false; + } + + } // namespace mozilla +diff --git a/dom/media/MP3Decoder.h b/dom/media/MP3Decoder.h +--- dom/media/MP3Decoder.h ++++ dom/media/MP3Decoder.h +@@ -19,6 +19,8 @@ public: + // Returns true if the MP3 backend is preffed on, and we're running on a + // platform that is likely to have decoders for the format. + static bool IsEnabled(); ++ static bool CanHandleMediaType(const nsACString& aType, ++ const nsAString& aCodecs); + }; + + } // namespace mozilla +diff --git a/dom/media/test/manifest.js b/dom/media/test/manifest.js +--- dom/media/test/manifest.js ++++ dom/media/test/manifest.js +@@ -76,7 +76,7 @@ var gPlayedTests = [ + { name:"seek.ogv", type:"video/ogg", duration:3.966 }, + { name:"seek.webm", type:"video/webm", duration:3.966 }, + { name:"gizmo.mp4", type:"video/mp4", duration:5.56 }, +- { name:"owl.mp3", type:"audio/mpeg", duration:3.29 }, ++ { name:"owl.mp3", type:"audio/mpeg", duration:3.343 }, + // Disable vbr.mp3 to see if it reduces the error of AUDCLNT_E_CPUUSAGE_EXCEEDED. + // See bug 1110922 comment 26. + //{ name:"vbr.mp3", type:"audio/mpeg", duration:10.0 }, +@@ -237,13 +237,13 @@ var gPlayTests = [ + + { name:"small-shot.m4a", type:"audio/mp4", duration:0.29 }, + { name:"small-shot.mp3", type:"audio/mpeg", duration:0.27 }, +- { name:"owl.mp3", type:"audio/mpeg", duration:3.29 }, ++ { name:"owl.mp3", type:"audio/mpeg", duration:3.343 }, + // owl.mp3 as above, but with something funny going on in the ID3v2 tag + // that causes DirectShow to fail. +- { name:"owl-funny-id3.mp3", type:"audio/mpeg", duration:3.29 }, ++ { name:"owl-funny-id3.mp3", type:"audio/mpeg", duration:3.343 }, + // owl.mp3 as above, but with something even funnier going on in the ID3v2 tag + // that causes DirectShow to fail. +- { name:"owl-funnier-id3.mp3", type:"audio/mpeg", duration:3.29 }, ++ { name:"owl-funnier-id3.mp3", type:"audio/mpeg", duration:3.343 }, + // One second of silence with ~140KB of ID3 tags. Usually when the first MP3 + // frame is at such a high offset into the file, MP3FrameParser will give up + // and report that the stream is not MP3. However, it does not count ID3 tags +@@ -469,7 +469,7 @@ var gSeekTests = [ + { name:"split.webm", type:"video/webm", duration:1.967 }, + { name:"detodos.opus", type:"audio/ogg; codecs=opus", duration:2.9135 }, + { name:"gizmo.mp4", type:"video/mp4", duration:5.56 }, +- { name:"owl.mp3", type:"audio/mpeg", duration:3.29 }, ++ { name:"owl.mp3", type:"audio/mpeg", duration:3.343 }, + { name:"bogus.duh", type:"bogus/duh", duration:123 } + ]; + +@@ -523,7 +523,7 @@ if (getAndroidVersion() >= 18) { + var gAudioTests = [ + { name:"r11025_s16_c1.wav", type:"audio/x-wav", duration:1.0 }, + { name:"sound.ogg", type:"audio/ogg" }, +- { name:"owl.mp3", type:"audio/mpeg", duration:3.29 }, ++ { name:"owl.mp3", type:"audio/mpeg", duration:3.343 }, + { name:"small-shot.m4a", type:"audio/mp4", duration:0.29 }, + { name:"bogus.duh", type:"bogus/duh", duration:123 } + ]; Property changes on: head/www/firefox/files/patch-bug1209410 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property