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

Send pace support improved #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Atlas42
Copy link
Contributor

@Atlas42 Atlas42 commented Feb 6, 2025

  • Added pacing rate configuration parameters

In a slow FPS use case (5ps) but with several high resolutions video streams, pacing is needed to avoid frame drops on the receiver.
Pacing will send a frame over 160ms which takes too long, ability to configure it is needed here.

  • Enable pacing even when RCE_FRAME_RATE is not enabled

When the application is providing the frame rate (camera source here), we do not want uvgRTP to provide it, but we still need pacing.
By only settings the force_sync_ flag when using RCE_FRAME_RATE, the pacing can happen.

- Enable pacing even when RCE_FRAME_RATE is not enabled
- Added pacing rate configuration parameters
@jrsnen
Copy link
Member

jrsnen commented Feb 6, 2025

Hello.

I agree that improved control over pacing is valuable. This code does not seem to remove the limitation of requiring RCE_FRAME_RATE flag so I am a bit confused what is the exact goal.

I am not convinced of the naming for the flags, as they seem too generic without expressing what pacing they are exactly controlling.

I am also thinking that is enumerator/denominator the best way to control this? It could be something like one value out of 100 or 1000 if it is the frame interval.

I think the simplest way to achieve this would probably be just one configurable value of maybe milliseconds that the sending in total should be paced over. This would be an alternative to the fps method.

@jrsnen
Copy link
Member

jrsnen commented Feb 6, 2025

I would be happy to merge this if it was improved.

BR, Joni

@Atlas42
Copy link
Contributor Author

Atlas42 commented Feb 6, 2025

Hello.

I agree that improved control over pacing is valuable. This code does not seem to remove the limitation of requiring RCE_FRAME_RATE flag so I am a bit confused what is the exact goal.

Setting the frame rate in the previous version sets force_sync_ flag that is only reset when the RCE_FRAME_RATE is used.
So the pace code is only used when RCE_FRAME_RATE is used.

I changed the set_fps to only set the force_sync_ flag if RCE_FRAME_RATE is used, so the pace code can execute when the flag is not set.

I am not convinced of the naming for the flags, as they seem too generic without expressing what pacing they are exactly controlling.

I am also thinking that is enumerator/denominator the best way to control this? It could be something like one value out of 100 or 1000 if it is the frame interval.

I think the simplest way to achieve this would probably be just one configurable value of maybe milliseconds that the sending in total should be paced over. This would be an alternative to the fps method.

Would a single RCC_PACE_FRAGMENT_DURATION parameter suits you ?

@Atlas42
Copy link
Contributor Author

Atlas42 commented Feb 6, 2025

Thinking about it, I don't think RCE_FRAME_RATE should impact pacing, that would send the frames as fast as possible and break the pacing purpose.

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