Commit Graph

2484 Commits

Author SHA1 Message Date
Raja Subramanian 20b400faef Use signed check on rollback. (#3389) 2025-02-01 14:16:53 +05:30
Raja Subramanian adc2246353 Move sequence number adjustment to when out-of-order is detected (#3387)
initially.

Out-of-order reception is detected and dropped before this change. By
moving the adjustment to that point, potentially more reports can be
processed.
2025-01-31 11:56:48 +05:30
Paul Wells 7216c825fb fix internal signal protocol backward compatibility with 1.7.x (#3384)
* fix internal signal protocol backward compatibility with 1.7.x
fixes #3371

* tidy
2025-01-30 16:44:35 -08:00
David Zhao 1825ea81f0 fire TrackSubscribed event only when subscriber is visible (#3378)
TrackSubscribed is meant to give publishers an indication when the subscriber
is ready to receive its audio. When there are hidden recorders in the room,
we do not want them to trigger this event.
2025-01-30 10:48:52 -06:00
Paul Wells 3970e965f6 move ConnectedAt to Participant interface (#3383) 2025-01-30 05:45:47 -08:00
Raja Subramanian a4ccc7cc7f Run bandwidth estimation when congestion is relieved also (#3380) 2025-01-30 11:57:58 +05:30
Raja Subramanian c90473b749 ReconnectResponse getting mutated due to mutation of client conf. (#3379) 2025-01-30 11:23:23 +05:30
Raja Subramanian 5aa17adc91 Clone TrackInfo to TrackPublishRequested event. (#3377)
This is atleast one place where analytics objects are getting mutated.
2025-01-29 14:10:43 +05:30
Raja Subramanian 1b86b485a9 Fix (hopefully) state transition. (#3375)
My previous PR was trying to fix a premature transition from CONGESTED -> NONE state.
But, that introduced a bug which accelerated the transition from EARLY_WARNING -> CONGESTED state due to holding the `queuingRegion` state variable.

Fix by not holding `queuingRegion` in state and take result of
processing runs.

NOTE: This can still use some work to make the state machine cleaner.
Initially, I was passing around a bunch of variables which was uncouth.
Then moved things to state which made code easier to read and also log
different things, but it causes problems like the ones above. Will take
another look and think more about making it more robust.
2025-01-29 01:00:53 +05:30
Raja Subramanian 59be7c601b Declare congestion none only if both methods are in DQR. (#3372)
* Declare congestion none only if both emthods are in DQR.

* do not change congestion reason unless queuing region changes
2025-01-28 14:10:23 +05:30
Raja Subramanian c30204d56c Fix typo in SendData nonce length check. (#3370)
Definitely need new glasses :-(
2025-01-28 09:59:48 +05:30
Raja Subramanian 2b5ee12f9b Reduce chances of metadata cache overflow. (#3369) 2025-01-27 18:14:57 +05:30
Raja Subramanian db75092aa6 Use nonce in data messages to de-dupe SendData API. (#3366)
* Use nonce in data messages to de-dupe SendData API.

With API retries, it is possible that some data messages are sent
multiple times. Check the nonce (if present) to de-dupe data messages
before forwarding it to the clients.

* add nonce to UserPacket

* defer unlock

* 128-bit UUID as nonce

* - UUID nonce
- make a UserPacketDeduper module for easier re-use.

* deps

* feedback
2025-01-27 15:35:37 +05:30
David Zhao 30669722c3 fix: pass RoomConfig along when creating a new dispatch rule (#3367) 2025-01-26 23:36:42 -06:00
Paul Wells ef4b5faba1 close signal session is request messages are undeliverable (#3364) 2025-01-24 00:24:22 -08:00
Raja Subramanian 524441446f Room creation time with ms resolution (#3362) 2025-01-23 09:42:30 +05:30
Paul Wells f435c5cb62 reduce log level for channel closed error when writing signal message (#3361)
* reduce log level for channel closed error when writing signal message

* tidy
2025-01-22 04:33:47 -08:00
Raja Subramanian b4cf055c1c Resolve newer participant using higher precision join time. (#3360)
* Resolve newer participant using higher precision join time.

Also, keep it consistent based on participant SID if everything else is
the same.

* switch to compare semantics

* fix
2025-01-22 15:24:34 +05:30
Raja Subramanian 416dded86f Clone pending tracks to prevent concurrent update. (#3359) 2025-01-22 13:24:26 +05:30
Raja Subramanian 0c28e432a3 Log RTT as seen by congestion controller (#3354) 2025-01-22 00:08:11 +05:30
Raja Subramanian 7a7e312424 Log probes. (#3352) 2025-01-21 20:51:03 +05:30
Raja Subramanian bea907b3a0 Request key frame on subscription change. (#3349)
To assist the path where the requested layer is higher than current seen
maximum and there is no congestion.
2025-01-20 18:45:05 +05:30
Raja Subramanian 35bb36e5fb Request key frame if subscribed is higher than max seen and not (#3348)
congested.
2025-01-20 16:40:52 +05:30
Raja Subramanian fe94a18bc2 Do not seed if stream is already writable. (#3347)
* Do not seed if stream is already writable.

It is possible that in migration case, when the forwarder state is
fetched from migrating out node and used to seed downtrack, it has
already started due to the time it takes to get the state. Seeding in
that state will reset things and cause large sequence number gaps
potentially.

* do not take lock
2025-01-20 11:08:59 +05:30
Paul Wells 759e5f79e0 allocate node for autocreated room in agent dispatch (#3344) 2025-01-17 00:54:30 -08:00
Rajiv Gonzalez 25fa83926f Reject ingress if Enabled flag is false (#3293) 2025-01-16 17:19:26 -08:00
Raja Subramanian 7f6bd614a0 Remove FF check for TWCC. (#3340)
Sending 0 ID dependency descriptor was the issue.
2025-01-17 02:14:26 +05:30
Raja Subramanian e2162f704a Do not send DD extension if ID is 0. (#3339)
* disable temporal layer scaling

* remove dummy start

* do not add 0 id

* remove tests

* clean up
2025-01-17 01:08:12 +05:30
Raja Subramanian 043464828a Correct off-by-one lost count on a restart. (#3337)
* Correct off-by-one lost count on a restart.

* log sender snap shot ID

* metadata cache overflow count per snapshot
2025-01-16 23:41:41 +05:30
Raja Subramanian b82f77eb87 Check for Firefox in rtc config. (#3336) 2025-01-15 20:45:37 +05:30
cnderrauber e2735f3bd1 remove dd debug logs (#3334) 2025-01-15 13:27:21 +08:00
Raja Subramanian ae8c8bc941 Turn off TWCC for Firefox (#3333)
* Debug FF TWCC

* - TURN off TWCC for Firefox. Seems to fail with VP9 send, i.e. there are
  no TWCC feedback packets when sending VP9.
- Relax thresholds for congestion as staging data is showing
  oscillations.
- Clean up some logging.

* debug log a few more signal messages

* revert config

* revert config

* clean up
2025-01-15 10:32:59 +05:30
Raja Subramanian 8e90ae03f5 Log min sequence number changes. (#3331)
Seeing some negative loss count (seems to be when interacting with
Firefox, but don't have definitive proof it does not happen with
others). Debug logging a bit to understand what could cause it.

Also, consolidating some common code to process packet feedback.
2025-01-14 15:30:11 +05:30
lukasIO fc009fc707 Add support for datastream trailer (#3329) 2025-01-13 10:42:49 +01:00
cnderrauber 6a5d6a282b Log sdps when negotiate failed (#3325) 2025-01-13 13:38:32 +08:00
Raja Subramanian 7c58fdf329 move unrolled mime type check for broader use (#3326)
* move unrolled mime type check for broader use

* Use in IsSvcCodec and make MimeType exported

* test

* tidy branches

* tidy

---------

Co-authored-by: Paul Wells <paulwe@gmail.com>
2025-01-13 10:24:03 +05:30
Raja Subramanian 53d300ba71 Use nano time for easier (and hopefully) faster checks/calculations. (#3323) 2025-01-12 00:56:46 +05:30
Raja Subramanian 28c39efa06 Exempt egress participant from track permissions. (#3322)
* Exempt egress participant from track permissions.

* test
2025-01-11 12:50:34 +05:30
Alan Willard 5b61bbc446 remove code that deletes state from the store for rooms older than 24 hours (#3320) 2025-01-10 10:09:55 +05:30
cnderrauber f08fc581e0 disable sctp zero checksum for unknown sdk (#3321) 2025-01-10 11:55:28 +08:00
cnderrauber f846c7719b Disable SCTP zero checksum for old go client (#3319)
Old go-sdks with old pion/sctp version can't
process unknown parameters.
2025-01-09 13:22:23 +08:00
Raja Subramanian 0d9bad489c Remove duplicate SSRC get. (#3318)
The duplicate was not checking for `nil`. The SSRC is already loaded
with proper nil check before.
2025-01-08 22:50:34 +05:30
Raja Subramanian 3b0077f2fe Log connection quality changes. (#3311)
Also remove the connection quality drop prom as it is unused and also
adds state/complexity.
2025-01-07 10:58:31 +05:30
Raja Subramanian 0dde347615 Use contiguous groups to determine queuing region. (#3308) 2025-01-07 04:00:39 +05:30
Raja Subramanian bfbc4fa81f Remove alloc in packet forwarding path. (#3305)
* Remove alloc in packet forwarding path.

Unlikely logger creation was doing allocs. Replace it with a function
like in rtpstats_receiver.go so that allocations do not happen
unnecessarily.

* variable rename

* one more place
2025-01-06 11:48:27 +05:30
cnderrauber 384e21abc0 vp8 temporal layer selection with dependency descriptor (#3302)
* vp8 with dd

* make temporal layer selection work with DD

* fix test

---------

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2025-01-03 21:26:03 +08:00
Raja Subramanian 238333985b BWE reset for probing. (#3295) 2024-12-31 23:22:47 +05:30
David Zhao ac43e8a640 fix completed job status updates causing workers to reconnect (#3294) 2024-12-31 01:57:46 -06:00
David Zhao 6acb4bbd61 add room/participant to logger context for SIP APIs (#3290) 2024-12-26 00:23:21 -06:00
Artur Melanchyk 2eaf84ad66 Reduce memory allocation in WritePaddingRTP / WriteProbePackets (#3288)
* allocate memory once in WriteProbePackets

Signed-off-by: Artur Melanchyk <artur.melanchyk@gmail.com>

* allocate memory once in WritePaddingRTP

Signed-off-by: Artur Melanchyk <artur.melanchyk@gmail.com>

---------

Signed-off-by: Artur Melanchyk <artur.melanchyk@gmail.com>
2024-12-25 21:01:21 -06:00