Commit 91f7ffbd authored by Benjamin Berg's avatar Benjamin Berg
Browse files

wfd: Start throttling the encoder at more than at 50ms latency

parent 41d15c27
......@@ -58,16 +58,16 @@ encoding_perf_handoff_cb (GstElement *elem, GstBuffer *buf, gpointer user_data)
late = MAX(0, now - buf->pts);
/* We stop accepting things at more than 100ms delay;
* Just use late / 200ms for the long term proportion. */
if (buf->pts > 100 * GST_MSECOND)
/* We stop accepting things at more than 50ms delay;
* Just use late / 50ms for the long term proportion. */
if (buf->pts > 50 * GST_MSECOND)
{
proportion = late / (gdouble) (100 * GST_MSECOND);
proportion = late / (gdouble) (50 * GST_MSECOND);
/* g_debug ("Sending QOS event with proportion %.2f", proportion); */
qos_event = gst_event_new_qos (GST_QOS_TYPE_UNDERFLOW,
proportion,
late - 100 * GST_MSECOND,
late - 50 * GST_MSECOND,
buf->pts);
gst_element_send_event (elem, qos_event);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment