diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-11-11 17:37:43 -0500 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-12-07 14:40:06 -0500 |
commit | e7a6f8c972a0b5b98ef7bbf393e95c434e9e2539 (patch) | |
tree | 42c66d8d8c6d25467241d92b68b111b33dd55d7c /ffprobe.c | |
parent | 8f58ecc344a92e63193c38e28c173be987954bbb (diff) | |
download | ffmpeg-e7a6f8c972a0b5b98ef7bbf393e95c434e9e2539.tar.gz |
lavc: Add spherical packet side data API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -37,6 +37,7 @@ #include "libavutil/hash.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" +#include "libavutil/spherical.h" #include "libavutil/stereo3d.h" #include "libavutil/dict.h" #include "libavutil/intreadwrite.h" @@ -1783,6 +1784,18 @@ static void print_pkt_side_data(WriterContext *w, const AVStereo3D *stereo = (AVStereo3D *)sd->data; print_str("type", av_stereo3d_type_name(stereo->type)); print_int("inverted", !!(stereo->flags & AV_STEREO3D_FLAG_INVERT)); + } else if (sd->type == AV_PKT_DATA_SPHERICAL) { + const AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data; + if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR) + print_str("projection", "equirectangular"); + else if (spherical->projection == AV_SPHERICAL_CUBEMAP) + print_str("projection", "cubemap"); + else + print_str("projection", "unknown"); + + print_int("yaw", (double) spherical->yaw / (1 << 16)); + print_int("pitch", (double) spherical->pitch / (1 << 16)); + print_int("roll", (double) spherical->roll / (1 << 16)); } writer_print_section_footer(w); } |