I am working on a pretty simple Gstreamer application in C++, using v1.8.1. I'm using an appsrc to get images from a camera and put them into the stream. The camera read and stream insertion is working just great, but I'm trying to overlay some stats onto the images.
In the appsrc's "need data" callback after I get and post buffer, I simply build the string, and pass it to the Textoverlay object (a global variable set in main). To wit:
sprintf_s(title, "Acq [ captured: %lu, skipped: %lu, fps: %.2f ]", frames, lostframes, 1000000.0 * (frames - prevframes) / (curtime - prevtime));
g_object_set(txtoverlay, "text", title, NULL);
It works great... the first time. Never again. I'm throttling the text update to every second, I've even tried every 10 seconds.
Any ideas on why the text overlay's string update isn't working past the first iteration?