Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
rpm/0047-sailfishos-gecko-Force-recycling-of-gmpdroid-instanc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters