[FFmpeg-soc] Trying to write a new filter but unclear on callback order

Brandon Mintern bmintern at gmail.com
Wed Mar 31 06:46:16 CEST 2010


On Tue, Mar 30, 2010 at 8:15 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> 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.)

I will be using gdb and looking at my code more closely. I just
finished up a fade filter that I'm pretty happy with, so I'm off to
bed now. I've already made new changes to vf_clone.c, so don't feel
the need to go over my patch until at least after I reply again.


More information about the FFmpeg-soc mailing list