aboutsummaryrefslogtreecommitdiff
path: root/package/mediastreamer/mediastreamer.mk
blob: 691eaddb528662b568b27f32f9459ed58341527b (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
################################################################################
#
# mediastreamer
#
################################################################################

MEDIASTREAMER_VERSION = 4.3.1
MEDIASTREAMER_SITE = \
	https://gitlab.linphone.org/BC/public/mediastreamer2/-/archive/$(MEDIASTREAMER_VERSION)
MEDIASTREAMER_LICENSE = GPL-3.0+
MEDIASTREAMER_LICENSE_FILES = LICENSE.txt
MEDIASTREAMER_INSTALL_STAGING = YES
MEDIASTREAMER_DEPENDENCIES = ortp
MEDIASTREAMER_CONF_OPTS = \
	-DENABLE_DOC=OFF \
	-DENABLE_GL=OFF \
	-DENABLE_GLX=OFF \
	-DENABLE_MKV=OFF \
	-DENABLE_SOUND=OFF \
	-DENABLE_STRICT=OFF \
	-DENABLE_TOOLS=OFF \
	-DENABLE_UNIT_TESTS=OFF \
	-DENABLE_ZRTP=OFF

ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy)
MEDIASTREAMER_CONF_OPTS += \
	-DENABLE_ALSA=ON \
	-DENABLE_SOUND=ON
MEDIASTREAMER_DEPENDENCIES += alsa-lib
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_ALSA=OFF
endif

ifeq ($(BR2_PACKAGE_BCG729),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_G729=ON
MEDIASTREAMER_DEPENDENCIES += bcg729
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_G729=OFF
endif

ifeq ($(BR2_PACKAGE_JPEG_TURBO),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_JPEG=ON
MEDIASTREAMER_DEPENDENCIES += jpeg
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_JPEG=OFF
endif

ifeq ($(BR2_PACKAGE_LIBGSM),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_GSM=ON
MEDIASTREAMER_DEPENDENCIES += libgsm
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_GSM=OFF
endif

ifeq ($(BR2_PACKAGE_LIBPCAP),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_PCAP=ON
MEDIASTREAMER_DEPENDENCIES += libpcap
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_PCAP=OFF
endif

ifeq ($(BR2_PACKAGE_LIBSRTP),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_SRTP=ON
MEDIASTREAMER_DEPENDENCIES += libsrtp
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_SRTP=OFF
endif

ifeq ($(BR2_PACKAGE_LIBVPX),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_VPX=ON
MEDIASTREAMER_DEPENDENCIES += libvpx
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_VPX=OFF
endif

ifeq ($(BR2_PACKAGE_OPUS),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_OPUS=ON
MEDIASTREAMER_DEPENDENCIES += opus
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_OPUS=OFF
endif

# portaudio backend needs speexdsp as well
ifeq ($(BR2_PACKAGE_PORTAUDIO)$(BR2_PACKAGE_SPEEXDSP),yy)
MEDIASTREAMER_CONF_OPTS += \
	-DENABLE_PORTAUDIO=ON \
	-DENABLE_SOUND=ON
MEDIASTREAMER_DEPENDENCIES += portaudio
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_PORTAUDIO=OFF
endif

ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
MEDIASTREAMER_CONF_OPTS += \
	-DENABLE_PULSEAUDIO=ON \
	-DENABLE_SOUND=ON
MEDIASTREAMER_DEPENDENCIES += pulseaudio
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_PULSEAUDIO=OFF
endif

ifeq ($(BR2_PACKAGE_SPEEX),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_CODEC=ON
MEDIASTREAMER_DEPENDENCIES += speex
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_CODEC=OFF
endif

ifeq ($(BR2_PACKAGE_SPEEXDSP),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_DSP=ON
MEDIASTREAMER_DEPENDENCIES += speexdsp
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_DSP=OFF
endif

ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_FFMPEG=ON
MEDIASTREAMER_DEPENDENCIES += ffmpeg
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_FFMPEG=OFF
endif

ifeq ($(BR2_PACKAGE_SDL),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_SDL=ON
MEDIASTREAMER_DEPENDENCIES += sdl
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_SDL=OFF
endif

ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_X11=ON
MEDIASTREAMER_DEPENDENCIES += xlib_libX11
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_X11=OFF
endif

ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_XV=ON
MEDIASTREAMER_DEPENDENCIES += xlib_libXv
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_XV=OFF
endif

ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_THEORA=ON
MEDIASTREAMER_DEPENDENCIES += libtheora
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_THEORA=OFF
endif

ifeq ($(BR2_PACKAGE_LIBV4L),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_V4L=ON
MEDIASTREAMER_DEPENDENCIES += libv4l
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_V4L=OFF
endif

ifeq ($(BR2_PACKAGE_ZXING_CPP),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_QRCODE=ON
MEDIASTREAMER_DEPENDENCIES += zxing-cpp
else
MEDIASTREAMER_CONF_OPTS += -DENABLE_QRCODE=OFF
endif

ifeq ($(BR2_STATIC_LIBS),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_SHARED=OFF -DENABLE_STATIC=ON
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=ON
else ifeq ($(BR2_SHARED_LIBS),y)
MEDIASTREAMER_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=OFF
endif

$(eval $(cmake-package))