From 70ba34c485c379180298ab9c35dc09da24ebe0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 9 Jan 2013 18:10:30 +0000 Subject: [PATCH] bluez: add new plugin to build system, but disable for now Disable until it has been tested and works. https://bugzilla.gnome.org/show_bug.cgi?id=690582 --- configure.ac | 11 ++++++++++ sys/Makefile.am | 10 +++++++-- sys/bluez/Makefile.am | 26 ++++++++++++++++++++++++ sys/bluez/bluez-plugin.c | 44 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 sys/bluez/Makefile.am create mode 100644 sys/bluez/bluez-plugin.c diff --git a/configure.ac b/configure.ac index 1c8e28bc49..d0d352e1c1 100644 --- a/configure.ac +++ b/configure.ac @@ -684,6 +684,16 @@ if test "x$HAVE_IOS" = "xyes"; then AC_DEFINE(HAVE_IOS, 1, [Define if building for Apple iOS]) fi +dnl *** bluez *** +translit(dnm, m, l) AM_CONDITIONAL(USE_BLUEZ, true) +AG_GST_CHECK_FEATURE(BLUEZ, [Bluez], bluez, [ + dnl FIXME: we should be able to replace this with the GLib DBus stuff + PKG_CHECK_MODULES([DBUS], [dbus-1], [HAVE_BLUEZ=yes], [HAVE_BLUEZ=no]) + + AC_MSG_NOTICE([Disabling bluez plugin for now, does not work yet]) + HAVE_BLUEZ=no +]) + dnl *** OS X videosrc *** translit(dnm, m, l) AM_CONDITIONAL(USE_OSX_VIDEO, true) HAVE_OSX_VIDEO="no" @@ -2255,6 +2265,7 @@ sys/acmmp3dec/Makefile sys/androidmedia/Makefile sys/applemedia/Makefile sys/avc/Makefile +sys/bluez/Makefile sys/d3dvideosink/Makefile sys/decklink/Makefile sys/directdraw/Makefile diff --git a/sys/Makefile.am b/sys/Makefile.am index cb856d6511..e61e53ea3b 100644 --- a/sys/Makefile.am +++ b/sys/Makefile.am @@ -22,6 +22,12 @@ else AVC_DIR= endif +if USE_BLUEZ +BLUEZ_DIR=bluez +else +BLUEZ_DIR= +endif + # if USE_CDROM # CDROM_DIR=cdrom # else @@ -160,9 +166,9 @@ else MFC_DIR= endif -SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTDRAW_DIR) $(DIRECTSOUND_DIR) $(DIRECTSHOW_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(OSX_VIDEO_DIR) $(PVR_DIR) $(QT_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR) $(MFC_DIR) +SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTDRAW_DIR) $(DIRECTSOUND_DIR) $(DIRECTSHOW_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(OSX_VIDEO_DIR) $(PVR_DIR) $(QT_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR) $(MFC_DIR) -DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia avc d3dvideosink decklink directdraw directsound dvb linsys fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \ +DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia avc bluez d3dvideosink decklink directdraw directsound dvb linsys fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \ opensles osxvideo pvr2d qtwrapper shm uvch264 vcd vdpau wasapi wininet winks winscreencap mfc include $(top_srcdir)/common/parallel-subdirs.mak diff --git a/sys/bluez/Makefile.am b/sys/bluez/Makefile.am new file mode 100644 index 0000000000..a24c2fcc85 --- /dev/null +++ b/sys/bluez/Makefile.am @@ -0,0 +1,26 @@ +plugin_LTLIBRARIES = libgstbluez.la + +libgstbluez_la_SOURCES = \ + bluez-plugin.c \ + gsta2dpsink.c \ + gstavdtpsink.c + +libgstbluez_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) \ + $(DBUS_CFLAGS) +libgstbluez_la_LIBADD = \ + $(GST_PLUGINS_BASE_LIBS) \ + -lgstaudio-$(GST_API_VERSION) \ + -lgstrtp-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) \ + $(GST_LIBS) \ + $(DBUS_LIBS) +libgstbluez_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstbluez_la_LIBTOOLFLAGS = --tag=disable-static + +noinst_HEADERS = \ + a2dp-codecs.h \ + gsta2dpsink.h \ + gstavdtpsink.h diff --git a/sys/bluez/bluez-plugin.c b/sys/bluez/bluez-plugin.c new file mode 100644 index 0000000000..7111dfee16 --- /dev/null +++ b/sys/bluez/bluez-plugin.c @@ -0,0 +1,44 @@ +/* GStreamer bluez plugin + * + * Copyright (C) 2013 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library 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 +#endif + +#include "gsta2dpsink.h" +#include "gstavdtpsink.h" +#include + +static gboolean +plugin_init (GstPlugin * plugin) +{ + gst_element_register (plugin, "a2dpsink", GST_RANK_NONE, GST_TYPE_A2DP_SINK); + + gst_element_register (plugin, "avdtpsink", + GST_RANK_NONE, GST_TYPE_AVDTP_SINK); + + return TRUE; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + bluez, + "Bluez-based bluetooth support", + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);