Title: [115800] trunk
Revision
115800
Author
[email protected]
Date
2012-05-02 00:58:30 -0700 (Wed, 02 May 2012)

Log Message

[EFL] Implement the Web Audio API feature.
https://bugs.webkit.org/show_bug.cgi?id=78688

Patch by Dongwoo Im <[email protected]> on 2012-05-02
Reviewed by Philippe Normand.

Implement the Web Audio API feature on the EFL port.
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html

.:

* Source/cmake/FindGStreamer-Audio.cmake: Added. Find the pkgconfig of the GStreamer-audio.
* Source/cmake/FindGStreamer-FFT.cmake: Added. Find the pkgconfig of the GStreamer-fft.
* Source/cmake/OptionsEfl.cmake: Add the ENABLE_WEB_AUDIO option.
* Source/cmakeconfig.h.cmake: Add the ENABLE_WEB_AUDIO option.

Source/WebCore:

* CMakeLists.txt: Add the list of the files which are needed for the Web Audio APi.
* PlatformEfl.cmake: Add the list of the files which are needed for the Web Audio APi.
* UseJSC.cmake: Add the list of the files which are needed for the Web Audio APi.
* platform/audio/HRTFElevation.cpp: Enable the USE_CONCATENATED_IMPULSE_RESPONSES macro.
(WebCore):
* platform/audio/efl/AudioBusEfl.cpp: Added.
(WebCore):
(WebCore::AudioBus::loadPlatformResource): Create the absolute path of the audio resource.

Source/WebKit/efl:

* ewk/ewk_view.cpp: Add the setter/getter of the webaudio feature.
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
(ewk_view_setting_web_audio_get): Enable/disable the Web Audio API feature.
(ewk_view_setting_web_audio_set): Query if the Web Audio API feature is enabled.
* ewk/ewk_view.h: Add the prototypes.

LayoutTests:

* platform/efl/Skipped: Change the comment of webaudio.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (115799 => 115800)


--- trunk/ChangeLog	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/ChangeLog	2012-05-02 07:58:30 UTC (rev 115800)
@@ -1,3 +1,18 @@
+2012-05-02  Dongwoo Im  <[email protected]>
+
+        [EFL] Implement the Web Audio API feature.
+        https://bugs.webkit.org/show_bug.cgi?id=78688
+
+        Reviewed by Philippe Normand.
+
+        Implement the Web Audio API feature on the EFL port.
+        https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
+
+        * Source/cmake/FindGStreamer-Audio.cmake: Added. Find the pkgconfig of the GStreamer-audio.
+        * Source/cmake/FindGStreamer-FFT.cmake: Added. Find the pkgconfig of the GStreamer-fft.
+        * Source/cmake/OptionsEfl.cmake: Add the ENABLE_WEB_AUDIO option.
+        * Source/cmakeconfig.h.cmake: Add the ENABLE_WEB_AUDIO option.
+
 2012-05-01  Landry Breuil  <[email protected]>
 
         [GTK] Fix gstreamer detection during configure

Modified: trunk/LayoutTests/ChangeLog (115799 => 115800)


--- trunk/LayoutTests/ChangeLog	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/LayoutTests/ChangeLog	2012-05-02 07:58:30 UTC (rev 115800)
@@ -1,3 +1,15 @@
+2012-05-02  Dongwoo Im  <[email protected]>
+
+        [EFL] Implement the Web Audio API feature.
+        https://bugs.webkit.org/show_bug.cgi?id=78688
+
+        Reviewed by Philippe Normand.
+
+        Implement the Web Audio API feature on the EFL port.
+        https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
+
+        * platform/efl/Skipped: Change the comment of webaudio.
+
 2012-05-01  Andrew Scherkus  <[email protected]>
 
         [Chromium] Adjust baseline location for media/media-can-play-type-webm.html.

Modified: trunk/LayoutTests/platform/efl/Skipped (115799 => 115800)


--- trunk/LayoutTests/platform/efl/Skipped	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/LayoutTests/platform/efl/Skipped	2012-05-02 07:58:30 UTC (rev 115800)
@@ -710,7 +710,7 @@
 svg/custom/image-with-prefix-in-webarchive.svg
 webarchive
 
-# The EFL port has no support for webaudio
+# For now, Web Audio API is disabled
 webaudio
 
 # The EFL port has no support for loading a PDF as an image

