Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-11-12 01:37:43 +0300
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-12-07 22:40:06 +0300
commite7a6f8c972a0b5b98ef7bbf393e95c434e9e2539 (patch)
tree42c66d8d8c6d25467241d92b68b111b33dd55d7c /ffprobe.c
parent8f58ecc344a92e63193c38e28c173be987954bbb (diff)
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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index 4ed8e063b1..046f080792 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -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);
}