[DEV] build ffmpeg in static mofe functionnal

This commit is contained in:
Edouard DUPIN 2016-09-21 21:52:32 +02:00
parent 1ad8a4d46f
commit 1c94055afd
6 changed files with 121 additions and 6 deletions

View File

@ -140,5 +140,6 @@ def create(target, module_name):
my_module.add_depend('m')
my_module.add_depend('z')
my_module.add_depend('pthread')
my_module.add_depend('ffmpeg-avfilter')
return my_module

View File

@ -305,5 +305,8 @@ def create(target, module_name):
my_module.add_depend('m')
my_module.add_depend('z')
my_module.add_depend('pthread')
my_module.add_depend([
'ffmpeg-avcodec',
])
return my_module

View File

@ -513,5 +513,6 @@ def create(target, module_name):
my_module.add_depend('pthread')
my_module.add_depend('rpc')
my_module.add_depend('arpa')
my_module.add_depend('ffmpeg-avcodec')
return my_module

50
lutin_ffmpeg-play.py Normal file
View File

@ -0,0 +1,50 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
import lutin.debug as debug
import os
def get_type():
#return "BINARY_SHARED"
return "BINARY"
def get_desc():
return "FFMPEG main application"
def get_licence():
return "LGPL-2.1"
def get_compagny_type():
return "org"
def get_compagny_name():
return "ffmpeg"
def get_maintainer():
return "authors.txt"
def get_version():
return "version.txt"
# create the module
# @param[in] target reference on the Target that is currently build
# @param[in] module_name Name of the module that is extract from the file name (to be generic)
def create(target, module_name):
my_module = module.Module(__file__, module_name, get_type())
# add the file to compile:
my_module.add_src_file([
'ffmpeg/ffplay.c',
'ffmpeg/cmdutils.c',
])
my_module.add_path(os.path.join(tools.get_current_path(__file__), "ffmpeg"))
my_module.add_path(os.path.join(tools.get_current_path(__file__), "generated"))
my_module.add_depend([
'ffmpeg-libs',
'va',
'SDL',
])
return my_module

View File

@ -0,0 +1,62 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
import lutin.debug as debug
import os
def get_type():
#return "BINARY_SHARED"
return "BINARY"
def get_desc():
return "FFMPEG main application"
def get_licence():
return "LGPL-2.1"
def get_compagny_type():
return "org"
def get_compagny_name():
return "ffmpeg"
def get_maintainer():
return "authors.txt"
def get_version():
return "version.txt"
# create the module
# @param[in] target reference on the Target that is currently build
# @param[in] module_name Name of the module that is extract from the file name (to be generic)
def create(target, module_name):
my_module = module.Module(__file__, module_name, get_type())
# add the file to compile:
my_module.add_src_file([
'ffmpeg/ffserver.c',
'ffmpeg/ffserver_config.c',
'ffmpeg/cmdutils.c',
])
my_module.add_path(os.path.join(tools.get_current_path(__file__), "ffmpeg"))
my_module.add_path(os.path.join(tools.get_current_path(__file__), "generated"))
my_module.add_depend([
'ffmpeg-libs',
'va',
'vdpau',
])
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",
"-fomit-frame-pointer",
"-D_GNU_SOURCE=1",
"-D_REENTRANT"
])
return my_module

View File

@ -5,7 +5,7 @@ import lutin.debug as debug
import os
def get_type():
return "BINARY_SHARED"
#return "BINARY_SHARED"
return "BINARY"
def get_desc():
@ -49,8 +49,6 @@ def create(target, module_name):
'va',
'vdpau',
])
my_module.add_flag("link-lib", ["Xv", "X11", "Xext", "vdpau", "va", "va-drm", "va", "va-x11", "va",
"xcb", "xcb-shm", "xcb-xfixes", "xcb-shape", "X11", "jack", "asound", "SDL", "pthread", "m", "lzma", "bz2", "z", "pthread"])
my_module.add_flag("link", "-Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common")
return my_module
return my_module