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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4348>
This commit is contained in:
Jordan Petridis 2023-04-05 19:36:15 +03:00 committed by GStreamer Marge Bot
parent 06478b79b1
commit 1c301df91a
3 changed files with 1 additions and 50 deletions

View file

@ -653,7 +653,6 @@ gst_jack_ring_buffer_stop (GstAudioRingBuffer * buf)
return TRUE; return TRUE;
} }
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
static guint static guint
gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf)
{ {
@ -673,29 +672,6 @@ gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf)
return res; 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 = static GstStaticPadTemplate jackaudiosink_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_PAD_TEMPLATE ("sink",

View file

@ -661,7 +661,6 @@ gst_jack_ring_buffer_stop (GstAudioRingBuffer * buf)
return TRUE; return TRUE;
} }
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
static guint static guint
gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf) gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf)
{ {
@ -681,30 +680,6 @@ gst_jack_ring_buffer_delay (GstAudioRingBuffer * buf)
return res; 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 */ /* Audiosrc signals and args */
enum enum

View file

@ -92,7 +92,7 @@ endif
gstjack = library('gstjack', gstjack = library('gstjack',
jack_sources, jack_sources,
c_args : gst_plugins_good_args + ['-DHAVE_JACK_1_9_7'], c_args : gst_plugins_good_args,
include_directories : jack_incdirs, include_directories : jack_incdirs,
dependencies : [gst_dep, gstbase_dep, gstaudio_dep, libjack_dep], dependencies : [gst_dep, gstbase_dep, gstaudio_dep, libjack_dep],
install : true, install : true,