0

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?

1 Answer 1

1

This turns out to have been an issue with the appsrc buffer not updating. The buffers had an invalid time stamp, once that was corrected, the text update is working fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.