Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 373ff82be279368d745a8944c0d81e399e412125
      
https://github.com/WebKit/WebKit/commit/373ff82be279368d745a8944c0d81e399e412125
  Author: Philippe Normand <[email protected]>
  Date:   2026-05-21 (Thu, 21 May 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyThunder.cpp
    M Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyThunder.h
    M Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h
    M 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h
    M 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp

  Log Message:
  -----------
  [GStreamer][EME] Improve decryption no-key errors handling
https://bugs.webkit.org/show_bug.cgi?id=315181

Reviewed by Xabier Rodriguez-Calvar.

In the case of Widevine the underlying platform CDM is signalling an expired 
license during
decryption using a NoKey error code and at the same time its internal key 
status update mechanism
will trigger a keyupdated callback in the upper layer (Thunder/OCDM). This 
triggers a racy behaviour
where the pipeline will receive an error message and Thunder will in parallel 
trigger a JS
keystatuses event to notify the web app.

The proposed solution is to introduce a new convention in OCDM implementations 
where a Widevine NoKey
error would be reported as ERROR_INVALID_ACCESSOR. Then in WebKit the decryptor 
can detect those and
emit a GStreamer DECRYPT_NOKEY error. In order to prevent double error 
reporting the MSE source
element also needs to handle this. In the player we can then ignore the 
DECRYPT_NOKEY error because
Thunder/OCDM will trigger a keystatuses event anyway.

Manually tested, we currently don't have any Widevine support in our layout 
test setup.

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyThunder.cpp:
(WebCore::CDMProxyThunder::decrypt):
* Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyThunder.h:
* Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
* 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(transformInPlace):
* 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
* 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:
(decrypt):
* Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcLoop):

Canonical link: https://commits.webkit.org/313658@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to