2014-09-15 14:33:30 +00:00
|
|
|
Import("env")
|
|
|
|
|
|
|
|
import string
|
|
|
|
|
|
|
|
sources = string.split("""
|
|
|
|
src/TheoraVideoClip.cpp
|
|
|
|
src/FFmpeg/TheoraVideoClip_FFmpeg.cpp
|
|
|
|
src/TheoraAsync.cpp
|
|
|
|
src/TheoraAudioInterface.cpp
|
|
|
|
src/TheoraException.cpp
|
|
|
|
src/TheoraWorkerThread.cpp
|
|
|
|
src/TheoraVideoManager.cpp
|
|
|
|
src/TheoraTimer.cpp
|
|
|
|
src/TheoraUtil.cpp
|
|
|
|
src/TheoraDataSource.cpp
|
|
|
|
src/TheoraAudioPacketQueue.cpp
|
|
|
|
src/TheoraFrameQueue.cpp
|
|
|
|
src/Theora/TheoraVideoClip_Theora.cpp
|
|
|
|
src/YUV/yuv_util.c
|
|
|
|
src/YUV/libyuv/src/row_any.cc
|
|
|
|
src/YUV/libyuv/src/compare_common.cc
|
|
|
|
src/YUV/libyuv/src/scale_neon.cc
|
|
|
|
src/YUV/libyuv/src/planar_functions.cc
|
|
|
|
src/YUV/libyuv/src/compare.cc
|
|
|
|
src/YUV/libyuv/src/scale_mips.cc
|
|
|
|
src/YUV/libyuv/src/scale_posix.cc
|
|
|
|
src/YUV/libyuv/src/row_posix.cc
|
|
|
|
src/YUV/libyuv/src/row_win.cc
|
|
|
|
src/YUV/libyuv/src/compare_neon.cc
|
|
|
|
src/YUV/libyuv/src/convert_from_argb.cc
|
|
|
|
src/YUV/libyuv/src/mjpeg_validate.cc
|
|
|
|
src/YUV/libyuv/src/convert_from.cc
|
|
|
|
src/YUV/libyuv/src/rotate_neon.cc
|
|
|
|
src/YUV/libyuv/src/row_neon.cc
|
|
|
|
src/YUV/libyuv/src/rotate_mips.cc
|
|
|
|
src/YUV/libyuv/src/compare_posix.cc
|
|
|
|
src/YUV/libyuv/src/row_mips.cc
|
|
|
|
src/YUV/libyuv/src/scale.cc
|
|
|
|
src/YUV/libyuv/src/scale_argb.cc
|
|
|
|
src/YUV/libyuv/src/mjpeg_decoder.cc
|
|
|
|
src/YUV/libyuv/src/scale_win.cc
|
|
|
|
src/YUV/libyuv/src/scale_common.cc
|
|
|
|
src/YUV/libyuv/src/scale_argb_neon.cc
|
|
|
|
src/YUV/libyuv/src/row_common.cc
|
|
|
|
src/YUV/libyuv/src/convert.cc
|
|
|
|
src/YUV/libyuv/src/format_conversion.cc
|
|
|
|
src/YUV/libyuv/src/rotate_argb.cc
|
|
|
|
src/YUV/libyuv/src/rotate.cc
|
|
|
|
src/YUV/libyuv/src/convert_argb.cc
|
|
|
|
src/YUV/libyuv/src/cpu_id.cc
|
|
|
|
src/YUV/libyuv/src/video_common.cc
|
|
|
|
src/YUV/libyuv/src/convert_to_argb.cc
|
|
|
|
src/YUV/libyuv/src/compare_win.cc
|
|
|
|
src/YUV/libyuv/src/convert_to_i420.cc
|
|
|
|
src/YUV/libyuv/src/convert_jpeg.cc
|
|
|
|
src/YUV/libyuv/yuv_libyuv.c
|
|
|
|
src/YUV/android/cpu-features.c
|
|
|
|
src/YUV/C/yuv420_grey_c.c
|
|
|
|
src/YUV/C/yuv420_yuv_c.c
|
|
|
|
src/YUV/C/yuv420_rgb_c.c
|
|
|
|
src/TheoraVideoFrame.cpp
|
|
|
|
""")
|
|
|
|
|
2015-01-03 19:52:37 +00:00
|
|
|
env_theora = env.Clone()
|
|
|
|
|
2014-09-15 14:33:30 +00:00
|
|
|
if env["platform"] == "iphone":
|
|
|
|
sources.append("src/AVFoundation/TheoraVideoClip_AVFoundation.mm")
|
|
|
|
env.Append(LINKFLAGS=['-framework', 'CoreVideo', '-framework', 'CoreMedia', '-framework', 'AVFoundation'])
|
2015-01-03 19:52:37 +00:00
|
|
|
if env["target"] == "release":
|
|
|
|
env_theora.Append(CPPFLAGS=["-D_IOS", "-D__ARM_NEON__", "-fstrict-aliasing", "-fmessage-length=210", "-fdiagnostics-show-note-include-stack", "-fmacro-backtrace-limit=0", "-fcolor-diagnostics", "-Wno-trigraphs", "-fpascal-strings", "-fvisibility=hidden", "-fvisibility-inlines-hidden"])
|
2014-09-15 14:33:30 +00:00
|
|
|
|
2015-01-03 19:52:37 +00:00
|
|
|
env_theora.Append(CPPFLAGS=["-D_LIB", "-D__THEORA"]) # removed -D_YUV_C
|
2015-01-08 07:26:27 +00:00
|
|
|
env_theora.Append(CPPFLAGS=["-D_YUV_LIBYUV"])
|
2015-01-03 19:52:37 +00:00
|
|
|
#env_theora.Append(CPPFLAGS=["-D_YUV_C"])
|
2014-09-15 14:33:30 +00:00
|
|
|
|
|
|
|
if env["platform"] == "iphone":
|
|
|
|
env_theora.Append(CPPFLAGS=["-D__AVFOUNDATION"])
|
2014-11-19 14:33:15 +00:00
|
|
|
else:
|
|
|
|
pass
|
|
|
|
#env_theora.Append(CPPFLAGS=["-D__FFMPEG"])
|
2014-09-15 14:33:30 +00:00
|
|
|
|
|
|
|
if env["platform"] == "android":
|
|
|
|
env_theora.Append(CPPFLAGS=["-D_ANDROID"])
|
|
|
|
|
2014-12-15 18:42:58 +00:00
|
|
|
if env["platform"] == "winrt":
|
|
|
|
env_theora.Append(CPPFLAGS=["-D_WINRT"])
|
|
|
|
|
2014-09-15 14:33:30 +00:00
|
|
|
env_theora.Append(CPPPATH=["#drivers/theoraplayer/include/theoraplayer", "#drivers/theoraplayer/src/YUV", "#drivers/theoraplayer/src/YUV/libyuv/include", "#drivers/theoraplayer/src/Theora", "#drivers/theoraplayer/src/AVFoundation"])
|
|
|
|
|
|
|
|
objs = []
|
2014-10-28 01:54:32 +00:00
|
|
|
|
|
|
|
env_theora.add_source_files(objs, ["video_stream_theoraplayer.cpp"])
|
|
|
|
|
|
|
|
if env['use_theoraplayer_binary'] == "yes":
|
|
|
|
if env["platform"] == "iphone":
|
|
|
|
env.Append(LIBPATH=['#drivers/theoraplayer/lib/ios'])
|
|
|
|
env.Append(LIBS=['theoraplayer', 'ogg', 'theora', 'tremor'])
|
|
|
|
if env["platform"] == "windows":
|
|
|
|
env.Append(LIBPATH=['#drivers/theoraplayer/lib/windows'])
|
|
|
|
env.Append(LINKFLAGS=['libtheoraplayer_static.lib', 'libogg.lib', 'libtheora.lib', 'libvorbis.lib'])
|
|
|
|
else:
|
|
|
|
env_theora.add_source_files(objs, sources)
|
2014-09-15 14:33:30 +00:00
|
|
|
|
|
|
|
env.drivers_sources += objs
|
|
|
|
|
|
|
|
|