Bug 185535

Summary: [EME][GStreamer] Handle the protection event in MediaPlayerPrivate
Product: WebKit Reporter: Yacine Bandou <bandou.yacine>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, commit-queue, olivier.blin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 185245    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Yacine Bandou 2018-05-10 16:45:13 PDT
The patch is based on this calvaris's commit https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/d966168b0d2b65f9ca9415426e26d3752c78b03e

it adds a handler for the protection event in MediaPalyerPrivate and it extracts the InitData from the event and sends the encrypted event to JS via HTMLMediaElement.
Comment 1 Yacine Bandou 2018-05-10 17:03:56 PDT
Created attachment 340149 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2018-05-10 23:14:02 PDT
Comment on attachment 340149 [details]
Patch

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

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:1217
> +    if (m_cdmInstance && strcmp(GStreamerEMEUtilities::keySystemToUuid(m_cdmInstance->keySystem()), eventKeySystemUUID))

Better to use g_strcmp0.
It would be interesting to add a GST_TRACE or DEBUG comment for the bail out here.
Comment 3 Yacine Bandou 2018-05-11 02:39:46 PDT
Created attachment 340182 [details]
Patch
Comment 4 Xabier Rodríguez Calvar 2018-05-11 02:57:33 PDT
Comment on attachment 340182 [details]
Patch

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

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:1216
> +    // Palyread, so we ignore this event.

PlayReady
Comment 5 Xabier Rodríguez Calvar 2018-05-11 02:58:30 PDT
Comment on attachment 340182 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        It adds a handler for the protection event in MediaPalyerPrivate, it extracts the InitData from the event

MediaPlayerPrivateGStreamerBase.
Comment 6 Yacine Bandou 2018-05-11 03:12:15 PDT
Created attachment 340184 [details]
Patch
Comment 7 WebKit Commit Bot 2018-05-11 03:50:43 PDT
Comment on attachment 340184 [details]
Patch

Clearing flags on attachment: 340184

Committed r231699: <https://trac.webkit.org/changeset/231699>
Comment 8 WebKit Commit Bot 2018-05-11 03:50:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-05-11 03:51:19 PDT
<rdar://problem/40159171>