Skip to content

PVT-135 - Re-added packet pacing to threaded video network implementation - #7

Open
aw-sohonet wants to merge 10 commits into
rs-audiofrom
PVT-135
Open

PVT-135 - Re-added packet pacing to threaded video network implementation#7
aw-sohonet wants to merge 10 commits into
rs-audiofrom
PVT-135

Conversation

@aw-sohonet

Copy link
Copy Markdown
Owner

Added packet pacing to the threaded network implementation:

  • Mostly focused on getting an implementation that will evenly spread the flow of packets across a desired target.
  • Added parameter for controlling the target window (25ms default)

…e rate as a default (rather than a default that would not work on 60fps, and unlikely to work in 30fps). Also updated it so that the bitrate values will be respected (regarding UNLIMITED - All other values default to using the existing rules).

Updated the timing report to include the target (if one has been set).
…rings by converting the static strings to be C++ strings.
Comment thread src/transmit.cpp Outdated
Comment thread src/transmit.cpp Outdated
…hed int type to be 64-bit so we do not overflow when storing nanosecond timings.
Comment thread src/transmit.cpp Outdated
std::chrono::duration targetDuration = std::chrono::nanoseconds(packetDurationTarget) * (loopIndex + 1);
std::chrono::high_resolution_clock::time_point target = start + targetDuration;
// Loop until we're on target
while(std::chrono::high_resolution_clock::now() < target);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth logging the amount of time spent blocked here.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this in!

Fixed typo and updated constructor to use raw type. Removed warning by adding forward declaration of the `calculateFromTarget` function.
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.

3 participants