[rygel] playbin: Base plugin on player library



commit 3c6e33a7243d4b805aa876c2149c7b8ddd7cdcb9
Author: Jens Georg <mail jensge org>
Date:   Fri Jun 8 10:25:38 2012 +0200

    playbin: Base plugin on player library

 src/plugins/playbin/Makefile.am               |   15 +++++-----
 src/plugins/playbin/rygel-module.vala         |   36 +++++++++++++++++++++++++
 src/plugins/playbin/rygel-playbin-plugin.vala |   15 +---------
 3 files changed, 46 insertions(+), 20 deletions(-)
---
diff --git a/src/plugins/playbin/Makefile.am b/src/plugins/playbin/Makefile.am
index 3fc840e..7657399 100644
--- a/src/plugins/playbin/Makefile.am
+++ b/src/plugins/playbin/Makefile.am
@@ -1,7 +1,11 @@
 include ../../../common.am
 
 lib_LTLIBRARIES = librygel-renderer.la
-librygel_renderer_la_SOURCES = $(librygel_playbin_la_SOURCES)
+
+librygel_renderer_la_SOURCES = \
+	rygel-playbin-player.vala \
+	rygel-playbin-plugin.vala
+
 librygel_renderer_la_VALAFLAGS = \
 	-H rygel-renderer.h --library=rygel-renderer-1.0 \
 	$(RYGEL_COMMON_PLUGIN_VALAFLAGS)
@@ -12,10 +16,7 @@ plugin_LTLIBRARIES = librygel-playbin.la
 
 AM_CFLAGS += -DG_LOG_DOMAIN='"Playbin"'
 
-librygel_playbin_la_SOURCES = \
-	rygel-playbin-player.vala \
-	rygel-playbin-plugin.vala
-
-librygel_playbin_la_VALAFLAGS = $(RYGEL_COMMON_PLUGIN_VALAFLAGS)
-librygel_playbin_la_LIBADD = $(RYGEL_COMMON_LIBS)
+librygel_playbin_la_SOURCES = rygel-module.vala
+librygel_playbin_la_VALAFLAGS = $(RYGEL_COMMON_PLUGIN_VALAFLAGS) --pkg rygel-renderer-1.0 --vapidir=$(builddir)
+librygel_playbin_la_LIBADD = $(RYGEL_COMMON_LIBS) librygel-renderer.la
 librygel_playbin_la_LDFLAGS = $(RYGEL_PLUGIN_LINKER_FLAGS)
diff --git a/src/plugins/playbin/rygel-module.vala b/src/plugins/playbin/rygel-module.vala
new file mode 100644
index 0000000..bd90696
--- /dev/null
+++ b/src/plugins/playbin/rygel-module.vala
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 Openismus GmbH.
+ *
+ * Author: Jens Georg <jensg openismus com>
+ *
+ * This file is part of Rygel.
+ *
+ * Rygel 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 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel 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 program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+using Rygel;
+
+public void module_init (PluginLoader loader) {
+    if (loader.plugin_disabled (Playbin.Plugin.NAME)) {
+        message ("Plugin '%s' disabled by user, ignoring..",
+                 Playbin.Plugin.NAME);
+
+        return;
+    }
+
+    var plugin = new Playbin.Plugin ();
+
+    loader.add_plugin (plugin);
+}
diff --git a/src/plugins/playbin/rygel-playbin-plugin.vala b/src/plugins/playbin/rygel-playbin-plugin.vala
index 39ebd4b..3557284 100644
--- a/src/plugins/playbin/rygel-playbin-plugin.vala
+++ b/src/plugins/playbin/rygel-playbin-plugin.vala
@@ -1,9 +1,11 @@
 /*
  * Copyright (C) 2008 Zeeshan Ali (Khattak) <zeeshanak gnome org>.
  * Copyright (C) 2008 Nokia Corporation.
+ * Copyright (C) 2012 Openismus GmbH.
  *
  * Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
  *                               <zeeshan ali nokia com>
+ *         Jens Georg <jensg openismus com>
  *
  * This file is part of Rygel.
  *
@@ -25,19 +27,6 @@
 using Rygel;
 using Gee;
 
-public void module_init (PluginLoader loader) {
-    if (loader.plugin_disabled (Playbin.Plugin.NAME)) {
-        message ("Plugin '%s' disabled by user, ignoring..",
-                 Playbin.Plugin.NAME);
-
-        return;
-    }
-
-    var plugin = new Playbin.Plugin ();
-
-    loader.add_plugin (plugin);
-}
-
 public class Rygel.Playbin.Plugin : Rygel.MediaRendererPlugin {
     public const string NAME = "Playbin";
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]