Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update patches from esr38
  • Loading branch information
rainemak committed Feb 26, 2019
1 parent ed777c7 commit 7bf5ab8
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 108 deletions.
62 changes: 41 additions & 21 deletions rpm/0001-Supply-source-uri-to-gstreamer-pipeline.patch
@@ -1,23 +1,26 @@
From 18fcd34edd565be0a0b59e7191481e1c96d22471 Mon Sep 17 00:00:00 2001
From ed7d627063ded032ea0efc1147d779b907c519b5 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:10:46 +0300
Subject: [PATCH 01/11] Supply source uri to gstreamer pipeline
Subject: [PATCH 01/15] Supply source uri to gstreamer pipeline

Backported SHA1 aae344839920dd17bddfd0ef822cc5bc36ea2d9f
from esr38.

See bug JB19511

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
dom/media/gstreamer/GStreamerFormatHelper.cpp | 9 +++-
dom/media/gstreamer/GStreamerFunctionList.h | 8 +++
dom/media/gstreamer/GStreamerLoader.cpp | 6 ++-
dom/media/gstreamer/GStreamerReader.cpp | 57 ++++++++++++++++++++++
dom/media/gstreamer/GStreamerReader.h | 11 +++++
netwerk/mime/nsMimeTypes.h | 1 +
toolkit/components/mediasniffer/nsMediaSniffer.cpp | 4 +-
7 files changed, 92 insertions(+), 4 deletions(-)
dom/media/gstreamer/GStreamerFormatHelper.cpp | 9 ++-
dom/media/gstreamer/GStreamerFunctionList.h | 8 +++
dom/media/gstreamer/GStreamerLoader.cpp | 6 +-
dom/media/gstreamer/GStreamerReader.cpp | 60 ++++++++++++++++++-
dom/media/gstreamer/GStreamerReader.h | 11 ++++
netwerk/mime/nsMimeTypes.h | 1 +
.../mediasniffer/nsMediaSniffer.cpp | 4 +-
7 files changed, 94 insertions(+), 5 deletions(-)

