• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  *  BlueZ - Bluetooth protocol stack for Linux
4  *
5  *  Copyright (C) 2004-2009  Marcel Holtmann <marcel@holtmann.org>
6  *
7  *
8  *  This library is free software; you can redistribute it and/or
9  *  modify it under the terms of the GNU Lesser General Public
10  *  License as published by the Free Software Foundation; either
11  *  version 2.1 of the License, or (at your option) any later version.
12  *
13  *  This library is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  *  Lesser General Public License for more details.
17  *
18  *  You should have received a copy of the GNU Lesser General Public
19  *  License along with this library; if not, write to the Free Software
20  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21  *
22  */
23 
24 #ifndef __GST_AVDTP_SINK_H
25 #define __GST_AVDTP_SINK_H
26 
27 #include <gst/gst.h>
28 #include <gst/base/gstbasesink.h>
29 
30 G_BEGIN_DECLS
31 
32 #define GST_TYPE_AVDTP_SINK \
33 	(gst_avdtp_sink_get_type())
34 #define GST_AVDTP_SINK(obj) \
35 	(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AVDTP_SINK,\
36 		GstAvdtpSink))
37 #define GST_AVDTP_SINK_CLASS(klass) \
38 	(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AVDTP_SINK,\
39 		GstAvdtpSinkClass))
40 #define GST_IS_AVDTP_SINK(obj) \
41 	(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AVDTP_SINK))
42 #define GST_IS_AVDTP_SINK_CLASS(obj) \
43 	(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AVDTP_SINK))
44 
45 typedef struct _GstAvdtpSink GstAvdtpSink;
46 typedef struct _GstAvdtpSinkClass GstAvdtpSinkClass;
47 
48 struct bluetooth_data;
49 
50 struct _GstAvdtpSink {
51 	GstBaseSink sink;
52 
53 	gchar *device;
54 	GIOChannel *stream;
55 
56 	struct bluetooth_data *data;
57 	gboolean autoconnect;
58 	GIOChannel *server;
59 
60 	/* mp3 stream data (outside caps data)*/
61 	gint mp3_using_crc;
62 	gint channel_mode;
63 
64 	/* stream connection data */
65 	GstCaps *stream_caps;
66 
67 	GstCaps *dev_caps;
68 
69 	GMutex *sink_lock;
70 
71 	guint watch_id;
72 };
73 
74 struct _GstAvdtpSinkClass {
75 	GstBaseSinkClass parent_class;
76 };
77 
78 //GType gst_avdtp_sink_get_type(void);
79 
80 GstCaps *gst_avdtp_sink_get_device_caps(GstAvdtpSink *sink);
81 gboolean gst_avdtp_sink_set_device_caps(GstAvdtpSink *sink,
82 			GstCaps *caps);
83 
84 guint gst_avdtp_sink_get_link_mtu(GstAvdtpSink *sink);
85 
86 void gst_avdtp_sink_set_device(GstAvdtpSink *sink,
87 		const gchar* device);
88 
89 gchar *gst_avdtp_sink_get_device(GstAvdtpSink *sink);
90 
91 gboolean gst_avdtp_sink_plugin_init(GstPlugin *plugin);
92 
93 void gst_avdtp_sink_set_crc(GstAvdtpSink *self, gboolean crc);
94 
95 void gst_avdtp_sink_set_channel_mode(GstAvdtpSink *self,
96 			const gchar *mode);
97 
98 
99 G_END_DECLS
100 
101 #endif /* __GST_AVDTP_SINK_H */
102