Bug 190471 - [GStreamer] Fix EME build for GStreamer 1.14.x
Summary: [GStreamer] Fix EME build for GStreamer 1.14.x
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-11 08:30 PDT by Philippe Normand
Modified: 2018-10-15 04:59 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.18 KB, patch)
2018-10-11 08:35 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (2.34 KB, patch)
2018-10-11 09:05 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (4.77 KB, patch)
2018-10-12 10:00 PDT, Philippe Normand
calvaris: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2018-10-11 08:30:28 PDT
.
Comment 1 Philippe Normand 2018-10-11 08:35:07 PDT
Created attachment 352046 [details]
Patch
Comment 2 Yacine Bandou 2018-10-11 08:58:40 PDT
Comment on attachment 352046 [details]
Patch

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

> Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:168
>          }

If it is necessary to add the flag, I suggest like this:

            gst_structure_set_name(outgoingStructure.get(),
#if GST_CHECK_VERSION(1, 15, 0)
                !g_strcmp0(klass->protectionSystemId, GST_PROTECTION_UNSPECIFIED_SYSTEM_ID) ? "application/x-webm-enc" : "application/x-cenc");
#else
                "application/x-cenc");
#endif
Comment 3 Philippe Normand 2018-10-11 09:05:27 PDT
Created attachment 352047 [details]
Patch
Comment 4 Thibault Saunier 2018-10-11 13:19:36 PDT
Comment on attachment 352047 [details]
Patch

There is another occurence of `GST_PROTECTION_UNSPECIFIED_SYSTEM_ID` in MediaPlayerPrivateGStreamerBase.cpp - I guess you missed a part of your patch.
Comment 5 Philippe Normand 2018-10-11 13:23:38 PDT
Comment on attachment 352047 [details]
Patch

Oops. Will update the patch. Thanks!
Comment 6 Philippe Normand 2018-10-12 10:00:29 PDT
Created attachment 352177 [details]
Patch
Comment 7 Thibault Saunier 2018-10-12 10:07:10 PDT
Comment on attachment 352177 [details]
Patch

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

Lgtm, though I believe that code should be reworked :-)

Informal r+

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:1305
> +        if (eventKeySystemUUID == GST_PROTECTION_UNSPECIFIED_SYSTEM_ID)

I know this patch doesn't change the semantics but the assumption that `GST_PROTECTION_UNSPECIFIED_SYSTEM_ID` implies `webm` sounds dangerous/not future proof.
Comment 8 Xabier Rodríguez Calvar 2018-10-14 22:17:11 PDT
Comment on attachment 352177 [details]
Patch

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

>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:1305
>> +        if (eventKeySystemUUID == GST_PROTECTION_UNSPECIFIED_SYSTEM_ID)
> 
> I know this patch doesn't change the semantics but the assumption that `GST_PROTECTION_UNSPECIFIED_SYSTEM_ID` implies `webm` sounds dangerous/not future proof.

I agree and I already commented it on the original bug. I'll buy it for the moment as in cenc the sys id is mandatory and we only suppory either webm or cenc.
Comment 9 Philippe Normand 2018-10-15 04:44:49 PDT
Committed r237092: <https://trac.webkit.org/changeset/237092>
Comment 10 Radar WebKit Bug Importer 2018-10-15 04:45:42 PDT
<rdar://problem/45268472>
Comment 11 Thibault Saunier 2018-10-15 04:49:57 PDT
I am afraid that will actually make the patches that backported that feature in jhbuild useless.
Comment 12 Philippe Normand 2018-10-15 04:59:22 PDT
(In reply to Thibault Saunier from comment #11)
> I am afraid that will actually make the patches that backported that feature
> in jhbuild useless.

Yes you're right. See also https://bugs.webkit.org/show_bug.cgi?id=189238#c9 and following comments.