2016-09-20 23:29:22 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
import lutin.debug as debug
|
2016-10-04 23:41:29 +02:00
|
|
|
import lutin.tools as tools
|
2016-09-20 23:29:22 +02:00
|
|
|
import os
|
2016-10-10 22:02:01 +02:00
|
|
|
import lutinLib_ffmpegCommon
|
2016-09-20 23:29:22 +02:00
|
|
|
|
|
|
|
def get_type():
|
|
|
|
return "LIBRARY"
|
|
|
|
|
|
|
|
def get_desc():
|
|
|
|
return "FFMPEG library"
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
2016-10-04 23:41:29 +02:00
|
|
|
def configure(target, my_module):
|
2016-09-20 23:29:22 +02:00
|
|
|
|
|
|
|
# add the file to compile:
|
|
|
|
my_module.add_src_file([
|
|
|
|
'ffmpeg/libavdevice/alldevices.c',
|
|
|
|
'ffmpeg/libavdevice/avdevice.c',
|
|
|
|
'ffmpeg/libavdevice/lavfi.c',
|
|
|
|
'ffmpeg/libavdevice/utils.c',
|
|
|
|
])
|
2016-10-10 22:02:01 +02:00
|
|
|
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'
|
|
|
|
])
|
2016-10-11 21:14:19 +02:00
|
|
|
elif "MacOs" in target.get_type():
|
|
|
|
my_module.add_src_file([
|
|
|
|
'ffmpeg/libavdevice/avfoundation.m',
|
|
|
|
])
|
|
|
|
elif "Windows" in target.get_type():
|
2016-10-10 22:02:01 +02:00
|
|
|
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',
|
|
|
|
])
|
2016-09-20 23:29:22 +02:00
|
|
|
"""
|
|
|
|
my_module.add_header_file([
|
|
|
|
'module-name/file1.h',
|
|
|
|
'module-name/file2.h'
|
|
|
|
])
|
|
|
|
"""
|
2016-10-10 22:02:01 +02:00
|
|
|
my_module.compile_version("c", 1999)
|
2016-10-04 23:41:29 +02:00
|
|
|
my_module.add_path("ffmpeg")
|
2016-10-10 22:02:01 +02:00
|
|
|
|
|
|
|
lutinLib_ffmpegCommon.add_common_property(target, my_module);
|
|
|
|
|
2016-09-20 23:29:22 +02:00
|
|
|
# add dependency of libraries:
|
|
|
|
my_module.add_depend('c')
|
|
|
|
my_module.add_depend('m')
|
|
|
|
my_module.add_depend('z')
|
|
|
|
my_module.add_depend('pthread')
|
2016-10-07 21:41:52 +02:00
|
|
|
my_module.add_depend([
|
|
|
|
'ffmpeg-avfilter',
|
|
|
|
'ffmpeg-avutil',
|
|
|
|
])
|
2016-09-20 23:29:22 +02:00
|
|
|
|
2016-10-04 23:41:29 +02:00
|
|
|
return True
|