diff -Naur a/gegl/gegl-config.c b/gegl/gegl-config.c --- a/gegl/gegl-config.c 2024-07-29 20:44:50.003336476 +0200 +++ b/gegl/gegl-config.c 2024-07-29 20:45:17.786887663 +0200 @@ -330,13 +330,16 @@ if (default_tile_cache_size < mem_min) default_tile_cache_size = mem_min; - g_object_class_install_property (gobject_class, PROP_TILE_CACHE_SIZE, - g_param_spec_uint64 ("tile-cache-size", - "Tile Cache size", - "size of tile cache in bytes", - 0, G_MAXUINT64, default_tile_cache_size, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); + if (getenv ("GEGL_BUILD")) /* make .gir reproducible */ + default_tile_cache_size = 1024 * 1024 * 256; + + g_object_class_install_property (gobject_class, PROP_TILE_CACHE_SIZE, + g_param_spec_uint64 ("tile-cache-size", + "Tile Cache size", + "size of tile cache in bytes", + 0, G_MAXUINT64, default_tile_cache_size, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); } g_object_class_install_property (gobject_class, PROP_CHUNK_SIZE, @@ -375,6 +378,10 @@ _gegl_threads = g_get_num_processors (); _gegl_threads = MIN (_gegl_threads, GEGL_MAX_THREADS); + + if (getenv ("GEGL_BUILD")) // to make .gir reproducible + _gegl_threads = GEGL_MAX_THREADS; + g_object_class_install_property (gobject_class, PROP_THREADS, g_param_spec_int ("threads", "Number of threads", diff -Naur a/gegl/meson.build b/gegl/meson.build --- a/gegl/meson.build 2024-07-29 20:44:50.003336476 +0200 +++ b/gegl/meson.build 2024-07-29 20:45:17.786887663 +0200 @@ -129,18 +129,34 @@ 'opencl' / 'gegl-cl-introspection-support.h', ) - gegl_gir = gnome.generate_gir(gegl_lib, - sources: introspection_sources, - nsversion: api_version, - namespace: 'Gegl', - identifier_prefix: 'Gegl', - symbol_prefix: 'gegl', - header: 'gegl.h', - includes: [ 'GLib-2.0', 'GObject-2.0', 'Babl-0.1' ], - dependencies: [babl], - export_packages: 'gegl-' + api_version, - install: true, - ) + if meson.version().version_compare('>=1.2') + gegl_gir = gnome.generate_gir(gegl_lib, + sources: introspection_sources, + nsversion: api_version, + namespace: 'Gegl', + identifier_prefix: 'Gegl', + symbol_prefix: 'gegl', + header: 'gegl.h', + includes: [ 'GLib-2.0', 'GObject-2.0', 'Babl-0.1' ], + dependencies: [babl], + export_packages: 'gegl-' + api_version, + install: true, + env: ['GEGL_BUILD=1'], + ) + else + gegl_gir = gnome.generate_gir(gegl_lib, + sources: introspection_sources, + nsversion: api_version, + namespace: 'Gegl', + identifier_prefix: 'Gegl', + symbol_prefix: 'gegl', + header: 'gegl.h', + includes: [ 'GLib-2.0', 'GObject-2.0', 'Babl-0.1' ], + dependencies: [babl], + export_packages: 'gegl-' + api_version, + install: true, + ) + endif if vapigen.found() configure_file( diff -Naur a/operations/external/ff-load.c b/operations/external/ff-load.c --- a/operations/external/ff-load.c 2024-07-29 20:44:50.013336555 +0200 +++ b/operations/external/ff-load.c 2024-07-29 20:45:26.503622669 +0200 @@ -250,7 +250,11 @@ while (samples_left) { int sample_count = samples_left; +#if LIBAVCODEC_VERSION_MAJOR < 61 int channels = MIN(p->audio_stream->codecpar->channels, GEGL_MAX_AUDIO_CHANNELS); +#else + int channels = MIN(p->audio_stream->codecpar->ch_layout.nb_channels, GEGL_MAX_AUDIO_CHANNELS); +#endif GeglAudioFragment *af = gegl_audio_fragment_new (o->audio_sample_rate, channels, AV_CH_LAYOUT_STEREO, samples_left); //); @@ -553,7 +557,11 @@ else { o->audio_sample_rate = p->audio_stream->codecpar->sample_rate; +#if LIBAVCODEC_VERSION_MAJOR < 61 o->audio_channels = MIN(p->audio_stream->codecpar->channels, GEGL_MAX_AUDIO_CHANNELS); +#else + o->audio_channels = MIN(p->audio_stream->codecpar->ch_layout.nb_channels, GEGL_MAX_AUDIO_CHANNELS); +#endif } } diff -Naur a/operations/external/ff-save.c b/operations/external/ff-save.c --- a/operations/external/ff-save.c 2024-07-29 20:44:50.013336555 +0200 +++ b/operations/external/ff-save.c 2024-07-29 20:45:34.900355163 +0200 @@ -315,8 +315,13 @@ } cp->sample_rate = o->audio_sample_rate; +#if LIBAVCODEC_VERSION_MAJOR < 61 cp->channel_layout = AV_CH_LAYOUT_STEREO; cp->channels = 2; +#else + cp->ch_layout.u.mask = AV_CH_LAYOUT_STEREO; + cp->ch_layout.nb_channels = 2; +#endif return st; } @@ -392,8 +397,13 @@ frame->format = c->sample_fmt; +#if LIBAVCODEC_VERSION_MAJOR < 61 frame->channel_layout = c->channel_layout; frame->channels = c->channels; +#else + frame->ch_layout = c->ch_layout; + frame->ch_layout.nb_channels = c->ch_layout.nb_channels; +#endif frame->sample_rate = c->sample_rate; frame->nb_samples = nb_samples; @@ -423,8 +433,13 @@ { float left = 0, right = 0; get_sample_data (p, i + p->audio_read_pos, &left, &right); +#if LIBAVCODEC_VERSION_MAJOR < 61 ((float*)frame->data[0])[c->channels*i+0] = left; ((float*)frame->data[0])[c->channels*i+1] = right; +#else + ((float*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left; + ((float*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right; +#endif } break; case AV_SAMPLE_FMT_FLTP: @@ -441,8 +456,13 @@ { float left = 0, right = 0; get_sample_data (p, i + p->audio_read_pos, &left, &right); +#if LIBAVCODEC_VERSION_MAJOR < 61 ((int16_t*)frame->data[0])[c->channels*i+0] = left * (1<<15); ((int16_t*)frame->data[0])[c->channels*i+1] = right * (1<<15); +#else + ((int16_t*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left * (1<<15); + ((int16_t*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right * (1<<15); +#endif } break; case AV_SAMPLE_FMT_S32: @@ -450,8 +470,13 @@ { float left = 0, right = 0; get_sample_data (p, i + p->audio_read_pos, &left, &right); +#if LIBAVCODEC_VERSION_MAJOR < 61 ((int32_t*)frame->data[0])[c->channels*i+0] = left * (1<<31); ((int32_t*)frame->data[0])[c->channels*i+1] = right * (1<<31); +#else + ((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left * (1<<31); + ((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right * (1<<31); +#endif } break; case AV_SAMPLE_FMT_S32P: