From b9f5d5920b1ddf4ae6bef051e5d5c0a9670eb4bd Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Sun, 15 Mar 2009 19:00:30 +0000 Subject: [PATCH] Create and report transcode URIs as well. svn path=/trunk/; revision=650 --- src/rygel/rygel-didl-lite-writer.vala | 10 +++++++--- src/rygel/rygel-http-server.vala | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/rygel/rygel-didl-lite-writer.vala b/src/rygel/rygel-didl-lite-writer.vala index 9889240..37eb499 100644 --- a/src/rygel/rygel-didl-lite-writer.vala +++ b/src/rygel/rygel-didl-lite-writer.vala @@ -168,7 +168,6 @@ internal class Rygel.DIDLLiteWriter : GUPnP.DIDLLiteWriter { } } - // FIXME: We only proxy URIs through our HTTP server for now private ArrayList? get_transcoded_resources (MediaItem item, ArrayList orig_res_list) @@ -179,11 +178,16 @@ internal class Rygel.DIDLLiteWriter : GUPnP.DIDLLiteWriter { return resources; } - // Create the HTTP URI - var uri = this.http_server.create_http_uri_for_item (item); + // Create the HTTP proxy URI + var uri = this.http_server.create_http_uri_for_item (item, false); DIDLLiteResource res = create_res (item, uri); res.protocol = "http-get"; + resources.add (res); + // Create the HTTP transcode URI + uri = this.http_server.create_http_uri_for_item (item, true); + res = create_res (item, uri); + res.protocol = "http-get"; resources.add (res); return resources; diff --git a/src/rygel/rygel-http-server.vala b/src/rygel/rygel-http-server.vala index 0699b6c..f32f9c6 100644 --- a/src/rygel/rygel-http-server.vala +++ b/src/rygel/rygel-http-server.vala @@ -71,9 +71,10 @@ public class Rygel.HTTPServer : GLib.Object, Rygel.StateMachine { path); } - internal string create_http_uri_for_item (MediaItem item) { + internal string create_http_uri_for_item (MediaItem item, bool transcode) { string escaped = Uri.escape_string (item.id, "", true); - string query = "?itemid=%s".printf (escaped); + string query = "?itemid=%s?transcode=%s".printf (escaped, + transcode.to_string ()); return create_uri_for_path (query); } -- 2.7.4