[FFmpeg-devel] [PATCH] lavfi/drawtext: replace "draw" option with generic timeline interface.

Clément Bœsch u at pkh.me
Fri Aug 23 22:21:43 CEST 2013


On Fri, Aug 23, 2013 at 09:29:09PM +0200, Alexander Strasser wrote:
> Hi Clément!
> 
> On 2013-08-21 01:26 +0200, Clément Bœsch wrote:
> > On Tue, Aug 20, 2013 at 11:00:47PM +0000, Paul B Mahol wrote:
> > > On 8/20/13, Clement Boesch <u at pkh.me> wrote:
> > > > ---
> > > >  Changelog                 |  1 +
> > > >  doc/filters.texi          | 12 +-----------
> > > >  libavfilter/version.h     |  2 +-
> > > >  libavfilter/vf_drawtext.c | 17 +++--------------
> > > >  4 files changed, 6 insertions(+), 26 deletions(-)
> > > >
> > > > diff --git a/Changelog b/Changelog
> > > > index 4a6c60c..4337ba2 100644
> > > > --- a/Changelog
> > > > +++ b/Changelog
> > > > @@ -15,6 +15,7 @@ version <next>
> > > >    data read from an input file
> > > >  - incomplete Voxware MetaSound decoder
> > > >  - read EXIF metadata from JPEG
> > > > +- drawtext filter now uses the generic timeline interface
> > > >
> > > >
> > > 
> > > What about backward compatibility?
> > 
> > I guess I'm being a bit rude assuming micro bump and Changelog entry are
> > enough. Should I add some version #ifdefery around all the "draw" code
> > which will be removed at next major bump? It sounded a bit overkill to me
> > but well...
> 
>   Counter proposal attached; please start flaming :)
> 

That diff was basically my original patch, but I didn't like keeping both
options.

>   BTW there is even another possibility. Make "enable" and
> "draw" work together without prioritizing "enable" but by
> treating both equally and combine them with a logical or.
> 

If I understand you well, that is a bit tricky to do.

>   I do mind dropping draw option because of two things:
> 
>   - compatibility

Well I can come up with a patch for that in a few minutes, by adding
#ifdefery in the filter + av_log warning about "draw" when used. Assuming
this, next lavfi major bump will kill the option. It will just clutter a
bit the filter code for a while.

Maybe we should consider a new way of deprecating
API/ABI/whatever-interfaces so we don't have to bother about such things
in the future; it's kind of a drag to deal with such problem regularly.

>   - functionality
>     (draw option can use information timeline can't e.g. text width/height)
> 

Does that matter in practice?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130823/2748aa27/attachment.asc>


More information about the ffmpeg-devel mailing list