summaryrefslogtreecommitdiff
path: root/src/lib.h
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-14 19:40:53 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-14 19:49:08 (GMT)
commit5e3b9fc170c77a55003d9d94a71fea6eda88f847 (patch)
tree252d78023594e031566db0aeb0d4c6511de88378 /src/lib.h
parent4ebd3a09a6979bc568459aea842f09d12f4ad4f2 (diff)
downloadsoup-transcoding-proxy-5e3b9fc170c77a55003d9d94a71fea6eda88f847.zip
soup-transcoding-proxy-5e3b9fc170c77a55003d9d94a71fea6eda88f847.tar.gz
Improve latency by waiting for the next keyframe
Instead of caching all the data from the previous keyframe till right now and sending it to the client in a burst, since latency is important, we instead wait for the next keyframe before sending buffers to the clients. This will lead to a delay of upto 128 frames before the stream starts. The keyframe distance and hence the delay can be tweaked by setting the "keyframe-max-dist" property on vp8enc in src/encode.c:create_webm_profile()
Diffstat (limited to 'src/lib.h')
-rw-r--r--src/lib.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib.h b/src/lib.h
index db57354..6894c0b 100644
--- a/src/lib.h
+++ b/src/lib.h
@@ -34,8 +34,6 @@ struct _TranscodeServerCtx {
SoupMessage *msg;
GstElement *pipeline;
GstElement *appsrc;
- /* Contains buffers from the previous keyframe till right now */
- GstBufferList *keyframe;
/* If the encoding is not chunked, we'll get multiple requests
* with separate Content-Length headers on the same path */
SoupEncoding encoding;
@@ -59,6 +57,7 @@ struct _TranscodeClientCtx {
GstElement *appsink; /* We hold an extra ref to this */
GstPad *ghostsinkpad;
+ gboolean keyframe_found;
guint timeout_handler_id;
guint seconds_since_write;
/* The transcode server context; we don't hold a ref to this */