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

rtcp: fix socket selection busylooping in rtcp polling #178

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

wowaser
Copy link
Contributor

@wowaser wowaser commented Nov 18, 2022

Hello,

I have noticed that my program takes an unnecessary amount of CPU and ran a profiler in Visual Studio.
It showed that the poll function in rtcp runner is very CPU heavy, although it's not doing much. Long story short the wait time of ::select function was not fully implemented, and was always 0, causing the function to busyloop. I fixed it by finishing the wait time calculation for microseconds aswell. After this adjustment, the CPU load of my program was roughly halved.

@jrsnen
Copy link
Member

jrsnen commented Nov 23, 2022

Hello,

you are right, good find. Thanks a lot!

BR, Joni Räsänen

@jrsnen jrsnen merged commit 797657d into ultravideo:master Nov 23, 2022
jrsnen added a commit that referenced this pull request Nov 25, 2022
This patch release significantly reduces RTCP CPU usage (thanks to #178),
extends SCL to support NAL units as small as 4 bytes for H264 and
6 bytes for H265/H266 (including start code prefix). These are the
smallest sizes reasonable. This release also fixes a bug where
separate NAL units with same timestamps are discarded after first.
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.

None yet

2 participants