[FFmpeg-devel] [PATCH] avfilter/avfilter: add sample_count_in and sample_count_out

Paul B Mahol onemda at gmail.com
Wed Jun 3 18:33:06 EEST 2020


On 6/3/20, Nicolas George <george at nsup.org> wrote:
> Paul B Mahol (12020-06-03):
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>
>> To be used by latency filters.
>
> Re-submit when something use them.

Why so? Just to be beaten again by same person which would reject this
same patch.

Low effort patches are better because author will not lose much time
in pointless
discussion with same person again and again. Instead patch is either
accepted or rejected
and than author can concentrate on more important stuff.

The idea behind this patch is to use those counters to report via
filter metadata current latency in filtergraph. Eg. (a)latency filter
would be inserted in filtergraph and then it would report latency
between some points in filtergraph, or just single filter before it.

If all reviewers are fond of this idea then OK, if not I have other
things to do and can not
lose precious time in timeless pointless discussion with same bitter
persons again and again.

>
>> ---
>>  libavfilter/avfilter.h | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
>> index 49b4f7a939..8ebcb3eacc 100644
>> --- a/libavfilter/avfilter.h
>> +++ b/libavfilter/avfilter.h
>> @@ -582,6 +582,11 @@ struct AVFilterLink {
>>       */
>>      int64_t frame_count_in, frame_count_out;
>>
>> +    /**
>
>> +     * Number of past samples sent through the link.
>
> "Number of samples already sent through the link" seems more natural.

I copy pasted sentence for frames above. Should it be changed too?

>
>> +     */
>
>> +    int64_t sample_count_in, sample_count_out;
>
> Should be uint64_t.

Above frame counters are not unsigned. Why to do different.

>
>> +
>>      /**
>>       * A pointer to a FFFramePool struct.
>>       */
>
> --
>   Nicolas George
>


More information about the ffmpeg-devel mailing list