Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hydra3333 opened this issue Mar 31, 2018 · 5 comments

Comments

@hydra3333
Copy link
Contributor

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'
@VFR-maniac
Copy link
Owner

VFR-maniac commented Mar 31, 2018

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.

@hydra3333
Copy link
Contributor Author

OK, thank you.

@cronke99
Copy link

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

@hydra3333
Copy link
Contributor Author

see #75 (comment)

@sl1pkn07
Copy link
Contributor

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 */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants