[FFmpeg-devel,v1,2/3] avfilter/vf_showinfo: display GOP timecode side data

Submitted by lance.lmwang@gmail.com on Aug. 24, 2019, 4:17 p.m.

Details

Message ID 20190824161800.15365-2-lance.lmwang@gmail.com
State Accepted
Commit ede15bf2e359c2d2480ee451d7579a7fdc009665
Headers show

Commit Message

lance.lmwang@gmail.com Aug. 24, 2019, 4:17 p.m.
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/vf_showinfo.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

lance.lmwang@gmail.com Sept. 6, 2019, 2:42 p.m.
ping, please review and help to merge it, thanks.


On Sun, Aug 25, 2019 at 12:17:59AM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/vf_showinfo.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
> index 3c13f11..31f6b32 100644
> --- a/libavfilter/vf_showinfo.c
> +++ b/libavfilter/vf_showinfo.c
> @@ -313,6 +313,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
>          case AV_FRAME_DATA_CONTENT_LIGHT_LEVEL:
>              dump_content_light_metadata(ctx, sd);
>              break;
> +        case AV_FRAME_DATA_GOP_TIMECODE: {
> +            char tcbuf[AV_TIMECODE_STR_SIZE];
> +            av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data));
> +            av_log(ctx, AV_LOG_INFO, "GOP timecode - %s", tcbuf);
> +            break;
> +        }
>          default:
>              av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)",
>                     sd->type, sd->size);
> -- 
> 2.9.5
>
Michael Niedermayer Sept. 6, 2019, 7:28 p.m.
On Sun, Aug 25, 2019 at 12:17:59AM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/vf_showinfo.c | 6 ++++++
>  1 file changed, 6 insertions(+)

will apply

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 3c13f11..31f6b32 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -313,6 +313,12 @@  static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
         case AV_FRAME_DATA_CONTENT_LIGHT_LEVEL:
             dump_content_light_metadata(ctx, sd);
             break;
+        case AV_FRAME_DATA_GOP_TIMECODE: {
+            char tcbuf[AV_TIMECODE_STR_SIZE];
+            av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data));
+            av_log(ctx, AV_LOG_INFO, "GOP timecode - %s", tcbuf);
+            break;
+        }
         default:
             av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)",
                    sd->type, sd->size);