Skip to content

Commit

Permalink
[UPD] complete codec wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ErosZy committed Aug 23, 2019
1 parent 8e3b35d commit bdef5f5
Show file tree
Hide file tree
Showing 318 changed files with 873 additions and 47,313 deletions.
8 changes: 4 additions & 4 deletions lib/codec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ add_subdirectory(src/demuxer)
add_subdirectory(src/h264)
add_subdirectory(src/codec)
add_subdirectory(src)
#add_subdirectory(test)

set(EM_CONFIG_PARAM "-O3 -s ENVIRONMENT=\"web,worker\" -s SINGLE_FILE=1 -s WASM=1 -s FETCH=0 -s DISABLE_EXCEPTION_CATCHING=0 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s NO_EXIT_RUNTIME=0 -s FILESYSTEM=0 -s INVOKE_RUN=0 -s ASSERTIONS=1 -s TOTAL_MEMORY=33554432 -s EXPORTED_FUNCTIONS=\"['_codecInit', '_codecSetBridgeName', '_codecDecode', '_codecSetVideoBuffer', '_codecSetAudioBuffer', '_codecTry2Seek', '_codecFree']\"")
#<-----wasm----->
#set(EM_CONFIG_PARAM "-O3 -s ENVIRONMENT=\"web,worker\" -s SINGLE_FILE=1 -s WASM=1 -s FETCH=0 -s DISABLE_EXCEPTION_CATCHING=0 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s NO_EXIT_RUNTIME=0 -s FILESYSTEM=0 -s INVOKE_RUN=0 -s ASSERTIONS=1 -s TOTAL_MEMORY=33554432 -s EXPORTED_FUNCTIONS=\"['_codecInit', '_codecSetBridgeName', '_codecDecode', '_codecSetVideoBuffer', '_codecSetAudioBuffer', '_codecTry2Seek', '_codecFree']\"")
#<-----asm----->
#set(EM_CONFIG_PARAM "-O3 -s ENVIRONMENT=\"web,worker\" -s SINGLE_FILE=1 -s WASM=0 -s FETCH=0 -s DISABLE_EXCEPTION_CATCHING=0 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s NO_EXIT_RUNTIME=0 -s FILESYSTEM=0 -s TOTAL_MEMORY=33554432 -s INVOKE_RUN=0 -s LEGACY_VM_SUPPORT=1 -s MEM_INIT_METHOD=0 -s ELIMINATE_DUPLICATE_FUNCTIONS=1 -s ASSERTIONS=1 -s TOTAL_MEMORY=33554432 -s EXPORTED_FUNCTIONS=\"['_codecInit', '_codecSetBridgeName', '_codecDecode', '_codecSetVideoBuffer', '_codecSetAudioBuffer', '_codecTry2Seek', '_codecFree']\"")
set(EM_OPTIMIZE_PARAM "--closure 1 --memory-init-file 0 --llvm-lto 3")
set_target_properties(prod PROPERTIES LINK_FLAGS "${EM_CONFIG_PARAM} ${EM_OPTIMIZE_PARAM}")
#set_target_properties(test PROPERTIES LINK_FLAGS "${EM_CONFIG_PARAM} ${EM_OPTIMIZE_PARAM}")
set_target_properties(prod PROPERTIES LINK_FLAGS "${EM_CONFIG_PARAM} ${EM_OPTIMIZE_PARAM}")
94 changes: 0 additions & 94 deletions lib/codec/bin/index.html

This file was deleted.

Binary file removed lib/codec/bin/mtv.flv
Binary file not shown.
Binary file removed lib/codec/bin/prod.exe
Binary file not shown.
21 changes: 21 additions & 0 deletions lib/codec/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -x
rm -rf ./bin
rm -rf ./build
mkdir ./build
cd ./build

node ../tool/compile.js wasm
emcmake cmake ..
emmake make -j 2
mv ../bin/prod.js ../bin/prod.wasm.js

node ../tool/compile.js asm
emcmake cmake ..
emmake make -j 2
mv ../bin/prod.js ../bin/prod.asm.js

node ../tool/compile.js
node ../tool/wrapper.js ../bin/prod.wasm.js wasm
node ../tool/wrapper.js ../bin/prod.asm.js asm
4 changes: 2 additions & 2 deletions lib/codec/build/CMakeCache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_STRIP:FILEPATH=C:/softwares/MinGW/mingw64/bin/strip.exe

//The CMake toolchain file
CMAKE_TOOLCHAIN_FILE:FILEPATH=C:/emsdk/fastcomp/emscripten/cmake/Modules/Platform/Emscripten.cmake
//No help, variable specified on the command line.
CMAKE_TOOLCHAIN_FILE:UNINITIALIZED=C:\emsdk\fastcomp\emscripten\cmake\Modules\Platform\Emscripten.cmake

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
Expand Down
2 changes: 1 addition & 1 deletion lib/codec/build/src/CMakeFiles/prod.dir/link.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:\emsdk\fastcomp\emscripten\em++.bat -O3 -s ENVIRONMENT="web,worker" -s SINGLE_FILE=1 -s WASM=1 -s FETCH=0 -s DISABLE_EXCEPTION_CATCHING=0 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s NO_EXIT_RUNTIME=0 -s FILESYSTEM=0 -s INVOKE_RUN=0 -s ASSERTIONS=1 -s TOTAL_MEMORY=33554432 -s EXPORTED_FUNCTIONS="['_codecInit', '_codecSetBridgeName', '_codecDecode', '_codecSetVideoBuffer', '_codecSetAudioBuffer', '_codecTry2Seek', '_codecFree']" --closure 1 --memory-init-file 0 --llvm-lto 3 @CMakeFiles\prod.dir\objects1.rsp -o ..\..\bin\prod.js @CMakeFiles\prod.dir\linklibs.rsp
C:\emsdk\fastcomp\emscripten\em++.bat -O3 -s ENVIRONMENT="web,worker" -s SINGLE_FILE=1 -s WASM=0 -s FETCH=0 -s DISABLE_EXCEPTION_CATCHING=0 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s NO_EXIT_RUNTIME=0 -s FILESYSTEM=0 -s TOTAL_MEMORY=33554432 -s INVOKE_RUN=0 -s LEGACY_VM_SUPPORT=1 -s MEM_INIT_METHOD=0 -s ELIMINATE_DUPLICATE_FUNCTIONS=1 -s ASSERTIONS=1 -s TOTAL_MEMORY=33554432 -s EXPORTED_FUNCTIONS="['_codecInit', '_codecSetBridgeName', '_codecDecode', '_codecSetVideoBuffer', '_codecSetAudioBuffer', '_codecTry2Seek', '_codecFree']" --closure 1 --memory-init-file 0 --llvm-lto 3 @CMakeFiles\prod.dir\objects1.rsp -o ..\..\bin\prod.js @CMakeFiles\prod.dir\linklibs.rsp
Binary file modified lib/codec/build/src/factor/CMakeFiles/factor.dir/codec_factor.cpp.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified lib/codec/cmake-build-debug/CMakeFiles/3.13.2/CompilerIdC/a.exe
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit bdef5f5

Please sign in to comment.