1 /* 2 * 3 * BlueZ - Bluetooth protocol stack for Linux 4 * 5 * Copyright (C) 2004-2010 Marcel Holtmann <marcel (at) 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 gchar *transport; 55 GIOChannel *stream; 56 57 struct bluetooth_data *data; 58 gboolean autoconnect; 59 GIOChannel *server; 60 61 /* mp3 stream data (outside caps data)*/ 62 gint mp3_using_crc; 63 gint channel_mode; 64 65 /* stream connection data */ 66 GstCaps *stream_caps; 67 68 GstCaps *dev_caps; 69 70 GMutex *sink_lock; 71 72 guint watch_id; 73 }; 74 75 struct _GstAvdtpSinkClass { 76 GstBaseSinkClass parent_class; 77 }; 78 79 GType gst_avdtp_sink_get_type(void); 80 81 GstCaps *gst_avdtp_sink_get_device_caps(GstAvdtpSink *sink); 82 gboolean gst_avdtp_sink_set_device_caps(GstAvdtpSink *sink, 83 GstCaps *caps); 84 85 guint gst_avdtp_sink_get_link_mtu(GstAvdtpSink *sink); 86 87 void gst_avdtp_sink_set_device(GstAvdtpSink *sink, 88 const gchar* device); 89 90 void gst_avdtp_sink_set_transport(GstAvdtpSink *sink, 91 const gchar *transport); 92 93 gchar *gst_avdtp_sink_get_device(GstAvdtpSink *sink); 94 95 gchar *gst_avdtp_sink_get_transport(GstAvdtpSink *sink); 96 97 gboolean gst_avdtp_sink_plugin_init(GstPlugin *plugin); 98 99 void gst_avdtp_sink_set_crc(GstAvdtpSink *self, gboolean crc); 100 101 void gst_avdtp_sink_set_channel_mode(GstAvdtpSink *self, 102 const gchar *mode); 103 104 105 G_END_DECLS 106 107 #endif /* __GST_AVDTP_SINK_H */ 108