Title: [234362] trunk
Revision
234362
Author
[email protected]
Date
2018-07-30 06:06:24 -0700 (Mon, 30 Jul 2018)

Log Message

[GStreamer] Make codecparsers optionnal
https://bugs.webkit.org/show_bug.cgi?id=188010

And avoid building libWebRTC if it won't be used. While there is no other
WebRTC backend, it makes no sense to expose an option.

Error out when WEBRTC or MEDIA_STREAM is enabled but GStreamer < 1.10

Patch by Thibault Saunier <[email protected]> on 2018-07-30
Reviewed by Alejandro G. Castro.

.:

* Source/cmake/GStreamerChecks.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

* platform/GStreamer.cmake:

Modified Paths

Diff

Modified: trunk/ChangeLog (234361 => 234362)


--- trunk/ChangeLog	2018-07-30 11:31:45 UTC (rev 234361)
+++ trunk/ChangeLog	2018-07-30 13:06:24 UTC (rev 234362)
@@ -1,3 +1,19 @@
+2018-07-30  Thibault Saunier  <[email protected]>
+
+        [GStreamer] Make codecparsers optionnal
+        https://bugs.webkit.org/show_bug.cgi?id=188010
+
+        And avoid building libWebRTC if it won't be used. While there is no other
+        WebRTC backend, it makes no sense to expose an option.
+
+        Error out when WEBRTC or MEDIA_STREAM is enabled but GStreamer < 1.10
+
+        Reviewed by Alejandro G. Castro.
+
+        * Source/cmake/GStreamerChecks.cmake:
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+
 2018-07-26  Andy VanWagoner  <[email protected]>
 
         [INTL] Remove INTL sub-feature compile flags

Modified: trunk/Source/WebCore/ChangeLog (234361 => 234362)


--- trunk/Source/WebCore/ChangeLog	2018-07-30 11:31:45 UTC (rev 234361)
+++ trunk/Source/WebCore/ChangeLog	2018-07-30 13:06:24 UTC (rev 234362)
@@ -1,3 +1,17 @@
+2018-07-30  Thibault Saunier  <[email protected]>
+
+        [GStreamer] Make codecparsers optionnal
+        https://bugs.webkit.org/show_bug.cgi?id=188010
+
+        And avoid building libWebRTC if it won't be used. While there is no other
+        WebRTC backend, it makes no sense to expose an option.
+
+        Error out when WEBRTC or MEDIA_STREAM is enabled but GStreamer < 1.10
+
+        Reviewed by Alejandro G. Castro.
+
+        * platform/GStreamer.cmake:
+
 2018-07-28  Darin Adler  <[email protected]>
 
         [Cocoa] Update more WebCore Objective-C code to be ARC compatible

Modified: trunk/Source/WebCore/platform/GStreamer.cmake (234361 => 234362)


--- trunk/Source/WebCore/platform/GStreamer.cmake	2018-07-30 11:31:45 UTC (rev 234361)
+++ trunk/Source/WebCore/platform/GStreamer.cmake	2018-07-30 13:06:24 UTC (rev 234362)
@@ -60,7 +60,6 @@
         ${GSTREAMER_BASE_INCLUDE_DIRS}
         ${GSTREAMER_APP_INCLUDE_DIRS}
         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
-        ${GSTREAMER_CODECPARSERS_INCLUDE_DIRS}
     )
 
     list(APPEND WebCore_LIBRARIES
@@ -69,7 +68,6 @@
         ${GSTREAMER_LIBRARIES}
         ${GSTREAMER_PBUTILS_LIBRARIES}
         ${GSTREAMER_AUDIO_LIBRARIES}
-        ${GSTREAMER_CODECPARSERS_LIBRARIES}
     )
 
     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
@@ -108,13 +106,17 @@
         )
     endif ()
 
-    if (USE_LIBWEBRTC)
-        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
-            ${GSTREAMER_CODECPARSERS_INCLUDE_DIRS}
-        )
-        list(APPEND WebCore_LIBRARIES
-            ${GSTREAMER_CODECPARSERS_LIBRARIES}
-        )
+    if (ENABLE_MEDIA_STREAM OR ENABLE_WEB_RTC)
+        if (PC_GSTREAMER_VERSION VERSION_LESS "1.10")
+            message(FATAL_ERROR "GStreamer 1.10 is needed for ENABLE_MEDIA_STREAM or ENABLE_WEB_RTC")
+        else ()
+            list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+                ${GSTREAMER_CODECPARSERS_INCLUDE_DIRS}
+            )
+            list(APPEND WebCore_LIBRARIES
+                ${GSTREAMER_CODECPARSERS_LIBRARIES}
+            )
+        endif ()
     endif ()
 endif ()
 

