aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorSean McGovern <gseanmcg@gmail.com>2012-06-11 18:22:31 -0400
committerDiego Biurrun <diego@biurrun.de>2012-06-13 10:59:22 +0200
commit8772997d102024b23fc820e3e5d9b96b4d309092 (patch)
tree8b7918bcf38c9d575ba5ccc5237a64ae7b917c6b /libavdevice
parent053386864219eccbcca1886c55f902f9555428a5 (diff)
downloadffmpeg-8772997d102024b23fc820e3e5d9b96b4d309092.tar.gz
jack: update to new latency range API as the old one has been deprecated
Fixes Bugzilla #279. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/jack_audio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index 9f1bb23c3b..85f9f09740 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -91,7 +91,13 @@ static int process_callback(jack_nframes_t nframes, void *arg)
/* Copy and interleave audio data from the JACK buffer into the packet */
for (i = 0; i < self->nports; i++) {
+ #if HAVE_JACK_PORT_GET_LATENCY_RANGE
+ jack_latency_range_t range;
+ jack_port_get_latency_range(self->ports[i], JackCaptureLatency, &range);
+ latency += range.max;
+ #else
latency += jack_port_get_total_latency(self->client, self->ports[i]);
+ #endif
buffer = jack_port_get_buffer(self->ports[i], self->buffer_size);
for (j = 0; j < self->buffer_size; j++)
pkt_data[j * self->nports + i] = buffer[j];