I have an instance of IFilterGraph - my own graph with video filters (source, transofrm and renderer). How can I obtain the current fps (video frame rate) of running graph?
Regards Dominik
Probably the easiest way is to create a SampleGrabber filter with a custom callback, and calculate it yourself.
See:
ISampleGrabber
ISampleGrabber::SetCallback
ISampleGrabberCB
Each time your callback function is called, you have received a new frame. You probably should put this just before the renderer.
Also, depending on your graph, some filter could have information about frame rate, but the SampleGrabber method would work with any graph.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With