mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-01-24 01:42:13 +08:00
firefox-kde added
This commit is contained in:
parent
f96e96c0e6
commit
d0926d3de1
210
firefox-i18n/PKGBUILD
Normal file
210
firefox-i18n/PKGBUILD
Normal file
@ -0,0 +1,210 @@
|
||||
pkgname=firefox-i18n
|
||||
pkgver=20.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Language pack for Firefox"
|
||||
arch=('any')
|
||||
url="http://www.mozilla.com/"
|
||||
license=('MPL' 'GPL')
|
||||
pkgdesc="Language pack for Firefox"
|
||||
|
||||
_languages=(
|
||||
'ach "Acoli"'
|
||||
'af "Afrikaans"'
|
||||
'ak "Akan"'
|
||||
'ar "Arabic"'
|
||||
'as "Assamese"'
|
||||
'ast "Asturian"'
|
||||
'be "Belarusian"'
|
||||
'bg "Bulgarian"'
|
||||
'bn-BD "Bengali (Bangladesh)"'
|
||||
'bn-IN "Bengali (India)"'
|
||||
'br "Breton"'
|
||||
'bs "Bosnian"'
|
||||
'ca "Catalan"'
|
||||
'cs "Czech"'
|
||||
'csb "Kashubian"'
|
||||
'cy "Welsh"'
|
||||
'da "Danish"'
|
||||
'de "German"'
|
||||
'el "Greek"'
|
||||
'en-GB "English (United Kingdom)"'
|
||||
'en-US "English (United States)"'
|
||||
'en-ZA "English (South Africa)"'
|
||||
'eo "Esperanto"'
|
||||
'es-AR "Spanish (Argentina)"'
|
||||
'es-CL "Spanish (Chile)"'
|
||||
'es-ES "Spanish (Spain)"'
|
||||
'es-MX "Spanish (Mexico)"'
|
||||
'et "Estonian"'
|
||||
'eu "Basque"'
|
||||
'fa "Persian"'
|
||||
'ff "Fula"'
|
||||
'fi "Finnish"'
|
||||
'fr "French"'
|
||||
'fy-NL "Frisian (Netherlands)"'
|
||||
'ga-IE "Irish"'
|
||||
'gd "Gaelic"'
|
||||
'gl "Galician"'
|
||||
'gu-IN "Gujarati (India)"'
|
||||
'he "Hebrew"'
|
||||
'hi-IN "Hindi (India)"'
|
||||
'hr "Croatian"'
|
||||
'hu "Hungarian"'
|
||||
'hy-AM "Armenian"'
|
||||
'id "Indonesian"'
|
||||
'is "Icelandic"'
|
||||
'it "Italian"'
|
||||
'ja "Japanese"'
|
||||
'kk "Kazakh"'
|
||||
'km "Khmer"'
|
||||
'kn "Kannada"'
|
||||
'ko "Korean"'
|
||||
'ku "Kurdish"'
|
||||
'lg "Ganda"'
|
||||
'lij "Ligurian"'
|
||||
'lt "Lithuanian"'
|
||||
'lv "Latvian"'
|
||||
'mai "Maithili"'
|
||||
'mk "Macedonian"'
|
||||
'ml "Malayalam"'
|
||||
'mr "Marathi"'
|
||||
'nb-NO "Norwegian (Bokmal)"'
|
||||
'nl "Dutch"'
|
||||
'nn-NO "Norwegian (Nynorsk)"'
|
||||
'nso "Northern Sotho (Sesotho sa lebowa)"'
|
||||
'or "Oriya"'
|
||||
'pa-IN "Punjabi"'
|
||||
'pl "Polish"'
|
||||
'pt-BR "Brazilian Portuguese"'
|
||||
'pt-PT "Portuguese"'
|
||||
'rm "Romansh"'
|
||||
'ro "Romanian"'
|
||||
'ru "Russian"'
|
||||
'si "Sinhalese"'
|
||||
'sk "Slovak"'
|
||||
'sl "Slovenian"'
|
||||
'son "Songhai"'
|
||||
'sq "Albanian"'
|
||||
'sr "Serbian"'
|
||||
'sv-SE "Swedish"'
|
||||
'ta-LK "Tamil (Sri Lanka)"'
|
||||
'ta "Tamil"'
|
||||
'te "Telugu"'
|
||||
'th "Thai"'
|
||||
'tr "Turkish"'
|
||||
'uk "Ukrainian"'
|
||||
'vi "Vietnamese"'
|
||||
'zh-CN "Chinese (simplified)"'
|
||||
'zh-TW "Chinese (traditional)"'
|
||||
'zu "Zulu"'
|
||||
)
|
||||
|
||||
source=()
|
||||
_url=http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/$pkgver/linux-i686/xpi
|
||||
|
||||
for _lang in "${_languages[@]}"; do
|
||||
_locale=${_lang%% *}
|
||||
|
||||
source+=("firefox-i18n-$pkgver-$_locale.xpi::$_url/$_locale.xpi")
|
||||
done
|
||||
|
||||
# Don't extract anything
|
||||
noextract=(${source[@]%%::*})
|
||||
|
||||
package() {
|
||||
for _lang in "${_languages[@]}"; do
|
||||
_locale=${_lang%% *}
|
||||
install -Dm644 firefox-i18n-$pkgver-${_locale}.xpi \
|
||||
"$pkgdir/opt/firefox/extensions/langpack-${_locale}@firefox.mozilla.org.xpi"
|
||||
done
|
||||
}
|
||||
|
||||
md5sums=('597e3ef4a20841b5bec461634bb46a6d'
|
||||
'0b89340b7cab8803fe5f86c627d52770'
|
||||
'c2a3a0fe444fa389f61339ad5d189fdc'
|
||||
'f32fb82611adb9422cb88599f1c0eb56'
|
||||
'9372776226c93de0115e3cef93477f7a'
|
||||
'1148ca8998b7a13ec415328da3ec311b'
|
||||
'0bf3d930144ce0649a7c42f29316092e'
|
||||
'2e89e7fceca13697bb2f434913b2975a'
|
||||
'7a35eb4ec90cc6dd0ea3fe83f92304dc'
|
||||
'3a3d215e72bf6dea35f8da0a0dca6fc5'
|
||||
'085cc2de9c4bbb541d29ddc5aeb4fbb5'
|
||||
'dbd5046c3d3dab6c4fefef999fe50781'
|
||||
'c38a2f030b88f65681610f3bf60b96c9'
|
||||
'82d0b81be13d1e584a5d92709529440c'
|
||||
'8e5f36b655ac2a1ef63d57bca9b492eb'
|
||||
'aece86a38b9f6d20352426f1ccdfa1fb'
|
||||
'0a0f93a504fb87ff26afffa8c84aa12e'
|
||||
'd9e685e55d32caf84f419f72a1c468ec'
|
||||
'50b88fdc3782f106ef86fe87ebdeac8c'
|
||||
'553f17d16fa89063675ffcef806feb89'
|
||||
'2b2eb97db05c4b7b6fc0d42c57f4e27a'
|
||||
'9739ad4f2a26d964d20d95c0e6e89236'
|
||||
'86a3fd95c1f3217300ee0e289a834030'
|
||||
'3d175fbe1b1970e70b3f62af3b900525'
|
||||
'cb35fbc928fe465a3bc934b1f6bb745f'
|
||||
'50437c49670acab136604b505b404b20'
|
||||
'cf7ddc9b121746963c937199a33d92d7'
|
||||
'7faf0ba42b4233a103a37899afabe2ae'
|
||||
'aaaf844852925aa7071233c6f09ab91a'
|
||||
'06c41a72518f06bf93eae67584a6485d'
|
||||
'935f2c53f26e3a353db73cf29307f569'
|
||||
'aecf7230cb90ca550370c578238ce5a4'
|
||||
'f2de7bfe152ad2797fba831c197d388c'
|
||||
'a68ad8ca8569beb99f680239986db0cf'
|
||||
'94e8e358b0f092618c3acf57b1d0906f'
|
||||
'14f889b49e889293d51721337c33a4d2'
|
||||
'44b618e828a07d7446b095934c56d5e9'
|
||||
'd53b4f6a29ded966b9d187ffd05e4b70'
|
||||
'de0ac2693ed958604ded2f23636effbf'
|
||||
'1618522eb50f173acec7f092c7c96f39'
|
||||
'26db544175c2bcbce4ce30d160cedc87'
|
||||
'b99c07102adab6c7e5fa5f1cb15c5f76'
|
||||
'8e0396a4f6474a35c4918de2784c5221'
|
||||
'4b74f98a3342db51c2ec77ed16b8556b'
|
||||
'a91b96f872177553e7690f244bff7462'
|
||||
'11ed58204ca499e790d192d0bd25b2b3'
|
||||
'97605ae1cfee9bbd73ef64502fcf74c0'
|
||||
'a5e0b54c1b62e8230e68f9e08885d60b'
|
||||
'04fc0ec71cb3737ac22fbca8972836ba'
|
||||
'ce7057480c8e8c6cb4628881aa282935'
|
||||
'1c67943a68874b8bbd1247c2b182c392'
|
||||
'5ff652376c9f8b8cebf35289691d4ea4'
|
||||
'969767e3b6f854678d7a14540b06dfd0'
|
||||
'f12c9f983d359de24e81dc6537272bee'
|
||||
'4d1612c3479b8425fd0d59d7f6f8c62f'
|
||||
'1438937613d33972e169c73e4c623dab'
|
||||
'f43bb1be2f6010ae2aca60d1f4afc41d'
|
||||
'1834a840381523dfe342e16f8ff981cd'
|
||||
'4cef624804aedc2a1e03b59fe4e240ae'
|
||||
'8b8c116f33b2a2c2339b6d7086b613e4'
|
||||
'c5014cc33ffa8f6fb77deb99f44ee7c5'
|
||||
'd1063014c0c76e8c859f8344cba32c70'
|
||||
'3cf5a45579f12400518dc71347e673c1'
|
||||
'd2915e7ac4fabada4c3724e784171320'
|
||||
'c959f7257ba9ffc8b5c7f6a356ae23cc'
|
||||
'5c8f905eebdc01706474711024787e37'
|
||||
'959e327c760433883fa99391983c1d92'
|
||||
'289c26f04aac9162f97cfcf119e047a1'
|
||||
'baa58c0da97b9f00c40b7fac5649917e'
|
||||
'1c73ed43e67724374a6d63ded286853b'
|
||||
'2ff6dba5d558be87f55685ce5847f237'
|
||||
'bbde96f321c72b9e36ba4858152e0abc'
|
||||
'41223f817c308106b4d6cd36472971bd'
|
||||
'874fd27d3497ce8861f59898d4ca071e'
|
||||
'591270d06d4465ca12e4f0af8e877e04'
|
||||
'5ca701859cccf06e76a57a0f058844cd'
|
||||
'5ac2747d887a0d45a30679664dd36af5'
|
||||
'2599b9f22a873a69bf4fc1d8df35b1a8'
|
||||
'ac9b4e003bbcbff1fffade3dac13cda1'
|
||||
'83c02b0e4a0632a585fc604a5034e2b7'
|
||||
'ecb95562b073024cb51d179e1b28417e'
|
||||
'cbce947435041ff404b7b127429a66ab'
|
||||
'52a316fd6f158ff05350aba2f3c8ddda'
|
||||
'579c897bd19c133d26c3a9bb99db25a7'
|
||||
'd9cfd223fd70df09c6f9d5e479ab76b6'
|
||||
'9c4a74f244eeb96bafc2f10f9eb71e6d'
|
||||
'b3cd3bf0724be59bdc35e0e8fe87536c'
|
||||
'e837b3b7f94de1d980b786d115f99e5c'
|
||||
'a89fbe66af0b56518e94471b32517a5d')
|
114
firefox-kde/PKGBUILD
Normal file
114
firefox-kde/PKGBUILD
Normal file
@ -0,0 +1,114 @@
|
||||
# Contributor: Weng Xuetian <wengxt@gmail.com>
|
||||
|
||||
pkgname=firefox-kde
|
||||
pkgver=20.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
|
||||
url='http://www.mozilla.org/projects/firefox'
|
||||
arch=('x86_64')
|
||||
license=('MPL' 'GPL' 'LGPL')
|
||||
depends=('gtk2' 'libnotify' 'alsa-lib' 'gstreamer0.10' 'gstreamer0.10-base' 'libxt' 'firefox-i18n' 'dbus-glib')
|
||||
makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'unzip' 'autoconf2.13' 'mesa' 'yasm')
|
||||
screenshot="http://img864.imageshack.us/img864/5116/firefoxm.png"
|
||||
|
||||
provides=("firefox=${pkgver}")
|
||||
conflicts=('firefox')
|
||||
install=firefox.install
|
||||
url="http://www.mozilla.org/projects/firefox"
|
||||
#source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}.source.tar.bz2
|
||||
#patch http://www.rosenauer.org/hg/mozilla/
|
||||
#patch https://build.opensuse.org/package/show?package=MozillaFirefox&project=mozilla%3AFactory
|
||||
source=(ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}.source.tar.bz2
|
||||
mozconfig
|
||||
firefox.desktop
|
||||
firefox-install-dir.patch
|
||||
vendor.js
|
||||
kde.js
|
||||
firefox-kde.patch
|
||||
mozilla-nongnome-proxies.patch
|
||||
mozilla-kde.patch
|
||||
mozilla-gstreamer-760140.patch
|
||||
firefox-712763.patch
|
||||
duckduckgo.xml
|
||||
)
|
||||
md5sums=('b822ff4b2348410587dec563235d9320'
|
||||
'55864e6a1b7f165efe272472217934d3'
|
||||
'af37777ea15a693e837a5be36e0de3ca'
|
||||
'150ac0fb3ac7b2114c8e8851a9e0516c'
|
||||
'b1b1ad060b411a4abee7dcc63927aa02'
|
||||
'75df0f88cc7a7fa7d522459e4ff82cc5'
|
||||
'194da028eba1fbc316cf37dd586c4112'
|
||||
'79f113b56057e17ca2466cd0ac578bb3'
|
||||
'8e833c5abff5ddd3d20bc81eb9bfc028'
|
||||
'9f4e6467284a5c82fbba0c0afe862f31'
|
||||
'7303a96e92e600a46dd6a2cf9af5ada5'
|
||||
'f6e2a6759b8711b445dbc9d35cbd275f')
|
||||
|
||||
|
||||
build() {
|
||||
cd "mozilla-release"
|
||||
patch -Np1 -i "../firefox-install-dir.patch"
|
||||
|
||||
# modify the patch to make it work in bundle
|
||||
cp ../mozilla-kde.patch ../mozilla-kde-mod.patch
|
||||
sed -i 's|\(\+\#define KMOZILLAHELPER "\)/usr/lib/mozilla/kmozillahelper\("\)|\1kmozillahelper\2|' ../mozilla-kde-mod.patch
|
||||
sed -i 's|\(\+ \)execv\(( KMOZILLAHELPER, args )\)|\1execvp\2|' ../mozilla-kde-mod.patch
|
||||
|
||||
# remove the new file, to make life easier with call makepkg multiple times
|
||||
rm -f content/media/gstreamer/nsGStreamerFormatHelper.cpp \
|
||||
content/media/gstreamer/GStreamerFormatHelper.cpp \
|
||||
content/media/gstreamer/nsGStreamerFormatHelper.h \
|
||||
content/media/gstreamer/GStreamerFormatHelper.h
|
||||
rm -f browser/components/shell/src/nsKDEShellService.cpp \
|
||||
browser/components/shell/src/nsKDEShellService.h \
|
||||
browser/components/shell/src/nsUnixShellService.cpp \
|
||||
browser/components/shell/src/nsUnixShellService.h \
|
||||
browser/base/content/browser-kde.xul
|
||||
rm -f toolkit/xre/nsKDEUtils.cpp \
|
||||
toolkit/xre/nsKDEUtils.h \
|
||||
uriloader/exthandler/unix/nsCommonRegistry.cpp \
|
||||
uriloader/exthandler/unix/nsCommonRegistry.h \
|
||||
uriloader/exthandler/unix/nsKDERegistry.cpp \
|
||||
uriloader/exthandler/unix/nsKDERegistry.h \
|
||||
toolkit/content/widgets/dialog-kde.xml \
|
||||
toolkit/content/widgets/preferences-kde.xml
|
||||
|
||||
msg "apply mozilla-gstreamer-760140.patch"
|
||||
patch -Np1 -i "../mozilla-gstreamer-760140.patch" || return 1
|
||||
msg "apply firefox-712763.patch"
|
||||
patch -Np1 -i "../firefox-712763.patch" || return 1
|
||||
msg "apply mozilla-nongnome-proxies.patch"
|
||||
patch -Np1 -i "../mozilla-nongnome-proxies.patch" || return 1
|
||||
msg "apply mozilla-kde.patch"
|
||||
patch -Np1 -i "../mozilla-kde-mod.patch" || return 1
|
||||
msg "apply firefox-kde.patch"
|
||||
patch -Np1 -i "../firefox-kde.patch" || return 1
|
||||
|
||||
cp "../mozconfig" .mozconfig
|
||||
|
||||
# Fix PRE_RELEASE_SUFFIX
|
||||
sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
|
||||
browser/base/Makefile.in
|
||||
|
||||
export LDFLAGS="$LDFLAGS"
|
||||
export PYTHON="/usr/bin/python2"
|
||||
|
||||
make -j1 -f client.mk build MOZ_MAKE_FLAGS="${MAKEFLAGS}"
|
||||
|
||||
}
|
||||
|
||||
package() {
|
||||
cd mozilla-release
|
||||
make -j1 -f client.mk MOZ_PKG_FATAL_WARNINGS=0 package
|
||||
mkdir -p $pkgdir/opt
|
||||
tar -C $pkgdir/opt -xf obj-ff/dist/firefox-$pkgver.en-US.linux-${CARCH}.tar.bz2
|
||||
|
||||
install -Dm644 ../vendor.js "$pkgdir/opt/firefox/defaults/preferences/vendor.js"
|
||||
install -Dm644 ../kde.js "$pkgdir/opt/firefox/defaults/preferences/kde.js"
|
||||
install -Dm644 ../duckduckgo.xml "$pkgdir/opt/firefox/searchplugins/duckduckgo.xml"
|
||||
|
||||
# Use system-provided dictionaries
|
||||
rm -rf "$pkgdir"/opt/firefox/{dictionaries,hyphenation}
|
||||
ln -s /usr/share/hunspell "$pkgdir/opt/firefox/dictionaries"
|
||||
ln -s /usr/share/hyphen "$pkgdir/opt/firefox/hyphenation"
|
||||
}
|
14
firefox-kde/PKGINFO
Normal file
14
firefox-kde/PKGINFO
Normal file
@ -0,0 +1,14 @@
|
||||
name=firefox
|
||||
version=20.0.1
|
||||
description=The Mozilla Web-Browser
|
||||
icon=firefox.png
|
||||
desktop=firefox.desktop
|
||||
screenshot=http://www.ghacks.net/wp-content/uploads/2008/11/firefox_default_header1-500x338.jpg
|
||||
url=http://www.mozilla.com
|
||||
type=Launcher
|
||||
config=external
|
||||
pkgz=flashplugin kmozillahelper firefox alsa-lib glib2 atk cairo dbus-core dbus-glib expat fontconfig freetype2 gcc-libs gdk-pixbuf2 gstreamer0.10 gstreamer0.10-base gtk2 libffi libice libpng libsm libx11 libxau libxcb libxcomposite libxcursor libxdamage libxdmcp libxext libxfixes libxi libxinerama libxml2 libxrandr libxrender libxt orc pango pixman startup-notification xcb-util zlib pcre yasm firefox-i18n
|
||||
build=alsa-lib atk cairo dbus-core dbus-glib glib2 expat fontconfig freetype2 gcc-libs gdk-pixbuf2 gstreamer0.10 gstreamer0.10-base gtk2 libffi libice libpng libsm libx11 libxau libxcb libxcomposite libxcursor libxdamage libxdmcp libxext libxfixes libxi libxinerama libxml2 libxrandr libxrender libxt orc pango pixman startup-notification xcb-util zlib python2 wireless_tools autoconf2.13 mesa pcre yasm flashplugin kmozillahelper firefox-i18n @firefox
|
||||
env==LD_LIBRARY_PATH=$ORIGIN/lib:$ORIGIN/usr/lib:$ORIGIN/usr/lib/gtk-2.0,,,MOZ_PLUGIN_PATH=$ORIGIN/usr/lib/mozilla/plugins,,,PATH=$ORIGIN/usr/lib/mozilla/:$PATH,,,_BUNDLE_FIREFOX_DESKTOP=firefox-20.0.1-1-x86_64.desktop
|
||||
binary=/opt/firefox/firefox /opt/firefox/libxul.so
|
||||
exec=/firefox_launcher.sh
|
10
firefox-kde/duckduckgo.xml
Normal file
10
firefox-kde/duckduckgo.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<os:ShortName>DuckDuckGo</os:ShortName>
|
||||
<os:Description>DuckDuckGo</os:Description>
|
||||
<os:InputEncoding>UTF-8</os:InputEncoding>
|
||||
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAANcNAADXDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJmlk8pf6+v3s/v7+++zr/fcnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnIOwBJyDscCcg7PZttJ7/7Pfs//////++xO7/S5GA/ycg7P8nIOz2JyDscCcg7AEAAAAAAAAAAAAAAAAnIOwBJyDstScg7P8nIOz/Y8p5/2fHZf9Yv0z/YcF2/1rBUv8nIOz/JyDs/ycg7P8nIOy1JyDsAQAAAAAAAAAAJyDscCcg7P8nIOz/JyDs/4jQoP/p9+n//////05X3v9LkYD/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAJyDsJicg7PYnIOz/JyDs/zUu7f/+/v////////////89N+7/JyDs/yUo7f8nIOz/JyDs/ycg7P8nIOz2JyDsJicg7IAnIOz/JyDs/ycg7P9hXPH////////////t/P//GIr2/wfD+/8Gyfz/DKv5/yM57/8nIOz/JyDs/ycg7H8nIOyzJyDs/ycg7P8nIOz/jov1////////////Otz9/w3G/P8cWfH/JSvt/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDs5icg7P8nIOz/JyDs/7u5+f///////////27l/v8E0v3/BNL9/wTQ/f8Oofn/IT7v/ycg7P8nIOz/JyDs5icg7OYnIOz/JyDs/ycg7P/p6P3/uWsC////////////5fr//6Po/f8Thfb/DKv5/w6f+f8nIOz/JyDs/ycg7OYnIOyzJyDs/ycg7P8nIOz/9/b+/////////////////7lrAv/V1Pv/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDsgCcg7P8nIOz/JyDs/8/N+///////////////////////iIX1/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDsfycg7CYnIOz2JyDs/ycg7P9FP+7/q6n4/+7u/f/n5v3/fXn0/yoj7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7CYAAAAAJyDscCcg7P8nIOz/wsD6/+no/f/Y1/z/eHTz/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAAAAAACcg7AEnIOy1JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7LUnIOwBAAAAAAAAAAAAAAAAJyDsAScg7HAnIOz2JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7HAnIOwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJicg7IAnIOyzJyDs5icg7OYnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAA+B8AAPAPAADAAwAAwAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAwAMAAMADAADwDwAA+B8AAA==</os:Image>
|
||||
<os:Url type="text/html" method="GET" template="http://duckduckgo.com/">
|
||||
<Param name="t" value="chakra"/>
|
||||
<Param name="q" value="{searchTerms}"/>
|
||||
</os:Url>
|
||||
</SearchPlugin>
|
95
firefox-kde/firefox-712763.patch
Normal file
95
firefox-kde/firefox-712763.patch
Normal file
@ -0,0 +1,95 @@
|
||||
# HG changeset patch
|
||||
# User Tim Taubert <ttaubert@mozilla.com>
|
||||
# Date 1358185823 -3600
|
||||
# Node ID f7a2af238d06c17d10c49c94ef860434d5b76758
|
||||
Bug 712763 - Backout changes from bug 669272 to keep original window order when restoring a session
|
||||
|
||||
diff --git a/browser/components/sessionstore/src/SessionStore.jsm b/browser/components/sessionstore/src/SessionStore.jsm
|
||||
--- a/browser/components/sessionstore/src/SessionStore.jsm
|
||||
+++ b/browser/components/sessionstore/src/SessionStore.jsm
|
||||
@@ -1757,23 +1757,16 @@ let SessionStoreInternal = {
|
||||
|
||||
// We want to re-use the last opened window instead of opening a new one in
|
||||
// the case where it's "empty" and not associated with a window in the session.
|
||||
// We will do more processing via _prepWindowToRestoreInto if we need to use
|
||||
// the lastWindow.
|
||||
let lastWindow = this._getMostRecentBrowserWindow();
|
||||
let canUseLastWindow = lastWindow &&
|
||||
!lastWindow.__SS_lastSessionWindowID;
|
||||
- let lastSessionFocusedWindow = null;
|
||||
- this.windowToFocus = lastWindow;
|
||||
-
|
||||
- // move the last focused window to the start of the array so that we
|
||||
- // minimize window movement (see bug 669272)
|
||||
- lastSessionState.windows.unshift(
|
||||
- lastSessionState.windows.splice(lastSessionState.selectedWindow - 1, 1)[0]);
|
||||
|
||||
// Restore into windows or open new ones as needed.
|
||||
for (let i = 0; i < lastSessionState.windows.length; i++) {
|
||||
let winState = lastSessionState.windows[i];
|
||||
let lastSessionWindowID = winState.__lastSessionWindowID;
|
||||
// delete lastSessionWindowID so we don't add that to the window again
|
||||
delete winState.__lastSessionWindowID;
|
||||
|
||||
@@ -1801,28 +1794,19 @@ let SessionStoreInternal = {
|
||||
// Restore into that window - pretend it's a followup since we'll already
|
||||
// have a focused window.
|
||||
//XXXzpao This is going to merge extData together (taking what was in
|
||||
// winState over what is in the window already. The hack we have
|
||||
// in _preWindowToRestoreInto will prevent most (all?) Panorama
|
||||
// weirdness but we will still merge other extData.
|
||||
// Bug 588217 should make this go away by merging the group data.
|
||||
this.restoreWindow(windowToUse, { windows: [winState] }, canOverwriteTabs, true);
|
||||
- if (i == 0)
|
||||
- lastSessionFocusedWindow = windowToUse;
|
||||
-
|
||||
- // if we overwrote the tabs for our last focused window, we should
|
||||
- // give focus to the window that had it in the previous session
|
||||
- if (canOverwriteTabs && windowToUse == lastWindow)
|
||||
- this.windowToFocus = lastSessionFocusedWindow;
|
||||
}
|
||||
else {
|
||||
- let win = this._openWindowWithState({ windows: [winState] });
|
||||
- if (i == 0)
|
||||
- lastSessionFocusedWindow = win;
|
||||
+ this._openWindowWithState({ windows: [winState] });
|
||||
}
|
||||
}
|
||||
|
||||
// Merge closed windows from this session with ones from last session
|
||||
if (lastSessionState._closedWindows) {
|
||||
this._closedWindows = this._closedWindows.concat(lastSessionState._closedWindows);
|
||||
this._capClosedWindows();
|
||||
}
|
||||
@@ -2735,27 +2719,27 @@ let SessionStoreInternal = {
|
||||
this._setWindowStateBusy(aWindow);
|
||||
|
||||
if (root._closedWindows)
|
||||
this._closedWindows = root._closedWindows;
|
||||
|
||||
var winData;
|
||||
if (!root.selectedWindow || root.selectedWindow > root.windows.length) {
|
||||
root.selectedWindow = 0;
|
||||
- } else {
|
||||
- // put the selected window at the beginning of the array to ensure that
|
||||
- // it gets restored first
|
||||
- root.windows.unshift(root.windows.splice(root.selectedWindow - 1, 1)[0]);
|
||||
}
|
||||
+
|
||||
// open new windows for all further window entries of a multi-window session
|
||||
// (unless they don't contain any tab data)
|
||||
for (var w = 1; w < root.windows.length; w++) {
|
||||
winData = root.windows[w];
|
||||
if (winData && winData.tabs && winData.tabs[0]) {
|
||||
var window = this._openWindowWithState({ windows: [winData] });
|
||||
+ if (w == root.selectedWindow - 1) {
|
||||
+ this.windowToFocus = window;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
winData = root.windows[0];
|
||||
if (!winData.tabs) {
|
||||
winData.tabs = [];
|
||||
}
|
||||
// don't restore a single blank tab when we've had an external
|
||||
// URL passed in for loading at startup (cf. bug 357419)
|
30
firefox-kde/firefox-install-dir.patch
Normal file
30
firefox-kde/firefox-install-dir.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff -Nur mozilla-release.orig/config/baseconfig.mk mozilla-release/config/baseconfig.mk
|
||||
--- mozilla-release.orig/config/baseconfig.mk 2012-10-09 07:34:41.762092280 +0000
|
||||
+++ mozilla-release/config/baseconfig.mk 2012-10-09 07:40:53.052771576 +0000
|
||||
@@ -1,9 +1,9 @@
|
||||
INCLUDED_AUTOCONF_MK = 1
|
||||
|
||||
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
|
||||
+includedir := $(includedir)/$(MOZ_APP_NAME)
|
||||
+idldir = $(datadir)/idl/$(MOZ_APP_NAME)
|
||||
+installdir = $(libdir)/$(MOZ_APP_NAME)
|
||||
+sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel
|
||||
DIST = $(DEPTH)/dist
|
||||
|
||||
# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
|
||||
diff -Nur mozilla-release.orig/js/src/config/baseconfig.mk mozilla-release/js/src/config/baseconfig.mk
|
||||
--- mozilla-release.orig/js/src/config/baseconfig.mk 2012-10-09 07:34:58.411973276 +0000
|
||||
+++ mozilla-release/js/src/config/baseconfig.mk 2012-10-09 07:39:55.143186168 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
INCLUDED_AUTOCONF_MK = 1
|
||||
|
||||
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
|
||||
+installdir = $(libdir)/$(MOZ_APP_NAME)
|
||||
+sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel
|
||||
|
||||
ifneq (,$(filter /%,$(TOP_DIST)))
|
||||
DIST = $(TOP_DIST)
|
1818
firefox-kde/firefox-kde.patch
Normal file
1818
firefox-kde/firefox-kde.patch
Normal file
File diff suppressed because it is too large
Load Diff
84
firefox-kde/firefox.desktop
Executable file
84
firefox-kde/firefox.desktop
Executable file
@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Name=Firefox
|
||||
Name[bn]=ফায়ারফক্স
|
||||
Name[eo]=Fajrovulpo
|
||||
Name[fi]=Firefox
|
||||
Name[pa]=ਫਾਇਰਫੋਕਸ
|
||||
Name[tg]=Рӯбоҳи оташин
|
||||
GenericName=Web Browser
|
||||
GenericName[af]=Web Blaaier
|
||||
GenericName[ar]=متصفح ويب
|
||||
GenericName[az]=Veb Səyyahı
|
||||
GenericName[bg]=Браузър
|
||||
GenericName[bn]=ওয়েব ব্রাউজার
|
||||
GenericName[br]=Furcher ar Gwiad
|
||||
GenericName[bs]=WWW Preglednik
|
||||
GenericName[ca]=Fullejador web
|
||||
GenericName[cs]=WWW prohlížeč
|
||||
GenericName[cy]=Porydd Gwe
|
||||
GenericName[da]=Browser
|
||||
GenericName[de]=Web-Browser
|
||||
GenericName[el]=Περιηγητής Ιστού
|
||||
GenericName[eo]=TTT-legilo
|
||||
GenericName[es]=Navegador web
|
||||
GenericName[et]=Veebilehitseja
|
||||
GenericName[eu]=Web arakatzailea
|
||||
GenericName[fa]=مرورگر وب
|
||||
GenericName[fi]=WWW-selain
|
||||
GenericName[fo]=Alnótsfar
|
||||
GenericName[fr]=Navigateur web
|
||||
GenericName[gl]=Navegador Web
|
||||
GenericName[he]=דפדפן אינטרנט
|
||||
GenericName[hi]=वेब ब्राउज़र
|
||||
GenericName[hr]=Web preglednik
|
||||
GenericName[hu]=Webböngésző
|
||||
GenericName[is]=Vafri
|
||||
GenericName[it]=Browser Web
|
||||
GenericName[ja]=ウェブブラウザ
|
||||
GenericName[ko]=웹 브라우저
|
||||
GenericName[lo]=ເວັບບຣາວເຊີ
|
||||
GenericName[lt]=Žiniatinklio naršyklė
|
||||
GenericName[lv]=Web Pārlūks
|
||||
GenericName[mk]=Прелистувач на Интернет
|
||||
GenericName[mn]=Веб-Хөтөч
|
||||
GenericName[nb]=Nettleser
|
||||
GenericName[nds]=Nettkieker
|
||||
GenericName[nl]=Webbrowser
|
||||
GenericName[nn]=Nettlesar
|
||||
GenericName[nso]=Seinyakisi sa Web
|
||||
GenericName[pa]=ਵੈਬ ਝਲਕਾਰਾ
|
||||
GenericName[pl]=Przeglądarka WWW
|
||||
GenericName[pt]=Navegador Web
|
||||
GenericName[pt_BR]=Navegador Web
|
||||
GenericName[ro]=Navigator de web
|
||||
GenericName[ru]=Веб-браузер
|
||||
GenericName[se]=Fierpmádatlogan
|
||||
GenericName[sk]=Webový prehliadač
|
||||
GenericName[sl]=Spletni brskalnik
|
||||
GenericName[sr]=Веб претраживач
|
||||
GenericName[sr@Latn]=Veb pretraživač
|
||||
GenericName[ss]=Ibrawuza yeWeb
|
||||
GenericName[sv]=Webbläsare
|
||||
GenericName[ta]=வலை உலாவி
|
||||
GenericName[tg]=Тафсиргари вэб
|
||||
GenericName[th]=เว็บบราวเซอร์
|
||||
GenericName[tr]=Web Tarayıcı
|
||||
GenericName[uk]=Навігатор Тенет
|
||||
GenericName[uz]=Веб-браузер
|
||||
GenericName[ven]=Buronza ya Webu
|
||||
GenericName[vi]=Trình duyệt Web
|
||||
GenericName[wa]=Betchteu waibe
|
||||
GenericName[xh]=Umkhangeli zincwadi we Web
|
||||
GenericName[zh_CN]=网页浏览器
|
||||
GenericName[zh_TW]=網頁瀏覽器
|
||||
GenericName[zu]=Umcingi we-Web
|
||||
Exec=firefox %u
|
||||
Icon=firefox.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
||||
StartupNotify=false
|
||||
Categories=Network;WebBrowser;
|
||||
Comment=Firefox web-browser bundle, including all language packs and flash plugin
|
||||
|
12
firefox-kde/firefox.install
Normal file
12
firefox-kde/firefox.install
Normal file
@ -0,0 +1,12 @@
|
||||
post_install() {
|
||||
update-desktop-database -q
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
update-desktop-database -q
|
||||
}
|
||||
|
BIN
firefox-kde/firefox.png
Normal file
BIN
firefox-kde/firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
8
firefox-kde/firefox_launcher.sh
Executable file
8
firefox-kde/firefox_launcher.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
export GTK_PATH=${PWD}/usr/lib/gtk-2.0/
|
||||
|
||||
${PWD}/usr/bin/gtk-query-immodules-2.0 > /tmp/firefox.gtk.immodules
|
||||
export GTK_IM_MODULE_FILE=/tmp/firefox.gtk.immodules
|
||||
|
||||
exec ${PWD}/opt/firefox/firefox "$@"
|
1
firefox-kde/kde.js
Normal file
1
firefox-kde/kde.js
Normal file
@ -0,0 +1 @@
|
||||
pref("browser.preferences.instantApply", false);
|
42
firefox-kde/mozconfig
Normal file
42
firefox-kde/mozconfig
Normal file
@ -0,0 +1,42 @@
|
||||
. $topsrcdir/browser/config/mozconfig
|
||||
|
||||
# System libraries
|
||||
ac_add_options --without-system-nspr
|
||||
ac_add_options --without-system-nss
|
||||
ac_add_options --without-system-jpeg
|
||||
ac_add_options --without-system-zlib
|
||||
ac_add_options --without-system-bz2
|
||||
ac_add_options --without-system-png
|
||||
ac_add_options --without-system-libevent
|
||||
ac_add_options --without-system-libvpx
|
||||
#ac_add_options --enable-system-hunspell
|
||||
#ac_add_options --enable-system-sqlite
|
||||
#ac_add_options --enable-system-ffi
|
||||
#ac_add_options --enable-system-pixman
|
||||
ac_add_options --enable-gstreamer
|
||||
ac_add_options --disable-libproxy
|
||||
ac_add_options --with-pthreads
|
||||
|
||||
# Features
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-safe-browsing
|
||||
ac_add_options --enable-startup-notification
|
||||
|
||||
ac_add_options --disable-gio
|
||||
ac_add_options --disable-gconf
|
||||
ac_add_options --disable-gnomevfs
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-mochitest
|
||||
ac_add_options --disable-installer
|
||||
|
||||
# Optimization
|
||||
ac_add_options --enable-optimize
|
||||
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff
|
||||
|
||||
export BUILD_OFFICIAL=1
|
||||
export MOZILLA_OFFICIAL=1
|
||||
mk_add_options BUILD_OFFICIAL=1
|
||||
mk_add_options MOZILLA_OFFICIAL=1
|
542
firefox-kde/mozilla-gstreamer-760140.patch
Normal file
542
firefox-kde/mozilla-gstreamer-760140.patch
Normal file
@ -0,0 +1,542 @@
|
||||
# HG changeset patch
|
||||
# Parent 9fe99f8a584f2369a88bfb5281fd6bc95eb2593c
|
||||
Bug 760140 - Query the GstRegistry for the required demuxers/decoders from canPlayType
|
||||
|
||||
|
||||
diff --git a/content/media/DecoderTraits.cpp b/content/media/DecoderTraits.cpp
|
||||
--- a/content/media/DecoderTraits.cpp
|
||||
+++ b/content/media/DecoderTraits.cpp
|
||||
@@ -7,16 +7,18 @@
|
||||
#include "DecoderTraits.h"
|
||||
#include "MediaDecoder.h"
|
||||
#include "nsCharSeparatedTokenizer.h"
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
#include "MediaPluginHost.h"
|
||||
#endif
|
||||
#ifdef MOZ_GSTREAMER
|
||||
#include "mozilla/Preferences.h"
|
||||
+#include "GStreamerDecoder.h"
|
||||
+#include "nsXPCOMStrings.h"
|
||||
#endif
|
||||
#ifdef MOZ_WMF
|
||||
#include "WMFDecoder.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla
|
||||
{
|
||||
|
||||
@@ -137,48 +139,35 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
return CodecListContains(gWebMTypes, aType);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
-static const char* const gH264Types[4] = {
|
||||
- "video/mp4",
|
||||
- "video/3gpp",
|
||||
- "video/quicktime",
|
||||
- nullptr
|
||||
-};
|
||||
-
|
||||
bool
|
||||
DecoderTraits::IsGStreamerSupportedType(const nsACString& aMimeType)
|
||||
{
|
||||
if (!MediaDecoder::IsGStreamerEnabled())
|
||||
return false;
|
||||
- if (IsH264Type(aMimeType))
|
||||
+ if (GStreamerDecoder::CanHandleMediaType(aMimeType, nullptr))
|
||||
return true;
|
||||
if (!Preferences::GetBool("media.prefer-gstreamer", false))
|
||||
return false;
|
||||
#ifdef MOZ_WEBM
|
||||
if (IsWebMType(aMimeType))
|
||||
return true;
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(aMimeType))
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
-
|
||||
-bool
|
||||
-DecoderTraits::IsH264Type(const nsACString& aType)
|
||||
-{
|
||||
- return CodecListContains(gH264Types, aType);
|
||||
-}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
static const char* const gOmxTypes[6] = {
|
||||
"audio/mpeg",
|
||||
"audio/mp4",
|
||||
"video/mp4",
|
||||
"video/3gpp",
|
||||
@@ -190,19 +179,17 @@
|
||||
DecoderTraits::IsOmxSupportedType(const nsACString& aType)
|
||||
{
|
||||
if (!MediaDecoder::IsOmxEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return CodecListContains(gOmxTypes, aType);
|
||||
}
|
||||
-#endif
|
||||
|
||||
-#if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK)
|
||||
static char const *const gH264Codecs[9] = {
|
||||
"avc1.42E01E", // H.264 Constrained Baseline Profile Level 3.0
|
||||
"avc1.42001E", // H.264 Baseline Profile Level 3.0
|
||||
"avc1.58A01E", // H.264 Extended Profile Level 3.0
|
||||
"avc1.4D401E", // H.264 Main Profile Level 3.0
|
||||
"avc1.64001E", // H.264 High Profile Level 3.0
|
||||
"avc1.64001F", // H.264 High Profile Level 3.1
|
||||
"mp4v.20.3", // 3GPP
|
||||
@@ -303,19 +290,19 @@
|
||||
#ifdef MOZ_DASH
|
||||
if (IsDASHMPDType(nsDependentCString(aMIMEType))) {
|
||||
// DASH manifest uses WebM codecs only.
|
||||
codecList = gWebMCodecs;
|
||||
result = CANPLAY_YES;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_GSTREAMER
|
||||
- if (IsH264Type(nsDependentCString(aMIMEType))) {
|
||||
- codecList = gH264Codecs;
|
||||
- result = CANPLAY_MAYBE;
|
||||
+ if (GStreamerDecoder::CanHandleMediaType(nsDependentCString(aMIMEType),
|
||||
+ aHaveRequestedCodecs ? &aRequestedCodecs : nullptr)) {
|
||||
+ return CANPLAY_YES;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (IsOmxSupportedType(nsDependentCString(aMIMEType))) {
|
||||
codecList = gH264Codecs;
|
||||
result = CANPLAY_MAYBE;
|
||||
}
|
||||
#endif
|
||||
@@ -324,17 +311,17 @@
|
||||
result = CANPLAY_MAYBE;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
if (MediaDecoder::IsMediaPluginsEnabled() &&
|
||||
GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), &codecList))
|
||||
result = CANPLAY_MAYBE;
|
||||
#endif
|
||||
- if (result == CANPLAY_NO || !aHaveRequestedCodecs) {
|
||||
+ if (result == CANPLAY_NO || !aHaveRequestedCodecs || !codecList) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// See http://www.rfc-editor.org/rfc/rfc4281.txt for the description
|
||||
// of the 'codecs' parameter
|
||||
nsCharSeparatedTokenizer tokenizer(aRequestedCodecs, ',');
|
||||
bool expectMoreTokens = false;
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
diff --git a/content/media/DecoderTraits.h b/content/media/DecoderTraits.h
|
||||
--- a/content/media/DecoderTraits.h
|
||||
+++ b/content/media/DecoderTraits.h
|
||||
@@ -49,17 +49,16 @@
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WEBM
|
||||
static bool IsWebMType(const nsACString& aType);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
static bool IsGStreamerSupportedType(const nsACString& aType);
|
||||
- static bool IsH264Type(const nsACString& aType);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
static bool IsOmxSupportedType(const nsACString& aType);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
static bool IsMediaPluginsType(const nsACString& aType);
|
||||
diff --git a/content/media/gstreamer/GStreamerDecoder.cpp b/content/media/gstreamer/GStreamerDecoder.cpp
|
||||
--- a/content/media/gstreamer/GStreamerDecoder.cpp
|
||||
+++ b/content/media/gstreamer/GStreamerDecoder.cpp
|
||||
@@ -2,18 +2,26 @@
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
#include "GStreamerReader.h"
|
||||
#include "GStreamerDecoder.h"
|
||||
+#include "GStreamerFormatHelper.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
MediaDecoderStateMachine* GStreamerDecoder::CreateStateMachine()
|
||||
{
|
||||
return new MediaDecoderStateMachine(this, new GStreamerReader(this));
|
||||
}
|
||||
|
||||
+bool
|
||||
+GStreamerDecoder::CanHandleMediaType(const nsACString& aMIMEType,
|
||||
+ const nsAString* aCodecs)
|
||||
+{
|
||||
+ return GStreamerFormatHelper::Instance()->CanHandleMediaType(aMIMEType, aCodecs);
|
||||
+}
|
||||
+
|
||||
} // namespace mozilla
|
||||
|
||||
diff --git a/content/media/gstreamer/GStreamerDecoder.h b/content/media/gstreamer/GStreamerDecoder.h
|
||||
--- a/content/media/gstreamer/GStreamerDecoder.h
|
||||
+++ b/content/media/gstreamer/GStreamerDecoder.h
|
||||
@@ -3,21 +3,23 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#if !defined(GStreamerDecoder_h_)
|
||||
#define GStreamerDecoder_h_
|
||||
|
||||
#include "MediaDecoder.h"
|
||||
+#include "nsXPCOMStrings.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class GStreamerDecoder : public MediaDecoder
|
||||
{
|
||||
public:
|
||||
virtual MediaDecoder* Clone() { return new GStreamerDecoder(); }
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine();
|
||||
+ static bool CanHandleMediaType(const nsACString& aMIMEType, const nsAString* aCodecs);
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/content/media/gstreamer/GStreamerFormatHelper.cpp
|
||||
@@ -0,0 +1,159 @@
|
||||
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
+
|
||||
+#include "GStreamerFormatHelper.h"
|
||||
+#include "nsCharSeparatedTokenizer.h"
|
||||
+#include "nsXPCOMStrings.h"
|
||||
+
|
||||
+#define ENTRY_FORMAT(entry) entry[0]
|
||||
+#define ENTRY_CAPS(entry) entry[1]
|
||||
+
|
||||
+GStreamerFormatHelper* GStreamerFormatHelper::gInstance = nullptr;
|
||||
+
|
||||
+GStreamerFormatHelper* GStreamerFormatHelper::Instance() {
|
||||
+ if (!gInstance) {
|
||||
+ gst_init(nullptr, nullptr);
|
||||
+ gInstance = new GStreamerFormatHelper();
|
||||
+ }
|
||||
+
|
||||
+ return gInstance;
|
||||
+}
|
||||
+
|
||||
+void GStreamerFormatHelper::Shutdown() {
|
||||
+ if (gInstance) {
|
||||
+ delete gInstance;
|
||||
+ gInstance = nullptr;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+char const *const GStreamerFormatHelper::mContainers[4][2] = {
|
||||
+ {"video/mp4", "video/quicktime"},
|
||||
+ {"video/quicktime", "video/quicktime"},
|
||||
+ {"audio/mp4", "audio/mpeg, mpegversion=(int)4"},
|
||||
+ {"audio/mpeg", "audio/mpeg, mpegversion=(int)1"},
|
||||
+};
|
||||
+
|
||||
+char const *const GStreamerFormatHelper::mCodecs[8][2] = {
|
||||
+ {"avc1.42E01E", "video/x-h264"},
|
||||
+ {"avc1.42001E", "video/x-h264"},
|
||||
+ {"avc1.58A01E", "video/x-h264"},
|
||||
+ {"avc1.4D401E", "video/x-h264"},
|
||||
+ {"avc1.64001E", "video/x-h264"},
|
||||
+ {"avc1.64001F", "video/x-h264"},
|
||||
+ {"mp4v.20.3", "video/3gpp"},
|
||||
+ {"mp4a.40.2", "audio/mpeg, mpegversion=(int)4"},
|
||||
+};
|
||||
+
|
||||
+GStreamerFormatHelper::GStreamerFormatHelper()
|
||||
+ : mFactories(nullptr),
|
||||
+ mCookie(static_cast<uint32_t>(-1))
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+GStreamerFormatHelper::~GStreamerFormatHelper() {
|
||||
+ if (mFactories)
|
||||
+ g_list_free(mFactories);
|
||||
+}
|
||||
+
|
||||
+bool GStreamerFormatHelper::CanHandleMediaType(const nsACString& aMIMEType,
|
||||
+ const nsAString* aCodecs) {
|
||||
+ const char *type;
|
||||
+ NS_CStringGetData(aMIMEType, &type, NULL);
|
||||
+
|
||||
+ GstCaps* caps = ConvertFormatsToCaps(type, aCodecs);
|
||||
+ if (!caps) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ bool ret = HaveElementsToProcessCaps(caps);
|
||||
+ gst_caps_unref(caps);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+GstCaps* GStreamerFormatHelper::ConvertFormatsToCaps(const char* aMIMEType,
|
||||
+ const nsAString* aCodecs) {
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ /* convert aMIMEType to gst container caps */
|
||||
+ const char* capsString = nullptr;
|
||||
+ for (i = 0; i < G_N_ELEMENTS(mContainers); i++) {
|
||||
+ if (!strcmp(ENTRY_FORMAT(mContainers[i]), aMIMEType)) {
|
||||
+ capsString = ENTRY_CAPS(mContainers[i]);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!capsString) {
|
||||
+ /* we couldn't find any matching caps */
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ GstCaps* caps = gst_caps_from_string(capsString);
|
||||
+ /* container only */
|
||||
+ if (!aCodecs) {
|
||||
+ return caps;
|
||||
+ }
|
||||
+
|
||||
+ nsCharSeparatedTokenizer tokenizer(*aCodecs, ',');
|
||||
+ while (tokenizer.hasMoreTokens()) {
|
||||
+ const nsSubstring& codec = tokenizer.nextToken();
|
||||
+ capsString = nullptr;
|
||||
+
|
||||
+ for (i = 0; i < G_N_ELEMENTS(mCodecs); i++) {
|
||||
+ if (codec.EqualsASCII(ENTRY_FORMAT(mCodecs[i]))) {
|
||||
+ capsString = ENTRY_CAPS(mCodecs[i]);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!capsString) {
|
||||
+ gst_caps_unref(caps);
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ GstCaps* tmp = gst_caps_from_string(capsString);
|
||||
+ /* appends and frees tmp */
|
||||
+ gst_caps_append(caps, tmp);
|
||||
+ }
|
||||
+
|
||||
+ return caps;
|
||||
+}
|
||||
+
|
||||
+bool GStreamerFormatHelper::HaveElementsToProcessCaps(GstCaps* aCaps) {
|
||||
+
|
||||
+ GList* factories = GetFactories();
|
||||
+
|
||||
+ GList* list;
|
||||
+ /* here aCaps contains [containerCaps, [codecCaps1, [codecCaps2, ...]]] so process
|
||||
+ * caps structures individually as we want one element for _each_
|
||||
+ * structure */
|
||||
+ for (unsigned int i = 0; i < gst_caps_get_size(aCaps); i++) {
|
||||
+ GstStructure* s = gst_caps_get_structure(aCaps, i);
|
||||
+ GstCaps* caps = gst_caps_new_full(gst_structure_copy(s), nullptr);
|
||||
+ list = gst_element_factory_list_filter (factories, caps, GST_PAD_SINK, FALSE);
|
||||
+ gst_caps_unref(caps);
|
||||
+ if (!list) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ g_list_free(list);
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+GList* GStreamerFormatHelper::GetFactories() {
|
||||
+ uint32_t cookie = gst_default_registry_get_feature_list_cookie ();
|
||||
+ if (cookie != mCookie) {
|
||||
+ g_list_free(mFactories);
|
||||
+ mFactories = gst_element_factory_list_get_elements
|
||||
+ (GST_ELEMENT_FACTORY_TYPE_DEMUXER | GST_ELEMENT_FACTORY_TYPE_DECODER,
|
||||
+ GST_RANK_MARGINAL);
|
||||
+ mCookie = cookie;
|
||||
+ }
|
||||
+
|
||||
+ return mFactories;
|
||||
+}
|
||||
diff --git a/content/media/gstreamer/GStreamerFormatHelper.h b/content/media/gstreamer/GStreamerFormatHelper.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/content/media/gstreamer/GStreamerFormatHelper.h
|
||||
@@ -0,0 +1,60 @@
|
||||
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
+
|
||||
+#if !defined(GStreamerFormatHelper_h_)
|
||||
+#define GStreamerFormatHelper_h_
|
||||
+
|
||||
+#include <gst/gst.h>
|
||||
+#include <mozilla/Types.h>
|
||||
+#include "nsXPCOMStrings.h"
|
||||
+
|
||||
+class GStreamerFormatHelper {
|
||||
+ /* This class can be used to query the GStreamer registry for the required
|
||||
+ * demuxers/decoders from nsHTMLMediaElement::CanPlayType.
|
||||
+ * It implements looking at the GstRegistry to check if elements to
|
||||
+ * demux/decode the formats passed to CanPlayType() are actually installed.
|
||||
+ */
|
||||
+ public:
|
||||
+ static GStreamerFormatHelper* Instance();
|
||||
+ ~GStreamerFormatHelper();
|
||||
+
|
||||
+ bool CanHandleMediaType(const nsACString& aMIMEType,
|
||||
+ const nsAString* aCodecs);
|
||||
+
|
||||
+ static void Shutdown();
|
||||
+
|
||||
+ private:
|
||||
+ GStreamerFormatHelper();
|
||||
+ GstCaps* ConvertFormatsToCaps(const char* aMIMEType,
|
||||
+ const nsAString* aCodecs);
|
||||
+ char* const *CodecListFromCaps(GstCaps* aCaps);
|
||||
+ bool HaveElementsToProcessCaps(GstCaps* aCaps);
|
||||
+ GList* GetFactories();
|
||||
+
|
||||
+ static GStreamerFormatHelper* gInstance;
|
||||
+
|
||||
+ /* table to convert from container MIME types to GStreamer elements */
|
||||
+ static char const *const mContainers[4][2];
|
||||
+
|
||||
+ /* table to convert from codec MIME types to GStreamer elements */
|
||||
+ static char const *const mCodecs[8][2];
|
||||
+
|
||||
+ /* list of GStreamer element factories
|
||||
+ * Element factories are the basic types retrieved from the GStreamer
|
||||
+ * registry, they describe all plugins and elements that GStreamer can
|
||||
+ * create.
|
||||
+ * This means that element factories are useful for automated element
|
||||
+ * instancing, such as what autopluggers do,
|
||||
+ * and for creating lists of available elements. */
|
||||
+ GList* mFactories;
|
||||
+
|
||||
+ /* Storage for the default registrys feature list cookie.
|
||||
+ * It changes every time a feature is added to or removed from the
|
||||
+ * GStreamer registry. */
|
||||
+ uint32_t mCookie;
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
diff --git a/content/media/gstreamer/Makefile.in b/content/media/gstreamer/Makefile.in
|
||||
--- a/content/media/gstreamer/Makefile.in
|
||||
+++ b/content/media/gstreamer/Makefile.in
|
||||
@@ -13,21 +13,23 @@
|
||||
MODULE = content
|
||||
LIBRARY_NAME = gkcongstreamer_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
|
||||
|
||||
EXPORTS += \
|
||||
GStreamerDecoder.h \
|
||||
GStreamerReader.h \
|
||||
+ GStreamerFormatHelper.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
GStreamerReader.cpp \
|
||||
GStreamerDecoder.cpp \
|
||||
+ GStreamerFormatHelper.cpp \
|
||||
$(NULL)
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CFLAGS += $(GSTREAMER_CFLAGS)
|
||||
CXXFLAGS += $(GSTREAMER_CFLAGS)
|
||||
diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in
|
||||
--- a/layout/build/Makefile.in
|
||||
+++ b/layout/build/Makefile.in
|
||||
@@ -316,16 +316,20 @@
|
||||
-I$(topsrcdir)/js/xpconnect/loader \
|
||||
-I$(topsrcdir)/caps/include \
|
||||
-I$(topsrcdir)/netwerk/base/src \
|
||||
-I$(topsrcdir)/content/svg/content/src \
|
||||
-I$(topsrcdir)/extensions/cookie \
|
||||
-I$(topsrcdir)/netwerk/cookie \
|
||||
$(NULL)
|
||||
|
||||
+ifdef MOZ_GSTREAMER
|
||||
+LOCAL_INCLUDES += $(GSTREAMER_CFLAGS)
|
||||
+endif
|
||||
+
|
||||
ifdef MOZ_B2G_RIL #{
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/dom/system/gonk
|
||||
endif #}
|
||||
|
||||
ifdef MOZ_B2G_FM #{
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/dom/fm
|
||||
endif #}
|
||||
|
||||
diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
|
||||
--- a/layout/build/nsLayoutStatics.cpp
|
||||
+++ b/layout/build/nsLayoutStatics.cpp
|
||||
@@ -78,16 +78,20 @@
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
#include "MediaPluginHost.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WMF
|
||||
#include "WMFDecoder.h"
|
||||
#endif
|
||||
|
||||
+#ifdef MOZ_GSTREAMER
|
||||
+#include "GStreamerFormatHelper.h"
|
||||
+#endif
|
||||
+
|
||||
#ifdef MOZ_SYDNEYAUDIO
|
||||
#include "AudioStream.h"
|
||||
#endif
|
||||
|
||||
#include "nsError.h"
|
||||
|
||||
#include "nsCycleCollector.h"
|
||||
#include "nsJSEnvironment.h"
|
||||
@@ -336,16 +340,20 @@
|
||||
nsXBLService::Shutdown();
|
||||
nsAutoCopyListener::Shutdown();
|
||||
FrameLayerBuilder::Shutdown();
|
||||
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
MediaPluginHost::Shutdown();
|
||||
#endif
|
||||
|
||||
+#ifdef MOZ_GSTREAMER
|
||||
+ GStreamerFormatHelper::Shutdown();
|
||||
+#endif
|
||||
+
|
||||
#ifdef MOZ_SYDNEYAUDIO
|
||||
AudioStream::ShutdownLibrary();
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WMF
|
||||
WMFDecoder::UnloadDLLs();
|
||||
#endif
|
||||
|
293
firefox-kde/mozilla-gstreamer-803287.patch
Normal file
293
firefox-kde/mozilla-gstreamer-803287.patch
Normal file
@ -0,0 +1,293 @@
|
||||
# HG changeset patch
|
||||
# Parent 09328afa274e7cf6354f446ae37735218b796e7f
|
||||
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
||||
Bug 803287 - Don't use GStreamer (when enabled) for Ogg/WebM if builtin backends present. (TM: 19)
|
||||
|
||||
diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp
|
||||
--- a/content/base/src/nsContentUtils.cpp
|
||||
+++ b/content/base/src/nsContentUtils.cpp
|
||||
@@ -6676,71 +6676,55 @@ nsContentUtils::FindInternalContentViewe
|
||||
else
|
||||
*aLoaderType = TYPE_UNKNOWN;
|
||||
}
|
||||
return docFactory.forget();
|
||||
}
|
||||
|
||||
#ifdef MOZ_MEDIA
|
||||
#ifdef MOZ_OGG
|
||||
- if (nsHTMLMediaElement::IsOggEnabled()) {
|
||||
- for (unsigned int i = 0; i < ArrayLength(nsHTMLMediaElement::gOggTypes); ++i) {
|
||||
- const char* type = nsHTMLMediaElement::gOggTypes[i];
|
||||
- if (!strcmp(aType, type)) {
|
||||
- docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
- if (docFactory && aLoaderType) {
|
||||
- *aLoaderType = TYPE_CONTENT;
|
||||
- }
|
||||
- return docFactory.forget();
|
||||
- }
|
||||
+ if (nsHTMLMediaElement::IsOggType(nsDependentCString(aType))) {
|
||||
+ docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
+ if (docFactory && aLoaderType) {
|
||||
+ *aLoaderType = TYPE_CONTENT;
|
||||
}
|
||||
+ return docFactory.forget();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WEBM
|
||||
- if (nsHTMLMediaElement::IsWebMEnabled()) {
|
||||
- for (unsigned int i = 0; i < ArrayLength(nsHTMLMediaElement::gWebMTypes); ++i) {
|
||||
- const char* type = nsHTMLMediaElement::gWebMTypes[i];
|
||||
- if (!strcmp(aType, type)) {
|
||||
- docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
- if (docFactory && aLoaderType) {
|
||||
- *aLoaderType = TYPE_CONTENT;
|
||||
- }
|
||||
- return docFactory.forget();
|
||||
- }
|
||||
+ if (nsHTMLMediaElement::IsWebMType(nsDependentCString(aType))) {
|
||||
+ docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
+ if (docFactory && aLoaderType) {
|
||||
+ *aLoaderType = TYPE_CONTENT;
|
||||
}
|
||||
+ return docFactory.forget();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
- if (nsHTMLMediaElement::IsH264Enabled()) {
|
||||
- for (unsigned int i = 0; i < ArrayLength(nsHTMLMediaElement::gH264Types); ++i) {
|
||||
- const char* type = nsHTMLMediaElement::gH264Types[i];
|
||||
- if (!strcmp(aType, type)) {
|
||||
- docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
- if (docFactory && aLoaderType) {
|
||||
- *aLoaderType = TYPE_CONTENT;
|
||||
- }
|
||||
- return docFactory.forget();
|
||||
- }
|
||||
+ if (nsHTMLMediaElement::IsGStreamerSupportedType(nsDependentCString(aType))) {
|
||||
+ docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
+ if (docFactory && aLoaderType) {
|
||||
+ *aLoaderType = TYPE_CONTENT;
|
||||
}
|
||||
+ return docFactory.forget();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
if (nsHTMLMediaElement::IsMediaPluginsEnabled() &&
|
||||
nsHTMLMediaElement::IsMediaPluginsType(nsDependentCString(aType))) {
|
||||
docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
if (docFactory && aLoaderType) {
|
||||
*aLoaderType = TYPE_CONTENT;
|
||||
}
|
||||
return docFactory.forget();
|
||||
}
|
||||
#endif // MOZ_MEDIA_PLUGINS
|
||||
-
|
||||
#endif // MOZ_MEDIA
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::IsPatternMatching(nsAString& aValue, nsAString& aPattern,
|
||||
diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/content/public/nsHTMLMediaElement.h
|
||||
--- a/content/html/content/public/nsHTMLMediaElement.h
|
||||
+++ b/content/html/content/public/nsHTMLMediaElement.h
|
||||
@@ -303,17 +303,18 @@ public:
|
||||
#ifdef MOZ_WEBM
|
||||
static bool IsWebMEnabled();
|
||||
static bool IsWebMType(const nsACString& aType);
|
||||
static const char gWebMTypes[2][11];
|
||||
static char const *const gWebMCodecs[4];
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
- static bool IsH264Enabled();
|
||||
+ static bool IsGStreamerEnabled();
|
||||
+ static bool IsGStreamerSupportedType(const nsACString& aType);
|
||||
static bool IsH264Type(const nsACString& aType);
|
||||
static const char gH264Types[3][16];
|
||||
static char const *const gH264Codecs[7];
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
static bool IsOmxEnabled();
|
||||
static bool IsOmxSupportedType(const nsACString& aType);
|
||||
diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp
|
||||
--- a/content/html/content/src/nsHTMLMediaElement.cpp
|
||||
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
|
||||
@@ -2148,34 +2148,29 @@ char const *const nsHTMLMediaElement::gH
|
||||
#ifdef MOZ_GSTREAMER
|
||||
const char nsHTMLMediaElement::gH264Types[3][16] = {
|
||||
"video/mp4",
|
||||
"video/3gpp",
|
||||
"video/quicktime",
|
||||
};
|
||||
|
||||
bool
|
||||
-nsHTMLMediaElement::IsH264Enabled()
|
||||
+nsHTMLMediaElement::IsGStreamerEnabled()
|
||||
{
|
||||
- return Preferences::GetBool("media.h264.enabled");
|
||||
+ return Preferences::GetBool("media.gstreamer.enabled");
|
||||
}
|
||||
|
||||
bool
|
||||
nsHTMLMediaElement::IsH264Type(const nsACString& aType)
|
||||
{
|
||||
- if (!IsH264Enabled()) {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
for (uint32_t i = 0; i < ArrayLength(gH264Types); ++i) {
|
||||
if (aType.EqualsASCII(gH264Types[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
-
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
const char nsHTMLMediaElement::gOmxTypes[5][16] = {
|
||||
"audio/mpeg",
|
||||
"audio/mp4",
|
||||
@@ -2424,34 +2419,63 @@ nsHTMLMediaElement::CanPlayType(const ns
|
||||
default:
|
||||
case CANPLAY_MAYBE:
|
||||
aResult.AssignLiteral("maybe");
|
||||
break;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
+#ifdef MOZ_GSTREAMER
|
||||
+bool
|
||||
+nsHTMLMediaElement::IsGStreamerSupportedType(const nsACString& aMimeType)
|
||||
+{
|
||||
+ if (!IsGStreamerEnabled())
|
||||
+ return false;
|
||||
+ if (IsH264Type(aMimeType))
|
||||
+ return true;
|
||||
+ if (!Preferences::GetBool("media.prefer-gstreamer", false))
|
||||
+ return false;
|
||||
+#ifdef MOZ_WEBM
|
||||
+ if (IsWebMType(aMimeType))
|
||||
+ return true;
|
||||
+#endif
|
||||
+#ifdef MOZ_OGG
|
||||
+ if (IsOggType(aMimeType))
|
||||
+ return true;
|
||||
+#endif
|
||||
+ return false;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
already_AddRefed<nsMediaDecoder>
|
||||
nsHTMLMediaElement::CreateDecoder(const nsACString& aType)
|
||||
{
|
||||
+#ifdef MOZ_GSTREAMER
|
||||
+ // When enabled, use GStreamer for H.264, but not for codecs handled by our
|
||||
+ // bundled decoders, unless the "media.prefer-gstreamer" pref is set.
|
||||
+ if (IsGStreamerSupportedType(aType)) {
|
||||
+ nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
|
||||
+ if (decoder->Init(this)) {
|
||||
+ return decoder.forget();
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#ifdef MOZ_RAW
|
||||
if (IsRawType(aType)) {
|
||||
nsRefPtr<nsRawDecoder> decoder = new nsRawDecoder();
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(aType)) {
|
||||
-#ifdef MOZ_GSTREAMER
|
||||
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
|
||||
-#else
|
||||
nsRefPtr<nsOggDecoder> decoder = new nsOggDecoder();
|
||||
-#endif
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WAVE
|
||||
if (IsWaveType(aType)) {
|
||||
nsRefPtr<nsWaveDecoder> decoder = new nsWaveDecoder();
|
||||
@@ -2473,44 +2497,32 @@ nsHTMLMediaElement::CreateDecoder(const
|
||||
nsRefPtr<nsMediaPluginDecoder> decoder = new nsMediaPluginDecoder(aType);
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WEBM
|
||||
if (IsWebMType(aType)) {
|
||||
-#ifdef MOZ_GSTREAMER
|
||||
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
|
||||
-#else
|
||||
nsRefPtr<nsWebMDecoder> decoder = new nsWebMDecoder();
|
||||
-#endif
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_DASH
|
||||
if (IsDASHMPDType(aType)) {
|
||||
nsRefPtr<nsDASHDecoder> decoder = new nsDASHDecoder();
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef MOZ_GSTREAMER
|
||||
- if (IsH264Type(aType)) {
|
||||
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
|
||||
- if (decoder->Init(this)) {
|
||||
- return decoder.forget();
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsresult nsHTMLMediaElement::InitializeDecoderAsClone(nsMediaDecoder* aOriginal)
|
||||
{
|
||||
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
|
||||
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
|
||||
|
||||
diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js
|
||||
--- a/modules/libpref/src/init/all.js
|
||||
+++ b/modules/libpref/src/init/all.js
|
||||
@@ -164,17 +164,17 @@ pref("media.wave.enabled", true);
|
||||
#endif
|
||||
#ifdef MOZ_WEBM
|
||||
pref("media.webm.enabled", true);
|
||||
#endif
|
||||
#ifdef MOZ_DASH
|
||||
pref("media.dash.enabled", true);
|
||||
#endif
|
||||
#ifdef MOZ_GSTREAMER
|
||||
-pref("media.h264.enabled", true);
|
||||
+pref("media.gstreamer.enabled", true);
|
||||
#endif
|
||||
#ifdef MOZ_WEBRTC
|
||||
pref("media.navigator.enabled", false);
|
||||
pref("media.peerconnection.enabled", false);
|
||||
pref("media.navigator.permission.disabled", false);
|
||||
#else
|
||||
#ifdef ANDROID
|
||||
pref("media.navigator.enabled", true);
|
52
firefox-kde/mozilla-gstreamer.patch
Normal file
52
firefox-kde/mozilla-gstreamer.patch
Normal file
@ -0,0 +1,52 @@
|
||||
# HG changeset patch
|
||||
# Parent e4b87e710b1a5f0bb7db058911bc163b4bf30227
|
||||
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
||||
No Bug - use GStreamer _only_ for MP4 (not WebM/OGG)
|
||||
|
||||
diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp
|
||||
--- a/content/html/content/src/nsHTMLMediaElement.cpp
|
||||
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
|
||||
@@ -2277,21 +2277,17 @@ nsHTMLMediaElement::CreateDecoder(const
|
||||
nsRefPtr<nsRawDecoder> decoder = new nsRawDecoder();
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(aType)) {
|
||||
-#ifdef MOZ_GSTREAMER
|
||||
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
|
||||
-#else
|
||||
nsRefPtr<nsOggDecoder> decoder = new nsOggDecoder();
|
||||
-#endif
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WAVE
|
||||
if (IsWaveType(aType)) {
|
||||
nsRefPtr<nsWaveDecoder> decoder = new nsWaveDecoder();
|
||||
@@ -2305,21 +2301,17 @@ nsHTMLMediaElement::CreateDecoder(const
|
||||
nsRefPtr<nsMediaPluginDecoder> decoder = new nsMediaPluginDecoder(aType);
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_WEBM
|
||||
if (IsWebMType(aType)) {
|
||||
-#ifdef MOZ_GSTREAMER
|
||||
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
|
||||
-#else
|
||||
nsRefPtr<nsWebMDecoder> decoder = new nsWebMDecoder();
|
||||
-#endif
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
if (IsH264Type(aType)) {
|
3675
firefox-kde/mozilla-kde.patch
Normal file
3675
firefox-kde/mozilla-kde.patch
Normal file
File diff suppressed because it is too large
Load Diff
46
firefox-kde/mozilla-nongnome-proxies.patch
Normal file
46
firefox-kde/mozilla-nongnome-proxies.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From: Wolfgang Rosenauer
|
||||
Subject: Do not use gconf for proxy settings if not running within Gnome
|
||||
|
||||
Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v
|
||||
retrieving revision 1.1
|
||||
|
||||
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
@@ -50,22 +50,28 @@ nsUnixSystemProxySettings::GetMainThread
|
||||
// dbus prevents us from being threadsafe, but this routine should not block anyhow
|
||||
*aMainThreadOnly = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsUnixSystemProxySettings::Init()
|
||||
{
|
||||
- mSchemeProxySettings.Init(5);
|
||||
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
|
||||
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
|
||||
- if (mGSettings) {
|
||||
- mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
|
||||
- getter_AddRefs(mProxySettings));
|
||||
+ // If this is a GNOME session, load gconf and try to use its preferences.
|
||||
+ // If gconf is not available (which would be stupid) we'll proceed as if
|
||||
+ // this was not a GNOME session, using *_PROXY environment variables.
|
||||
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
|
||||
+ if (sessionType && !strcmp(sessionType, "gnome")) {
|
||||
+ mSchemeProxySettings.Init(5);
|
||||
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
|
||||
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
|
||||
+ if (mGSettings) {
|
||||
+ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
|
||||
+ getter_AddRefs(mProxySettings));
|
||||
+ }
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
|
||||
{
|
40
firefox-kde/package
Normal file
40
firefox-kde/package
Normal file
@ -0,0 +1,40 @@
|
||||
alsa-lib
|
||||
atk
|
||||
cairo
|
||||
dbus-core
|
||||
dbus-glib
|
||||
expat
|
||||
fontconfig
|
||||
freetype2
|
||||
gcc-libs
|
||||
gdk-pixbuf2
|
||||
glib2
|
||||
gstreamer0.10
|
||||
gstreamer0.10-base
|
||||
gtk2
|
||||
libffi
|
||||
libice
|
||||
libpng
|
||||
libsm
|
||||
libx11
|
||||
libxau
|
||||
libxcb
|
||||
libxcomposite
|
||||
libxcursor
|
||||
libxdamage
|
||||
libxdmcp
|
||||
libxext
|
||||
libxfixes
|
||||
libxi
|
||||
libxinerama
|
||||
libxml2
|
||||
libxrandr
|
||||
libxrender
|
||||
libxt
|
||||
orc
|
||||
pango
|
||||
pixman
|
||||
startup-notification
|
||||
util-linux
|
||||
xcb-util
|
||||
zlib
|
10
firefox-kde/vendor.js
Normal file
10
firefox-kde/vendor.js
Normal file
@ -0,0 +1,10 @@
|
||||
// Use LANG environment variable to choose locale
|
||||
pref("intl.locale.matchOS", true);
|
||||
|
||||
// Disable default browser checking.
|
||||
pref("browser.shell.checkDefaultBrowser", true);
|
||||
pref("browser.search.defaultenginename", "DuckDuckGo");
|
||||
|
||||
// Don't disable our bundled extensions in the application directory
|
||||
pref("extensions.autoDisableScopes", 11);
|
||||
pref("extensions.shownSelectionUI", true);
|
Loading…
Reference in New Issue
Block a user