forked from pool/MozillaFirefox
- update to Firefox 20.0 (bnc#813026)
* requires NSPR 4.9.5 and NSS 3.14.3 * MFSA 2013-30/CVE-2013-0788/CVE-2013-0789 Miscellaneous memory safety hazards * MFSA 2013-31/CVE-2013-0800 (bmo#825721) Out-of-bounds write in Cairo library * MFSA 2013-35/CVE-2013-0796 (bmo#827106) WebGL crash with Mesa graphics driver on Linux * MFSA 2013-36/CVE-2013-0795 (bmo#825697) Bypass of SOW protections allows cloning of protected nodes * MFSA 2013-37/CVE-2013-0794 (bmo#626775) Bypass of tab-modal dialog origin disclosure * MFSA 2013-38/CVE-2013-0793 (bmo#803870) Cross-site scripting (XSS) using timed history navigations * MFSA 2013-39/CVE-2013-0792 (bmo#722831) Memory corruption while rendering grayscale PNG images - use GStreamer 1.0 starting with 12.3 (mozilla-gstreamer-1.patch) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=326
This commit is contained in:
parent
90bc4d30c6
commit
10b98266f1
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 29 22:15:21 UTC 2013 - wr@rosenauer.org
|
||||
|
||||
- update to Firefox 20.0 (bnc#813026)
|
||||
* requires NSPR 4.9.5 and NSS 3.14.3
|
||||
* MFSA 2013-30/CVE-2013-0788/CVE-2013-0789
|
||||
Miscellaneous memory safety hazards
|
||||
* MFSA 2013-31/CVE-2013-0800 (bmo#825721)
|
||||
Out-of-bounds write in Cairo library
|
||||
* MFSA 2013-35/CVE-2013-0796 (bmo#827106)
|
||||
WebGL crash with Mesa graphics driver on Linux
|
||||
* MFSA 2013-36/CVE-2013-0795 (bmo#825697)
|
||||
Bypass of SOW protections allows cloning of protected nodes
|
||||
* MFSA 2013-37/CVE-2013-0794 (bmo#626775)
|
||||
Bypass of tab-modal dialog origin disclosure
|
||||
* MFSA 2013-38/CVE-2013-0793 (bmo#803870)
|
||||
Cross-site scripting (XSS) using timed history navigations
|
||||
* MFSA 2013-39/CVE-2013-0792 (bmo#722831)
|
||||
Memory corruption while rendering grayscale PNG images
|
||||
- use GStreamer 1.0 starting with 12.3 (mozilla-gstreamer-1.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 12 23:08:15 UTC 2013 - dmueller@suse.com
|
||||
|
||||
|
@ -17,10 +17,16 @@
|
||||
#
|
||||
|
||||
|
||||
%define major 19
|
||||
%define mainver %major.0.2
|
||||
%define major 20
|
||||
%define mainver %major.0
|
||||
%define update_channel release
|
||||
|
||||
%if %suse_version > 1220
|
||||
%define gstreamer_ver 1.0
|
||||
%else
|
||||
%define gstreamer_ver 0.10
|
||||
%endif
|
||||
|
||||
Name: MozillaFirefox
|
||||
BuildRequires: Mesa-devel
|
||||
BuildRequires: autoconf213
|
||||
@ -44,17 +50,17 @@ BuildRequires: libproxy-devel
|
||||
%else
|
||||
BuildRequires: wireless-tools
|
||||
%endif
|
||||
BuildRequires: mozilla-nspr-devel >= 4.9.4
|
||||
BuildRequires: mozilla-nss-devel >= 3.14.1
|
||||
BuildRequires: mozilla-nspr-devel >= 4.9.5
|
||||
BuildRequires: mozilla-nss-devel >= 3.14.3
|
||||
BuildRequires: nss-shared-helper-devel
|
||||
%if %suse_version > 1140
|
||||
BuildRequires: pkgconfig(gstreamer-0.10)
|
||||
BuildRequires: pkgconfig(gstreamer-app-0.10)
|
||||
BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
|
||||
BuildRequires: pkgconfig(gstreamer-%gstreamer_ver)
|
||||
BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver)
|
||||
BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver)
|
||||
%endif
|
||||
Version: %{mainver}
|
||||
Release: 0
|
||||
%define releasedate 2013030600
|
||||
%define releasedate 2013032900
|
||||
Provides: firefox = %{mainver}
|
||||
Provides: firefox = %{version}-%{release}
|
||||
Provides: web_browser
|
||||
@ -95,10 +101,10 @@ Patch9: mozilla-repo.patch
|
||||
Patch10: mozilla-sle11.patch
|
||||
Patch11: mozilla-disable-neon-option.patch
|
||||
Patch12: mozilla-arm-disable-edsp.patch
|
||||
Patch14: mozilla-ppc.patch
|
||||
Patch15: mozilla-gstreamer-760140.patch
|
||||
Patch17: mozilla-libproxy-compat.patch
|
||||
Patch18: mozilla-webrtc-ppc.patch
|
||||
Patch13: mozilla-ppc.patch
|
||||
Patch14: mozilla-gstreamer-760140.patch
|
||||
Patch15: mozilla-libproxy-compat.patch
|
||||
Patch16: mozilla-gstreamer-1.patch
|
||||
# Firefox/browser
|
||||
Patch30: firefox-browser-css.patch
|
||||
Patch31: firefox-kde.patch
|
||||
@ -111,6 +117,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires(post): coreutils shared-mime-info desktop-file-utils
|
||||
Requires(postun): shared-mime-info desktop-file-utils
|
||||
Requires: %{name}-branding > 4.0
|
||||
Conflicts: %{name}-branding > %{version}
|
||||
Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
|
||||
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
|
||||
Recommends: libcanberra0
|
||||
@ -230,10 +237,10 @@ cd $RPM_BUILD_DIR/mozilla
|
||||
%endif
|
||||
#%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch16 -p1
|
||||
#
|
||||
%patch30 -p1
|
||||
%if %suse_version >= 1110
|
||||
@ -309,7 +316,7 @@ EOF
|
||||
%endif
|
||||
%if %suse_version > 1140
|
||||
cat << EOF >> $MOZCONFIG
|
||||
ac_add_options --enable-gstreamer
|
||||
ac_add_options --enable-gstreamer=%{gstreamer_ver}
|
||||
EOF
|
||||
%endif
|
||||
%if %branding
|
||||
|
@ -5,7 +5,7 @@
|
||||
<size unit="G">9</size>
|
||||
</disk>
|
||||
<memory>
|
||||
<size unit="M">2500</size>
|
||||
<size unit="M">2900</size>
|
||||
</memory>
|
||||
</hardware>
|
||||
</constraints>
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:61245389d00b57606457b130143a5510da07a3cf3f478fdb9e4117f302911551
|
||||
size 29921
|
||||
oid sha256:b0e042a5181e3c8f2b2be7ca1673dbe4365f2d82af05598be6ece0af018cc3c2
|
||||
size 29925
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
CHANNEL="release"
|
||||
BRANCH="releases/mozilla-$CHANNEL"
|
||||
RELEASE_TAG="FIREFOX_19_0_2_RELEASE"
|
||||
VERSION="19.0.2"
|
||||
RELEASE_TAG="FIREFOX_20_0_RELEASE"
|
||||
VERSION="20.0"
|
||||
|
||||
# mozilla
|
||||
echo "cloning $BRANCH..."
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:440bf1614da085112cf57349f1d81a52d3ec45697c637f875d60972d4df65da6
|
||||
size 99907055
|
3
firefox-20.0-source.tar.bz2
Normal file
3
firefox-20.0-source.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:26d3c849859242fda66e6946daca119e6942eb7b5ce0ef96e4bd878cb5057d47
|
||||
size 101075320
|
@ -1,11 +1,11 @@
|
||||
# HG changeset patch
|
||||
# Parent ab9210b3779914924d12de5a3952d4cc52cd9d78
|
||||
# Parent 716c063a34dc33046c36b49e3bd2b4ec867d2b5b
|
||||
|
||||
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
|
||||
--- a/browser/app/Makefile.in
|
||||
+++ b/browser/app/Makefile.in
|
||||
@@ -133,16 +133,21 @@ endif
|
||||
endif #} LIBXUL_SDK
|
||||
@@ -131,16 +131,21 @@ GARBAGE += $(addprefix $(FINAL_TARGET)/d
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
libs::
|
||||
@ -54,7 +54,7 @@ diff --git a/browser/branding/official/Makefile.in b/browser/branding/official/M
|
||||
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
||||
--- a/browser/installer/package-manifest.in
|
||||
+++ b/browser/installer/package-manifest.in
|
||||
@@ -541,18 +541,21 @@
|
||||
@@ -552,18 +552,21 @@
|
||||
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
|
||||
#ifdef SHIP_FEEDBACK
|
||||
@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi
|
||||
|
@ -2,7 +2,7 @@ diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/browser/base/content/browser-kde.xul
|
||||
@@ -0,0 +1,1276 @@
|
||||
@@ -0,0 +1,1221 @@
|
||||
+#filter substitution
|
||||
+<?xml version="1.0"?>
|
||||
+# -*- Mode: HTML -*-
|
||||
@ -49,7 +49,6 @@ new file mode 100644
|
||||
+ windowtype="navigator:browser"
|
||||
+ macanimationtype="document"
|
||||
+ screenX="4" screenY="4"
|
||||
+ browsingmode="normal"
|
||||
+ fullscreenbutton="true"
|
||||
+ persist="screenX screenY width height sizemode">
|
||||
+
|
||||
@ -199,7 +198,7 @@ new file mode 100644
|
||||
+ <button id="social-undoactivation-button"
|
||||
+ label="&social.activated.undobutton.label;"
|
||||
+ accesskey="&social.activated.undobutton.accesskey;"
|
||||
+ onclick="SocialUI.undoActivation();"/>
|
||||
+ onclick="SocialUI.undoActivation(this);"/>
|
||||
+ <button default="true"
|
||||
+ autofocus="autofocus"
|
||||
+ label="&social.ok.label;"
|
||||
@ -214,7 +213,7 @@ new file mode 100644
|
||||
+ <button id="social-undoactivation-button"
|
||||
+ label="&social.activated.undobutton.label;"
|
||||
+ accesskey="&social.activated.undobutton.accesskey;"
|
||||
+ onclick="SocialUI.undoActivation();"/>
|
||||
+ onclick="SocialUI.undoActivation(this);"/>
|
||||
+#endif
|
||||
+ </hbox>
|
||||
+ </vbox>
|
||||
@ -283,22 +282,6 @@ new file mode 100644
|
||||
+ noautofocus="true"
|
||||
+ position="topcenter topright"/>
|
||||
+
|
||||
+ <menupopup id="inspector-node-popup">
|
||||
+ <menuitem id="inspectorHTMLCopyInner"
|
||||
+ label="&inspectorHTMLCopyInner.label;"
|
||||
+ accesskey="&inspectorHTMLCopyInner.accesskey;"
|
||||
+ command="Inspector:CopyInner"/>
|
||||
+ <menuitem id="inspectorHTMLCopyOuter"
|
||||
+ label="&inspectorHTMLCopyOuter.label;"
|
||||
+ accesskey="&inspectorHTMLCopyOuter.accesskey;"
|
||||
+ command="Inspector:CopyOuter"/>
|
||||
+ <menuseparator/>
|
||||
+ <menuitem id="inspectorHTMLDelete"
|
||||
+ label="&inspectorHTMLDelete.label;"
|
||||
+ accesskey="&inspectorHTMLDelete.accesskey;"
|
||||
+ command="Inspector:DeleteNode"/>
|
||||
+ </menupopup>
|
||||
+
|
||||
+ <menupopup id="toolbar-context-menu"
|
||||
+ onpopupshowing="onViewToolbarsPopupShowing(event);">
|
||||
+ <menuseparator/>
|
||||
@ -465,6 +448,34 @@ new file mode 100644
|
||||
+ <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
|
||||
+#endif
|
||||
+ </tooltip>
|
||||
+
|
||||
+ <popupnotification id="webRTC-shareDevices-notification" hidden="true">
|
||||
+ <popupnotificationcontent id="webRTC-selectCamera" orient="vertical">
|
||||
+ <separator class="thin"/>
|
||||
+ <label value="&getUserMedia.selectCamera.label;"
|
||||
+ accesskey="&getUserMedia.selectCamera.accesskey;"
|
||||
+ control="webRTC-selectCamera-menulist"/>
|
||||
+ <menulist id="webRTC-selectCamera-menulist">
|
||||
+ <menupopup id="webRTC-selectCamera-menupopup"/>
|
||||
+ </menulist>
|
||||
+ </popupnotificationcontent>
|
||||
+ <popupnotificationcontent id="webRTC-selectMicrophone" orient="vertical">
|
||||
+ <separator class="thin"/>
|
||||
+ <label value="&getUserMedia.selectMicrophone.label;"
|
||||
+ accesskey="&getUserMedia.selectMicrophone.accesskey;"
|
||||
+ control="webRTC-selectMicrophone-menulist"/>
|
||||
+ <menulist id="webRTC-selectMicrophone-menulist">
|
||||
+ <menupopup id="webRTC-selectMicrophone-menupopup"/>
|
||||
+ </menulist>
|
||||
+ </popupnotificationcontent>
|
||||
+ </popupnotification>
|
||||
+
|
||||
+ <popupnotification id="geolocation-notification" hidden="true">
|
||||
+ <popupnotificationcontent orient="vertical" align="start">
|
||||
+ <separator class="thin"/>
|
||||
+ <label id="geolocation-learnmore-link" class="text-link"/>
|
||||
+ </popupnotificationcontent>
|
||||
+ </popupnotification>
|
||||
+ </popupset>
|
||||
+
|
||||
+#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
@ -522,7 +533,7 @@ new file mode 100644
|
||||
+ toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
|
||||
+ fullscreentoolbar="true" mode="icons" customizable="true"
|
||||
+ iconsize="large"
|
||||
+ defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,window-controls"
|
||||
+ defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,webrtc-status-button,downloads-button,home-button,bookmarks-menu-button-container,window-controls"
|
||||
+ context="toolbar-context-menu">
|
||||
+
|
||||
+ <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
||||
@ -579,6 +590,8 @@ new file mode 100644
|
||||
+ <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
+ <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
+ <image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
+ <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
+ <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
+ </box>
|
||||
+ <!-- Use onclick instead of normal popup= syntax since the popup
|
||||
+ code fires onmousedown, and hence eats our favicon drag events.
|
||||
@ -654,6 +667,18 @@ new file mode 100644
|
||||
+ <searchbar id="searchbar" flex="1"/>
|
||||
+ </toolbaritem>
|
||||
+
|
||||
+ <toolbarbutton id="webrtc-status-button"
|
||||
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
+ type="menu"
|
||||
+ hidden="true"
|
||||
+ orient="horizontal"
|
||||
+ label="&webrtcIndicatorButton.label;"
|
||||
+ tooltiptext="&webrtcIndicatorButton.tooltip;">
|
||||
+ <menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
|
||||
+ onpopuphiding="WebrtcIndicator.clearPopup(this);"
|
||||
+ oncommand="WebrtcIndicator.menuCommand(event.target);"/>
|
||||
+ </toolbarbutton>
|
||||
+
|
||||
+ <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
+ persist="class" removable="true"
|
||||
+ label="&homeButton.label;"
|
||||
@ -669,6 +694,7 @@ new file mode 100644
|
||||
+ removable="false"
|
||||
+ title="&socialToolbar.title;"
|
||||
+ hidden="true"
|
||||
+ skipintoolbarset="true"
|
||||
+ observes="socialActiveBroadcaster">
|
||||
+ <toolbarbutton id="social-provider-button"
|
||||
+ class="toolbarbutton-1"
|
||||
@ -700,6 +726,7 @@ new file mode 100644
|
||||
+ label="&social.toggleNotifications.label;"
|
||||
+ accesskey="&social.toggleNotifications.accesskey;"/>
|
||||
+ <menuseparator class="social-statusarea-separator"/>
|
||||
+ <menuseparator class="social-provider-menu" hidden="true"/>
|
||||
+ <menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
|
||||
+ <menuitem class="social-remove-menuitem" command="Social:Remove"/>
|
||||
+ </menupopup>
|
||||
@ -893,7 +920,8 @@ new file mode 100644
|
||||
+ tabbrowser="content"
|
||||
+ flex="1"
|
||||
+ setfocus="false"
|
||||
+ tooltip="tabbrowser-tab-tooltip">
|
||||
+ tooltip="tabbrowser-tab-tooltip"
|
||||
+ stopwatchid="FX_TAB_CLICK_MS">
|
||||
+ <tab class="tabbrowser-tab" selected="true" fadein="true"/>
|
||||
+ </tabs>
|
||||
+
|
||||
@ -1048,6 +1076,8 @@ new file mode 100644
|
||||
+ </toolbarpalette>
|
||||
+ </toolbox>
|
||||
+
|
||||
+ <hbox id="fullscr-toggler" collapsed="true"/>
|
||||
+
|
||||
+ <hbox flex="1" id="browser">
|
||||
+ <vbox id="browser-border-start" hidden="true" layer="true"/>
|
||||
+ <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
|
||||
@ -1071,19 +1101,6 @@ new file mode 100644
|
||||
+ <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
|
||||
+ <statuspanel id="statusbar-display" inactive="true"/>
|
||||
+ </vbox>
|
||||
+ <splitter id="devtools-side-splitter" hidden="true"/>
|
||||
+ <vbox id="devtools-sidebar-box" hidden="true"
|
||||
+ style="min-width: 18em; width: 22em; max-width: 42em;" persist="width">
|
||||
+ <toolbar id="devtools-sidebar-toolbar"
|
||||
+ class="devtools-toolbar"
|
||||
+ nowindowdrag="true">
|
||||
+ <spacer flex="1"/>
|
||||
+ <toolbarbutton tooltiptext="&inspectSidebarCloseButton.tooltiptext;"
|
||||
+ class="devtools-closebutton"
|
||||
+ command="Inspector:Sidebar"/>
|
||||
+ </toolbar>
|
||||
+ <deck id="devtools-sidebar-deck" flex="1"/>
|
||||
+ </vbox>
|
||||
+ <splitter id="social-sidebar-splitter"
|
||||
+ class="chromeclass-extrachrome sidebar-splitter"
|
||||
+ observes="socialSidebarBroadcaster"/>
|
||||
@ -1122,52 +1139,6 @@ new file mode 100644
|
||||
+ </hbox>
|
||||
+
|
||||
+ <vbox id="browser-bottombox" layer="true">
|
||||
+ <toolbar id="inspector-toolbar"
|
||||
+ class="devtools-toolbar"
|
||||
+ nowindowdrag="true"
|
||||
+ hidden="true">
|
||||
+#ifdef XP_MACOSX
|
||||
+ <toolbarbutton id="highlighter-closebutton"
|
||||
+ class="devtools-closebutton"
|
||||
+ oncommand="InspectorUI.closeInspectorUI(false);"
|
||||
+ tooltiptext="&inspectCloseButton.tooltiptext;"/>
|
||||
+#endif
|
||||
+ <toolbarbutton id="inspector-inspect-toolbutton"
|
||||
+ class="devtools-toolbarbutton"
|
||||
+ command="Inspector:Inspect"/>
|
||||
+ <toolbarbutton id="inspector-treepanel-toolbutton"
|
||||
+ class="devtools-toolbarbutton"
|
||||
+ tabindex="0"
|
||||
+ aria-label="&markupButton.arialabel;"
|
||||
+ accesskey="&markupButton.accesskey;"
|
||||
+ command="Inspector:HTMLPanel"/>
|
||||
+ <arrowscrollbox id="inspector-breadcrumbs"
|
||||
+ flex="1" orient="horizontal"
|
||||
+ clicktoscroll="true"/>
|
||||
+ <hbox id="inspector-tools">
|
||||
+ <toolbarbutton id="inspector-3D-button"
|
||||
+ class="devtools-toolbarbutton"
|
||||
+ hidden="true"
|
||||
+ label="&inspect3DViewButton.label;"
|
||||
+ accesskey="&inspect3DViewButton.accesskey;"
|
||||
+ tabindex="0"
|
||||
+ command="Inspector:Tilt"/>
|
||||
+ <toolbarbutton id="inspector-style-button"
|
||||
+ class="devtools-toolbarbutton"
|
||||
+ label="&inspectStyleButton.label;"
|
||||
+ accesskey="&inspectStyleButton.accesskey;"
|
||||
+ tabindex="0"
|
||||
+ command="Inspector:Sidebar"/>
|
||||
+ <!-- registered tools go here -->
|
||||
+ </hbox>
|
||||
+#ifndef XP_MACOSX
|
||||
+ <toolbarbutton id="highlighter-closebutton"
|
||||
+ class="devtools-closebutton"
|
||||
+ oncommand="InspectorUI.closeInspectorUI(false);"
|
||||
+ tooltiptext="&inspectCloseButton.tooltiptext;"/>
|
||||
+#endif
|
||||
+ </toolbar>
|
||||
+
|
||||
+ <toolbar id="developer-toolbar"
|
||||
+ class="devtools-toolbar"
|
||||
+ hidden="true">
|
||||
@ -1184,36 +1155,10 @@ new file mode 100644
|
||||
+ <hbox class="gclitoolbar-complete-node"/>
|
||||
+ <textbox class="gclitoolbar-input-node" rows="1"/>
|
||||
+ </stack>
|
||||
+ <toolbarbutton id="developer-toolbar-webconsole"
|
||||
+ <toolbarbutton id="developer-toolbar-toolbox-button"
|
||||
+ class="developer-toolbar-button"
|
||||
+ observes="devtoolsMenuBroadcaster_WebConsole"/>
|
||||
+ <toolbarbutton id="developer-toolbar-inspector"
|
||||
+ class="developer-toolbar-button"
|
||||
+ observes="devtoolsMenuBroadcaster_Inspect"/>
|
||||
+ <toolbarbutton id="developer-toolbar-styleeditor"
|
||||
+ class="developer-toolbar-button"
|
||||
+ observes="devtoolsMenuBroadcaster_StyleEditor"/>
|
||||
+ <toolbarbutton id="developer-toolbar-debugger"
|
||||
+ class="developer-toolbar-button"
|
||||
+ observes="devtoolsMenuBroadcaster_Debugger"/>
|
||||
+ <toolbarbutton id="developer-toolbar-other-tools"
|
||||
+ type="menu"
|
||||
+ class="developer-toolbar-button"
|
||||
+ label="&devToolbarOtherToolsButton.label;">
|
||||
+ <menupopup position="before_end">
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_DevToolbar"/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_ResponsiveUI"/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_RemoteDebugger"/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_ChromeDebugger"/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_Scratchpad"/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_StyleEditor"/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_PageSource"/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_ErrorConsole"/>
|
||||
+ <menuseparator/>
|
||||
+ <menuitem observes="devtoolsMenuBroadcaster_GetMoreTools"/>
|
||||
+ </menupopup>
|
||||
+ </toolbarbutton>
|
||||
+
|
||||
+ observes="devtoolsMenuBroadcaster_DevToolbox"
|
||||
+ tooltiptext="&devToolbarToolsButton.tooltip;"/>
|
||||
+#ifndef XP_MACOSX
|
||||
+ <toolbarbutton id="developer-toolbar-closebutton"
|
||||
+ class="devtools-closebutton"
|
||||
@ -1282,8 +1227,8 @@ new file mode 100644
|
||||
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
|
||||
--- a/browser/base/jar.mn
|
||||
+++ b/browser/base/jar.mn
|
||||
@@ -50,16 +50,18 @@ browser.jar:
|
||||
content/browser/abouthome/mozilla@2x.png (content/abouthome/mozilla@2x.png)
|
||||
@@ -55,16 +55,18 @@ browser.jar:
|
||||
content/browser/abouthealthreport/abouthealth.css (content/abouthealthreport/abouthealth.css)
|
||||
#endif
|
||||
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
|
||||
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
|
||||
@ -1323,7 +1268,7 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
|
||||
|
||||
#include "rdf.h"
|
||||
#include "nsFeedSniffer.h"
|
||||
@@ -32,18 +32,16 @@ using namespace mozilla::browser;
|
||||
@@ -34,18 +34,16 @@ using namespace mozilla::browser;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -1342,9 +1287,9 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
|
||||
|
||||
@@ -64,17 +62,17 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID)
|
||||
#endif
|
||||
@@ -70,17 +68,17 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID)
|
||||
NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
|
||||
#endif
|
||||
|
||||
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
||||
{ &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
|
||||
@ -1387,7 +1332,7 @@ diff --git a/browser/components/preferences/advanced.js b/browser/components/pre
|
||||
// when the user will select the default. We refresh here periodically
|
||||
// in case the default changes. On other Windows OS's defaults can also
|
||||
// be set while the prefs are open.
|
||||
@@ -715,14 +721,25 @@ var gAdvancedPane = {
|
||||
@@ -791,14 +797,25 @@ var gAdvancedPane = {
|
||||
* Set browser as the operating system default browser.
|
||||
*/
|
||||
setDefaultBrowser: function()
|
||||
@ -1849,24 +1794,25 @@ new file mode 100644
|
||||
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
||||
--- a/browser/installer/package-manifest.in
|
||||
+++ b/browser/installer/package-manifest.in
|
||||
@@ -578,18 +578,20 @@
|
||||
@BINPATH@/@PREF_DIR@/healthreport-prefs.js
|
||||
#endif
|
||||
@BINPATH@/greprefs.js
|
||||
@BINPATH@/defaults/autoconfig/platform.js
|
||||
@@ -578,19 +578,21 @@
|
||||
@BINPATH@/defaults/autoconfig/prefcalls.js
|
||||
@BINPATH@/defaults/profile/prefs.js
|
||||
|
||||
#ifndef LIBXUL_SDK
|
||||
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
|
||||
; Technically this is an app pref file, but we are keeping it in the original
|
||||
; gre location for now.
|
||||
@BINPATH@/defaults/pref/channel-prefs.js
|
||||
+@BINPATH@/defaults/pref/kde.js
|
||||
#else
|
||||
; For Fx-on-xr, channel-prefs lives with the app preferences. (Bug 762588)
|
||||
@BINPATH@/@PREF_DIR@/channel-prefs.js
|
||||
+@BINPATH@/@PREF_DIR@/kde.js
|
||||
#endif
|
||||
@BINPATH@/defaults/profile/prefs.js
|
||||
|
||||
; [Layout Engine Resources]
|
||||
; Style Sheets, Graphics and other Resources used by the layout engine.
|
||||
@BINPATH@/res/EditorOverride.css
|
||||
@BINPATH@/res/contenteditable.css
|
||||
@BINPATH@/res/designmode.css
|
||||
; Services (gre) prefs
|
||||
#ifdef MOZ_SERVICES_AITC
|
||||
@BINPATH@/defaults/pref/services-aitc.js
|
||||
#endif
|
||||
#ifdef MOZ_SERVICES_NOTIFICATIONS
|
||||
@BINPATH@/defaults/pref/services-notifications.js
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9914e0d95c30e273a39eea6ba5cdd7f69afa9c6d459e8ee8c418e0ea7f0c41b2
|
||||
size 52849771
|
3
l10n-20.0.tar.bz2
Normal file
3
l10n-20.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3e1f34f54e05c088c1d7c9dc4ade85a619368da9371450acea7f166498886856
|
||||
size 53002694
|
692
mozilla-gstreamer-1.patch
Normal file
692
mozilla-gstreamer-1.patch
Normal file
@ -0,0 +1,692 @@
|
||||
# HG changeset patch
|
||||
# Parent 0559be6b60075e1a708ca90e874f922ff200c462
|
||||
# User Mike Gorse <mgorse@suse.com>
|
||||
|
||||
Bug 806917 - support GStreamer 1.0
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -5758,28 +5758,36 @@ fi
|
||||
|
||||
AC_SUBST(MOZ_PULSEAUDIO)
|
||||
AC_SUBST(MOZ_PULSEAUDIO_CFLAGS)
|
||||
AC_SUBST(MOZ_PULSEAUDIO_LIBS)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable GStreamer
|
||||
dnl ========================================================
|
||||
-MOZ_ARG_ENABLE_BOOL(gstreamer,
|
||||
-[ --enable-gstreamer Enable GStreamer support],
|
||||
-MOZ_GSTREAMER=1,
|
||||
-MOZ_GSTREAMER=)
|
||||
+MOZ_ARG_ENABLE_STRING(gstreamer,
|
||||
+[ --enable-gstreamer[=1.0] Enable GStreamer support],
|
||||
+[ MOZ_GSTREAMER=1
|
||||
+ # API version, eg 0.10, 1.0 etc
|
||||
+ if test -n "$enableval" ]; then
|
||||
+ GST_API_VERSION=$enableval
|
||||
+ else
|
||||
+ GST_API_VERSION=0.10
|
||||
+ fi]
|
||||
+[ MOZ_GSTREAMER=])
|
||||
|
||||
if test "$MOZ_GSTREAMER"; then
|
||||
- # API version, eg 0.10, 1.0 etc
|
||||
- GST_API_VERSION=0.10
|
||||
# core/base release number
|
||||
# depend on >= 0.10.33 as that's when the playbin2 source-setup signal was
|
||||
# introduced
|
||||
- GST_VERSION=0.10.33
|
||||
+ if test "$GST_API_VERSION" = "1.0"; then
|
||||
+ GST_VERSION=1.0
|
||||
+ else
|
||||
+ GST_VERSION=0.10.33
|
||||
+ fi
|
||||
PKG_CHECK_MODULES(GSTREAMER,
|
||||
gstreamer-$GST_API_VERSION >= $GST_VERSION
|
||||
gstreamer-app-$GST_API_VERSION
|
||||
gstreamer-plugins-base-$GST_API_VERSION)
|
||||
if test -n "$GSTREAMER_LIBS"; then
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS $GSTREAMER_LIBS -lgstvideo-$GST_API_VERSION"
|
||||
AC_TRY_LINK(,[return 0;],_HAVE_LIBGSTVIDEO=1,_HAVE_LIBGSTVIDEO=)
|
||||
diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp
|
||||
--- a/content/media/gstreamer/GStreamerFormatHelper.cpp
|
||||
+++ b/content/media/gstreamer/GStreamerFormatHelper.cpp
|
||||
@@ -141,17 +141,21 @@ bool GStreamerFormatHelper::HaveElements
|
||||
}
|
||||
g_list_free(list);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
GList* GStreamerFormatHelper::GetFactories() {
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ uint32_t cookie = gst_registry_get_feature_list_cookie(gst_registry_get());
|
||||
+#else
|
||||
uint32_t cookie = gst_default_registry_get_feature_list_cookie ();
|
||||
+#endif
|
||||
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;
|
||||
}
|
||||
|
||||
diff --git a/content/media/gstreamer/GStreamerReader.cpp b/content/media/gstreamer/GStreamerReader.cpp
|
||||
--- a/content/media/gstreamer/GStreamerReader.cpp
|
||||
+++ b/content/media/gstreamer/GStreamerReader.cpp
|
||||
@@ -69,18 +69,22 @@ GStreamerReader::GStreamerReader(Abstrac
|
||||
MOZ_COUNT_CTOR(GStreamerReader);
|
||||
|
||||
mSrcCallbacks.need_data = GStreamerReader::NeedDataCb;
|
||||
mSrcCallbacks.enough_data = GStreamerReader::EnoughDataCb;
|
||||
mSrcCallbacks.seek_data = GStreamerReader::SeekDataCb;
|
||||
|
||||
mSinkCallbacks.eos = GStreamerReader::EosCb;
|
||||
mSinkCallbacks.new_preroll = GStreamerReader::NewPrerollCb;
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ mSinkCallbacks.new_sample = GStreamerReader::NewBufferCb;
|
||||
+#else
|
||||
mSinkCallbacks.new_buffer = GStreamerReader::NewBufferCb;
|
||||
mSinkCallbacks.new_buffer_list = NULL;
|
||||
+#endif
|
||||
|
||||
gst_segment_init(&mVideoSegment, GST_FORMAT_UNDEFINED);
|
||||
gst_segment_init(&mAudioSegment, GST_FORMAT_UNDEFINED);
|
||||
}
|
||||
|
||||
GStreamerReader::~GStreamerReader()
|
||||
{
|
||||
MOZ_COUNT_DTOR(GStreamerReader);
|
||||
@@ -120,19 +124,26 @@ nsresult GStreamerReader::Init(MediaDeco
|
||||
mVideoSink = gst_parse_bin_from_description("capsfilter name=filter ! "
|
||||
"appsink name=videosink sync=true max-buffers=1 "
|
||||
"caps=video/x-raw-yuv,format=(fourcc)I420"
|
||||
, TRUE, NULL);
|
||||
mVideoAppSink = GST_APP_SINK(gst_bin_get_by_name(GST_BIN(mVideoSink),
|
||||
"videosink"));
|
||||
gst_app_sink_set_callbacks(mVideoAppSink, &mSinkCallbacks,
|
||||
(gpointer) this, NULL);
|
||||
- GstPad *sinkpad = gst_element_get_pad(GST_ELEMENT(mVideoAppSink), "sink");
|
||||
+ GstPad *sinkpad = gst_element_get_static_pad(GST_ELEMENT(mVideoAppSink), "sink");
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ // TODO: Figure out whether we need UPSTREAM or DOWNSTREAM, or both
|
||||
+ gst_pad_add_probe(sinkpad,
|
||||
+ (GstPadProbeType) (GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_UPSTREAM),
|
||||
+ &GStreamerReader::EventProbeCb, this, NULL);
|
||||
+#else
|
||||
gst_pad_add_event_probe(sinkpad,
|
||||
G_CALLBACK(&GStreamerReader::EventProbeCb), this);
|
||||
+#endif
|
||||
gst_object_unref(sinkpad);
|
||||
|
||||
mAudioSink = gst_parse_bin_from_description("capsfilter name=filter ! "
|
||||
#ifdef MOZ_SAMPLE_TYPE_FLOAT32
|
||||
"appsink name=audiosink sync=true caps=audio/x-raw-float,"
|
||||
#ifdef IS_LITTLE_ENDIAN
|
||||
"channels={1,2},rate=44100,width=32,endianness=1234", TRUE, NULL);
|
||||
#else
|
||||
@@ -145,19 +156,25 @@ nsresult GStreamerReader::Init(MediaDeco
|
||||
#else
|
||||
"channels={1,2},rate=48000,width=16,endianness=4321", TRUE, NULL);
|
||||
#endif
|
||||
#endif
|
||||
mAudioAppSink = GST_APP_SINK(gst_bin_get_by_name(GST_BIN(mAudioSink),
|
||||
"audiosink"));
|
||||
gst_app_sink_set_callbacks(mAudioAppSink, &mSinkCallbacks,
|
||||
(gpointer) this, NULL);
|
||||
- sinkpad = gst_element_get_pad(GST_ELEMENT(mAudioAppSink), "sink");
|
||||
+ sinkpad = gst_element_get_static_pad(GST_ELEMENT(mAudioAppSink), "sink");
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ gst_pad_add_probe(sinkpad,
|
||||
+ (GstPadProbeType) (GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_UPSTREAM),
|
||||
+ &GStreamerReader::EventProbeCb, this, NULL);
|
||||
+#else
|
||||
gst_pad_add_event_probe(sinkpad,
|
||||
G_CALLBACK(&GStreamerReader::EventProbeCb), this);
|
||||
+#endif
|
||||
gst_object_unref(sinkpad);
|
||||
|
||||
g_object_set(mPlayBin, "uri", "appsrc://",
|
||||
"video-sink", mVideoSink,
|
||||
"audio-sink", mAudioSink,
|
||||
NULL);
|
||||
|
||||
g_object_connect(mPlayBin, "signal::source-setup",
|
||||
@@ -231,17 +248,17 @@ nsresult GStreamerReader::ReadMetadata(V
|
||||
filter = gst_bin_get_by_name(GST_BIN(mAudioSink), "filter");
|
||||
else if (!(current_flags & GST_PLAY_FLAG_VIDEO))
|
||||
filter = gst_bin_get_by_name(GST_BIN(mVideoSink), "filter");
|
||||
|
||||
if (filter) {
|
||||
/* Little trick: set the target caps to "skip" so that playbin2 fails to
|
||||
* find a decoder for the stream we want to skip.
|
||||
*/
|
||||
- GstCaps *filterCaps = gst_caps_new_simple ("skip", NULL);
|
||||
+ GstCaps *filterCaps = gst_caps_new_simple ("skip", NULL, NULL);
|
||||
g_object_set(filter, "caps", filterCaps, NULL);
|
||||
gst_caps_unref(filterCaps);
|
||||
gst_object_unref(filter);
|
||||
}
|
||||
|
||||
/* start the pipeline */
|
||||
gst_element_set_state(mPlayBin, GST_STATE_PAUSED);
|
||||
|
||||
@@ -284,19 +301,24 @@ nsresult GStreamerReader::ReadMetadata(V
|
||||
gst_element_set_state(mPlayBin, GST_STATE_NULL);
|
||||
gst_message_unref(message);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
/* report the duration */
|
||||
gint64 duration;
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ if (gst_element_query_duration(GST_ELEMENT(mPlayBin),
|
||||
+ GST_FORMAT_TIME, &duration)) {
|
||||
+#else
|
||||
GstFormat format = GST_FORMAT_TIME;
|
||||
if (gst_element_query_duration(GST_ELEMENT(mPlayBin),
|
||||
&format, &duration) && format == GST_FORMAT_TIME) {
|
||||
+#endif
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
LOG(PR_LOG_DEBUG, ("returning duration %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (duration)));
|
||||
duration = GST_TIME_AS_USECONDS (duration);
|
||||
mDecoder->SetMediaDuration(duration);
|
||||
}
|
||||
|
||||
int n_video = 0, n_audio = 0;
|
||||
@@ -365,59 +387,87 @@ bool GStreamerReader::DecodeAudioData()
|
||||
{
|
||||
NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
|
||||
|
||||
if (!WaitForDecodedData(&mAudioSinkBufferCount)) {
|
||||
mAudioQueue.Finish();
|
||||
return false;
|
||||
}
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstSample *sample = gst_app_sink_pull_sample(mAudioAppSink);
|
||||
+ GstBuffer *buffer = gst_sample_get_buffer(sample);
|
||||
+#else
|
||||
GstBuffer *buffer = gst_app_sink_pull_buffer(mAudioAppSink);
|
||||
+#endif
|
||||
int64_t timestamp = GST_BUFFER_TIMESTAMP(buffer);
|
||||
timestamp = gst_segment_to_stream_time(&mAudioSegment,
|
||||
GST_FORMAT_TIME, timestamp);
|
||||
timestamp = GST_TIME_AS_USECONDS(timestamp);
|
||||
int64_t duration = 0;
|
||||
if (GST_CLOCK_TIME_IS_VALID(GST_BUFFER_DURATION(buffer)))
|
||||
duration = GST_TIME_AS_USECONDS(GST_BUFFER_DURATION(buffer));
|
||||
|
||||
int64_t offset = GST_BUFFER_OFFSET(buffer);
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstMapInfo info;
|
||||
+ gst_buffer_map(buffer, &info, GST_MAP_READ);
|
||||
+ unsigned int size = info.size;
|
||||
+#else
|
||||
unsigned int size = GST_BUFFER_SIZE(buffer);
|
||||
+#endif
|
||||
int32_t frames = (size / sizeof(AudioDataValue)) / mInfo.mAudioChannels;
|
||||
ssize_t outSize = static_cast<size_t>(size / sizeof(AudioDataValue));
|
||||
nsAutoArrayPtr<AudioDataValue> data(new AudioDataValue[outSize]);
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ memcpy(data, info.data, info.size);
|
||||
+ gst_buffer_unmap(buffer, &info);
|
||||
+#else
|
||||
memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer));
|
||||
+#endif
|
||||
AudioData *audio = new AudioData(offset, timestamp, duration,
|
||||
frames, data.forget(), mInfo.mAudioChannels);
|
||||
|
||||
mAudioQueue.Push(audio);
|
||||
gst_buffer_unref(buffer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip,
|
||||
int64_t aTimeThreshold)
|
||||
{
|
||||
NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstSample *sample = NULL;
|
||||
+#endif
|
||||
GstBuffer *buffer = NULL;
|
||||
int64_t timestamp, nextTimestamp;
|
||||
while (true)
|
||||
{
|
||||
if (!WaitForDecodedData(&mVideoSinkBufferCount)) {
|
||||
mVideoQueue.Finish();
|
||||
break;
|
||||
}
|
||||
mDecoder->NotifyDecodedFrames(0, 1);
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ sample = gst_app_sink_pull_sample(mVideoAppSink);
|
||||
+ buffer = gst_sample_get_buffer(sample);
|
||||
+#else
|
||||
buffer = gst_app_sink_pull_buffer(mVideoAppSink);
|
||||
+#endif
|
||||
bool isKeyframe = !GST_BUFFER_FLAG_IS_SET(buffer, GST_BUFFER_FLAG_DISCONT);
|
||||
if ((aKeyFrameSkip && !isKeyframe)) {
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ gst_sample_unref(sample);
|
||||
+#else
|
||||
gst_buffer_unref(buffer);
|
||||
+#endif
|
||||
buffer = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
timestamp = GST_BUFFER_TIMESTAMP(buffer);
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
|
||||
timestamp = gst_segment_to_stream_time(&mVideoSegment,
|
||||
@@ -431,62 +481,90 @@ bool GStreamerReader::DecodeVideoFrame(b
|
||||
else if (fpsNum && fpsDen)
|
||||
/* add 1-frame duration */
|
||||
nextTimestamp += gst_util_uint64_scale(GST_USECOND, fpsNum, fpsDen);
|
||||
|
||||
if (timestamp < aTimeThreshold) {
|
||||
LOG(PR_LOG_DEBUG, ("skipping frame %" GST_TIME_FORMAT
|
||||
" threshold %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS(timestamp), GST_TIME_ARGS(aTimeThreshold)));
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ gst_sample_unref(sample);
|
||||
+#else
|
||||
gst_buffer_unref(buffer);
|
||||
+#endif
|
||||
buffer = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (buffer == NULL)
|
||||
/* no more frames */
|
||||
return false;
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstMapInfo info;
|
||||
+ gst_buffer_map(buffer, &info, GST_MAP_READ);
|
||||
+ guint8 *data = info.data;
|
||||
+#else
|
||||
guint8 *data = GST_BUFFER_DATA(buffer);
|
||||
+#endif
|
||||
|
||||
int width = mPicture.width;
|
||||
int height = mPicture.height;
|
||||
GstVideoFormat format = mFormat;
|
||||
|
||||
VideoData::YCbCrBuffer b;
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstVideoInfo *video_info;
|
||||
+ gst_video_info_set_format(video_info, format, width, height);
|
||||
+ for(int i = 0; i < 3; i++) {
|
||||
+ b.mPlanes[i].mData = data + GST_VIDEO_INFO_COMP_OFFSET(video_info, i);
|
||||
+ b.mPlanes[i].mStride = GST_VIDEO_INFO_COMP_STRIDE(video_info, i);
|
||||
+ b.mPlanes[i].mHeight = GST_VIDEO_INFO_COMP_HEIGHT(video_info, i);
|
||||
+ b.mPlanes[i].mWidth = GST_VIDEO_INFO_COMP_WIDTH(video_info, i);
|
||||
+ b.mPlanes[i].mOffset = 0;
|
||||
+ b.mPlanes[i].mSkip = 0;
|
||||
+ }
|
||||
+#else
|
||||
for(int i = 0; i < 3; i++) {
|
||||
b.mPlanes[i].mData = data + gst_video_format_get_component_offset(format, i,
|
||||
width, height);
|
||||
b.mPlanes[i].mStride = gst_video_format_get_row_stride(format, i, width);
|
||||
b.mPlanes[i].mHeight = gst_video_format_get_component_height(format,
|
||||
i, height);
|
||||
b.mPlanes[i].mWidth = gst_video_format_get_component_width(format,
|
||||
i, width);
|
||||
b.mPlanes[i].mOffset = 0;
|
||||
b.mPlanes[i].mSkip = 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
bool isKeyframe = !GST_BUFFER_FLAG_IS_SET(buffer,
|
||||
GST_BUFFER_FLAG_DELTA_UNIT);
|
||||
/* XXX ? */
|
||||
int64_t offset = 0;
|
||||
VideoData *video = VideoData::Create(mInfo,
|
||||
mDecoder->GetImageContainer(),
|
||||
offset,
|
||||
timestamp,
|
||||
nextTimestamp,
|
||||
b,
|
||||
isKeyframe,
|
||||
-1,
|
||||
mPicture);
|
||||
mVideoQueue.Push(video);
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ gst_buffer_unmap(buffer, &info);
|
||||
+ gst_sample_unref(sample);
|
||||
+#else
|
||||
gst_buffer_unref(buffer);
|
||||
+#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
nsresult GStreamerReader::Seek(int64_t aTarget,
|
||||
int64_t aStartTime,
|
||||
int64_t aEndTime,
|
||||
int64_t aCurrentTime)
|
||||
@@ -509,52 +587,62 @@ nsresult GStreamerReader::Seek(int64_t a
|
||||
|
||||
nsresult GStreamerReader::GetBuffered(nsTimeRanges* aBuffered,
|
||||
int64_t aStartTime)
|
||||
{
|
||||
if (!mInfo.mHasVideo && !mInfo.mHasAudio) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
- GstFormat format = GST_FORMAT_TIME;
|
||||
+#if GST_VERSION_MAJOR == 0
|
||||
+ GstFormat format = GST_FORMAT_TIME;
|
||||
+#endif
|
||||
+
|
||||
MediaResource* resource = mDecoder->GetResource();
|
||||
gint64 resourceLength = resource->GetLength();
|
||||
nsTArray<MediaByteRange> ranges;
|
||||
resource->GetCachedRanges(ranges);
|
||||
|
||||
if (mDecoder->OnStateMachineThread())
|
||||
/* Report the position from here while buffering as we can't report it from
|
||||
* the gstreamer threads that are actually reading from the resource
|
||||
*/
|
||||
NotifyBytesConsumed();
|
||||
|
||||
if (resource->IsDataCachedToEndOfResource(0)) {
|
||||
/* fast path for local or completely cached files */
|
||||
gint64 duration = 0;
|
||||
- GstFormat format = GST_FORMAT_TIME;
|
||||
-
|
||||
duration = QueryDuration();
|
||||
double end = (double) duration / GST_MSECOND;
|
||||
LOG(PR_LOG_DEBUG, ("complete range [0, %f] for [0, %li]",
|
||||
end, resourceLength));
|
||||
aBuffered->Add(0, end);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
for(uint32_t index = 0; index < ranges.Length(); index++) {
|
||||
int64_t startOffset = ranges[index].mStart;
|
||||
int64_t endOffset = ranges[index].mEnd;
|
||||
gint64 startTime, endTime;
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ if (!gst_element_query_convert(GST_ELEMENT(mPlayBin), GST_FORMAT_BYTES,
|
||||
+ startOffset, GST_FORMAT_TIME, &startTime))
|
||||
+ continue;
|
||||
+ if (!gst_element_query_convert(GST_ELEMENT(mPlayBin), GST_FORMAT_BYTES,
|
||||
+ endOffset, GST_FORMAT_TIME, &endTime))
|
||||
+ continue;
|
||||
+#else
|
||||
if (!gst_element_query_convert(GST_ELEMENT(mPlayBin), GST_FORMAT_BYTES,
|
||||
startOffset, &format, &startTime) || format != GST_FORMAT_TIME)
|
||||
continue;
|
||||
if (!gst_element_query_convert(GST_ELEMENT(mPlayBin), GST_FORMAT_BYTES,
|
||||
endOffset, &format, &endTime) || format != GST_FORMAT_TIME)
|
||||
continue;
|
||||
+#endif
|
||||
|
||||
double start = start = (double) GST_TIME_AS_USECONDS (startTime) / GST_MSECOND;
|
||||
double end = (double) GST_TIME_AS_USECONDS (endTime) / GST_MSECOND;
|
||||
LOG(PR_LOG_DEBUG, ("adding range [%f, %f] for [%li %li] size %li",
|
||||
start, end, startOffset, endOffset, resourceLength));
|
||||
aBuffered->Add(start, end);
|
||||
}
|
||||
|
||||
@@ -563,48 +651,64 @@ nsresult GStreamerReader::GetBuffered(ns
|
||||
|
||||
void GStreamerReader::ReadAndPushData(guint aLength)
|
||||
{
|
||||
MediaResource* resource = mDecoder->GetResource();
|
||||
NS_ASSERTION(resource, "Decoder has no media resource");
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
GstBuffer *buffer = gst_buffer_new_and_alloc(aLength);
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstMapInfo info;
|
||||
+ gst_buffer_map(buffer, &info, GST_MAP_WRITE);
|
||||
+ guint8 *data = info.data;
|
||||
+#else
|
||||
guint8 *data = GST_BUFFER_DATA(buffer);
|
||||
+#endif
|
||||
uint32_t size = 0, bytesRead = 0;
|
||||
while(bytesRead < aLength) {
|
||||
rv = resource->Read(reinterpret_cast<char*>(data + bytesRead),
|
||||
aLength - bytesRead, &size);
|
||||
if (NS_FAILED(rv) || size == 0)
|
||||
break;
|
||||
|
||||
bytesRead += size;
|
||||
}
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ info.size = bytesRead;
|
||||
+ gst_buffer_unmap(buffer, &info);
|
||||
+#else
|
||||
GST_BUFFER_SIZE(buffer) = bytesRead;
|
||||
+#endif
|
||||
mByteOffset += bytesRead;
|
||||
|
||||
GstFlowReturn ret = gst_app_src_push_buffer(mSource, gst_buffer_ref(buffer));
|
||||
if (ret != GST_FLOW_OK)
|
||||
LOG(PR_LOG_ERROR, ("ReadAndPushData push ret %s", gst_flow_get_name(ret)));
|
||||
|
||||
- if (GST_BUFFER_SIZE (buffer) < aLength)
|
||||
+ if (bytesRead < aLength)
|
||||
/* If we read less than what we wanted, we reached the end */
|
||||
gst_app_src_end_of_stream(mSource);
|
||||
|
||||
gst_buffer_unref(buffer);
|
||||
}
|
||||
|
||||
int64_t GStreamerReader::QueryDuration()
|
||||
{
|
||||
gint64 duration = 0;
|
||||
GstFormat format = GST_FORMAT_TIME;
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ if (gst_element_query_duration(GST_ELEMENT(mPlayBin),
|
||||
+ format, &duration)) {
|
||||
+#else
|
||||
if (gst_element_query_duration(GST_ELEMENT(mPlayBin),
|
||||
&format, &duration)) {
|
||||
+#endif
|
||||
if (format == GST_FORMAT_TIME) {
|
||||
LOG(PR_LOG_DEBUG, ("pipeline duration %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (duration)));
|
||||
duration = GST_TIME_AS_USECONDS (duration);
|
||||
}
|
||||
}
|
||||
|
||||
/*if (mDecoder->mDuration != -1 &&
|
||||
@@ -668,60 +772,95 @@ gboolean GStreamerReader::SeekData(GstAp
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mByteOffset = mLastReportedByteOffset = aOffset;
|
||||
else
|
||||
LOG(PR_LOG_ERROR, ("seek at %lu failed", aOffset));
|
||||
|
||||
return NS_SUCCEEDED(rv);
|
||||
}
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+GstPadProbeReturn GStreamerReader::EventProbeCb(GstPad *aPad,
|
||||
+ GstPadProbeInfo *aInfo,
|
||||
+ gpointer aUserData)
|
||||
+{
|
||||
+ GStreamerReader *reader = (GStreamerReader *) aUserData;
|
||||
+ GstEvent *aEvent = (GstEvent *)aInfo->data;
|
||||
+ return reader->EventProbe(aPad, aEvent);
|
||||
+}
|
||||
+#else
|
||||
gboolean GStreamerReader::EventProbeCb(GstPad *aPad,
|
||||
GstEvent *aEvent,
|
||||
gpointer aUserData)
|
||||
{
|
||||
GStreamerReader *reader = (GStreamerReader *) aUserData;
|
||||
return reader->EventProbe(aPad, aEvent);
|
||||
}
|
||||
+#endif
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+GstPadProbeReturn GStreamerReader::EventProbe(GstPad *aPad, GstEvent *aEvent)
|
||||
+#else
|
||||
gboolean GStreamerReader::EventProbe(GstPad *aPad, GstEvent *aEvent)
|
||||
+#endif
|
||||
{
|
||||
GstElement *parent = GST_ELEMENT(gst_pad_get_parent(aPad));
|
||||
switch(GST_EVENT_TYPE(aEvent)) {
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ case GST_EVENT_SEGMENT:
|
||||
+#else
|
||||
case GST_EVENT_NEWSEGMENT:
|
||||
+#endif
|
||||
{
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ const GstSegment *newSegment;
|
||||
+#else
|
||||
gboolean update;
|
||||
gdouble rate;
|
||||
GstFormat format;
|
||||
gint64 start, stop, position;
|
||||
+#endif
|
||||
GstSegment *segment;
|
||||
|
||||
/* Store the segments so we can convert timestamps to stream time, which
|
||||
* is what the upper layers sync on.
|
||||
*/
|
||||
ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ gst_event_parse_segment(aEvent, &newSegment);
|
||||
+#else
|
||||
gst_event_parse_new_segment(aEvent, &update, &rate, &format,
|
||||
&start, &stop, &position);
|
||||
+#endif
|
||||
if (parent == GST_ELEMENT(mVideoAppSink))
|
||||
segment = &mVideoSegment;
|
||||
else
|
||||
segment = &mAudioSegment;
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ gst_segment_copy_into (newSegment, segment);
|
||||
+#else
|
||||
gst_segment_set_newsegment(segment, update, rate, format,
|
||||
start, stop, position);
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
/* Reset on seeks */
|
||||
ResetDecode();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gst_object_unref(parent);
|
||||
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ return GST_PAD_PROBE_OK;
|
||||
+#else
|
||||
return TRUE;
|
||||
+#endif
|
||||
}
|
||||
|
||||
GstFlowReturn GStreamerReader::NewPrerollCb(GstAppSink *aSink,
|
||||
gpointer aUserData)
|
||||
{
|
||||
GStreamerReader *reader = (GStreamerReader *) aUserData;
|
||||
|
||||
if (aSink == reader->mVideoAppSink)
|
||||
@@ -730,18 +869,22 @@ GstFlowReturn GStreamerReader::NewPrerol
|
||||
reader->AudioPreroll();
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
void GStreamerReader::AudioPreroll()
|
||||
{
|
||||
/* The first audio buffer has reached the audio sink. Get rate and channels */
|
||||
LOG(PR_LOG_DEBUG, ("Audio preroll"));
|
||||
- GstPad *sinkpad = gst_element_get_pad(GST_ELEMENT(mAudioAppSink), "sink");
|
||||
+ GstPad *sinkpad = gst_element_get_static_pad(GST_ELEMENT(mAudioAppSink), "sink");
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstCaps *caps = gst_pad_get_current_caps(sinkpad);
|
||||
+#else
|
||||
GstCaps *caps = gst_pad_get_negotiated_caps(sinkpad);
|
||||
+#endif
|
||||
GstStructure *s = gst_caps_get_structure(caps, 0);
|
||||
mInfo.mAudioRate = mInfo.mAudioChannels = 0;
|
||||
gst_structure_get_int(s, "rate", (gint *) &mInfo.mAudioRate);
|
||||
gst_structure_get_int(s, "channels", (gint *) &mInfo.mAudioChannels);
|
||||
NS_ASSERTION(mInfo.mAudioRate != 0, ("audio rate is zero"));
|
||||
NS_ASSERTION(mInfo.mAudioChannels != 0, ("audio channels is zero"));
|
||||
NS_ASSERTION(mInfo.mAudioChannels > 0 && mInfo.mAudioChannels <= MAX_CHANNELS,
|
||||
"invalid audio channels number");
|
||||
@@ -749,19 +892,29 @@ void GStreamerReader::AudioPreroll()
|
||||
gst_caps_unref(caps);
|
||||
gst_object_unref(sinkpad);
|
||||
}
|
||||
|
||||
void GStreamerReader::VideoPreroll()
|
||||
{
|
||||
/* The first video buffer has reached the video sink. Get width and height */
|
||||
LOG(PR_LOG_DEBUG, ("Video preroll"));
|
||||
- GstPad *sinkpad = gst_element_get_pad(GST_ELEMENT(mVideoAppSink), "sink");
|
||||
+ GstPad *sinkpad = gst_element_get_static_pad(GST_ELEMENT(mVideoAppSink), "sink");
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ GstCaps *caps = gst_pad_get_current_caps(sinkpad);
|
||||
+ GstVideoInfo info;
|
||||
+ memset (&info, 0, sizeof (info));
|
||||
+ gst_video_info_from_caps(&info, caps);
|
||||
+ mFormat = info.finfo->format;
|
||||
+ mPicture.width = info.width;
|
||||
+ mPicture.height = info.height;
|
||||
+#else
|
||||
GstCaps *caps = gst_pad_get_negotiated_caps(sinkpad);
|
||||
gst_video_format_parse_caps(caps, &mFormat, &mPicture.width, &mPicture.height);
|
||||
+#endif
|
||||
GstStructure *structure = gst_caps_get_structure(caps, 0);
|
||||
gst_structure_get_fraction(structure, "framerate", &fpsNum, &fpsDen);
|
||||
NS_ASSERTION(mPicture.width && mPicture.height, "invalid video resolution");
|
||||
mInfo.mDisplay = nsIntSize(mPicture.width, mPicture.height);
|
||||
mInfo.mHasVideo = true;
|
||||
gst_caps_unref(caps);
|
||||
gst_object_unref(sinkpad);
|
||||
}
|
||||
diff --git a/content/media/gstreamer/GStreamerReader.h b/content/media/gstreamer/GStreamerReader.h
|
||||
--- a/content/media/gstreamer/GStreamerReader.h
|
||||
+++ b/content/media/gstreamer/GStreamerReader.h
|
||||
@@ -71,18 +71,23 @@ private:
|
||||
|
||||
/* Called when a seek is issued on the pipeline */
|
||||
static gboolean SeekDataCb(GstAppSrc *aSrc,
|
||||
guint64 aOffset,
|
||||
gpointer aUserData);
|
||||
gboolean SeekData(GstAppSrc *aSrc, guint64 aOffset);
|
||||
|
||||
/* Called when events reach the sinks. See inline comments */
|
||||
+#if GST_VERSION_MAJOR == 1
|
||||
+ static GstPadProbeReturn EventProbeCb(GstPad *aPad, GstPadProbeInfo *aInfo, gpointer aUserData);
|
||||
+ GstPadProbeReturn EventProbe(GstPad *aPad, GstEvent *aEvent);
|
||||
+#else
|
||||
static gboolean EventProbeCb(GstPad *aPad, GstEvent *aEvent, gpointer aUserData);
|
||||
gboolean EventProbe(GstPad *aPad, GstEvent *aEvent);
|
||||
+#endif
|
||||
|
||||
/* Called when the pipeline is prerolled, that is when at start or after a
|
||||
* seek, the first audio and video buffers are queued in the sinks.
|
||||
*/
|
||||
static GstFlowReturn NewPrerollCb(GstAppSink *aSink, gpointer aUserData);
|
||||
void VideoPreroll();
|
||||
void AudioPreroll();
|
||||
|
@ -1,87 +1,93 @@
|
||||
From: Alessandro Decina <alessandro.d@gmail.com>
|
||||
# HG changeset patch
|
||||
# Parent 9fe99f8a584f2369a88bfb5281fd6bc95eb2593c
|
||||
Bug 760140 - Query the GstRegistry for the required demuxers/decoders from canPlayType
|
||||
|
||||
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
|
||||
@@ -143,16 +143,19 @@
|
||||
#include "xpcprivate.h" // nsXPConnect
|
||||
#include "nsScriptSecurityManager.h"
|
||||
#include "nsIChannelPolicy.h"
|
||||
#include "nsChannelPolicy.h"
|
||||
#include "nsIContentSecurityPolicy.h"
|
||||
#include "nsContentDLF.h"
|
||||
#ifdef MOZ_MEDIA
|
||||
#include "nsHTMLMediaElement.h"
|
||||
+#ifdef MOZ_GSTREAMER
|
||||
+#include "GStreamerDecoder.h"
|
||||
+#endif
|
||||
|
||||
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
|
||||
#include "nsDOMTouchEvent.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIObjectLoadingContent.h"
|
||||
#include "nsCCUncollectableMarker.h"
|
||||
#include "mozilla/Base64.h"
|
||||
#ifdef MOZ_GSTREAMER
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsDOMMutationObserver.h"
|
||||
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
|
||||
@@ -259,17 +259,19 @@ public:
|
||||
void UpdateMediaSize(nsIntSize size);
|
||||
+#include "GStreamerDecoder.h"
|
||||
+#include "nsXPCOMStrings.h"
|
||||
#endif
|
||||
#ifdef MOZ_WMF
|
||||
#include "WMFDecoder.h"
|
||||
#endif
|
||||
|
||||
// Returns the CanPlayStatus indicating if we can handle this
|
||||
// MIME type. The MIME type should not include the codecs parameter.
|
||||
// If it returns anything other than CANPLAY_NO then it also
|
||||
// returns a null-terminated list of supported codecs
|
||||
// in *aSupportedCodecs. This list should not be freed, it is static data.
|
||||
static CanPlayStatus CanHandleMediaType(const char* aMIMEType,
|
||||
- char const *const ** aSupportedCodecs);
|
||||
+ const char* aCodecs,
|
||||
+ char const *const ** aSupportedCodecs,
|
||||
+ bool* aCheckSupportedCodecs);
|
||||
namespace mozilla
|
||||
{
|
||||
|
||||
// Returns the CanPlayStatus indicating if we can handle the
|
||||
// full MIME type including the optional codecs parameter.
|
||||
static CanPlayStatus GetCanPlay(const nsAString& aType);
|
||||
@@ -137,48 +139,35 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns true if we should handle this MIME type when it appears
|
||||
// as an <object> or as a toplevel page. If, in practice, our support
|
||||
// for the type is more limited than appears in the wild, we should return
|
||||
@@ -292,18 +294,16 @@ public:
|
||||
#ifdef MOZ_WEBM
|
||||
static bool IsWebMType(const nsACString& aType);
|
||||
static const char gWebMTypes[2][11];
|
||||
static char const *const gWebMCodecs[4];
|
||||
return CodecListContains(gWebMTypes, aType);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
static bool IsGStreamerSupportedType(const nsACString& aType);
|
||||
- static bool IsH264Type(const nsACString& aType);
|
||||
- static const char gH264Types[3][16];
|
||||
-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 bool IsOmxSupportedType(const nsACString& aType);
|
||||
static const char gOmxTypes[5][16];
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK)
|
||||
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
|
||||
@@ -2213,50 +2213,29 @@ nsHTMLMediaElement::IsWebMType(const nsA
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
|
||||
return CodecListContains(gOmxTypes, aType);
|
||||
}
|
||||
-#endif
|
||||
|
||||
-#if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK)
|
||||
+#ifdef MOZ_WIDGET_GONK
|
||||
char const *const nsHTMLMediaElement::gH264Codecs[9] = {
|
||||
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
|
||||
@ -89,233 +95,73 @@ diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/cont
|
||||
"avc1.64001E", // H.264 High Profile Level 3.0
|
||||
"avc1.64001F", // H.264 High Profile Level 3.1
|
||||
"mp4v.20.3", // 3GPP
|
||||
"mp4a.40.2", // AAC-LC
|
||||
nullptr
|
||||
};
|
||||
-#endif
|
||||
-
|
||||
-#ifdef MOZ_GSTREAMER
|
||||
-const char nsHTMLMediaElement::gH264Types[3][16] = {
|
||||
- "video/mp4",
|
||||
- "video/3gpp",
|
||||
- "video/quicktime",
|
||||
-};
|
||||
-
|
||||
-bool
|
||||
-nsHTMLMediaElement::IsH264Type(const nsACString& aType)
|
||||
-{
|
||||
- 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",
|
||||
"video/mp4",
|
||||
"video/3gpp",
|
||||
"video/quicktime",
|
||||
};
|
||||
|
||||
@@ -2319,18 +2298,22 @@ nsHTMLMediaElement::IsDASHMPDType(const
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* static */
|
||||
nsHTMLMediaElement::CanPlayStatus
|
||||
nsHTMLMediaElement::CanHandleMediaType(const char* aMIMEType,
|
||||
- char const *const ** aCodecList)
|
||||
+ const char *aCodecs,
|
||||
+ char const *const ** aCodecList,
|
||||
+ bool* aCheckCodecList)
|
||||
{
|
||||
+ if (aCheckCodecList)
|
||||
+ *aCheckCodecList = true;
|
||||
#ifdef MOZ_RAW
|
||||
if (IsRawType(nsDependentCString(aMIMEType))) {
|
||||
*aCodecList = gRawCodecs;
|
||||
return CANPLAY_MAYBE;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_OGG
|
||||
if (IsOggType(nsDependentCString(aMIMEType))) {
|
||||
@@ -2354,20 +2337,22 @@ nsHTMLMediaElement::CanHandleMediaType(c
|
||||
@@ -303,19 +290,19 @@
|
||||
#ifdef MOZ_DASH
|
||||
if (IsDASHMPDType(nsDependentCString(aMIMEType))) {
|
||||
// DASH manifest uses WebM codecs only.
|
||||
*aCodecList = gWebMCodecs;
|
||||
return CANPLAY_YES;
|
||||
codecList = gWebMCodecs;
|
||||
result = CANPLAY_YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
- if (IsH264Type(nsDependentCString(aMIMEType))) {
|
||||
- *aCodecList = gH264Codecs;
|
||||
- return CANPLAY_MAYBE;
|
||||
- }
|
||||
+ if (aCheckCodecList)
|
||||
+ *aCheckCodecList = false;
|
||||
+ if (aCodecList)
|
||||
+ *aCodecList = nullptr;
|
||||
+ if (GStreamerDecoder::CanHandleMediaType(aMIMEType, aCodecs))
|
||||
- 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))) {
|
||||
*aCodecList = gH264Codecs;
|
||||
return CANPLAY_MAYBE;
|
||||
codecList = gH264Codecs;
|
||||
result = CANPLAY_MAYBE;
|
||||
}
|
||||
#endif
|
||||
@@ -324,17 +311,17 @@
|
||||
result = CANPLAY_MAYBE;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
@@ -2388,17 +2373,17 @@ bool nsHTMLMediaElement::ShouldHandleMed
|
||||
if (IsOggType(nsDependentCString(aMIMEType)))
|
||||
return true;
|
||||
if (MediaDecoder::IsMediaPluginsEnabled() &&
|
||||
GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), &codecList))
|
||||
result = CANPLAY_MAYBE;
|
||||
#endif
|
||||
#ifdef MOZ_WEBM
|
||||
if (IsWebMType(nsDependentCString(aMIMEType)))
|
||||
return true;
|
||||
#endif
|
||||
#ifdef MOZ_GSTREAMER
|
||||
- if (IsH264Type(nsDependentCString(aMIMEType)))
|
||||
+ if (GStreamerDecoder::CanHandleMediaType(aMIMEType, nullptr))
|
||||
return true;
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (IsOmxSupportedType(nsDependentCString(aMIMEType))) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_MEDIA_PLUGINS
|
||||
@@ -2429,26 +2414,31 @@ nsHTMLMediaElement::GetCanPlay(const nsA
|
||||
{
|
||||
nsContentTypeParser parser(aType);
|
||||
nsAutoString mimeType;
|
||||
nsresult rv = parser.GetType(mimeType);
|
||||
if (NS_FAILED(rv))
|
||||
return CANPLAY_NO;
|
||||
|
||||
NS_ConvertUTF16toUTF8 mimeTypeUTF8(mimeType);
|
||||
+ nsAutoString codecs;
|
||||
+ rv = parser.GetParameter("codecs", codecs);
|
||||
+ NS_ConvertUTF16toUTF8 codecsUTF8(codecs);
|
||||
char const *const * supportedCodecs;
|
||||
+ bool checkSupportedCodecs = true;
|
||||
CanPlayStatus status = CanHandleMediaType(mimeTypeUTF8.get(),
|
||||
- &supportedCodecs);
|
||||
+ codecsUTF8.get(),
|
||||
+ &supportedCodecs,
|
||||
+ &checkSupportedCodecs);
|
||||
if (status == CANPLAY_NO)
|
||||
return CANPLAY_NO;
|
||||
|
||||
- nsAutoString codecs;
|
||||
- rv = parser.GetParameter("codecs", codecs);
|
||||
- if (NS_FAILED(rv)) {
|
||||
- // Parameter not found or whatever
|
||||
+ if (codecs.IsEmpty() || !checkSupportedCodecs) {
|
||||
+ /* no codecs to check for or they were already checked in CanHandleMediaType
|
||||
+ * above */
|
||||
return status;
|
||||
- if (result == CANPLAY_NO || !aHaveRequestedCodecs) {
|
||||
+ if (result == CANPLAY_NO || !aHaveRequestedCodecs || !codecList) {
|
||||
return result;
|
||||
}
|
||||
|
||||
CanPlayStatus result = CANPLAY_YES;
|
||||
// See http://www.rfc-editor.org/rfc/rfc4281.txt for the description
|
||||
// of the 'codecs' parameter
|
||||
nsCharSeparatedTokenizer tokenizer(codecs, ',');
|
||||
nsCharSeparatedTokenizer tokenizer(aRequestedCodecs, ',');
|
||||
bool expectMoreTokens = false;
|
||||
@@ -2487,43 +2477,39 @@ nsHTMLMediaElement::CanPlayType(const ns
|
||||
}
|
||||
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
|
||||
bool
|
||||
nsHTMLMediaElement::IsGStreamerSupportedType(const nsACString& aMimeType)
|
||||
{
|
||||
if (!MediaDecoder::IsGStreamerEnabled())
|
||||
return false;
|
||||
- if (IsH264Type(aMimeType))
|
||||
+
|
||||
+ const char *type;
|
||||
+ NS_CStringGetData(aMimeType, &type, nullptr);
|
||||
+ if (GStreamerDecoder::CanHandleMediaType(type, 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;
|
||||
}
|
||||
static bool IsGStreamerSupportedType(const nsACString& aType);
|
||||
- static bool IsH264Type(const nsACString& aType);
|
||||
#endif
|
||||
|
||||
already_AddRefed<MediaDecoder>
|
||||
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<GStreamerDecoder> decoder = new GStreamerDecoder();
|
||||
- if (decoder->Init(this)) {
|
||||
- return decoder.forget();
|
||||
+ if (!Preferences::GetBool("media.prefer-gstreamer", false)) {
|
||||
+ if (IsGStreamerSupportedType(aType)) {
|
||||
+ nsRefPtr<GStreamerDecoder> decoder = new GStreamerDecoder();
|
||||
+ if (decoder->Init(this)) {
|
||||
+ return decoder.forget();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
static bool IsOmxSupportedType(const nsACString& aType);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_RAW
|
||||
if (IsRawType(aType)) {
|
||||
nsRefPtr<RawDecoder> decoder = new RawDecoder();
|
||||
if (decoder->Init(this)) {
|
||||
@@ -2576,16 +2562,26 @@ nsHTMLMediaElement::CreateDecoder(const
|
||||
if (IsDASHMPDType(aType)) {
|
||||
nsRefPtr<DASHDecoder> decoder = new DASHDecoder();
|
||||
if (decoder->Init(this)) {
|
||||
return decoder.forget();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef MOZ_GSTREAMER
|
||||
+ // use GStreamer as fallback if not preferred
|
||||
+ if (IsGStreamerSupportedType(aType)) {
|
||||
+ nsRefPtr<GStreamerDecoder> decoder = new GStreamerDecoder();
|
||||
+ if (decoder->Init(this)) {
|
||||
+ return decoder.forget();
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsresult nsHTMLMediaElement::InitializeDecoderAsClone(MediaDecoder* aOriginal)
|
||||
{
|
||||
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
|
||||
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
|
||||
|
||||
#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,23 @@
|
||||
@@ -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,
|
||||
@ -324,7 +170,7 @@ diff --git a/content/media/gstreamer/GStreamerDecoder.cpp b/content/media/gstrea
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
#include "GStreamerReader.h"
|
||||
#include "GStreamerDecoder.h"
|
||||
+#include "nsGStreamerFormatHelper.h"
|
||||
+#include "GStreamerFormatHelper.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -333,16 +179,28 @@ diff --git a/content/media/gstreamer/GStreamerDecoder.cpp b/content/media/gstrea
|
||||
return new MediaDecoderStateMachine(this, new GStreamerReader(this));
|
||||
}
|
||||
|
||||
+bool GStreamerDecoder::CanHandleMediaType(const char* aMIMEType,
|
||||
+ const char* aCodecs) {
|
||||
+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
|
||||
@@ -11,13 +11,14 @@
|
||||
@@ -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 {
|
||||
|
||||
@ -351,45 +209,24 @@ diff --git a/content/media/gstreamer/GStreamerDecoder.h b/content/media/gstreame
|
||||
public:
|
||||
virtual MediaDecoder* Clone() { return new GStreamerDecoder(); }
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine();
|
||||
+ static bool CanHandleMediaType(const char* aMIMEType, const char* aCodecs);
|
||||
+ static bool CanHandleMediaType(const nsACString& aMIMEType, const nsAString* aCodecs);
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#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
|
||||
@@ -17,16 +17,17 @@ LIBXUL_LIBRARY = 1
|
||||
|
||||
EXPORTS += \
|
||||
GStreamerDecoder.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
GStreamerReader.cpp \
|
||||
GStreamerDecoder.cpp \
|
||||
+ nsGStreamerFormatHelper.cpp \
|
||||
$(NULL)
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CFLAGS += $(GSTREAMER_CFLAGS)
|
||||
CXXFLAGS += $(GSTREAMER_CFLAGS)
|
||||
diff --git a/content/media/gstreamer/nsGStreamerFormatHelper.cpp b/content/media/gstreamer/nsGStreamerFormatHelper.cpp
|
||||
diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/content/media/gstreamer/nsGStreamerFormatHelper.cpp
|
||||
@@ -0,0 +1,149 @@
|
||||
+++ 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 "nsGStreamerFormatHelper.h"
|
||||
+#include "GStreamerFormatHelper.h"
|
||||
+#include "nsCharSeparatedTokenizer.h"
|
||||
+#include "nsXPCOMStrings.h"
|
||||
+
|
||||
@ -407,27 +244,35 @@ new file mode 100644
|
||||
+ return gInstance;
|
||||
+}
|
||||
+
|
||||
+GStreamerFormatHelper::GStreamerFormatHelper()
|
||||
+ : mFactories(nullptr),
|
||||
+ mCookie(0)
|
||||
+{
|
||||
+ const char *containers[3][2] = {
|
||||
+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"},
|
||||
+};
|
||||
+ memcpy(mContainers, containers, sizeof(containers));
|
||||
+
|
||||
+ const char *codecs[7][2] = {
|
||||
+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"},
|
||||
+ {"mp3", "audio/mpeg, mpegversion=(int)1"},
|
||||
+};
|
||||
+ memcpy(mCodecs, codecs, sizeof(codecs));
|
||||
+
|
||||
+GStreamerFormatHelper::GStreamerFormatHelper()
|
||||
+ : mFactories(nullptr),
|
||||
+ mCookie(static_cast<uint32_t>(-1))
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+GStreamerFormatHelper::~GStreamerFormatHelper() {
|
||||
@ -435,9 +280,12 @@ new file mode 100644
|
||||
+ g_list_free(mFactories);
|
||||
+}
|
||||
+
|
||||
+bool GStreamerFormatHelper::CanHandleMediaType(const char* aMIMEType,
|
||||
+ const char *aCodecs) {
|
||||
+ GstCaps *caps = ConvertFormatsToCaps(aMIMEType, aCodecs);
|
||||
+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;
|
||||
+ }
|
||||
@ -449,7 +297,7 @@ new file mode 100644
|
||||
+}
|
||||
+
|
||||
+GstCaps* GStreamerFormatHelper::ConvertFormatsToCaps(const char* aMIMEType,
|
||||
+ const char *aCodecs) {
|
||||
+ const nsAString* aCodecs) {
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ /* convert aMIMEType to gst container caps */
|
||||
@ -472,14 +320,13 @@ new file mode 100644
|
||||
+ return caps;
|
||||
+ }
|
||||
+
|
||||
+ nsDependentCSubstring codecs(aCodecs, strlen(aCodecs));
|
||||
+ nsCCharSeparatedTokenizer tokenizer(codecs, ',');
|
||||
+ nsCharSeparatedTokenizer tokenizer(*aCodecs, ',');
|
||||
+ while (tokenizer.hasMoreTokens()) {
|
||||
+ const nsCSubstring& codec = tokenizer.nextToken();
|
||||
+ const nsSubstring& codec = tokenizer.nextToken();
|
||||
+ capsString = nullptr;
|
||||
+
|
||||
+ for (i = 0; i < G_N_ELEMENTS(mCodecs); i++) {
|
||||
+ if (codec.Equals(ENTRY_FORMAT(mCodecs[i]))) {
|
||||
+ if (codec.EqualsASCII(ENTRY_FORMAT(mCodecs[i]))) {
|
||||
+ capsString = ENTRY_CAPS(mCodecs[i]);
|
||||
+ break;
|
||||
+ }
|
||||
@ -532,45 +379,164 @@ new file mode 100644
|
||||
+
|
||||
+ return mFactories;
|
||||
+}
|
||||
diff --git a/content/media/gstreamer/nsGStreamerFormatHelper.h b/content/media/gstreamer/nsGStreamerFormatHelper.h
|
||||
diff --git a/content/media/gstreamer/GStreamerFormatHelper.h b/content/media/gstreamer/GStreamerFormatHelper.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/content/media/gstreamer/nsGStreamerFormatHelper.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+++ 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(nsGStreamerFormatHelper_h_)
|
||||
+#define nsGStreamerFormatHelper_h_
|
||||
+#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 char *aMIMEType,
|
||||
+ const char *aCodecs);
|
||||
+ bool CanHandleMediaType(const nsACString& aMIMEType,
|
||||
+ const nsAString* aCodecs);
|
||||
+
|
||||
+ static void Shutdown();
|
||||
+
|
||||
+ private:
|
||||
+ GStreamerFormatHelper();
|
||||
+ GstCaps* ConvertFormatsToCaps(const char* aMIMEType,
|
||||
+ const char *aCodecs);
|
||||
+ const nsAString* aCodecs);
|
||||
+ char* const *CodecListFromCaps(GstCaps* aCaps);
|
||||
+ bool HaveElementsToProcessCaps(GstCaps* aCaps);
|
||||
+ GList* GetFactories();
|
||||
+
|
||||
+ static GStreamerFormatHelper* gInstance;
|
||||
+
|
||||
+ const char *mContainers[3][2];
|
||||
+ const char *mCodecs[7][2];
|
||||
+ /* 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
|
||||
|
||||
|
@ -7,7 +7,7 @@ Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
|
||||
diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
|
||||
--- a/modules/libpref/src/Makefile.in
|
||||
+++ b/modules/libpref/src/Makefile.in
|
||||
@@ -45,14 +45,16 @@ GREPREF_FILES = $(topsrcdir)/netwerk/bas
|
||||
@@ -54,14 +54,15 @@ endif
|
||||
# Optimizer bug with GCC 3.2.2 on OS/2
|
||||
ifeq ($(OS_ARCH), OS2)
|
||||
nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
|
||||
@ -17,9 +17,8 @@ diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
|
||||
endif
|
||||
|
||||
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
||||
+
|
||||
|
||||
greprefs.js: $(GREPREF_FILES)
|
||||
greprefs.js: $(grepref_files)
|
||||
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@
|
||||
|
||||
libs:: greprefs.js
|
||||
@ -39,13 +38,13 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
|
||||
+#include "nsKDEUtils.h"
|
||||
|
||||
#include "nsQuickSort.h"
|
||||
#include "prmem.h"
|
||||
#include "pldhash.h"
|
||||
|
||||
#include "prefapi.h"
|
||||
#include "prefread.h"
|
||||
#include "prefapi_private_data.h"
|
||||
@@ -950,16 +951,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
|
||||
|
||||
@@ -946,16 +947,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
|
||||
|
||||
static nsresult pref_LoadPrefsInDirList(const char *listId)
|
||||
{
|
||||
@ -80,7 +79,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
|
||||
return NS_OK;
|
||||
|
||||
bool hasMore;
|
||||
@@ -975,17 +994,17 @@ static nsresult pref_LoadPrefsInDirList(
|
||||
@@ -971,17 +990,17 @@ static nsresult pref_LoadPrefsInDirList(
|
||||
|
||||
nsAutoCString leaf;
|
||||
path->GetNativeLeafName(leaf);
|
||||
@ -99,7 +98,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
|
||||
{
|
||||
nsZipItemPtr<char> manifest(jarReader, name, true);
|
||||
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
|
||||
@@ -1079,28 +1098,40 @@ static nsresult pref_InitInitialObjects(
|
||||
@@ -1075,28 +1094,40 @@ static nsresult pref_InitInitialObjects(
|
||||
/* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
|
||||
static const char* specialFiles[] = {
|
||||
#if defined(XP_MACOSX)
|
||||
@ -180,7 +179,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
@@ -2740,16 +2744,25 @@ nsDownload::SetState(DownloadState aStat
|
||||
@@ -2739,16 +2743,25 @@ nsDownload::SetState(DownloadState aStat
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
|
||||
// Master pref to control this function.
|
||||
@ -207,14 +206,14 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
|
||||
showTaskbarAlert = goat > alertIntervalUSec;
|
||||
|
||||
@@ -2775,19 +2788,20 @@ nsDownload::SetState(DownloadState aStat
|
||||
// If downloads are automatically removed per the user's
|
||||
// retention policy, there's no reason to make the text clickable
|
||||
// because if it is, they'll click open the download manager and
|
||||
// the items they downloaded will have been removed.
|
||||
alerts->ShowAlertNotification(
|
||||
NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
|
||||
message, !removeWhenDone, EmptyString(), mDownloadManager,
|
||||
EmptyString());
|
||||
message, !removeWhenDone,
|
||||
mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
|
||||
mDownloadManager, EmptyString());
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
@ -1366,7 +1365,7 @@ new file mode 100644
|
||||
+ if (this.lastSelected) {
|
||||
+ lastPane = document.getElementById(this.lastSelected);
|
||||
+ if (!lastPane) {
|
||||
+ this.lastSelected = null;
|
||||
+ this.lastSelected = "";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -7,7 +7,7 @@ References:
|
||||
diff --git a/configure.in b/configure.in
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -8108,16 +8108,31 @@ AC_SUBST(QCMS_LIBS)
|
||||
@@ -8275,16 +8275,31 @@ AC_SUBST(QCMS_LIBS)
|
||||
|
||||
dnl ========================================================
|
||||
dnl HarfBuzz
|
||||
@ -42,7 +42,7 @@ diff --git a/configure.in b/configure.in
|
||||
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
|
||||
--- a/security/manager/ssl/src/Makefile.in
|
||||
+++ b/security/manager/ssl/src/Makefile.in
|
||||
@@ -93,10 +93,13 @@ DEFINES += \
|
||||
@@ -92,16 +92,19 @@ DEFINES += \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS += \
|
||||
@ -54,6 +54,12 @@ diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Mak
|
||||
+LOCAL_INCLUDES += $(NSSHELPER_CFLAGS)
|
||||
+EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS)
|
||||
+
|
||||
EXPORTS_NAMESPACES = mozilla
|
||||
|
||||
EXPORTS_mozilla += \
|
||||
PublicSSL.h \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
|
||||
@ -83,7 +89,7 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsDirectoryService.h"
|
||||
@@ -1735,18 +1742,34 @@ nsNSSComponent::InitializeNSS(bool showW
|
||||
@@ -1682,18 +1689,34 @@ nsNSSComponent::InitializeNSS(bool showW
|
||||
ConfigureInternalPKCS11Token();
|
||||
|
||||
// The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
|
||||
@ -123,7 +129,7 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
|
||||
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
|
||||
--- a/toolkit/library/Makefile.in
|
||||
+++ b/toolkit/library/Makefile.in
|
||||
@@ -484,17 +484,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
|
||||
@@ -500,17 +500,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -1,102 +0,0 @@
|
||||
Submitted-by: schwab@@linux-m68k.org
|
||||
Subject: fix PPC build
|
||||
References: (not delivered with the patch but apparently mix of:)
|
||||
Bug 750869 - Support WebRTC for Android in our build system (TM:20)
|
||||
Bug 814693 - Build failure on Debian powerpc (TM:20)
|
||||
|
||||
diff --git a/media/webrtc/shared_libs.mk b/media/webrtc/shared_libs.mk
|
||||
--- a/media/webrtc/shared_libs.mk
|
||||
+++ b/media/webrtc/shared_libs.mk
|
||||
@@ -23,33 +23,39 @@ WEBRTC_LIBS = \
|
||||
$(call EXPAND_LIBNAME_PATH,video_render_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_render_module) \
|
||||
$(call EXPAND_LIBNAME_PATH,video_engine_core,$(DEPTH)/media/webrtc/trunk/src/video_engine/video_engine_video_engine_core) \
|
||||
$(call EXPAND_LIBNAME_PATH,media_file,$(DEPTH)/media/webrtc/trunk/src/modules/modules_media_file) \
|
||||
$(call EXPAND_LIBNAME_PATH,rtp_rtcp,$(DEPTH)/media/webrtc/trunk/src/modules/modules_rtp_rtcp) \
|
||||
$(call EXPAND_LIBNAME_PATH,udp_transport,$(DEPTH)/media/webrtc/trunk/src/modules/modules_udp_transport) \
|
||||
$(call EXPAND_LIBNAME_PATH,bitrate_controller,$(DEPTH)/media/webrtc/trunk/src/modules/modules_bitrate_controller) \
|
||||
$(call EXPAND_LIBNAME_PATH,remote_bitrate_estimator,$(DEPTH)/media/webrtc/trunk/src/modules/modules_remote_bitrate_estimator) \
|
||||
$(call EXPAND_LIBNAME_PATH,video_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing) \
|
||||
- $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \
|
||||
$(call EXPAND_LIBNAME_PATH,voice_engine_core,$(DEPTH)/media/webrtc/trunk/src/voice_engine/voice_engine_voice_engine_core) \
|
||||
$(call EXPAND_LIBNAME_PATH,audio_conference_mixer,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_conference_mixer) \
|
||||
$(call EXPAND_LIBNAME_PATH,audio_device,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_device) \
|
||||
$(call EXPAND_LIBNAME_PATH,audio_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_processing) \
|
||||
$(call EXPAND_LIBNAME_PATH,aec,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec) \
|
||||
- $(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \
|
||||
$(call EXPAND_LIBNAME_PATH,apm_util,$(DEPTH)/media/webrtc/trunk/src/modules/modules_apm_util) \
|
||||
$(call EXPAND_LIBNAME_PATH,aecm,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aecm) \
|
||||
$(call EXPAND_LIBNAME_PATH,agc,$(DEPTH)/media/webrtc/trunk/src/modules/modules_agc) \
|
||||
$(call EXPAND_LIBNAME_PATH,ns,$(DEPTH)/media/webrtc/trunk/src/modules/modules_ns) \
|
||||
$(call EXPAND_LIBNAME_PATH,yuv,$(DEPTH)/media/webrtc/trunk/third_party/libyuv/libyuv_libyuv) \
|
||||
$(call EXPAND_LIBNAME_PATH,webrtc_jpeg,$(DEPTH)/media/webrtc/trunk/src/common_video/common_video_webrtc_jpeg) \
|
||||
$(call EXPAND_LIBNAME_PATH,nicer,$(DEPTH)/media/mtransport/third_party/nICEr/nicer_nicer) \
|
||||
$(call EXPAND_LIBNAME_PATH,nrappkit,$(DEPTH)/media/mtransport/third_party/nrappkit/nrappkit_nrappkit) \
|
||||
$(NULL)
|
||||
|
||||
+# if we're on an intel arch, we want SSE2 optimizations
|
||||
+ifneq (,$(INTEL_ARCHITECTURE))
|
||||
+WEBRTC_LIBS += \
|
||||
+ $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \
|
||||
+ $(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \
|
||||
+ $(NULL)
|
||||
+endif
|
||||
+
|
||||
# If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the
|
||||
# relevant library from this list:
|
||||
#
|
||||
# $(call EXPAND_LIBNAME_PATH,G722,$(DEPTH)/media/webrtc/trunk/src/modules/modules_G722) \
|
||||
# $(call EXPAND_LIBNAME_PATH,iLBC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iLBC) \
|
||||
# $(call EXPAND_LIBNAME_PATH,iSAC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSAC) \
|
||||
# $(call EXPAND_LIBNAME_PATH,iSACFix,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSACFix) \
|
||||
#
|
||||
diff --git a/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi b/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi
|
||||
--- a/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi
|
||||
+++ b/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi
|
||||
@@ -6,16 +6,19 @@
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'PCM16B',
|
||||
'type': '<(library)',
|
||||
+ 'dependencies': [
|
||||
+ '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing',
|
||||
+ ],
|
||||
'include_dirs': [
|
||||
'include',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'include',
|
||||
],
|
||||
},
|
||||
diff --git a/media/webrtc/trunk/src/typedefs.h b/media/webrtc/trunk/src/typedefs.h
|
||||
--- a/media/webrtc/trunk/src/typedefs.h
|
||||
+++ b/media/webrtc/trunk/src/typedefs.h
|
||||
@@ -52,16 +52,24 @@
|
||||
//#define WEBRTC_ARCH_ARMEL
|
||||
#define WEBRTC_ARCH_32_BITS
|
||||
#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
#define WEBRTC_LITTLE_ENDIAN
|
||||
#elif defined(__MIPSEL__)
|
||||
#define WEBRTC_ARCH_32_BITS
|
||||
#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
#define WEBRTC_LITTLE_ENDIAN
|
||||
+#elif defined(__powerpc__)
|
||||
+#if defined(__powerpc64__)
|
||||
+#define WEBRTC_ARCH_64_BITS
|
||||
+#else
|
||||
+#define WEBRTC_ARCH_32_BITS
|
||||
+#endif
|
||||
+#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
+#define WEBRTC_BIG_ENDIAN
|
||||
#else
|
||||
#error Please add support for your architecture in typedefs.h
|
||||
#endif
|
||||
|
||||
#if defined(__SSE2__) || defined(_MSC_VER)
|
||||
#define WEBRTC_USE_SSE2
|
||||
#endif
|
||||
|
@ -1,2 +1,2 @@
|
||||
REV=6ffe3e9da8a8
|
||||
REV=c90d44bfa96c
|
||||
REPO=http://hg.mozilla.org/releases/mozilla-release
|
||||
|
Loading…
Reference in New Issue
Block a user