Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-10 Thread Muhammad Faiz
On Sun, Feb 11, 2018 at 6:37 AM, Michael Niedermayer
 wrote:
> On Sat, Feb 10, 2018 at 05:13:10PM +0700, Muhammad Faiz wrote:
>> On Sat, Feb 10, 2018 at 7:51 AM, Michael Niedermayer
>>  wrote:
>> > On Fri, Feb 09, 2018 at 10:21:04PM +0700, Muhammad Faiz wrote:
>> >> On Fri, Feb 9, 2018 at 6:53 PM, James Almer  wrote:
>> >> > On 2/9/2018 7:56 AM, Muhammad Faiz wrote:
>> >> >> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
>> >> >>  wrote:
>> >> >>> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
>> >>  Josh de Kock (2018-02-06):
>> >> > ffmpeg | branch: master | Josh de Kock  | Fri Dec 
>> >> > 22 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] 
>> >> > | committer: Josh de Kock
>> >> >
>> >> > lavc: add new API for iterating codecs and codec parsers
>> >> >
>> >> > Based on an unfinished patch by atomnuker.
>> >> >>>
>> >> >>> This commit also breaks
>> >> >>>
>> >> >>> ./configure --enable-libsoxr && make -j12 fate-checkasm
>> >> >>>  make -j12 fate-checkasm
>> >> >>>  ...
>> >> >>> LD  tests/checkasm/checkasm
>> >> >>> libswresample/libswresample.a(soxr_resample.o): In function 
>> >> >>> `get_out_samples':
>> >> >>> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to 
>> >> >>> `soxr_delay'
>> >> >>> libswresample/libswresample.a(soxr_resample.o): In function 
>> >> >>> `get_delay':
>> >> >>> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to 
>> >> >>> `soxr_delay'
>> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `flush':
>> >> >>> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to 
>> >> >>> `soxr_delay'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to 
>> >> >>> `soxr_process'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to 
>> >> >>> `soxr_process'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to 
>> >> >>> `soxr_delay'
>> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `process':
>> >> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>> >> >>> `soxr_set_num_channels'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>> >> >>> `soxr_set_error'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to 
>> >> >>> `soxr_process'
>> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `destroy':
>> >> >>> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to 
>> >> >>> `soxr_delete'
>> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `create':
>> >> >>> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to 
>> >> >>> `soxr_io_spec'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
>> >> >>> `soxr_quality_spec'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to 
>> >> >>> `soxr_delete'
>> >> >>> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to 
>> >> >>> `soxr_create'
>> >> >>> collect2: error: ld returned 1 exit status
>> >> >>> make: *** [tests/checkasm/checkasm] Error 1
>> >> >>
>> >> >> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1
>> >> >>
>> >> >> Thank's.
>> >> >
>> >> > This is not a proper solution. swr is pulled by avcodec only if Opus
>> >> > decoder is enabled. There's no reason to hardcode it for checkasm 
>> >> > otherwise.
>> >> > The problem here is that the Makefile should pull all the dependencies
>> >> > of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in
>> >> > common.mak to link the actual libraries.
>> >>
>> >> Probably, this is not a proper solution, but it is trivial enough.
>> >> (I'm sorry that I pushed it without posting).
>> >> So, please fix it with the proper solution. Probably, by adding
>> >> swresample-extralibs to avcodec-extralibs when avcodec has dependency
>> >> to swresample. I don't know how to do it.
>> >>
>> >
>> >> >
>> >> > That said, was this really a regression generated by this commit? It
>> >> > looks unrelated.
>> >>
>> >> Actually, it was a bug even before this commit. Just, previously it
>> >> was hidden because linker was smart enough to discard unneeded
>> >> dependency. But now when the list is changed to array, the linker is
>> >> unable to do it.
>> >
>> > iam not sure i understand correctly. But does this mean that
>> > tools/target_dec_"codec"_fuzzer will now include everything and not just
>> > the "codec" ?
>> > If so this will possibly prevent FFmpeg from being tested in googles 
>> > ossfuzz
>> > framework. As their diskspace was already rather tight.
>> >
>> > i do see on my disk that the more recently build fuzzers have gottem MUCH
>> > larger:
>> > -rwxr-x--- 1 michael michael  17588987 Feb  3 18:53 
>> > tools/target_dec_scpr_fuzzer*
>> > -rwxr-x--- 1 michael michael  17476326 Feb  4 02:16 
>> > 

Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-10 Thread Michael Niedermayer
On Sat, Feb 10, 2018 at 05:13:10PM +0700, Muhammad Faiz wrote:
> On Sat, Feb 10, 2018 at 7:51 AM, Michael Niedermayer
>  wrote:
> > On Fri, Feb 09, 2018 at 10:21:04PM +0700, Muhammad Faiz wrote:
> >> On Fri, Feb 9, 2018 at 6:53 PM, James Almer  wrote:
> >> > On 2/9/2018 7:56 AM, Muhammad Faiz wrote:
> >> >> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
> >> >>  wrote:
> >> >>> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
> >>  Josh de Kock (2018-02-06):
> >> > ffmpeg | branch: master | Josh de Kock  | Fri Dec 
> >> > 22 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
> >> > committer: Josh de Kock
> >> >
> >> > lavc: add new API for iterating codecs and codec parsers
> >> >
> >> > Based on an unfinished patch by atomnuker.
> >> >>>
> >> >>> This commit also breaks
> >> >>>
> >> >>> ./configure --enable-libsoxr && make -j12 fate-checkasm
> >> >>>  make -j12 fate-checkasm
> >> >>>  ...
> >> >>> LD  tests/checkasm/checkasm
> >> >>> libswresample/libswresample.a(soxr_resample.o): In function 
> >> >>> `get_out_samples':
> >> >>> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to 
> >> >>> `soxr_delay'
> >> >>> libswresample/libswresample.a(soxr_resample.o): In function 
> >> >>> `get_delay':
> >> >>> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to 
> >> >>> `soxr_delay'
> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `flush':
> >> >>> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to 
> >> >>> `soxr_delay'
> >> >>> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to 
> >> >>> `soxr_process'
> >> >>> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to 
> >> >>> `soxr_process'
> >> >>> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to 
> >> >>> `soxr_delay'
> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `process':
> >> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
> >> >>> `soxr_set_num_channels'
> >> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
> >> >>> `soxr_set_error'
> >> >>> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to 
> >> >>> `soxr_process'
> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `destroy':
> >> >>> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to 
> >> >>> `soxr_delete'
> >> >>> libswresample/libswresample.a(soxr_resample.o): In function `create':
> >> >>> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to 
> >> >>> `soxr_io_spec'
> >> >>> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
> >> >>> `soxr_quality_spec'
> >> >>> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to 
> >> >>> `soxr_delete'
> >> >>> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to 
> >> >>> `soxr_create'
> >> >>> collect2: error: ld returned 1 exit status
> >> >>> make: *** [tests/checkasm/checkasm] Error 1
> >> >>
> >> >> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1
> >> >>
> >> >> Thank's.
> >> >
> >> > This is not a proper solution. swr is pulled by avcodec only if Opus
> >> > decoder is enabled. There's no reason to hardcode it for checkasm 
> >> > otherwise.
> >> > The problem here is that the Makefile should pull all the dependencies
> >> > of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in
> >> > common.mak to link the actual libraries.
> >>
> >> Probably, this is not a proper solution, but it is trivial enough.
> >> (I'm sorry that I pushed it without posting).
> >> So, please fix it with the proper solution. Probably, by adding
> >> swresample-extralibs to avcodec-extralibs when avcodec has dependency
> >> to swresample. I don't know how to do it.
> >>
> >
> >> >
> >> > That said, was this really a regression generated by this commit? It
> >> > looks unrelated.
> >>
> >> Actually, it was a bug even before this commit. Just, previously it
> >> was hidden because linker was smart enough to discard unneeded
> >> dependency. But now when the list is changed to array, the linker is
> >> unable to do it.
> >
> > iam not sure i understand correctly. But does this mean that
> > tools/target_dec_"codec"_fuzzer will now include everything and not just
> > the "codec" ?
> > If so this will possibly prevent FFmpeg from being tested in googles ossfuzz
> > framework. As their diskspace was already rather tight.
> >
> > i do see on my disk that the more recently build fuzzers have gottem MUCH
> > larger:
> > -rwxr-x--- 1 michael michael  17588987 Feb  3 18:53 
> > tools/target_dec_scpr_fuzzer*
> > -rwxr-x--- 1 michael michael  17476326 Feb  4 02:16 
> > tools/target_dec_paf_video_fuzzer*
> > -rwxr-x--- 1 michael michael 143210465 Feb  9 13:53 
> > tools/target_dec_h264_fuzzer*
> > -rwxr-x--- 1 michael michael 143210465 Feb  9 13:56 
> > 

Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-10 Thread Muhammad Faiz
On Sat, Feb 10, 2018 at 7:51 AM, Michael Niedermayer
 wrote:
> On Fri, Feb 09, 2018 at 10:21:04PM +0700, Muhammad Faiz wrote:
>> On Fri, Feb 9, 2018 at 6:53 PM, James Almer  wrote:
>> > On 2/9/2018 7:56 AM, Muhammad Faiz wrote:
>> >> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
>> >>  wrote:
>> >>> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
>>  Josh de Kock (2018-02-06):
>> > ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
>> > 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
>> > committer: Josh de Kock
>> >
>> > lavc: add new API for iterating codecs and codec parsers
>> >
>> > Based on an unfinished patch by atomnuker.
>> >>>
>> >>> This commit also breaks
>> >>>
>> >>> ./configure --enable-libsoxr && make -j12 fate-checkasm
>> >>>  make -j12 fate-checkasm
>> >>>  ...
>> >>> LD  tests/checkasm/checkasm
>> >>> libswresample/libswresample.a(soxr_resample.o): In function 
>> >>> `get_out_samples':
>> >>> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to 
>> >>> `soxr_delay'
>> >>> libswresample/libswresample.a(soxr_resample.o): In function `get_delay':
>> >>> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to 
>> >>> `soxr_delay'
>> >>> libswresample/libswresample.a(soxr_resample.o): In function `flush':
>> >>> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to 
>> >>> `soxr_delay'
>> >>> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to 
>> >>> `soxr_process'
>> >>> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to 
>> >>> `soxr_process'
>> >>> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to 
>> >>> `soxr_delay'
>> >>> libswresample/libswresample.a(soxr_resample.o): In function `process':
>> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>> >>> `soxr_set_num_channels'
>> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>> >>> `soxr_set_error'
>> >>> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to 
>> >>> `soxr_process'
>> >>> libswresample/libswresample.a(soxr_resample.o): In function `destroy':
>> >>> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to 
>> >>> `soxr_delete'
>> >>> libswresample/libswresample.a(soxr_resample.o): In function `create':
>> >>> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to 
>> >>> `soxr_io_spec'
>> >>> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
>> >>> `soxr_quality_spec'
>> >>> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to 
>> >>> `soxr_delete'
>> >>> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to 
>> >>> `soxr_create'
>> >>> collect2: error: ld returned 1 exit status
>> >>> make: *** [tests/checkasm/checkasm] Error 1
>> >>
>> >> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1
>> >>
>> >> Thank's.
>> >
>> > This is not a proper solution. swr is pulled by avcodec only if Opus
>> > decoder is enabled. There's no reason to hardcode it for checkasm 
>> > otherwise.
>> > The problem here is that the Makefile should pull all the dependencies
>> > of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in
>> > common.mak to link the actual libraries.
>>
>> Probably, this is not a proper solution, but it is trivial enough.
>> (I'm sorry that I pushed it without posting).
>> So, please fix it with the proper solution. Probably, by adding
>> swresample-extralibs to avcodec-extralibs when avcodec has dependency
>> to swresample. I don't know how to do it.
>>
>
>> >
>> > That said, was this really a regression generated by this commit? It
>> > looks unrelated.
>>
>> Actually, it was a bug even before this commit. Just, previously it
>> was hidden because linker was smart enough to discard unneeded
>> dependency. But now when the list is changed to array, the linker is
>> unable to do it.
>
> iam not sure i understand correctly. But does this mean that
> tools/target_dec_"codec"_fuzzer will now include everything and not just
> the "codec" ?
> If so this will possibly prevent FFmpeg from being tested in googles ossfuzz
> framework. As their diskspace was already rather tight.
>
> i do see on my disk that the more recently build fuzzers have gottem MUCH
> larger:
> -rwxr-x--- 1 michael michael  17588987 Feb  3 18:53 
> tools/target_dec_scpr_fuzzer*
> -rwxr-x--- 1 michael michael  17476326 Feb  4 02:16 
> tools/target_dec_paf_video_fuzzer*
> -rwxr-x--- 1 michael michael 143210465 Feb  9 13:53 
> tools/target_dec_h264_fuzzer*
> -rwxr-x--- 1 michael michael 143210465 Feb  9 13:56 
> tools/target_dec_vp3_fuzzer*
>

Does the attached patch fix the problem?

Thank's.
From 46d5a15dba7578d312aae59048ad608c9afdacbf Mon Sep 17 00:00:00 2001
From: Muhammad Faiz 
Date: Sat, 10 Feb 2018 17:08:04 +0700
Subject: [PATCH] tools/target_dec_fuzzer: don't use avcodec_register()


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-09 Thread Michael Niedermayer
On Fri, Feb 09, 2018 at 10:21:04PM +0700, Muhammad Faiz wrote:
> On Fri, Feb 9, 2018 at 6:53 PM, James Almer  wrote:
> > On 2/9/2018 7:56 AM, Muhammad Faiz wrote:
> >> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
> >>  wrote:
> >>> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
>  Josh de Kock (2018-02-06):
> > ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
> > 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
> > committer: Josh de Kock
> >
> > lavc: add new API for iterating codecs and codec parsers
> >
> > Based on an unfinished patch by atomnuker.
> >>>
> >>> This commit also breaks
> >>>
> >>> ./configure --enable-libsoxr && make -j12 fate-checkasm
> >>>  make -j12 fate-checkasm
> >>>  ...
> >>> LD  tests/checkasm/checkasm
> >>> libswresample/libswresample.a(soxr_resample.o): In function 
> >>> `get_out_samples':
> >>> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to 
> >>> `soxr_delay'
> >>> libswresample/libswresample.a(soxr_resample.o): In function `get_delay':
> >>> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to 
> >>> `soxr_delay'
> >>> libswresample/libswresample.a(soxr_resample.o): In function `flush':
> >>> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to 
> >>> `soxr_delay'
> >>> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to 
> >>> `soxr_process'
> >>> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to 
> >>> `soxr_process'
> >>> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to 
> >>> `soxr_delay'
> >>> libswresample/libswresample.a(soxr_resample.o): In function `process':
> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
> >>> `soxr_set_num_channels'
> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
> >>> `soxr_set_error'
> >>> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to 
> >>> `soxr_process'
> >>> libswresample/libswresample.a(soxr_resample.o): In function `destroy':
> >>> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to 
> >>> `soxr_delete'
> >>> libswresample/libswresample.a(soxr_resample.o): In function `create':
> >>> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to 
> >>> `soxr_io_spec'
> >>> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
> >>> `soxr_quality_spec'
> >>> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to 
> >>> `soxr_delete'
> >>> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to 
> >>> `soxr_create'
> >>> collect2: error: ld returned 1 exit status
> >>> make: *** [tests/checkasm/checkasm] Error 1
> >>
> >> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1
> >>
> >> Thank's.
> >
> > This is not a proper solution. swr is pulled by avcodec only if Opus
> > decoder is enabled. There's no reason to hardcode it for checkasm otherwise.
> > The problem here is that the Makefile should pull all the dependencies
> > of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in
> > common.mak to link the actual libraries.
> 
> Probably, this is not a proper solution, but it is trivial enough.
> (I'm sorry that I pushed it without posting).
> So, please fix it with the proper solution. Probably, by adding
> swresample-extralibs to avcodec-extralibs when avcodec has dependency
> to swresample. I don't know how to do it.
> 

> >
> > That said, was this really a regression generated by this commit? It
> > looks unrelated.
> 
> Actually, it was a bug even before this commit. Just, previously it
> was hidden because linker was smart enough to discard unneeded
> dependency. But now when the list is changed to array, the linker is
> unable to do it.

iam not sure i understand correctly. But does this mean that 
tools/target_dec_"codec"_fuzzer will now include everything and not just
the "codec" ?
If so this will possibly prevent FFmpeg from being tested in googles ossfuzz
framework. As their diskspace was already rather tight.

i do see on my disk that the more recently build fuzzers have gottem MUCH
larger:
-rwxr-x--- 1 michael michael  17588987 Feb  3 18:53 
tools/target_dec_scpr_fuzzer*
-rwxr-x--- 1 michael michael  17476326 Feb  4 02:16 
tools/target_dec_paf_video_fuzzer*
-rwxr-x--- 1 michael michael 143210465 Feb  9 13:53 
tools/target_dec_h264_fuzzer*
-rwxr-x--- 1 michael michael 143210465 Feb  9 13:56 tools/target_dec_vp3_fuzzer*

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-09 Thread Muhammad Faiz
On Fri, Feb 9, 2018 at 6:12 PM, Nicolas George  wrote:
> Muhammad Faiz (2018-02-08):
>> I actually prefer _next() without introducing new API. Yeah, it is
>> slower because it must initialize next pointer
>
> I am not sure what you mean here. The problem with initing the next
> pointer was never speed.
>
> The problem with the next pointer is that it requires a run-time write
> in the codec structure, that requires it to be in the data section
> instead of the rodata section.

This is what I mean "speed" (Don't forget we also need to call
ff_thread_once on every _next() call).

>
> The static init of this pointer, as you proposed, fixes that specific
> issue.
>
> But that is still a linked list. Linked lists are very good when you
> need to insert and remove in the list frequently, but for something that
> is built once and then static, it has very limited usefulness.

I dislike that we introduce new API just because it is "slightly"
better than old API.
Also, migrating to new API isn't trivial enough (see cmdutils.c problem).

>
> If the drawback of memory management for solution C (returning the whole
> list at once) is considered too bad, then I think solution B is
> preferable: more versatile, easier to understand.

If we really need to introduce new API, I also choose B. (Unless we
have a plan to make
the array become linked list again in the future).

Actually, I don't care so much about this. I will follow what people agree.

>
> And by the way, until we decide between solutions A, B, C or anything
> else proposed, starting coding would be useless. Just as starting to
> pack your bags before deciding whether you go to the sea or mountain.

Except for fixing regression.

Thank's.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-09 Thread James Almer
On 2/9/2018 12:21 PM, Muhammad Faiz wrote:
> On Fri, Feb 9, 2018 at 6:53 PM, James Almer  wrote:
>> On 2/9/2018 7:56 AM, Muhammad Faiz wrote:
>>> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
>>>  wrote:
 On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
> Josh de Kock (2018-02-06):
>> ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
>> 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
>> committer: Josh de Kock
>>
>> lavc: add new API for iterating codecs and codec parsers
>>
>> Based on an unfinished patch by atomnuker.

 This commit also breaks

 ./configure --enable-libsoxr && make -j12 fate-checkasm
  make -j12 fate-checkasm
  ...
 LD  tests/checkasm/checkasm
 libswresample/libswresample.a(soxr_resample.o): In function 
 `get_out_samples':
 ffmpeg/libswresample/soxr_resample.c:118: undefined reference to 
 `soxr_delay'
 libswresample/libswresample.a(soxr_resample.o): In function `get_delay':
 ffmpeg/libswresample/soxr_resample.c:100: undefined reference to 
 `soxr_delay'
 libswresample/libswresample.a(soxr_resample.o): In function `flush':
 ffmpeg/libswresample/soxr_resample.c:70: undefined reference to 
 `soxr_delay'
 ffmpeg/libswresample/soxr_resample.c:72: undefined reference to 
 `soxr_process'
 ffmpeg/libswresample/soxr_resample.c:77: undefined reference to 
 `soxr_process'
 ffmpeg/libswresample/soxr_resample.c:78: undefined reference to 
 `soxr_delay'
 libswresample/libswresample.a(soxr_resample.o): In function `process':
 ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
 `soxr_set_num_channels'
 ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
 `soxr_set_error'
 ffmpeg/libswresample/soxr_resample.c:90: undefined reference to 
 `soxr_process'
 libswresample/libswresample.a(soxr_resample.o): In function `destroy':
 ffmpeg/libswresample/soxr_resample.c:65: undefined reference to 
 `soxr_delete'
 libswresample/libswresample.a(soxr_resample.o): In function `create':
 ffmpeg/libswresample/soxr_resample.c:46: undefined reference to 
 `soxr_io_spec'
 ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
 `soxr_quality_spec'
 ffmpeg/libswresample/soxr_resample.c:56: undefined reference to 
 `soxr_delete'
 ffmpeg/libswresample/soxr_resample.c:57: undefined reference to 
 `soxr_create'
 collect2: error: ld returned 1 exit status
 make: *** [tests/checkasm/checkasm] Error 1
>>>
>>> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1
>>>
>>> Thank's.
>>
>> This is not a proper solution. swr is pulled by avcodec only if Opus
>> decoder is enabled. There's no reason to hardcode it for checkasm otherwise.
>> The problem here is that the Makefile should pull all the dependencies
>> of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in
>> common.mak to link the actual libraries.
> 
> Probably, this is not a proper solution, but it is trivial enough.
> (I'm sorry that I pushed it without posting).

It's a trivial change that does the job of fixing the regression, so
it's fine.

> So, please fix it with the proper solution. Probably, by adding
> swresample-extralibs to avcodec-extralibs when avcodec has dependency
> to swresample. I don't know how to do it.

I guess the best way is with Makefile magic, like i mentioned FFLIBS and
FFXEXTRALIBS do for each library.
I'll take a look at it later.

> 
>>
>> That said, was this really a regression generated by this commit? It
>> looks unrelated.
> 
> Actually, it was a bug even before this commit. Just, previously it
> was hidden because linker was smart enough to discard unneeded
> dependency. But now when the list is changed to array, the linker is
> unable to do it.
> 
> Thank's.
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-09 Thread Muhammad Faiz
On Fri, Feb 9, 2018 at 6:53 PM, James Almer  wrote:
> On 2/9/2018 7:56 AM, Muhammad Faiz wrote:
>> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
>>  wrote:
>>> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
 Josh de Kock (2018-02-06):
> ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
> 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
> committer: Josh de Kock
>
> lavc: add new API for iterating codecs and codec parsers
>
> Based on an unfinished patch by atomnuker.
>>>
>>> This commit also breaks
>>>
>>> ./configure --enable-libsoxr && make -j12 fate-checkasm
>>>  make -j12 fate-checkasm
>>>  ...
>>> LD  tests/checkasm/checkasm
>>> libswresample/libswresample.a(soxr_resample.o): In function 
>>> `get_out_samples':
>>> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to 
>>> `soxr_delay'
>>> libswresample/libswresample.a(soxr_resample.o): In function `get_delay':
>>> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to 
>>> `soxr_delay'
>>> libswresample/libswresample.a(soxr_resample.o): In function `flush':
>>> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to `soxr_delay'
>>> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to 
>>> `soxr_process'
>>> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to 
>>> `soxr_process'
>>> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to `soxr_delay'
>>> libswresample/libswresample.a(soxr_resample.o): In function `process':
>>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>>> `soxr_set_num_channels'
>>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>>> `soxr_set_error'
>>> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to 
>>> `soxr_process'
>>> libswresample/libswresample.a(soxr_resample.o): In function `destroy':
>>> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to 
>>> `soxr_delete'
>>> libswresample/libswresample.a(soxr_resample.o): In function `create':
>>> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to 
>>> `soxr_io_spec'
>>> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
>>> `soxr_quality_spec'
>>> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to 
>>> `soxr_delete'
>>> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to 
>>> `soxr_create'
>>> collect2: error: ld returned 1 exit status
>>> make: *** [tests/checkasm/checkasm] Error 1
>>
>> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1
>>
>> Thank's.
>
> This is not a proper solution. swr is pulled by avcodec only if Opus
> decoder is enabled. There's no reason to hardcode it for checkasm otherwise.
> The problem here is that the Makefile should pull all the dependencies
> of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in
> common.mak to link the actual libraries.

Probably, this is not a proper solution, but it is trivial enough.
(I'm sorry that I pushed it without posting).
So, please fix it with the proper solution. Probably, by adding
swresample-extralibs to avcodec-extralibs when avcodec has dependency
to swresample. I don't know how to do it.

>
> That said, was this really a regression generated by this commit? It
> looks unrelated.

Actually, it was a bug even before this commit. Just, previously it
was hidden because linker was smart enough to discard unneeded
dependency. But now when the list is changed to array, the linker is
unable to do it.

Thank's.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-09 Thread James Almer
On 2/9/2018 7:56 AM, Muhammad Faiz wrote:
> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
>  wrote:
>> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
>>> Josh de Kock (2018-02-06):
 ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
 committer: Josh de Kock

 lavc: add new API for iterating codecs and codec parsers

 Based on an unfinished patch by atomnuker.
>>
>> This commit also breaks
>>
>> ./configure --enable-libsoxr && make -j12 fate-checkasm
>>  make -j12 fate-checkasm
>>  ...
>> LD  tests/checkasm/checkasm
>> libswresample/libswresample.a(soxr_resample.o): In function 
>> `get_out_samples':
>> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to `soxr_delay'
>> libswresample/libswresample.a(soxr_resample.o): In function `get_delay':
>> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to `soxr_delay'
>> libswresample/libswresample.a(soxr_resample.o): In function `flush':
>> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to `soxr_delay'
>> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to 
>> `soxr_process'
>> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to 
>> `soxr_process'
>> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to `soxr_delay'
>> libswresample/libswresample.a(soxr_resample.o): In function `process':
>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>> `soxr_set_num_channels'
>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
>> `soxr_set_error'
>> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to 
>> `soxr_process'
>> libswresample/libswresample.a(soxr_resample.o): In function `destroy':
>> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to `soxr_delete'
>> libswresample/libswresample.a(soxr_resample.o): In function `create':
>> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to 
>> `soxr_io_spec'
>> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
>> `soxr_quality_spec'
>> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to `soxr_delete'
>> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to `soxr_create'
>> collect2: error: ld returned 1 exit status
>> make: *** [tests/checkasm/checkasm] Error 1
> 
> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1
> 
> Thank's.

This is not a proper solution. swr is pulled by avcodec only if Opus
decoder is enabled. There's no reason to hardcode it for checkasm otherwise.
The problem here is that the Makefile should pull all the dependencies
of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in
common.mak to link the actual libraries.

That said, was this really a regression generated by this commit? It
looks unrelated.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-09 Thread Nicolas George
Muhammad Faiz (2018-02-08):
> I actually prefer _next() without introducing new API. Yeah, it is
> slower because it must initialize next pointer

I am not sure what you mean here. The problem with initing the next
pointer was never speed.

The problem with the next pointer is that it requires a run-time write
in the codec structure, that requires it to be in the data section
instead of the rodata section.

The static init of this pointer, as you proposed, fixes that specific
issue.

But that is still a linked list. Linked lists are very good when you
need to insert and remove in the list frequently, but for something that
is built once and then static, it has very limited usefulness.

If the drawback of memory management for solution C (returning the whole
list at once) is considered too bad, then I think solution B is
preferable: more versatile, easier to understand.

And by the way, until we decide between solutions A, B, C or anything
else proposed, starting coding would be useless. Just as starting to
pack your bags before deciding whether you go to the sea or mountain.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-09 Thread Muhammad Faiz
On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer
 wrote:
> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
>> Josh de Kock (2018-02-06):
>> > ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
>> > 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
>> > committer: Josh de Kock
>> >
>> > lavc: add new API for iterating codecs and codec parsers
>> >
>> > Based on an unfinished patch by atomnuker.
>
> This commit also breaks
>
> ./configure --enable-libsoxr && make -j12 fate-checkasm
>  make -j12 fate-checkasm
>  ...
> LD  tests/checkasm/checkasm
> libswresample/libswresample.a(soxr_resample.o): In function `get_out_samples':
> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to `soxr_delay'
> libswresample/libswresample.a(soxr_resample.o): In function `get_delay':
> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to `soxr_delay'
> libswresample/libswresample.a(soxr_resample.o): In function `flush':
> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to `soxr_delay'
> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to `soxr_process'
> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to `soxr_process'
> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to `soxr_delay'
> libswresample/libswresample.a(soxr_resample.o): In function `process':
> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
> `soxr_set_num_channels'
> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
> `soxr_set_error'
> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to `soxr_process'
> libswresample/libswresample.a(soxr_resample.o): In function `destroy':
> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to `soxr_delete'
> libswresample/libswresample.a(soxr_resample.o): In function `create':
> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to `soxr_io_spec'
> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
> `soxr_quality_spec'
> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to `soxr_delete'
> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to `soxr_create'
> collect2: error: ld returned 1 exit status
> make: *** [tests/checkasm/checkasm] Error 1

Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1

Thank's.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-07 Thread Muhammad Faiz
On Thu, Feb 8, 2018 at 1:33 AM, Nicolas George  wrote:
> James Almer (2018-02-07):
>> Since reverting would be dirty, I'd prefer if we keep the discussion
>> about the desired API going and then apply the needed patches on top of
>> the current tree.
>> As long as we don't take weeks to do it (and do it before a release is
>> tagged), any kind of change to what is already committed is ok.
>
> Yes, that is exactly what I meant with "virtually revoked". Let us hope
> people will not start using the API before we stabilize it.
>
> But I would like that people be more careful with it. Twice in a few
> days have patches been pushed while there were outstanding objections
> about the API. If it had been done on purpose, I think it would have
> been ground for revoking git commit rights.
>
> Now, as for the possible APIs for iterating:
>
> (A) this one using an opaque pointer and a _next() call;
>
> (B) using an index;
>
> (C) returning the whole list at once in a newly allocated array.
>
> Are there any missing?
>
> I am rather in favour of (C), because it is the one that puts the least
> constraint on the internal implementation. And it is very convenient for
> the caller.

I actually prefer _next() without introducing new API. Yeah, it is
slower because it must initialize next pointer (people seem dislike
the patch that fixes it (i.e. with ff_next things)). But, as long as
the internal doesn't use it but uses list directly, it has no
problems.

If speed is really a concern for users, then (B) probably is an option.

Thank's.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-07 Thread Michael Niedermayer
On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote:
> Josh de Kock (2018-02-06):
> > ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
> > 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | 
> > committer: Josh de Kock
> > 
> > lavc: add new API for iterating codecs and codec parsers
> > 
> > Based on an unfinished patch by atomnuker.

This commit also breaks 

./configure --enable-libsoxr && make -j12 fate-checkasm
 make -j12 fate-checkasm
 ...
LD  tests/checkasm/checkasm
libswresample/libswresample.a(soxr_resample.o): In function `get_out_samples':
ffmpeg/libswresample/soxr_resample.c:118: undefined reference to `soxr_delay'
libswresample/libswresample.a(soxr_resample.o): In function `get_delay':
ffmpeg/libswresample/soxr_resample.c:100: undefined reference to `soxr_delay'
libswresample/libswresample.a(soxr_resample.o): In function `flush':
ffmpeg/libswresample/soxr_resample.c:70: undefined reference to `soxr_delay'
ffmpeg/libswresample/soxr_resample.c:72: undefined reference to `soxr_process'
ffmpeg/libswresample/soxr_resample.c:77: undefined reference to `soxr_process'
ffmpeg/libswresample/soxr_resample.c:78: undefined reference to `soxr_delay'
libswresample/libswresample.a(soxr_resample.o): In function `process':
ffmpeg/libswresample/soxr_resample.c:88: undefined reference to 
`soxr_set_num_channels'
ffmpeg/libswresample/soxr_resample.c:88: undefined reference to `soxr_set_error'
ffmpeg/libswresample/soxr_resample.c:90: undefined reference to `soxr_process'
libswresample/libswresample.a(soxr_resample.o): In function `destroy':
ffmpeg/libswresample/soxr_resample.c:65: undefined reference to `soxr_delete'
libswresample/libswresample.a(soxr_resample.o): In function `create':
ffmpeg/libswresample/soxr_resample.c:46: undefined reference to `soxr_io_spec'
ffmpeg/libswresample/soxr_resample.c:48: undefined reference to 
`soxr_quality_spec'
ffmpeg/libswresample/soxr_resample.c:56: undefined reference to `soxr_delete'
ffmpeg/libswresample/soxr_resample.c:57: undefined reference to `soxr_create'
collect2: error: ld returned 1 exit status
make: *** [tests/checkasm/checkasm] Error 1

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-07 Thread wm4
On Wed, 7 Feb 2018 19:33:15 +0100
Nicolas George  wrote:

> James Almer (2018-02-07):
> > Since reverting would be dirty, I'd prefer if we keep the discussion
> > about the desired API going and then apply the needed patches on top of
> > the current tree.
> > As long as we don't take weeks to do it (and do it before a release is
> > tagged), any kind of change to what is already committed is ok.  
> 
> Yes, that is exactly what I meant with "virtually revoked". Let us hope
> people will not start using the API before we stabilize it.
> 
> But I would like that people be more careful with it. Twice in a few
> days have patches been pushed while there were outstanding objections
> about the API. If it had been done on purpose, I think it would have
> been ground for revoking git commit rights.
> 
> Now, as for the possible APIs for iterating:
> 
> (A) this one using an opaque pointer and a _next() call;
> 
> (B) using an index;
> 
> (C) returning the whole list at once in a newly allocated array.
> 
> Are there any missing?
> 
> I am rather in favour of (C), because it is the one that puts the least
> constraint on the internal implementation. And it is very convenient for
> the caller.

It's the least convenient for both caller and implementation, because
suddenly there's a cost associated with getting the list, and the
possibility that getting the list can fail. Speaking as someone who has
to use the new API.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-07 Thread Nicolas George
James Almer (2018-02-07):
> Since reverting would be dirty, I'd prefer if we keep the discussion
> about the desired API going and then apply the needed patches on top of
> the current tree.
> As long as we don't take weeks to do it (and do it before a release is
> tagged), any kind of change to what is already committed is ok.

Yes, that is exactly what I meant with "virtually revoked". Let us hope
people will not start using the API before we stabilize it.

But I would like that people be more careful with it. Twice in a few
days have patches been pushed while there were outstanding objections
about the API. If it had been done on purpose, I think it would have
been ground for revoking git commit rights.

Now, as for the possible APIs for iterating:

(A) this one using an opaque pointer and a _next() call;

(B) using an index;

(C) returning the whole list at once in a newly allocated array.

Are there any missing?

I am rather in favour of (C), because it is the one that puts the least
constraint on the internal implementation. And it is very convenient for
the caller.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-07 Thread James Almer
On 2/7/2018 9:52 AM, Nicolas George wrote:
> Josh de Kock (2018-02-06):
>> ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
>> 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | committer: 
>> Josh de Kock
>>
>> lavc: add new API for iterating codecs and codec parsers
>>
>> Based on an unfinished patch by atomnuker.
> 
> Why was this pushed when there was no consensus about the API?
> 
> Please consider this is virtually reverted.
> 
> Regards,

Since reverting would be dirty, I'd prefer if we keep the discussion
about the desired API going and then apply the needed patches on top of
the current tree.
As long as we don't take weeks to do it (and do it before a release is
tagged), any kind of change to what is already committed is ok.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers

2018-02-07 Thread Nicolas George
Josh de Kock (2018-02-06):
> ffmpeg | branch: master | Josh de Kock  | Fri Dec 22 
> 22:17:00 2017 +| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | committer: 
> Josh de Kock
> 
> lavc: add new API for iterating codecs and codec parsers
> 
> Based on an unfinished patch by atomnuker.

Why was this pushed when there was no consensus about the API?

Please consider this is virtually reverted.

Regards,

-- 
  Nicolas George
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel