summaryrefslogtreecommitdiff
path: root/avtools
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-04-04 17:24:19 -0300
committerVittorio Giovara <vittorio.giovara@gmail.com>2017-04-27 09:59:54 -0400
commitc7bf98d4372e9217c8d75d2ca1f298385909e4da (patch)
tree80c85649aee732aab81bf29848f7242482176f1d /avtools
parent498864fe800a1b4d4db804aa7e5ebbc7867df6ce (diff)
avprobe: use av_spherical_projection_name() to print spherical projection names
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'avtools')
-rw-r--r--avtools/avprobe.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/avtools/avprobe.c b/avtools/avprobe.c
index 5f5e670f1b..a9ca1934ca 100644
--- a/avtools/avprobe.c
+++ b/avtools/avprobe.c
@@ -817,25 +817,21 @@ static void show_stream(InputFile *ifile, InputStream *ist)
case AV_PKT_DATA_SPHERICAL:
spherical = (AVSphericalMapping *)sd->data;
probe_object_header("spherical");
+ probe_str("projection", av_spherical_projection_name(spherical->projection));
- if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR) {
- probe_str("projection", "equirectangular");
- } else if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
- probe_str("projection", "cubemap");
+ if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
probe_int("padding", spherical->padding);
} else if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
size_t l, t, r, b;
av_spherical_tile_bounds(spherical, par->width, par->height,
&l, &t, &r, &b);
- probe_str("projection", "tiled equirectangular");
probe_object_header("bounding");
probe_int("left", l);
probe_int("top", t);
probe_int("right", r);
probe_int("bottom", b);
probe_object_footer("bounding");
- } else
- probe_str("projection", "unknown");
+ }
probe_object_header("orientation");
probe_int("yaw", (double) spherical->yaw / (1 << 16));