[FFmpeg-devel] [RFC] BSF list API

Marton Balint cus at passwd.hu
Sun Jun 12 15:33:12 CEST 2016

On Sun, 12 Jun 2016, Nicolas George wrote:

> Le quartidi 24 prairial, an CCXXIV, Marton Balint a écrit :
>> Maybe I am missing something, but as far as I see the alloc is due to the
>> alloc in ff_bsf_get_packet. We could create a similar function
>> ff_bsf_get_packet2(AVBSFContext *ctx, AVPacket *pkt) which does not allocate
>> a packet but simply moves the ref to pkt. Then this can be called with the
>> output packet pointer, so no allocation will be requried. And this function
>> can be used for performance sensitive places instead of the original.
> Indeed, maybe it is as simple as that.
>> I think we need to support both ways to configure the bsf list. What the tee
>> muxer, or ffmpeg.c would use, is the text based configuration, therefore
>> it's worth adding the capability of parsing such lists.
> That is exactly what I was suggesting.
>> So what we need, on top of what I proposed, is an additional API what you
>> proposed (av_bsf_list_append), and which can be used to add filters to the
>> list, after we allocated the list filter, but before we initialized it.
> No, definitely no. It must be the other way around. Building a text API on
> top of a programmatic is fairly common, building a programmatic API on top
> of a text API is bad design.

Bad wording on my part, I did not mean "on top of" API wise :). Agreed, 
surely the text parsing can use the av_bsf_list_append functions to do the 
actual work.


More information about the ffmpeg-devel mailing list