rygel r441 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r441 - trunk/src/rygel
- Date: Sun, 18 Jan 2009 19:26:59 +0000 (UTC)
Author: zeeshanak
Date: Sun Jan 18 19:26:59 2009
New Revision: 441
URL: http://svn.gnome.org/viewvc/rygel?rev=441&view=rev
Log:
GstStream decides about chunking of message.
Modified:
trunk/src/rygel/rygel-gst-stream.vala
trunk/src/rygel/rygel-stream.vala
Modified: trunk/src/rygel/rygel-gst-stream.vala
==============================================================================
--- trunk/src/rygel/rygel-gst-stream.vala (original)
+++ trunk/src/rygel/rygel-gst-stream.vala Sun Jan 18 19:26:59 2009
@@ -47,6 +47,9 @@
Element src) throws Error {
base (server, msg, false);
+ this.msg.response_headers.set_encoding (Soup.Encoding.CHUNKED);
+ this.msg.response_body.set_accumulate (false);
+
this.buffers = new AsyncQueue<Buffer> ();
this.prepare_pipeline (name, src);
@@ -65,6 +68,10 @@
buffer = this.buffers.try_pop ();
} while (buffer != null);
+ if (!aborted) {
+ this.msg.response_body.complete ();
+ }
+
base.end (aborted);
}
Modified: trunk/src/rygel/rygel-stream.vala
==============================================================================
--- trunk/src/rygel/rygel-stream.vala (original)
+++ trunk/src/rygel/rygel-stream.vala Sun Jan 18 19:26:59 2009
@@ -35,13 +35,13 @@
this.server = server;
this.msg = msg;
- this.msg.response_headers.set_encoding (Soup.Encoding.CHUNKED);
+ server.pause_message (this.msg);
+
if (partial) {
this.msg.set_status (Soup.KnownStatusCode.PARTIAL_CONTENT);
} else {
this.msg.set_status (Soup.KnownStatusCode.OK);
}
- this.msg.response_body.set_accumulate (false);
this.server.request_aborted += on_request_aborted;
}
@@ -67,10 +67,6 @@
}
public virtual void end (bool aborted) {
- if (!aborted) {
- this.msg.response_body.complete ();
- }
-
this.eos ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]