Re: gst-plugins-good: jack: fix build against jack 0.120.2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: gst-plugins-good: jack: fix build against jack 0.120.2

Stefan Sauer
Am 11.03.2011 11:55, schrieb Tim MXXller:

> Module: gst-plugins-good
> Branch: master
> Commit: 9544622674c0d0a3147a9b51145159b02eec68e9
> URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9544622674c0d0a3147a9b51145159b02eec68e9
>
> Author: Philippe Normand <[hidden email]>
> Date:   Fri Mar 11 10:29:08 2011 +0100
>
> jack: fix build against jack 0.120.2
>
> jack_port_get_total_latency() has been deprecated in favor of
> jack_port_get_latency_range().
>
> https://bugzilla.gnome.org/show_bug.cgi?id=644477
>
> ---
>
>  configure.ac                |    6 ++++++
>  ext/jack/gstjackaudiosink.c |   15 +++++++++++++--
>  ext/jack/gstjackaudiosrc.c  |   13 ++++++++++++-
>  3 files changed, 31 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 422ee16..bd6cbb0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -766,6 +766,12 @@ AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
>    PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
>    AC_SUBST(JACK_CFLAGS)
>    AC_SUBST(JACK_LIBS)
> +
> +  AG_GST_PKG_CHECK_MODULES(JACK_0_120_2, jack >= 0.120.2)
> +  if test x$HAVE_JACK_0_120_2 = xyes; then
> +    AC_DEFINE(HAVE_JACK_0_120_2, 1, [defined if jack >= 0.120.2 is available])
> +  fi
> +
>  ])


What kind of jack versions are you cehcking against here. Seems to be jack1
still. I am trying to investigate in parallel.

Stefan

configure: *** checking feature: Jack ***
configure: *** for plug-ins: jack ***
checking for JACK... yes
checking for JACK_0_120_2... yes
configure: *** These plugins will be built: jack

pkg-config --modversion jack
1.9.5


