Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-with-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

EM_VERSION=2.0.24
EM_VERSION=2.0.8

docker pull emscripten/emsdk:$EM_VERSION
docker run \
Expand Down
7 changes: 5 additions & 2 deletions wasm/build-scripts/build-ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ source $(dirname $0)/var.sh

if [[ "$FFMPEG_ST" != "yes" ]]; then
mkdir -p wasm/packages/core/dist
EXPORTED_FUNCTIONS="[_main, _proxy_main]"
EXTRA_FLAGS=(
-pthread
-s USE_PTHREADS=1 # enable pthreads support
Expand All @@ -13,6 +14,7 @@ if [[ "$FFMPEG_ST" != "yes" ]]; then
)
else
mkdir -p wasm/packages/core-st/dist
EXPORTED_FUNCTIONS="[_main]"
EXTRA_FLAGS=(
-o wasm/packages/core-st/dist/ffmpeg-core.js
)
Expand All @@ -28,11 +30,12 @@ FLAGS=(
-s EXIT_RUNTIME=1 # exit runtime after execution
-s MODULARIZE=1 # use modularized version to be more flexible
-s EXPORT_NAME="createFFmpegCore" # assign export name for browser
-s EXPORTED_FUNCTIONS="[_main]" # export main and proxy_main funcs

-s EXPORTED_FUNCTIONS="$EXPORTED_FUNCTIONS" # export main and proxy_main funcs
-s EXPORTED_RUNTIME_METHODS="[FS, cwrap, ccall, setValue, writeAsciiToMemory, lengthBytesUTF8, stringToUTF8, UTF8ToString]" # export preamble funcs
-s INITIAL_MEMORY=2146435072 # 64 KB * 1024 * 16 * 2047 = 2146435072 bytes ~= 2 GB
--pre-js wasm/src/pre.js
--post-js wasm/src/post.js
--pre-js wasm/src/pre.js
$OPTIM_FLAGS
${EXTRA_FLAGS[@]}
)
Expand Down
2 changes: 1 addition & 1 deletion wasm/tests/utils/mt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let resolve = null;

const ffmpeg = ({ core, args }) => new Promise((_resolve) => {
core.ccall(
'emscripten_proxy_main', // use emscripten_proxy_main if emscripten upgraded
'proxy_main', // use emscripten_proxy_main if emscripten upgraded
'number',
['number', 'number'],
parseArgs(core, ['ffmpeg', '-hide_banner', '-nostdin', ...args]),
Expand Down