[FFmpeg-devel] [RFC] [WIP] [PATCH] lavfi: add drawgraph filter
Michael Niedermayer
michaelni at gmx.at
Thu Jun 25 20:48:19 CEST 2015
On Thu, Jun 25, 2015 at 06:03:14PM +0000, Paul B Mahol wrote:
> On 6/25/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Jun 24, 2015 at 05:49:35PM +0000, Paul B Mahol wrote:
> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> >> ---
> >> Example:
> >>
> >> ffplay movie.webm -vf
> >> signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255:mode=0
> >>
> >> ---
> >> libavfilter/Makefile | 1 +
> >> libavfilter/allfilters.c | 1 +
> >> libavfilter/vf_drawgraph.c | 186
> >> +++++++++++++++++++++++++++++++++++++++++++++
> >> 3 files changed, 188 insertions(+)
> >> create mode 100644 libavfilter/vf_drawgraph.c
> >
> > nice, i like this filter!
> >
> >
> > [...]
> >> + metadata = av_frame_get_metadata(in);
> >> + e = av_dict_get(metadata, s->key, NULL, 0);
> >
> > this could be extended to also support AVOptions
> > aka av_get_double(in, s->key...)
>
> Hmm, this doesn't work.
right, this is slightly more complex, maybe we should add a
av_get_double2/int2 that takes a class argument
but something like this should work:
class = avcodec_get_frame_class();
ptr = av_opt_ptr(class, in, s->key);
o = av_opt_find(&class, s->key, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ);
switch (o->type) {
...
}
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150625/726fcff9/attachment.asc>
More information about the ffmpeg-devel
mailing list