[FFmpeg-devel] Evolution of lavfi's design and API

Paul B Mahol onemda at gmail.com
Sat Sep 10 00:47:20 EEST 2016


On 9/4/16, Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Sun, Sep 04, 2016 at 10:16:57PM +0200, Nicolas George wrote:
>> Le nonidi 19 fructidor, an CCXXIV, Paul B Mahol a ecrit :
>> > And what would that cleaner implementation do?
>>
>> There is a rather simple implementation of format change in lavfi: have
>> on
>> each input a boolean flag "can_deal_with_format_change". If a frame with
>> a
>> different format arrives on a filter that does not have the flag, just
>> insert the scale/aresample filter on the link to force the format to be
>> the
>> same.
>>
>> It is not entirely optimal, but it is quite simple and does the work.
>>
>> And it could probably be implemented independently of my changes. But I
>> do
>> not want to spend time on it before finishing this, or it will never end.
>>
>> (Actually, I think we had something like that for buffersrc but it
>> disappeared at some time. avconv also has some very strange code to
>> handle
>> format changes.)
>
> we have a few filters that should work fine with format changes
> i would have assumed that still works
>
>
>>
>> > At current rate your lavfi changes will never get in, which sucks.
>>
>> Which is why I would like to be authorized to ignore this kind of
>> hiccups.
>> Format change does not currently work, this particular case used to work
>> only by chance. Can I break it and repair it later?
>
> I think there are 2 things
> First, filters simply supporting format changes without any magic or
> reinitialization,
> they just work if formats change. This should continue to be so
> but it also shouldnt really add any complication or am i missing
> something ?
> This was the type i was interrested in previously ... (until patch
> reviews made me loose interrest)
>
> Second, graph reinitialization, this is hard to get right and if its
> done right it still doesnt work for many usecases due to destroyed
> state.
> I dont think temporary worsening graph reinitialization is a problem
> but thats just my oppinion
>

So everybody agrees, we should proceed.


More information about the ffmpeg-devel mailing list