From 1c301df91a614b21f847a8a0630394365074f5dc Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Wed, 5 Apr 2023 19:36:15 +0300 Subject: [PATCH] jack: remove version guards from the code We already require >= 1.9.7 in meson and thus we can remove the older codepath. Part-of: --- .../ext/jack/gstjackaudiosink.c | 24 ------------------ .../ext/jack/gstjackaudiosrc.c | 25 ------------------- .../gst-plugins-good/ext/jack/meson.build | 2 +- 3 files changed, 1 insertion(+), 50 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/jack/gstjackaudiosink.c b/subprojects/gst-plugins-good/ext/jack/gstjackaudiosink.c index aa150378df..ee433f2e19 100644 --- a/subprojects/gst-plugins-good/ext/jack/gstjackaudiosink.c +++ b/subprojects/gst-plugins-good/ext/jack/gstjackaudiosink.c @@ -653,7 +653,6 @@ gst_jack_ring_buffer_stop (GstAudioRingBuffer * buf) return TRUE; } -#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7) static guint gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) { @@ -673,29 +672,6 @@ gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) return res; } -#else /* !(defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)) */ -static guint -gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) -{ - GstJackAudioSink *sink; - guint i, res = 0; - guint latency; - jack_client_t *client; - - sink = GST_JACK_AUDIO_SINK (GST_OBJECT_PARENT (buf)); - client = gst_jack_audio_client_get_client (sink->client); - - for (i = 0; i < sink->port_count; i++) { - latency = jack_port_get_total_latency (client, sink->ports[i]); - if (latency > res) - res = latency; - } - - GST_LOG_OBJECT (sink, "delay %u", res); - - return res; -} -#endif static GstStaticPadTemplate jackaudiosink_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", diff --git a/subprojects/gst-plugins-good/ext/jack/gstjackaudiosrc.c b/subprojects/gst-plugins-good/ext/jack/gstjackaudiosrc.c index c3e9f11c05..3fcd0655a9 100644 --- a/subprojects/gst-plugins-good/ext/jack/gstjackaudiosrc.c +++ b/subprojects/gst-plugins-good/ext/jack/gstjackaudiosrc.c @@ -661,7 +661,6 @@ gst_jack_ring_buffer_stop (GstAudioRingBuffer * buf) return TRUE; } -#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7) static guint gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) { @@ -681,30 +680,6 @@ gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) return res; } -#else /* !(defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)) */ -static guint -gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) -{ - GstJackAudioSrc *src; - guint i, res = 0; - guint latency; - jack_client_t *client; - - src = GST_JACK_AUDIO_SRC (GST_OBJECT_PARENT (buf)); - - client = gst_jack_audio_client_get_client (src->client); - - for (i = 0; i < src->port_count; i++) { - latency = jack_port_get_total_latency (client, src->ports[i]); - if (latency > res) - res = latency; - } - - GST_DEBUG_OBJECT (src, "delay %u", res); - - return res; -} -#endif /* Audiosrc signals and args */ enum diff --git a/subprojects/gst-plugins-good/ext/jack/meson.build b/subprojects/gst-plugins-good/ext/jack/meson.build index 756cd3be33..fe67e74458 100644 --- a/subprojects/gst-plugins-good/ext/jack/meson.build +++ b/subprojects/gst-plugins-good/ext/jack/meson.build @@ -92,7 +92,7 @@ endif gstjack = library('gstjack', jack_sources, - c_args : gst_plugins_good_args + ['-DHAVE_JACK_1_9_7'], + c_args : gst_plugins_good_args, include_directories : jack_incdirs, dependencies : [gst_dep, gstbase_dep, gstaudio_dep, libjack_dep], install : true,