make[3]: Entering directory
`/home/ensonic/projects/gstreamer/gst-plugins-good/ext/jack'
  CC     libgstjack_la-gstjack.lo
  CC     libgstjack_la-gstjackaudiosrc.lo
gstjackaudiosrc.c: In function ‘gst_jack_ring_buffer_delay’:
gstjackaudiosrc.c:608:3: error: ‘jack_latency_range_t’ undeclared (first use in
this function)
gstjackaudiosrc.c:608:3: note: each undeclared identifier is reported only once
for each function it appears in
gstjackaudiosrc.c:608:24: error: expected ‘;’ before ‘range’
cc1: warnings being treated as errors
gstjackaudiosrc.c:612:3: error: ISO C90 forbids mixed declarations and code
gstjackaudiosrc.c:619:5: error: implicit declaration of function
‘jack_port_get_latency_range’
gstjackaudiosrc.c:619:5: error: nested extern declaration of
‘jack_port_get_latency_range’
gstjackaudiosrc.c:619:49: error: ‘JackCaptureLatency’ undeclared (first use in
this function)
gstjackaudiosrc.c:619:70: error: ‘range’ undeclared (first use in this function)



>  
>  dnl *** jpeg ***
> diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c
> index 4620bce..0abcfe7 100644
> --- a/ext/jack/gstjackaudiosink.c
> +++ b/ext/jack/gstjackaudiosink.c
> @@ -592,16 +592,27 @@ static guint
>  gst_jack_ring_buffer_delay (GstRingBuffer * buf)
>  {
>    GstJackAudioSink *sink;
> -  guint i, res = 0, latency;
> +  guint i, res = 0;
> +#ifdef HAVE_JACK_0_120_2
> +  jack_latency_range_t range;
> +#else
> +  guint latency;
> +#endif
>    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]);
> +#ifdef HAVE_JACK_0_120_2
> +    jack_port_get_latency_range (sink->ports[i], JackPlaybackLatency, &range);
> +    if (range.max > res)
> +      res = range.max;
> +#else
> +    latency = jack_port_get_total_latency (client, src->ports[i]);
>      if (latency > res)
>        res = latency;
> +#endif
>    }
>  
>    GST_LOG_OBJECT (sink, "delay %u", res);
> diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c
> index 08b325e..b484057 100644
> --- a/ext/jack/gstjackaudiosrc.c
> +++ b/ext/jack/gstjackaudiosrc.c
> @@ -603,16 +603,27 @@ static guint
>  gst_jack_ring_buffer_delay (GstRingBuffer * buf)
>  {
>    GstJackAudioSrc *src;
> -  guint i, res = 0, latency;
> +  guint i, res = 0;
> +#ifdef HAVE_JACK_0_120_2
> +  jack_latency_range_t range;
> +#else
> +  guint latency;
> +#endif
>    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++) {
> +#ifdef HAVE_JACK_0_120_2
> +    jack_port_get_latency_range (src->ports[i], JackCaptureLatency, &range);
> +    if (range.max > res)
> +      res = range.max;
> +#else
>      latency = jack_port_get_total_latency (client, src->ports[i]);
>      if (latency > res)
>        res = latency;
> +#endif
>    }
>  
>    GST_DEBUG_OBJECT (src, "delay %u", res);
>
> _______________________________________________
> gstreamer-commits mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst-plugins-good: jack: fix build against jack 0.120.2

Stefan Sauer
hi,

On 24.03.2011 23:38, Stefan Kost wrote:

> Am 11.03.2011 11:55, schrieb Tim MXXller:
>> Module: gst-plugins-good
>> Branch: master
>> Commit: 9544622674c0d0a3147a9b51145159b02eec68e9
>> URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9544622674c0d0a3147a9b51145159b02eec68e9
>>
>> Author: Philippe Normand <[hidden email]>
>> Date:   Fri Mar 11 10:29:08 2011 +0100
>>
>> jack: fix build against jack 0.120.2
>>
>> jack_port_get_total_latency() has been deprecated in favor of
>> jack_port_get_latency_range().
>>
>> https://bugzilla.gnome.org/show_bug.cgi?id=644477
>>
>> ---
>>
>>  configure.ac                |    6 ++++++
>>  ext/jack/gstjackaudiosink.c |   15 +++++++++++++--
>>  ext/jack/gstjackaudiosrc.c  |   13 ++++++++++++-
>>  3 files changed, 31 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 422ee16..bd6cbb0 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -766,6 +766,12 @@ AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
>>    PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
>>    AC_SUBST(JACK_CFLAGS)
>>    AC_SUBST(JACK_LIBS)
>> +
>> +  AG_GST_PKG_CHECK_MODULES(JACK_0_120_2, jack >= 0.120.2)
>> +  if test x$HAVE_JACK_0_120_2 = xyes; then
>> +    AC_DEFINE(HAVE_JACK_0_120_2, 1, [defined if jack >= 0.120.2 is available])
>> +  fi
>> +
>>  ])
>
> What kind of jack versions are you cehcking against here. Seems to be jack1
> still. I am trying to investigate in parallel.
Preliminary status. Build is okay again for me. I have jack 1.9.5 on
opensuse-11.3 and jack 1.9.7 from some PPA on ubuntu. Both are so called
jack2 variants and don't have the new api yet. There is no official
1.9.7 out (the official 1.9.7 is supposed to have the new api according
to folks on irc). The 0.120.2 is jack1. It is a mess :/

Stefan

> Stefan
>
> configure: *** checking feature: Jack ***
> configure: *** for plug-ins: jack ***
> checking for JACK... yes
> checking for JACK_0_120_2... yes
> configure: *** These plugins will be built: jack
>
> pkg-config --modversion jack
> 1.9.5
>
>
> make[3]: Entering directory
> `/home/ensonic/projects/gstreamer/gst-plugins-good/ext/jack'
>   CC     libgstjack_la-gstjack.lo
>   CC     libgstjack_la-gstjackaudiosrc.lo
> gstjackaudiosrc.c: In function ‘gst_jack_ring_buffer_delay’:
> gstjackaudiosrc.c:608:3: error: ‘jack_latency_range_t’ undeclared (first use in
> this function)
> gstjackaudiosrc.c:608:3: note: each undeclared identifier is reported only once
> for each function it appears in
> gstjackaudiosrc.c:608:24: error: expected ‘;’ before ‘range’
> cc1: warnings being treated as errors
> gstjackaudiosrc.c:612:3: error: ISO C90 forbids mixed declarations and code
> gstjackaudiosrc.c:619:5: error: implicit declaration of function
> ‘jack_port_get_latency_range’
> gstjackaudiosrc.c:619:5: error: nested extern declaration of
> ‘jack_port_get_latency_range’
> gstjackaudiosrc.c:619:49: error: ‘JackCaptureLatency’ undeclared (first use in
> this function)
> gstjackaudiosrc.c:619:70: error: ‘range’ undeclared (first use in this function)
>
>
>
>>  
>>  dnl *** jpeg ***
>> diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c
>> index 4620bce..0abcfe7 100644
>> --- a/ext/jack/gstjackaudiosink.c
>> +++ b/ext/jack/gstjackaudiosink.c
>> @@ -592,16 +592,27 @@ static guint
>>  gst_jack_ring_buffer_delay (GstRingBuffer * buf)
>>  {
>>    GstJackAudioSink *sink;
>> -  guint i, res = 0, latency;
>> +  guint i, res = 0;
>> +#ifdef HAVE_JACK_0_120_2
>> +  jack_latency_range_t range;
>> +#else
>> +  guint latency;
>> +#endif
>>    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]);
>> +#ifdef HAVE_JACK_0_120_2
>> +    jack_port_get_latency_range (sink->ports[i], JackPlaybackLatency, &range);
>> +    if (range.max > res)
>> +      res = range.max;
>> +#else
>> +    latency = jack_port_get_total_latency (client, src->ports[i]);
>>      if (latency > res)
>>        res = latency;
>> +#endif
>>    }
>>  
>>    GST_LOG_OBJECT (sink, "delay %u", res);
>> diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c
>> index 08b325e..b484057 100644
>> --- a/ext/jack/gstjackaudiosrc.c
>> +++ b/ext/jack/gstjackaudiosrc.c
>> @@ -603,16 +603,27 @@ static guint
>>  gst_jack_ring_buffer_delay (GstRingBuffer * buf)
>>  {
>>    GstJackAudioSrc *src;
>> -  guint i, res = 0, latency;
>> +  guint i, res = 0;
>> +#ifdef HAVE_JACK_0_120_2
>> +  jack_latency_range_t range;
>> +#else
>> +  guint latency;
>> +#endif
>>    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++) {
>> +#ifdef HAVE_JACK_0_120_2
>> +    jack_port_get_latency_range (src->ports[i], JackCaptureLatency, &range);
>> +    if (range.max > res)
>> +      res = range.max;
>> +#else
>>      latency = jack_port_get_total_latency (client, src->ports[i]);
>>      if (latency > res)
>>        res = latency;
>> +#endif
>>    }
>>  
>>    GST_DEBUG_OBJECT (src, "delay %u", res);
>>
>> _______________________________________________
>> gstreamer-commits mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel