This is printed in a separate subgroup named "sidedata".
---
This could perhaps also print the complete matrix in itself,
but the output abstraction doesn't (yet) seem to support a raw
array with only numbers, only arrays of name-int pairs. (In the
json output, a plain array of integers would be trivial though,
but it doesn't map quite as well to the ini-style format.)
Suggestions for a better name than displaymatrix_rotation are
welcome, but since we might want to output the full matrix
in itself as well, I chose to include displaymatrix in the name.
Printing of e.g. replaygain and stereo3d info could easily be
added as well.
---
avprobe.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/avprobe.c b/avprobe.c
index d969257..d1a6192 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -24,6 +24,7 @@
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavutil/avstring.h"
+#include "libavutil/display.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/dict.h"
@@ -674,6 +675,21 @@ static void show_stream(AVFormatContext *fmt_ctx, int
stream_idx)
probe_dict(stream->metadata, "tags");
+ if (stream->nb_side_data) {
+ int i;
+ probe_object_header("sidedata");
+ for (i = 0; i < stream->nb_side_data; i++) {
+ const AVPacketSideData* sd = &stream->side_data[i];
+ switch (sd->type) {
+ case AV_PKT_DATA_DISPLAYMATRIX:
+ probe_int("displaymatrix_rotation",
+ av_display_rotation_get((int32_t *)sd->data));
+ break;
+ }
+ }
+ probe_object_footer("sidedata");
+ }
+
probe_object_footer("stream");
}
--
1.9.5 (Apple Git-50.3)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel