aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_showinfo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-17 15:16:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-21 21:21:00 +0100
commitfdb93996811bacfa7b82995cdc0f93c46f3dc6cc (patch)
tree70d35bdcb6f58fde7ad31a59522a7a76257a2c7d /libavfilter/vf_showinfo.c
parent7849ce438efe21dcc185aac4a86157a5d8f777fa (diff)
downloadffmpeg-fdb93996811bacfa7b82995cdc0f93c46f3dc6cc.tar.gz
avfilter/vf_showinfo: show timebase & framerate too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_showinfo.c')
-rw-r--r--libavfilter/vf_showinfo.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index aa3bc83090..78ba4a03f1 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -162,11 +162,36 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
return ff_filter_frame(inlink->dst->outputs[0], frame);
}
+static int config_props(AVFilterContext *ctx, AVFilterLink *link, int is_out)
+{
+
+ av_log(ctx, AV_LOG_INFO, "config %s time_base: %d/%d, frame_rate: %d/%d\n",
+ is_out ? "out" :"in",
+ link->time_base.num, link->time_base.den,
+ link->frame_rate.num, link->frame_rate.den
+ );
+
+ return 0;
+}
+
+static int config_props_in(AVFilterLink *link)
+{
+ AVFilterContext *ctx = link->dst;
+ return config_props(ctx, link, 0);
+}
+
+static int config_props_out(AVFilterLink *link)
+{
+ AVFilterContext *ctx = link->src;
+ return config_props(ctx, link, 1);
+}
+
static const AVFilterPad avfilter_vf_showinfo_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.filter_frame = filter_frame,
+ .config_props = config_props_in,
},
{ NULL }
};
@@ -174,7 +199,8 @@ static const AVFilterPad avfilter_vf_showinfo_inputs[] = {
static const AVFilterPad avfilter_vf_showinfo_outputs[] = {
{
.name = "default",
- .type = AVMEDIA_TYPE_VIDEO
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_props_out,
},
{ NULL }
};