-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frame receiving hook with member functions #69
Comments
Oh, this was already mentioned in #57.. Yikes. |
There's really no recommended way, it just depends on your use case. Kvazzup uses hooking because of the way its filters are implemented but I've also used polling in applications that had a small and simple event loop in the main() function. |
@wowaser It is possible to use classes with the RTP (unlike the RTCP) in current implementation. You just have to pass the class as a void parameter (arg) and then have the installed function be static where you call the converted arg->function(frame). Kvazzup uvgRTP receiver has an example of this. C++ API for this will probably come in 2.2 version of uvgRTP. |
My view is that with hooks, there is no extra delay or CPU usage compared to pulling, but when using pulling, the code is clearer and easier to synchronize. Make the decision based on which is more important. I'm closing this since it is already possible to use classes with current RTP API and #57 will bring the C++ API to uvgRTP. |
Hi.
This issue is similar to #43.
Function
provides a way of pulling frames via callback function, but this doesn't work with member functions. The conversion is not provided.
Also, which is the recommended way of getting frames, pulling in a loop, or installing a hook? Hook seems much more convenient.
Thank you.
The text was updated successfully, but these errors were encountered: