[FFmpeg-devel,v1] avfilter/showinfo: support displaying for webvtt id and setting side data

Submitted by lance.lmwang@gmail.com on Aug. 23, 2019, 2:25 p.m.

Details

Message ID 20190823142540.4621-1-lance.lmwang@gmail.com
State New
Headers show

Commit Message

lance.lmwang@gmail.com Aug. 23, 2019, 2:25 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 Aug. 23, 2019, 2:45 p.m.
Sorry, just notice the path is using the wrong type, ignore the patch.

On Fri, Aug 23, 2019 at 10:25:40PM +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..d1f074a 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_PKT_DATA_WEBVTT_IDENTIFIER:
> +            av_log(ctx, AV_LOG_INFO, "WebVTT (%d bytes)", sd->size);
> +            break;
> +        case AV_PKT_DATA_WEBVTT_SETTINGS:
> +            av_log(ctx, AV_LOG_INFO, "WebVTT Settings (%d bytes)", sd->size);
> +            break;
>          default:
>              av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)",
>                     sd->type, sd->size);
> -- 
> 2.6.4
>

Patch hide | download patch | download mbox

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 3c13f11..d1f074a 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_PKT_DATA_WEBVTT_IDENTIFIER:
+            av_log(ctx, AV_LOG_INFO, "WebVTT (%d bytes)", sd->size);
+            break;
+        case AV_PKT_DATA_WEBVTT_SETTINGS:
+            av_log(ctx, AV_LOG_INFO, "WebVTT Settings (%d bytes)", sd->size);
+            break;
         default:
             av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)",
                    sd->type, sd->size);