mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
mi-info: pretty print framerates
Avoid to print 0 fps. Handle the special 0/1 case for still images.
This commit is contained in:
parent
75e1f5040a
commit
517f290476
1 changed files with 12 additions and 1 deletions
|
@ -618,7 +618,18 @@ public class MediaInfo.Info : Box
|
||||||
|
|
||||||
double fps_num = (double)vinfo.get_framerate_num();
|
double fps_num = (double)vinfo.get_framerate_num();
|
||||||
double fps_denom = (double)vinfo.get_framerate_denom();
|
double fps_denom = (double)vinfo.get_framerate_denom();
|
||||||
str = "%.3lf frames/second".printf (fps_num/fps_denom);
|
if (fps_num != 0) {
|
||||||
|
str = "%.3lf frames/second".printf (fps_num/fps_denom);
|
||||||
|
} else {
|
||||||
|
if (fps_denom == 1) {
|
||||||
|
// TODO(ensonic): there are a few files where video is flaged as still image
|
||||||
|
// ~/temp/Video/luc_00036.MTS
|
||||||
|
// ~/temp/Video/lookinggood.asx
|
||||||
|
str = "still image";
|
||||||
|
} else {
|
||||||
|
str = "unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
add_table_row_for_string (table, row, "Framerate:", str);
|
add_table_row_for_string (table, row, "Framerate:", str);
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue