Commit Graph

2077 Commits

Author SHA1 Message Date
Benjamin Pracht
0a0860b5af WiP 2024-05-15 10:47:33 -07:00
Benjamin Pracht
eef3cf0f01 Redact egress object in CreateRoom request (#2710) 2024-05-10 10:05:53 -07:00
Raja Subramanian
80a4d021b9 Add simulate leave request close reason (#2713) 2024-05-10 20:02:25 +05:30
Raja Subramanian
66a3a8e028 cond broadcast always. (#2699)
With Read and ReadExtended waiting (they are two different goroutines),
use Broadcast always. In theory, they both should not be waiting at the
same time, but just being safe.
2024-05-10 12:32:28 +05:30
Paul Wells
b54acb0bad ensure room is running before attempting to delete (#2705)
* ignore api errors when deleting room

* start room before deletion

* delete from db first

* load
2024-05-09 00:06:41 -07:00
Raja Subramanian
71b5ffed93 Less confusing variable name (#2706) 2024-05-08 16:10:49 +05:30
Paul Wells
9a5db132eb add room/participant name limit (#2704)
* add room/participant name limit

* defaults

* simplify

* omitempty

* handle 0 config

* fix race

* unlock

* tidy
2024-05-06 17:25:18 -07:00
Raja Subramanian
4d7586bda8 Simplify layer roll back. (#2702)
* Cache TS offset along with sender report.

* set offset after clearing

* simplify roll back
2024-05-04 15:00:19 +05:30
Antti Tapaninen
45ed030ce6 add missing strings.EqualFold for some mimeType comparisons (#2701) 2024-05-04 11:47:29 +05:30
Raja Subramanian
26c2f7cd9a Do not use LastTS for dummy offset. (#2700)
* Do not use LastTS for dummy offset.

LastTS could be random when using dummy start. That should not be used
in calculating offsets.

Also, do not push padding into sequence before init. Could have heppened
with dummy start.

* apply dummy offset before comparing to last

* refresh ref TS

* initialize codec munger on catch up forwarding
2024-05-03 18:56:01 +05:30
Raja Subramanian
674550ea16 Option to disable traffic load tracking. (#2698) 2024-05-02 19:09:12 +05:30
Raja Subramanian
a2a8810734 log the correct new propagation delay (#2694) 2024-04-30 08:29:59 +05:30
cnderrauber
cfa82c6ad4 increase protocol version to support optional publisher datachannel (#2693) 2024-04-28 15:09:24 +08:00
Raja Subramanian
c8b289daa5 (Attempted) Simplify time stamp calculation on switches. (#2688)
* Simplify time stamp calculation on switches.

Trying to simplify time stamp calculation on restarts.
The additional checks take effect rarely and it not worth the extra
complication.

Also, doing the reference time stamp in extended range.
The challenge with that is when publisher migrates the extended
timestamp could change post migration (i. e. post migration would not
know about rollovers). To address that, maintain an offset that is
updated on resync.

* WIP

* Revert to resume threshold

* typo

* clean up
2024-04-28 12:13:52 +05:30
Paul Wells
18b3b7b421 use readCond in buffer read (#2691) 2024-04-27 04:04:01 -07:00
Paul Wells
ac1b0e38ca store active stats workers in list (#2690)
* store active stats workers in list

* test

* single node cleanup

* cleanup

* cleanup

* cleanup
2024-04-26 17:24:10 -07:00
Benjamin Pracht
f088730007 Add support for EnableTranscoding ingress option (#2681)
This changes the default WHIP ingress behavior to skipping transcode. Other inputs are still always transcoded.
2024-04-26 14:26:00 +02:00
Denys Smirnov
07791ffc00 Pass new SIP metadata. Update protocol. (#2683) 2024-04-26 13:57:39 +03:00
cnderrauber
90de06ce02 Make datachannel optional for publisher (#2686) 2024-04-26 15:24:41 +08:00
David Zhao
37346774bb Forward transcription data packets to the room (#2687) 2024-04-26 00:00:30 -07:00
Raja Subramanian
79f6506553 Clean up UpdateVideoLayers (#2685) 2024-04-26 12:21:40 +05:30
Raja Subramanian
90b47424b5 Handle UpdateLocalAudioTrack and UpdateLocalVideoTrack. (#2684)
* Handle UpdateLocalAudioTrack and UpdateLocalVideoTrack.

- Update the TrackInfo
- NOTE: populating Stereo and DisableDtx fields although there are
  features now.
- The audio features in UpdateLocalAudioTrack is applied as is,
  i. e. the update has the latest set of features.
- Emits a track update which will broadcast a participant update.

TODO:
-----
- Telemetry event with track update?

* update deps
2024-04-26 12:06:35 +05:30
cnderrauber
b55038af03 Detach subscriber datachannel to save memory (#2680)
Sfu don't read message from subscriber datachannel, detach
it to bypass the readLoop can save 128KB memory and 2 goroutines per
participant.
2024-04-24 16:26:07 +08:00
Paul Wells
c51b3e3fe2 use ttlcache (#2677)
* use ttlcache

* go

* test
2024-04-23 02:20:54 -07:00
cnderrauber
f239f8bff1 Fix SubParticipant twice when paticipant left (#2672) 2024-04-23 16:09:02 +08:00
Raja Subramanian
8f05385126 TTL param for ICE config cache (#2676)
* TTL param for ICE config cache

* rename to min
2024-04-23 10:49:55 +05:30
Paul Wells
c4354575ec do not capture pointers in ops queue closures (#2675) 2024-04-22 11:33:28 -07:00
Raja Subramanian
2ad0efc28f Handle large jumps in RTCP sender report timestamp. (#2674)
* Handle large jumps in RTCP sender report timestamp.

Seeing cases of RTCP Sender Report spaced apart by more than half the
RTP Timestamp range. Maybe a case of laptop going to sleep and waking
up. Handle it using time diff from last report and calculating expected
timestamp.

* try go 1.22
2024-04-22 23:04:56 +05:30
Raja Subramanian
af0b0c4734 Connection quality LOST only if RTCP is also not available. (#2670)
* Connection quality LOST only if RTCP is also not available.

It is possible that sender stops all layers of video due to some
constraint (CPU or bandwidth). Packet reception going dry due to
that should not trigger `LOST` quality.

Add last received RTCP time also to distinguish the case
of real `LOST` and sender stopping traffic.

Some bits to watch for
- With audio, RTCP reports could be more than 5 seconds apart (5 seconds
  is the default interval for connection quality scorer), but audio
  senders usually send silence packets even when there is no input.
  So audio completely stopping can be considered `LOST`.
- With video, have to observe if all clients continue to send RTCP even
  if all layers are stopped.
- RTCP bandwidth is not supposed to exceed the primary stream bandwidth.
  libwebrtc calculates that and spaces out RTCP reports accordingly.
  That is the reason why audio reports are that far apart. If a video
  stream is encoded at a very low bit rate, it could also be sending
  RTCP rarely. So, there is the case of LOST being indistinguishable
  from sender stopping all layers. But, this should be a rare case.

* typo
2024-04-21 23:35:24 +05:30
Paul Wells
680a07e896 update pion deps (#2667)
* update pion deps

* deps
2024-04-19 19:21:55 -07:00
Raja Subramanian
f4745b8437 Do codec munging when munging RTP header. (#2665)
* Do codec munging when munging RTP header.

It was possible for probe packets to get in between RTP munging and
codec munging and throw off sequence number while dropping packets.
Affected only VP8 as it does codec munging.

* do not pass in buffer as it is created anyway

* flip fields

* flip order

* fix test

* call translate for all tracks

* simplify
2024-04-19 22:32:13 +05:30
cnderrauber
8eb86f1077 Don't log dd invalid template index (#2664)
If the first packet of keyframe has template structure is lost then
subsequent packets rely on it will report invalid tempalte error which
is expected.
2024-04-19 16:48:36 +08:00
cnderrauber
0b3587b10d Disable dynamic playout delay for screenshare track (#2663)
Screenshare video has inaccuracy jitter due to its low frame rate and bursty traffic
2024-04-19 15:25:48 +08:00
Paul Wells
483aafcfc0 fix key frame timer (#2662) 2024-04-18 01:24:45 -07:00
Paul Wells
0974f3d961 replace keyframe ticker with timer (#2661) 2024-04-17 22:14:17 -07:00
David Colburn
8f8825cb88 fix participant, ensure room name matches (#2660) 2024-04-17 13:12:57 -07:00
Raja Subramanian
e96e8de725 Debug logging addition of ICE candidate (#2659) 2024-04-17 11:14:40 +05:30
Raja Subramanian
14b934a780 Log ICE candidates to debug TCP connection issues. (#2658) 2024-04-17 09:45:10 +05:30
Benjamin Pracht
6afa63ded3 Use the ingress state updated_at field to ensure that out of order RPC do not overwrite state (#2657) 2024-04-16 18:10:14 +02:00
Paul Wells
b77f0256c7 use typed ops queue in pctransport (#2656) 2024-04-16 03:23:08 -07:00
Raja Subramanian
1ab0879d28 ICE config cache module. (#2654)
* ICE config cache module.

* generic key type

* no ICEConfig in StartSession

* clean up
2024-04-16 15:49:45 +05:30
Paul Wells
5c38d58987 add typed ops queue (#2655)
* add typed ops queue

* tidy
2024-04-16 02:51:49 -07:00
Raja Subramanian
04d193e0b2 Update mediatransportutil. (#2652)
Also, use adjusted time of sender report for drift logging.
2024-04-16 10:10:06 +05:30
Paul Wells
7d5c991d8d add disconnected chan to participant (#2650) 2024-04-14 12:49:13 -07:00
Raja Subramanian
ec41d20f81 Reduce RED weight in half. (#2648) 2024-04-12 20:39:53 +05:30
David Colburn
990cf6877b backwards compatability for IsRecorder (#2647)
* backwards compatability for IsRecorder

* regenerate fakes
2024-04-11 11:14:15 -07:00
Raja Subramanian
d55948f761 Add PropagationDelay API to sender report data (#2646) 2024-04-11 20:00:13 +05:30
Raja Subramanian
ad1f508680 Add support for "abs-capture-time" extension. (#2640)
* Add support for "abs-capture-time" extension.

Currently, it is just passed through from publisher -> subscriber side.

TODO: Need to store in sequencer and restore for retransmission.

* abs-capture-time in retransmissions

* clean up

* fix test

* more test fixes

* more test fixes

* more test fixes

* log only when size is non-zero

* log on both sides for debugging

* add marshal/unmarshal

* normalize abs capture time to SFU clock

* comment out adding abs-capture-time from registered extensions
2024-04-11 15:25:10 +05:30
Raja Subramanian
21fbda3470 Silence some noisy debug logs (#2643) 2024-04-11 10:58:19 +05:30
David Colburn
407614b28e fix jobRequestAffinity (#2641) 2024-04-10 12:44:46 -07:00