Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
ParaEncode
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ParaEncode
Commits
1208720d
Commit
1208720d
authored
Apr 30, 2022
by
NzSN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update wasm-build.sh
parent
71c43211
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
wasm-build.sh
wasm-build.sh
+15
-9
No files found.
wasm-build.sh
View file @
1208720d
...
...
@@ -14,6 +14,7 @@ FFMPEG_ST=yes
EMSDK
=
/emsdk
LIB_DIR
=
${
WORKPATH
}
/lib
THIRD_DIR
=
${
WORKPATH
}
/lib/third/build
FFMPEG_PROTO
=
${
WORKPATH
}
/src/protos/src
...
...
@@ -22,6 +23,15 @@ WASM_DIR=${WORKPATH}/src/wasms
DEBUG
=
"-O3"
#DEBUG="-O1 -g -fno-inline -gseparate-dwarf=/src/demo2/temp.debug.wasm -s SEPARATE_DWARF_URL=http://localhost:5000/temp.debug.wasm"
# Build Protocols
cd
${
LIB_DIR
}
/ffmpeg.sharedmemproto
###############################################################################
# FFMPEG Core #
###############################################################################
#--closure 压缩胶水代码,有可能会造成变量重复定义。生产发布可设为1
OPTIM_FLAGS
=
"
$DEBUG
--closure 0"
...
...
@@ -39,16 +49,12 @@ else
fi
FLAGS
=(
-I
$WORKPATH
/lib/ffmpeg-emcc/include
-L
$WORKPATH
/lib/ffmpeg-emcc/lib
-I
$THIRD_DIR
/include
-L
$THIRD_DIR
/lib
-Wno-
deprecated-declarations
-Wno-pointer-sign
-Wno-implicit-int-float-conversion
-Wno-switch
-Wno-parentheses
-Qunused-arguments
-l
avdevice
-lavfilter
-lavformat
-lavcodec
-lswresample
-lswscale
-lavutil
-lpostproc
-l
m
-lharfbuzz
-lfribidi
-lass
-lx264
-lx265
-lvpx
-lwavpack
-lmp3lame
-l
fdk-aac
-lvorbis
-lvorbisenc
-lvorbisfile
-logg
-ltheora
-ltheoraenc
-ltheoradec
-lz
-lfreetype
-lopus
-lwebp
-I
$WORKPATH
/lib/ffmpeg-emcc/include
-L
$WORKPATH
/lib/ffmpeg-emcc/lib
-I
$THIRD_DIR
/include
-L
$THIRD_DIR
/lib
-Wno-deprecated-declarations
-Wno-
pointer-sign
-Wno-implicit-int-float-conversion
-Wno-switch
-Wno-parentheses
-Qunused-arguments
-lavdevice
-lavfilter
-lavformat
-lavcodec
-l
swresample
-lswscale
-lavutil
-lpostproc
-lm
-lharfbuzz
-lfribidi
-lass
-lx264
-lx265
-lvpx
-lwavpack
-lmp3lame
-lfdk-aac
-lvorbis
-lvorbisenc
-lvorbisfile
-logg
-ltheora
-ltheoraenc
-ltheoradec
-lz
-lfreetype
-lopus
-lwebp
$WASM_DIR
/interfaces.cc
$FFMPEG_PROTO
/utils.cc
$FFMPEG_PROTO
/ioctx.cc
$FFMPEG_PROTO
/proto/movMemProto.cc
$FFMPEG_PROTO
/proto/proto.cc
-march
=
x86_32
-std
=
c++2a
...
...
@@ -58,7 +64,7 @@ FLAGS=(
-s
INVOKE_RUN
=
0
# not to run the main() in the beginning
-s
EXIT_RUNTIME
=
1
# exit runtime after execution
-s
MODULARIZE
=
1
# 延迟加载 use modularized version to be more flexible
-s
EXPORT_NAME
=
"create
MP4
Encoder"
# assign export name for browser
-s
EXPORT_NAME
=
"create
Para
Encoder"
# assign export name for browser
-s
EXPORTED_FUNCTIONS
=
"[_main,_malloc,_free]"
# export main and proxy_main funcs
-s
EXPORTED_RUNTIME_METHODS
=
"[FS, cwrap, ccall, setValue, writeAsciiToMemory, getValue]"
# export preamble funcs
-s
INITIAL_MEMORY
=
268435456
# 64 KB * 1024 * 16 * 2047 = 2146435072 bytes ~= 2 GB, 268435456 =256M, 134,217,728 =128M
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment