forked from forks/ffprobe-wasm
Reload Overview metadata and versions when loading a new file.
This commit is contained in:
@@ -67,6 +67,8 @@ typedef struct FramesResponse {
|
|||||||
} FramesResponse;
|
} FramesResponse;
|
||||||
|
|
||||||
FileInfoResponse get_file_info(std::string filename) {
|
FileInfoResponse get_file_info(std::string filename) {
|
||||||
|
av_log_set_level(AV_LOG_QUIET); // No logging output for libav.
|
||||||
|
|
||||||
FILE *file = fopen(filename.c_str(), "rb");
|
FILE *file = fopen(filename.c_str(), "rb");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
printf("cannot open file\n");
|
printf("cannot open file\n");
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'Overview',
|
name: 'Overview',
|
||||||
props: ['info'],
|
props: ['info'],
|
||||||
data() {
|
computed: {
|
||||||
return {
|
items() {
|
||||||
items: [
|
return [
|
||||||
{
|
{
|
||||||
name: this.info.name,
|
name: this.info.name,
|
||||||
duration: this.info.duration,
|
duration: this.info.duration,
|
||||||
@@ -26,15 +26,17 @@ export default {
|
|||||||
nb_streams: this.info.nb_streams,
|
nb_streams: this.info.nb_streams,
|
||||||
flags: this.info.flags,
|
flags: this.info.flags,
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
versions: [
|
},
|
||||||
|
versions() {
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
libavutil: this.info.versions.libavutil,
|
libavutil: this.info.versions.libavutil,
|
||||||
libavcodec: this.info.versions.libavcodec,
|
libavcodec: this.info.versions.libavcodec,
|
||||||
libavformat: this.info.versions.libavformat,
|
libavformat: this.info.versions.libavformat,
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
Reference in New Issue
Block a user