qctools
qctools copied to clipboard
address ffmpeg deprecations
Between ffmpeg version 3.4.2 and head (I'm testing with 44a2415) there are several new deprecates, here's selects of a diff of the make terminal output between building with those versions of ffmpeg.
20a21,29
> ../../../Source/Core/AudioStats.cpp:208:22: warning: 'av_frame_get_metadata' is deprecated [-Wdeprecated-declarations]
> AVDictionary * m=av_frame_get_metadata (Frame);
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/frame.h:628:1: note: 'av_frame_get_metadata' has been explicitly marked deprecated here
> attribute_deprecated
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
> # define attribute_deprecated __attribute__((deprecated))
>
596a606,623
> ../../../Source/Core/FFmpeg_Glue.cpp:759:9: warning: 'av_register_all' is deprecated [-Wdeprecated-declarations]
> av_register_all();
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavformat/avformat.h:2040:1: note: 'av_register_all' has been explicitly marked deprecated here
> attribute_deprecated
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
> # define attribute_deprecated __attribute__((deprecated))
> ^
> ../../../Source/Core/FFmpeg_Glue.cpp:760:9: warning: 'avfilter_register_all' is deprecated [-Wdeprecated-declarations]
> avfilter_register_all();
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavfilter/avfilter.h:713:1: note: 'avfilter_register_all' has been explicitly marked deprecated here
> attribute_deprecated
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
> # define attribute_deprecated __attribute__((deprecated))
> ^
1378a1406,1414
> ../../../Source/Core/VideoStats.cpp:289:22: warning: 'av_frame_get_metadata' is deprecated [-Wdeprecated-declarations]
> AVDictionary * m=av_frame_get_metadata (Frame);
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/frame.h:628:1: note: 'av_frame_get_metadata' has been explicitly marked deprecated here
> attribute_deprecated
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
> # define attribute_deprecated __attribute__((deprecated))
> ^
1421a1458,1476
> ../../../Source/Core/FormatStats.cpp:51:41: warning: 'filename' is deprecated [-Wdeprecated-declarations]
> filename(context != NULL ? context->filename : ""),
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavformat/avformat.h:1416:5: note: 'filename' has been explicitly marked deprecated here
> attribute_deprecated
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
> # define attribute_deprecated __attribute__((deprecated))
> ^
> ../../../Source/Core/FormatStats.cpp:60:36: warning: 'av_format_get_probe_score' is deprecated [-Wdeprecated-declarations]
> probe_score(context != NULL ? (av_format_get_probe_score(context)) : 0),
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavformat/avformat.h:1952:1: note: 'av_format_get_probe_score' has been explicitly marked deprecated here
> attribute_deprecated
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
> # define attribute_deprecated __attribute__((deprecated))
> ^
> 2 warnings generated.
1591a1647,1655
> ../../../Source/Core/FFmpegVideoEncoder.cpp:35:5: warning: 'av_register_all' is deprecated [-Wdeprecated-declarations]
> av_register_all();
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavformat/avformat.h:2040:1: note: 'av_register_all' has been explicitly marked deprecated here
> attribute_deprecated
> ^
> /usr/local/Cellar/ffmpeg/HEAD-44a2415/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
> # define attribute_deprecated __attribute__((deprecated))
> ^
Just out of my personal curiosity: what is the reason for not using the 4.0?
qctools autobuilds and travis tests use head rather than release points, since contributions to qctools and ffmpeg are often synced
Thank you!
a selection of deprecations from building main
../../../../Source/Core/AudioStreamStats.cpp:65:59: warning: 'channels' is deprecated [-Wdeprecated-declarations]
channels(stream != NULL ? stream->stream()->codecpar->channels : 0),
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavcodec/codec_par.h:171:5: note: 'channels' has been explicitly marked deprecated here
attribute_deprecated
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
../../../../Source/Core/AudioStreamStats.cpp:86:41: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
if (stream->stream()->codecpar->channel_layout) {
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavcodec/codec_par.h:165:5: note: 'channel_layout' has been explicitly marked deprecated here
attribute_deprecated
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
../../../../Source/Core/AudioStreamStats.cpp:88:73: warning: 'channels' is deprecated [-Wdeprecated-declarations]
av_bprint_channel_layout(&pbuf, stream->stream()->codecpar->channels, stream->stream()->codecpar->channel_layout);
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavcodec/codec_par.h:171:5: note: 'channels' has been explicitly marked deprecated here
attribute_deprecated
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
../../../../Source/Core/AudioStreamStats.cpp:88:111: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
av_bprint_channel_layout(&pbuf, stream->stream()->codecpar->channels, stream->stream()->codecpar->channel_layout);
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavcodec/codec_par.h:165:5: note: 'channel_layout' has been explicitly marked deprecated here
attribute_deprecated
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
../../../../Source/Core/AudioStreamStats.cpp:88:13: warning: 'av_bprint_channel_layout' is deprecated [-Wdeprecated-declarations]
av_bprint_channel_layout(&pbuf, stream->stream()->codecpar->channels, stream->stream()->codecpar->channel_layout);
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavutil/channel_layout.h:441:1: note: 'av_bprint_channel_layout' has been explicitly marked deprecated here
attribute_deprecated
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
...
../../../../Source/Core/FileInformation.cpp:1468:9: warning: 'av_init_packet' is deprecated [-Wdeprecated-declarations]
av_init_packet (outPacket.get());
^
/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/libavcodec/packet.h:511:1: note: 'av_init_packet' has been explicitly marked deprecated here
attribute_deprecated
^