⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 271289 in webkit


Ignore:
Timestamp:
Jan 8, 2021, 2:28:50 AM (6 years ago)
Author:
calvaris@igalia.com
Message:

[GStreamer][EME][Thunder] Accept no protection system specific caps for CENC
https://bugs.webkit.org/show_bug.cgi?id=220088

Reviewed by Philippe Normand.

For example in CMAF it could happen that you don't have protection
events and hence no protection system in the caps. We need to
allow those cases.

  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r271288 r271289  
     12021-01-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GStreamer][EME][Thunder] Accept no protection system specific caps for CENC
     4        https://bugs.webkit.org/show_bug.cgi?id=220088
     5
     6        Reviewed by Philippe Normand.
     7
     8        For example in CMAF it could happen that you don't have protection
     9        events and hence no protection system in the caps. We need to
     10        allow those cases.
     11
     12        * platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:
     13
    1142020-09-24  Sergio Villar Senin  <svillar@igalia.com>
    215
  • trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp

    r270763 r271289  
    7070    GRefPtr<GstCaps> caps = adoptGRef(gst_caps_new_empty());
    7171
     72    if (CDMFactoryThunder::singleton().supportedKeySystems().isEmpty()) {
     73        GST_WARNING("no supported key systems in Thunder, we won't be able to decrypt anything with the its decryptor");
     74        return caps;
     75    }
     76
     77    for (int i = 0; cencEncryptionMediaTypes[i]; ++i) {
     78        gst_caps_append_structure(caps.get(), gst_structure_new("application/x-cenc", "original-media-type", G_TYPE_STRING,
     79            cencEncryptionMediaTypes[i], nullptr));
     80    }
    7281    for (const auto& keySystem : CDMFactoryThunder::singleton().supportedKeySystems()) {
    7382        for (int i = 0; cencEncryptionMediaTypes[i]; ++i) {
     
    7584                cencEncryptionMediaTypes[i], "protection-system", G_TYPE_STRING, GStreamerEMEUtilities::keySystemToUuid(keySystem), nullptr));
    7685        }
    77         if (GStreamerEMEUtilities::isWidevineKeySystem(keySystem)) {
    78             // No key system UUID for webm. It's not set in caps for it and it's just Widevine.
    79             for (int i = 0; webmEncryptionMediaTypes[i]; ++i) {
    80                 gst_caps_append_structure(caps.get(), gst_structure_new("application/x-webm-enc", "original-media-type", G_TYPE_STRING,
    81                     webmEncryptionMediaTypes[i], nullptr));
    82             }
     86    }
     87
     88    if (CDMFactoryThunder::singleton().supportsKeySystem(GStreamerEMEUtilities::s_WidevineKeySystem)) {
     89        // WebM is Widevine only so no Widevine, no WebM decryption.
     90        for (int i = 0; webmEncryptionMediaTypes[i]; ++i) {
     91            gst_caps_append_structure(caps.get(), gst_structure_new("application/x-webm-enc", "original-media-type", G_TYPE_STRING,
     92                webmEncryptionMediaTypes[i], nullptr));
    8393        }
    8494    }
Note: See TracChangeset for help on using the changeset viewer.