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);
|
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 {
|
typedef struct Stream {
|
||||||
int id;
|
int id;
|
||||||
int start_time;
|
int start_time;
|
||||||
@@ -227,11 +235,13 @@ FramesResponse get_frames(int offset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EMSCRIPTEN_BINDINGS(my_constant_example) {
|
EMSCRIPTEN_BINDINGS(constants) {
|
||||||
function("c_avformat_version", &c_avformat_version);
|
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")
|
emscripten::value_object<Stream>("Stream")
|
||||||
.field("id", &Stream::id)
|
.field("id", &Stream::id)
|
||||||
.field("start_time", &Stream::start_time)
|
.field("start_time", &Stream::start_time)
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
<Overview :info="info" />
|
<Overview :info="info" />
|
||||||
</div>
|
</div>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
<b-tab title="Streams" class="mt-2" disabled></b-tab>
|
|
||||||
<b-tab title="Frames" class="mt-2" lazy>
|
<b-tab title="Frames" class="mt-2" lazy>
|
||||||
<Frames />
|
<Frames />
|
||||||
</b-tab>
|
</b-tab>
|
||||||
@@ -55,9 +54,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
avformat_version() {
|
|
||||||
return window.Module.c_avformat_version();
|
|
||||||
},
|
|
||||||
info() {
|
info() {
|
||||||
return this.data && window.Module.get_file_info();
|
return this.data && window.Module.get_file_info();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<h4>Version</h4>
|
||||||
|
<b-table stacked :items="versions"></b-table>
|
||||||
|
|
||||||
<h4>Metadata</h4>
|
<h4>Metadata</h4>
|
||||||
<b-table stacked :items="items"></b-table>
|
<b-table stacked :items="items"></b-table>
|
||||||
|
|
||||||
@@ -32,6 +35,13 @@ export default {
|
|||||||
nb_streams: this.info.nb_streams,
|
nb_streams: this.info.nb_streams,
|
||||||
flags: this.info.flags,
|
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