diff options
Diffstat (limited to 'src/plugins/test')
-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 |
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); |