diff options
author | Jens Georg <jensg@openismus.org> | 2012-09-12 14:25:24 +0200 |
---|---|---|
committer | Jens Georg <jensg@openismus.com> | 2012-10-05 17:33:28 +0200 |
commit | 21af74d799944290f9faaef744f71a1450b40320 (patch) | |
tree | 5a6924525d55cff7831b98b99ca97331d291991c /src/plugins | |
parent | 3c11305e5bed40b3e6edff7229bec471fe22a3ae (diff) | |
download | rygel-21af74d799944290f9faaef744f71a1450b40320.tar.gz |
server,engine: Move MediaEngine into .so
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gst-launch/Makefile.am | 13 | ||||
-rw-r--r-- | src/plugins/gst-launch/rygel-gst-launch-audio-item.vala | 12 | ||||
-rw-r--r-- | src/plugins/gst-launch/rygel-gst-launch-video-item.vala | 11 | ||||
-rw-r--r-- | src/plugins/mpris/Makefile.am | 3 | ||||
-rw-r--r-- | src/plugins/playbin/Makefile.am | 3 | ||||
-rw-r--r-- | src/plugins/test/Makefile.am | 13 | ||||
-rw-r--r-- | src/plugins/test/rygel-test-audio-item.vala | 10 | ||||
-rw-r--r-- | src/plugins/test/rygel-test-video-item.vala | 10 |
8 files changed, 61 insertions, 14 deletions
diff --git a/src/plugins/gst-launch/Makefile.am b/src/plugins/gst-launch/Makefile.am index e5fc0cf8..05f237d7 100644 --- a/src/plugins/gst-launch/Makefile.am +++ b/src/plugins/gst-launch/Makefile.am @@ -1,16 +1,21 @@ -include ../../../common.am +include $(top_srcdir)/common.am plugin_LTLIBRARIES = librygel-gst-launch.la -AM_CFLAGS += -DG_LOG_DOMAIN='"GstLaunch"' +AM_CFLAGS += -DG_LOG_DOMAIN='"GstLaunch"' \ + -I$(top_srcdir)/src/media-engines/gstreamer \ + $(LIBGSTREAMER_CFLAGS) librygel_gst_launch_la_SOURCES = \ rygel-gst-launch-plugin.vala \ rygel-gst-launch-root-container.vala \ rygel-gst-launch-item.vala \ rygel-gst-launch-audio-item.vala \ - rygel-gst-launch-video-item.vala + rygel-gst-launch-video-item.vala \ + $(top_srcdir)/src/media-engines/gstreamer/rygel-media-engine-gst.vapi librygel_gst_launch_la_VALAFLAGS = $(RYGEL_COMMON_SERVER_PLUGIN_VALAFLAGS) -librygel_gst_launch_la_LIBADD = $(RYGEL_COMMON_SERVER_LIBS) +librygel_gst_launch_la_LIBADD = \ + $(LIBGSTREAMER_LIBS) \ + $(RYGEL_COMMON_SERVER_LIBS) librygel_gst_launch_la_LDFLAGS = $(RYGEL_PLUGIN_LINKER_FLAGS) diff --git a/src/plugins/gst-launch/rygel-gst-launch-audio-item.vala b/src/plugins/gst-launch/rygel-gst-launch-audio-item.vala index e8472912..de9e62df 100644 --- a/src/plugins/gst-launch/rygel-gst-launch-audio-item.vala +++ b/src/plugins/gst-launch/rygel-gst-launch-audio-item.vala @@ -1,6 +1,7 @@ /* * Copyright (C) 2009 Thijs Vermeir <thijsvermeir@gmail.com> * Copyright (C) 2010 Nokia Corporation. + * Copyright (C) 2012 Intel Corporation. * * Author: Thijs Vermeir <thijsvermeir@gmail.com> * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org> @@ -44,6 +45,15 @@ public class Rygel.GstLaunch.AudioItem : Rygel.AudioItem, Item { } public override DataSource? create_stream_source (string? host_ip) { - return new GstDataSource.from_element (this.create_source ()); + var engine = MediaEngine.get_default (); + var gst_engine = engine as GstMediaEngine; + if (gst_engine == null) { + warning ("The current media engine is not based on GStreamer."); + + return null; + } + + return gst_engine.create_data_source_from_element + (this.create_source ()); } } diff --git a/src/plugins/gst-launch/rygel-gst-launch-video-item.vala b/src/plugins/gst-launch/rygel-gst-launch-video-item.vala index 7b7f2a41..7f7d4338 100644 --- a/src/plugins/gst-launch/rygel-gst-launch-video-item.vala +++ b/src/plugins/gst-launch/rygel-gst-launch-video-item.vala @@ -45,6 +45,15 @@ public class Rygel.GstLaunch.VideoItem : Rygel.VideoItem, Item { } public override DataSource? create_stream_source (string? host_ip) { - return new GstDataSource.from_element (this.create_source ()); + var engine = MediaEngine.get_default (); + var gst_engine = engine as GstMediaEngine; + if (gst_engine == null) { + warning ("The current media engine is not based on GStreamer."); + + return null; + } + + return gst_engine.create_data_source_from_element + (this.create_source ()); } } diff --git a/src/plugins/mpris/Makefile.am b/src/plugins/mpris/Makefile.am index 4b609de7..b108c385 100644 --- a/src/plugins/mpris/Makefile.am +++ b/src/plugins/mpris/Makefile.am @@ -2,7 +2,8 @@ include ../../../common.am plugin_LTLIBRARIES = librygel-mpris.la -AM_CFLAGS += -DG_LOG_DOMAIN='"MPRIS"' +AM_CFLAGS += -DG_LOG_DOMAIN='"MPRIS"' \ + $(LIBGSTREAMER_CFLAGS) librygel_mpris_la_SOURCES = \ rygel-mpris-player.vala \ diff --git a/src/plugins/playbin/Makefile.am b/src/plugins/playbin/Makefile.am index 734056c7..3a533005 100644 --- a/src/plugins/playbin/Makefile.am +++ b/src/plugins/playbin/Makefile.am @@ -2,7 +2,8 @@ include ../../../common.am plugin_LTLIBRARIES = librygel-playbin.la -AM_CFLAGS += -DG_LOG_DOMAIN='"Playbin"' +AM_CFLAGS += -DG_LOG_DOMAIN='"Playbin"' \ + $(LIBGSTREAMER_CFLAGS) librygel_playbin_la_SOURCES = rygel-module.vala librygel_playbin_la_CFLAGS = $(AM_CFLAGS) diff --git a/src/plugins/test/Makefile.am b/src/plugins/test/Makefile.am index 628b3cbf..a508412b 100644 --- a/src/plugins/test/Makefile.am +++ b/src/plugins/test/Makefile.am @@ -1,15 +1,20 @@ -include ../../../common.am +include $(top_srcdir)/common.am plugin_LTLIBRARIES = librygel-test.la -AM_CFLAGS += -DG_LOG_DOMAIN='"Test"' +AM_CFLAGS += -DG_LOG_DOMAIN='"Test"' \ + -I$(top_srcdir)/src/media-engines/gstreamer \ + $(LIBGSTREAMER_CFLAGS) librygel_test_la_SOURCES = \ rygel-test-root-container.vala \ rygel-test-audio-item.vala \ rygel-test-video-item.vala \ - rygel-test-plugin.vala + rygel-test-plugin.vala \ + $(top_srcdir)/src/media-engines/gstreamer/rygel-media-engine-gst.vapi librygel_test_la_VALAFLAGS = $(RYGEL_COMMON_SERVER_PLUGIN_VALAFLAGS) -librygel_test_la_LIBADD = $(RYGEL_COMMON_SERVER_LIBS) +librygel_test_la_LIBADD = \ + $(LIBGSTREAMER_LIBS) \ + $(RYGEL_COMMON_SERVER_LIBS) librygel_test_la_LDFLAGS = $(RYGEL_PLUGIN_LINKER_FLAGS) diff --git a/src/plugins/test/rygel-test-audio-item.vala b/src/plugins/test/rygel-test-audio-item.vala index 021ececf..dbd2c46b 100644 --- a/src/plugins/test/rygel-test-audio-item.vala +++ b/src/plugins/test/rygel-test-audio-item.vala @@ -40,10 +40,18 @@ public class Rygel.Test.AudioItem : Rygel.AudioItem { } public override DataSource? create_stream_source (string? host_ip) { + var engine = MediaEngine.get_default (); + var gst_engine = engine as GstMediaEngine; + if (gst_engine == null) { + warning ("The current media engine is not based on GStreamer."); + + return null; + } + try { var element = parse_bin_from_description (PIPELINE, true); - return new GstDataSource.from_element (element); + return gst_engine.create_data_source_from_element (element); } catch (Error err) { warning ("Required plugin missing (%s)", err.message); diff --git a/src/plugins/test/rygel-test-video-item.vala b/src/plugins/test/rygel-test-video-item.vala index 991a488c..04cb6bd4 100644 --- a/src/plugins/test/rygel-test-video-item.vala +++ b/src/plugins/test/rygel-test-video-item.vala @@ -42,10 +42,18 @@ public class Rygel.Test.VideoItem : Rygel.VideoItem { } public override DataSource? create_stream_source (string? host_ip) { + var engine = MediaEngine.get_default (); + var gst_engine = engine as GstMediaEngine; + if (gst_engine == null) { + warning ("The current media engine is not based on GStreamer."); + + return null; + } + try { var element = parse_bin_from_description (PIPELINE, true); - return new GstDataSource.from_element (element); + return gst_engine.create_data_source_from_element (element); } catch (Error err) { warning ("Required plugin missing (%s)", err.message); |