rygel r429 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r429 - trunk/src/rygel
- Date: Tue, 13 Jan 2009 14:32:56 +0000 (UTC)
Author: zeeshanak
Date: Tue Jan 13 14:32:56 2009
New Revision: 429
URL: http://svn.gnome.org/viewvc/rygel?rev=429&view=rev
Log:
Always include Content-Range if size of item is known.
DLNA requirement 7.4.35.7.
Modified:
trunk/src/rygel/rygel-streamer.vala
Modified: trunk/src/rygel/rygel-streamer.vala
==============================================================================
--- trunk/src/rygel/rygel-streamer.vala (original)
+++ trunk/src/rygel/rygel-streamer.vala Tue Jan 13 14:32:56 2009
@@ -177,13 +177,23 @@
msg.response_headers.append ("Accept-Ranges", "bytes");
}
- if (seek != null) {
+ if (item.res.size > 0) {
+ int64 first_byte;
+ int64 last_byte;
+
+ if (seek != null) {
+ first_byte = seek.start;
+ last_byte = seek.stop;
+ } else {
+ first_byte = 0;
+ last_byte = item.res.size - 1;
+ }
+
// Content-Range: bytes START_BYTE-STOP_BYTE/TOTAL_LENGTH
var content_range = "bytes " +
- seek.start.to_string () + "-" +
- seek.stop.to_string () + "/" +
+ first_byte.to_string () + "-" +
+ last_byte.to_string () + "/" +
item.res.size.to_string ();
-
msg.response_headers.append ("Content-Range", content_range);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]