diff --git a/src/ffprobe-wasm-wrapper.cpp b/src/ffprobe-wasm-wrapper.cpp index 95a211d..790deba 100644 --- a/src/ffprobe-wasm-wrapper.cpp +++ b/src/ffprobe-wasm-wrapper.cpp @@ -17,6 +17,14 @@ const std::string c_avformat_version() { return AV_STRINGIFY(LIBAVFORMAT_VERSION); } +const std::string c_avcodec_version() { + return AV_STRINGIFY(LIBAVCODEC_VERSION); +} + +const std::string c_avutil_version() { + return AV_STRINGIFY(LIBAVUTIL_VERSION); +} + typedef struct Stream { int id; int start_time; @@ -227,11 +235,13 @@ FramesResponse get_frames(int offset) { } -EMSCRIPTEN_BINDINGS(my_constant_example) { - function("c_avformat_version", &c_avformat_version); +EMSCRIPTEN_BINDINGS(constants) { + function("avformat_version", &c_avformat_version); + function("avcodec_version", &c_avcodec_version); + function("avutil_version", &c_avutil_version); } -EMSCRIPTEN_BINDINGS(FileInfoResponse_struct) { +EMSCRIPTEN_BINDINGS(structs) { emscripten::value_object("Stream") .field("id", &Stream::id) .field("start_time", &Stream::start_time) diff --git a/www/src/components/File.vue b/www/src/components/File.vue index 99d6418..5230582 100644 --- a/www/src/components/File.vue +++ b/www/src/components/File.vue @@ -27,7 +27,6 @@ - @@ -55,9 +54,6 @@ export default { } }, computed: { - avformat_version() { - return window.Module.c_avformat_version(); - }, info() { return this.data && window.Module.get_file_info(); } diff --git a/www/src/components/Overview.vue b/www/src/components/Overview.vue index d86f440..4c8244d 100644 --- a/www/src/components/Overview.vue +++ b/www/src/components/Overview.vue @@ -1,5 +1,8 @@