forked from forks/ffprobe-wasm
Add avlib versions and remove streams tab in Vue.
This commit is contained in:
@@ -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>("Stream")
|
||||
.field("id", &Stream::id)
|
||||
.field("start_time", &Stream::start_time)
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
<Overview :info="info" />
|
||||
</div>
|
||||
</b-tab>
|
||||
<b-tab title="Streams" class="mt-2" disabled></b-tab>
|
||||
<b-tab title="Frames" class="mt-2" lazy>
|
||||
<Frames />
|
||||
</b-tab>
|
||||
@@ -55,9 +54,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
avformat_version() {
|
||||
return window.Module.c_avformat_version();
|
||||
},
|
||||
info() {
|
||||
return this.data && window.Module.get_file_info();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<h4>Version</h4>
|
||||
<b-table stacked :items="versions"></b-table>
|
||||
|
||||
<h4>Metadata</h4>
|
||||
<b-table stacked :items="items"></b-table>
|
||||
|
||||
@@ -32,6 +35,13 @@ export default {
|
||||
nb_streams: this.info.nb_streams,
|
||||
flags: this.info.flags,
|
||||
},
|
||||
],
|
||||
versions: [
|
||||
{
|
||||
libavutil: window.Module.avutil_version(),
|
||||
libavcodec: window.Module.avcodec_version(),
|
||||
libavformat: window.Module.avformat_version(),
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user