[rygel] engine-gst: Don't limit ourselves to file:// uris
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] engine-gst: Don't limit ourselves to file:// uris
- Date: Sat, 23 May 2015 15:43:54 +0000 (UTC)
commit f3476e03aa2e436173d5fc1713606bf4f46adf49
Author: Jens Georg <mail jensge org>
Date: Sat May 23 17:34:18 2015 +0200
engine-gst: Don't limit ourselves to file:// uris
Instead query GStreamer what it thinks it can support
Signed-off-by: Jens Georg <mail jensge org>
.../gstreamer/rygel-gst-media-engine.vala | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/media-engines/gstreamer/rygel-gst-media-engine.vala
b/src/media-engines/gstreamer/rygel-gst-media-engine.vala
index f14d448..3938498 100644
--- a/src/media-engines/gstreamer/rygel-gst-media-engine.vala
+++ b/src/media-engines/gstreamer/rygel-gst-media-engine.vala
@@ -123,10 +123,22 @@ public class Rygel.GstMediaEngine : Rygel.MediaEngine {
// For MediaFileItems, the primary URI refers directly to the content
var source_uri = item.get_primary_uri ();
- debug ("get_resources_for_item(%s)", source_uri);
+ var parts = source_uri.split ("://", 2);
+ if (parts == null || parts[0] == null) {
+ warning (_("Invalid uri without prefix: %s"), source_uri);
- if (!source_uri.has_prefix ("file://")) {
- warning ("Can't process non-file uri " + source_uri);
+ return null;
+ }
+
+
+ debug ("get_resources_for_item(%s), protocol: %s",
+ source_uri,
+ parts[0]);
+
+ if (!Gst.URI.protocol_is_supported (URIType.SRC, parts[0])) {
+ warning (_("Can't process uri %s with protocol %s"),
+ source_uri,
+ parts[0]);
return null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]