#include "libavutil/display.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/spherical.h"
#include "libavutil/stereo3d.h"
#include "libavutil/dict.h"
#include "libavutil/libm.h"
for (i = 0; i < stream->nb_side_data; i++) {
const AVPacketSideData* sd = &stream->side_data[i];
AVStereo3D *stereo;
+ AVSphericalMapping *spherical;
switch (sd->type) {
case AV_PKT_DATA_DISPLAYMATRIX:
!!(stereo->flags & AV_STEREO3D_FLAG_INVERT));
probe_object_footer("stereo3d");
break;
+ case AV_PKT_DATA_SPHERICAL:
+ spherical = (AVSphericalMapping *)sd->data;
+ probe_object_header("spherical");
+
+ if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR)
+ probe_str("projection", "equirectangular");
+ else if (spherical->projection == AV_SPHERICAL_CUBEMAP)
+ probe_str("projection", "cubemap");
+ else
+ probe_str("projection", "unknown");
+
+ probe_object_header("orientation");
+ probe_int("yaw", (double) spherical->yaw / (1 << 16));
+ probe_int("pitch", (double) spherical->pitch / (1 << 16));
+ probe_int("roll", (double) spherical->roll / (1 << 16));
+ probe_object_footer("orientation");
+
+ probe_object_footer("spherical");
+ break;
}
}
probe_object_footer("sidedata");
static int opt_show_stream_entry(void *optctx, const char *opt, const char *arg)
{
+ const char *p = arg;
+
do_show_streams = 1;
nb_stream_entries_to_show++;
octx.print_header = NULL;
octx.print_integer = show_stream_entry_integer;
octx.print_string = show_stream_entry_string;
- av_dict_set(&stream_entries_to_show, arg, "", 0);
+
+ while (*p) {
+ char *val = av_get_token(&p, ",");
+ if (!val)
+ return AVERROR(ENOMEM);
+
+ av_dict_set(&stream_entries_to_show, val, "", 0);
+
+ av_free(val);
+ if (*p)
+ p++;
+ }
+
return 0;
}
}
static const OptionDef real_options[] = {
-#include "cmdutils_common_opts.h"
+ CMDUTILS_COMMON_OPTIONS
{ "f", HAS_ARG, {.func_arg = opt_format}, "force format", "format" },
{ "of", HAS_ARG, {.func_arg = opt_output_format}, "output the document either as ini or json", "output_format" },
{ "unit", OPT_BOOL, {&show_value_unit},
{ "show_packets", OPT_BOOL, {&do_show_packets}, "show packets info" },
{ "show_streams", OPT_BOOL, {&do_show_streams}, "show streams info" },
{ "show_stream_entry", HAS_ARG, {.func_arg = opt_show_stream_entry},
- "show a particular entry from all streams", "entry" },
+ "show a particular entry from all streams (comma separated)", "entry" },
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {.func_arg = opt_default},
"generic catch all option", "" },
{ NULL, },