Modified: trunk/Source/WebCore/CMakeLists.txt (115799 => 115800)


--- trunk/Source/WebCore/CMakeLists.txt	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-05-02 07:58:30 UTC (rev 115800)
@@ -123,6 +123,7 @@
     Modules/geolocation/PositionErrorCallback.idl
 
     Modules/webaudio/AudioBuffer.idl
+    Modules/webaudio/AudioBufferCallback.idl
     Modules/webaudio/AudioBufferSourceNode.idl
     Modules/webaudio/AudioChannelSplitter.idl
     Modules/webaudio/AudioChannelMerger.idl
@@ -136,11 +137,18 @@
     Modules/webaudio/AudioParam.idl
     Modules/webaudio/AudioProcessingEvent.idl
     Modules/webaudio/AudioSourceNode.idl
+    Modules/webaudio/BiquadFilterNode.idl
     Modules/webaudio/ConvolverNode.idl
     Modules/webaudio/DOMWindowWebAudio.idl
     Modules/webaudio/DelayNode.idl
+    Modules/webaudio/DynamicsCompressorNode.idl
     Modules/webaudio/_javascript_AudioNode.idl
+    Modules/webaudio/MediaElementAudioSourceNode.idl
+    Modules/webaudio/OfflineAudioCompletionEvent.idl
+    Modules/webaudio/Oscillator.idl
     Modules/webaudio/RealtimeAnalyserNode.idl
+    Modules/webaudio/WaveShaperNode.idl
+    Modules/webaudio/WaveTable.idl
 
     Modules/websockets/CloseEvent.idl
     Modules/websockets/DOMWindowWebSocket.idl
@@ -2419,6 +2427,80 @@
     )
 ENDIF ()
 
