[FFmpeg-devel] [PATCH v3] fate: add api-h264-slice test

Hendrik Leppkes h.leppkes at gmail.com
Sat Oct 13 21:30:27 EEST 2018


On Sat, Oct 13, 2018 at 8:28 PM Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>
> On Sat, Oct 13, 2018 at 8:26 PM Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> >
> > On Fri, Oct 12, 2018 at 02:35:04PM +0100, joshdk at ob-encoder.com wrote:
> > > From: Josh de Kock <joshdk at obe.tv>
> > >
> > > This test ensures that you are able to send N number of slice NALUs in slice threaded mode to be decoded simultaneously
> > > ---
> > >
> > >  Ignore the previous patch, had some dead code in it. This now
> > >  works in MinGW as well.
> > >
> > >  tests/api/Makefile              |   1 +
> > >  tests/api/api-h264-slice-test.c | 207 +++++++++++++++++++++
> > >  tests/fate/api.mak              |   4 +
> > >  tests/ref/fate/api-h264-slice   | 309 ++++++++++++++++++++++++++++++++
> > >  4 files changed, 521 insertions(+)
> > >  create mode 100644 tests/api/api-h264-slice-test.c
> > >  create mode 100644 tests/ref/fate/api-h264-slice
> >
> > fails to build on linux
> > make -j12 fate-api-h264-slice
> > ...
> > tests/api/api-h264-slice-test.c: In function ‘main’:
> > tests/api/api-h264-slice-test.c:125:5: error: implicit declaration of function ‘setmode’ [-Werror=implicit-function-declaration]
> >      setmode(fileno(stdout), O_BINARY);
> >      ^
> > tests/api/api-h264-slice-test.c:125:29: error: ‘O_BINARY’ undeclared (first use in this function)
> >      setmode(fileno(stdout), O_BINARY);
> >                              ^
> > tests/api/api-h264-slice-test.c:125:29: note: each undeclared identifier is reported only once for each function it appears in
> > cc1: some warnings being treated as errors
> > make: *** [tests/api/api-h264-slice-test.o] Error 1
> > make: *** Waiting for unfinished jobs....
> >
>
> Probably need to include unistd.h. Note: unistd.h is not present
> everywhere, use the config.h define for it!
>
> #if HAVE_UNISTD_H
> #include <unistd.h>
> #endif
>

Or possibly io.h, apparently it varies on different systems. We also
have HAVE_IO_H.

Realistically its only needed on windows, my original recommendating
was to only use it there, but apparently that was missed when I
suggested that solution.

- Hendrik


More information about the ffmpeg-devel mailing list