L-SMASH-Works icon indicating copy to clipboard operation
L-SMASH-Works copied to clipboard

--enable-avresample is deprecated however L-SMASH-Works still depends on it

Open hydra3333 opened this issue 6 years ago • 5 comments

ffmpeg's --enable-avresample is deprecated, however L-SMASH-Works still depends on it, eg without --enable-avresample the following build error is thrown.

Would you please be able to fix this so it no longer depends on a deprecated ffmpeg build option ?

x86_64-w64-mingw32-gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -D__USE_MINGW_ANSI_STDIO=1 -I/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include  -fexcess-precision=fast -I/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include -c ../common/lwlibav_dec.c -o ../common/lwlibav_dec.o
x86_64-w64-mingw32-gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -D__USE_MINGW_ANSI_STDIO=1 -I/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include  -fexcess-precision=fast -I/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include -c ../common/lwlibav_video.c -o ../common/lwlibav_video.o
../common/lwlibav_dec.c: In function 'lwlibav_flush_buffers':
../common/lwlibav_dec.c:52:5: warning: 'refcounted_frames' is deprecated [-Wdeprecated-declarations]
     if( open_decoder( &ctx, codecpar, codec, dhp->ctx->thread_count, dhp->ctx->refcounted_frames ) < 0 )
     ^~
In file included from /home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/include/libavformat/avformat.h:319:0,
                 from ../common/lwlibav_dec.c:29:
/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/include/libavcodec/avcodec.h:2344:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
../common/lwlibav_dec.c: In function 'lwlibav_update_configuration':
../common/lwlibav_dec.c:90:5: warning: 'refcounted_frames' is deprecated [-Wdeprecated-declarations]
     const int          refcounted_frames = dhp->ctx->refcounted_frames;
     ^~~~~
In file included from /home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/include/libavformat/avformat.h:319:0,
                 from ../common/lwlibav_dec.c:29:
/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/include/libavcodec/avcodec.h:2344:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
x86_64-w64-mingw32-gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -D__USE_MINGW_ANSI_STDIO=1 
-I/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include  
-fexcess-precision=fast 
-I/home/u/Desktop/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include -c 
../common/lwlibav_audio.c -o 
../common/lwlibav_audio.o

../common/lwlibav_audio.c:31:10: fatal error: libavresample/avresample.h: No such file or directory
 #include <libavresample/avresample.h>   /* Resampler/Buffer */
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
GNUmakefile:27: recipe for target '../common/lwlibav_audio.o' failed
make: *** [../common/lwlibav_audio.o] Error 1
make: *** Waiting for unfinished jobs....
[02:03:18][ERROR] Error [2] running process: 'make  -j 2' in '/home/u/Desktop/workdir/x86_64/L-SMASH-Works_git/VapourSynth'

hydra3333 avatar Mar 31 '18 09:03 hydra3333

To support both ffmpeg and libav, I currently have plan to make a global configure and a global makefile, and a lib archiving objects consiting of source files in common directory.

VFR-maniac avatar Mar 31 '18 10:03 VFR-maniac

OK, thank you.

hydra3333 avatar Mar 31 '18 10:03 hydra3333

Hello, is there any progress on this? I still cannot build L-Smash for vapoursynth, same problem as OP.

make
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c lsmashsource.c -o lsmashsource.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c video_output.c -o video_output.o
video_output.c: In function ‘get_vs_output_pixel_format’:
video_output.c:263:13: warning: implicit declaration of function ‘strcasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
         if( strcasecmp( format_name, format_table[i].format_name ) == 0 )
             ^~~~~~~~~~
             strncmp
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c libavsmash_source.c -o libavsmash_source.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c lwlibav_source.c -o lwlibav_source.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c ../common/utils.c -o ../common/utils.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c ../common/qsv.c -o ../common/qsv.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c ../common/libavsmash.c -o ../common/libavsmash.o
../common/libavsmash.c: In function ‘libavsmash_open_file’:
../common/libavsmash.c:87:5: warning: ‘av_register_all’ is deprecated [-Wdeprecated-declarations]
     av_register_all();
     ^~~~~~~~~~~~~~~
