Open baerbock opened 5 years ago
ffmpeg APIs have changed:
[ 8%] Building CXX object CMakeFiles/shotdetect.dir/src/film.cc.o ./Shotdetect/src/film.cc:193:3: warning: 'avpicture_free' is deprecated [-Wdeprecated-declarations] avpicture_free((AVPicture*) pFramesRGB.front()); ^ /usr/include/libavcodec/avcodec.h:5483:1: note: 'avpicture_free' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:204:5: warning: 'avpicture_free' is deprecated [-Wdeprecated-declarations] avpicture_free((AVPicture*) pFramesRGB.front()); ^ /usr/include/libavcodec/avcodec.h:5483:1: note: 'avpicture_free' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:276:58: warning: 'codec' is deprecated [-Wdeprecated-declarations] this->height = int(pFormatCtx->streams[videoStream]->codec->height); ^ /usr/include/libavformat/avformat.h:884:5: note: 'codec' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:277:57: warning: 'codec' is deprecated [-Wdeprecated-declarations] this->width = int(pFormatCtx->streams[videoStream]->codec->width); ^ /usr/include/libavformat/avformat.h:884:5: note: 'codec' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:280:61: warning: 'codec' is deprecated [-Wdeprecated-declarations] buf, sizeof(buf), pFormatCtx->streams[videoStream]->codec, 0); ^ /usr/include/libavformat/avformat.h:884:5: note: 'codec' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:341:3: warning: 'av_register_all' is deprecated [-Wdeprecated-declarations] av_register_all(); ^ /usr/include/libavformat/avformat.h:2049:1: note: 'av_register_all' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:364:37: warning: 'codec' is deprecated [-Wdeprecated-declarations] switch (pFormatCtx->streams[j]->codec->codec_type) { ^ /usr/include/libavformat/avformat.h:884:5: note: 'codec' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:387:56: warning: 'codec' is deprecated [-Wdeprecated-declarations] pCodecCtxAudio = pFormatCtx->streams[audioStream]->codec; ^ /usr/include/libavformat/avformat.h:884:5: note: 'codec' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:400:51: warning: 'codec' is deprecated [-Wdeprecated-declarations] pCodecCtx = pFormatCtx->streams[videoStream]->codec; ^ /usr/include/libavformat/avformat.h:884:5: note: 'codec' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:410:14: error: use of undeclared identifier 'avcodec_alloc_frame' pFrame = avcodec_alloc_frame(); ^ ./Shotdetect/src/film.cc:412:17: error: use of undeclared identifier 'avcodec_alloc_frame' pFrameRGB = avcodec_alloc_frame(); // current frame ^ ./Shotdetect/src/film.cc:413:21: error: use of undeclared identifier 'avcodec_alloc_frame' pFrameRGBprev = avcodec_alloc_frame(); // previous frame ^ ./Shotdetect/src/film.cc:421:45: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'? avpicture_alloc((AVPicture *)pFrameRGB, PIX_FMT_RGB24, width, height); ^~~~~~~~~~~~~ AV_PIX_FMT_RGB24 /usr/include/libavutil/pixfmt.h:68:5: note: 'AV_PIX_FMT_RGB24' declared here AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... ^ ./Shotdetect/src/film.cc:422:49: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'? avpicture_alloc((AVPicture *)pFrameRGBprev, PIX_FMT_RGB24, width, height); ^~~~~~~~~~~~~ AV_PIX_FMT_RGB24 /usr/include/libavutil/pixfmt.h:68:5: note: 'AV_PIX_FMT_RGB24' declared here AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... ^ ./Shotdetect/src/film.cc:452:7: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations] avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); ^ /usr/include/libavcodec/avcodec.h:4822:1: note: 'avcodec_decode_video2' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:461:30: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'? PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL); ^~~~~~~~~~~~~ AV_PIX_FMT_RGB24 /usr/include/libavutil/pixfmt.h:68:5: note: 'AV_PIX_FMT_RGB24' declared here AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... ^ ./Shotdetect/src/film.cc:483:31: error: use of undeclared identifier 'avcodec_alloc_frame' AVFrame* pTempFrame = avcodec_alloc_frame(); ^ ./Shotdetect/src/film.cc:484:50: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'? avpicture_alloc((AVPicture*) pTempFrame, PIX_FMT_RGB24, width, height); ^~~~~~~~~~~~~ AV_PIX_FMT_RGB24 /usr/include/libavutil/pixfmt.h:68:5: note: 'AV_PIX_FMT_RGB24' declared here AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... ^ ./Shotdetect/src/film.cc:486:25: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'? PIX_FMT_RGB24, width, height); ^~~~~~~~~~~~~ AV_PIX_FMT_RGB24 /usr/include/libavutil/pixfmt.h:68:5: note: 'AV_PIX_FMT_RGB24' declared here AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... ^ ./Shotdetect/src/film.cc:518:25: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'? PIX_FMT_RGB24, width, height); ^~~~~~~~~~~~~ AV_PIX_FMT_RGB24 /usr/include/libavutil/pixfmt.h:68:5: note: 'AV_PIX_FMT_RGB24' declared here AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... ^ ./Shotdetect/src/film.cc:529:30: warning: 'av_free_packet' is deprecated [-Wdeprecated-declarations] if (packet.data != NULL) av_free_packet(&packet); ^ /usr/include/libavcodec/avcodec.h:4467:1: note: 'av_free_packet' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ ./Shotdetect/src/film.cc:599:23: error: use of undeclared identifier 'avcodec_alloc_frame' this->audio_buf = avcodec_alloc_frame(); ^ ./Shotdetect/src/film.cc:605:12: warning: 'avcodec_decode_audio4' is deprecated [-Wdeprecated-declarations] len1 = avcodec_decode_audio4( ^ /usr/include/libavcodec/avcodec.h:4773:1: note: 'avcodec_decode_audio4' has been explicitly marked deprecated here attribute_deprecated ^ /usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated' # define attribute_deprecated __attribute__((deprecated)) ^ 12 warnings and 11 errors generated.
Thanks for the bug report! I will try to get to it.
ffmpeg APIs have changed: