diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-03-16 11:21:02 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-03-23 17:07:16 +0100 |
commit | 13bc8b8c03d3a8291ef75c0c89b16079e084c174 (patch) | |
tree | 641ddfbcc15e1a18dea72a3a9195bdea34b2aa96 /ext/jack/gstjackaudiosrc.c | |
parent | 276228da806728723fecde73b539c0c33863d761 (diff) | |
download | gst-plugins-bad-13bc8b8c03d3a8291ef75c0c89b16079e084c174.tar.gz gst-plugins-bad-13bc8b8c03d3a8291ef75c0c89b16079e084c174.tar.bz2 gst-plugins-bad-13bc8b8c03d3a8291ef75c0c89b16079e084c174.zip |
jack: Add new connection mode
Add a new connection mode to jacksrc and jacksink. In this new auto-force
connection mode jack will create as many ports as requested/needed in the
pipeline and will then connect as many physical ports as possible, possibly
leaving some ports unconnected.
Also get rid of some leftover g_print.
Fixes #575284.
Diffstat (limited to 'ext/jack/gstjackaudiosrc.c')
-rw-r--r-- | ext/jack/gstjackaudiosrc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c index 682a684a..ca4bf73f 100644 --- a/ext/jack/gstjackaudiosrc.c +++ b/ext/jack/gstjackaudiosrc.c @@ -233,7 +233,6 @@ jack_process_cb (jack_nframes_t nframes, void *arg) /* the samples in the jack input buffers have to be interleaved into the * ringbuffer */ - for (i = 0; i < nframes; ++i) for (j = 0; j < channels; ++j) *data++ = buffers[j][i]; @@ -458,7 +457,8 @@ gst_jack_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec) /* if we need to automatically connect the ports, do so now. We must do this * after activating the client. */ - if (src->connect == GST_JACK_CONNECT_AUTO) { + if (src->connect == GST_JACK_CONNECT_AUTO + || src->connect == GST_JACK_CONNECT_AUTO_FORCED) { /* find all the physical output ports. A physical output port is a port * associated with a hardware device. Someone needs connect to a physical * port in order to capture something. */ @@ -483,10 +483,9 @@ gst_jack_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec) } GST_DEBUG_OBJECT (src, "try connecting to %s", jack_port_name (src->ports[i])); - /* connect the physical port to a port */ + /* connect the physical port to a port */ res = jack_connect (client, ports[i], jack_port_name (src->ports[i])); - g_print ("connecting to %s\n", jack_port_name (src->ports[i])); if (res != 0 && res != EEXIST) goto cannot_connect; } |