changeset 35328:5e22bb28e6b7

Print rotation information as identify msg This patch prints rotation information in metadata of mov files as identify message with tag "ID_VID_<vid>_ROTATE" to enable frontends to rotate the video.
author upsuper
date Fri, 16 Nov 2012 23:39:27 +0000
parents 891b14e68b02
children e625619bb20a
files libmpdemux/demux_lavf.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Thu Nov 15 18:44:19 2012 +0000
+++ b/libmpdemux/demux_lavf.c	Fri Nov 16 23:39:27 2012 +0000
@@ -280,6 +280,7 @@
     int stream_id;
     AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
     AVDictionaryEntry *title= av_dict_get(st->metadata, "title",    NULL, 0);
+    AVDictionaryEntry *rot  = av_dict_get(st->metadata, "rotate",   NULL, 0);
     int g;
 
     switch(codec->codec_type){
@@ -399,6 +400,8 @@
             sh_video->i_bps=codec->bit_rate/8;
             if (title && title->value)
                 mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_NAME=%s\n", priv->video_streams, title->value);
+            if (rot && rot->value)
+                mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_ROTATE=%s\n", priv->video_streams, rot->value);
             mp_msg(MSGT_DEMUX,MSGL_DBG2,"aspect= %d*%d/(%d*%d)\n",
                 codec->width, codec->sample_aspect_ratio.num,
                 codec->height, codec->sample_aspect_ratio.den);