Latest FFMPEG Breaks GTK4 Build
GTK Version: GTK4 (main)
OS: Ubuntu 22.04.1 (Kernel v6.1.11)
ffmpeg version N-109817-g5bad485603 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Ubuntu 12.1.0-2ubuntu1~22.04)
configuration: --prefix=/usr/local --enable-shared --extra-libs='-lpthread -lm' --extra-libs=-lpthread --ld=g++ --enable-gpl --enable-nonfree --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libsvtav1 --enable-libdav1d --enable-libx265 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libzimg --enable-libvmaf --enable-libsmbclient --enable-version3
libavutil 58. 0.100 / 58. 0.100
libavcodec 60. 0.100 / 60. 0.100
libavformat 60. 0.100 / 60. 0.100
libavdevice 60. 0.100 / 60. 0.100
libavfilter 9. 0.100 / 9. 0.100
libswscale 7. 0.100 / 7. 0.100
libswresample 4. 9.100 / 4. 9.100
libpostproc 57. 0.100 / 57. 0.100
GTK compile options:-
meson configure build --buildtype=release -Dmedia-ffmpeg=enabled -Dvulkan=enabled -Df16c=enabled -Dtracker=disabled -Dbuild-tests=false -Ddemos=false -Dbuild-examples=false
Compile Error Message:-
[696/1306] Compiling C object modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o
FAILED: modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o
ccache cc -Imodules/media/libmedia-ffmpeg.so.p -Imodules/media -I../modules/media -I. -I.. -Igtk -I../gtk -Igdk/x11 -I../gdk/x11 -Igdk -I../gdk -Igtk/css -Igsk -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/uuid -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/graphene-1.0 -I/usr/lib/x86_64-linux-gnu/graphene-1.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O3 -DG_LOG_USE_STRUCTURED=1 -DGLIB_DISABLE_DEPRECATION_WARNINGS '-DGTK_VERSION="4.9.4"' -D_GNU_SOURCE -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -fPIC -pthread -mfpmath=sse -msse -msse2 -DGTK_COMPILATION -fno-strict-aliasing -Wno-missing-include-dirs -Wduplicated-branches -Wduplicated-cond -Wformat=2 -Wformat-nonliteral -Wformat-security -Wignored-qualifiers -Wimplicit-function-declaration -Wlogical-op -Wmisleading-indentation -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized -Wunused -Waddress -Warray-bounds -Wempty-body -Wimplicit -Wimplicit-fallthrough -Wimplicit-fallthrough=5 -Winit-self -Wint-to-pointer-cast -Wmain -Wmissing-braces -Wmissing-declarations -Wmissing-prototypes -Wnonnull -Wpointer-to-int-cast -Wredundant-decls -Wreturn-type -Wsequence-point -Wtrigraphs -Wvla -Wwrite-strings -Wcast-align -fvisibility=hidden -MD -MQ modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o -MF modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o.d -o modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o -c ../modules/media/gtkffmediafile.c
../modules/media/gtkffmediafile.c: In function ‘gtk_ff_media_file_add_output_stream’:
../modules/media/gtkffmediafile.c:370:3: warning: ‘channel_layout’ is deprecated [-Wdeprecated-declarations]
370 | codec_ctx->channel_layout = codec->channel_layouts ? codec->channel_layouts[0] : AV_CH_LAYOUT_STEREO;
| ^~~~~~~~~
In file included from ../modules/media/gtkffmediafile.c:28:
/usr/local/include/libavcodec/avcodec.h:1096:14: note: declared here
1096 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
../modules/media/gtkffmediafile.c:370:3: warning: ‘channel_layouts’ is deprecated [-Wdeprecated-declarations]
370 | codec_ctx->channel_layout = codec->channel_layouts ? codec->channel_layouts[0] : AV_CH_LAYOUT_STEREO;
| ^~~~~~~~~
In file included from /usr/local/include/libavcodec/avcodec.h:40:
/usr/local/include/libavcodec/codec.h:214:21: note: declared here
214 | const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
| ^~~~~~~~~~~~~~~
../modules/media/gtkffmediafile.c:370:3: warning: ‘channel_layouts’ is deprecated [-Wdeprecated-declarations]
370 | codec_ctx->channel_layout = codec->channel_layouts ? codec->channel_layouts[0] : AV_CH_LAYOUT_STEREO;
| ^~~~~~~~~
/usr/local/include/libavcodec/codec.h:214:21: note: declared here
214 | const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
| ^~~~~~~~~~~~~~~
../modules/media/gtkffmediafile.c:371:3: warning: ‘channels’ is deprecated [-Wdeprecated-declarations]
371 | codec_ctx->channels = av_get_channel_layout_nb_channels (codec_ctx->channel_layout);
| ^~~~~~~~~
/usr/local/include/libavcodec/avcodec.h:1042:9: note: declared here
1042 | int channels;
| ^~~~~~~~
../modules/media/gtkffmediafile.c:371:3: warning: ‘av_get_channel_layout_nb_channels’ is deprecated [-Wdeprecated-declarations]
371 | codec_ctx->channels = av_get_channel_layout_nb_channels (codec_ctx->channel_layout);
| ^~~~~~~~~
In file included from /usr/local/include/libavutil/frame.h:33,
from /usr/local/include/libavcodec/avcodec.h:35:
/usr/local/include/libavutil/channel_layout.h:474:5: note: declared here
474 | int av_get_channel_layout_nb_channels(uint64_t channel_layout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../modules/media/gtkffmediafile.c:371:3: warning: ‘channel_layout’ is deprecated [-Wdeprecated-declarations]
371 | codec_ctx->channels = av_get_channel_layout_nb_channels (codec_ctx->channel_layout);
| ^~~~~~~~~
/usr/local/include/libavcodec/avcodec.h:1096:14: note: declared here
1096 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
../modules/media/gtkffmediafile.c: In function ‘gtk_ff_media_file_alloc_audio_frame’:
../modules/media/gtkffmediafile.c:439:3: warning: ‘channel_layout’ is deprecated [-Wdeprecated-declarations]
439 | frame->channel_layout = channel_layout;
| ^~~~~
/usr/local/include/libavutil/frame.h:520:14: note: declared here
520 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
../modules/media/gtkffmediafile.c: In function ‘gtk_ff_media_file_write_audio_frame’:
../modules/media/gtkffmediafile.c:477:62: warning: ‘channel_layout’ is deprecated [-Wdeprecated-declarations]
477 | codec_ctx->channel_layout,
| ^~~~~~~~~
/usr/local/include/libavcodec/avcodec.h:1096:14: note: declared here
1096 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
../modules/media/gtkffmediafile.c: In function ‘gtk_ff_media_file_init_audio_resampler’:
../modules/media/gtkffmediafile.c:826:3: warning: ‘channels’ is deprecated [-Wdeprecated-declarations]
826 | av_opt_set_int (self->swr_ctx, "in_channel_count", in_codec_ctx->channels, 0);
| ^~~~~~~~~~~~~~
/usr/local/include/libavcodec/avcodec.h:1042:9: note: declared here
1042 | int channels;
| ^~~~~~~~
../modules/media/gtkffmediafile.c:829:3: warning: ‘channels’ is deprecated [-Wdeprecated-declarations]
829 | av_opt_set_int (self->swr_ctx, "out_channel_count", out_codec_ctx->channels, 0);
| ^~~~~~~~~~~~~~
/usr/local/include/libavcodec/avcodec.h:1042:9: note: declared here
1042 | int channels;
| ^~~~~~~~
../modules/media/gtkffmediafile.c: In function ‘gtk_ff_media_file_open_audio_device’:
../modules/media/gtkffmediafile.c:855:20: error: ‘AVOutputFormat’ has no member named ‘control_message’
855 | if (candidate->control_message)
| ^~
../modules/media/gtkffmediafile.c: In function ‘gtk_ff_media_file_open’:
../modules/media/gtkffmediafile.c:933:64: warning: ‘channel_layout’ is deprecated [-Wdeprecated-declarations]
933 | self->output_audio_stream->codec_ctx->channel_layout,
| ^~~~
/usr/local/include/libavcodec/avcodec.h:1096:14: note: declared here
1096 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
[705/1306] Generating gtk/gtktypebuiltins.c with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
ERROR ENCOUNTERED:-
../modules/media/gtkffmediafile.c: In function ‘gtk_ff_media_file_open_audio_device’:
../modules/media/gtkffmediafile.c:855:20: error: ‘AVOutputFormat’ has no member named ‘control_message’
855 | if (candidate->control_message)
Edited by Andre Klapper