Selaa lähdekoodia

theora: Move to a module and split thirdparty lib

Same rationale as the previous commits.

(cherry picked from commit cfcc8a20e862b758c32bd3f152186e6df0591a24)
Rémi Verschelde 9 vuotta sitten
vanhempi
commit
82e8721715
88 muutettua tiedostoa jossa 199 lisäystä ja 178 poistoa
  1. 1 9
      SConstruct
  2. 0 2
      drivers/SCsub
  3. 1 21
      drivers/register_driver_types.cpp
  4. 0 65
      drivers/theora/SCsub
  5. 0 55
      drivers/theora/theora.exp
  6. 81 0
      modules/theora/SCsub
  7. 6 0
      modules/theora/config.py
  8. 45 0
      modules/theora/register_types.cpp
  9. 30 0
      modules/theora/register_types.h
  10. 2 7
      modules/theora/video_stream_theora.cpp
  11. 6 11
      modules/theora/video_stream_theora.h
  12. 0 0
      modules/theora/yuv2rgb.h
  13. 1 2
      platform/bb10/detect.py
  14. 1 1
      platform/javascript/detect.py
  15. 12 5
      platform/x11/detect.py
  16. 13 0
      thirdparty/README.md
  17. 0 0
      thirdparty/libtheora/COPYING
  18. 0 0
      thirdparty/libtheora/LICENSE
  19. 0 0
      thirdparty/libtheora/analyze.c
  20. 0 0
      thirdparty/libtheora/apiwrapper.c
  21. 0 0
      thirdparty/libtheora/apiwrapper.h
  22. 0 0
      thirdparty/libtheora/bitpack.c
  23. 0 0
      thirdparty/libtheora/bitpack.h
  24. 0 0
      thirdparty/libtheora/cpu.c
  25. 0 0
      thirdparty/libtheora/cpu.h
  26. 0 0
      thirdparty/libtheora/dct.h
  27. 0 0
      thirdparty/libtheora/decapiwrapper.c
  28. 0 0
      thirdparty/libtheora/decinfo.c
  29. 0 0
      thirdparty/libtheora/decint.h
  30. 0 0
      thirdparty/libtheora/decode.c
  31. 0 0
      thirdparty/libtheora/dequant.c
  32. 0 0
      thirdparty/libtheora/dequant.h
  33. 0 0
      thirdparty/libtheora/encapiwrapper.c
  34. 0 0
      thirdparty/libtheora/encfrag.c
  35. 0 0
      thirdparty/libtheora/encinfo.c
  36. 0 0
      thirdparty/libtheora/encint.h
  37. 0 0
      thirdparty/libtheora/encode.c
  38. 0 0
      thirdparty/libtheora/encoder_disabled.c
  39. 0 0
      thirdparty/libtheora/enquant.c
  40. 0 0
      thirdparty/libtheora/enquant.h
  41. 0 0
      thirdparty/libtheora/fdct.c
  42. 0 0
      thirdparty/libtheora/fragment.c
  43. 0 0
      thirdparty/libtheora/huffdec.c
  44. 0 0
      thirdparty/libtheora/huffdec.h
  45. 0 0
      thirdparty/libtheora/huffenc.c
  46. 0 0
      thirdparty/libtheora/huffenc.h
  47. 0 0
      thirdparty/libtheora/huffman.h
  48. 0 0
      thirdparty/libtheora/idct.c
  49. 0 0
      thirdparty/libtheora/info.c
  50. 0 0
      thirdparty/libtheora/internal.c
  51. 0 0
      thirdparty/libtheora/internal.h
  52. 0 0
      thirdparty/libtheora/mathops.c
  53. 0 0
      thirdparty/libtheora/mathops.h
  54. 0 0
      thirdparty/libtheora/mcenc.c
  55. 0 0
      thirdparty/libtheora/modedec.h
  56. 0 0
      thirdparty/libtheora/ocintrin.h
  57. 0 0
      thirdparty/libtheora/quant.c
  58. 0 0
      thirdparty/libtheora/quant.h
  59. 0 0
      thirdparty/libtheora/rate.c
  60. 0 0
      thirdparty/libtheora/state.c
  61. 0 0
      thirdparty/libtheora/theora/codec.h
  62. 0 0
      thirdparty/libtheora/theora/theora.h
  63. 0 0
      thirdparty/libtheora/theora/theoradec.h
  64. 0 0
      thirdparty/libtheora/theora/theoraenc.h
  65. 0 0
      thirdparty/libtheora/tokenize.c
  66. 0 0
      thirdparty/libtheora/x86/mmxencfrag.c
  67. 0 0
      thirdparty/libtheora/x86/mmxfdct.c
  68. 0 0
      thirdparty/libtheora/x86/mmxfrag.c
  69. 0 0
      thirdparty/libtheora/x86/mmxfrag.h
  70. 0 0
      thirdparty/libtheora/x86/mmxidct.c
  71. 0 0
      thirdparty/libtheora/x86/mmxloop.h
  72. 0 0
      thirdparty/libtheora/x86/mmxstate.c
  73. 0 0
      thirdparty/libtheora/x86/sse2fdct.c
  74. 0 0
      thirdparty/libtheora/x86/x86enc.c
  75. 0 0
      thirdparty/libtheora/x86/x86enc.h
  76. 0 0
      thirdparty/libtheora/x86/x86int.h
  77. 0 0
      thirdparty/libtheora/x86/x86state.c
  78. 0 0
      thirdparty/libtheora/x86_vc/mmxencfrag.c
  79. 0 0
      thirdparty/libtheora/x86_vc/mmxfdct.c
  80. 0 0
      thirdparty/libtheora/x86_vc/mmxfrag.c
  81. 0 0
      thirdparty/libtheora/x86_vc/mmxfrag.h
  82. 0 0
      thirdparty/libtheora/x86_vc/mmxidct.c
  83. 0 0
      thirdparty/libtheora/x86_vc/mmxloop.h
  84. 0 0
      thirdparty/libtheora/x86_vc/mmxstate.c
  85. 0 0
      thirdparty/libtheora/x86_vc/x86enc.c
  86. 0 0
      thirdparty/libtheora/x86_vc/x86enc.h
  87. 0 0
      thirdparty/libtheora/x86_vc/x86int.h
  88. 0 0
      thirdparty/libtheora/x86_vc/x86state.c

+ 1 - 9
SConstruct

@@ -122,11 +122,10 @@ opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes')
 opts.Add('gdscript','Build GDSCript support: (yes/no)','yes')
 opts.Add('libogg','Ogg library for ogg container support (system/builtin)','builtin')
 opts.Add('libvorbis','Ogg Vorbis library for vorbis support (system/builtin)','builtin')
+opts.Add('libtheora','Theora library for theora module (system/builtin)','builtin')
 opts.Add('opus','Opus and opusfile library for Opus format support: (system/builtin)','builtin')
 opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes')
 opts.Add('squish','Squish BC Texture Compression in editor (yes/no)','yes')
-opts.Add('theora','Theora Video (yes/no)','yes')
-opts.Add('theoralib','Theora Video (yes/no)','no')
 opts.Add('freetype','Freetype support in editor','builtin')
 # (akien) Unbundling would require work in audio_stream_speex.{cpp,h}, but since speex was
 # removed in 3.0+ and this is only to preserve compatibility in 2.1, I haven't worked on it.
@@ -335,13 +334,6 @@ if selected_platform in platform_list:
 	if (env_base['squish']=='yes'):
 		env.Append(CPPFLAGS=['-DSQUISH_ENABLED']);
 
-
-	if (env['theora']=='yes'):
-		env['theoralib']='yes'
-		env.Append(CPPFLAGS=['-DTHEORA_ENABLED']);
-	if (env['theoralib']=='yes'):
-		env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']);
-
 	if (env['tools']=='yes'):
 		env.Append(CPPFLAGS=['-DTOOLS_ENABLED'])
 	if (env['disable_3d']=='yes'):

+ 0 - 2
drivers/SCsub

@@ -24,8 +24,6 @@ SConscript("chibi/SCsub");
 if (env["tools"]=="yes"):
 	SConscript("convex_decomp/SCsub");
 
-if (env["theoralib"]=="yes"):
-	SConscript("theora/SCsub");
 if (env['musepack']=='yes'):
 	SConscript("mpc/SCsub");
 if (env["squish"]=="yes" and env["tools"]=="yes"):

+ 1 - 21
drivers/register_driver_types.cpp

@@ -28,6 +28,7 @@
 /*************************************************************************/
 #include "register_driver_types.h"
 
+#include "core/math/geometry.h"
 #include "png/image_loader_png.h"
 #include "png/resource_saver_png.h"
 #include "chibi/event_stream_chibi.h"
@@ -45,11 +46,6 @@
 #include "platform/windows/export/export.h"
 #endif
 
-#ifdef THEORA_ENABLED
-#include "theora/video_stream_theora.h"
-#endif
-
-
 #include "drivers/nrex/regex.h"
 
 #ifdef MUSEPACK_ENABLED
@@ -59,10 +55,6 @@
 static ImageLoaderPNG *image_loader_png=NULL;
 static ResourceSaverPNG *resource_saver_png=NULL;
 
-#ifdef THEORA_ENABLED
-static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL;
-#endif
-
 #ifdef MUSEPACK_ENABLED
 static ResourceFormatLoaderAudioStreamMPC * mpc_stream_loader=NULL;
 #endif
@@ -103,13 +95,6 @@ void register_driver_types() {
 
 #endif
 
-#ifdef THEORA_ENABLED
-	theora_stream_loader = memnew( ResourceFormatLoaderVideoStreamTheora );
-	ResourceLoader::add_resource_format_loader(theora_stream_loader);
-	ObjectTypeDB::register_type<VideoStreamTheora>();
-#endif
-
-
 #ifdef TOOLS_ENABLED
 #ifdef SQUISH_ENABLED
 
@@ -123,11 +108,6 @@ void register_driver_types() {
 
 void unregister_driver_types() {
 
-#ifdef THEORA_ENABLED
-	memdelete (theora_stream_loader);
-#endif
-
-
 #ifdef MUSEPACK_ENABLED
 
 	memdelete (mpc_stream_loader);

+ 0 - 65
drivers/theora/SCsub

@@ -1,65 +0,0 @@
-Import('env')
-
-sources = [
-	#"theora/analyze.c",
-	#"theora/apiwrapper.c",
-	"theora/bitpack.c",
-	"theora/cpu.c",
-	#"theora/decapiwrapper.c",
-	"theora/decinfo.c",
-	"theora/decode.c",
-	"theora/dequant.c",
-	#"theora/encapiwrapper.c",
-	#"theora/encfrag.c",
-	#"theora/encinfo.c",
-	#"theora/encode.c",
-	#"theora/encoder_disabled.c",
-	#"theora/enquant.c",
-	#"theora/fdct.c",
-	"theora/fragment.c",
-	"theora/huffdec.c",
-	#"theora/huffenc.c",
-	"theora/idct.c",
-	"theora/info.c",
-	"theora/internal.c",
-	#"theora/mathops.c",
-	#"theora/mcenc.c",
-	"theora/quant.c",
-	#"theora/rate.c",
-	"theora/state.c",
-	#"theora/tokenize.c",
-	"theora/video_stream_theora.cpp",
-]
-
-sources_x86 = [
-	#"theora/x86/mmxencfrag.c",
-	#"theora/x86/mmxfdct.c",
-	"theora/x86/mmxfrag.c",
-	"theora/x86/mmxidct.c",
-	"theora/x86/mmxstate.c",
-	#"theora/x86/sse2fdct.c",
-	#"theora/x86/x86enc.c",
-	"theora/x86/x86state.c",
-]
-
-sources_x86_vc = [
-	#"theora/x86_vc/mmxencfrag.c",
-	#"theora/x86_vc/mmxfdct.c",
-	"theora/x86_vc/mmxfrag.c",
-	"theora/x86_vc/mmxidct.c",
-	"theora/x86_vc/mmxstate.c",
-	#"theora/x86_vc/x86enc.c",
-	"theora/x86_vc/x86state.c",
-]
-
-env.drivers_sources += sources
-
-if (env["x86_opt_gcc"]):
-	env.drivers_sources += sources_x86
-
-if (env["x86_opt_vc"]):
-	env.drivers_sources += sources_x86_vc
-
-if (env["x86_opt_gcc"] or env["x86_opt_vc"]):
-	Import('env_drivers')
-	env_drivers.Append(CCFLAGS=["-DOC_X86_ASM"])

+ 0 - 55
drivers/theora/theora.exp

@@ -1,55 +0,0 @@
-# export list for libtheora
-_theora_version_string
-_theora_version_number
-_theora_encode_init
-_theora_encode_YUVin
-_theora_encode_packetout
-_theora_encode_header
-_theora_encode_comment
-_theora_encode_tables
-_theora_decode_header
-_theora_decode_init
-_theora_decode_packetin
-_theora_decode_YUVout
-_theora_control
-_theora_packet_isheader
-_theora_packet_iskeyframe
-_theora_granule_shift
-_theora_granule_frame
-_theora_granule_time
-_theora_info_init
-_theora_info_clear
-_theora_clear
-_theora_comment_init
-_theora_comment_add
-_theora_comment_add_tag
-_theora_comment_query
-_theora_comment_query_count
-_theora_comment_clear
-_th_version_string
-_th_version_number
-_th_decode_headerin
-_th_decode_alloc
-_th_setup_free
-_th_decode_ctl
-_th_decode_packetin
-_th_decode_ycbcr_out
-_th_decode_free
-_th_packet_isheader
-_th_packet_iskeyframe
-_th_granule_frame
-_th_granule_time
-_th_info_init
-_th_info_clear
-_th_comment_init
-_th_comment_add
-_th_comment_add_tag
-_th_comment_query
-_th_comment_query_count
-_th_comment_clear
-_th_encode_alloc
-_th_encode_ctl
-_th_encode_flushheader
-_th_encode_packetout
-_th_encode_ycbcr_in
-_th_encode_free

+ 81 - 0
modules/theora/SCsub

@@ -0,0 +1,81 @@
+Import('env')
+Import('env_modules')
+
+env_theora = env_modules.Clone()
+
+# Thirdparty source files
+if (env["libtheora"] != "system"): # builtin
+	thirdparty_dir = "#thirdparty/libtheora/"
+	thirdparty_sources = [
+		"analyze.c",
+		"apiwrapper.c",
+		"bitpack.c",
+		"cpu.c",
+		"decapiwrapper.c",
+		"decinfo.c",
+		"decode.c",
+		"dequant.c",
+		"encapiwrapper.c",
+		"encfrag.c",
+		"encinfo.c",
+		"encode.c",
+		"encoder_disabled.c",
+		"enquant.c",
+		"fdct.c",
+		"fragment.c",
+		"huffdec.c",
+		"huffenc.c",
+		"idct.c",
+		"info.c",
+		"internal.c",
+		"mathops.c",
+		"mcenc.c",
+		"quant.c",
+		"rate.c",
+		"state.c",
+		"tokenize.c",
+	]
+
+	thirdparty_sources_x86 = [
+		"x86/mmxencfrag.c",
+		"x86/mmxfdct.c",
+		"x86/mmxfrag.c",
+		"x86/mmxidct.c",
+		"x86/mmxstate.c",
+		"x86/sse2fdct.c",
+		"x86/x86enc.c",
+		"x86/x86state.c",
+	]
+
+	thirdparty_sources_x86_vc = [
+		"x86_vc/mmxencfrag.c",
+		"x86_vc/mmxfdct.c",
+		"x86_vc/mmxfrag.c",
+		"x86_vc/mmxidct.c",
+		"x86_vc/mmxstate.c",
+		"x86_vc/x86enc.c",
+		"x86_vc/x86state.c",
+	]
+
+	if (env["x86_opt_gcc"]):
+		thirdparty_sources += thirdparty_sources_x86
+
+	if (env["x86_opt_vc"]):
+		thirdparty_sources += thirdparty_sources_x86_vc
+
+	if (env["x86_opt_gcc"] or env["x86_opt_vc"]):
+		env_theora.Append(CCFLAGS = ["-DOC_X86_ASM"])
+
+	thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+
+	env_theora.add_source_files(env.modules_sources, thirdparty_sources)
+	env_theora.Append(CPPPATH = [thirdparty_dir])
+
+	# also requires libogg and libvorbis
+	if (env["libogg"] != "system"): # builtin
+		env_theora.Append(CPPPATH = ["#thirdparty/libogg"])
+	if (env["libvorbis"] != "system"): # builtin
+		env_theora.Append(CPPPATH = ["#thirdparty/libvorbis"])
+
+# Godot source files
+env_theora.add_source_files(env.modules_sources, "*.cpp")

+ 6 - 0
modules/theora/config.py

@@ -0,0 +1,6 @@
+
+def can_build(platform):
+	return True
+
+def configure(env):
+	pass

+ 45 - 0
modules/theora/register_types.cpp

@@ -0,0 +1,45 @@
+/*************************************************************************/
+/*  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"
+
+#include "video_stream_theora.h"
+
+static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL;
+
+void register_theora_types() {
+
+	theora_stream_loader = memnew( ResourceFormatLoaderVideoStreamTheora );
+	ResourceLoader::add_resource_format_loader(theora_stream_loader);
+	ObjectTypeDB::register_type<VideoStreamTheora>();
+}
+
+void unregister_theora_types() {
+
+	memdelete( theora_stream_loader );
+}

+ 30 - 0
modules/theora/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_theora_types();
+void unregister_theora_types();

+ 2 - 7
drivers/theora/video_stream_theora.cpp → modules/theora/video_stream_theora.cpp

@@ -26,13 +26,11 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#ifdef THEORA_ENABLED
-
 #include "video_stream_theora.h"
+
+#include "globals.h"
 #include "os/os.h"
 #include "yuv2rgb.h"
-#include "globals.h"
-
 
 int VideoStreamPlaybackTheora::	buffer_data() {
 
@@ -940,6 +938,3 @@ String ResourceFormatLoaderVideoStreamTheora::get_resource_type(const String &p_
 		return "VideoStreamTheora";
 	return "";
 }
-
-#endif
-

+ 6 - 11
drivers/theora/video_stream_theora.h → modules/theora/video_stream_theora.h

@@ -29,16 +29,15 @@
 #ifndef VIDEO_STREAM_THEORA_H
 #define VIDEO_STREAM_THEORA_H
 
-#ifdef THEORA_ENABLED
-
-#include "theora/theoradec.h"
-#include "vorbis/codec.h"
-#include "os/file_access.h"
-#include "ring_buffer.h"
 #include "io/resource_loader.h"
-#include "scene/resources/video_stream.h"
+#include "os/file_access.h"
 #include "os/thread.h"
 #include "os/semaphore.h"
+#include "ring_buffer.h"
+#include "scene/resources/video_stream.h"
+
+#include <theora/theoradec.h>
+#include <vorbis/codec.h>
 
 //#define THEORA_USE_THREAD_STREAMING
 
@@ -197,8 +196,4 @@ public:
 
 };
 
-
-
-#endif
-
 #endif

+ 0 - 0
drivers/theora/yuv2rgb.h → modules/theora/yuv2rgb.h


+ 1 - 2
platform/bb10/detect.py

@@ -33,8 +33,7 @@ def get_flags():
 
 	return [
 		('tools', 'no'),
-		('theora', 'no'),
-
+		('module_theora_enabled', 'no'),
 	]
 
 def configure(env):

+ 1 - 1
platform/javascript/detect.py

@@ -25,11 +25,11 @@ def get_flags():
 
 	return [
 		('tools', 'no'),
-		('theora', 'no'),
 		('musepack', 'no'),
 		('squish', 'no'),
 		('module_speex_enabled', 'no'),
 		('etc1', 'no'),
+		('module_theora_enabled', 'no'),
 	]
 
 

+ 12 - 5
platform/x11/detect.py

@@ -73,7 +73,6 @@ def get_flags():
 	("openssl", "system"),
 	('freetype','yes'), # use system freetype
 	('libpng', 'system'),
-	#("theora","no"),
 	]
 
 
@@ -154,16 +153,24 @@ def configure(env):
 
 
 
-	if (env["libogg"] == "system"):
-		env.ParseConfig('pkg-config ogg --cflags --libs')
+	# Sound and video libraries
+	# Keep the order as it triggers chained dependencies (ogg needed by others, etc.)
+
+	if (env["libtheora"] == "system"):
+		env["libogg"] = "system"  # Needed to link against system libtheora
+		env["libvorbis"] = "system"  # Needed to link against system libtheora
+		env.ParseConfig('pkg-config theora theoradec --cflags --libs')
 
 	if (env["libvorbis"] == "system"):
 		env["libogg"] = "system"  # Needed to link against system libvorbis
-		env.ParseConfig('pkg-config vorbis vorbisfile ogg --cflags --libs')
+		env.ParseConfig('pkg-config vorbis vorbisfile --cflags --libs')
 
 	if (env["opus"] == "system"):
 		env["libogg"] = "system"  # Needed to link against system opus
-		env.ParseConfig('pkg-config opus opusfile ogg --cflags --libs')
+		env.ParseConfig('pkg-config opus opusfile --cflags --libs')
+
+	if (env["libogg"] == "system"):
+		env.ParseConfig('pkg-config ogg --cflags --libs')
 
 
 	env.Append(CPPFLAGS=['-DOPENGL_ENABLED'])

+ 13 - 0
thirdparty/README.md

@@ -122,3 +122,16 @@ Files extracted from upstream source:
 - Upstream: http://speex.org/
 - Version: 1.2rc1?
 - License: BSD-3-Clause
+
+
+## theora
+
+- Upstream: https://www.theora.org
+- Version: 1.1.1
+- License: BSD-3-Clause
+
+Files extracted from upstream source:
+
+- all .c, .h in lib/
+- all .h files in include/theora/ as theora/
+- COPYING and LICENSE

+ 0 - 0
drivers/theora/COPYING → thirdparty/libtheora/COPYING


+ 0 - 0
drivers/theora/LICENSE → thirdparty/libtheora/LICENSE


+ 0 - 0
drivers/theora/analyze.c → thirdparty/libtheora/analyze.c


+ 0 - 0
drivers/theora/apiwrapper.c → thirdparty/libtheora/apiwrapper.c


+ 0 - 0
drivers/theora/apiwrapper.h → thirdparty/libtheora/apiwrapper.h


+ 0 - 0
drivers/theora/bitpack.c → thirdparty/libtheora/bitpack.c


+ 0 - 0
drivers/theora/bitpack.h → thirdparty/libtheora/bitpack.h


+ 0 - 0
drivers/theora/cpu.c → thirdparty/libtheora/cpu.c


+ 0 - 0
drivers/theora/cpu.h → thirdparty/libtheora/cpu.h


+ 0 - 0
drivers/theora/dct.h → thirdparty/libtheora/dct.h


+ 0 - 0
drivers/theora/decapiwrapper.c → thirdparty/libtheora/decapiwrapper.c


+ 0 - 0
drivers/theora/decinfo.c → thirdparty/libtheora/decinfo.c


+ 0 - 0
drivers/theora/decint.h → thirdparty/libtheora/decint.h


+ 0 - 0
drivers/theora/decode.c → thirdparty/libtheora/decode.c


+ 0 - 0
drivers/theora/dequant.c → thirdparty/libtheora/dequant.c


+ 0 - 0
drivers/theora/dequant.h → thirdparty/libtheora/dequant.h


+ 0 - 0
drivers/theora/encapiwrapper.c → thirdparty/libtheora/encapiwrapper.c


+ 0 - 0
drivers/theora/encfrag.c → thirdparty/libtheora/encfrag.c


+ 0 - 0
drivers/theora/encinfo.c → thirdparty/libtheora/encinfo.c


+ 0 - 0
drivers/theora/encint.h → thirdparty/libtheora/encint.h


+ 0 - 0
drivers/theora/encode.c → thirdparty/libtheora/encode.c


+ 0 - 0
drivers/theora/encoder_disabled.c → thirdparty/libtheora/encoder_disabled.c


+ 0 - 0
drivers/theora/enquant.c → thirdparty/libtheora/enquant.c


+ 0 - 0
drivers/theora/enquant.h → thirdparty/libtheora/enquant.h


+ 0 - 0
drivers/theora/fdct.c → thirdparty/libtheora/fdct.c


+ 0 - 0
drivers/theora/fragment.c → thirdparty/libtheora/fragment.c


+ 0 - 0
drivers/theora/huffdec.c → thirdparty/libtheora/huffdec.c


+ 0 - 0
drivers/theora/huffdec.h → thirdparty/libtheora/huffdec.h


+ 0 - 0
drivers/theora/huffenc.c → thirdparty/libtheora/huffenc.c


+ 0 - 0
drivers/theora/huffenc.h → thirdparty/libtheora/huffenc.h


+ 0 - 0
drivers/theora/huffman.h → thirdparty/libtheora/huffman.h


+ 0 - 0
drivers/theora/idct.c → thirdparty/libtheora/idct.c


+ 0 - 0
drivers/theora/info.c → thirdparty/libtheora/info.c


+ 0 - 0
drivers/theora/internal.c → thirdparty/libtheora/internal.c


+ 0 - 0
drivers/theora/internal.h → thirdparty/libtheora/internal.h


+ 0 - 0
drivers/theora/mathops.c → thirdparty/libtheora/mathops.c


+ 0 - 0
drivers/theora/mathops.h → thirdparty/libtheora/mathops.h


+ 0 - 0
drivers/theora/mcenc.c → thirdparty/libtheora/mcenc.c


+ 0 - 0
drivers/theora/modedec.h → thirdparty/libtheora/modedec.h


+ 0 - 0
drivers/theora/ocintrin.h → thirdparty/libtheora/ocintrin.h


+ 0 - 0
drivers/theora/quant.c → thirdparty/libtheora/quant.c


+ 0 - 0
drivers/theora/quant.h → thirdparty/libtheora/quant.h


+ 0 - 0
drivers/theora/rate.c → thirdparty/libtheora/rate.c


+ 0 - 0
drivers/theora/state.c → thirdparty/libtheora/state.c


+ 0 - 0
drivers/theora/codec.h → thirdparty/libtheora/theora/codec.h


+ 0 - 0
drivers/theora/theora.h → thirdparty/libtheora/theora/theora.h


+ 0 - 0
drivers/theora/theoradec.h → thirdparty/libtheora/theora/theoradec.h


+ 0 - 0
drivers/theora/theoraenc.h → thirdparty/libtheora/theora/theoraenc.h


+ 0 - 0
drivers/theora/tokenize.c → thirdparty/libtheora/tokenize.c


+ 0 - 0
drivers/theora/x86/mmxencfrag.c → thirdparty/libtheora/x86/mmxencfrag.c


+ 0 - 0
drivers/theora/x86/mmxfdct.c → thirdparty/libtheora/x86/mmxfdct.c


+ 0 - 0
drivers/theora/x86/mmxfrag.c → thirdparty/libtheora/x86/mmxfrag.c


+ 0 - 0
drivers/theora/x86/mmxfrag.h → thirdparty/libtheora/x86/mmxfrag.h


+ 0 - 0
drivers/theora/x86/mmxidct.c → thirdparty/libtheora/x86/mmxidct.c


+ 0 - 0
drivers/theora/x86/mmxloop.h → thirdparty/libtheora/x86/mmxloop.h


+ 0 - 0
drivers/theora/x86/mmxstate.c → thirdparty/libtheora/x86/mmxstate.c


+ 0 - 0
drivers/theora/x86/sse2fdct.c → thirdparty/libtheora/x86/sse2fdct.c


+ 0 - 0
drivers/theora/x86/x86enc.c → thirdparty/libtheora/x86/x86enc.c


+ 0 - 0
drivers/theora/x86/x86enc.h → thirdparty/libtheora/x86/x86enc.h


+ 0 - 0
drivers/theora/x86/x86int.h → thirdparty/libtheora/x86/x86int.h


+ 0 - 0
drivers/theora/x86/x86state.c → thirdparty/libtheora/x86/x86state.c


+ 0 - 0
drivers/theora/x86_vc/mmxencfrag.c → thirdparty/libtheora/x86_vc/mmxencfrag.c


+ 0 - 0
drivers/theora/x86_vc/mmxfdct.c → thirdparty/libtheora/x86_vc/mmxfdct.c


+ 0 - 0
drivers/theora/x86_vc/mmxfrag.c → thirdparty/libtheora/x86_vc/mmxfrag.c


+ 0 - 0
drivers/theora/x86_vc/mmxfrag.h → thirdparty/libtheora/x86_vc/mmxfrag.h


+ 0 - 0
drivers/theora/x86_vc/mmxidct.c → thirdparty/libtheora/x86_vc/mmxidct.c


+ 0 - 0
drivers/theora/x86_vc/mmxloop.h → thirdparty/libtheora/x86_vc/mmxloop.h


+ 0 - 0
drivers/theora/x86_vc/mmxstate.c → thirdparty/libtheora/x86_vc/mmxstate.c


+ 0 - 0
drivers/theora/x86_vc/x86enc.c → thirdparty/libtheora/x86_vc/x86enc.c


+ 0 - 0
drivers/theora/x86_vc/x86enc.h → thirdparty/libtheora/x86_vc/x86enc.h


+ 0 - 0
drivers/theora/x86_vc/x86int.h → thirdparty/libtheora/x86_vc/x86int.h


+ 0 - 0
drivers/theora/x86_vc/x86state.c → thirdparty/libtheora/x86_vc/x86state.c