[Webkit-unassigned] [Bug 189239] [EME][GStreamer] Add support for WebM encrypted caps "application/x-webm-enc"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 4 08:53:07 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=189239

--- Comment #4 from Xabier Rodríguez Calvar <calvaris at igalia.com> ---
Comment on attachment 351539
  --> https://bugs.webkit.org/attachment.cgi?id=351539
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=351539&action=review

> Source/WebCore/ChangeLog:11
> +        in case of WebM, for details, see https://bugzilla.gnome.org/attachment.cgi?id=365211

period at the end.

> Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:179
> +    return (gst_structure_has_name(structure, "application/x-cenc") || gst_structure_has_name(structure, "application/x-webm-enc"));

You don't need the () enclosing the two checks.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:1295
> +        if (eventKeySystemUUID == GST_PROTECTION_UNSPECIFIED_SYSTEM_ID)
> +            weakThis->m_player->initializationDataEncountered("webm"_s, ArrayBuffer::create(reinterpret_cast<const uint8_t*>(initData.characters8()), initData.sizeInBytes()));
> +        else
> +            weakThis->m_player->initializationDataEncountered("cenc"_s, ArrayBuffer::create(reinterpret_cast<const uint8_t*>(initData.characters8()), initData.sizeInBytes()));

You can use a ? b : c instead of an if.

I have also a concern of what we are considering here: if system id is unspecified then we consider webm, cenc otherwise, which means that cenc needs to enforce a sys id and WebM will never have one. I guess the later is true by per spec but I wonder if that assumtion of cenc is true.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:1296
> +

This line should be removed.

> Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:61
> +    "application/x-cenc, original-media-type=(string)audio/mpeg, protection-system=(string)" WEBCORE_GSTREAMER_EME_UTILITIES_CLEARKEY_UUID";"
> +    "application/x-webm-enc, original-media-type=(string)video/x-vp8;"
> +    "application/x-webm-enc, original-media-type=(string)video/x-vp9;"));

Can WebM handle cenc? If it can then we have an issue with this.

> Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:165
> +            if (!g_strcmp0(klass->protectionSystemId, GST_PROTECTION_UNSPECIFIED_SYSTEM_ID))
> +                gst_structure_set_name(outgoingStructure.get(), "application/x-webm-enc");
> +            else
> +                gst_structure_set_name(outgoingStructure.get(), "application/x-cenc");

Ditto for a ? b : c.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181004/651cda08/attachment-0001.html>


More information about the webkit-unassigned mailing list