[FFmpeg-soc] Trying to write a new filter but unclear on callback order
Stefano Sabatini
stefano.sabatini-lala at poste.it
Wed Mar 31 02:15:38 CEST 2010
On date Tuesday 2010-03-30 17:15:04 -0400, Brandon Mintern encoded:
> On Sat, Mar 27, 2010 at 9:27 AM, Stefano Sabatini
> <stefano.sabatini-lala at poste.it> wrote:
> > On date Saturday 2010-03-27 07:46:26 -0400, Brandon Mintern encoded:
> >> I'm trying to build a filter called "clone" (as discussed with Vitor
> >> on #ffmpeg-devel). I was modeling my filter after fifo, but apparently
> >> I'm wrong about the callback process (sidenote: a more detailed
> >> explanation in the wiki documentation would be very helpful!). I think
> >> I'm reasonably close with the code I have, but I can't finish it until
> >> I better understand the callback order in the filter chain. I would
> >> appreciate it if someone could point me in the write direction.
> >
> > Quick reply as I don't have much time at this moment: enable the DEBUG
> > symbol in avfilter.c and use -logleve debug, that should show you when
> > every callback is called and understand how the filterchain processing
> > stuff works.
>
> Thank you for this tip. I made a lot of changes after checking out
> vf_fps.c, tried your DEBUG tip, and the first function I see being
> called is request_frame. This seemed incorrect (shouldn't at least
> init() be called first?), so I added av_log(..., AV_LOG_DEBUG, ...)
> messages to the beginning and end of all my functions. It turns out
> that for some reason, init really isn't being called, which helps
> explain the current Segmentation fault that I'm running into.
>
> I think that for now I'll move onto something easier (vf_fade.c), but
> if someone wouldn't mind taking a look at what I've done I would
> really appreciate it. I really can't figure out what's wrong now. The
> following patch:
>
> http://bmintern.homeunix.com/~brandon/vf_clone.patch
I can assure you that init is called.
At this point I recommend you to use gdb, that will make things *lots*
easier.
(I'll have a deeper look at the patch tomorrow evening or later.)
> is the result of running "svn diff" against the latest libavfilter
> (revision 5726). I guess if I don't hear anything soon, I'll write a
> simpler "vf_frame.c" which will simply output a single given frame a
> specified number of times (rather than a sequence of frames) and see
> if maybe I can get that working.
>
> > And thanks for the contribution. BTW if you're a student and
> > interested we have a libavfilter GSoC task just waiting for you, or
> > for any interested student.
>
> Unfortunately I'm no longer a student. Otherwise I would be *very* interested.
Too bad.
Regards.
More information about the FFmpeg-soc
mailing list