[FFmpeg-devel] [PATCH 04/11] drawtext: use new public timecode API.

Clément Bœsch ubitux at gmail.com
Mon Jan 23 16:45:11 CET 2012


On Thu, Jan 19, 2012 at 01:18:48AM +0100, Stefano Sabatini wrote:
> On date Monday 2012-01-16 17:30:07 +0100, Clément Bœsch encoded:
> > From: Clément Bœsch <clement.boesch at smartjog.com>
> > 
> > ---
> >  doc/filters.texi          |    2 --
> >  libavfilter/vf_drawtext.c |   34 +++++++++++++++-------------------
> >  2 files changed, 15 insertions(+), 21 deletions(-)
> > 
> > diff --git a/doc/filters.texi b/doc/filters.texi
> > index 2afc1d3..61a27c5 100644
> > --- a/doc/filters.texi
> > +++ b/doc/filters.texi
> > @@ -1257,8 +1257,6 @@ timestamp expressed in seconds, NAN if the input timestamp is unknown
> >  @item timecode
> >  initial timecode representation in "hh:mm:ss[:;.]ff" format. It can be used
> >  with or without text parameter. @var{rate} option must be specified.
> > -Note that timecode options are @emph{not} effective if FFmpeg is build with
> > - at code{--disable-avcodec}.
> >  
> >  @item r, rate
> >  frame rate (timecode only)
> > diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> > index d0d854b..a0ca742 100644
> > --- a/libavfilter/vf_drawtext.c
> > +++ b/libavfilter/vf_drawtext.c
> > @@ -30,7 +30,6 @@
> >  #include <time.h>
> >  
> >  #include "config.h"
> > -#include "libavcodec/timecode.h"
> >  #include "libavutil/avstring.h"
> >  #include "libavutil/colorspace.h"
> >  #include "libavutil/file.h"
> > @@ -39,6 +38,7 @@
> >  #include "libavutil/random_seed.h"
> >  #include "libavutil/parseutils.h"
> >  #include "libavutil/pixdesc.h"
> > +#include "libavutil/timecode.h"
> >  #include "libavutil/tree.h"
> >  #include "libavutil/lfg.h"
> >  #include "avfilter.h"
> > @@ -157,7 +157,9 @@ typedef struct {
> >      AVExpr *d_pexpr;
> >      int draw;                       ///< set to zero to prevent drawing
> >      AVLFG  prng;                    ///< random
> > -    struct ff_timecode tc;
> 
> > +    char *timecode_opt_string;      ///< specified timecode option string
> 
> nit: tc_opt_string for consistency
> 
> > +    AVRational rate;                ///< frame rate for timecode
> 
> nit: tc_rate
>  
> > +    AVTimecode tc;                  ///< timecode context
> 

I used tc_ here and updated the muxer patches to stick with this syntax.

[...]

-- 
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/20120123/146b4041/attachment.asc>


More information about the ffmpeg-devel mailing list