-
Notifications
You must be signed in to change notification settings - Fork 439
/
config
441 lines (406 loc) · 19 KB
/
config
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
ngx_addon_name=ngx_http_vod_module
ngx_module_incs=
ngx_module_libs=
VOD_SRCS=
VOD_DEPS=
# version
#
VOD_DEFAULT_VERSION=1.11
VOD_VERSION=${VOD_VERSION:-`git --git-dir=$ngx_addon_dir/.git describe 2>/dev/null`}
VOD_VERSION=${VOD_VERSION:-$VOD_DEFAULT_VERSION}
echo "#define NGINX_VOD_VERSION \""$VOD_VERSION"\"" > $NGX_OBJS/ngx_vod_version.h
# taken from echo-nginx-module
# nginx won't have HTTP_POSTPONE_FILTER_MODULE & HTTP_POSTPONE_FILTER_SRCS
# defined since 1.9.11
if test -z "$HTTP_POSTPONE_FILTER_MODULE"; then
HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_module
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.c
fi
# This module depends upon the postpone filter being activated
if [ "$HTTP_POSTPONE" = NO ]; then
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_POSTPONE_FILTER_MODULE"
HTTP_SRCS="$HTTP_SRCS $HTTP_POSTPONE_FILTER_SRCS"
HTTP_POSTPONE=YES
fi
# zlib
#
if [ $ZLIB = NONE ]; then
ngx_feature="zlib library"
ngx_feature_name="NGX_HAVE_ZLIB"
ngx_feature_run=no
ngx_feature_incs="#include <zlib.h>"
ngx_feature_path=
ngx_feature_libs="-lz"
ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
. auto/feature
if [ $ngx_found = yes ]; then
ngx_module_libs="$ngx_module_libs $ngx_feature_libs"
fi
else
cat << END >> $NGX_AUTO_CONFIG_H
#ifndef NGX_HAVE_ZLIB
#define NGX_HAVE_ZLIB 1
#endif
END
fi
# openssl evp
#
VOD_FEATURE_SRCS=" \
$ngx_addon_dir/vod/dash/edash_packager.c \
$ngx_addon_dir/vod/hls/aes_cbc_encrypt.c \
$ngx_addon_dir/vod/hls/eac3_encrypt_filter.c \
$ngx_addon_dir/vod/hls/frame_encrypt_filter.c \
$ngx_addon_dir/vod/hls/sample_aes_avc_filter.c \
$ngx_addon_dir/vod/mp4/mp4_aes_ctr.c \
$ngx_addon_dir/vod/mp4/mp4_cbcs_encrypt.c \
$ngx_addon_dir/vod/mp4/mp4_cenc_decrypt.c \
$ngx_addon_dir/vod/mp4/mp4_cenc_encrypt.c \
$ngx_addon_dir/vod/mp4/mp4_cenc_passthrough.c \
$ngx_addon_dir/vod/mss/mss_playready.c \
"
VOD_FEATURE_DEPS=" \
$ngx_addon_dir/vod/dash/edash_packager.h \
$ngx_addon_dir/vod/hls/aes_cbc_encrypt.h \
$ngx_addon_dir/vod/hls/eac3_encrypt_filter.h \
$ngx_addon_dir/vod/hls/frame_encrypt_filter.h \
$ngx_addon_dir/vod/hls/sample_aes_avc_filter.h \
$ngx_addon_dir/vod/mp4/mp4_aes_ctr.h \
$ngx_addon_dir/vod/mp4/mp4_cbcs_encrypt.h \
$ngx_addon_dir/vod/mp4/mp4_cenc_decrypt.h \
$ngx_addon_dir/vod/mp4/mp4_cenc_encrypt.h \
$ngx_addon_dir/vod/mp4/mp4_cenc_passthrough.h \
$ngx_addon_dir/vod/mss/mss_playready.h \
"
if [ $OPENSSL = NONE ]; then
LIB_CRYPTO=${LIB_CRYPTO:--lcrypto}
LIB_PTHREAD=${LIB_PTHREAD:--lpthread}
ngx_feature="OpenSSL EVP library"
ngx_feature_name="NGX_HAVE_OPENSSL_EVP"
ngx_feature_run=no
ngx_feature_incs="#include <openssl/evp.h>"
ngx_feature_path=
ngx_feature_libs="$LIB_CRYPTO $NGX_LIBDL $LIB_PTHREAD"
ngx_feature_test="EVP_CIPHER_CTX_new();"
. auto/feature
if [ $ngx_found = yes ]; then
ngx_module_libs="$ngx_module_libs $ngx_feature_libs"
VOD_SRCS="$VOD_SRCS $VOD_FEATURE_SRCS"
VOD_DEPS="$VOD_DEPS $VOD_FEATURE_DEPS"
fi
else
VOD_SRCS="$VOD_SRCS $VOD_FEATURE_SRCS"
VOD_DEPS="$VOD_DEPS $VOD_FEATURE_DEPS"
cat << END >> $NGX_AUTO_CONFIG_H
#ifndef NGX_HAVE_OPENSSL_EVP
#define NGX_HAVE_OPENSSL_EVP 1
#endif
END
fi
# iconv
#
ngx_feature="iconv"
ngx_feature_name="NGX_HAVE_ICONV"
ngx_feature_run=no
ngx_feature_incs="#include <iconv.h>"
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="iconv_open(NULL, NULL);"
. auto/feature
# clock_gettime
#
ngx_feature="clock_gettime()"
ngx_feature_name="NGX_HAVE_CLOCK_GETTIME"
ngx_feature_run=no
ngx_feature_incs="#include <sched.h>"
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="clock_gettime()"
. auto/feature
if [ $ngx_found != yes ]; then
ngx_feature="clock_gettime() in librt"
ngx_feature_libs="-lrt"
. auto/feature
if [ $ngx_found = yes ]; then
ngx_module_libs="$ngx_module_libs $ngx_feature_libs"
fi
fi
# libavcodec
#
LIB_AV_UTIL=${LIB_AV_UTIL:--lavutil}
LIB_AV_CODEC=${LIB_AV_CODEC:--lavcodec}
ngx_feature="libavcodec"
ngx_feature_name="NGX_HAVE_LIB_AV_CODEC"
ngx_feature_run=no
ngx_feature_incs="#include <libavcodec/avcodec.h>"
ngx_feature_path=
ngx_feature_libs="$LIB_AV_CODEC"
ngx_feature_test="avcodec_send_packet(NULL, NULL)"
. auto/feature
if [ $ngx_found = yes ]; then
ngx_module_libs="$ngx_module_libs $LIB_AV_CODEC $LIB_AV_UTIL -lm"
VOD_FEATURE_SRCS=" \
$ngx_addon_dir/ngx_http_vod_thumb.c \
$ngx_addon_dir/ngx_http_vod_volume_map.c \
$ngx_addon_dir/vod/filters/audio_decoder.c \
$ngx_addon_dir/vod/filters/audio_encoder.c \
$ngx_addon_dir/vod/filters/volume_map.c \
$ngx_addon_dir/vod/thumb/thumb_grabber.c \
"
VOD_FEATURE_DEPS=" \
$ngx_addon_dir/ngx_http_vod_thumb.h \
$ngx_addon_dir/ngx_http_vod_thumb_commands.h \
$ngx_addon_dir/ngx_http_vod_thumb_conf.h \
$ngx_addon_dir/ngx_http_vod_volume_map.h \
$ngx_addon_dir/ngx_http_vod_volume_map_commands.h \
$ngx_addon_dir/ngx_http_vod_volume_map_conf.h \
$ngx_addon_dir/vod/filters/audio_decoder.h \
$ngx_addon_dir/vod/filters/audio_encoder.h \
$ngx_addon_dir/vod/filters/volume_map.h \
$ngx_addon_dir/vod/thumb/thumb_grabber.h \
"
VOD_SRCS="$VOD_SRCS $VOD_FEATURE_SRCS"
VOD_DEPS="$VOD_DEPS $VOD_FEATURE_DEPS"
fi
# libswscale
#
ngx_feature="libswscale"
ngx_feature_name="NGX_HAVE_LIB_SW_SCALE"
ngx_feature_run=no
ngx_feature_incs="#include <libswscale/swscale.h>"
ngx_feature_path=
ngx_feature_libs="-lswscale"
ngx_feature_test="sws_scale(NULL, NULL, NULL, 0, 0, NULL, NULL)"
. auto/feature
if [ $ngx_found = yes ]; then
ngx_module_libs="$ngx_module_libs -lswscale"
fi
# libavfilter
#
LIB_AV_FILTER=${LIB_AV_FILTER:--lavfilter}
ngx_feature="libavfilter"
ngx_feature_name="NGX_HAVE_LIB_AV_FILTER"
ngx_feature_run=no
ngx_feature_incs="#include <libavfilter/avfilter.h>
#include <libavfilter/buffersrc.h>
#include <libavfilter/buffersink.h>"
ngx_feature_path=
ngx_feature_libs="$LIB_AV_FILTER"
ngx_feature_test="avfilter_get_by_name(NULL)"
. auto/feature
if [ $ngx_found = yes ]; then
ngx_module_libs="$ngx_module_libs $LIB_AV_FILTER $LIB_AV_UTIL"
fi
# libxml2
#
ngx_feature="libxml2"
ngx_feature_name="NGX_HAVE_LIBXML2"
ngx_feature_run=no
ngx_feature_incs="#include <libxml/parser.h>
#include <libxml/tree.h>"
ngx_feature_path="/usr/include/libxml2"
ngx_feature_libs="-lxml2"
ngx_feature_test="xmlReadMemory(NULL, 0, NULL, NULL, 0);"
. auto/feature
if [ $ngx_found = yes ]; then
ngx_module_incs="$ngx_module_incs $ngx_feature_path"
ngx_module_libs="$ngx_module_libs $ngx_feature_libs"
VOD_FEATURE_SRCS=" \
$ngx_addon_dir/vod/subtitle/dfxp_format.c \
"
VOD_FEATURE_DEPS=" \
$ngx_addon_dir/vod/subtitle/dfxp_format.h \
"
VOD_SRCS="$VOD_SRCS $VOD_FEATURE_SRCS"
VOD_DEPS="$VOD_DEPS $VOD_FEATURE_DEPS"
fi
VOD_DEPS="$VOD_DEPS \
$ngx_addon_dir/ngx_async_open_file_cache.h \
$ngx_addon_dir/ngx_buffer_cache.h \
$ngx_addon_dir/ngx_buffer_cache_internal.h \
$ngx_addon_dir/ngx_child_http_request.h \
$ngx_addon_dir/ngx_file_reader.h \
$ngx_addon_dir/ngx_http_vod_conf.h \
$ngx_addon_dir/ngx_http_vod_dash.h \
$ngx_addon_dir/ngx_http_vod_dash_commands.h \
$ngx_addon_dir/ngx_http_vod_dash_conf.h \
$ngx_addon_dir/ngx_http_vod_hds.h \
$ngx_addon_dir/ngx_http_vod_hds_commands.h \
$ngx_addon_dir/ngx_http_vod_hds_conf.h \
$ngx_addon_dir/ngx_http_vod_hls.h \
$ngx_addon_dir/ngx_http_vod_hls_commands.h \
$ngx_addon_dir/ngx_http_vod_hls_conf.h \
$ngx_addon_dir/ngx_http_vod_module.h \
$ngx_addon_dir/ngx_http_vod_mss.h \
$ngx_addon_dir/ngx_http_vod_mss_commands.h \
$ngx_addon_dir/ngx_http_vod_mss_conf.h \
$ngx_addon_dir/ngx_http_vod_request_parse.h \
$ngx_addon_dir/ngx_http_vod_status.h \
$ngx_addon_dir/ngx_http_vod_submodule.h \
$ngx_addon_dir/ngx_http_vod_utils.h \
$ngx_addon_dir/ngx_perf_counters.h \
$ngx_addon_dir/ngx_perf_counters_x.h \
$ngx_addon_dir/vod/aes_defs.h \
$ngx_addon_dir/vod/avc_defs.h \
$ngx_addon_dir/vod/avc_parser.h \
$ngx_addon_dir/vod/avc_hevc_parser.h \
$ngx_addon_dir/vod/bit_read_stream.h \
$ngx_addon_dir/vod/buffer_pool.h \
$ngx_addon_dir/vod/codec_config.h \
$ngx_addon_dir/vod/common.h \
$ngx_addon_dir/vod/dash/dash_packager.h \
$ngx_addon_dir/vod/dynamic_buffer.h \
$ngx_addon_dir/vod/filters/audio_filter.h \
$ngx_addon_dir/vod/filters/concat_clip.h \
$ngx_addon_dir/vod/filters/dynamic_clip.h \
$ngx_addon_dir/vod/filters/filter.h \
$ngx_addon_dir/vod/filters/gain_filter.h \
$ngx_addon_dir/vod/filters/mix_filter.h \
$ngx_addon_dir/vod/filters/rate_filter.h \
$ngx_addon_dir/vod/hds/hds_amf0_encoder.h \
$ngx_addon_dir/vod/hds/hds_amf0_fields_x.h \
$ngx_addon_dir/vod/hds/hds_encryption.h \
$ngx_addon_dir/vod/hds/hds_fragment.h \
$ngx_addon_dir/vod/hds/hds_manifest.h \
$ngx_addon_dir/vod/hevc_parser.h \
$ngx_addon_dir/vod/hls/adts_encoder_filter.h \
$ngx_addon_dir/vod/hls/bit_fields.h \
$ngx_addon_dir/vod/hls/buffer_filter.h \
$ngx_addon_dir/vod/hls/frame_joiner_filter.h \
$ngx_addon_dir/vod/hls/hls_encryption.h \
$ngx_addon_dir/vod/hls/hls_muxer.h \
$ngx_addon_dir/vod/hls/id3_encoder_filter.h \
$ngx_addon_dir/vod/hls/m3u8_builder.h \
$ngx_addon_dir/vod/hls/media_filter.h \
$ngx_addon_dir/vod/hls/mp4_to_annexb_filter.h \
$ngx_addon_dir/vod/hls/mpegts_encoder_filter.h \
$ngx_addon_dir/vod/input/silence_generator.h \
$ngx_addon_dir/vod/input/frames_source.h \
$ngx_addon_dir/vod/input/frames_source_cache.h \
$ngx_addon_dir/vod/input/frames_source_memory.h \
$ngx_addon_dir/vod/input/read_cache.h \
$ngx_addon_dir/vod/json_parser.h \
$ngx_addon_dir/vod/language_code.h \
$ngx_addon_dir/vod/languages_hash_params.h \
$ngx_addon_dir/vod/languages_x.h \
$ngx_addon_dir/vod/manifest_utils.h \
$ngx_addon_dir/vod/media_clip.h \
$ngx_addon_dir/vod/media_format.h \
$ngx_addon_dir/vod/media_set.h \
$ngx_addon_dir/vod/media_set_parser.h \
$ngx_addon_dir/vod/mkv/ebml.h \
$ngx_addon_dir/vod/mkv/mkv_builder.h \
$ngx_addon_dir/vod/mkv/mkv_defs.h \
$ngx_addon_dir/vod/mkv/mkv_format.h \
$ngx_addon_dir/vod/mp4/mp4_clipper.h \
$ngx_addon_dir/vod/mp4/mp4_defs.h \
$ngx_addon_dir/vod/mp4/mp4_format.h \
$ngx_addon_dir/vod/mp4/mp4_fragment.h \
$ngx_addon_dir/vod/mp4/mp4_init_segment.h \
$ngx_addon_dir/vod/mp4/mp4_muxer.h \
$ngx_addon_dir/vod/mp4/mp4_parser.h \
$ngx_addon_dir/vod/mp4/mp4_parser_base.h \
$ngx_addon_dir/vod/mp4/mp4_write_stream.h \
$ngx_addon_dir/vod/mss/mss_packager.h \
$ngx_addon_dir/vod/subtitle/cap_format.h \
$ngx_addon_dir/vod/subtitle/dfxp_format.h \
$ngx_addon_dir/vod/subtitle/subtitle_format.h \
$ngx_addon_dir/vod/subtitle/ttml_builder.h \
$ngx_addon_dir/vod/subtitle/webvtt_builder.h \
$ngx_addon_dir/vod/subtitle/webvtt_format.h \
$ngx_addon_dir/vod/subtitle/webvtt_format_template.h \
$ngx_addon_dir/vod/parse_utils.h \
$ngx_addon_dir/vod/read_stream.h \
$ngx_addon_dir/vod/segmenter.h \
$ngx_addon_dir/vod/udrm.h \
$ngx_addon_dir/vod/write_buffer.h \
$ngx_addon_dir/vod/write_buffer_queue.h \
$ngx_addon_dir/vod/write_stream.h \
"
VOD_SRCS="$VOD_SRCS \
$ngx_addon_dir/ngx_async_open_file_cache.c \
$ngx_addon_dir/ngx_buffer_cache.c \
$ngx_addon_dir/ngx_child_http_request.c \
$ngx_addon_dir/ngx_file_reader.c \
$ngx_addon_dir/ngx_http_vod_conf.c \
$ngx_addon_dir/ngx_http_vod_dash.c \
$ngx_addon_dir/ngx_http_vod_hds.c \
$ngx_addon_dir/ngx_http_vod_hls.c \
$ngx_addon_dir/ngx_http_vod_module.c \
$ngx_addon_dir/ngx_http_vod_mss.c \
$ngx_addon_dir/ngx_http_vod_request_parse.c \
$ngx_addon_dir/ngx_http_vod_status.c \
$ngx_addon_dir/ngx_http_vod_submodule.c \
$ngx_addon_dir/ngx_http_vod_utils.c \
$ngx_addon_dir/ngx_perf_counters.c \
$ngx_addon_dir/vod/avc_parser.c \
$ngx_addon_dir/vod/avc_hevc_parser.c \
$ngx_addon_dir/vod/buffer_pool.c \
$ngx_addon_dir/vod/codec_config.c \
$ngx_addon_dir/vod/common.c \
$ngx_addon_dir/vod/dash/dash_packager.c \
$ngx_addon_dir/vod/dynamic_buffer.c \
$ngx_addon_dir/vod/filters/audio_filter.c \
$ngx_addon_dir/vod/filters/concat_clip.c \
$ngx_addon_dir/vod/filters/dynamic_clip.c \
$ngx_addon_dir/vod/filters/filter.c \
$ngx_addon_dir/vod/filters/gain_filter.c \
$ngx_addon_dir/vod/filters/mix_filter.c \
$ngx_addon_dir/vod/filters/rate_filter.c \
$ngx_addon_dir/vod/hds/hds_amf0_encoder.c \
$ngx_addon_dir/vod/hds/hds_fragment.c \
$ngx_addon_dir/vod/hds/hds_manifest.c \
$ngx_addon_dir/vod/hevc_parser.c \
$ngx_addon_dir/vod/hls/adts_encoder_filter.c \
$ngx_addon_dir/vod/hls/buffer_filter.c \
$ngx_addon_dir/vod/hls/frame_joiner_filter.c \
$ngx_addon_dir/vod/hls/hls_muxer.c \
$ngx_addon_dir/vod/hls/id3_encoder_filter.c \
$ngx_addon_dir/vod/hls/m3u8_builder.c \
$ngx_addon_dir/vod/hls/mp4_to_annexb_filter.c \
$ngx_addon_dir/vod/hls/mpegts_encoder_filter.c \
$ngx_addon_dir/vod/input/silence_generator.c \
$ngx_addon_dir/vod/input/frames_source_cache.c \
$ngx_addon_dir/vod/input/frames_source_memory.c \
$ngx_addon_dir/vod/input/read_cache.c \
$ngx_addon_dir/vod/json_parser.c \
$ngx_addon_dir/vod/language_code.c \
$ngx_addon_dir/vod/manifest_utils.c \
$ngx_addon_dir/vod/media_format.c \
$ngx_addon_dir/vod/media_set.c \
$ngx_addon_dir/vod/media_set_parser.c \
$ngx_addon_dir/vod/mkv/ebml.c \
$ngx_addon_dir/vod/mkv/mkv_builder.c \
$ngx_addon_dir/vod/mkv/mkv_defs.c \
$ngx_addon_dir/vod/mkv/mkv_format.c \
$ngx_addon_dir/vod/mp4/mp4_clipper.c \
$ngx_addon_dir/vod/mp4/mp4_format.c \
$ngx_addon_dir/vod/mp4/mp4_fragment.c \
$ngx_addon_dir/vod/mp4/mp4_init_segment.c \
$ngx_addon_dir/vod/mp4/mp4_muxer.c \
$ngx_addon_dir/vod/mp4/mp4_parser.c \
$ngx_addon_dir/vod/mp4/mp4_parser_base.c \
$ngx_addon_dir/vod/mss/mss_packager.c \
$ngx_addon_dir/vod/subtitle/cap_format.c \
$ngx_addon_dir/vod/subtitle/subtitle_format.c \
$ngx_addon_dir/vod/subtitle/ttml_builder.c \
$ngx_addon_dir/vod/subtitle/webvtt_builder.c \
$ngx_addon_dir/vod/subtitle/webvtt_format.c \
$ngx_addon_dir/vod/parse_utils.c \
$ngx_addon_dir/vod/segmenter.c \
$ngx_addon_dir/vod/udrm.c \
$ngx_addon_dir/vod/write_buffer.c \
$ngx_addon_dir/vod/write_buffer_queue.c \
"
if [ -n "$ngx_module_link" ]; then
ngx_module_type=HTTP_AUX_FILTER
ngx_module_name=ngx_http_vod_module
ngx_module_deps="$VOD_DEPS"
ngx_module_srcs="$VOD_SRCS"
. auto/module
else
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_vod_module"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $VOD_DEPS"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $VOD_SRCS"
CORE_INCS="$CORE_INCS $ngx_module_incs"
CORE_LIBS="$CORE_LIBS $ngx_module_libs"
fi