rygel r657 - trunk/src/rygel



Author: zeeshanak
Date: Sun Mar 15 19:01:00 2009
New Revision: 657
URL: http://svn.gnome.org/viewvc/rygel?rev=657&view=rev

Log:
Correct creation of transcode resource.

- Re-use the existing resource struct.
- reset different props.

Modified:
   trunk/src/rygel/rygel-http-server.vala

Modified: trunk/src/rygel/rygel-http-server.vala
==============================================================================
--- trunk/src/rygel/rygel-http-server.vala	(original)
+++ trunk/src/rygel/rygel-http-server.vala	Sun Mar 15 19:01:00 2009
@@ -69,12 +69,16 @@
         var uri = this.create_http_uri_for_item (item, null);
         DIDLLiteResource res = item.create_res (uri);
         res.protocol = "http-get";
+
         resources.add (res);
 
-        // Create the HTTP transcode URI
-        uri = this.create_http_uri_for_item (item, "video/mpeg");
-        res = item.create_res (uri);
-        res.protocol = "http-get";
+        // Modify the res for transcoding resources
+        res.mime_type = "video/mpeg";
+        res.uri = this.create_http_uri_for_item (item, res.mime_type);
+        res.dlna_flags = DLNAFlags.STREAMING_TRANSFER_MODE;
+        res.dlna_operation = DLNAOperation.NONE;
+        res.size = -1;
+
         resources.add (res);
 
         return resources;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]