Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 834419

Summary: media-video/webcamoid-8.7.1-r1 with ffmpeg-5.0: src/mediawriterffmpeg.cpp:1245:5: error: ‘av_register_all’ was not declared in this scope
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 833518    
Bug Blocks: 831437    
Attachments: build.log.gz
emerge-info.txt

Description Kobboi 2022-02-28 21:29:28 UTC
src/videostream.cpp: In member function ‘virtual int VideoStream::encodeData(AVFrame*)’:
src/videostream.cpp:362:23: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
  362 |         av_init_packet(&pkt);
      |         ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/libavformat/avformat.h:316,
                 from src/abstractstream.h:27,
                 from src/videostream.h:23,
                 from src/videostream.cpp:37:
/usr/include/libavcodec/packet.h:506:6: note: declared here
  506 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
src/mediawriterffmpeg.cpp: In constructor ‘MediaWriterFFmpegGlobal::MediaWriterFFmpegGlobal()’:
src/mediawriterffmpeg.cpp:1245:5: error: ‘av_register_all’ was not declared in this scope
 1245 |     av_register_all();
      |     ^~~~~~~~~~~~~~~
src/mediawriterffmpeg.cpp:1246:5: error: ‘avcodec_register_all’ was not declared in this scope
 1246 |     avcodec_register_all();
      |     ^~~~~~~~~~~~~~~~~~~~
src/mediawriterffmpeg.cpp: In member function ‘SupportedCodecsType MediaWriterFFmpegGlobal::initSupportedCodecs()’:
src/mediawriterffmpeg.cpp:1451:28: error: ‘av_oformat_next’ was not declared in this scope; did you mean ‘av_opt_next’?
 1451 |     while ((outputFormat = av_oformat_next(outputFormat))) {
      |                            ^~~~~~~~~~~~~~~
      |                            av_opt_next
src/mediawriterffmpeg.cpp:1454:25: error: ‘av_codec_next’ was not declared in this scope; did you mean ‘av_opt_next’?
 1454 |         while ((codec = av_codec_next(codec))) {
      |                         ^~~~~~~~~~~~~
      |                         av_opt_next
src/mediawriterffmpeg.cpp: In member function ‘QMap<QString, QMap<QString, QVariant> > MediaWriterFFmpegGlobal::initCodecDefaults()’:
src/mediawriterffmpeg.cpp:1541:23: error: ‘av_codec_next’ was not declared in this scope; did you mean ‘av_opt_next’?
 1541 |     for (auto codec = av_codec_next(nullptr);
      |                       ^~~~~~~~~~~~~
      |                       av_opt_next
make[4]: *** [Makefile:801: debug/Qt5.15.2/x86_64-pc-linux-gnu-gpp/x86_64/obj/mediawriterffmpeg.o] Error 1
make[4]: *** Waiting for unfinished jobs....
src/abstractstream.cpp: In constructor ‘AbstractStream::AbstractStream(const AVFormatContext*, uint, int, const QVariantMap&, const QMap<QString, QMap<QString, QVariant> >&, MediaWriterFFmpeg*, QObject*)’:
src/abstractstream.cpp:104:50: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  104 |     AVCodec *codec = avcodec_find_encoder_by_name(codecName.toStdString().c_str());
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  |
      |                                                  const AVCodec*
make[4]: *** [Makefile:816: debug/Qt5.15.2/x86_64-pc-linux-gnu-gpp/x86_64/obj/abstractstream.o] Error 1
make[4]: Leaving directory '/var/tmp/portage/media-video/webcamoid-8.7.1-r1/work/webcamoid-8.7.1/libAvKys/Plugins/MultiSink/src/ffmpeg'
make[3]: *** [Makefile:92: sub-src-ffmpeg-make_first-ordered] Error 2
make[3]: Leaving directory '/var/tmp/portage/media-video/webcamoid-8.7.1-r1/work/webcamoid-8.7.1/libAvKys/Plugins/MultiSink'


Reproducible: Always
Comment 1 Kobboi 2022-02-28 21:29:48 UTC
Created attachment 766093 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 21:29:50 UTC
Created attachment 766094 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 21:31:57 UTC
Compiles fine with:
* USE=ffmpeg and ffmpeg-4.4.1
* USE=-ffmpeg and ffmpeg-5.0
Comment 4 Kobboi 2022-03-08 22:07:12 UTC
Note that this appears to be fixed in latest master, including the most recent 9.0.0 release. Probably not worth attempting to backport, so let's wait for Maintainer Needed to get the latest release in the tree ;)
Comment 5 Joakim Tjernlund 2022-03-19 19:22:48 UTC
see https://bugs.gentoo.org/833518