Adopt lerna and typescript

This commit is contained in:
Jerome Wu
2022-09-13 17:23:21 +08:00
parent d2ea0066a7
commit 94bb51d073
139 changed files with 35770 additions and 11094 deletions

52
build/ffmpeg-wasm.sh Executable file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
EXTRA_CONF_FLAGS=(
-sINITIAL_MEMORY=32MB
-sALLOW_MEMORY_GROWTH
)
if [[ ! -z "$FFMPEG_MT" ]]; then
EXTRA_CONF_FLAGS=(
-sINITIAL_MEMORY=1024MB
)
fi
emcc \
-I. \
-I./wasm/fftools \
-I$INSTALL_DIR/include \
-L$INSTALL_DIR/lib \
-Llibavcodec \
-Llibavdevice \
-Llibavfilter \
-Llibavformat \
-Llibavutil \
-Llibpostproc \
-Llibswresample \
-Llibswscale \
-lavcodec \
-lavdevice \
-lavfilter \
-lavformat \
-lavutil \
-lpostproc \
-lswresample \
-lswscale \
-lx264 \
-Wno-deprecated-declarations \
$LDFLAGS \
-sUSE_SDL=2 \
-sMODULARIZE \
-sEXPORT_NAME="createFFmpegCore" \
-sEXPORTED_FUNCTIONS=$(node wasm/bind/export.js) \
-sEXPORTED_RUNTIME_METHODS=$(node wasm/bind/export-runtime.js) \
--pre-js wasm/bind/bind.js \
wasm/fftools/ffmpeg.c \
wasm/fftools/ffmpeg_filter.c \
wasm/fftools/ffmpeg_hw.c \
wasm/fftools/ffmpeg_mux.c \
wasm/fftools/ffmpeg_opt.c \
wasm/fftools/cmdutils.c \
wasm/fftools/opt_common.c \
${EXTRA_CONF_FLAGS[@]} \
$@

37
build/ffmpeg.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
EXTRA_CONF_FLAGS=(
--disable-pthreads
--disable-w32threads
--disable-os2threads
)
if [[ ! -z "$FFMPEG_MT" ]]; then
EXTRA_CONF_FLAGS=()
fi
emconfigure ./configure \
--target-os=none \
--arch=x86_32 \
--enable-cross-compile \
--disable-asm \
--disable-stripping \
--disable-programs \
--disable-doc \
--disable-debug \
--disable-runtime-cpudetect \
--disable-autodetect \
--extra-cflags="$CFLAGS" \
--extra-cxxflags="$CFLAGS" \
--nm="llvm-nm" \
--ar=emar \
--ranlib=emranlib \
--cc=emcc \
--cxx=em++ \
--objcc=emcc \
--dep-cc=emcc \
${EXTRA_CONF_FLAGS[@]} \
--enable-gpl \
--enable-libx264
emmake make -j

20
build/x264.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
EXTRA_CONF_FLAGS=(
--disable-thread
)
if [[ ! -z "$FFMPEG_MT" ]]; then
EXTRA_CONF_FLAGS=()
fi
emconfigure ./configure \
--prefix=$INSTALL_DIR \
--host=x86-gnu \
--enable-static \
--disable-cli \
--disable-asm \
--extra-cflags="$CFLAGS" \
${EXTRA_CONF_FLAGS[@]}
emmake make install-lib-static -j