[rygel/wip/dvd: 99/103] engine-gst: Add DVD support
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/dvd: 99/103] engine-gst: Add DVD support
- Date: Wed, 16 Sep 2015 12:25:29 +0000 (UTC)
commit 0c540e1e7fe440016b8caa483259109c9fea0580
Author: Jens Georg <mail jensge org>
Date: Wed Sep 9 14:30:54 2015 +0200
engine-gst: Add DVD support
Signed-off-by: Jens Georg <mail jensge org>
.../gstreamer/rygel-gst-media-engine.vala | 3 ++-
src/media-engines/gstreamer/rygel-gst-utils.vala | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/media-engines/gstreamer/rygel-gst-media-engine.vala
b/src/media-engines/gstreamer/rygel-gst-media-engine.vala
index c8ea488..2446bf3 100644
--- a/src/media-engines/gstreamer/rygel-gst-media-engine.vala
+++ b/src/media-engines/gstreamer/rygel-gst-media-engine.vala
@@ -136,7 +136,8 @@ public class Rygel.GstMediaEngine : Rygel.MediaEngine {
parts[0]);
if (!Gst.URI.protocol_is_supported (URIType.SRC, parts[0]) &&
- parts[0] != "gst-launch") {
+ parts[0] != "gst-launch" &&
+ parts[0] != "dvd") {
warning (_("Can't process URI %s with protocol %s"),
source_uri,
parts[0]);
diff --git a/src/media-engines/gstreamer/rygel-gst-utils.vala
b/src/media-engines/gstreamer/rygel-gst-utils.vala
index 9165a82..7b58605 100644
--- a/src/media-engines/gstreamer/rygel-gst-utils.vala
+++ b/src/media-engines/gstreamer/rygel-gst-utils.vala
@@ -51,6 +51,14 @@ internal abstract class Rygel.GstUtils {
var description = uri.replace ("gst-launch://", "");
src = Gst.parse_bin_from_description (description, true);
+ } else if (uri.has_prefix ("dvd://")) {
+ var tmp = new Soup.URI (uri);
+ var query = Soup.Form.decode (tmp.query);
+ src = ElementFactory.make ("dvdreadsrc", null);
+ if (query.contains ("title")) {
+ src.title = int.parse (query.lookup ("title"));
+ }
+ src.device = Soup.URI.decode (tmp.path);
} else {
src = Element.make_from_uri (URIType.SRC, uri, null);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]