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

Fix #492 SimulcastConsumer cannot switch layers if initial tsReferenc… #1459

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

Lynnworld
Copy link
Contributor

@Lynnworld Lynnworld commented Oct 18, 2024

…eSpatialLayer disappears

We found the same issue as #492 described . If we do't get initial tsReferenceLayer SR , we can't switch latter.

Fixes #492

Copy link
Member

@ibc ibc left a comment

Choose a reason for hiding this comment

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

Love this PR. Thanks. Will merge next week and release.

@ibc
Copy link
Member

ibc commented Oct 18, 2024

@jmillan

@ibc
Copy link
Member

ibc commented Oct 18, 2024

Please add an entry in CHANGELOG file

Copy link
Member

@jmillan jmillan left a comment

Choose a reason for hiding this comment

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

👍

@ibc
Copy link
Member

ibc commented Oct 18, 2024

There is a bug but unclear whether it's introduced by this PR or not:

If the Producer has 3 encodings (so 3 simulcast spatial layers 0,1,2) and the encoding in the middle (encoding 1) has active: false, then when the consumer calls setPreferredLayers({ spatial: 1 }) mediasoup selects layer 2 instead of 0.

CleanShot 2024-10-18 at 17 51 33

Nah, confirmed that it also happens in v3 branch.

@ibc ibc merged commit 22a5f5f into versatica:v3 Oct 18, 2024
55 checks passed
@ggarber
Copy link
Contributor

ggarber commented Oct 18, 2024

With this change can it happen that we start forwarding spatial layer 2 before having a SR for that layer and then we switch to other layer when we receive a SR for that new layer?

I that case how can mediasoup maintain continuous timestamps if it doesn't have the SR of layer 2?

@ibc
Copy link
Member

ibc commented Oct 18, 2024

Nothing has changed regarding that. If no SR has been received for any spatial layer (simulcast stream) mediasoup selects the first available stream. If layer SR arrive for one or more layers then mediasoup could of course switch to them if there is SR for that layer and if that spatial layer is equal or lower than preferred spatial layer.

HOWEVER while testing this PR locally I've seen and reported a bug that was there since ever. Check the most recent created issue in GH.

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

Successfully merging this pull request may close these issues.

SimulcastConsumer cannot switch layers if initial tsReferenceSpatialLayer disappears
4 participants