[rygel] core: Use GstResponse for all streams
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Use GstResponse for all streams
- Date: Sat, 9 Apr 2011 02:09:43 +0000 (UTC)
commit 3cf2bb3b8cd59bd97b6071952ce0c4020d993090
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Apr 4 22:44:31 2011 +0300
core: Use GstResponse for all streams
src/rygel/rygel-http-identity-handler.vala | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/rygel/rygel-http-identity-handler.vala b/src/rygel/rygel-http-identity-handler.vala
index fbe4cf3..cd28b73 100644
--- a/src/rygel/rygel-http-identity-handler.vala
+++ b/src/rygel/rygel-http-identity-handler.vala
@@ -74,18 +74,20 @@ internal class Rygel.HTTPIdentityHandler : Rygel.HTTPGetHandler {
}
private HTTPResponse render_body_real (HTTPGet request) throws Error {
- if (request.subtitle != null ||
- request.thumbnail != null ||
- !(request.item.is_live_stream ())) {
- return new HTTPSeekableResponse (request, this);
- } else {
- var src = request.item.create_stream_source ();
+ Element src;
- if (src == null) {
- throw new HTTPRequestError.NOT_FOUND (_("Not found"));
- }
+ if (request.subtitle != null) {
+ src = GstUtils.create_source_for_uri (request.subtitle.uri);
+ } else if (request.thumbnail != null) {
+ src = GstUtils.create_source_for_uri (request.thumbnail.uri);
+ } else {
+ src = request.item.create_stream_source ();
+ }
- return new HTTPGstResponse (request, this, src);
+ if (src == null) {
+ throw new HTTPRequestError.NOT_FOUND (_("Not found"));
}
+
+ return new HTTPGstResponse (request, this, src);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]