Skip to content
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

Hook for sending APP packets #168

Closed
wants to merge 4 commits into from
Closed

Conversation

wowaser
Copy link
Contributor

@wowaser wowaser commented Oct 5, 2022

Hello, this is my proposition for #155
What do you think, @jrsnen?
I tested it and it works for me

@jrsnen
Copy link
Member

jrsnen commented Oct 6, 2022

Hi.

As a general idea, I think a hook based approach is the best solution for the APP, since I think it best mimics how details are gathered for other RTCP reports. That being said,

  1. can you modify this, so you also keep the old function. As a library we try to not remove functionality if possible and maybe there is a scenario where that style of API is the best.

  2. would install_send_app_hook be a better name? I started thinking that sending is a more important distinction than app, and therefore it would be nice if it was before app in name. Other name would be install_outgoing_app_hook().

  3. I think giving the map as a parameter is somewhat more complicated than it needs to be from the user's perspective. I would do it so that the user could install multiple hooks, each for one packet. Something like: install_send_app_hook(std::function < std::shared_ptr<rtcp_app_packet>()> app_sending), which then would be saved to an array where each function would be called when sending an RTCP report.

  4. can you add a function for removing the APP hook/all APP hooks?

Points 1 and 3 need to be done for this to be accepted. I'm open to hearing opinions on point 2. Point 4 would be nice, but can be left to a later date.

BR, Joni

@wowaser
Copy link
Contributor Author

wowaser commented Dec 25, 2022

This is deprecated and resolved by #187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants