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

[core] Repurpose SRTO_GROUPMINSTABLETIMEO #2081

Merged

Conversation

maxsharabayko
Copy link
Collaborator

@maxsharabayko maxsharabayko commented Aug 12, 2021

SRTO_GROUPMINSTABLETIMEO is a socket option for SRT socket group. It does not do anything when set on an individual socket, but when set on a listener socket - it is used to derive the value for a group. Defines the minimum value of the stability timeout for a member socket to be considered unstable.

API Changes

  • Renamed SRTO_GROUPSTABTIMEO to SRTO_GROUPMINSTABLETIMEO. Default: 60 ms.
  • The SRTO_GROUPMINSTABLETIMEO option can be set on an individual socket and on a group socket.

Logic

  • The option value is used in CUDTGroup::sendBackup_QualifyActiveState(..) instead of the constant value of 60 ms.

URI Scheme

  • groupminstabletimeo=<int>

Tests

  • Several Listeners in a Group, Sender.
  • One Listener in a Group, Sender.
  • A Group of Callers, Sender

Docs

  • Update the docs

Fixes #1792
Fixes #2254 (a typo).

@maxsharabayko maxsharabayko added Type: Enhancement Indicates new feature requests [API] Area: Changes in SRT library API labels Aug 12, 2021
@maxsharabayko maxsharabayko modified the milestones: v1.4.4, v1.4.5 Aug 12, 2021
@maxsharabayko maxsharabayko self-assigned this Feb 14, 2022
@maxsharabayko maxsharabayko force-pushed the develop/opt-min-response-timeo branch from 1a2b1f5 to 015fe1c Compare March 2, 2022 14:28
@maxsharabayko
Copy link
Collaborator Author

maxsharabayko commented Mar 4, 2022

Test Cases

1. Several Listeners in a Group, Sender

Several listeners form a group. Confirm the groupminstabletimeo is applied.

srt-xtransmit generate "srt://:4201?groupminstabletimeo=70" srt://:4200 -v --sendrate 1Mbps --duration 5s

srt-xtransmit receive "srt://127.0.0.1:4200?grouptype=backup" srt://127.0.0.1:4201 -v

2. One Listener in a Group, Sender

One listener forms a group. Confirm the groupminstabletimeo is applied.

srt-xtransmit generate "srt://:4201?groupconnect=1&groupminstabletimeo=70" -v --sendrate 1Mbps \
    --duration 5s

srt-xtransmit receive "srt://127.0.0.1:4201?grouptype=backup" srt://127.0.0.1:4201 -v

3. A Group of Callers, Sender

Several callers form a group. Confirm the groupminstabletimeo is applied.

srt-xtransmit generate "srt://127.0.0.1:4200?grouptype=backup&groupminstabletimeo=70" srt://127.0.0.1:4201 \
    --sendrate 1Mbps --duration 5s -v

srt-xtransmit receive "srt://:4200" srt://:4201 -v

@maxsharabayko maxsharabayko marked this pull request as ready for review March 7, 2022 08:31
@maxsharabayko maxsharabayko changed the title [core] Repurpose SRTO_GROUPMINRESPONSETIMEO [core] Repurpose SRTO_GROUPMINSTABLETIMEO Mar 7, 2022
srtcore/group.cpp Outdated Show resolved Hide resolved
srtcore/socketconfig.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@stevomatthews stevomatthews left a comment

Choose a reason for hiding this comment

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

Minor edits to API-socket-options.md

maxsharabayko and others added 2 commits March 7, 2022 22:13
Co-authored-by: stevomatthews <smatthews@haivision.com>
@maxsharabayko maxsharabayko merged commit 4b70a63 into Haivision:master Mar 8, 2022
@maxsharabayko maxsharabayko deleted the develop/opt-min-response-timeo branch March 8, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[API] Area: Changes in SRT library API Type: Enhancement Indicates new feature requests
Projects
None yet
2 participants