diff --git a/dom/media/gstreamer/GStreamerFormatHelper.cpp b/dom/media/gstreamer/GStreamerFormatHelper.cpp
index fd545ac..64a097c 100644
index fd545ac7ea96..64a097c8239c 100644
--- a/dom/media/gstreamer/GStreamerFormatHelper.cpp
+++ b/dom/media/gstreamer/GStreamerFormatHelper.cpp
@@ -48,6 +48,10 @@ static char const *const sContainers[][2] = {
Expand All @@ -44,7 +47,7 @@ index fd545ac..64a097c 100644

static char const * const sPluginBlockList[] = {
diff --git a/dom/media/gstreamer/GStreamerFunctionList.h b/dom/media/gstreamer/GStreamerFunctionList.h
index 75f352e..827e610 100644
index 75f352ec0dec..827e61086e6f 100644
--- a/dom/media/gstreamer/GStreamerFunctionList.h
+++ b/dom/media/gstreamer/GStreamerFunctionList.h
@@ -18,6 +18,7 @@ GST_FUNC(LIBGSTAPP, gst_app_src_set_callbacks)
Expand Down Expand Up @@ -96,7 +99,7 @@ index 75f352e..827e610 100644
GST_FUNC(LIBGSTREAMER, gst_query_add_allocation_param)
GST_FUNC(LIBGSTREAMER, gst_query_add_allocation_pool)
diff --git a/dom/media/gstreamer/GStreamerLoader.cpp b/dom/media/gstreamer/GStreamerLoader.cpp
index 8182f68..796a993 100644
index 8182f689f406..796a99344370 100644
--- a/dom/media/gstreamer/GStreamerLoader.cpp
+++ b/dom/media/gstreamer/GStreamerLoader.cpp
@@ -13,6 +13,7 @@
Expand All @@ -122,10 +125,18 @@ index 8182f68..796a993 100644

for (size_t i = 0; i < sizeof(handles) / sizeof(handles[0]); i++) {
diff --git a/dom/media/gstreamer/GStreamerReader.cpp b/dom/media/gstreamer/GStreamerReader.cpp
index 45a14ae..cfb56a5 100644
index 202f5a41ea20..f693cae077de 100644
--- a/dom/media/gstreamer/GStreamerReader.cpp
+++ b/dom/media/gstreamer/GStreamerReader.cpp
@@ -131,6 +131,11 @@ GStreamerReader::GStreamerReader(AbstractMediaDecoder* aDecoder)
@@ -124,6 +124,7 @@ GStreamerReader::GStreamerReader(AbstractMediaDecoder* aDecoder)
mSinkCallbacks.new_preroll = GStreamerReader::NewPrerollCb;
#if GST_VERSION_MAJOR >= 1
mSinkCallbacks.new_sample = GStreamerReader::NewBufferCb;
+ memset (&mVideoInfo, 0, sizeof (mVideoInfo));
#else
mSinkCallbacks.new_buffer = GStreamerReader::NewBufferCb;
mSinkCallbacks.new_buffer_list = nullptr;
@@ -131,6 +132,11 @@ GStreamerReader::GStreamerReader(AbstractMediaDecoder* aDecoder)

gst_segment_init(&mVideoSegment, GST_FORMAT_UNDEFINED);
gst_segment_init(&mAudioSegment, GST_FORMAT_UNDEFINED);
Expand All @@ -137,7 +148,7 @@ index 45a14ae..cfb56a5 100644
}

GStreamerReader::~GStreamerReader()
@@ -308,6 +313,51 @@ void GStreamerReader::PlayBinSourceSetupCb(GstElement* aPlayBin,
@@ -308,6 +314,51 @@ void GStreamerReader::PlayBinSourceSetupCb(GstElement* aPlayBin,
g_object_get(aPlayBin, "source", &source, nullptr);
reader->PlayBinSourceSetup(GST_APP_SRC(source));
}
Expand Down Expand Up @@ -189,7 +200,7 @@ index 45a14ae..cfb56a5 100644

void GStreamerReader::PlayBinSourceSetup(GstAppSrc* aSource)
{
@@ -339,6 +389,13 @@ void GStreamerReader::PlayBinSourceSetup(GstAppSrc* aSource)
@@ -339,6 +390,13 @@ void GStreamerReader::PlayBinSourceSetup(GstAppSrc* aSource)
gst_app_src_set_stream_type(mSource, GST_APP_STREAM_TYPE_SEEKABLE);
}

Expand All @@ -203,8 +214,17 @@ index 45a14ae..cfb56a5 100644
// Set the source MIME type to stop typefind trying every. single. format.
GstCaps *caps =
GStreamerFormatHelper::ConvertFormatsToCaps(mDecoder->GetResource()->GetContentType().get(),
@@ -1491,7 +1549,7 @@ RefPtr<PlanarYCbCrImage> GStreamerReader::GetImageFromBuffer(GstBuffer* aBuffer)
{
RefPtr<PlanarYCbCrImage> image = nullptr;

- if (gst_buffer_n_memory(aBuffer) == 1) {
+ if (gst_buffer_n_memory(aBuffer) == 1 && mVideoInfo.finfo) {
GstMemory* mem = gst_buffer_peek_memory(aBuffer, 0);
if (GST_IS_MOZ_GFX_MEMORY_ALLOCATOR(mem->allocator)) {
image = moz_gfx_memory_get_image(mem);
diff --git a/dom/media/gstreamer/GStreamerReader.h b/dom/media/gstreamer/GStreamerReader.h
index 3738b57..5b78b82 100644
index b5a87d97400c..2633c7bdc044 100644
--- a/dom/media/gstreamer/GStreamerReader.h
+++ b/dom/media/gstreamer/GStreamerReader.h
@@ -105,6 +105,15 @@ private:
Expand Down Expand Up @@ -233,7 +253,7 @@ index 3738b57..5b78b82 100644

} // namespace mozilla
diff --git a/netwerk/mime/nsMimeTypes.h b/netwerk/mime/nsMimeTypes.h
index c10f020..063fd48 100644
index c10f02024ab2..063fd48257fc 100644
--- a/netwerk/mime/nsMimeTypes.h
+++ b/netwerk/mime/nsMimeTypes.h
@@ -160,6 +160,7 @@
Expand All @@ -245,7 +265,7 @@ index c10f020..063fd48 100644

/* x-uuencode-apple-single. QuickMail made me do this. */
diff --git a/toolkit/components/mediasniffer/nsMediaSniffer.cpp b/toolkit/components/mediasniffer/nsMediaSniffer.cpp
index 9460c56..b63a761 100644
index 9460c56ff437..b63a761b949d 100644
--- a/toolkit/components/mediasniffer/nsMediaSniffer.cpp
+++ b/toolkit/components/mediasniffer/nsMediaSniffer.cpp
@@ -35,7 +35,9 @@ nsMediaSnifferEntry nsMediaSniffer::sSnifferEntries[] = {
Expand All @@ -260,5 +280,5 @@ index 9460c56..b63a761 100644

// For a complete list of file types, see http://www.ftyps.com/index.html
--
2.7.4
2.20.1

8 changes: 4 additions & 4 deletions rpm/0002-Workaround-for-late-access-message-loop.patch
@@ -1,7 +1,7 @@
From 202a74031531c4d6dd895281302474869cdfb34c Mon Sep 17 00:00:00 2001
From dc6bbb4d3a96d56a3950d0b75c379a4bb3489cf5 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:12:04 +0300
Subject: [PATCH 02/11] Workaround for late access message loop.
Subject: [PATCH 02/15] Workaround for late access message loop.

See bug JB10381

Expand All @@ -11,7 +11,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 3 insertions(+)

diff --git a/ipc/glue/MessagePump.cpp b/ipc/glue/MessagePump.cpp
index 3079195..1f0b70a 100644
index 30791953fb32..1f0b70a27430 100644
--- a/ipc/glue/MessagePump.cpp
+++ b/ipc/glue/MessagePump.cpp
@@ -213,6 +213,9 @@ DoWorkRunnable::Run()
Expand All @@ -25,5 +25,5 @@ index 3079195..1f0b70a 100644
bool nestableTasksAllowed = loop->NestableTasksAllowed();

--
2.7.4
2.20.1

50 changes: 25 additions & 25 deletions rpm/0003-Revert-Bug-1114594-Remove-promptForSaveToFile-in-fav.patch
@@ -1,26 +1,26 @@
From 645ed48af9e2a804e04246d25c848961cd058aac Mon Sep 17 00:00:00 2001
From baec7db68d02331e7b23fcfcfad8b3fc5ec7dbe4 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Wed, 21 Dec 2016 14:35:15 +0200
Subject: [PATCH 03/11] Revert "Bug 1114594 - Remove promptForSaveToFile in
Subject: [PATCH 03/15] Revert "Bug 1114594 - Remove promptForSaveToFile in
favor of promptForSaveToFileAsync. r=paolo"

This reverts commit f5fe5678d69887fd2ffce1729028d0a2e676be2f.

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
b2g/components/HelperAppDialog.js | 8 +++++++
mobile/android/components/HelperAppDialog.js | 5 ++++
.../downloads/test/unit/downloads_manifest.js | 4 +++-
toolkit/components/jsdownloads/test/unit/head.js | 9 +++++++
toolkit/mozapps/downloads/nsHelperAppDlg.js | 16 +++++++++++++
.../exthandler/nsExternalHelperAppService.cpp | 24 ++++++++++++-------
.../exthandler/nsIHelperAppLauncherDialog.idl | 28 +++++++++++++++++++++-
.../tests/mochitest/test_unsafeBidiChars.xhtml | 3 +++
.../exthandler/tests/unit_ipc/test_encoding.js | 4 +++-
b2g/components/HelperAppDialog.js | 8 ++++++
mobile/android/components/HelperAppDialog.js | 5 ++++
.../downloads/test/unit/downloads_manifest.js | 4 ++-
.../components/jsdownloads/test/unit/head.js | 9 ++++++
toolkit/mozapps/downloads/nsHelperAppDlg.js | 16 +++++++++++
.../exthandler/nsExternalHelperAppService.cpp | 24 ++++++++++------
.../exthandler/nsIHelperAppLauncherDialog.idl | 28 ++++++++++++++++++-
.../mochitest/test_unsafeBidiChars.xhtml | 3 ++
.../tests/unit_ipc/test_encoding.js | 4 ++-
9 files changed, 90 insertions(+), 11 deletions(-)

diff --git a/b2g/components/HelperAppDialog.js b/b2g/components/HelperAppDialog.js
index a155728..71d5423 100644
index a15572820c15..71d5423e89b6 100644
--- a/b2g/components/HelperAppDialog.js
+++ b/b2g/components/HelperAppDialog.js
@@ -33,6 +33,14 @@ HelperAppLauncherDialog.prototype = {
Expand All @@ -39,7 +39,7 @@ index a155728..71d5423 100644
aContext,
aDefaultFile,
diff --git a/mobile/android/components/HelperAppDialog.js b/mobile/android/components/HelperAppDialog.js
index 8706d73..f4047c4 100644
index 8706d7343bfb..f4047c4b7dc7 100644
--- a/mobile/android/components/HelperAppDialog.js
+++ b/mobile/android/components/HelperAppDialog.js
@@ -245,6 +245,11 @@ HelperAppLauncherDialog.prototype = {
Expand All @@ -55,7 +55,7 @@ index 8706d73..f4047c4 100644
aSuggestedFileExt, aForcePrompt) {
Task.spawn(function* () {
diff --git a/toolkit/components/downloads/test/unit/downloads_manifest.js b/toolkit/components/downloads/test/unit/downloads_manifest.js
index 7bef411..a24622a 100644
index 7bef4117c14c..a24622a6d265 100644
--- a/toolkit/components/downloads/test/unit/downloads_manifest.js
+++ b/toolkit/components/downloads/test/unit/downloads_manifest.js
@@ -15,7 +15,9 @@ HelperAppDlg.prototype = {
Expand All @@ -70,7 +70,7 @@ index 7bef411..a24622a 100644


diff --git a/toolkit/components/jsdownloads/test/unit/head.js b/toolkit/components/jsdownloads/test/unit/head.js
index 64a330d..bfed5c7 100644
index 64a330db6e3f..bfed5c7fa358 100644
--- a/toolkit/components/jsdownloads/test/unit/head.js
+++ b/toolkit/components/jsdownloads/test/unit/head.js
@@ -804,6 +804,15 @@ add_task(function test_common_initialize()
Expand All @@ -90,7 +90,7 @@ index 64a330d..bfed5c7 100644
aWindowContext,
aDefaultFileName,
diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
index 6e847f3..eb6c844 100644
index 6e847f34ea18..eb6c8448ddc5 100644
--- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
+++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
@@ -204,6 +204,22 @@ nsUnknownContentTypeDialog.prototype = {
Expand All @@ -117,7 +117,7 @@ index 6e847f3..eb6c844 100644
var result = null;

diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
index fc2f2385..39f066a 100644
index fc2f2385643b..39f066aff0f3 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -2300,16 +2300,24 @@ void nsExternalAppHandler::RequestSaveDestination(const nsAFlatString &aDefaultF
Expand Down Expand Up @@ -154,7 +154,7 @@ index fc2f2385..39f066a 100644
}

diff --git a/uriloader/exthandler/nsIHelperAppLauncherDialog.idl b/uriloader/exthandler/nsIHelperAppLauncherDialog.idl
index f8190e7..d15f133 100644
index f8190e744bdf..d15f13321258 100644
--- a/uriloader/exthandler/nsIHelperAppLauncherDialog.idl
+++ b/uriloader/exthandler/nsIHelperAppLauncherDialog.idl
@@ -21,7 +21,7 @@ interface nsIFile;
Expand All @@ -166,10 +166,11 @@ index f8190e7..d15f133 100644
interface nsIHelperAppLauncherDialog : nsISupports {
/**
* This request is passed to the helper app dialog because Gecko can not
@@ -58,6 +58,32 @@ interface nsIHelperAppLauncherDialog : nsISupports {
@@ -57,6 +57,32 @@ interface nsIHelperAppLauncherDialog : nsISupports {
in nsISupports aWindowContext,
in unsigned long aReason);

/**
+ /**
+ * Invoke a save-to-file dialog instead of the full fledged helper app dialog.
+ * Returns the a nsIFile for the file name/location selected.
+ *
Expand All @@ -195,12 +196,11 @@ index f8190e7..d15f133 100644
+ in wstring aSuggestedFileExtension,
+ in boolean aForcePrompt);
+
+ /**
/**
* Async invoke a save-to-file dialog instead of the full fledged helper app
* dialog. When the file is chosen (or the dialog is closed), the callback
* in aLauncher (aLauncher.saveDestinationAvailable) is called with the
diff --git a/uriloader/exthandler/tests/mochitest/test_unsafeBidiChars.xhtml b/uriloader/exthandler/tests/mochitest/test_unsafeBidiChars.xhtml
index 3e5fa41..6363e55 100644
index 3e5fa41c82e5..6363e5523de6 100644
--- a/uriloader/exthandler/tests/mochitest/test_unsafeBidiChars.xhtml
+++ b/uriloader/exthandler/tests/mochitest/test_unsafeBidiChars.xhtml
@@ -84,6 +84,9 @@ function load() {
Expand All @@ -214,7 +214,7 @@ index 3e5fa41..6363e55 100644
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
if (aIID.equals(SpecialPowers.Ci.nsISupports) ||
diff --git a/uriloader/exthandler/tests/unit_ipc/test_encoding.js b/uriloader/exthandler/tests/unit_ipc/test_encoding.js
index 35dcf5a..a4cad91 100644
index 35dcf5aaba99..a4cad9136ed2 100644
--- a/uriloader/exthandler/tests/unit_ipc/test_encoding.js
+++ b/uriloader/exthandler/tests/unit_ipc/test_encoding.js
@@ -38,7 +38,9 @@ HelperAppDlg.prototype = {
Expand All @@ -229,5 +229,5 @@ index 35dcf5a..a4cad91 100644

// Override the download-manager-ui to prevent anyone from trying to open
--
2.7.4
2.20.1

8 changes: 4 additions & 4 deletions rpm/0004-Define-HAS_NEMO_RESOURCE-in-config.patch
@@ -1,7 +1,7 @@
From 13c87c2f69ee7c4319464f6e4bf851e26645a564 Mon Sep 17 00:00:00 2001
From f5331c8d25b447c3cf9a6b357816cae1a1b288ba Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:13:03 +0300
Subject: [PATCH 04/11] Define HAS_NEMO_RESOURCE in config
Subject: [PATCH 04/15] Define HAS_NEMO_RESOURCE in config

See bugs JB10947, JB30305, and JB30517

Expand All @@ -11,7 +11,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 4 insertions(+)

diff --git a/configure.in b/configure.in
index b261764..afb6186 100644
index 82cd65a00559..7f5ce1a0f369 100644
--- a/configure.in
+++ b/configure.in
@@ -5659,6 +5659,9 @@ if test -n "$MOZ_GSTREAMER"; then
Expand All @@ -33,5 +33,5 @@ index b261764..afb6186 100644

if test -n "$MOZ_GSTREAMER"; then
--
2.7.4
2.20.1

@@ -1,7 +1,7 @@
From b2af39090a503053c4135480d34142ee9b763270 Mon Sep 17 00:00:00 2001
From a9b59c2bc3e49f4dd913c954f562b3880f962b35 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:17:36 +0300
Subject: [PATCH 05/11] Limit surface area rather than width and height
Subject: [PATCH 05/15] Limit surface area rather than width and height

See bug JB26935

Expand All @@ -11,7 +11,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
index 9104372..ba1d468 100644
index 91043722c4c6..ba1d4688c14d 100644
--- a/gfx/cairo/cairo/src/cairo-image-surface.c
+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
@@ -91,8 +91,9 @@ _pixman_image_for_solid (const cairo_solid_pattern_t *pattern);
Expand All @@ -27,5 +27,5 @@ index 9104372..ba1d468 100644

cairo_format_t
--
2.7.4
2.20.1

@@ -1,7 +1,7 @@
From 47b6a90708a985f3645621a6a7c3f03f4b4cd3e6 Mon Sep 17 00:00:00 2001
From b69fa99fccc24c451585240f539af13aefba0f97 Mon Sep 17 00:00:00 2001
From: Piotr Tworek <piotr.tworek@jollamobile.com>
Date: Wed, 8 Jul 2015 16:13:11 +0200
Subject: [PATCH 06/11] Make TextureImageEGL hold a reference to GLContext.
Subject: [PATCH 06/15] Make TextureImageEGL hold a reference to GLContext.
Fixes JB#30109.

Due to rather non standard view shutdown procedure of EmbedLite port
Expand All @@ -25,7 +25,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gfx/gl/TextureImageEGL.h b/gfx/gl/TextureImageEGL.h
index 472718e..61d873a 100644
index 472718e2efd2..61d873a79a90 100644
--- a/gfx/gl/TextureImageEGL.h
+++ b/gfx/gl/TextureImageEGL.h
@@ -63,7 +63,7 @@ public:
Expand All @@ -38,5 +38,5 @@ index 472718e..61d873a 100644
gfx::IntRect mUpdateRect;
gfx::SurfaceFormat mUpdateFormat;
--
2.7.4
2.20.1

0 comments on commit 7bf5ab8

Please sign in to comment.