Skip to content

Commit

Permalink
Merge pull request #15 from slateteams/feat/debug-build
Browse files Browse the repository at this point in the history
feat: add development compile option
  • Loading branch information
ForeverSc authored Oct 18, 2024
2 parents fc692b3 + 0c26a72 commit 644c99a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ FFMPEG_CONFIGURE_ARGS = \
--enable-avformat \
--enable-protocol=file

FFMPEG_DEV_CONFIGURE_ARGS = \
--enable-debug=3 \
--disable-stripping

MINI_DEMUX_ARGS = \
--enable-demuxer=mov,mp4,m4a,3gp,3g2,matroska,webm,m4v

Expand All @@ -32,6 +36,12 @@ WEB_DEMUXER_ARGS = \
-s ASYNCIFY \
-s ALLOW_MEMORY_GROWTH=1


WEB_DEMUXER_DEV_ARGS = \
-O0 \
-g


clean:
cd lib/FFmpeg && \
make clean && \
Expand All @@ -47,8 +57,16 @@ ffmpeg-lib:
emconfigure ./configure $(FFMPEG_CONFIGURE_ARGS) $(DEMUX_ARGS) && \
emmake make

ffmpeg-lib-dev:
cd lib/FFmpeg && \
emconfigure ./configure $(FFMPEG_CONFIGURE_ARGS) $(DEMUX_ARGS) $(FFMPEG_DEV_CONFIGURE_ARGS) && \
emmake make

web-demuxer:
$(WEB_DEMUXER_ARGS) -o ./src/lib/ffmpeg.js

web-demuxer-mini:
$(WEB_DEMUXER_ARGS) -o ./src/lib/ffmpeg-mini.js
$(WEB_DEMUXER_ARGS) -o ./src/lib/ffmpeg-mini.js

web-demuxer-dev:
$(WEB_DEMUXER_ARGS) $(WEB_DEMUXER_DEV_ARGS) -o ./src/lib/ffmpeg.js
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@
"dev:docker:x86_64": "docker-compose down dev-web-demuxer-x86_64 && docker-compose up dev-web-demuxer-x86_64",
"make:ffmpeg-lib-mini": "docker exec -it web-demuxer make ffmpeg-lib-mini",
"make:ffmpeg-lib": "docker exec -it web-demuxer make ffmpeg-lib",
"make:ffmpeg-lib-dev": "docker exec -it web-demuxer make ffmpeg-lib-dev",
"make:web-demuxer": "docker exec -it web-demuxer make web-demuxer",
"make:web-demuxer-mini": "docker exec -it web-demuxer make web-demuxer-mini",
"make:web-demuxer-dev": "docker exec -it web-demuxer make web-demuxer-dev",
"make:web-demuxer:all": "npm run make:web-demuxer && npm run make:web-demuxer-mini",
"build": "tsc && vite build",
"build:wasm:mini": "npm run make:ffmpeg-lib-mini && npm run make:web-demuxer-mini",
"build:wasm": "npm run make:ffmpeg-lib && npm run make:web-demuxer",
"build:wasm:dev": "npm run make:ffmpeg-lib-dev && npm run make:web-demuxer-dev",
"build:wasm:all": "npm run build:wasm && npm run build:wasm:mini",
"build:all": "npm run build:wasm:all && npm run build",
"test": "vitest",
Expand Down Expand Up @@ -84,4 +87,4 @@
"audio",
"media"
]
}
}

0 comments on commit 644c99a

Please sign in to comment.