firefox-15.0 added

This commit is contained in:
Kolan Sh 2012-09-02 12:34:37 +04:00
parent 651dbf248c
commit f5a278bd7d
5 changed files with 148 additions and 0 deletions

View File

@ -0,0 +1,70 @@
diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h
--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:37:25.791017257 +0530
+++ mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:38:22.259014896 +0530
@@ -305,8 +305,10 @@ public:
#ifdef MOZ_GSTREAMER
static bool IsH264Enabled();
static bool IsH264Type(const nsACString& aType);
+ static bool IsSupportedAudioType(const nsACString& aType);
static const char gH264Types[3][17];
static char const *const gH264Codecs[6];
+ static const char gSupportedAudioTypes[2][11];
#endif
/**
diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp
--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:37:25.834017256 +0530
+++ mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:40:04.358010627 +0530
@@ -1865,6 +1865,11 @@ char const *const nsHTMLMediaElement::gH
nsnull
};
+const char nsHTMLMediaElement::gSupportedAudioTypes[2][11] = {
+ "audio/mp4",
+ "audio/mpeg",
+};
+
bool
nsHTMLMediaElement::IsH264Enabled()
{
@@ -1886,6 +1891,18 @@ nsHTMLMediaElement::IsH264Type(const nsA
return false;
}
+
+bool
+nsHTMLMediaElement::IsSupportedAudioType(const nsACString& aType)
+{
+ for (PRUint32 i = 0; i < ArrayLength(gSupportedAudioTypes); ++i) {
+ if (aType.EqualsASCII(gSupportedAudioTypes[i])) {
+ return true;
+ }
+ }
+
+ return false;
+}
#endif
/* static */
@@ -1919,6 +1936,11 @@ nsHTMLMediaElement::CanHandleMediaType(c
#endif
#ifdef MOZ_GSTREAMER
+ if (IsSupportedAudioType(nsDependentCString(aMIMEType))) {
+ *aCodecList = NULL;
+ return CANPLAY_MAYBE;
+ }
+
if (IsH264Type(nsDependentCString(aMIMEType))) {
*aCodecList = gH264Codecs;
return CANPLAY_YES;
@@ -1992,7 +2014,8 @@ nsHTMLMediaElement::GetCanPlay(const nsA
while (tokenizer.hasMoreTokens()) {
const nsSubstring& token = tokenizer.nextToken();
- if (!CodecListContains(supportedCodecs, token)) {
+ if (supportedCodecs == NULL ||
+ !CodecListContains(supportedCodecs, token)) {
// Totally unsupported codec
return CANPLAY_NO;
}

View File

@ -0,0 +1,26 @@
diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h
--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:48:14.664990120 +0530
+++ mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:48:43.970988893 +0530
@@ -307,7 +307,7 @@ public:
static bool IsH264Type(const nsACString& aType);
static bool IsSupportedAudioType(const nsACString& aType);
static const char gH264Types[3][17];
- static char const *const gH264Codecs[6];
+ static char const *const gH264Codecs[7];
static const char gSupportedAudioTypes[2][11];
#endif
diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp
--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:48:14.667990120 +0530
+++ mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:49:18.261987460 +0530
@@ -1856,8 +1856,9 @@ const char nsHTMLMediaElement::gH264Type
"video/quicktime",
};
-char const *const nsHTMLMediaElement::gH264Codecs[6] = {
+char const *const nsHTMLMediaElement::gH264Codecs[7] = {
"avc1.42E01E",
+ "avc1.42001E",
"avc1.58A01E",
"avc1.4D401E",
"avc1.64001E",

View File

@ -0,0 +1,26 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=761030
Went into Fx 16, but not 15
diff -r 07d362aa2c1b content/media/gstreamer/nsGStreamerReader.cpp
--- a/content/media/gstreamer/nsGStreamerReader.cpp Sun Jun 03 12:04:40 2012 -0700
+++ b/content/media/gstreamer/nsGStreamerReader.cpp Sun Jun 03 14:37:55 2012 -0700
@@ -447,16 +447,18 @@ bool nsGStreamerReader::DecodeVideoFrame
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;
}
bool isKeyframe = !GST_BUFFER_FLAG_IS_SET(buffer,
GST_BUFFER_FLAG_DELTA_UNIT);
/* XXX ? */
PRInt64 offset = 0;
VideoData *video = VideoData::Create(mInfo,
mDecoder->GetImageContainer(),

View File

@ -0,0 +1,17 @@
pref("app.update.enabled", false);
pref("app.update.autoInstallEnabled", false);
pref("browser.display.use_system_colors", true);
pref("browser.link.open_external", 3);
pref("general.smoothScroll", true);
pref("general.autoScroll", false);
pref("browser.tabs.tabMinWidth", 15);
pref("browser.backspace_action", 0);
pref("browser.urlbar.hideGoButton", true);
pref("accessibility.typeaheadfind", true);
pref("browser.shell.checkDefaultBrowser", false);
pref("browser.EULA.override", true);
pref("general.useragent.vendor", "Gentoo");
pref("intl.locale.matchOS", true);
pref("general.useragent.locale", "chrome://global/locale/intl.properties");
pref("extensions.autoDisableScopes", 0);
pref("layout.css.dpi", 0);

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=@NAME@
Comment=Web Browser
Exec=firefox %U
Icon=@ICON@
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;
Categories=Network;WebBrowser;