How to know when caps are stale?

Stirling Westrup swestrup at gmail.com
Fri Apr 5 11:16:54 PDT 2013


I have a pipeline that I am dynamically reconfiguring, and I want to know
when the negotiation of caps triggered by that reconfiguration has
completed.

My first instinct was to code this:

A) Change config of a central element
B) Add a probe to my sink, to wait for a CAPS event.
C) when the probe callback is called, set a flag saying renegotiation is
done.

However, it occurs to me that renegotiation might manage to complete
*between* steps A and B, so that I timeout never having seen a CAPS event.
I could check the existing caps before setting up the probe, but how do I
know if these caps are old and about to change, or are the result of my
reconfiguration?

I've thought about reversing the order of A) and B), so that I add my
probes before starting reconfiguration, but I worry I might see a spurious
CAPS event that way, as renegotiation seems to happen A LOT when I look at
logs.


-- 
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130405/1c8cb054/attachment.html>


More information about the gstreamer-devel mailing list