summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-08-22 14:09:24 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-08-22 14:09:24 +0000
commit674a1d6355ebd5c1e9ffc2e7663b747f60ac70b5 (patch)
treec28034068b828d30507e2440e1f9008440684a83
parent656d22e0c137ed29481d164c018c58137b610e52 (diff)
Add skeleton for GStreamer plugin
-rw-r--r--acinclude.m42
-rw-r--r--audio/Makefile.am16
-rw-r--r--audio/gstbluetooth.c41
3 files changed, 58 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 428cbd82..0226037d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -113,6 +113,8 @@ AC_DEFUN([AC_PATH_GSTREAMER], [
PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, gstreamer_found=yes, gstreamer_found=no)
AC_SUBST(GSTREAMER_CFLAGS)
AC_SUBST(GSTREAMER_LIBS)
+ GSTREAMER_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-0.10`
+ AC_SUBST(GSTREAMER_PLUGINSDIR)
])
AC_DEFUN([AC_PATH_ALSA], [
diff --git a/audio/Makefile.am b/audio/Makefile.am
index cc73f9be..78352073 100644
--- a/audio/Makefile.am
+++ b/audio/Makefile.am
@@ -26,14 +26,28 @@ alsa_LTLIBRARIES = libasound_module_pcm_bluetooth.la libasound_module_ctl_blueto
libasound_module_pcm_bluetooth_la_SOURCES = pcm_bluetooth.c ipc.h
libasound_module_pcm_bluetooth_la_LDFLAGS = -module -avoid-version -export-dynamic
libasound_module_pcm_bluetooth_la_LIBADD = @SBC_LIBS@ @ALSA_LIBS@
+libasound_module_pcm_bluetooth_la_CFLAGS = @ALSA_CFLAGS@ @SBC_CFLAGS@
libasound_module_ctl_bluetooth_la_SOURCES = ctl_bluetooth.c ipc.h
libasound_module_ctl_bluetooth_la_LDFLAGS = -module -avoid-version -export-dynamic
libasound_module_ctl_bluetooth_la_LIBADD = @ALSA_LIBS@
+libasound_module_ctl_bluetooth_la_CFLAGS = @ALSA_CFLAGS@
endif
+
+if GSTREAMER
+gstreamerdir = $(libdir)/gstreamer-0.10
+
+gstreamer_LTLIBRARIES = libgstbluetooth.la
+
+libgstbluetooth_la_SOURCES = gstbluetooth.c ipc.h
+libgstbluetooth_la_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined
+libgstbluetooth_la_LIBADD = @SBC_LIBS@ @GSTREAMER_LIBS@
+libgstbluetooth_la_CFLAGS = @GSTREAMER_CFLAGS@ @SBC_CFLAGS@
+endif
+
endif
-AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @ALSA_CFLAGS@ @SBC_CFLAGS@
+AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@
INCLUDES = -I$(top_srcdir)/common
diff --git a/audio/gstbluetooth.c b/audio/gstbluetooth.c
new file mode 100644
index 00000000..4169217b
--- /dev/null
+++ b/audio/gstbluetooth.c
@@ -0,0 +1,41 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2007 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * 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
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdint.h>
+
+#include <gst/gst.h>
+
+#include "ipc.h"
+
+static gboolean plugin_init(GstPlugin *plugin)
+{
+ return TRUE;
+}
+
+GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR,
+ "bluetooth", "Bluetooth plugin library",
+ plugin_init, VERSION, "LGPL", PACKAGE, "http://www.bluez.org/")