Appsink stalls but fakesink doesn't

Josh Doe josh at joshdoe.com
Fri Jun 28 09:50:00 PDT 2013


I'm in the process of porting my application to 1.0 (using 1.1.1), and
found some bizarre behavior with appsink. I had been using fakesink,
using the handoff signal and the last-sample property, which worked
fine. I then tried appsink, using the new-sample signal, but got a
pipeline stall after the first one to three buffers, even with an
empty callback. I have a leaky queue immediately before either the
appsink or fakesink.

Here's a snippet of what I'm using with both fakesink and appsink,
with the callbacks simply printing a statement, and fakesink is fine
while appsink blocks:

#if USE_FAKESINK
  g_object_set(sink,
    "signal-handoffs", TRUE,
    NULL);
  g_signal_connect(sink, "handoff", G_CALLBACK(handoff), priv);
#else
  g_object_set(sink,
    "drop", TRUE,
    "emit-signals", TRUE,
    "max-buffers", (guint)1,
    NULL);
  g_signal_connect(sink, "new-sample", G_CALLBACK(new_sample), priv);
#endif

All I have to do is comment out the new-sample signal connection, or
set emit-signals to FALSE, and appsink no longer blocks.

Thanks for any suggestions.
-Josh


More information about the gstreamer-devel mailing list