[rygel/wip/didl-s: 32/35] renderer: Set track metadata in playlist
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/didl-s: 32/35] renderer: Set track metadata in playlist
- Date: Wed, 21 Nov 2012 16:57:57 +0000 (UTC)
commit 76de1b9260d5b7265aa4c19163ed3f107a5c1870
Author: Jens Georg <jensg openismus com>
Date: Wed Nov 21 08:39:51 2012 +0100
renderer: Set track metadata in playlist
configure.ac | 2 +-
src/librygel-renderer/rygel-playlist-handler.vala | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c606335..5e4fc5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ VALA_REQUIRED=0.18.0
VALADOC_REQUIRED=0.2
GSSDP_REQUIRED=0.13.0
GUPNP_REQUIRED=0.19.0
-GUPNP_AV_REQUIRED=0.11.3
+GUPNP_AV_REQUIRED=0.11.4
GUPNP_DLNA_REQUIRED=0.7.0
GSTREAMER_REQUIRED=1.0
GSTPBU_REQUIRED=1.0
diff --git a/src/librygel-renderer/rygel-playlist-handler.vala b/src/librygel-renderer/rygel-playlist-handler.vala
index 23149ae..84ecb68 100644
--- a/src/librygel-renderer/rygel-playlist-handler.vala
+++ b/src/librygel-renderer/rygel-playlist-handler.vala
@@ -4,6 +4,13 @@ internal class Rygel.PlaylistHandler : GLib.Object {
private const int DEFAULT_IMAGE_TIMEOUT = 15;
private const string CONFIG_SECTION = "Renderer";
private const string TIMEOUT_KEY = "image-timeout";
+ private const string DIDL_FRAME_TEMPLATE = "<DIDL-Lite " +
+ "xmlns:dc=\"http://purl.org/dc/elements/1.1/\" " +
+ "xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" " +
+ "xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\" " +
+ "xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\">" +
+ "%s</DIDL-Lite>";
+
public MediaCollection collection { construct; private get; }
public unowned AVTransport transport { construct; private get; }
@@ -69,6 +76,8 @@ internal class Rygel.PlaylistHandler : GLib.Object {
var res = item.get_resources().nth (0).data;
this.transport.track = this.current_track;
this.transport.track_uri = res.get_uri ();
+ this.transport.track_metadata = DIDL_FRAME_TEMPLATE.printf
+ (item.get_xml_string ());
debug ("Trying to set track uri to %s", res.get_uri ());
// For images, we handle the timeout here. Either the item carries a
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]