Basic tutorial 8 (appsrc/appsink): Should directly write data from need-data signal
Submitted by Sebastian Dröge
Currently it schedules an idle source on the mainloop from need-data and stops that idle source from enough-data. This causes people to copy this pattern everywhere while it is usually not needed at all.
In real applications there are usually two options that make sense:
Directly push into the appsrc from some thread where the data is available anyway
Use the need-data signal to produce the data and push it into the appsrc. It's called from the basesrc thread so that's exactly where it makes sense to produce the data