Block upstream decoding if we start to build up too many buffers
(presumably because downstream is waiting for real time to pass while it
plays audio at us).
The magic number 16 is plucked from nowhere in particular. I have no
idea how to choose a number properly.
g_signal_connect(bus, "message", G_CALLBACK(bus_message), 0);
/* Tell the sink to call us when interesting things happen. */
g_signal_connect(bus, "message", G_CALLBACK(bus_message), 0);
/* Tell the sink to call us when interesting things happen. */
+ gst_app_sink_set_max_buffers(appsink, 16);
+ gst_app_sink_set_drop(appsink, FALSE);
gst_app_sink_set_callbacks(appsink, &callbacks, 0, 0);
/* Set the ball rolling. */
gst_app_sink_set_callbacks(appsink, &callbacks, 0, 0);
/* Set the ball rolling. */