aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-28 22:23:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-28 22:23:01 +0200
commitf30a8154abf2905b61b08974bc71f04e8d7afc68 (patch)
tree2c487d535bd7955a2c1e598a4409142790d8230e /libavformat
parent56cc754c76d3aba81e121502d0d420242b7023b1 (diff)
parent9301486408a480629336af4d7fd873c0f28fb2d5 (diff)
downloadffmpeg-f30a8154abf2905b61b08974bc71f04e8d7afc68.tar.gz
Merge commit '9301486408a480629336af4d7fd873c0f28fb2d5'
* commit '9301486408a480629336af4d7fd873c0f28fb2d5': avcodec: add stream-level stereo3d side data Conflicts: doc/APIchanges libavcodec/avcodec.h libavcodec/utils.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/dump.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/libavformat/dump.c b/libavformat/dump.c
index b87379a9e1..3a7adbe014 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -29,6 +29,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/avstring.h"
#include "libavutil/replaygain.h"
+#include "libavutil/stereo3d.h"
#include "avformat.h"
@@ -244,6 +245,51 @@ static void dump_replaygain(void *ctx, AVPacketSideData *sd)
print_peak(ctx, "album peak", rg->album_peak);
}
+static void dump_stereo3d(void *ctx, AVPacketSideData *sd)
+{
+ AVStereo3D *stereo;
+
+ if (sd->size < sizeof(*stereo)) {
+ av_log(ctx, AV_LOG_INFO, "invalid data");
+ return;
+ }
+
+ stereo = (AVStereo3D *)sd->data;
+
+ switch (stereo->type) {
+ case AV_STEREO3D_2D:
+ av_log(ctx, AV_LOG_INFO, "2D");
+ break;
+ case AV_STEREO3D_SIDEBYSIDE:
+ av_log(ctx, AV_LOG_INFO, "side by side");
+ break;
+ case AV_STEREO3D_TOPBOTTOM:
+ av_log(ctx, AV_LOG_INFO, "top and bottom");
+ break;
+ case AV_STEREO3D_FRAMESEQUENCE:
+ av_log(ctx, AV_LOG_INFO, "frame alternate");
+ break;
+ case AV_STEREO3D_CHECKERBOARD:
+ av_log(ctx, AV_LOG_INFO, "checkerboard");
+ break;
+ case AV_STEREO3D_LINES:
+ av_log(ctx, AV_LOG_INFO, "interleaved lines");
+ break;
+ case AV_STEREO3D_COLUMNS:
+ av_log(ctx, AV_LOG_INFO, "interleaved columns");
+ break;
+ case AV_STEREO3D_SIDEBYSIDE_QUINCUNX:
+ av_log(ctx, AV_LOG_INFO, "side by side (quincunx subsampling)");
+ break;
+ default:
+ av_log(ctx, AV_LOG_WARNING, "unknown");
+ break;
+ }
+
+ if (stereo->flags & AV_STEREO3D_FLAG_INVERT)
+ av_log(ctx, AV_LOG_INFO, " (inverted)");
+}
+
static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
{
int i;
@@ -277,6 +323,10 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
av_log(ctx, AV_LOG_INFO, "displaymatrix: rotation of %.2f degrees",
av_display_rotation_get((int32_t *)sd.data));
break;
+ case AV_PKT_DATA_STEREO3D:
+ av_log(ctx, AV_LOG_INFO, "stereo3d: ");
+ dump_stereo3d(ctx, &sd);
+ break;
default:
av_log(ctx, AV_LOG_WARNING,
"unknown side data type %d (%d bytes)", sd.type, sd.size);