Skip to content

Commit

Permalink
[sailfishos][gecko] Force recycling of gmp-droid instances. JB#51730
Browse files Browse the repository at this point in the history
Android codecs hog a lot of frames, so creating a new one during playback when
the stream switches will cause lag and playback failure. These codecs are
capable of switching streams internally, so flag gmp-droid as supporting
decoder recycling.
  • Loading branch information
abranson committed Nov 13, 2020
1 parent a700241 commit 6c603b6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
@@ -0,0 +1,25 @@
From 3fe963510d04e696bbc1c12cbea475b2ca8875f7 Thu, 12 Nov 2020 20:04:42 +0100
From: Andrew Branson <andrew.branson@jolla.com>
Date: Thu, 12 Nov 2020 20:03:34 +0100
Subject: [PATCH] [sailfishos][gecko] Force recycling of gmp-droid instances. JB#51730


Android codecs hog a lot of frames, so creating a new one during playback when
the stream switches will cause lag and playback failure. These codecs are
capable of switching streams internally, so flag gmp-droid as supporting
decoder recycling.

diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h
index e9f0843..e1d15bd 100644
--- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h
+++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h
@@ -42,6 +42,9 @@
nsCString GetDescriptionName() const override {
return NS_LITERAL_CSTRING("gmp video decoder");
}
+ bool SupportDecoderRecycling() const override {
+ return mGMP->GetDisplayName().EqualsLiteral("gmp-droid");
+ }
ConversionRequired NeedsConversion() const override {
return mConvertToAnnexB ? ConversionRequired::kNeedAnnexB
: ConversionRequired::kNeedAVCC;
1 change: 1 addition & 0 deletions rpm/xulrunner-qt5.spec
Expand Up @@ -89,6 +89,7 @@ Patch43: 0043-sailfishos-gecko-Prioritize-loading-of-extension-ver.patch
Patch44: 0044-sailfishos-gecko-Apply-UA-override-for-window.naviga.patch
Patch45: 0045-sailfishos-media-Ensure-audio-continues-when-screen-.patch
Patch46: 0046-sailfishos-backport--Make-MOZSIGNALTRAMPOLINE-Andro-.patch
Patch47: 0047-sailfishos-gecko-Force-recycling-of-gmpdroid-instanc.patch

BuildRequires: rust
BuildRequires: rust-std-static
Expand Down

0 comments on commit 6c603b6

Please sign in to comment.