summaryrefslogtreecommitdiff
path: root/src/plugins/test
diff options
context:
space:
mode:
authorJens Georg <jensg@openismus.org>2012-09-12 14:25:24 +0200
committerJens Georg <jensg@openismus.com>2012-10-05 17:33:28 +0200
commit21af74d799944290f9faaef744f71a1450b40320 (patch)
tree5a6924525d55cff7831b98b99ca97331d291991c /src/plugins/test
parent3c11305e5bed40b3e6edff7229bec471fe22a3ae (diff)
downloadrygel-21af74d799944290f9faaef744f71a1450b40320.tar.gz
server,engine: Move MediaEngine into .so
Diffstat (limited to 'src/plugins/test')
-rw-r--r--src/plugins/test/Makefile.am13
-rw-r--r--src/plugins/test/rygel-test-audio-item.vala10
-rw-r--r--src/plugins/test/rygel-test-video-item.vala10
3 files changed, 27 insertions, 6 deletions
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);