Bug 185535 - [EME][GStreamer] Handle the protection event in MediaPlayerPrivate
Summary: [EME][GStreamer] Handle the protection event in MediaPlayerPrivate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 185245
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-10 16:45 PDT by Yacine Bandou
Modified: 2018-05-11 03:51 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.96 KB, patch)
2018-05-10 17:03 PDT, Yacine Bandou
no flags Details | Formatted Diff | Diff
Patch (6.14 KB, patch)
2018-05-11 02:39 PDT, Yacine Bandou
no flags Details | Formatted Diff | Diff
Patch (6.15 KB, patch)
2018-05-11 03:12 PDT, Yacine Bandou
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>