Skip to content

Commit

Permalink
Drop LEGACY_ENCRYPTED_MEDIA code.
Browse files Browse the repository at this point in the history
  • Loading branch information
zdobersek committed Nov 20, 2017
1 parent c0aadeb commit db8ce0b
Show file tree
Hide file tree
Showing 41 changed files with 40 additions and 1,603 deletions.
3 changes: 2 additions & 1 deletion Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDM.cpp
Expand Up @@ -24,10 +24,11 @@
*/ */


#include "config.h" #include "config.h"
#include "LegacyCDM.h"


#if ENABLE(LEGACY_ENCRYPTED_MEDIA) #if ENABLE(LEGACY_ENCRYPTED_MEDIA)


#include "LegacyCDM.h"

#include "LegacyCDMPrivateClearKey.h" #include "LegacyCDMPrivateClearKey.h"
#include "LegacyCDMPrivateMediaPlayer.h" #include "LegacyCDMPrivateMediaPlayer.h"
#include "LegacyCDMSession.h" #include "LegacyCDMSession.h"
Expand Down
Expand Up @@ -28,9 +28,9 @@


#if ENABLE(LEGACY_ENCRYPTED_MEDIA) #if ENABLE(LEGACY_ENCRYPTED_MEDIA)


#include "ContentType.h"
#include "LegacyCDM.h" #include "LegacyCDM.h"
#include "LegacyCDMSessionClearKey.h" #include "LegacyCDMSessionClearKey.h"
#include "ContentType.h"
#include "MediaPlayer.h" #include "MediaPlayer.h"


namespace WebCore { namespace WebCore {
Expand Down
Expand Up @@ -28,9 +28,9 @@


#if ENABLE(LEGACY_ENCRYPTED_MEDIA) #if ENABLE(LEGACY_ENCRYPTED_MEDIA)


#include "ContentType.h"
#include "LegacyCDM.h" #include "LegacyCDM.h"
#include "LegacyCDMSession.h" #include "LegacyCDMSession.h"
#include "ContentType.h"
#include "MediaPlayer.h" #include "MediaPlayer.h"


#if PLATFORM(IOS) #if PLATFORM(IOS)
Expand Down
Expand Up @@ -28,10 +28,10 @@
#if ENABLE(LEGACY_ENCRYPTED_MEDIA) #if ENABLE(LEGACY_ENCRYPTED_MEDIA)


#include "ActiveDOMObject.h" #include "ActiveDOMObject.h"
#include "LegacyCDMSession.h"
#include "EventTarget.h" #include "EventTarget.h"
#include "ExceptionOr.h" #include "ExceptionOr.h"
#include "GenericEventQueue.h" #include "GenericEventQueue.h"
#include "LegacyCDMSession.h"
#include "Timer.h" #include "Timer.h"
#include <runtime/Uint8Array.h> #include <runtime/Uint8Array.h>
#include <wtf/Deque.h> #include <wtf/Deque.h>
Expand Down
Expand Up @@ -27,8 +27,8 @@


#if ENABLE(LEGACY_ENCRYPTED_MEDIA) #if ENABLE(LEGACY_ENCRYPTED_MEDIA)


#include "ExceptionOr.h"
#include "LegacyCDM.h" #include "LegacyCDM.h"
#include "ExceptionOr.h"


#include <runtime/Uint8Array.h> #include <runtime/Uint8Array.h>
#include <wtf/Vector.h> #include <wtf/Vector.h>
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/dom/Element.idl
Expand Up @@ -130,7 +130,7 @@
[NotEnumerable] attribute EventHandler onbeforeload; [NotEnumerable] attribute EventHandler onbeforeload;


// Non standard event handler (https://developer.apple.com/reference/webkitjs/element/1634205-onwebkitneedkey). // Non standard event handler (https://developer.apple.com/reference/webkitjs/element/1634205-onwebkitneedkey).
[NotEnumerable, Conditional=LEGACY_ENCRYPTED_MEDIA] attribute EventHandler onwebkitneedkey; [NotEnumerable, Conditional=LEGACY_ENCRYPTED_MEDIA, EnabledAtRuntime=LegacyEncryptedMediaAPI] attribute EventHandler onwebkitneedkey;


// Non standard event handler (https://developer.apple.com/reference/webkitjs/element/1633943-onwebkitpresentationmodechanged). // Non standard event handler (https://developer.apple.com/reference/webkitjs/element/1633943-onwebkitpresentationmodechanged).
[NotEnumerable, Conditional=VIDEO_PRESENTATION_MODE] attribute EventHandler onwebkitpresentationmodechanged; [NotEnumerable, Conditional=VIDEO_PRESENTATION_MODE] attribute EventHandler onwebkitpresentationmodechanged;
Expand Down
3 changes: 1 addition & 2 deletions Source/WebCore/html/HTMLMediaElement.cpp
Expand Up @@ -1145,13 +1145,12 @@ HTMLMediaElement::NetworkState HTMLMediaElement::networkState() const
return m_networkState; return m_networkState;
} }


