[FFmpeg-cvslog] lavfi/vf_showinfo: support displaying S12M timecode sidedata

Josh de Kock git at videolan.org
Tue Oct 23 18:01:26 EEST 2018


ffmpeg | branch: master | Josh de Kock <joshdk at obe.tv> | Fri Oct 12 13:39:51 2018 +0100| [0ac82eed6f9c7d1f54cb834ba9e20d129e70186a] | committer: Kieran Kunhya

lavfi/vf_showinfo: support displaying S12M timecode sidedata

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ac82eed6f9c7d1f54cb834ba9e20d129e70186a
---

 libavfilter/vf_showinfo.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index d1d1415c0b..689b5399db 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -32,6 +32,7 @@
 #include "libavutil/spherical.h"
 #include "libavutil/stereo3d.h"
 #include "libavutil/timestamp.h"
+#include "libavutil/timecode.h"
 
 #include "avfilter.h"
 #include "internal.h"
@@ -174,6 +175,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
         case AV_FRAME_DATA_STEREO3D:
             dump_stereo3d(ctx, sd);
             break;
+        case AV_FRAME_DATA_S12M_TIMECODE: {
+            uint32_t *tc = (uint32_t*)sd->data;
+            for (int j = 1; j < tc[0]; j++) {
+                char tcbuf[AV_TIMECODE_STR_SIZE];
+                av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0);
+                av_log(ctx, AV_LOG_INFO, "timecode - %s%s", tcbuf, j != tc[0] - 1 ? ", " : "");
+            }
+            break;
+        }
         case AV_FRAME_DATA_DISPLAYMATRIX:
             av_log(ctx, AV_LOG_INFO, "displaymatrix: rotation of %.2f degrees",
                    av_display_rotation_get((int32_t *)sd->data));



More information about the ffmpeg-cvslog mailing list