From e65a4315aef312f2ebbc1727097146fa59351d64 Mon Sep 17 00:00:00 2001 From: "philn@webkit.org" Date: Tue, 17 Mar 2015 08:39:05 +0000 Subject: [PATCH] [GTK] basic OpenWebRTC build support https://bugs.webkit.org/show_bug.cgi?id=142393 Reviewed by Carlos Garcia Campos. .: * Source/cmake/FindOpenWebRTC.cmake: Added. * Source/cmake/OptionsGTK.cmake: Look for OpenWebRTC library if mediastream build is enabled. Source/WebCore: * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS. Tools: * gtk/jhbuild.modules: Add OpenWebRTC and its dependencies. This is not the upstream OpenWebRTC repository. This temporary fork contains a few patches needed by WebKit for audio/video rendering. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181624 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- ChangeLog | 11 +++++++++ Source/WebCore/ChangeLog | 9 +++++++ Source/WebCore/PlatformGTK.cmake | 9 +++++++ Source/cmake/FindOpenWebRTC.cmake | 49 +++++++++++++++++++++++++++++++++++++++ Source/cmake/OptionsGTK.cmake | 7 ++++++ Tools/ChangeLog | 11 +++++++++ Tools/gtk/install-dependencies | 4 ++++ Tools/gtk/jhbuild.modules | 33 +++++++++++++++++++++++++- 8 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 Source/cmake/FindOpenWebRTC.cmake diff --git a/ChangeLog b/ChangeLog index caea661..8077c697 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2015-03-17 Philippe Normand + + [GTK] basic OpenWebRTC build support + https://bugs.webkit.org/show_bug.cgi?id=142393 + + Reviewed by Carlos Garcia Campos. + + * Source/cmake/FindOpenWebRTC.cmake: Added. + * Source/cmake/OptionsGTK.cmake: Look for OpenWebRTC library if + mediastream build is enabled. + 2015-03-17 Gyuyoung Kim [CMake][EFL] Build test tools only for developer mode diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index e055263..230b3f4 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,12 @@ +2015-03-17 Philippe Normand + + [GTK] basic OpenWebRTC build support + https://bugs.webkit.org/show_bug.cgi?id=142393 + + Reviewed by Carlos Garcia Campos. + + * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS. + 2015-03-17 Joseph Pecoraro Remove never used "useLayerOnTop" bindings generator argument diff --git a/Source/WebCore/PlatformGTK.cmake b/Source/WebCore/PlatformGTK.cmake index 3dc88af..dd26490 100644 --- a/Source/WebCore/PlatformGTK.cmake +++ b/Source/WebCore/PlatformGTK.cmake @@ -368,6 +368,15 @@ if (ENABLE_WEB_AUDIO) ) endif () +if (ENABLE_MEDIA_STREAM) + list(APPEND WebCore_INCLUDE_DIRECTORIES + ${OPENWEBRTC_INCLUDE_DIRS} + ) + list(APPEND WebCore_LIBRARIES + ${OPENWEBRTC_LIBRARIES} + ) +endif () + if (ENABLE_TEXTURE_MAPPER) list(APPEND WebCore_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/graphics/texmap" diff --git a/Source/cmake/FindOpenWebRTC.cmake b/Source/cmake/FindOpenWebRTC.cmake new file mode 100644 index 0000000..9605326 --- /dev/null +++ b/Source/cmake/FindOpenWebRTC.cmake @@ -0,0 +1,49 @@ +# - Try to find OpenWebRTC. +# Once done, this will define +# +# OPENWEBRTC_FOUND - system has OpenWebRTC. +# OPENWEBRTC_INCLUDE_DIRS - the OpenWebRTC include directories +# OPENWEBRTC_LIBRARIES - link these to use OpenWebRTC. +# +# Copyright (C) 2015 Igalia S.L. +# Copyright (C) 2015 Metrological. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS +# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +find_package(PkgConfig) +pkg_check_modules(OPENWEBRTC openwebrtc-0.1) + +set(VERSION_OK TRUE) +if (OPENWEBRTC_VERSION) + if (OPENWEBRTC_FIND_VERSION_EXACT) + if (NOT("${OPENWEBRTC_FIND_VERSION}" VERSION_EQUAL "${OPENWEBRTC_VERSION}")) + set(VERSION_OK FALSE) + endif () + else () + if ("${OPENWEBRTC_VERSION}" VERSION_LESS "${OPENWEBRTC_FIND_VERSION}") + set(VERSION_OK FALSE) + endif () + endif () +endif () + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENWEBRTC DEFAULT_MSG OPENWEBRTC_INCLUDE_DIRS OPENWEBRTC_LIBRARIES VERSION_OK) diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake index 6ce63cc..3563afb 100644 --- a/Source/cmake/OptionsGTK.cmake +++ b/Source/cmake/OptionsGTK.cmake @@ -304,6 +304,13 @@ if (ENABLE_GEOLOCATION) endif () endif () +if (ENABLE_MEDIA_STREAM) + find_package(OpenWebRTC) + if (OPENWEBRTC_FOUND) + add_definitions(-DWTF_USE_OPENWEBRTC) + endif () +endif () + find_package(GTKUnixPrint) if (GTK_UNIX_PRINT_FOUND) set(HAVE_GTK_UNIX_PRINTING 1) diff --git a/Tools/ChangeLog b/Tools/ChangeLog index c65eee3..07c31ac 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,14 @@ +2015-03-17 Philippe Normand + + [GTK] basic OpenWebRTC build support + https://bugs.webkit.org/show_bug.cgi?id=142393 + + Reviewed by Carlos Garcia Campos. + + * gtk/jhbuild.modules: Add OpenWebRTC and its dependencies. This + is not the upstream OpenWebRTC repository. This temporary fork + contains a few patches needed by WebKit for audio/video rendering. + 2015-03-17 Gyuyoung Kim [CMake][EFL] Build test tools only for developer mode diff --git a/Tools/gtk/install-dependencies b/Tools/gtk/install-dependencies index f9df271..00324e6 100755 --- a/Tools/gtk/install-dependencies +++ b/Tools/gtk/install-dependencies @@ -121,9 +121,13 @@ function installDependenciesWithApt { libegl1-mesa-dev \ libgcrypt11-dev \ libgpg-error-dev \ + libjson-glib-dev \ + liborc-0.4-dev \ libp11-kit-dev \ libpciaccess-dev \ + libssl-dev \ libtiff5-dev \ + libv4l-dev \ libxcb-xfixes0-dev \ libxfont-dev \ libxkbfile-dev \ diff --git a/Tools/gtk/jhbuild.modules b/Tools/gtk/jhbuild.modules index 0a23896..ff4b756 100644 --- a/Tools/gtk/jhbuild.modules +++ b/Tools/gtk/jhbuild.modules @@ -30,6 +30,7 @@ + @@ -57,7 +58,10 @@ href="http://gstreamer.freedesktop.org/src/"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 1.8.3.1