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

Implements adaptive track context switching with some other fixes. #752

Merged
merged 4 commits into from Feb 7, 2019

Conversation

gpolitis
Copy link
Member

@gpolitis gpolitis commented Feb 5, 2019

In theory the media engine can switch from sending simulcast -> non-simulcast on the fly and without additional signaling (either intentionally, or unintentionally due to a bug for example). The JS code can also activate/de-activate simulcast on the fly without signaling that back to the bridge (that would definitely be due to a bug). We recently observed for some scrambling video issues with the latest bridge and suspected that a bug in the JS code was causing the media engine to switch from doing simulcast -> not simulcast without signaling that to the bridge. This PR implements adaptive track projection context switches and treats the change from simulcast -> non-simulcast stream as a codec switch. Further analysis showed that there this wasn't an issue in the client and that there's no such simulcast -> non-simulcast switch, but it's good to be able to cope with such switches on the fly, so I'm opening a PR for that functionality.

Also this PR includes fixes for a few minor issues and it also brings back logging of the COLIBRI messages received/sent by the bridge.

@gpolitis gpolitis changed the title Implements Adaptive track context switching with some other fixes. Implements adaptive track context switching with some other fixes. Feb 5, 2019
/**
* The number of transmitted bytes so far.
*/
public final long transmittedBytes;
Copy link
Member

Choose a reason for hiding this comment

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

what do we use this and transmittedPackets for?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's used in RTCP SRs, we replace the values from the endpoint with the values that the bridge computes.

Copy link
Member

Choose a reason for hiding this comment

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

where?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's the responsibility of the adaptive track context to update these values in the SRs, so you will find these updates in GenericAdaptiveTrackProjectionContext and VP8AdaptiveTrackProjectionContext, along with timestamp updates in order for the receiving endpoint to be able to correctly map RTP timestamps to NTP timestamps.

@bbaldino bbaldino merged commit abfa233 into master Feb 7, 2019
@gpolitis gpolitis deleted the feat/track-context-switching-and-fixes branch February 7, 2019 17:54
bgrozev added a commit to bgrozev/jitsi-videobridge that referenced this pull request Mar 19, 2019
…merge-master

Brings in 'feat: Implements adaptive track projection context switches.'
(jitsi#752).
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