appsrc usage (push and pull mode)

HermannSW hermann at
Wed Nov 15 18:48:36 UTC 2017

Antonio Ospite-2 wrote:
> The problem is not about gst_app_src_push_buffer() but about 
> read_data(). 
> The callback you set with g_idle_add() needs to return TRUE (or its 
> alias G_SOURCE_CONTINUE) if you want it to be called again and 
> G_SOURCE_REMOVE if you don't.
Thanks, returning G_SOURCE_CONTINUE in callback funtion made it work

> ...
> In a _synthetic_ example for push mode like yours you may also want some 
> rate limiting (e.g. a sleep) to avoid thrashing your system. 
Of course I did nearly freeze my Pi Zero due to running out of memory
several times before getting rate limiting right.
[not a good idea to stream 100.000 frames per second into a gstreamer
pipeline without that :) ]

The result is far better than what I need, was able to push 216KB frames
with 626fps on average!
And without memory leak, I did babysit a 441.100 push frames run with top,
details here:


Sent from:

More information about the gstreamer-devel mailing list