String HTMLMediaElement::canPlayType(const String& mimeType, const String& keySystem) const String HTMLMediaElement::canPlayType(const String& mimeType) const
{ {
MediaEngineSupportParameters parameters; MediaEngineSupportParameters parameters;
ContentType contentType(mimeType); ContentType contentType(mimeType);
parameters.type = contentType; parameters.type = contentType;
parameters.contentTypesRequiringHardwareSupport = mediaContentTypesRequiringHardwareSupport(); parameters.contentTypesRequiringHardwareSupport = mediaContentTypesRequiringHardwareSupport();
UNUSED_PARAM(keySystem);
MediaPlayer::SupportsType support = MediaPlayer::supportsType(parameters, this); MediaPlayer::SupportsType support = MediaPlayer::supportsType(parameters, this);
String canPlay; String canPlay;


Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/html/HTMLMediaElement.h
Expand Up @@ -216,7 +216,7 @@ class HTMLMediaElement


Ref<TimeRanges> buffered() const override; Ref<TimeRanges> buffered() const override;
WEBCORE_EXPORT void load(); WEBCORE_EXPORT void load();
WEBCORE_EXPORT String canPlayType(const String& mimeType, const String& keySystem = String()) const; WEBCORE_EXPORT String canPlayType(const String& mimeType) const;


// ready state // ready state
using HTMLMediaElementEnums::ReadyState; using HTMLMediaElementEnums::ReadyState;
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/html/HTMLMediaElement.idl
Expand Up @@ -59,11 +59,7 @@ typedef (
readonly attribute TimeRanges buffered; readonly attribute TimeRanges buffered;
void load(); void load();


#if defined(ENABLE_LEGACY_ENCRYPTED_MEDIA) && ENABLE_LEGACY_ENCRYPTED_MEDIA
DOMString canPlayType(DOMString type, optional DOMString? keySystem = null);
#else
DOMString canPlayType(DOMString type); DOMString canPlayType(DOMString type);
#endif


// ready state // ready state
const unsigned short HAVE_NOTHING = 0; const unsigned short HAVE_NOTHING = 0;
Expand Down
39 changes: 0 additions & 39 deletions Source/WebCore/platform/GStreamer.cmake
Expand Up @@ -137,45 +137,6 @@ if (ENABLE_WEB_AUDIO)
) )
endif () endif ()


if (ENABLE_LEGACY_ENCRYPTED_MEDIA)
list(APPEND WebCore_INCLUDE_DIRECTORIES
${LIBGCRYPT_INCLUDE_DIRS}
)
list(APPEND WebCore_LIBRARIES
${LIBGCRYPT_LIBRARIES} -lgpg-error
)

if (ENABLE_PLAYREADY)
list(APPEND WebCore_LIBRARIES
${PLAYREADY_LIBRARIES}
)
list(APPEND WebCore_INCLUDE_DIRECTORIES
${PLAYREADY_INCLUDE_DIRS}
)
add_definitions(${PLAYREADY_CFLAGS_OTHER})
foreach(p ${PLAYREADY_INCLUDE_DIRS})
if (EXISTS "${p}/playready.cmake")
include("${p}/playready.cmake")
endif()
endforeach()
list(APPEND WebCore_SOURCES
platform/graphics/gstreamer/eme/CDMPRSessionGStreamer.cpp
platform/graphics/gstreamer/eme/PlayreadySession.cpp
platform/graphics/gstreamer/eme/WebKitPlayReadyDecryptorGStreamer.cpp
)
endif ()

if (ENABLE_OPENCDM)
list(APPEND WebCore_SOURCES
platform/graphics/gstreamer/eme/CDMPrivateOpenCDM.cpp
platform/graphics/gstreamer/eme/CDMSessionOpenCDM.cpp
platform/graphics/gstreamer/eme/WebKitOpenCDMDecryptorGStreamer.cpp
platform/graphics/gstreamer/eme/WebKitOpenCDMPlayReadyDecryptorGStreamer.cpp
platform/graphics/gstreamer/eme/WebKitOpenCDMWidevineDecryptorGStreamer.cpp
)
endif ()
endif ()

if (ENABLE_ENCRYPTED_MEDIA) if (ENABLE_ENCRYPTED_MEDIA)
list(APPEND WebCore_INCLUDE_DIRECTORIES list(APPEND WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/platform/encryptedmedia/clearkey" "${WEBCORE_DIR}/platform/encryptedmedia/clearkey"
Expand Down
86 changes: 0 additions & 86 deletions Source/WebCore/platform/graphics/CDMSession.h

This file was deleted.

2 changes: 0 additions & 2 deletions Source/WebCore/platform/graphics/MediaPlayer.h
Expand Up @@ -390,9 +390,7 @@ class MediaPlayer : public MediaPlayerEnums, public RefCounted<MediaPlayer> {
// Represents synchronous exceptions that can be thrown from the Encrypted Media methods. // Represents synchronous exceptions that can be thrown from the Encrypted Media methods.
// This is different from the asynchronous MediaKeyError. // This is different from the asynchronous MediaKeyError.
enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported }; enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported };
#endif


#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
std::unique_ptr<CDMSession> createSession(const String& keySystem, CDMSessionClient*); std::unique_ptr<CDMSession> createSession(const String& keySystem, CDMSessionClient*);
void setCDMSession(CDMSession*); void setCDMSession(CDMSession*);
void keyAdded(); void keyAdded();
Expand Down
Expand Up @@ -1163,17 +1163,12 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
m_buffering = false; m_buffering = false;
updateStates(); updateStates();
} }
#if ENABLE(LEGACY_ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA) #if ENABLE(ENCRYPTED_MEDIA)
else if (gst_structure_has_name(structure, "drm-key-needed")) { else if (gst_structure_has_name(structure, "drm-key-needed")) {
GST_DEBUG("drm-key-needed message from %s", GST_MESSAGE_SRC_NAME(message)); GST_DEBUG("drm-key-needed message from %s", GST_MESSAGE_SRC_NAME(message));
GRefPtr<GstEvent> event; GRefPtr<GstEvent> event;
gst_structure_get(structure, "event", GST_TYPE_EVENT, &event.outPtr(), nullptr); gst_structure_get(structure, "event", GST_TYPE_EVENT, &event.outPtr(), nullptr);
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
handleProtectionEvent(event.get(), GST_ELEMENT(message->src));
#endif
#if ENABLE(ENCRYPTED_MEDIA)
handleProtectionEvent(event.get()); handleProtectionEvent(event.get());
#endif
} }
#endif #endif
} }
Expand Down

0 comments on commit db8ce0b

Please sign in to comment.