summaryrefslogtreecommitdiff
path: root/modules/ogg
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-10-12 20:37:38 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-10-15 11:50:40 +0200
commitd9a291f6411f2e571c181da0ac89f550ba73f681 (patch)
treea560b8263d9ab896a05087eb20d5eeefdeb89969 /modules/ogg
parentee3cf211c6fd4d1e30617467cdbbe945798a68b3 (diff)
ogg/vorbis/opus: Make them modules and unbundle thirdparty libs
Took the opportunity to undo the Godot changed made to the opus source. The opus module should eventually be built in its own environment to avoid polluting others with too many include dirs and defines. TODO: Fix the platform/ stuff for opus.
Diffstat (limited to 'modules/ogg')
-rw-r--r--modules/ogg/SCsub20
-rw-r--r--modules/ogg/config.py6
-rw-r--r--modules/ogg/register_types.cpp35
-rw-r--r--modules/ogg/register_types.h30
4 files changed, 91 insertions, 0 deletions
diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub
new file mode 100644
index 0000000000..42d593f88e
--- /dev/null
+++ b/modules/ogg/SCsub
@@ -0,0 +1,20 @@
+Import('env')
+Import('env_modules')
+
+# Thirdparty source files
+if (env["libogg"] != "system"): # builtin
+ thirdparty_dir = "#thirdparty/libogg/"
+ thirdparty_libogg_sources = [
+ "bitwise.c",
+ "framing.c",
+ ]
+ thirdparty_libogg_sources = [thirdparty_dir + file for file in thirdparty_libogg_sources]
+
+ env_modules.add_source_files(env.modules_sources, thirdparty_libogg_sources)
+ env_modules.Append(CPPPATH = [thirdparty_dir])
+
+# Godot source files
+env_modules.add_source_files(env.modules_sources, "*.cpp")
+
+Export('env_modules')
+Export('env')
diff --git a/modules/ogg/config.py b/modules/ogg/config.py
new file mode 100644
index 0000000000..368e97e152
--- /dev/null
+++ b/modules/ogg/config.py
@@ -0,0 +1,6 @@
+
+def can_build(platform):
+ return True
+
+def configure(env):
+ pass
diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp
new file mode 100644
index 0000000000..823ca510ca
--- /dev/null
+++ b/modules/ogg/register_types.cpp
@@ -0,0 +1,35 @@
+/*************************************************************************/
+/* register_types.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "register_types.h"
+
+// Dummy module as libogg is needed by other modules (vorbis, theora, opus, ...)
+
+void register_ogg_types() {}
+
+void unregister_ogg_types() {}
diff --git a/modules/ogg/register_types.h b/modules/ogg/register_types.h
new file mode 100644
index 0000000000..b5268a1df4
--- /dev/null
+++ b/modules/ogg/register_types.h
@@ -0,0 +1,30 @@
+/*************************************************************************/
+/* register_types.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+void register_ogg_types();
+void unregister_ogg_types();