+IF (ENABLE_WEB_AUDIO)
+    LIST(APPEND WebCore_SOURCES
+        Modules/webaudio/AsyncAudioDecoder.cpp
+        Modules/webaudio/AudioBasicProcessorNode.cpp
+        Modules/webaudio/AudioBuffer.cpp
+        Modules/webaudio/AudioBufferSourceNode.cpp
+        Modules/webaudio/AudioChannelMerger.cpp
+        Modules/webaudio/AudioChannelSplitter.cpp
+        Modules/webaudio/AudioContext.cpp
+        Modules/webaudio/AudioDestinationNode.cpp
+        Modules/webaudio/AudioGainNode.cpp
+        Modules/webaudio/AudioListener.cpp
+        Modules/webaudio/AudioNode.cpp
+        Modules/webaudio/AudioNodeInput.cpp
+        Modules/webaudio/AudioNodeOutput.cpp
+        Modules/webaudio/AudioPannerNode.cpp
+        Modules/webaudio/AudioParam.cpp
+        Modules/webaudio/AudioParamTimeline.cpp
+        Modules/webaudio/AudioProcessingEvent.cpp
+        Modules/webaudio/BiquadDSPKernel.cpp
+        Modules/webaudio/BiquadFilterNode.cpp
+        Modules/webaudio/BiquadProcessor.cpp
+        Modules/webaudio/ConvolverNode.cpp
+        Modules/webaudio/DefaultAudioDestinationNode.cpp
+        Modules/webaudio/DelayDSPKernel.cpp
+        Modules/webaudio/DelayNode.cpp
+        Modules/webaudio/DelayProcessor.cpp
+        Modules/webaudio/DynamicsCompressorNode.cpp
+        Modules/webaudio/_javascript_AudioNode.cpp
+        Modules/webaudio/MediaElementAudioSourceNode.cpp
+        Modules/webaudio/OfflineAudioCompletionEvent.cpp
+        Modules/webaudio/OfflineAudioDestinationNode.cpp
+        Modules/webaudio/Oscillator.cpp
+        Modules/webaudio/RealtimeAnalyser.cpp
+        Modules/webaudio/RealtimeAnalyserNode.cpp
+        Modules/webaudio/WaveShaperDSPKernel.cpp
+        Modules/webaudio/WaveShaperNode.cpp
+        Modules/webaudio/WaveShaperProcessor.cpp
+        Modules/webaudio/WaveTable.cpp
+
+        platform/audio/AudioBus.cpp
+        platform/audio/AudioChannel.cpp
+        platform/audio/AudioDSPKernelProcessor.cpp
+        platform/audio/AudioResampler.cpp
+        platform/audio/AudioResamplerKernel.cpp
+        platform/audio/AudioUtilities.cpp
+        platform/audio/Biquad.cpp
+        platform/audio/Cone.cpp
+        platform/audio/DirectConvolver.cpp
+        platform/audio/Distance.cpp
+        platform/audio/DynamicsCompressor.cpp
+        platform/audio/DynamicsCompressorKernel.cpp
+        platform/audio/EqualPowerPanner.cpp
+        platform/audio/FFTConvolver.cpp
+        platform/audio/FFTFrame.cpp
+        platform/audio/FFTFrameStub.cpp
+        platform/audio/HRTFDatabase.cpp
+        platform/audio/HRTFDatabaseLoader.cpp
+        platform/audio/HRTFElevation.cpp
+        platform/audio/HRTFKernel.cpp
+        platform/audio/HRTFPanner.cpp
+        platform/audio/MultiChannelResampler.cpp
+        platform/audio/Panner.cpp
+        platform/audio/ReverbAccumulationBuffer.cpp
+        platform/audio/ReverbConvolver.cpp
+        platform/audio/ReverbConvolverStage.cpp
+        platform/audio/Reverb.cpp
+        platform/audio/ReverbInputBuffer.cpp
+        platform/audio/SincResampler.cpp
+        platform/audio/VectorMath.cpp
+        platform/audio/ZeroPole.cpp
+    )
+ENDIF ()
+
 # Modules that the bindings generator scripts may use
 SET(SCRIPTS_RESOLVE_SUPPLEMENTAL
     ${WEBCORE_DIR}/bindings/scripts/IDLParser.pm

Modified: trunk/Source/WebCore/ChangeLog (115799 => 115800)


--- trunk/Source/WebCore/ChangeLog	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebCore/ChangeLog	2012-05-02 07:58:30 UTC (rev 115800)
@@ -1,3 +1,22 @@
+2012-05-02  Dongwoo Im  <[email protected]>
+
+        [EFL] Implement the Web Audio API feature.
+        https://bugs.webkit.org/show_bug.cgi?id=78688
+
+        Reviewed by Philippe Normand.
+
+        Implement the Web Audio API feature on the EFL port.
+        https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
+
+        * CMakeLists.txt: Add the list of the files which are needed for the Web Audio APi.
+        * PlatformEfl.cmake: Add the list of the files which are needed for the Web Audio APi.
+        * UseJSC.cmake: Add the list of the files which are needed for the Web Audio APi.
+        * platform/audio/HRTFElevation.cpp: Enable the USE_CONCATENATED_IMPULSE_RESPONSES macro.
+        (WebCore):
+        * platform/audio/efl/AudioBusEfl.cpp: Added.
+        (WebCore):
+        (WebCore::AudioBus::loadPlatformResource): Create the absolute path of the audio resource.
+
 2012-05-01  Kentaro Hara  <[email protected]>
 
         [V8] Add an Isolate parameter to setJSWrapperForXXX()

Modified: trunk/Source/WebCore/PlatformEfl.cmake (115799 => 115800)


--- trunk/Source/WebCore/PlatformEfl.cmake	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebCore/PlatformEfl.cmake	2012-05-02 07:58:30 UTC (rev 115800)
@@ -183,23 +183,6 @@
   )
 ENDIF ()
 
-IF (ENABLE_VIDEO)
-  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-    "${WEBCORE_DIR}/platform/graphics/gstreamer"
-  )
-  LIST(APPEND WebCore_SOURCES
-    platform/graphics/gstreamer/GRefPtrGStreamer.cpp
-    platform/graphics/gstreamer/GStreamerGWorld.cpp
-    platform/graphics/gstreamer/GStreamerUtilities.cpp
-    platform/graphics/gstreamer/GStreamerVersioning.cpp
-    platform/graphics/gstreamer/ImageGStreamerCairo.cpp
-    platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
-    platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
-    platform/graphics/gstreamer/VideoSinkGStreamer.cpp
-    platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
-  )
-ENDIF ()
-
 LIST(APPEND WebCore_LIBRARIES
   ${Cairo_LIBRARIES}
   ${ECORE_X_LIBRARIES}
@@ -217,15 +200,6 @@
   ${ZLIB_LIBRARIES}
 )
 
