Home | History | Annotate | Download | only in audio
      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_A2DP_SINK_H__
     25 #define __GST_A2DP_SINK_H__
     26 
     27 #include <gst/gst.h>
     28 #include <gst/rtp/gstbasertppayload.h>
     29 #include "gstavdtpsink.h"
     30 
     31 G_BEGIN_DECLS
     32 
     33 #define GST_TYPE_A2DP_SINK \
     34 	(gst_a2dp_sink_get_type())
     35 #define GST_A2DP_SINK(obj) \
     36 	(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_A2DP_SINK,GstA2dpSink))
     37 #define GST_A2DP_SINK_CLASS(klass) \
     38 	(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_A2DP_SINK,GstA2dpSinkClass))
     39 #define GST_IS_A2DP_SINK(obj) \
     40 	(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_A2DP_SINK))
     41 #define GST_IS_A2DP_SINK_CLASS(obj) \
     42 	(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_A2DP_SINK))
     43 
     44 typedef struct _GstA2dpSink GstA2dpSink;
     45 typedef struct _GstA2dpSinkClass GstA2dpSinkClass;
     46 
     47 struct _GstA2dpSink {
     48 	GstBin bin;
     49 
     50 	GstBaseRTPPayload *rtp;
     51 	GstAvdtpSink *sink;
     52 	GstElement *capsfilter;
     53 	GstElement *fakesink;
     54 
     55 	gchar *device;
     56 	gchar *transport;
     57 	gboolean autoconnect;
     58 	gboolean sink_is_in_bin;
     59 
     60 	GstGhostPad *ghostpad;
     61 	GstPadSetCapsFunction ghostpad_setcapsfunc;
     62 	GstPadEventFunction ghostpad_eventfunc;
     63 
     64 	GstEvent *newseg_event;
     65 	/* Store the tags received before the a2dpsender sink is created
     66 	 * when it is created we forward this to it */
     67 	GstTagList *taglist;
     68 
     69 	GMutex *cb_mutex;
     70 };
     71 
     72 struct _GstA2dpSinkClass {
     73 	GstBinClass parent_class;
     74 };
     75 
     76 GType gst_a2dp_sink_get_type(void);
     77 
     78 gboolean gst_a2dp_sink_plugin_init (GstPlugin * plugin);
     79 
     80 GstCaps *gst_a2dp_sink_get_device_caps(GstA2dpSink *self);
     81 
     82 G_END_DECLS
     83 
     84 #endif
     85 
     86