Reputation: 1695
I'm using feeding data into GStreamer via appsrc and outputting via multifilesink. This works fine. However, if there is too much data (ex. because the resolution is too high), the output begins to lag. In fact, the more time passes, the more latent are the files output by multifilesink.
For example, if I let this process continue for a while, multifilesink may be outputting frames that are a minute old, even if it started with a very small lag.
How can I tell GStreamer to drop frames to avoid reaching such a large latency?
Notes:
(PS: My code can be found here, in answer to another question about this type of setup.)
Upvotes: 1
Views: 1394
Reputation: 1695
Finally solved this by adding a leaky queue
in my pipeline before my capsfilter
. In my case:
GstElement* queue = gst_element_factory_make("queue", NULL);
g_object_set(G_OBJECT(queue), "leaky", 2, NULL);
g_object_set(G_OBJECT(queue), "max-size-time", 500 * GST_MSECOND, NULL);
Did the trick.
Upvotes: 1