From 73b35c403df78c10e03ded497fcb16fcb23b822e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 22 Aug 2007 21:50:59 +0000 Subject: Add skeleton for an A2DP sink element --- audio/gsta2dpsink.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 audio/gsta2dpsink.h (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h new file mode 100644 index 00000000..9630c11a --- /dev/null +++ b/audio/gsta2dpsink.h @@ -0,0 +1,53 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2007 Marcel Holtmann + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include + +G_BEGIN_DECLS + +#define GST_TYPE_A2DP_SINK \ + (gst_a2dpsink_get_type()) +#define GST_A2DP_SINK(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_A2DP_SINK,GstA2dpSink)) +#define GST_A2DP_SINK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_A2DP_SINK,GstA2dpSinkClass)) +#define GST_IS_A2DP_SINK(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_A2DP_SINK)) +#define GST_IS_A2DP_SINK_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_A2DP_SINK)) + +typedef struct _GstA2dpSink GstA2dpSink; +typedef struct _GstA2dpSinkClass GstA2dpSinkClass; + +struct _GstA2dpSink { + GstAudioSink sink; +}; + +struct _GstA2dpSinkClass { + GstAudioSinkClass parent_class; +}; + +GType gst_a2dpsink_get_type(void); + +G_END_DECLS -- cgit From 0a527f667ae62ac335f22d1d053179b20ff26e94 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 23 Aug 2007 19:12:23 +0000 Subject: Add SBC encoder and decoder skeletons for GStreamer --- audio/gsta2dpsink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index 9630c11a..9575bc44 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -27,7 +27,7 @@ G_BEGIN_DECLS #define GST_TYPE_A2DP_SINK \ - (gst_a2dpsink_get_type()) + (gst_a2dp_sink_get_type()) #define GST_A2DP_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_A2DP_SINK,GstA2dpSink)) #define GST_A2DP_SINK_CLASS(klass) \ @@ -48,6 +48,6 @@ struct _GstA2dpSinkClass { GstAudioSinkClass parent_class; }; -GType gst_a2dpsink_get_type(void); +GType gst_a2dp_sink_get_type(void); G_END_DECLS -- cgit From aea33a86fd7cced1796504c2a62f33c7a801a10e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 26 Aug 2007 14:14:34 +0000 Subject: Add possible capabilities and connect to audio server --- audio/gsta2dpsink.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index 9575bc44..c83ec66c 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -42,6 +42,10 @@ typedef struct _GstA2dpSinkClass GstA2dpSinkClass; struct _GstA2dpSink { GstAudioSink sink; + + gchar *device; + + GIOChannel *server; }; struct _GstA2dpSinkClass { -- cgit From 942422b8c90ba6e30339ab066cdc7fd2fc31cb7c Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 18 Oct 2007 21:50:00 +0000 Subject: Fixes a2dpsink element. --- audio/gsta2dpsink.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index c83ec66c..6c7cfe2a 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -22,7 +22,7 @@ */ #include -#include +#include G_BEGIN_DECLS @@ -37,19 +37,41 @@ G_BEGIN_DECLS #define GST_IS_A2DP_SINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_A2DP_SINK)) +enum { + NOT_CONFIGURED, + CONFIGURING_INIT, + CONFIGURING_SENT_CONF, + CONFIGURING_RCVD_CONF_RSP, + CONFIGURING_RCVD_DEV_CONF, + CONFIGURED +}; + typedef struct _GstA2dpSink GstA2dpSink; typedef struct _GstA2dpSinkClass GstA2dpSinkClass; +struct bluetooth_data; + struct _GstA2dpSink { - GstAudioSink sink; + GstBaseSink sink; gchar *device; + GIOChannel *stream; + struct bluetooth_data *data; GIOChannel *server; + + gint con_state; + + GCond *con_conf_end; + gboolean waiting_con_conf; + GMutex *sink_lock; + + gint total; + }; struct _GstA2dpSinkClass { - GstAudioSinkClass parent_class; + GstBaseSinkClass parent_class; }; GType gst_a2dp_sink_get_type(void); -- cgit From d05be53901f38d2e64c63283e4837b20f8e916b6 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 24 Oct 2007 21:13:12 +0000 Subject: Fix a2dpsink coding style problems and improve compatibility with some players. --- audio/gsta2dpsink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index 6c7cfe2a..c9bcabd1 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -67,7 +67,7 @@ struct _GstA2dpSink { GMutex *sink_lock; gint total; - + guint watch_id; }; struct _GstA2dpSinkClass { -- cgit From 6a7bdf306c26ac5663ecd9f1637839a7dd0141d4 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 25 Oct 2007 21:07:50 +0000 Subject: Fix buffer usage. --- audio/gsta2dpsink.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index c9bcabd1..76d512b9 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -37,15 +37,6 @@ G_BEGIN_DECLS #define GST_IS_A2DP_SINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_A2DP_SINK)) -enum { - NOT_CONFIGURED, - CONFIGURING_INIT, - CONFIGURING_SENT_CONF, - CONFIGURING_RCVD_CONF_RSP, - CONFIGURING_RCVD_DEV_CONF, - CONFIGURED -}; - typedef struct _GstA2dpSink GstA2dpSink; typedef struct _GstA2dpSinkClass GstA2dpSinkClass; @@ -66,7 +57,6 @@ struct _GstA2dpSink { gboolean waiting_con_conf; GMutex *sink_lock; - gint total; guint watch_id; }; -- cgit From 96d6078ada20a76f885ea04893aac5f0ca5fe48d Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 1 Nov 2007 19:45:00 +0000 Subject: Fix sbc negotiation and improves buffer handling by using GstAdapter. --- audio/gsta2dpsink.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index 76d512b9..ea750406 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -49,9 +49,12 @@ struct _GstA2dpSink { GIOChannel *stream; struct bluetooth_data *data; + struct ipc_codec_sbc *sbc; GIOChannel *server; gint con_state; + GstCaps *dev_caps; + gboolean new_dev_caps; GCond *con_conf_end; gboolean waiting_con_conf; -- cgit From d4e24bf6a3d8af6479abce92fbbf1869a59669aa Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 21 Nov 2007 20:24:11 +0000 Subject: Integrate new ipc API implementation. --- audio/gsta2dpsink.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index ea750406..f5b9b69b 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -49,15 +49,13 @@ struct _GstA2dpSink { GIOChannel *stream; struct bluetooth_data *data; - struct ipc_codec_sbc *sbc; GIOChannel *server; - gint con_state; + /* stream connection data */ + GstCaps *stream_caps; + GstCaps *dev_caps; - gboolean new_dev_caps; - GCond *con_conf_end; - gboolean waiting_con_conf; GMutex *sink_lock; guint watch_id; -- cgit From a0af7ee44534dad8f35a4142c6a22177e54ffc57 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 23 Jan 2008 13:14:02 +0000 Subject: Make a2dpsink to act like a bin and split the payloader. --- audio/gsta2dpsink.h | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index f5b9b69b..4bf9d603 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -22,7 +22,8 @@ */ #include -#include +#include +#include "gsta2dpsendersink.h" G_BEGIN_DECLS @@ -40,31 +41,27 @@ G_BEGIN_DECLS typedef struct _GstA2dpSink GstA2dpSink; typedef struct _GstA2dpSinkClass GstA2dpSinkClass; -struct bluetooth_data; - struct _GstA2dpSink { - GstBaseSink sink; - - gchar *device; - GIOChannel *stream; + GstBin bin; - struct bluetooth_data *data; - GIOChannel *server; + GstBaseRTPPayload *rtp; + GstA2dpSenderSink *sink; + GstElement *capsfilter; - /* stream connection data */ - GstCaps *stream_caps; - - GstCaps *dev_caps; + gchar *device; - GMutex *sink_lock; + GstGhostPad *ghostpad; + GstPadSetCapsFunction ghostpad_setcapsfunc; + GstPadEventFunction ghostpad_eventfunc; - guint watch_id; + GstEvent *newseg_event; }; struct _GstA2dpSinkClass { - GstBaseSinkClass parent_class; + GstBinClass parent_class; }; GType gst_a2dp_sink_get_type(void); +gboolean gst_a2dp_sink_plugin_init (GstPlugin * plugin); G_END_DECLS -- cgit From de8b4e7ab91bad2c1c6e796f53d4e69ecbadd0bd Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 23 Jan 2008 13:19:32 +0000 Subject: Add mp3 support for gstreamer plugin. --- audio/gsta2dpsink.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index 4bf9d603..f74185ef 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -47,6 +47,7 @@ struct _GstA2dpSink { GstBaseRTPPayload *rtp; GstA2dpSenderSink *sink; GstElement *capsfilter; + GstElement *mpegparse; gchar *device; @@ -55,6 +56,9 @@ struct _GstA2dpSink { GstPadEventFunction ghostpad_eventfunc; GstEvent *newseg_event; + /* Store the tags received before the a2dpsender sink is created + * when it is created we forward this to it */ + GstTagList *taglist; }; struct _GstA2dpSinkClass { -- cgit From f978653b315bc6d9d029dae1206085ba579fced4 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 23 Jan 2008 13:23:01 +0000 Subject: Bug fixes for gstreamer plugin. --- audio/gsta2dpsink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index f74185ef..368f837a 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -47,9 +47,9 @@ struct _GstA2dpSink { GstBaseRTPPayload *rtp; GstA2dpSenderSink *sink; GstElement *capsfilter; - GstElement *mpegparse; gchar *device; + gboolean sink_is_in_bin; GstGhostPad *ghostpad; GstPadSetCapsFunction ghostpad_setcapsfunc; -- cgit From e8e68d294cd662970de6082473e30ecd6ee8dd61 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 23 Jan 2008 15:18:15 +0000 Subject: Rename a2dpsendersink to avdtpsink. --- audio/gsta2dpsink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index 368f837a..26da4c47 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -23,7 +23,7 @@ #include #include -#include "gsta2dpsendersink.h" +#include "gstavdtpsink.h" G_BEGIN_DECLS @@ -45,7 +45,7 @@ struct _GstA2dpSink { GstBin bin; GstBaseRTPPayload *rtp; - GstA2dpSenderSink *sink; + GstAvdtpSink *sink; GstElement *capsfilter; gchar *device; -- cgit From 1f9f22f64d5e7c66c6e2d20452f6e5918d0020fb Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 23 Jan 2008 19:17:33 +0000 Subject: Fix use of gstreamer plugin with rhythmbox and banshee and rtp timestamps. --- audio/gsta2dpsink.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index 26da4c47..d79307b2 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -25,6 +25,9 @@ #include #include "gstavdtpsink.h" +#ifndef __GST_A2DP_SINK_H__ +#define __GST_A2DP_SINK_H__ + G_BEGIN_DECLS #define GST_TYPE_A2DP_SINK \ @@ -47,6 +50,7 @@ struct _GstA2dpSink { GstBaseRTPPayload *rtp; GstAvdtpSink *sink; GstElement *capsfilter; + GstElement *fakesink; gchar *device; gboolean sink_is_in_bin; @@ -59,6 +63,8 @@ struct _GstA2dpSink { /* Store the tags received before the a2dpsender sink is created * when it is created we forward this to it */ GstTagList *taglist; + + GMutex *cb_mutex; }; struct _GstA2dpSinkClass { @@ -68,4 +74,9 @@ struct _GstA2dpSinkClass { GType gst_a2dp_sink_get_type(void); gboolean gst_a2dp_sink_plugin_init (GstPlugin * plugin); +GstCaps *gst_a2dp_sink_get_device_caps(GstA2dpSink *self); + G_END_DECLS + +#endif + -- cgit From 6c4268df1dff13f3b1a7b778eb2e993648bff519 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 30 Jan 2008 17:30:27 +0000 Subject: Enable gstreamer plugin to use autoconnect flag. --- audio/gsta2dpsink.h | 1 + 1 file changed, 1 insertion(+) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index d79307b2..cf11d43e 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -53,6 +53,7 @@ struct _GstA2dpSink { GstElement *fakesink; gchar *device; + gboolean autoconnect; gboolean sink_is_in_bin; GstGhostPad *ghostpad; -- cgit From e823c15e43a6f924779e466d434c51157002d9ee Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 2 Feb 2008 03:37:05 +0000 Subject: Update copyright information --- audio/gsta2dpsink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/gsta2dpsink.h') diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h index cf11d43e..13409232 100644 --- a/audio/gsta2dpsink.h +++ b/audio/gsta2dpsink.h @@ -2,7 +2,7 @@ * * BlueZ - Bluetooth protocol stack for Linux * - * Copyright (C) 2004-2007 Marcel Holtmann + * Copyright (C) 2004-2008 Marcel Holtmann * * * This library is free software; you can redistribute it and/or -- cgit