Commit Graph

1128 Commits

Author SHA1 Message Date
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
Raja Subramanian
faa66d1138 Make sender report pass through an option. (#2861)
Enabled by default.

Also, tweak the long term propagation delay a bit. The first propagation
delay itself was too high and the long term initialized with a high
value. Prevent that and also ensure large negtaives do not have an
effect by using a lower bound of 0. Lower bound of 0 is okay as the main
purpose is to track sustained high positive values.
2024-07-15 11:27:31 +05:30
Raja Subramanian
09e3aef859 Check size limits on metadata and name set from client. (#2850)
* Send error response when update metadata fails.

Keeping it simple for the first implementation.
- Send error response only if request_id != 0
- Two kinds of errors notified
  o does not have permissions - NOT_ALLOWED
  o attributes exceeds size limits -  INVALID_ARGUMENT

* Check size limits on metadata and name set from client.

Added a name length limit also.

* check name length in service update participant path also

* limit check in limit config

* update protocol

* longer keys
2024-07-12 09:57:17 +05:30
Raja Subramanian
b8847cd8e9 Send error response when update metadata fails. (#2849)
Keeping it simple for the first implementation.
- Send error response only if request_id != 0
- Two kinds of errors notified
  o does not have permissions - NOT_ALLOWED
  o attributes exceeds size limits -  INVALID_ARGUMENT
2024-07-10 23:26:44 +05:30
Denys Smirnov
40d7a8add0 Always forward DTMF data messages. (#2848) 2024-07-10 00:29:49 +03:00
cnderrauber
deee816d0a Forward correct payload type for mixed up red/primary payload (#2847)
* Forward correct payload type for mixed up red/primary payload

* empty line

* log field & test case
2024-07-09 23:04:47 +08:00
Benjamin Pracht
fb7eb3450e Update agents service to updated protocol (#2837)
- Deprecate namespace field
- Restore former semantic of starting a job for each registered namespace, for a given Agent Name
- Add agentName field
- Use "dispatcher" naming convention
2024-07-08 17:09:11 -07:00
cnderrauber
70fbba2844 Add track subscribed notification to publisher (#2834)
* Add track subscribed notification to publisher

* update go mod
2024-07-05 21:57:03 +08:00
cnderrauber
7a5c90dc01 log non-trickle candidate in details (#2832)
* log non-trickle candidate in details

* fix test
2024-07-03 14:16:58 +08:00
Paul Wells
e511464d3d add handler interface to receive agent worker updates (#2830)
* add handler interface to receive agent worker updates

* cleanup
2024-07-02 13:11:08 -07:00
Benjamin Pracht
32a4d03c9e Implement Agents protocol addition (#2786) 2024-06-27 19:20:52 -07:00
Denys Smirnov
6815d85c01 Broadcast attributes update. (#2825) 2024-06-27 17:39:05 +03:00
Raja Subramanian
fa88fbf028 Revert "Revert "use pending lock, no need for participant lock (#2793)" (#2818)" (#2820)
This reverts commit 6d9529431f.
2024-06-26 13:05:27 +05:30
Raja Subramanian
6d9529431f Revert "use pending lock, no need for participant lock (#2793)" (#2818)
This reverts commit f92e7e3db8.
2024-06-26 11:26:50 +05:30