aboutsummaryrefslogtreecommitdiff
path: root/multimedia/gst1-libav/Makefile
blob: 40ddb74a645072d68daae27d01f84dac0554ca0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=gst1-libav
PKG_VERSION:=1.20.5
PKG_RELEASE:=1

PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav
PKG_HASH:=b152e3cc49d014899f53c39d8a6224a44e1399b4cf76aa5f9a903fdf9793c3cc
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION)

PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
		Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING COPYING.LIB

PKG_BUILD_FLAGS:=no-mips16

GST_VERSION:=1.0

LIBAV_ENCODERS:= \
	ac3 \
	jpegls \
	mpeg1video \
	mpeg2video \
	mpeg4 \
	pcm_s16be \
	pcm_s16le \
	png \
	vorbis \
	zlib \

LIBAV_DECODERS:= \
	aac \
	ac3 \
	atrac3 \
	gif \
	h264 \
	jpegls \
	mp2 \
	mp3 \
	mpeg1video \
	mpeg2video \
	mpeg4 \
	mpegvideo \
	pcm_s16be \
	pcm_s16le \
	png \
	vorbis \
	wmav1 \
	wmav2 \
	zlib \

LIBAV_MUXERS:= \
	ac3 \
	ffm \
	h264 \
	mp3 \
	mp4 \
	mpeg1video \
	mpeg2video \
	mpegts \
	ogg \
	oss \
	rtp \

LIBAV_DEMUXERS:= \
	ac3 \
	ffm \
	h264 \
	mp3 \
	mpegps \
	mpegts \
	mpegvideo \
	ogg \
	rm \
	rtsp \
	sdp \
	v4l2 \

LIBAV_PARSERS:= \
	aac \
	ac3 \
	h264 \
	mpegaudio \
	mpegvideo \
	mpeg4video \

LIBAV_PROTOCOLS:= \
	file http pipe rtp tcp udp

PKG_CONFIG_DEPENDS:= \
	$(patsubst %,CONFIG_GST1_LIBAV_ENCODER_%,$(LIBAV_ENCODERS)) \
	$(patsubst %,CONFIG_GST1_LIBAV_DECODER_%,$(LIBAV_DECODERS)) \
	$(patsubst %,CONFIG_GST1_LIBAV_MUXER_%,$(LIBAV_DEMUXERS)) \
	$(patsubst %,CONFIG_GST1_LIBAV_DEMUXER_%,$(LIBAV_DEMUXERS)) \
	$(patsubst %,CONFIG_GST1_LIBAV_PARSER_%,$(LIBAV_PARSERS)) \
	$(patsubst %,CONFIG_GST1_LIBAV_PROTOCOL_%,$(LIBAV_PROTOCOLS))

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/meson.mk

define Package/gst1-libav
  SECTION:=multimedia
  CATEGORY:=Multimedia
  TITLE:=GStreamer Libav plugin
  URL:=https://www.gstreamer.net/modules/gst-libav.html
  DEPENDS:= +libgstreamer1 +gstreamer1-plugins-base \
	    +gst1-mod-alsa +libgst1audio +libgst1pbutils +libgst1video \
	    +libbz2 +liblzma +libffmpeg-full
endef

define Package/gst1-libav/description
  GStreamer with libav bindings using internal Libav
endef

define Package/gst1-libav/config
  source "$(SOURCE)/Config.in"
endef

FILTER_CONFIG= \
	$(foreach c, $(3), \
		$(if $(CONFIG_GST1_LIBAV_$(1)_$(c)),--enable-$(2)='$(c)') \
	)

LIBAV_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(LIBAV_ENCODERS))
LIBAV_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(LIBAV_DECODERS))
LIBAV_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(LIBAV_MUXERS))
LIBAV_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(LIBAV_DEMUXERS))
LIBAV_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(LIBAV_PARSERS))
LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOCOLS))

# Hack to build on mips64.
ifneq ($(findstring octeonplus,$(CONFIG_CPU_TYPE)),)
  REAL_CPU_TYPE:=octeon+
else
  # Strip off FPU notation.
  REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
endif

CONFIGURE_ARGS += \
	--disable-Bsymbolic \
	--disable-fatal-warnings \
	--disable-glib-asserts \
	--disable-gobject-cast-checks \
	--disable-gtk-doc-html \
	--disable-valgrind \
	--without-system-libav \
	--with-pic \
	--with-libav-extra-configure=" \
	$(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
	--disable-bsfs \
	--disable-programs \
	--disable-devices \
	--disable-debug \
	--disable-doc \
	--disable-extra-warnings \
	--disable-htmlpages \
	--disable-manpages \
	--disable-podpages \
	--disable-txtpages \
	--disable-runtime-cpudetect \
	--disable-encoders \
	$(LIBAV_CONFIGURE_ENCODERS) \
	--disable-decoders \
	$(LIBAV_CONFIGURE_DECODERS) \
	--disable-muxers \
	$(LIBAV_CONFIGURE_MUXERS) \
	--disable-demuxers \
	$(LIBAV_CONFIGURE_DEMUXERS) \
	--disable-parsers \
	$(LIBAV_CONFIGURE_PARSERS) \
	--disable-protocols \
	$(LIBAV_CONFIGURE_PROTOCOLS) \
	--disable-asm \
	--disable-altivec \
	--disable-amd3dnow \
	--disable-amd3dnowext \
	--disable-mmx \
	--disable-mmxext \
	--disable-sse \
	--disable-sse2 \
	--disable-sse3 \
	--disable-ssse3 \
	--disable-sse4 \
	--disable-sse42 \
	--disable-avx \
	--disable-xop \
	--disable-fma3 \
	--disable-fma4 \
	--disable-avx2 \
	--disable-inline-asm \
	--disable-x86asm"

define Package/gst1-libav/install
	$(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
	( cd $(PKG_INSTALL_DIR); $(CP) \
                ./usr/lib/gstreamer-$(GST_VERSION)/libgstlibav.so* \
                $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
        )
endef

$(eval $(call BuildPackage,gst1-libav))