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

Changeset 282439 in webkit


Ignore:
Timestamp:
Sep 14, 2021, 11:01:56 PM (5 years ago)
Author:
calvaris@igalia.com
Message:

[GStreamer][EME] Accomodate cbcs as cipher-mode instead of mime
​https://bugs.webkit.org/show_bug.cgi?id=230265

Reviewed by Philippe Normand.

In ​https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1013
it was decided that there should not be x-cbcs as mime type but
rather x-cenc with cbcs as cipher-mode.

Fly-by change, we will return GST_FLOW_NOT_SUPPORTED when we get
skip and crypt cbcs encryption scheme.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(transformInPlace):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r282438 r282439  
     12021-09-14  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GStreamer][EME] Accomodate cbcs as cipher-mode instead of mime
     4        https://bugs.webkit.org/show_bug.cgi?id=230265
     5
     6        Reviewed by Philippe Normand.
     7
     8        In https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1013
     9        it was decided that there should not be x-cbcs as mime type but
     10        rather x-cenc with cbcs as cipher-mode.
     11
     12        Fly-by change, we will return GST_FLOW_NOT_SUPPORTED when we get
     13        skip and crypt cbcs encryption scheme.
     14
     15        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
     16        (transformInPlace):
     17
    1182021-09-14  Rob Buis  <rbuis@igalia.com>
    219
  • trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp

    r278075 r282439  
    221221    });
    222222
     223    bool isCbcs = !g_strcmp0(gst_structure_get_string(protectionMeta->info, "cipher-mode"), "cbcs");
     224
    223225    unsigned ivSize;
    224226    if (!gst_structure_get_uint(protectionMeta->info, "iv_size", &ivSize)) {
    … …  
    228230    if (!ivSize && !gst_structure_get_uint(protectionMeta->info, "constant_iv_size", &ivSize)) {
    229231        GST_ERROR_OBJECT(self, "No iv_size and failed to get constant_iv_size");
     232        ASSERT(isCbcs);
    230233        return GST_FLOW_NOT_SUPPORTED;
    231234    }
    … …  
    246249    unsigned subSampleCount = 0;
    247250    // cbcs could not include the subsample_count.
    248     if (!gst_structure_get_uint(protectionMeta->info, "subsample_count", &subSampleCount)
    249         && !gst_structure_has_name(protectionMeta->info, "application/x-cbcs")) {
     251    if (!gst_structure_get_uint(protectionMeta->info, "subsample_count", &subSampleCount) && !isCbcs) {
    250252        GST_ERROR_OBJECT(self, "Failed to get subsample_count");
    251253        return GST_FLOW_NOT_SUPPORTED;
    … …  
    281283    }
    282284
    283     if (gst_structure_has_field(protectionMeta->info, "crypt_byte_block") || gst_structure_has_field(protectionMeta->info, "skip_byte_block"))
     285    if (isCbcs && (gst_structure_has_field(protectionMeta->info, "crypt_byte_block") || gst_structure_has_field(protectionMeta->info, "skip_byte_block"))) {
    284286        GST_FIXME_OBJECT(self, "cbcs crypt/skip pattern is still unsupported");
     287        return GST_FLOW_NOT_SUPPORTED;
     288    }
    285289
    286290    GstBuffer* ivBuffer = gst_value_get_buffer(value);
Note: See TracChangeset for help on using the changeset viewer.