1 /* GStreamer
2  * Copyright (C) 2006 Wim Taymans <wim@fluendo.com>
3  *
4  * gstjacksink.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_AUDIO_SINK_H__
23 #define __GST_JACK_AUDIO_SINK_H__
24 
25 #include <jack/jack.h>
26 
27 #include <gst/gst.h>
28 #include <gst/audio/gstaudiobasesink.h>
29 
30 #include "gstjack.h"
31 #include "gstjackaudioclient.h"
32 
33 G_BEGIN_DECLS
34 
35 #define GST_TYPE_JACK_AUDIO_SINK             (gst_jack_audio_sink_get_type())
36 #define GST_JACK_AUDIO_SINK(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_JACK_AUDIO_SINK,GstJackAudioSink))
37 #define GST_JACK_AUDIO_SINK_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_JACK_AUDIO_SINK,GstJackAudioSinkClass))
38 #define GST_JACK_AUDIO_SINK_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_JACK_AUDIO_SINK,GstJackAudioSinkClass))
39 #define GST_IS_JACK_AUDIO_SINK(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JACK_AUDIO_SINK))
40 #define GST_IS_JACK_AUDIO_SINK_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JACK_AUDIO_SINK))
41 
42 typedef struct _GstJackAudioSink GstJackAudioSink;
43 typedef struct _GstJackAudioSinkClass GstJackAudioSinkClass;
44 
45 /**
46  * GstJackAudioSink:
47  *
48  * Opaque #GstJackAudioSink.
49  */
50 struct _GstJackAudioSink {
51   GstAudioBaseSink element;
52 
53   /*< private >*/
54   /* cached caps */
55   GstCaps         *caps;
56 
57   /* properties */
58   GstJackConnect   connect;
59   gchar           *server;
60   jack_client_t   *jclient;
61   gchar           *client_name;
62   gchar           *port_pattern;
63   guint            transport;
64 
65   /* our client */
66   GstJackAudioClient *client;
67 
68   /* our ports */
69   jack_port_t    **ports;
70   int              port_count;
71   sample_t       **buffers;
72 };
73 
74 struct _GstJackAudioSinkClass {
75   GstAudioBaseSinkClass parent_class;
76 };
77 
78 GType gst_jack_audio_sink_get_type (void);
79 
80 G_END_DECLS
81 
82 #endif /* __GST_JACK_AUDIO_SINK_H__ */
83