-IF (ENABLE_VIDEO)
-  LIST(APPEND WebCore_LIBRARIES
-    ${GStreamer-App_LIBRARIES}
-    ${GStreamer-Interfaces_LIBRARIES}
-    ${GStreamer-Pbutils_LIBRARIES}
-    ${GStreamer-Video_LIBRARIES}
-  )
-ENDIF ()
-
 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
   ${Cairo_INCLUDE_DIRS}
   ${ECORE_X_INCLUDE_DIRS}
@@ -241,13 +215,41 @@
   ${ZLIB_INCLUDE_DIRS}
 )
 
-IF (ENABLE_VIDEO)
+IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+    "${WEBCORE_DIR}/platform/graphics/gstreamer"
+
     ${GStreamer-App_INCLUDE_DIRS}
     ${GStreamer-Interfaces_INCLUDE_DIRS}
     ${GStreamer-Pbutils_INCLUDE_DIRS}
+  )
+  LIST(APPEND WebCore_SOURCES
+    platform/graphics/gstreamer/GRefPtrGStreamer.cpp
+    platform/graphics/gstreamer/GStreamerUtilities.cpp
+    platform/graphics/gstreamer/GStreamerVersioning.cpp
+  )
+  LIST(APPEND WebCore_LIBRARIES
+    ${GStreamer-App_LIBRARIES}
+    ${GStreamer-Interfaces_LIBRARIES}
+    ${GStreamer-Pbutils_LIBRARIES}
+  )
+ENDIF ()
+
+IF (ENABLE_VIDEO)
+  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
     ${GStreamer-Video_INCLUDE_DIRS}
   )
+  LIST(APPEND WebCore_SOURCES
+    platform/graphics/gstreamer/GStreamerGWorld.cpp
+    platform/graphics/gstreamer/ImageGStreamerCairo.cpp
+    platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+    platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
+    platform/graphics/gstreamer/VideoSinkGStreamer.cpp
+    platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
+  )
+  LIST(APPEND WebCore_LIBRARIES
+    ${GStreamer-Video_LIBRARIES}
+  )
 ENDIF ()
 
 IF (ENABLE_WEBGL)
