1 Star 2 Fork 1

delenzhang/WasmPlayer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build_decoder_wasm.sh 726 Bytes
一键复制 编辑 原始数据 按行查看 历史
delenzhang 提交于 2020-01-14 17:30 . 支持显示编译flv
rm -rf ./wasm/*.*
export TOTAL_MEMORY=67108864
export EXPORTED_FUNCTIONS="[ \
'_initDecoder', \
'_uninitDecoder', \
'_openDecoder', \
'_closeDecoder', \
'_sendData', \
'_decodeOnePacket', \
'_seekTo', \
'_main',
'_malloc',
'_free'
]"
echo "Running Emscripten..."
emcc decoder.c dist/lib/libavformat.a dist/lib/libavcodec.a dist/lib/libavutil.a dist/lib/libswscale.a \
-I "dist/include" \
-s WASM=1 \
-s TOTAL_MEMORY=${TOTAL_MEMORY} \
-s EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS}" \
-s EXTRA_EXPORTED_RUNTIME_METHODS="['addFunction']" \
-s RESERVED_FUNCTION_POINTERS=14 \
-s FORCE_FILESYSTEM=1 \
-o ./wasm/libffmpeg.js
# -O3 \
echo "Finished Build"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/delen/WasmPlayer.git
[email protected]:delen/WasmPlayer.git
delen
WasmPlayer
WasmPlayer
master

搜索帮助