[FFmpeg-devel] [PATCH 3/4] lavfi/timeline: add passthrough callback.

Clément Bœsch ubitux at gmail.com
Tue Apr 16 11:43:00 CEST 2013


On Tue, Apr 16, 2013 at 10:45:51AM +0200, Michael Niedermayer wrote:
[...]
> > > > diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
> > > > index a5518f7..a092ad2 100644
> > > > --- a/libavfilter/avfilter.h
> > > > +++ b/libavfilter/avfilter.h
> > > > @@ -336,6 +336,19 @@ struct AVFilterPad {
> > > >      int (*filter_frame)(AVFilterLink *link, AVFrame *frame);
> > > >  
> > > >      /**
> > > > +     * Passthrough filtering callback.
> > > > +     *
> > > > +     * If a filter support timeline editing (AVFILTER_FLAG_SUPPORT_TIMELINE)
> > > > +     * then it can implement a custom passthrough callback to update its local
> > > > +     * context (for example to keep a frame reference, or simply send the
> > > > +     * filter to a custom outlink). The filter is obviously not supposed to do
> > > > +     * any change to the frame in this callback.
> > > > +     *
> > > > +     * Input pads only.
> > > > +     */
> > > > +    int (*passthrough_filter_frame)(AVFilterLink *link, AVFrame *frame);
> > > > +
> > > > +    /**
> > > >       * Frame poll callback. This returns the number of immediately available
> > > 
> > > shouldnt new fields be added at the end of the structure ?
> > > 
> > 
> > There is this a bit above:
> > 
> >     /*****************************************************************
> >      * All fields below this line are not part of the public API. They
> >      * may not be used outside of libavfilter and can be changed and
> >      * removed at will.
> >      * New public fields should be added right above.
> >      *****************************************************************
> >      */
> 
> That comment is in AVFilter and AVFilterLink, you add a field to
> AVFilterPad
> 
> 

wtf, how did i get there... well sorry about that. Anyway, the AVFilterPad
has this one:

 * @warning this struct might be removed from public API.
 * users should call avfilter_pad_get_name() and avfilter_pad_get_type()
 * to access the name and type fields; there should be no need to access
 * any other fields from outside of libavfilter.

So it should be OK.

...But I don't mind moving it to the end if you prefer.

-- 
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/20130416/7c9a347d/attachment.asc>


More information about the ffmpeg-devel mailing list