Closed
Bug 1213177
Opened 9 years ago
Closed 9 years ago
Dynamically enable VP9 MSE when H.264 hardware decoders are not available
Categories
(Core :: Audio/Video: Playback, defect, P1)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla44
People
(Reporter: cpeterson, Assigned: jya)
References
Details
Attachments
(1 file)
(deleted),
patch
|
ajones
:
review+
|
Details | Diff | Splinter Review |
In bug 1190970, we enabled VP9 MSE on Linux and disabled it on Windows and OS X at compile time. We should also enable VP9 MSE for desktop users who can't use hardware decoders because they have are missing WMF codecs or have a blocklisted GPU.
Do we always want to prefer Flash over VP9 if Flash is installed? What if a user has Flash but also has a GPU on our blocklist? If we think Flash is not going to use the GPU or will use it and fail, we might want to prefer our VP9 SW decoder over Flash's H.264 SW decoder.
So some logic like this:
VP9 = (!WMF || !GPU) && !Flash; // prefer Flash over VP9?
VP9 = !GPU || (!WMF && !Flash); // or don't use Flash if GPU is blocklisted?
Assignee | ||
Comment 1•9 years ago
|
||
Show me how to test if Flash is installed and I'll wrap that up for you.
With the fixed SupporsMimeType/canPlayType implementing such logic is trivial.
Reporter | ||
Comment 2•9 years ago
|
||
I think you can use something like:
nsRefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
bool isFlashEnabled = pluginHost && pluginHost->HavePluginForType((NS_LITERAL_CSTRING("application/x-shockwave-flash");
Updated•9 years ago
|
Priority: -- → P1
Reporter | ||
Comment 3•9 years ago
|
||
We won't need this fix if we enable VP9 on all platforms first (bug 1198715).
Depends on: 1198715
Assignee | ||
Comment 4•9 years ago
|
||
Seeing that flash isn't used anyway. Should we still care that flash is installed or not?
Reporter | ||
Comment 5•9 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #4)
> Seeing that flash isn't used anyway. Should we still care that flash is
> installed or not?
Good point. We no longer care whether Flash is installed or not.
Is this only an issue for Windows? If the user has H.264 platform decoders but their GPU is blocklisted, should we enable VP9 then? Do OS X users ever have missing codecs or blocklisted GPUs?
Flags: needinfo?(jyavenard)
Summary: Dynamically enable VP9 MSE when H.264 hardware decoding is not available and Flash is not installed → Dynamically enable VP9 MSE when H.264 platform decoders are not available
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #5)
> (In reply to Jean-Yves Avenard [:jya] from comment #4)
> > Seeing that flash isn't used anyway. Should we still care that flash is
> > installed or not?
>
> Good point. We no longer care whether Flash is installed or not.
in which case this bug is likely now a duplicate of bug 1217170.
It enables WebM wherever MP4 isn't supported.
>
> Is this only an issue for Windows? If the user has H.264 platform decoders
> but their GPU is blocklisted, should we enable VP9 then? Do OS X users ever
> have missing codecs or blocklisted GPUs?
not that I'm aware off.
That's the thing with Apple, they always use high-end gear of stuff that they know works.
Flags: needinfo?(jyavenard)
Assignee | ||
Comment 7•9 years ago
|
||
Hmmm... still have to handle where H264 HW is disabled.
this is more work
Reporter | ||
Comment 8•9 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #6)
> (In reply to Chris Peterson [:cpeterson] from comment #5)
> > Good point. We no longer care whether Flash is installed or not.
>
> in which case this bug is likely now a duplicate of bug 1217170.
> It enables WebM wherever MP4 isn't supported.
OK. Let's repurpose this bug to handle the case where H.264 HW is disabled. (That was the original bug title, anyways. :-)
Summary: Dynamically enable VP9 MSE when H.264 platform decoders are not available → Dynamically enable VP9 MSE when H.264 hardware decoders are not available
Assignee | ||
Comment 9•9 years ago
|
||
Attachment #8679798 -
Flags: review?(ajones)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jyavenard
Reporter | ||
Comment 10•9 years ago
|
||
Jean-Yves said this fix is pretty safe, so we may want to uplift it to Aurora 43. It will give a small performance improvement to users who can't use H.264 hardware decoding because they have blocklisted GPUs. (VP9 software decoding is faster than H.264 software decoding.)
status-firefox41:
--- → wontfix
status-firefox42:
--- → wontfix
status-firefox43:
--- → affected
status-firefox44:
--- → affected
Comment on attachment 8679798 [details] [diff] [review]
Enable WebM on machines where H264 HW decoding is disabled or unavailable.
Review of attachment 8679798 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/mediasource/MediaSource.cpp
@@ +79,5 @@
> static bool
> IsWebMForced()
> {
> bool mp4supported =
> DecoderTraits::IsMP4TypeAndEnabled(NS_LITERAL_CSTRING("video/mp4"));
Comment: There is something about that function name that is telling me that it is trying to do two things....
Attachment #8679798 -
Flags: review?(ajones) → review+
Assignee | ||
Comment 12•9 years ago
|
||
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #11)
> > bool mp4supported =
> > DecoderTraits::IsMP4TypeAndEnabled(NS_LITERAL_CSTRING("video/mp4"));
>
> Comment: There is something about that function name that is telling me that
> it is trying to do two things....
it does, and that's why I changed the function name.
It checks that it's MP4 *and* that it's prefed on *and* we have a decoder for it. We know it's mp4 ; that leaves us with just it being prefed on and have a decoder.
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•