[EME] Add ClearKey support for persistent session data load and removal
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2017 09:48:23 +0000 (09:48 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2017 09:48:23 +0000 (09:48 +0000)
commit5382bdc612167662453018bca3d57a52b8d86493
treeca690c96762e818da2176d2811503a543cb4b426
parent6267d58e3d3ad887f9bfc2b78afb8cc65fd24fff
[EME] Add ClearKey support for persistent session data load and removal
https://bugs.webkit.org/show_bug.cgi?id=177442

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement the session data load and removal for persistent sessions
in the ClearKey implementation of the CDMInstance interface.

CDMInstanceClearKey::loadSession() finds data for the specified session
name, if any, and constructs a corresponding KeyStatusVector object that
holds information about all known keys associated with this session before
dispatching the LoadSessionCallback asynchronously.

CDMInstanceClearKey::removeSessionData() similarly finds the session data,
if any, and then removes it from the state tracker. The key data is still
reused to construct the KeyStatusVector object that holds information
about all the keys that were stored for this session. The key information
is also embedded in the 'license release' JSON message. Both key status
vector and message are then used in the RemoveSessionDataCallback dispatch
that is again done asynchronously.

No new tests -- affected tests have their baselines updated.

* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::CDMInstanceClearKey::loadSession):
(WebCore::CDMInstanceClearKey::removeSessionData):

LayoutTests:

Update WPE baselines for EME tests affected by the addition of persistent
session data load and removal in the ClearKey implementation.

All the affected tests progress, but most of them still don't pass
entirely due to missing functionality in the GStreamer pipeline.

* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license-expected.txt
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events-expected.txt
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp