[DEV] build for Windows

This commit is contained in:
Edouard DUPIN 2016-10-10 22:02:01 +02:00
parent 286a5d05bf
commit ab5fefba37
20 changed files with 4618 additions and 406 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
/* Generated by ffconf */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
#define AV_HAVE_BIGENDIAN 0
#define AV_HAVE_FAST_UNALIGNED 1
#define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0
#endif /* AVUTIL_AVCONFIG_H */

View File

@ -0,0 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "n3.1.1"
#endif /* AVUTIL_FFVERSION_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
/* Generated by ffconf */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
#define AV_HAVE_BIGENDIAN 0
#define AV_HAVE_FAST_UNALIGNED 1
#define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0
#endif /* AVUTIL_AVCONFIG_H */

View File

@ -0,0 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "n3.1.1"
#endif /* AVUTIL_FFVERSION_H */

87
lutinLib_ffmpegCommon.py Normal file
View File

@ -0,0 +1,87 @@
#!/usr/bin/python
import lutin.debug as debug
import lutin.tools as tools
import os
import lutinLib_ffmpegCommon
def add_generate_path(target, my_module):
generated_path = os.path.join("generated", target.get_name())
generated_path_bs = os.path.join("generated", target.get_name() + "_" + str(target.get_bus_size()))
if os.path.exists(os.path.join(os.path.dirname(__file__), generated_path_bs)) == True:
my_module.add_path(generated_path_bs)
elif os.path.exists(os.path.join(os.path.dirname(__file__), generated_path)) == True:
my_module.add_path(generated_path)
else:
debug.warning("get default Path for type: " + str(target.get_type()))
my_module.add_path("generated/Linux")
def add_common_property(target, my_module):
add_generate_path(target, my_module)
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DHAVE_AV_CONFIG_H",
])
if "Linux" in target.get_type():
my_module.add_flag('c', [
"-DZLIB_CONST",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC"
])
elif "Windows" in target.get_type():
my_module.add_flag('c', [
"-U__STRICT_ANSI__",
"-D__USE_MINGW_ANSI_STDIO=1",
"-D__printf__=__gnu_printf__",
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if "Windows" in target.get_type():
my_module.add_flag('c', [
"-fomit-frame-pointer",
"-Wno-maybe-uninitialized",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])

View File

@ -3,6 +3,8 @@ import lutin.debug as debug
import lutin.tools as tools
import os
import lutinLib_ffmpegCommon
def get_type():
return "LIBRARY"
@ -825,57 +827,12 @@ def configure(target, my_module):
'ffmpeg/libavcodec/vdpau.c',
])
"""
my_module.compile_version("c", 1999, gnu=True)
my_module.compile_version("c", 1999)
my_module.add_path("ffmpeg")
my_module.add_path("generated")
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DZLIB_CONST",
"-DHAVE_AV_CONFIG_H",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC"
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])
lutinLib_ffmpegCommon.add_common_property(target, my_module);
# add dependency of libraries:
my_module.add_depend('c')
my_module.add_depend('m')

View File

@ -2,6 +2,7 @@
import lutin.debug as debug
import lutin.tools as tools
import os
import lutinLib_ffmpegCommon
def get_type():
return "LIBRARY"
@ -29,110 +30,72 @@ def configure(target, my_module):
# add the file to compile:
my_module.add_src_file([
'ffmpeg/libavdevice/alldevices.c',
])
my_module.add_optionnal_depend('alsa', src_file=[
'ffmpeg/libavdevice/alsa.c',
'ffmpeg/libavdevice/alsa_dec.c',
'ffmpeg/libavdevice/alsa_enc.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/avdevice.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/dv1394.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/fbdev_common.c',
'ffmpeg/libavdevice/fbdev_dec.c',
'ffmpeg/libavdevice/fbdev_enc.c',
])
my_module.add_optionnal_depend('jack', src_file=[
'ffmpeg/libavdevice/jack.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/lavfi.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/oss.c',
'ffmpeg/libavdevice/oss_dec.c',
'ffmpeg/libavdevice/oss_enc.c',
])
my_module.add_optionnal_depend('sdl', src_file=[
'ffmpeg/libavdevice/sdl.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/timefilter.c',
'ffmpeg/libavdevice/utils.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/v4l2-common.c',
'ffmpeg/libavdevice/v4l2.c',
'ffmpeg/libavdevice/v4l2enc.c',
])
my_module.add_optionnal_depend('xcb', src_file=[
'ffmpeg/libavdevice/xcbgrab.c'
])
my_module.add_optionnal_depend('X11', src_file=[
'ffmpeg/libavdevice/xv.c'
])
if "Linux" in target.get_type():
my_module.add_src_file([
'ffmpeg/libavdevice/timefilter.c',
])
my_module.add_optionnal_depend('alsa', src_file=[
'ffmpeg/libavdevice/alsa.c',
'ffmpeg/libavdevice/alsa_dec.c',
'ffmpeg/libavdevice/alsa_enc.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/dv1394.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/fbdev_common.c',
'ffmpeg/libavdevice/fbdev_dec.c',
'ffmpeg/libavdevice/fbdev_enc.c',
])
my_module.add_optionnal_depend('jack', src_file=[
'ffmpeg/libavdevice/jack.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/oss.c',
'ffmpeg/libavdevice/oss_dec.c',
'ffmpeg/libavdevice/oss_enc.c',
])
my_module.add_optionnal_depend('sdl', src_file=[
'ffmpeg/libavdevice/sdl.c',
])
my_module.add_src_file([
'ffmpeg/libavdevice/v4l2-common.c',
'ffmpeg/libavdevice/v4l2.c',
'ffmpeg/libavdevice/v4l2enc.c',
])
my_module.add_optionnal_depend('xcb', src_file=[
'ffmpeg/libavdevice/xcbgrab.c'
])
my_module.add_optionnal_depend('X11', src_file=[
'ffmpeg/libavdevice/xv.c'
])
if "Windows" in target.get_type():
my_module.add_src_file([
'ffmpeg/libavdevice/dshow.c',
'ffmpeg/libavdevice/dshow_common.c',
'ffmpeg/libavdevice/dshow_crossbar.c',
'ffmpeg/libavdevice/dshow_enummediatypes.c',
'ffmpeg/libavdevice/dshow_enumpins.c',
'ffmpeg/libavdevice/dshow_filter.c',
'ffmpeg/libavdevice/dshow_pin.c',
'ffmpeg/libavdevice/gdigrab.c',
'ffmpeg/libavdevice/vfwcap.c',
])
"""
my_module.add_header_file([
'module-name/file1.h',
'module-name/file2.h'
])
"""
my_module.compile_version("c", 1999, gnu=True)
my_module.compile_version("c", 1999)
my_module.add_path("ffmpeg")
my_module.add_path("generated")
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DZLIB_CONST",
"-DHAVE_AV_CONFIG_H",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC",
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])
lutinLib_ffmpegCommon.add_common_property(target, my_module);
# add dependency of libraries:
my_module.add_depend('c')
my_module.add_depend('m')

View File

@ -2,6 +2,7 @@
import lutin.debug as debug
import lutin.tools as tools
import os
import lutinLib_ffmpegCommon
def get_type():
return "LIBRARY"
@ -246,57 +247,11 @@ def configure(target, my_module):
'ffmpeg/libavfilter/x86/vf_w3fdif_init.c',
'ffmpeg/libavfilter/x86/vf_yadif_init.c',
])
my_module.compile_version("c", 1999, gnu=True)
my_module.compile_version("c", 1999)
my_module.add_path("ffmpeg")
my_module.add_path("generated")
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DZLIB_CONST",
"-DHAVE_AV_CONFIG_H",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC",
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])
lutinLib_ffmpegCommon.add_common_property(target, my_module);
# add dependency of libraries:
my_module.add_depend('c')
my_module.add_depend('m')

View File

@ -2,6 +2,7 @@
import lutin.tools as tools
import lutin.debug as debug
import os
import lutinLib_ffmpegCommon
def get_type():
return "LIBRARY"
@ -407,7 +408,12 @@ def configure(target, my_module):
'ffmpeg/libavformat/txd.c',
'ffmpeg/libavformat/udp.c',
'ffmpeg/libavformat/uncodedframecrcenc.c',
'ffmpeg/libavformat/unix.c',
])
if "Windows" not in target.get_type():
my_module.add_src_file([
'ffmpeg/libavformat/unix.c',
])
my_module.add_src_file([
'ffmpeg/libavformat/url.c',
'ffmpeg/libavformat/urldecode.c',
'ffmpeg/libavformat/utils.c',
@ -453,64 +459,19 @@ def configure(target, my_module):
'ffmpeg/libavformat/yuv4mpegdec.c',
'ffmpeg/libavformat/yuv4mpegenc.c',
])
my_module.compile_version("c", 1999, gnu=True)
my_module.compile_version("c", 1999)
my_module.add_path("ffmpeg")
my_module.add_path("generated")
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DZLIB_CONST",
"-DHAVE_AV_CONFIG_H",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC",
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])
lutinLib_ffmpegCommon.add_common_property(target, my_module);
# add dependency of libraries:
my_module.add_depend('c')
my_module.add_depend('m')
my_module.add_depend('z')
my_module.add_depend('pthread')
my_module.add_depend('rpc')
my_module.add_depend('arpa')
if "Windows" not in target.get_type():
my_module.add_depend('rpc')
my_module.add_depend('arpa')
my_module.add_depend([
'ffmpeg-avcodec',
'ffmpeg-avutil',

View File

@ -2,6 +2,7 @@
import lutin.tools as tools
import lutin.debug as debug
import os
import lutinLib_ffmpegCommon
def get_type():
return "LIBRARY"
@ -40,57 +41,11 @@ def configure(target, my_module):
'ffmpeg/libswresample/x86/rematrix_init.c',
'ffmpeg/libswresample/x86/resample_init.c',
])
my_module.compile_version("c", 1999, gnu=True)
my_module.compile_version("c", 1999)
my_module.add_path("ffmpeg")
my_module.add_path("generated")
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DZLIB_CONST",
"-DHAVE_AV_CONFIG_H",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC",
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])
lutinLib_ffmpegCommon.add_common_property(target, my_module);
# add dependency of libraries:
my_module.add_depend('c')
my_module.add_depend('m')
@ -99,5 +54,7 @@ def configure(target, my_module):
my_module.add_depend([
'ffmpeg-avutil',
])
return True
return True

View File

@ -2,6 +2,7 @@
import lutin.tools as tools
import lutin.debug as debug
import os
import lutinLib_ffmpegCommon
def get_type():
return "LIBRARY"
@ -47,57 +48,11 @@ def configure(target, my_module):
'ffmpeg/libswscale/x86/yuv2rgb.c',
'ffmpeg/libswscale/yuv2rgb.c',
])
my_module.compile_version("c", 1999, gnu=True)
my_module.compile_version("c", 1999)
my_module.add_path("ffmpeg")
my_module.add_path("generated")
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DZLIB_CONST",
"-DHAVE_AV_CONFIG_H",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC",
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])
lutinLib_ffmpegCommon.add_common_property(target, my_module);
# add dependency of libraries:
my_module.add_depend('c')
my_module.add_depend('m')

View File

@ -2,6 +2,7 @@
import lutin.tools as tools
import lutin.debug as debug
import os
import lutinLib_ffmpegCommon
def get_type():
return "LIBRARY"
@ -99,57 +100,11 @@ def configure(target, my_module):
'ffmpeg/libavutil/xga_font_data.c',
'ffmpeg/libavutil/xtea.c',
])
my_module.compile_version("c", 1999, gnu=True)
my_module.compile_version("c", 1999)
my_module.add_path("ffmpeg", export=True)
my_module.add_path("generated", export=True)
my_module.add_flag('c', [
"-D_ISOC99_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-D_XOPEN_SOURCE=600",
"-DZLIB_CONST",
"-DHAVE_AV_CONFIG_H",
"-D_GNU_SOURCE=1",
"-D_REENTRANT",
"-DPIC",
])
#-I/usr/include/SDL
my_module.add_flag('c', [
"-Wdeclaration-after-statement",
"-Wall",
"-Wdisabled-optimization",
"-Wpointer-arith",
"-Wredundant-decls",
"-Wwrite-strings",
"-Wtype-limits",
"-Wundef",
"-Wmissing-prototypes",
"-Wno-pointer-to-int-cast",
"-Wstrict-prototypes",
"-Wempty-body",
"-Wno-parentheses",
"-Wno-switch",
"-Wno-format-zero-length",
"-Wno-pointer-sign",
"-Wno-unused-const-variable",
"-fno-math-errno",
"-fno-signed-zeros",
"-Werror=format-security",
"-Werror=implicit-function-declaration",
"-Werror=missing-prototypes",
"-Werror=return-type",
"-Werror=vla",
"-Wformat",
"-fdiagnostics-color=auto",
])
if target.get_compilator() == "clang":
my_module.add_flag('c', [ "-Wno-uninitialized"])
else:
my_module.add_flag('c', [ "-Wno-maybe-uninitialized"])
if "Linux" in target.get_type():
# TODO: Check the real impact ...
my_module.add_flag('link-dynamic', ["-Wl,-Bsymbolic"])
lutinLib_ffmpegCommon.add_common_property(target, my_module);
# add dependency of libraries:
my_module.add_depend('c')
my_module.add_depend('m')

View File

@ -2,6 +2,7 @@
import lutin.tools as tools
import lutin.debug as debug
import os
import lutinLib_ffmpegCommon
def get_type():
#return "BINARY_SHARED"
@ -26,15 +27,15 @@ def get_version():
return "version.txt"
def configure(target, my_module):
if "Linux" not in target.get_type():
return False
# add the file to compile:
my_module.add_src_file([
'ffmpeg/ffplay.c',
'ffmpeg/cmdutils.c',
])
my_module.add_path("ffmpeg")
my_module.add_path("generated")
lutinLib_ffmpegCommon.add_generate_path(target, my_module)
my_module.add_depend([
'ffmpeg-libs',
'va',

View File

@ -3,6 +3,7 @@ import lutin.module as module
import lutin.tools as tools
import lutin.debug as debug
import os
import lutinLib_ffmpegCommon
def get_type():
#return "BINARY_SHARED"
@ -27,7 +28,8 @@ def get_version():
return "version.txt"
def configure(target, my_module):
if "Linux" not in target.get_type():
return False
# add the file to compile:
my_module.add_src_file([
'ffmpeg/ffserver.c',
@ -36,7 +38,7 @@ def configure(target, my_module):
])
my_module.add_path("ffmpeg")
my_module.add_path("generated")
lutinLib_ffmpegCommon.add_generate_path(target, my_module)
my_module.add_depend([
'ffmpeg-libs',
'va',

View File

@ -2,6 +2,10 @@
import lutin.tools as tools
import lutin.debug as debug
import os
import lutinLib_ffmpegCommon
# configure windows: ./configure --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --pkg-config=pkg-config --disable-yasm --disable-programs --disable-doc --disable-schannel --disable-sdl --disable-securetransport --disable-xlib --disable-audiotoolbox --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-xvmc
# configure Linux: ./configure --enable-shared --disable-yasm --disable-programs --disable-doc --disable-schannel --disable-sdl --disable-securetransport --disable-xlib --disable-audiotoolbox --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-xvmc --enable-shared
def get_type():
#return "BINARY_SHARED"
@ -33,17 +37,46 @@ def configure(target, my_module):
'ffmpeg/cmdutils.c',
'ffmpeg/ffmpeg_opt.c',
'ffmpeg/ffmpeg_filter.c',
'ffmpeg/ffmpeg_vaapi.c',
#'ffmpeg/ffmpeg_vdpau.c',
])
if "Windows" not in target.get_type():
my_module.add_src_file([
'ffmpeg/ffmpeg_vaapi.c',
])
my_module.add_path("ffmpeg")
my_module.add_path("generated")
lutinLib_ffmpegCommon.add_generate_path(target, my_module)
my_module.add_depend([
'ffmpeg-libs',
'va',
'vdpau',
])
if "Windows" not in target.get_type():
my_module.add_depend([
'va',
'vdpau',
])
else:
my_module.add_depend([
'ws2',
'avicap',
'gdi',
'psapi',
'ole',
'strmiids',
'uuid',
'oleaut',
'advapi',
'shell',
'shlwapi',
])
#-Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
my_module.add_flag("link", [
"-Wl,--nxcompat,--dynamicbase",
"-Wl,--high-entropy-va",
"-Wl,--as-needed",
"-Wl,--warn-common",
])
return True