summaryrefslogtreecommitdiffstats
path: root/ext/jack/gstjackbin.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2003-09-30 12:56:27 +0000
committerAndy Wingo <wingo@pobox.com>2003-09-30 12:56:27 +0000
commitc2b6b06e2cb33ba7966c6f16154788fc1d7ce6eb (patch)
tree1a86b90a424a43027ff1bd650893440b9b5a1264 /ext/jack/gstjackbin.c
parentf3b256d01f452827b8c0b40200f76a7fc0a43ed7 (diff)
downloadgst-plugins-bad-c2b6b06e2cb33ba7966c6f16154788fc1d7ce6eb.tar.gz
gst-plugins-bad-c2b6b06e2cb33ba7966c6f16154788fc1d7ce6eb.tar.bz2
gst-plugins-bad-c2b6b06e2cb33ba7966c6f16154788fc1d7ce6eb.zip
conform to the buffer-frames props entry -- much nicer now...
Original commit message from CVS: conform to the buffer-frames props entry -- much nicer now...
Diffstat (limited to 'ext/jack/gstjackbin.c')
-rw-r--r--ext/jack/gstjackbin.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/jack/gstjackbin.c b/ext/jack/gstjackbin.c
index 959f5867..01713a70 100644
--- a/ext/jack/gstjackbin.c
+++ b/ext/jack/gstjackbin.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset: 4 -*- */
/*
- Copyright (C) 2002 Andy Wingo <wingo@pobox.com>
+ Copyright (C) 2002, 2003 Andy Wingo <wingo@pobox.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -33,6 +33,7 @@ static GstElementStateReturn gst_jack_bin_change_state(GstElement *element);
/* jack callbacks */
static int process (jack_nframes_t nframes, void *arg);
static int sample_rate (jack_nframes_t nframes, void *arg);
+static int buffer_size (jack_nframes_t nframes, void *arg);
static void shutdown (void *arg);
static void sighup_handler (int sig);
@@ -133,6 +134,8 @@ gst_jack_bin_change_state (GstElement *element)
jack_set_process_callback (this->client, process, this);
jack_set_sample_rate_callback (this->client, sample_rate, this);
+ jack_set_buffer_size_callback (this->client, buffer_size, this);
+ this->nframes = jack_get_buffer_size (this->client);
jack_on_shutdown (this->client, shutdown, this);
}
@@ -291,6 +294,15 @@ sample_rate (jack_nframes_t nframes, void *arg)
return 0;
}
+static int
+buffer_size (jack_nframes_t nframes, void *arg)
+{
+ GstJackBin *bin = (GstJackBin*) arg;
+ JACK_DEBUG ("the buffer size is now %lu\n", nframes);
+ bin->nframes = nframes;
+ return 0;
+}
+
static void
shutdown (void *arg)
{