Support ENABLE_ENCRYPTED_MEDIA in cmake builds
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Mar 2014 17:55:29 +0000 (17:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Mar 2014 17:55:29 +0000 (17:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129575

Patch by Dirkjan Ochtman <d.ochtman@activevideo.com> on 2014-03-02
Reviewed by Philippe Normand.

.:

* Source/cmake/OptionsEfl.cmake:
Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
* Source/cmake/OptionsGTK.cmake:
Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
* Source/cmake/WebKitFeatures.cmake:
Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
* Source/cmakeconfig.h.cmake:
Added ENABLE_ENCRYPTED_MEDIA{,_V2} flags.

Source/WebCore:

No new tests, only fixes the build.

* CMakeLists.txt:
Add support for ENABLE_ENCRYPTED_MEDIA.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::close):
Assign nullptr instead of 0 to OwnPtr to appease gcc-4.7.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164943 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp
Source/cmake/OptionsEfl.cmake
Source/cmake/OptionsGTK.cmake
Source/cmake/WebKitFeatures.cmake
Source/cmakeconfig.h.cmake

index ddf39c0..cea9936 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-03-02  Dirkjan Ochtman  <d.ochtman@activevideo.com>
+
+        Support ENABLE_ENCRYPTED_MEDIA in cmake builds
+        https://bugs.webkit.org/show_bug.cgi?id=129575
+
+        Reviewed by Philippe Normand.
+
+        * Source/cmake/OptionsEfl.cmake:
+        Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
+        * Source/cmake/OptionsGTK.cmake:
+        Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
+        * Source/cmake/WebKitFeatures.cmake:
+        Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
+        * Source/cmakeconfig.h.cmake:
+        Added ENABLE_ENCRYPTED_MEDIA{,_V2} flags.
+
 2014-02-27  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
 
         Enable support of X-Content-Type-Options: nosniff header for EFL
index b218b6b..2347b57 100644 (file)
@@ -1,6 +1,7 @@
 set(WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}"
     "${WEBCORE_DIR}/Modules/battery"
+    "${WEBCORE_DIR}/Modules/encryptedmedia"
     "${WEBCORE_DIR}/Modules/gamepad"
     "${WEBCORE_DIR}/Modules/geolocation"
     "${WEBCORE_DIR}/Modules/indexeddb"
@@ -124,6 +125,7 @@ set(WebCore_INCLUDE_DIRECTORIES
 
 set(WebCore_IDL_INCLUDES
     Modules/battery
+    Modules/encryptedmedia
     Modules/gamepad
     Modules/geolocation
     Modules/indexeddb
@@ -2568,6 +2570,25 @@ set(WebCore_LIBRARIES
     WTF
 )
 
+if (ENABLE_ENCRYPTED_MEDIA OR ENABLE_ENCRYPTED_MEDIA_V2)
+    list(APPEND WebCore_SOURCES
+        Modules/encryptedmedia/CDM.cpp
+        Modules/encryptedmedia/MediaKeyMessageEvent.cpp
+        Modules/encryptedmedia/MediaKeyNeededEvent.cpp
+        Modules/encryptedmedia/MediaKeys.cpp
+        Modules/encryptedmedia/MediaKeySession.cpp
+        html/MediaKeyEvent.cpp
+    )
+    list(APPEND WebCore_IDL_FILES
+        Modules/encryptedmedia/MediaKeyMessageEvent.idl
+        Modules/encryptedmedia/MediaKeyNeededEvent.idl
+        Modules/encryptedmedia/MediaKeySession.idl
+        Modules/encryptedmedia/MediaKeys.idl
+        html/MediaKeyEvent.idl
+        html/MediaKeyError.idl
+    )
+endif ()
+
 if (ENABLE_SQL_DATABASE)
     list(APPEND WebCore_SOURCES
         Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
index 77d3f6c..f1bca34 100644 (file)
@@ -1,3 +1,18 @@
+2014-03-02  Dirkjan Ochtman  <d.ochtman@activevideo.com>
+
+        Support ENABLE_ENCRYPTED_MEDIA in cmake builds
+        https://bugs.webkit.org/show_bug.cgi?id=129575
+
+        Reviewed by Philippe Normand.
+
+        No new tests, only fixes the build.
+
+        * CMakeLists.txt:
+        Add support for ENABLE_ENCRYPTED_MEDIA.
+        * Modules/encryptedmedia/MediaKeySession.cpp:
+        (WebCore::MediaKeySession::close):
+        Assign nullptr instead of 0 to OwnPtr to appease gcc-4.7.
+
 2014-03-01  Tim Horton  <timothy_horton@apple.com>
 
         WebKit2 View Gestures (Smart Magnification): Support for iOS
index 442fd7b..0455a19 100644 (file)
@@ -68,7 +68,7 @@ void MediaKeySession::close()
 {
     if (m_session)
         m_session->releaseKeys();
-    m_session = 0;
+    m_session = nullptr;
     m_asyncEventQueue.cancelAllEvents();
 }
 
index 096bfed..654cac5 100644 (file)
@@ -68,6 +68,8 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATALIST_ELEMENT ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOM4_EVENTS_CONSTRUCTOR ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA_V2 OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FAST_MOBILE_SCROLLING ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API ON)
index 2dc9f41..cf0af56 100644 (file)
@@ -44,6 +44,8 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CUSTOM_SCHEME_HANDLER OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATALIST_ELEMENT ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA_V2 OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FAST_MOBILE_SCROLLING ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API ON)
index 0309c41..a7fac75 100644 (file)
@@ -48,6 +48,8 @@ macro(WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_DOM4_EVENTS_CONSTRUCTOR "Toggle DOM4 Events constructors" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_DOWNLOAD_ATTRIBUTE "Toggle download attribute support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_DRAG_SUPPORT "Toggle Drag Support" OFF)
+    WEBKIT_OPTION_DEFINE(ENABLE_ENCRYPTED_MEDIA "Toggle EME support" OFF)
+    WEBKIT_OPTION_DEFINE(ENABLE_ENCRYPTED_MEDIA_V2 "Support EME v2" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_FAST_MOBILE_SCROLLING "Toggle Fast Mobile Scrolling support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_FILTERS "Toggle SVG Filters support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_FONT_LOAD_EVENTS "Toggle Font Load Events support" OFF)
index 7bccbe1..1b955b4 100644 (file)
@@ -38,6 +38,8 @@
 #cmakedefine01 ENABLE_DOM4_EVENTS_CONSTRUCTOR
 #cmakedefine01 ENABLE_DOWNLOAD_ATTRIBUTE
 #cmakedefine01 ENABLE_DRAG_SUPPORT
+#cmakedefine01 ENABLE_ENCRYPTED_MEDIA
+#cmakedefine01 ENABLE_ENCRYPTED_MEDIA_V2
 #cmakedefine01 ENABLE_EVENT_MODE_METATAGS
 #cmakedefine01 ENABLE_FAST_MOBILE_SCROLLING
 #cmakedefine01 ENABLE_FILTERS