Modified: trunk/Source/cmake/GStreamerChecks.cmake (234361 => 234362)


--- trunk/Source/cmake/GStreamerChecks.cmake	2018-07-30 11:31:45 UTC (rev 234361)
+++ trunk/Source/cmake/GStreamerChecks.cmake	2018-07-30 13:06:24 UTC (rev 234362)
@@ -44,3 +44,16 @@
 
     SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
 endif ()
+
+if (ENABLE_MEDIA_STREAM OR ENABLE_WEB_RTC)
+    if (PC_GSTREAMER_VERSION VERSION_LESS "1.10")
+        SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE)
+        SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD FALSE)
+    else ()
+        SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE)
+        SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD TRUE)
+    endif ()
+else ()
+    SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE)
+    SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD FALSE)
+endif ()
\ No newline at end of file

Modified: trunk/Source/cmake/OptionsGTK.cmake (234361 => 234362)


--- trunk/Source/cmake/OptionsGTK.cmake	2018-07-30 11:31:45 UTC (rev 234361)
+++ trunk/Source/cmake/OptionsGTK.cmake	2018-07-30 13:06:24 UTC (rev 234362)
@@ -89,7 +89,6 @@
 # completely unsupported. They are intended for use only by WebKit developers.
 WEBKIT_OPTION_DEFINE(USE_REDIRECTED_XCOMPOSITE_WINDOW "Whether to use a Redirected XComposite Window for accelerated compositing in X11." PRIVATE ON)
 WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
-WEBKIT_OPTION_DEFINE(USE_LIBWEBRTC "Whether to use libwebrtc for WebRTC support" PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
 # FIXME: Can we use cairo-glesv2 to avoid this conflict?
 WEBKIT_OPTION_CONFLICT(ENABLE_ACCELERATED_2D_CANVAS ENABLE_GLES2)
@@ -102,8 +101,6 @@
 WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_OPENGL)
 WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_X11_TARGET)
 
-WEBKIT_OPTION_DEPEND(USE_LIBWEBRTC ENABLE_WEB_RTC)
-
 SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
 if (DEVELOPER_MODE)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER PUBLIC ON)
@@ -225,12 +222,6 @@
     endif ()
 endif ()
 
-if (ENABLE_MEDIA_STREAM OR ENABLE_WEB_RTC)
-    set(USE_LIBWEBRTC TRUE)
-    SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE)
-    SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD TRUE)
-endif ()
-
 if (ENABLE_SUBTLE_CRYPTO)
     find_package(Libtasn1 REQUIRED)
     if (NOT LIBTASN1_FOUND)

Modified: trunk/Source/cmake/OptionsWPE.cmake (234361 => 234362)


--- trunk/Source/cmake/OptionsWPE.cmake	2018-07-30 11:31:45 UTC (rev 234361)
+++ trunk/Source/cmake/OptionsWPE.cmake	2018-07-30 13:06:24 UTC (rev 234362)
@@ -50,10 +50,7 @@
 
 # Private options specific to the WPE port.
 WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
-WEBKIT_OPTION_DEFINE(USE_LIBWEBRTC "Whether to use libwebrtc for WebRTC support" PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
-WEBKIT_OPTION_DEPEND(USE_LIBWEBRTC ENABLE_WEB_RTC)
-
 if (CMAKE_SYSTEM_NAME MATCHES "Linux")
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_USAGE PRIVATE ON)
@@ -115,12 +112,6 @@
     find_package(LibXslt 1.1.7 REQUIRED)
 endif ()
 
-if (ENABLE_MEDIA_STREAM OR ENABLE_WEB_RTC)
-    set(USE_LIBWEBRTC TRUE)
-    SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE)
-    SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD TRUE)
-endif ()
-
 add_definitions(-DBUILDING_WPE__=1)
 add_definitions(-DGETTEXT_PACKAGE="WPE")
 add_definitions(-DJSC_GLIB_API_ENABLED)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to