[rygel] core: Correct logic for decision to seek or not
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] core: Correct logic for decision to seek or not
- Date: Thu, 10 Dec 2009 18:08:02 +0000 (UTC)
commit 343007469bb9c9d9ef757a87ea0a5c13e36923fa
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Dec 9 03:10:25 2009 +0200
core: Correct logic for decision to seek or not
src/rygel/rygel-http-byte-seek.vala | 3 ++-
src/rygel/rygel-http-time-seek.vala | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/rygel/rygel-http-byte-seek.vala b/src/rygel/rygel-http-byte-seek.vala
index 72a701b..faf327a 100644
--- a/src/rygel/rygel-http-byte-seek.vala
+++ b/src/rygel/rygel-http-byte-seek.vala
@@ -81,7 +81,8 @@ internal class Rygel.HTTPByteSeek : Rygel.HTTPSeek {
}
public static bool needed (HTTPRequest request) {
- return true;
+ return request.item.size > 0 ||
+ (request.thumbnail != null && request.thumbnail.size > 0);
}
public override void add_response_headers () {
diff --git a/src/rygel/rygel-http-time-seek.vala b/src/rygel/rygel-http-time-seek.vala
index bd3e17c..87bb032 100644
--- a/src/rygel/rygel-http-time-seek.vala
+++ b/src/rygel/rygel-http-time-seek.vala
@@ -78,7 +78,11 @@ internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek {
}
public static bool needed (HTTPRequest request) {
- return request.thumbnail == null && request.item.should_stream ();
+ var range = request.msg.request_headers.get ("TimeSeekRange.dlna.org");
+
+ return range != null &&
+ (request.request_handler is HTTPTranscodeHandler ||
+ (request.thumbnail == null && request.item.should_stream ()));
}
public override void add_response_headers () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]