summaryrefslogtreecommitdiff
path: root/src/lib.h
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-11 11:27:02 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-11 11:31:01 (GMT)
commit4d3eb464ab471e1754f25d6dc9673fc2533e0b5c (patch)
treee891f3226532294bc3fab5aefa9b8f8cf1888619 /src/lib.h
parent4e9b88df39128d01139414263e9cf387e3339814 (diff)
downloadsoup-transcoding-proxy-4d3eb464ab471e1754f25d6dc9673fc2533e0b5c.zip
soup-transcoding-proxy-4d3eb464ab471e1754f25d6dc9673fc2533e0b5c.tar.gz
server: Add support for persistent connection streams
Now we also support Content-Length + Content-Range persistent HTTP connections for stream data. If no further data is received before `server_timeout`, we assume the stream has been closed. This is used by souphttpclientsink for sending streams.
Diffstat (limited to 'src/lib.h')
-rw-r--r--src/lib.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib.h b/src/lib.h
index e194949..f1d9588 100644
--- a/src/lib.h
+++ b/src/lib.h
@@ -34,12 +34,15 @@ struct _TranscodeServerCtx {
SoupMessage *msg;
GstElement *pipeline;
GstElement *appsrc;
- /* The pipeline status can be queried from the pipeline itself,
- * but it's probably better for branching to have it separately too */
- gboolean pipeline_is_playing;
+ /* If the encoding is not chunked, we'll get multiple requests
+ * with separate Content-Length headers on the same path */
+ SoupEncoding encoding;
/* Set to TRUE when the incoming stream ends; let's us know if
- * we need to set the PUT response on EOS/ERROR on the pipeline */
- gboolean request_finished;
+ * we need to set the PUT response on EOS/ERROR on the pipeline,
+ * and whether to reject further data when using a persistent
+ * Content-Length + Content-Range PUT stream. */
+ gboolean stream_finished;
+ guint seconds_since_read;
/* List of client contexts */
GList *clients;