dubhater / D2VWitch

Cross-platform D2V creator
36 stars 6 forks source link

Fail to build with ffmpeg 5 #10

Open marillat opened 2 years ago

marillat commented 2 years ago

Debian unstable amd64 ffmpeg 5.0

ccache c++ -Id2vwitch.p -I. -I.. -I/usr/include/vapoursynth -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -g -O2 -ffile-prefix-map=/build/d2vwitch-dmo-5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -fPIC '-DPACKAGE_VERSION="5"' -Wall -Wextra -Wshadow -MD -MQ d2vwitch.p/src_FFMPEG.cpp.o -MF d2vwitch.p/src_FFMPEG.cpp.o.d -o d2vwitch.p/src_FFMPEG.cpp.o -c ../src/FFMPEG.cpp
../src/FFMPEG.cpp: In member function 'bool FFMPEG::initVideoCodec(int)':
../src/FFMPEG.cpp:99:61: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
   99 |     AVCodecID video_codec_id = fctx->streams[stream_index]->codec->codec_id;
      |                                                             ^~~~~
../src/FFMPEG.cpp:101:35: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive]
  101 |     avcodec = avcodec_find_decoder(video_codec_id);
      |               ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      |                                   |
      |                                   const AVCodec*
../src/FFMPEG.cpp:114:66: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  114 |     if (avcodec_copy_context(avctx, fctx->streams[stream_index]->codec) < 0) {
      |                                                                  ^~~~~
../src/FFMPEG.cpp:114:9: error: 'avcodec_copy_context' was not declared in this scope; did you mean 'avcodec_free_context'?
  114 |     if (avcodec_copy_context(avctx, fctx->streams[stream_index]->codec) < 0) {
      |         ^~~~~~~~~~~~~~~~~~~~
      |         avcodec_free_context
../src/FFMPEG.cpp: In member function 'bool FFMPEG::initAudioCodec(int)':
../src/FFMPEG.cpp:138:60: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  138 |     if (codecIDRequiresWave64(fctx->streams[stream_index]->codec->codec_id)) {
      |                                                            ^~~~~
../src/FFMPEG.cpp:145:68: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  145 |         if (avcodec_copy_context(ctx, fctx->streams[stream_index]->codec) < 0) {
      |                                                                    ^~~~~
../src/FFMPEG.cpp:145:13: error: 'avcodec_copy_context' was not declared in this scope; did you mean 'avcodec_free_context'?
  145 |         if (avcodec_copy_context(ctx, fctx->streams[stream_index]->codec) < 0) {
      |             ^~~~~~~~~~~~~~~~~~~~
      |             avcodec_free_context
../src/FFMPEG.cpp:150:84: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  150 |         AVCodec *audio_decoder = avcodec_find_decoder(fctx->streams[stream_index]->codec->codec_id);
      |                                                                                    ^~~~~
../src/FFMPEG.cpp:153:68: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  153 |             error += avcodec_get_name(fctx->streams[stream_index]->codec->codec_id);
      |                                                                    ^~~~~
../src/FFMPEG.cpp: In member function 'AVStream* FFMPEG::selectVideoStreamById(int)':
../src/FFMPEG.cpp:212:31: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  212 |         if (fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
      |                               ^~~~~
../src/FFMPEG.cpp: In member function 'AVStream* FFMPEG::selectFirstVideoStream()':
../src/FFMPEG.cpp:226:31: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  226 |         if (fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
      |                               ^~~~~
../src/FFMPEG.cpp: In member function 'bool FFMPEG::selectAudioStreamsById(std::vector<int>&)':
../src/FFMPEG.cpp:238:31: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  238 |         if (fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
      |                               ^~~~~
../src/FFMPEG.cpp: In member function 'bool FFMPEG::selectAllAudioStreams()':
../src/FFMPEG.cpp:257:31: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  257 |         if (fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
      |                               ^~~~~
[2/6] Compiling C++ object d2vwitch.p/src_Audio.cpp.o
FAILED: d2vwitch.p/src_Audio.cpp.o 
ccache c++ -Id2vwitch.p -I. -I.. -I/usr/include/vapoursynth -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -g -O2 -ffile-prefix-map=/build/d2vwitch-dmo-5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -fPIC '-DPACKAGE_VERSION="5"' -Wall -Wextra -Wshadow -MD -MQ d2vwitch.p/src_Audio.cpp.o -MF d2vwitch.p/src_Audio.cpp.o.d -o d2vwitch.p/src_Audio.cpp.o -c ../src/Audio.cpp
../src/Audio.cpp: In function 'AVFormatContext* openWave64(const string&, const AVCodecContext*, std::string&)':
../src/Audio.cpp:57:46: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive]
   57 |     AVCodec *pcm_codec = avcodec_find_encoder(codec_id);
      |                          ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
      |                                              |
      |                                              const AVCodec*
../src/Audio.cpp:74:52: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
   74 |     AVCodecContext *out_ctx = w64_ctx->streams[0]->codec;
      |                                                    ^~~~~
../src/Audio.cpp: In function 'void closeAudioFiles(AudioFilesMap&, const AVFormatContext*)':
../src/Audio.cpp:103:57: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  103 |             if (codecIDRequiresWave64(fctx->streams[i]->codec->codec_id)) {
      |                                                         ^~~~~
../src/Audio.cpp: In function 'int64_t getChannelLayout(AVCodecContext*)':
../src/Audio.cpp:135:26: error: 'av_get_default_channel_layout' was not declared in this scope; did you mean 'av_opt_set_channel_layout'?
  135 |         channel_layout = av_get_default_channel_layout(channels);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                          av_opt_set_channel_layout
../src/Audio.cpp: In function 'bool calculateAudioDelays(FakeFile&, int, AudioDelayMap&, int64_t*, std::string&)':
../src/Audio.cpp:165:40: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  165 |         } else if (f.fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
      |                                        ^~~~~
../src/Audio.cpp:196:19: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
  196 |     av_init_packet(&packet);
      |     ~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
                 from ../src/Audio.h:27,
                 from ../src/Audio.cpp:27:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:506:6: note: declared here
  506 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
../src/Audio.cpp:208:72: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  208 |             AVCodecID codec_id = f.fctx->streams[packet.stream_index]->codec->codec_id;
      |                                                                        ^~~~~
../src/Audio.cpp:241:55: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  241 |             if (f.fctx->streams[packet.stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
      |                                                       ^~~~~
../src/Audio.cpp:263:9: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  263 |         av_free_packet(&packet);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
[3/6] Compiling C++ object d2vwitch.p/src_D2V.cpp.o
FAILED: d2vwitch.p/src_D2V.cpp.o 
ccache c++ -Id2vwitch.p -I. -I.. -I/usr/include/vapoursynth -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -g -O2 -ffile-prefix-map=/build/d2vwitch-dmo-5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -fPIC '-DPACKAGE_VERSION="5"' -Wall -Wextra -Wshadow -MD -MQ d2vwitch.p/src_D2V.cpp.o -MF d2vwitch.p/src_D2V.cpp.o.d -o d2vwitch.p/src_D2V.cpp.o -c ../src/D2V.cpp
../src/D2V.cpp: In member function 'void D2V::reorderDataLineFlags()':
../src/D2V.cpp:60:23: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
   60 |     if (video_stream->codec->codec_id == AV_CODEC_ID_H264) {
      |                       ^~~~~
../src/D2V.cpp: In member function 'bool D2V::printHeader()':
../src/D2V.cpp:80:44: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
   80 |     header += std::to_string(video_stream->codec->codec_id == AV_CODEC_ID_H264 ? 42 : 16) + "\n";
      |                                            ^~~~~
../src/D2V.cpp: In member function 'bool D2V::printSettings()':
../src/D2V.cpp:115:38: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  115 |             if (f->fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
      |                                      ^~~~~
../src/D2V.cpp:129:23: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  129 |     if (video_stream->codec->codec_id == AV_CODEC_ID_MPEG1VIDEO)
      |                       ^~~~~
../src/D2V.cpp:131:28: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  131 |     else if (video_stream->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO)
      |                            ^~~~~
../src/D2V.cpp:133:28: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  133 |     else if (video_stream->codec->codec_id == AV_CODEC_ID_H264)
      |                            ^~~~~
../src/D2V.cpp:139:45: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  139 |     if (av_opt_get_image_size(video_stream->codec, "video_size", 0, &width, &height) < 0)
      |                                             ^~~~~
../src/D2V.cpp:143:36: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  143 |     if (av_opt_get_q(video_stream->codec, "aspect", 0, &sar) < 0 || sar.num < 1 || sar.den < 1)
      |                                    ^~~~~
../src/D2V.cpp:149:43: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  149 |     AVRational frame_rate = video_stream->codec->framerate;
      |                                           ^~~~~
../src/D2V.cpp: In member function 'bool D2V::handleVideoPacket(AVPacket*)':
../src/D2V.cpp:218:66: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  218 |     AVCodecID codec_id = f->fctx->streams[packet->stream_index]->codec->codec_id;
      |                                                                  ^~~~~
../src/D2V.cpp: In member function 'bool D2V::handleAudioPacket(AVPacket*)':
../src/D2V.cpp:416:71: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  416 |     if (codecIDRequiresWave64(f->fctx->streams[packet->stream_index]->codec->codec_id)) {
      |                                                                       ^~~~~
../src/D2V.cpp:429:23: error: 'avcodec_decode_audio4' was not declared in this scope; did you mean 'avcodec_decode_subtitle2'?
  429 |             int ret = avcodec_decode_audio4(codec, frame, &got_frame, &pkt_in);
      |                       ^~~~~~~~~~~~~~~~~~~~~
      |                       avcodec_decode_subtitle2
../src/D2V.cpp:446:27: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
  446 |             av_init_packet(&pkt_out);
      |             ~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
                 from ../src/D2V.cpp:29:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:506:6: note: declared here
  506 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
../src/D2V.cpp: In member function 'void D2V::index()':
../src/D2V.cpp:529:19: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
  529 |     av_init_packet(&packet);
      |     ~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
                 from ../src/D2V.cpp:29:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:506:6: note: declared here
  506 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
../src/D2V.cpp:544:13: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  544 |             av_free_packet(&packet);
      |             ^~~~~~~~~~~~~~
      |             av_new_packet
../src/D2V.cpp:556:13: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  556 |             av_free_packet(&packet);
      |             ^~~~~~~~~~~~~~
      |             av_new_packet
../src/D2V.cpp:563:9: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  563 |         av_free_packet(&packet);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
../src/D2V.cpp:620:19: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
  620 |     av_init_packet(&packet);
      |     ~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
                 from ../src/D2V.cpp:29:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:506:6: note: declared here
  506 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
../src/D2V.cpp:644:13: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  644 |             av_free_packet(&packet);
      |             ^~~~~~~~~~~~~~
      |             av_new_packet
../src/D2V.cpp:650:9: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  650 |         av_free_packet(&packet);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
../src/D2V.cpp: In member function 'void D2V::demuxVideo(FILE*, int64_t, int64_t)':
../src/D2V.cpp:800:19: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
  800 |     av_init_packet(&packet);
      |     ~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
                 from ../src/D2V.cpp:29:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:506:6: note: declared here
  506 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
../src/D2V.cpp:814:13: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  814 |             av_free_packet(&packet);
      |             ^~~~~~~~~~~~~~
      |             av_new_packet
../src/D2V.cpp:817:13: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  817 |             av_free_packet(&packet);
      |             ^~~~~~~~~~~~~~
      |             av_new_packet
../src/D2V.cpp:833:13: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  833 |             av_free_packet(&packet);
      |             ^~~~~~~~~~~~~~
      |             av_new_packet
../src/D2V.cpp:840:9: error: 'av_free_packet' was not declared in this scope; did you mean 'av_new_packet'?
  840 |         av_free_packet(&packet);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
../src/D2V.cpp: In function 'std::string suggestAudioTrackSuffix(const AVStream*, const AudioDelayMap&)':
../src/D2V.cpp:992:77: error: 'const AVStream' {aka 'const struct AVStream'} has no member named 'codec'
  992 |     av_get_channel_layout_string(channels, 512, 0, getChannelLayout(stream->codec));
      |                                                                             ^~~~~
../src/D2V.cpp:992:5: error: 'av_get_channel_layout_string' was not declared in this scope; did you mean 'av_get_sample_fmt_string'?
  992 |     av_get_channel_layout_string(channels, 512, 0, getChannelLayout(stream->codec));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     av_get_sample_fmt_string
../src/D2V.cpp:998:32: error: 'const AVStream' {aka 'const struct AVStream'} has no member named 'codec'
  998 |     if (av_opt_get_int(stream->codec, "ab", 0, &bit_rate) < 0)
      |                                ^~~~~
../src/D2V.cpp:1005:72: error: 'const AVStream' {aka 'const struct AVStream'} has no member named 'codec'
 1005 |     suggestion += std::string(".") + suggestAudioFileExtension(stream->codec->codec_id);
      |                                                                        ^~~~~
[4/6] Compiling C++ object d2vwitch.p/src_D2VWitch.cpp.o
FAILED: d2vwitch.p/src_D2VWitch.cpp.o 
ccache c++ -Id2vwitch.p -I. -I.. -I/usr/include/vapoursynth -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -g -O2 -ffile-prefix-map=/build/d2vwitch-dmo-5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -fPIC '-DPACKAGE_VERSION="5"' -Wall -Wextra -Wshadow -MD -MQ d2vwitch.p/src_D2VWitch.cpp.o -MF d2vwitch.p/src_D2VWitch.cpp.o.d -o d2vwitch.p/src_D2VWitch.cpp.o -c ../src/D2VWitch.cpp
../src/D2VWitch.cpp: In function 'void printInfo(const AVFormatContext*, const FakeFile&)':
../src/D2VWitch.cpp:202:31: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  202 |         if (fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
      |                               ^~~~~
../src/D2VWitch.cpp:204:86: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  204 |             const AVCodecDescriptor *desc = avcodec_descriptor_get(fctx->streams[i]->codec->codec_id);
      |                                                                                      ^~~~~
../src/D2VWitch.cpp:209:57: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  209 |             if (av_opt_get_image_size(fctx->streams[i]->codec, "video_size", 0, &width, &height) < 0)
      |                                                         ^~~~~
../src/D2VWitch.cpp:212:78: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  212 |             const char *pixel_format = av_get_pix_fmt_name(fctx->streams[i]->codec->pix_fmt);
      |                                                                              ^~~~~
../src/D2VWitch.cpp:228:31: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  228 |         if (fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
      |                               ^~~~~
../src/D2VWitch.cpp:230:86: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  230 |             const AVCodecDescriptor *desc = avcodec_descriptor_get(fctx->streams[i]->codec->codec_id);
      |                                                                                      ^~~~~
../src/D2VWitch.cpp:236:50: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  236 |             if (av_opt_get_int(fctx->streams[i]->codec, "ab", 0, &bit_rate) < 0)
      |                                                  ^~~~~
../src/D2VWitch.cpp:239:65: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  239 |             channel_layout = getChannelLayout(fctx->streams[i]->codec);
      |                                                                 ^~~~~
../src/D2VWitch.cpp:241:50: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  241 |             if (av_opt_get_int(fctx->streams[i]->codec, "ar", 0, &sample_rate) < 0)
      |                                                  ^~~~~
../src/D2VWitch.cpp:245:13: error: 'av_get_channel_layout_string' was not declared in this scope; did you mean 'av_get_sample_fmt_string'?
  245 |             av_get_channel_layout_string(channels, 512, 0, channel_layout);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |             av_get_sample_fmt_string
../src/D2VWitch.cpp: In function 'int main(int, char**)':
../src/D2VWitch.cpp:563:13: error: 'av_register_all' was not declared in this scope
  563 |             av_register_all();
      |             ^~~~~~~~~~~~~~~
../src/D2VWitch.cpp:564:13: error: 'avcodec_register_all' was not declared in this scope
  564 |             avcodec_register_all();
      |             ^~~~~~~~~~~~~~~~~~~~
../src/D2VWitch.cpp:657:5: error: 'av_register_all' was not declared in this scope
  657 |     av_register_all();
      |     ^~~~~~~~~~~~~~~
../src/D2VWitch.cpp:658:5: error: 'avcodec_register_all' was not declared in this scope
  658 |     avcodec_register_all();
      |     ^~~~~~~~~~~~~~~~~~~~
../src/D2VWitch.cpp:754:53: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  754 |     if (!D2V::isSupportedVideoCodecID(video_stream->codec->codec_id)) {
      |                                                     ^~~~~
../src/D2VWitch.cpp:756:78: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  756 |         const AVCodecDescriptor *desc = avcodec_descriptor_get(video_stream->codec->codec_id);
      |                                                                              ^~~~~
../src/D2VWitch.cpp:760:87: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  760 |         fprintf(stderr, "Unsupported video codec: %s (id: %d)\n", type, video_stream->codec->codec_id);
      |                                                                                       ^~~~~
../src/D2VWitch.cpp:829:33: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  829 |         if (f.fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
      |                                 ^~~~~
../src/D2VWitch.cpp:841:59: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  841 |             if (codecIDRequiresWave64(f.fctx->streams[i]->codec->codec_id)) {
      |                                                           ^~~~~
../src/D2VWitch.cpp:844:81: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  844 |                 AVFormatContext *w64_ctx = openWave64(path, f.fctx->streams[i]->codec, error);
      |                                                                                 ^~~~~
[5/6] Compiling C++ object d2vwitch.p/src_GUIWindow.cpp.o
FAILED: d2vwitch.p/src_GUIWindow.cpp.o 
ccache c++ -Id2vwitch.p -I. -I.. -I/usr/include/vapoursynth -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -g -O2 -ffile-prefix-map=/build/d2vwitch-dmo-5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -fPIC '-DPACKAGE_VERSION="5"' -Wall -Wextra -Wshadow -MD -MQ d2vwitch.p/src_GUIWindow.cpp.o -MF d2vwitch.p/src_GUIWindow.cpp.o.d -o d2vwitch.p/src_GUIWindow.cpp.o -c ../src/GUIWindow.cpp
../src/GUIWindow.cpp: In member function 'void GUIWindow::inputFilesUpdated()':
../src/GUIWindow.cpp:220:33: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  220 |         if (f.fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
      |                                 ^~~~~
../src/GUIWindow.cpp:222:88: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  222 |             const AVCodecDescriptor *desc = avcodec_descriptor_get(f.fctx->streams[i]->codec->codec_id);
      |                                                                                        ^~~~~
../src/GUIWindow.cpp:227:59: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  227 |             if (av_opt_get_image_size(f.fctx->streams[i]->codec, "video_size", 0, &width, &height) < 0)
      |                                                           ^~~~~
../src/GUIWindow.cpp:230:80: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  230 |             const char *pixel_format = av_get_pix_fmt_name(f.fctx->streams[i]->codec->pix_fmt);
      |                                                                                ^~~~~
../src/GUIWindow.cpp:246:40: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  246 |         } else if (f.fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
      |                                        ^~~~~
../src/GUIWindow.cpp: In member function 'void GUIWindow::startIndexing()':
../src/GUIWindow.cpp:322:70: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  322 |             if (codecIDRequiresWave64(f.fctx->streams[stream_index]->codec->codec_id)) {
      |                                                                      ^~~~~
../src/GUIWindow.cpp:325:111: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  325 |                 AVFormatContext *w64_ctx = openWave64(file_name.toStdString(), f.fctx->streams[stream_index]->codec, error);
      |                                                                                                               ^~~~~
../src/GUIWindow.cpp: In constructor 'GUIWindow::GUIWindow(QSettings&, QWidget*)':
../src/GUIWindow.cpp:662:101: warning: 'void QButtonGroup::buttonToggled(int, bool)' is deprecated: Use QButtonGroup::idToggled(int, bool) instead [-Wdeprecated-declarations]
  662 |     connect(video_group, static_cast<void (QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled), [this] (int id, bool checked) {
      |                                                                                                     ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QButtonGroup:1,
                 from ../src/GUIWindow.h:24,
                 from ../src/GUIWindow.cpp:44:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qbuttongroup.h:96:10: note: declared here
   96 |     void buttonToggled(int, bool);
      |          ^~~~~~~~~~~~~
../src/GUIWindow.cpp:662:101: warning: 'void QButtonGroup::buttonToggled(int, bool)' is deprecated: Use QButtonGroup::idToggled(int, bool) instead [-Wdeprecated-declarations]
  662 |     connect(video_group, static_cast<void (QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled), [this] (int id, bool checked) {
      |                                                                                                     ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QButtonGroup:1,
                 from ../src/GUIWindow.h:24,
                 from ../src/GUIWindow.cpp:44:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qbuttongroup.h:96:10: note: declared here
   96 |     void buttonToggled(int, bool);
      |          ^~~~~~~~~~~~~
../src/GUIWindow.cpp: In lambda function:
../src/GUIWindow.cpp:681:76: error: 'AVStream' {aka 'struct AVStream'} has no member named 'codec'
  681 |             video_okay = D2V::isSupportedVideoCodecID(f.fctx->streams[id]->codec->codec_id) && f.initVideoCodec(id);
      |                                                                            ^~~~~
ninja: build stopped: subcommand failed.
BlueSwordM commented 2 years ago

I have the same issue.

This will be very problematic for the future.