In file included from ../common/libavsmash.c:33:
/usr/include/libavformat/avformat.h:2043:6: note: declared here
 void av_register_all(void);
      ^~~~~~~~~~~~~~~
../common/libavsmash.c:88:5: warning: ‘avcodec_register_all’ is deprecated [-Wdeprecated-declarations]
     avcodec_register_all();
     ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/libavformat/avformat.h:319,
                 from ../common/libavsmash.c:33:
/usr/include/libavcodec/avcodec.h:4102:6: note: declared here
 void avcodec_register_all(void);
      ^~~~~~~~~~~~~~~~~~~~
../common/libavsmash.c: In function ‘libavsmash_flush_buffers’:
../common/libavsmash.c:810:6: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
      || open_decoder( &ctx, codecpar, codec, config->ctx->thread_count, config->ctx->refcounted_frames ) < 0 )
      ^~
In file included from /usr/include/libavformat/avformat.h:319,
                 from ../common/libavsmash.c:33:
/usr/include/libavcodec/avcodec.h:2360:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
../common/libavsmash.c: In function ‘update_configuration’:
../common/libavsmash.c:860:5: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
     const int          refcounted_frames = config->ctx->refcounted_frames;
     ^~~~~
In file included from /usr/include/libavformat/avformat.h:319,
                 from ../common/libavsmash.c:33:
/usr/include/libavcodec/avcodec.h:2360:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c ../common/libavsmash_video.c -o ../common/libavsmash_video.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c ../common/lwlibav_dec.c -o ../common/lwlibav_dec.o
../common/lwlibav_dec.c: In function ‘lwlibav_flush_buffers’:
../common/lwlibav_dec.c:52:5: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
     if( open_decoder( &ctx, codecpar, codec, dhp->ctx->thread_count, dhp->ctx->refcounted_frames ) < 0 )
     ^~
In file included from /usr/include/libavformat/avformat.h:319,
                 from ../common/lwlibav_dec.c:29:
/usr/include/libavcodec/avcodec.h:2360:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
../common/lwlibav_dec.c: In function ‘lwlibav_update_configuration’:
../common/lwlibav_dec.c:90:5: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
     const int          refcounted_frames = dhp->ctx->refcounted_frames;
     ^~~~~
In file included from /usr/include/libavformat/avformat.h:319,
                 from ../common/lwlibav_dec.c:29:
/usr/include/libavcodec/avcodec.h:2360:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c ../common/lwlibav_video.c -o ../common/lwlibav_video.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include  -fexcess-precision=fast  -c ../common/lwlibav_audio.c -o ../common/lwlibav_audio.o
../common/lwlibav_audio.c:31:10: fatal error: libavresample/avresample.h: No such file or directory
 #include <libavresample/avresample.h>   /* Resampler/Buffer */
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [GNUmakefile:27: ../common/lwlibav_audio.o] Error 1

cronke99 avatar Nov 26 '18 02:11 cronke99

see https://github.com/VFR-maniac/L-SMASH-Works/pull/75#issuecomment-473813471

hydra3333 avatar Mar 18 '19 08:03 hydra3333

for this:

video_output.c:263:13: warning: implicit declaration of function ‘strcasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
         if( strcasecmp( format_name, format_table[i].format_name ) == 0 )
             ^~~~~~~~~~
             strncmp

is

diff --git a/VapourSynth/video_output.c b/VapourSynth/video_output.c
index 4599863..45a1fb0 100644
--- a/VapourSynth/video_output.c
+++ b/VapourSynth/video_output.c
@@ -20,7 +20,7 @@
 
 /* This file is available under an ISC license. */
 
-#include <string.h>
+#include <strings.h>
 
 /* Libav */
 #include <libavcodec/avcodec.h>         /* Decoder */

sl1pkn07 avatar Apr 14 '19 19:04 sl1pkn07