1 /* GStreamer 2 * Copyright (C) 2006 Wim Taymans <wim@fluendo.com> 3 * 4 * gstjack.h: 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef _GST_JACK_H_ 23 #define _GST_JACK_H_ 24 25 #include <jack/jack.h> 26 #include <gst/audio/audio.h> 27 28 GST_ELEMENT_REGISTER_DECLARE (jackaudiosrc); 29 GST_ELEMENT_REGISTER_DECLARE (jackaudiosink); 30 31 /** 32 * GstJackConnect: 33 * @GST_JACK_CONNECT_NONE: Don't automatically connect to physical ports. 34 * In this mode, the element will accept any number of input channels and will 35 * create (but not connect) an output port for each channel. 36 * @GST_JACK_CONNECT_AUTO: In this mode, the element will try to connect each 37 * output port to a random physical jack input pin. The sink will 38 * expose the number of physical channels on its pad caps. 39 * @GST_JACK_CONNECT_AUTO_FORCED: In this mode, the element will try to connect each 40 * output port to a random physical jack input pin. The element will accept any number 41 * of input channels. 42 * 43 * Specify how the output ports will be connected. 44 */ 45 typedef enum { 46 GST_JACK_CONNECT_NONE, 47 GST_JACK_CONNECT_AUTO, 48 GST_JACK_CONNECT_AUTO_FORCED, 49 50 /** 51 * GstJackConnect::explicit 52 * 53 * In this mode, the element will try to connect to explicitly requested 54 * port specified by "port-names". 55 * 56 * Since: 1.20 57 */ 58 GST_JACK_CONNECT_EXPLICIT, 59 } GstJackConnect; 60 61 /** 62 * GstJackTransport: 63 * @GST_JACK_TRANSPORT_AUTONOMOUS: no transport support 64 * @GST_JACK_TRANSPORT_MASTER: start and stop transport with state-changes 65 * @GST_JACK_TRANSPORT_SLAVE: follow transport state changes 66 * 67 * The jack transport state allow to sync multiple clients. This enum defines a 68 * client behaviour regarding to the transport mechanism. 69 */ 70 typedef enum { 71 GST_JACK_TRANSPORT_AUTONOMOUS = 0, 72 GST_JACK_TRANSPORT_MASTER = (1 << 0), 73 GST_JACK_TRANSPORT_SLAVE = (1 << 1), 74 } GstJackTransport; 75 76 typedef jack_default_audio_sample_t sample_t; 77 78 #define GST_TYPE_JACK_CONNECT (gst_jack_connect_get_type ()) 79 #define GST_TYPE_JACK_TRANSPORT (gst_jack_transport_get_type ()) 80 #define GST_TYPE_JACK_CLIENT (gst_jack_client_get_type ()) 81 82 #if G_BYTE_ORDER == G_LITTLE_ENDIAN 83 #define GST_JACK_FORMAT_STR "F32LE" 84 #else 85 #define GST_JACK_FORMAT_STR "F32BE" 86 #endif 87 88 GType gst_jack_client_get_type(void); 89 GType gst_jack_connect_get_type(void); 90 GType gst_jack_transport_get_type(void); 91 92 #endif // _GST_JACK_H_ 93