On Linux some implementations of time(0) appear to be suffering from integer
overflow and giving us the wrong dates. This causes the time we expose to the
CDM to be wrong, and so licenses passed to the CDM are failing to authenticate,
and Netflix is thus broken on some Linux systems.
This is only happening in Firefox 54 and earlier, as in those versions we use
the WidevineDecryptor to talk to the CDM. In 55 (in beta) and later we use the
PChromiumCDM protocol to talk to the CDM. This doesn't use time(0) to get a
time for the CDM, so it's immune to the problem here.
So this patch makes the GetCurrentWallTime() implementation in
WidevineDecryptor match the code currently being used on Nightly and Beta in
the ChromiumCDMChild::GetCurrentWallTime() function.
Since we use the PChromiumCDM protocol to talk to the CDM on Nightly and Beta
by default, the WidevineDecryptor isn't actually being used on Nightly and
Beta. So this patch will only cause a behaviour change in Release, which still
uses the old backend. However it will make Release run the same code that we're
running in Nightly and Beta, so it should be safe to uplift to Release.
MozReview-Commit-ID: J58iDyinyQG
--HG--
extra : rebase_source : dcdf4a846f7b007526aa626db24598942f13f01d
This makes it easier to reuse in the ChromiumCDM code.
Also add an ExtractBuffer() method, which allows us to Move() the contained nsTArray
out without needing to copy the data.
MozReview-Commit-ID: 9suJSfXTVYy
--HG--
extra : rebase_source : 6eec99eb5329f3b8c3bb14d22459fee3bd95caf5
This makes it easier to reuse in the ChromiumCDM code.
Also add an ExtractBuffer() method, which allows us to Move() the contained nsTArray
out without needing to copy the data.
MozReview-Commit-ID: 9suJSfXTVYy
--HG--
extra : rebase_source : 89540b254249833cf8bb09792bb33cc402977d5a
This prevents the Log macro from colliding with the Log function on
IPC ParamTraits definitions.
MozReview-Commit-ID: Hd2v6ilbmGc
--HG--
extra : rebase_source : d26d495878706fe5a2009dd33d226cc71193be13
Store a mapping of decryptor ID to the CDM instance that the corresponding
WidevineDecryptor is using. This allows us to link GMPDecryptor instances
with the corresponding GMPVideoDecoder.
The CDM is stored inside the CDMWrapper, so that we destroy the CDM instance
when the last reference to the CDM is dropped.
MozReview-Commit-ID: FQYzh77yjoC
--HG--
extra : rebase_source : 772d4bead18a9b88e7f9ee30b0f169a192322e24
Store a mapping of decryptor ID to the CDM instance that the corresponding
WidevineDecryptor is using. This allows us to link GMPDecryptor instances
with the corresponding GMPVideoDecoder.
The CDM is stored inside the CDMWrapper, so that we destroy the CDM instance
when the last reference to the CDM is dropped.
MozReview-Commit-ID: FQYzh77yjoC
--HG--
extra : rebase_source : 7e8c264200e904a4f5a1311f11cd317d98df9791
Update handling of VP8, VP9 to enable decryption and decoding via widevine.
Update handling with further validation to make sure that invalid video types
are rejected when trying to create widevine decryptor session or init widevine
decoders.
MozReview-Commit-ID: 8FOvUJfxr6L
--HG--
extra : rebase_source : 0f6aed8256d7f106a598b09e6f11efe80f0e4bb2
Fixes compile errors on Linux when Widevine is compiled.
MozReview-Commit-ID: 19qQw02CqdQ
--HG--
extra : rebase_source : 335124655869da1f899986f7dcd0d7ec1e441f6a
Fixes compile errors on Linux when Widevine is compiled.
MozReview-Commit-ID: 19qQw02CqdQ
--HG--
extra : rebase_source : ebb98b25738e0438d873834f07c72be1f4eb71db
The OnSessionClosed() callback is happening on a timer, after
WidevineDecryptor::DecryptingComplete() has been called. So mCallback could
actually be non-null because DecryptingComplete() has been called, but the
object pointed to by mCallback has been deallocated, and mCallback is a
dangling pointer.
MozReview-Commit-ID: 4xdHYRn7EAS
--HG--
extra : source : 55d79997aa3e3e2133d9155c37f4435317b44061
Now that GMPParent detects whether gmp-clearkey can decode using AAC/H.264
using WMF before reporting gmp-clearkey's GMPParent can decode AAC/H.264, we
don't need the GMPDecryptorCallback::SetCapabilities() callback from the GMP to
signal to the PDMFactory that the GMP can decode. We can now trust what the
GMPService tells us.
So we can remove the "waiting for CDM caps" step in the state machine's startup
sequence. And all the plumbing. :)
If we need more caps, like for an decode-and-render path, we can declare those
as API strings in the info file.
MozReview-Commit-ID: E0QhU4cYhjo
--HG--
extra : rebase_source : 7d15ab6a45bac88c15c053f416d941b5fe0807b0
We've observed some crashes derefing the callback pointer, which may be
occuring due to shutdown happening before init has setup the callback pointer.
MozReview-Commit-ID: JsOqfjejMVI
--HG--
extra : rebase_source : e175dd8556ad50316bc16232782e593eea3e2ec8
Add a GMPAdapter implementation that adapts the Widevine Chrome CDM to
the GeckoMediaPlugin API. We're still allocating memory for video frames
in non shmem buffers, and copying them over to a shmem before returning
them to Gecko, we can fix that at a later date. I hook this adapter up
in a later patch in the series.
MozReview-Commit-ID: 7iSFODVWPu3