Add libav, avplay, and qt_avplay
Imported from the genode repository. Issue genodelabs/genode#3103
This commit is contained in:
24
lib/mk/av.inc
Normal file
24
lib/mk/av.inc
Normal file
@@ -0,0 +1,24 @@
|
||||
CC_C_OPT += -DHAVE_AV_CONFIG_H
|
||||
CC_C_OPT += -std=c99 -DPIC
|
||||
|
||||
# The third-party sources induce a lot of "assignment discards ‘const’
|
||||
# qualifier" and "passing argument from incompatible pointer type" warnings.
|
||||
# Therefore, switch off _all_ warnings.
|
||||
CC_WARN += -w
|
||||
|
||||
# Some source files do not build with -O0 due to conflicting register
|
||||
# allocation and inline assembler constrains. We enforce optimization for these
|
||||
# files.
|
||||
CC_OPT_h264_cabac = -O2
|
||||
CC_OPT_motion_est = -O2
|
||||
|
||||
INC_DIR += $(REP_DIR)/src/lib/libav
|
||||
|
||||
include $(REP_DIR)/src/lib/libav/config.mak
|
||||
|
||||
SRC_C += $(OBJS:.o=.c)
|
||||
SRC_C += $(OBJS-yes:.o=.c)
|
||||
|
||||
LIBS += libc libm
|
||||
|
||||
SHARED_LIB = yes
|
||||
14
lib/mk/avcodec.inc
Normal file
14
lib/mk/avcodec.inc
Normal file
@@ -0,0 +1,14 @@
|
||||
include $(REP_DIR)/lib/mk/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/import/import-avcodec.mk
|
||||
|
||||
LIBAV_PORT_DIR := $(call select_from_ports,libav)
|
||||
LIBAVCODEC_DIR := $(LIBAV_PORT_DIR)/src/lib/libav/libavcodec
|
||||
|
||||
-include $(LIBAVCODEC_DIR)/Makefile
|
||||
|
||||
LIBS += zlib
|
||||
|
||||
INC_DIR += $(LIBAV_PORT_DIR)/src/lib/libav
|
||||
|
||||
vpath % $(LIBAVCODEC_DIR)
|
||||
11
lib/mk/avfilter.mk
Normal file
11
lib/mk/avfilter.mk
Normal file
@@ -0,0 +1,11 @@
|
||||
include $(REP_DIR)/lib/mk/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/import/import-avfilter.mk
|
||||
|
||||
LIBAVFILTER_DIR = $(call select_from_ports,libav)/src/lib/libav/libavfilter
|
||||
|
||||
-include $(LIBAVFILTER_DIR)/Makefile
|
||||
|
||||
vpath % $(LIBAVFILTER_DIR)
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
13
lib/mk/avformat.mk
Normal file
13
lib/mk/avformat.mk
Normal file
@@ -0,0 +1,13 @@
|
||||
include $(REP_DIR)/lib/mk/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/import/import-avformat.mk
|
||||
|
||||
LIBAVFORMAT_DIR = $(call select_from_ports,libav)/src/lib/libav/libavformat
|
||||
|
||||
-include $(LIBAVFORMAT_DIR)/Makefile
|
||||
|
||||
LIBS += avcodec avutil zlib
|
||||
|
||||
vpath % $(LIBAVFORMAT_DIR)
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
11
lib/mk/avresample.mk
Normal file
11
lib/mk/avresample.mk
Normal file
@@ -0,0 +1,11 @@
|
||||
include $(REP_DIR)/lib/mk/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/import/import-avresample.mk
|
||||
|
||||
LIBAVRESAMPLE_DIR = $(call select_from_ports,libav)/src/lib/libav/libavresample
|
||||
|
||||
-include $(LIBAVRESAMPLE_DIR)/Makefile
|
||||
|
||||
vpath % $(LIBAVRESAMPLE_DIR)
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
9
lib/mk/avutil.inc
Normal file
9
lib/mk/avutil.inc
Normal file
@@ -0,0 +1,9 @@
|
||||
include $(REP_DIR)/lib/mk/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/import/import-avutil.mk
|
||||
|
||||
LIBAVUTIL_DIR = $(call select_from_ports,libav)/src/lib/libav/libavutil
|
||||
|
||||
-include $(LIBAVUTIL_DIR)/Makefile
|
||||
|
||||
vpath % $(LIBAVUTIL_DIR)
|
||||
7
lib/mk/spec/arm/avcodec.mk
Normal file
7
lib/mk/spec/arm/avcodec.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
CC_C_OPT += -DARCH_ARM=1
|
||||
|
||||
include $(REP_DIR)/lib/mk/avcodec.inc
|
||||
|
||||
-include $(LIBAVCODEC_DIR)/arm/Makefile
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
10
lib/mk/spec/arm/avutil.mk
Normal file
10
lib/mk/spec/arm/avutil.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
# must be defined before the inclusion of the libavutil 'Makefile'
|
||||
ARCH_ARM=yes
|
||||
|
||||
CC_C_OPT += -DARCH_ARM=1
|
||||
|
||||
include $(REP_DIR)/lib/mk/avutil.inc
|
||||
|
||||
-include $(LIBAVUTIL_DIR)/arm/Makefile
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
5
lib/mk/spec/x86/avcodec.inc
Normal file
5
lib/mk/spec/x86/avcodec.inc
Normal file
@@ -0,0 +1,5 @@
|
||||
CC_C_OPT += -DARCH_X86=1
|
||||
|
||||
include $(REP_DIR)/lib/mk/avcodec.inc
|
||||
|
||||
-include $(LIBAVCODEC_DIR)/x86/Makefile
|
||||
10
lib/mk/spec/x86/avutil.inc
Normal file
10
lib/mk/spec/x86/avutil.inc
Normal file
@@ -0,0 +1,10 @@
|
||||
# must be defined before the inclusion of the libavutil 'Makefile'
|
||||
ARCH_X86=yes
|
||||
|
||||
CC_C_OPT += -DARCH_X86=1
|
||||
|
||||
include $(REP_DIR)/lib/mk/avutil.inc
|
||||
|
||||
INC_DIR += $(REP_DIR)/src/lib/libav
|
||||
|
||||
-include $(LIBAVUTIL_DIR)/x86/Makefile
|
||||
5
lib/mk/spec/x86_32/avcodec.mk
Normal file
5
lib/mk/spec/x86_32/avcodec.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
CC_C_OPT += -DARCH_X86_32=1
|
||||
|
||||
include $(REP_DIR)/lib/mk/spec/x86/avcodec.inc
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
5
lib/mk/spec/x86_32/avutil.mk
Normal file
5
lib/mk/spec/x86_32/avutil.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
CC_C_OPT += -DARCH_X86_32=1
|
||||
|
||||
include $(REP_DIR)/lib/mk/spec/x86/avutil.inc
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
1
lib/mk/spec/x86_64/av.inc
Normal file
1
lib/mk/spec/x86_64/av.inc
Normal file
@@ -0,0 +1 @@
|
||||
CC_C_OPT += -DARCH_X86_64=1
|
||||
5
lib/mk/spec/x86_64/avcodec.mk
Normal file
5
lib/mk/spec/x86_64/avcodec.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(REP_DIR)/lib/mk/spec/x86_64/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/mk/spec/x86/avcodec.inc
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
5
lib/mk/spec/x86_64/avutil.mk
Normal file
5
lib/mk/spec/x86_64/avutil.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(REP_DIR)/lib/mk/spec/x86_64/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/mk/spec/x86/avutil.inc
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
13
lib/mk/swscale.mk
Normal file
13
lib/mk/swscale.mk
Normal file
@@ -0,0 +1,13 @@
|
||||
include $(REP_DIR)/lib/mk/av.inc
|
||||
|
||||
include $(REP_DIR)/lib/import/import-swscale.mk
|
||||
|
||||
CC_WARN += -Wno-switch
|
||||
|
||||
LIBSWSCALE_DIR = $(call select_from_ports,libav)/src/lib/libav/libswscale
|
||||
|
||||
-include $(LIBSWSCALE_DIR)/Makefile
|
||||
|
||||
vpath % $(LIBSWSCALE_DIR)
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
Reference in New Issue
Block a user