@@ -273,3 +275,28 @@
 
 ADD_DEFINITIONS(-DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1
                 -DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
+
+IF (ENABLE_WEB_AUDIO)
+  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+    "${WEBCORE_DIR}/platform/audio/gstreamer"
+
+    ${GStreamer-Audio_INCLUDE_DIRS}
+    ${GStreamer-FFT_INCLUDE_DIRS}
+  )
+  LIST(APPEND WebCore_SOURCES
+    platform/audio/efl/AudioBusEfl.cpp
+    platform/audio/gstreamer/AudioDestinationGStreamer.cpp
+    platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
+    platform/audio/gstreamer/FFTFrameGStreamer.cpp
+    platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
+  )
+  LIST(APPEND WebCore_LIBRARIES
+    ${GStreamer-Audio_LIBRARIES}
+    ${GStreamer-FFT_LIBRARIES}
+  )
+  SET(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
+  FILE(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
+  INSTALL(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
+  ADD_DEFINITIONS(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources")
+ENDIF ()
+

Modified: trunk/Source/WebCore/UseJSC.cmake (115799 => 115800)


--- trunk/Source/WebCore/UseJSC.cmake	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebCore/UseJSC.cmake	2012-05-02 07:58:30 UTC (rev 115800)
@@ -275,6 +275,16 @@
     )
 ENDIF ()
 
+IF (ENABLE_WEB_AUDIO)
+    LIST(APPEND WebCore_SOURCES
+        bindings/js/JSAudioBufferSourceNodeCustom.cpp
+        bindings/js/JSAudioContextCustom.cpp
+        bindings/js/JSConvolverNodeCustom.cpp
+        bindings/js/JSJavaScriptAudioNodeCustom.cpp
+        bindings/js/JSWaveShaperNodeCustom.cpp
+    )
+ENDIF ()
+
 LIST(APPEND SCRIPTS_BINDINGS
     ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
 )

Modified: trunk/Source/WebCore/platform/audio/HRTFElevation.cpp (115799 => 115800)


--- trunk/Source/WebCore/platform/audio/HRTFElevation.cpp	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebCore/platform/audio/HRTFElevation.cpp	2012-05-02 07:58:30 UTC (rev 115800)
@@ -60,7 +60,7 @@
 // The impulse responses may be resampled to a different sample-rate (depending on the audio hardware) when they are loaded.
 const float ResponseSampleRate = 44100;
 
-#if PLATFORM(GTK) || PLATFORM(MAC)
+#if PLATFORM(GTK) || PLATFORM(MAC) || PLATFORM(EFL)
 #define USE_CONCATENATED_IMPULSE_RESPONSES
 #endif
 

Added: trunk/Source/WebCore/platform/audio/efl/AudioBusEfl.cpp (0 => 115800)


--- trunk/Source/WebCore/platform/audio/efl/AudioBusEfl.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/audio/efl/AudioBusEfl.cpp	2012-05-02 07:58:30 UTC (rev 115800)
@@ -0,0 +1,42 @@
+/*
+    Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License 2.1 as published by the Free Software Foundation.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#if ENABLE(WEB_AUDIO)
+#include "AudioBus.h"
+
+#include "AudioFileReader.h"
+#include "FileSystem.h"
+#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
+
+namespace WebCore {
+
+PassOwnPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate)
+{
+    String absoluteFilename(makeString(DATA_DIR, "/webaudio/resources/", name, ".wav"));
+    if (!fileExists(absoluteFilename))
+        absoluteFilename = makeString(UNINSTALLED_AUDIO_RESOURCES_DIR, "/", name, ".wav");
+
+    return createBusFromAudioFile(absoluteFilename.utf8().data(), false, sampleRate);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)

Modified: trunk/Source/WebKit/efl/ChangeLog (115799 => 115800)


--- trunk/Source/WebKit/efl/ChangeLog	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-05-02 07:58:30 UTC (rev 115800)
@@ -1,3 +1,20 @@
+2012-05-02  Dongwoo Im  <[email protected]>
+
+        [EFL] Implement the Web Audio API feature.
+        https://bugs.webkit.org/show_bug.cgi?id=78688
+
+        Reviewed by Philippe Normand.
+
+        Implement the Web Audio API feature on the EFL port.
+        https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
+
+        * ewk/ewk_view.cpp: Add the setter/getter of the webaudio feature.
+        (_Ewk_View_Private_Data):
+        (_ewk_view_priv_new):
+        (ewk_view_setting_web_audio_get): Enable/disable the Web Audio API feature.
+        (ewk_view_setting_web_audio_set): Query if the Web Audio API feature is enabled.
+        * ewk/ewk_view.h: Add the prototypes.
+
 2012-04-27  Christophe Dumez  <[email protected]>
 
         [EFL] ResourceError domain needs to be properly set in FrameLoaderClient

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (115799 => 115800)


--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-05-02 07:58:30 UTC (rev 115800)
@@ -224,6 +224,9 @@
         bool offlineAppCache : 1;
         bool pageCache : 1;
         bool enableXSSAuditor : 1;
+#if ENABLE(WEB_AUDIO)
+        bool webAudio : 0;
+#endif
         bool webGLEnabled : 1;
         bool tabsToLinks : 1;
         struct {
@@ -683,6 +686,9 @@
     priv->pageSettings->setOfflineWebApplicationCacheEnabled(true);
     priv->pageSettings->setUsesPageCache(true);
     priv->pageSettings->setUsesEncodingDetector(false);
+#if ENABLE(WEB_AUDIO)
+    priv->pageSettings->setWebAudioEnabled(false);
+#endif
     priv->pageSettings->setWebGLEnabled(true);
     priv->pageSettings->setXSSAuditorEnabled(true);
 
@@ -741,6 +747,9 @@
     priv->settings.tabsToLinks = true;
 
     priv->settings.userAgent = ewk_settings_default_user_agent_get();
+#if ENABLE(WEB_AUDIO)
+    priv->settings.webAudio = priv->pageSettings->webAudioEnabled();
+#endif
 
     // Since there's no scale separated from zooming in webkit-efl, this functionality of
     // viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl,
@@ -4203,6 +4212,32 @@
 }
 #endif
 
+Eina_Bool ewk_view_setting_web_audio_get(const Evas_Object* ewkView)
+{
+#if ENABLE(WEB_AUDIO)
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    return priv->settings.webAudio;
+#else
+    return false;
+#endif
+}
+
+Eina_Bool ewk_view_setting_web_audio_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+#if ENABLE(WEB_AUDIO)
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    if (priv->settings.webAudio != enable) {
+        priv->pageSettings->setWebAudioEnabled(enable);
+        priv->settings.webAudio = enable;
+    }
+    return true;
+#else
+    return false;
+#endif
+}
+
 namespace EWKPrivate {
 
 WebCore::Page *corePage(const Evas_Object *ewkView)

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.h (115799 => 115800)


--- trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-05-02 07:58:30 UTC (rev 115800)
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2009-2010 ProFUSION embedded systems
-    Copyright (C) 2009-2010 Samsung Electronics
+    Copyright (C) 2009-2012 Samsung Electronics
     Copyright (C) 2012 Intel Corporation
 
     This library is free software; you can redistribute it and/or
@@ -2560,6 +2560,27 @@
  */
 EAPI void ewk_view_setting_should_display_text_descriptions_set(Evas_Object *o, Eina_Bool enable);
 
+/**
+ * Queries if the web audio feature of HTML5 is enabled.
+ *
+ * @param o view object to query if the web audio feature is enabled
+ *
+ * @return @c EINA_TRUE if web audio is enabled,
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool    ewk_view_setting_web_audio_get(const Evas_Object *o);
+
+/**
+ * Enables/disables the web audio feature of HTML5.
+ *
+ * @param o view object to set the web audio
+ * @param enable @c EINA_TRUE to enable the web audio feature,
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool    ewk_view_setting_web_audio_set(Evas_Object *o, Eina_Bool enable);
+
 #ifdef __cplusplus
 }
 #endif

Added: trunk/Source/cmake/FindGStreamer-Audio.cmake (0 => 115800)


--- trunk/Source/cmake/FindGStreamer-Audio.cmake	                        (rev 0)
+++ trunk/Source/cmake/FindGStreamer-Audio.cmake	2012-05-02 07:58:30 UTC (rev 115800)
@@ -0,0 +1,35 @@
+# - Try to find GStreamer-Audio
+# Once done, this will define
+#
+#  GStreamer-Audio_FOUND - system has GStreamer-Audio
+#  GStreamer-Audio_INCLUDE_DIRS - the GStreamer-Audio include directories
+#  GStreamer-Audio_LIBRARIES - link these to use GStreamer-Audio
+
+include(LibFindMacros)
+
+# Dependencies
+libfind_package(GStreamer-Audio GStreamer)
+libfind_package(GStreamer-Audio GStreamer-Base)
+
+# Use pkg-config to get hints about paths
+libfind_pkg_check_modules(GStreamer-Audio_PKGCONF gstreamer-audio-0.10>=0.10.30)
+
+# Include dir
+find_path(GStreamer-Audio_INCLUDE_DIR
+  NAMES gst/audio/audio.h
+  PATHS ${GStreamer-Audio_PKGCONF_INCLUDE_DIRS}
+  PATH_SUFFIXES gstreamer-0.10
+)
+
+# Finally the library itself
+find_library(GStreamer-Audio_LIBRARY
+  NAMES gstaudio-0.10
+  PATHS ${GStreamer-Audio_PKGCONF_LIBRARY_DIRS}
+)
+
+# Set the include dir variables and the libraries and let libfind_process do the rest.
+# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
+set(GStreamer-Audio_PROCESS_INCLUDES GStreamer-Audio_INCLUDE_DIR
+GStreamer_INCLUDE_DIR GStreamer-Base_INCLUDE_DIR)
+set(GStreamer-Audio_PROCESS_LIBS GStreamer-Audio_LIBRARY GStreamer_LIBRARIES GStreamer-Base_LIBRARIES)
+libfind_process(GStreamer-Audio)

Added: trunk/Source/cmake/FindGStreamer-FFT.cmake (0 => 115800)


--- trunk/Source/cmake/FindGStreamer-FFT.cmake	                        (rev 0)
+++ trunk/Source/cmake/FindGStreamer-FFT.cmake	2012-05-02 07:58:30 UTC (rev 115800)
@@ -0,0 +1,34 @@
+# - Try to find GStreamer-FFT
+# Once done, this will define
+#
+#  GStreamer-FFT_FOUND - system has GStreamer-FFT
+#  GStreamer-FFT_INCLUDE_DIRS - the GStreamer-FFT include directories
+#  GStreamer-FFT_LIBRARIES - link these to use GStreamer-FFT
+
+include(LibFindMacros)
+
+# Dependencies
+libfind_package(GStreamer-FFT GStreamer)
+libfind_package(GStreamer-FFT GStreamer-Base)
+
+# Use pkg-config to get hints about paths
+libfind_pkg_check_modules(GStreamer-FFT_PKGCONF gstreamer-base-0.10>=0.10.30)
+
+# Include dir
+find_path(GStreamer-FFT_INCLUDE_DIR
+  NAMES gst/fft/gstfftf32.h
+  PATHS ${GStreamer-FFT_PKGCONF_INCLUDE_DIRS}
+  PATH_SUFFIXES gstreamer-0.10
+)
+
+# Finally the library itself
+find_library(GStreamer-FFT_LIBRARY
+  NAMES gstfft-0.10
+  PATHS ${GStreamer-FFT_PKGCONF_LIBRARY_DIRS}
+)
+
+# Set the include dir variables and the libraries and let libfind_process do the rest.
+# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
+set(GStreamer-FFT_PROCESS_INCLUDES GStreamer-FFT_INCLUDE_DIR GStreamer_INCLUDE_DIR)
+set(GStreamer-FFT_PROCESS_LIBS GStreamer-FFT_LIBRARY GStreamer_LIBRARIES)
+libfind_process(GStreamer-FFT)

Modified: trunk/Source/cmake/OptionsEfl.cmake (115799 => 115800)


--- trunk/Source/cmake/OptionsEfl.cmake	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/cmake/OptionsEfl.cmake	2012-05-02 07:58:30 UTC (rev 115800)
@@ -79,6 +79,7 @@
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIBRATION ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_TIMING ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WORKERS ON)
 WEBKIT_OPTION_END()
@@ -107,18 +108,27 @@
   SET(ENABLE_SVG_FONTS 0)
 ENDIF ()
 
-IF (ENABLE_VIDEO)
+IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
   FIND_PACKAGE(GStreamer REQUIRED)
   FIND_PACKAGE(GStreamer-App REQUIRED)
   FIND_PACKAGE(GStreamer-Base REQUIRED)
+  FIND_PACKAGE(GStreamer-Interfaces REQUIRED)
   FIND_PACKAGE(GStreamer-Pbutils REQUIRED)
-  FIND_PACKAGE(GStreamer-Interfaces REQUIRED)
   FIND_PACKAGE(GStreamer-Plugins-Base REQUIRED)
-  FIND_PACKAGE(GStreamer-Video REQUIRED)
   SET(WTF_USE_GSTREAMER 1)
   ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
+ENDIF ()
+
+IF (ENABLE_VIDEO)
+  FIND_PACKAGE(GStreamer-Video REQUIRED)
 ENDIF()
 
+IF (ENABLE_WEB_AUDIO)
+  FIND_PACKAGE(GStreamer-Audio REQUIRED)
+  FIND_PACKAGE(GStreamer-FFT REQUIRED)
+  ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
+ENDIF ()
+
 IF (ENABLE_WEBGL)
   FIND_PACKAGE(OpenGL REQUIRED)
 ENDIF ()

Modified: trunk/Source/cmakeconfig.h.cmake (115799 => 115800)


--- trunk/Source/cmakeconfig.h.cmake	2012-05-02 07:00:52 UTC (rev 115799)
+++ trunk/Source/cmakeconfig.h.cmake	2012-05-02 07:58:30 UTC (rev 115800)
@@ -67,6 +67,7 @@
 #cmakedefine01 ENABLE_VIDEO_TRACK
 #cmakedefine01 ENABLE_VIEWPORT_REFLOW
 #cmakedefine01 ENABLE_WEBGL
+#cmakedefine01 ENABLE_WEB_AUDIO
 #cmakedefine01 ENABLE_WEB_SOCKETS
 #cmakedefine01 ENABLE_WEB_TIMING
 #cmakedefine01 ENABLE_WORKERS
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to