Title: [193814] trunk/Source/WebCore
- Revision
- 193814
- Author
- [email protected]
- Date
- 2015-12-09 02:35:35 -0800 (Wed, 09 Dec 2015)
Log Message
Make AudioBusGtk implementation GLib-specific
https://bugs.webkit.org/show_bug.cgi?id=152049
Reviewed by Philippe Normand.
AudioBusGtk only depends on GLib, so it should be moved to
Source/WebCore/platform/audio/glib and the implementation file
renamed to AudioBusGLib.cpp.
The hard-coded webkitgtk path component can be addressed later.
* PlatformGTK.cmake: Update the build target.
* platform/audio/glib/AudioBusGLib.cpp: Renamed from Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp.
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource): Deleted.
Modified Paths
Added Paths
Removed Paths
- trunk/Source/WebCore/platform/audio/gtk/
Diff
Modified: trunk/Source/WebCore/ChangeLog (193813 => 193814)
--- trunk/Source/WebCore/ChangeLog 2015-12-09 10:09:05 UTC (rev 193813)
+++ trunk/Source/WebCore/ChangeLog 2015-12-09 10:35:35 UTC (rev 193814)
@@ -1,3 +1,22 @@
+2015-12-09 Zan Dobersek <[email protected]>
+
+ Make AudioBusGtk implementation GLib-specific
+ https://bugs.webkit.org/show_bug.cgi?id=152049
+
+ Reviewed by Philippe Normand.
+
+ AudioBusGtk only depends on GLib, so it should be moved to
+ Source/WebCore/platform/audio/glib and the implementation file
+ renamed to AudioBusGLib.cpp.
+
+ The hard-coded webkitgtk path component can be addressed later.
+
+ * PlatformGTK.cmake: Update the build target.
+ * platform/audio/glib/AudioBusGLib.cpp: Renamed from Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp.
+ (WebCore::AudioBus::loadPlatformResource):
+ * platform/audio/gtk/AudioBusGtk.cpp:
+ (WebCore::AudioBus::loadPlatformResource): Deleted.
+
2015-12-09 Joanmarie Diggs <[email protected]>
AX: [EFL] Consider deferring to WebCore Accessibility for table exposure
Modified: trunk/Source/WebCore/PlatformGTK.cmake (193813 => 193814)
--- trunk/Source/WebCore/PlatformGTK.cmake 2015-12-09 10:09:05 UTC (rev 193813)
+++ trunk/Source/WebCore/PlatformGTK.cmake 2015-12-09 10:35:35 UTC (rev 193814)
@@ -77,14 +77,14 @@
platform/KillRingNone.cpp
platform/PlatformStrategies.cpp
+ platform/audio/glib/AudioBusGLib.cpp
+
platform/audio/gstreamer/AudioDestinationGStreamer.cpp
platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
platform/audio/gstreamer/FFTFrameGStreamer.cpp
platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
- platform/audio/gtk/AudioBusGtk.cpp
-
platform/geoclue/GeolocationProviderGeoclue1.cpp
platform/geoclue/GeolocationProviderGeoclue2.cpp
Added: trunk/Source/WebCore/platform/audio/glib/AudioBusGLib.cpp (0 => 193814)
--- trunk/Source/WebCore/platform/audio/glib/AudioBusGLib.cpp (rev 0)
+++ trunk/Source/WebCore/platform/audio/glib/AudioBusGLib.cpp 2015-12-09 10:35:35 UTC (rev 193814)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 Igalia S.L
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; 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 <gio/gio.h>
+#include <wtf/glib/GRefPtr.h>
+#include <wtf/glib/GUniquePtr.h>
+
+namespace WebCore {
+
+PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate)
+{
+ GUniquePtr<char> path(g_strdup_printf("/org/webkitgtk/resources/audio/%s", name));
+ GRefPtr<GBytes> data = "" G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr));
+ ASSERT(data);
+ return createBusFromInMemoryAudioFile(g_bytes_get_data(data.get(), nullptr), g_bytes_get_size(data.get()), false, sampleRate);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes