1 /* GStreamer Jack plugins
2 * Copyright (C) 2006 Wim Taymans <wim@fluendo.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
25 #include "gstjackaudiosrc.h"
26 #include "gstjackaudiosink.h"
29 gst_jack_connect_get_type (void)
31 static volatile gsize jack_connect_type = 0;
33 if (g_once_init_enter (&jack_connect_type)) {
34 static const GEnumValue jack_connect_enums[] = {
35 {GST_JACK_CONNECT_NONE,
36 "Don't automatically connect ports to physical ports", "none"},
37 {GST_JACK_CONNECT_AUTO,
38 "Automatically connect ports to physical ports", "auto"},
39 {GST_JACK_CONNECT_AUTO_FORCED,
40 "Automatically connect ports to as many physical ports as possible",
44 GType tmp = g_enum_register_static ("GstJackConnect", jack_connect_enums);
45 g_once_init_leave (&jack_connect_type, tmp);
47 return (GType) jack_connect_type;
51 gst_jack_transport_get_type (void)
53 static volatile gsize type = 0;
55 if (g_once_init_enter (&type)) {
56 static const GFlagsValue flag_values[] = {
57 {GST_JACK_TRANSPORT_MASTER,
58 "Start and stop transport with state changes", "master"},
59 {GST_JACK_TRANSPORT_SLAVE,
60 "Follow transport state changes", "slave"},
63 GType tmp = g_flags_register_static ("GstJackTransport", flag_values);
64 g_once_init_leave (&type, tmp);
71 gst_jack_client_copy (gpointer jclient)
78 gst_jack_client_free (gpointer jclient)
85 gst_jack_client_get_type (void)
87 static volatile gsize jack_client_type = 0;
89 if (g_once_init_enter (&jack_client_type)) {
90 /* hackish, but makes it show up nicely in gst-inspect */
91 GType tmp = g_boxed_type_register_static ("JackClient",
92 (GBoxedCopyFunc) gst_jack_client_copy,
93 (GBoxedFreeFunc) gst_jack_client_free);
94 g_once_init_leave (&jack_client_type, tmp);
97 return (GType) jack_client_type;
101 plugin_init (GstPlugin * plugin)
103 if (!gst_element_register (plugin, "jackaudiosrc", GST_RANK_PRIMARY,
104 GST_TYPE_JACK_AUDIO_SRC))
106 if (!gst_element_register (plugin, "jackaudiosink", GST_RANK_PRIMARY,
107 GST_TYPE_JACK_AUDIO_SINK))
113 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
116 "JACK audio elements",
117 plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)