Commit Graph

1141 Commits

Author SHA1 Message Date
Paul Wells
ffd1c5597d Merge remote-tracking branch 'origin/agents-cleanup' into agents-temp 2024-09-18 01:58:03 -07:00
Paul Wells
79305c44d1 Merge remote-tracking branch 'origin/participant-convenience' into agents-temp 2024-09-18 01:57:42 -07:00
Paul Wells
6ad48b0cc9 gen 2024-09-18 00:58:48 -07:00
Paul Wells
d70cff0a14 tidy 2024-09-18 00:50:41 -07:00
Paul Wells
aa27600638 fix 2024-09-18 00:49:44 -07:00
Paul Wells
1436a1f186 driveby cleanup (#3017)
* driveby cleanup

* test
2024-09-18 00:45:55 -07:00
Paul Wells
e57374dbdb add convenience methods to participant 2024-09-18 00:12:33 -07:00
Raja Subramanian
f21bc84967 Log only when not nil. (#3015)
* Log only when not nil.

Default logging confuses debugging as we call using nil as well to make
the call site simpler. And logging a nil makes it look like it is
incorrect seeding. `nil` fields do not seed. So, don't log when `nil`.

* log SDP
2024-09-18 12:39:53 +05:30
cnderrauber
0c002b8675 exclude sip client from track publish metric (#3007) 2024-09-17 09:42:21 +08:00
Raja Subramanian
2e7bcbc5e2 Forward ChatMessage (#3005)
* Forward ChatMessage

* fill in participantIdentity

* remove redundant setting
2024-09-16 20:17:38 +05:30
Raja Subramanian
a0b4c39fd5 Use OnSelectedCandidatePairChanged to keep track of selected pair. (#3004)
* Use OnSelectedCandidatePairChanged to keep track of selected pair.

* update webrtc dep
2024-09-16 19:44:21 +05:30
Raja Subramanian
098aa78ab7 Do not remove from subscription map on unsubscribe. (#3002)
* Do not remove from subscription map on unsubscribe.

Notes in line as to why.

* Avoiding the extra check. It is fine to check under lock for clean up.
It is done in other places.

* comments
2024-09-14 12:56:48 +05:30
Raja Subramanian
1b5bb4dddc Log ICE reconnected. (#2999)
To increase visibility of ICE reconnect, logging reconnected at Infow
level. Otherwise, it is hard to see if an ICE restart finished
successfully.

Also, cleaning up ICEConnectionDetails a bit. Just separate out
read-only fields into its own struct and use it for read-only export.
2024-09-12 13:16:41 +05:30
cnderrauber
3cf70b2198 Disable fast negotiation temporarily after migration (#2991) 2024-09-10 00:16:09 +08:00
Raja Subramanian
cb235c123c Seed down track state on re-use. (#2985)
With the new early negotiation, onBinding callback could happen later.
Reset reusingTransceiver only if not re-using it.
2024-09-07 10:14:35 +05:30
cnderrauber
5ae88c267e CacheDowntrack synchronously on DownTrack.Close (#2981)
Avoid repeat adding local/remote downtracks when migration
after #2970 allow remote track can be subscribed before resolved.
2024-09-05 22:00:38 +08:00
cnderrauber
08b8db9eb1 Start negotiate immediately if last one is before debouce interval (#2979) 2024-09-05 15:37:30 +08:00
cnderrauber
4792e7e134 Revert "Add tracksubscribed event on downtrack added (#2934)" (#2975)
This reverts commit 8b47218270.
2024-09-04 10:42:18 +08:00
cnderrauber
d6ce2338e2 Use correct subscriber id in dynacast notify (#2972) 2024-09-03 11:35:52 +08:00
cnderrauber
efa85221b3 Negotiate downttrack for subscriber before receiver is ready (#2970)
* Negotiate downttrack for subscriber before receiver is ready

This change will save 1 round sdp negotiation time for
subscribing to simulcast-codec or remote node track

* solve comment

* Fix simulcast-codec case
2024-09-02 14:10:14 +08:00
Raja Subramanian
a4baa8b550 Skip ICE restart on unestablished peer connection. (#2967)
* Do not ICE restart on an idle/not yet started peer connection.

* Skip ICE restart on unestablished peer connection.

For publish only participants, the subscriber peer connection is not
negotiated. So, ICE restart was hitting an error while trying to restart
the SUBSCRIBER peer connection.

* use ICE gathering state as peer connection state may not have changed if first offer/answer was missed
2024-08-30 11:19:51 +05:30
cnderrauber
28417ef599 fix republish failed (#2966)
* fix republish failed

parallel negotiation would cause remote webrtc track consume
pending republished track then failed.

* comment
2024-08-29 15:41:32 +08:00
cnderrauber
16896e4d66 Add FastPublish in JoinResponse (#2964)
Set FastPublish in JoinResponse for participant can publish
and no ice fallback setting.
2024-08-28 12:00:28 +08:00
cnderrauber
bde702d9c9 Don't remove DD extesion for simucalst codecs (#2960) 2024-08-26 17:52:33 +08:00
Raja Subramanian
e9f26c21e7 Panic fix for nil candidate check. (#2957) 2024-08-25 10:12:32 +05:30
Raja Subramanian
56e67c9d25 Properly exclude mDNS when not trickling also. (#2956) 2024-08-24 23:23:23 +05:30
cnderrauber
947e8f5909 Speed up track publication (#2952)
* speed up track publication

Add metrics for track publication and subscription

Return EnabledCodecs in JoinResponse so client can
choose codec without server side codec fallback

Cache remote webrtc track without AddTrackRequest to
let client send publisher offer before AddTrackRequest response

* go mod

* clean code
2024-08-23 18:38:32 +08:00
Raja Subramanian
08b8ef56de Use monotonic clock in packet path. (#2940)
Set up a base time when starting a receiver and use that clock as base
for other packet times to ensure that clock is monotonic.
2024-08-17 23:19:27 +05:30
cnderrauber
8b47218270 Add tracksubscribed event on downtrack added (#2934)
will remove this once the remote node has tracksubscribed
event sent.
2024-08-14 10:19:01 +08:00
Raja Subramanian
edad813c61 Add DisconnectReason to ParticipantInfo. (#2930) 2024-08-13 17:24:09 +05:30
Raja Subramanian
9a6b4c6956 Send signal response for non-error cases also. (#2926)
* Send signal response for non-error cases also.

Gated by protocol version 15 or higher for sending OK response.

* explicit reason init
2024-08-12 22:25:34 +05:30
Benjamin Pracht
64057c3e4d Implement AgentDispatch service (#2919)
This allows listing, adding and deleting agent dispatches on an existing room. Requests go to a new AgentDispatchService, which sends them over RPC to the rtc.Room via the RoomManager. The rtc.Room then does agent job management using RPCs to the agent service.
2024-08-08 22:31:23 +02:00
cnderrauber
a8730b04b8 move TrackSubscribed trigger to MediaSubscription (#2916) 2024-08-07 22:30:52 +08:00
Raja Subramanian
13ee1aca28 Delay getting forwarder state till migration is complete. (#2909) 2024-08-06 12:45:46 +05:30
Raja Subramanian
8c323330b6 Store subscriber forwarder state (#2907)
* Forwarder state for migrating participant.

* clean up

* update protocol deps

* cleanup debug
2024-08-05 21:13:07 +05:30
cnderrauber
5e4c6d46fb rename log (#2906) 2024-08-05 13:46:56 +08:00
David Zhao
b1fbca066f Send the correct room closed reason to clients (#2901)
* Send the correct room closed reason to clients

* update go mod
2024-08-01 19:40:06 -07:00
Raja Subramanian
d68dd3033d Use extended sequence number in bucket (#2895) 2024-07-30 14:21:37 +05:30
Benjamin Pracht
0fd09d73c1 Instantiate default agent dispatches in rtc for better backward compatibility (#2886) 2024-07-22 08:44:13 -07:00
Raja Subramanian
bd616d6074 Split ICE candidate queue. (#2885)
Shared ICE candidate queue meant only one of PUBLISHER/SUBSCRIBER pc got
final candidate notification. Split the queue.
2024-07-20 10:25:06 +05:30
cnderrauber
0c5b5537b2 Don't create DDParser for non-svc codec (#2883) 2024-07-19 10:52:27 +08:00
Benjamin Pracht
a877ba2352 Partial support for agent dispatch management (#2872)
- Store agent dispaches independently of room agents on rtc.Room
- Serialize agent dispatches in rtc.Room
- Support for agent dispatch and job serialization in redis

The agent Job object references denormalized Room and ParticipantInfo object. When storing Jobs, this sets the Room to nil, and only stores the Participant identity field. When read back, these fields need to be set to their current value.
2024-07-18 13:36:43 -07:00
cnderrauber
e3597d780d Update pion to handle different extensions in two media section (#2878)
Also remove the code to disable DD extension for vp8/h264, it
cause DD can't be processed if the first video track is non-svc
codec.
2024-07-18 14:49:04 +08:00
Paul Wells
c905336fec mark final ice candidate (#2871)
* add IsFinal flag to last ice candidate

* deps
2024-07-16 09:50:55 -07:00
Paul Wells
9f42063fed use atomic pointer for MediaTrackReceiver TrackInfo (#2870) 2024-07-16 02:39:14 -07:00
Raja Subramanian
3621e9957e Prevent deadlock when adding down track. (#2869)
* Prevent deadlock when adding down track.

* revert down track lock scope change
2024-07-16 12:24:45 +05:30
Raja Subramanian
f7695cf9f4 Move track update methods to LocalParticipant. (#2868) 2024-07-16 08:09:46 +05:30
Raja Subramanian
f3d3ec1ce7 Record packet/octet count in sender report. (#2864)
Seeing cases of huge jumps in sender erport rtp time stamp
(of the order of minutes) a few hundred ms after start of track.
Only less than 20 packets have been published at that time as seen by
server. Adding these to sender report to check if client thinks it has
sent much more.
2024-07-16 07:59:27 +05:30
cnderrauber
e7424e5a8e don't send unknown signal message to rust sdk with protocol 9 (#2860)
rust sdk can't handle unknown message (ErrorResponse and
TrackSubscribed)
2024-07-16 00:03:54 +05:30
Raja Subramanian
affcd1ffdb Support updating local track features when pending. (#2863) 2024-07-15 23:51:39 +05:30