Changeset 220790 in webkit


Ignore:
Timestamp:
Aug 16, 2017 1:25:45 AM (7 years ago)
Author:
calvaris@igalia.com
Message:

[GStreamer][EME] Rework handling key systems and UUIDs
https://bugs.webkit.org/show_bug.cgi?id=175567

Reviewed by Žan Doberšek.

The UUIDs and key system strings were moved to the
GStreamerEMEUtilities class because so far they were managed by
the decryptors and that was ugly.

  • platform/GStreamer.cmake:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):

  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.
  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: Added.

(WebCore::GStreamerEMEUtilities::isClearKeyKeySystem):
(WebCore::GStreamerEMEUtilities::keySystemToUuid):

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webkit_media_clear_key_decrypt_class_init):

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
Location:
trunk/Source/WebCore
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r220787 r220790  
     12017-08-16  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GStreamer][EME] Rework handling key systems and UUIDs
     4        https://bugs.webkit.org/show_bug.cgi?id=175567
     5
     6        Reviewed by Žan Doberšek.
     7
     8        The UUIDs and key system strings were moved to the
     9        GStreamerEMEUtilities class because so far they were managed by
     10        the decryptors and that was ugly.
     11
     12        * platform/GStreamer.cmake:
     13        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
     14        (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
     15        * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.
     16        * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: Added.
     17        (WebCore::GStreamerEMEUtilities::isClearKeyKeySystem):
     18        (WebCore::GStreamerEMEUtilities::keySystemToUuid):
     19        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
     20        (webkit_media_clear_key_decrypt_class_init):
     21        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
     22
    1232017-08-16  Andy Estes  <aestes@apple.com>
    224
  • trunk/Source/WebCore/platform/GStreamer.cmake

    r220264 r220790  
    4343        platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
    4444
     45        platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp
    4546        platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp
    4647        platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp

    r220519 r220790  
    112112
    113113#if ENABLE(ENCRYPTED_MEDIA)
     114#include "GStreamerEMEUtilities.h"
    114115#include "SharedBuffer.h"
    115116#include "WebKitClearKeyDecryptorGStreamer.h"
     
    10491050
    10501051#if ENABLE(ENCRYPTED_MEDIA)
    1051     if (equalLettersIgnoringASCIICase(keySystem, "org.w3.clearkey"))
    1052         result = true;
     1052    result = GStreamerEMEUtilities::isClearKeyKeySystem(keySystem);
    10531053#endif
    10541054
  • trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp

    r219980 r220790  
    2626
    2727#include "GRefPtrGStreamer.h"
     28#include "GStreamerEMEUtilities.h"
    2829#include <gcrypt.h>
    2930#include <gst/base/gstbytereader.h>
     
    5556    GST_PAD_SINK,
    5657    GST_PAD_ALWAYS,
    57     GST_STATIC_CAPS("application/x-cenc, original-media-type=(string)video/x-h264, protection-system=(string)" CLEAR_KEY_PROTECTION_SYSTEM_UUID "; "
    58     "application/x-cenc, original-media-type=(string)audio/mpeg, protection-system=(string)" CLEAR_KEY_PROTECTION_SYSTEM_UUID));
     58    GST_STATIC_CAPS("application/x-cenc, original-media-type=(string)video/x-h264, protection-system=(string)" WEBCORE_GSTREAMER_EME_UTILITIES_CLEARKEY_UUID "; "
     59    "application/x-cenc, original-media-type=(string)audio/mpeg, protection-system=(string)" WEBCORE_GSTREAMER_EME_UTILITIES_CLEARKEY_UUID));
    5960
    6061static GstStaticPadTemplate srcTemplate = GST_STATIC_PAD_TEMPLATE("src",
     
    8586
    8687    WebKitMediaCommonEncryptionDecryptClass* cencClass = WEBKIT_MEDIA_CENC_DECRYPT_CLASS(klass);
    87     cencClass->protectionSystemId = CLEAR_KEY_PROTECTION_SYSTEM_UUID;
     88    cencClass->protectionSystemId = WebCore::GStreamerEMEUtilities::s_ClearKeyUUID;
    8889    cencClass->handleKeyResponse = GST_DEBUG_FUNCPTR(webKitMediaClearKeyDecryptorHandleKeyResponse);
    8990    cencClass->setupCipher = GST_DEBUG_FUNCPTR(webKitMediaClearKeyDecryptorSetupCipher);
  • trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h

    r217966 r220790  
    2525
    2626#include "WebKitCommonEncryptionDecryptorGStreamer.h"
    27 
    28 #define CLEAR_KEY_PROTECTION_SYSTEM_UUID "58147ec8-0423-4659-92e6-f52c5ce8c3cc"
    29 #define CLEAR_KEY_PROTECTION_SYSTEM_ID "org.w3.clearkey"
    3027
    3128G_BEGIN_DECLS
Note: See TracChangeset for help on using the changeset viewer.