I am developing a dynamic overlaying module and actually I don't understand what is the relation between the invocation frequency of "onBeforeScaleFrame" and the frame rate of my incoming stream to be transcoded. The generated Javadoc in the Server Side API does not contain a single line of documentation for this API call. (Actually it does so for most of the things..)
I experimented with different frame rated input H.264 streams and based on my measurements, this method is called every ~120..130ms regardless of the frame rate.
Please explain why "onBeforeScaleFrame" is not called more frequently for higher frame rated video streams, and what is the exact relation between the invocation rate and the frame rate. The method name would suggest me a one to one relationship.
This is called every frame, as it is called each time before it is scaled, hence the name.
What I would do is make your code as basic as possible to reduce the time it maybe taking for your code to do any additional processing. It is very important any custom code can keep up with the frame rate required.