Doing the buffer pull in the gstreamer "new-buffer" callback decreases the work
needed to be done by the videoPull() thread. This seems to give lower average
timestamps between successive draw/updatecanvas() calls, so perhaps better
framerates can be achieved.
In order to decouple videoPull from pulling the buffer, an async queue is
introduced between the gstreamer "new-sample" callback and the qt videoPull
function. On the release path, gst_sample_unref is decoupled from the qt side by
putting the already used frame in an output async queue. The bffers in the queue
are unreferenced in the gst "new-sample" callback.
The gst_sample pulled from the appsink is already reference counted. We just
need to unref it after copying it, which we do.
If we reference it again, the sample/buffer is not freed - I have seen the app
crashing while consuming most of system memory (can lead OS to out-of-memory
condition) before this commit.