Commit Graph

923 Commits

Author SHA1 Message Date
Benjamin Pracht
d6e32e3c1d WiP 2022-08-05 16:59:55 -07:00
Benjamin Pracht
80f5715d9c WiP 2022-08-05 16:16:48 -07:00
Benjamin Pracht
875d5d03a3 Merge remote-tracking branch 'origin/master' into benjamin/state_storage 2022-08-05 11:32:17 -07:00
Raja Subramanian
ab4d57ab5b Filter out UDP candidates from SDP if allowing only TCP. (#874)
* Filter out UDP candidates from SDP if allowing only TCP.

* Do it properly

* static check

* Adding TCP candidates to test
2022-08-05 23:11:07 +05:30
David Zhao
ab1ccae0c7 Respond to signal ping / pong (#871)
* Respond to signal ping / pong

* Pass back 1 for pong for now, we don't need the timestamp

* update protocol
2022-08-05 09:24:47 -07:00
Raja Subramanian
c75090a0fe Use a TTL of 1 hour for ICE config cache (#873) 2022-08-05 17:31:28 +05:30
Raja Subramanian
3f16018b62 Cache ICE config in room manager. (#872)
* Cache ICE config in room manager.

* mage generate

* Read ICE config within lock
2022-08-05 12:49:19 +05:30
Raja Subramanian
339181a534 Enable fallback to TCP. (#870) 2022-08-05 10:49:34 +05:30
Benjamin Pracht
0cffbe69e9 Fix ingress stream key lookup and avoid nil dereference when room in auth claims doesn't match (#869) 2022-08-04 16:22:55 -07:00
Benjamin Pracht
c333b7a026 Add support for Ingress service (#868)
Also check for Join permission on ingress API calls
2022-08-04 09:48:53 -07:00
Raja Subramanian
6b6f61b4df Adding transport fallback (#866)
* Adding transport fallback

Commented out for now so that we can gather some data.

* Promoting a few logs to info
2022-08-03 23:03:10 +05:30
Raja Subramanian
3c9a2cc66a Log selected ICE candidate pair (#865)
* Log selected ICE candidate pair

* simplify
2022-08-03 13:31:37 +05:30
Benjamin Pracht
0898912d78 WiP 2022-08-02 19:21:51 -07:00
Raja Subramanian
0f074aeb98 Remove period from log (#863) 2022-08-03 00:41:34 +05:30
Benjamin Pracht
5558aa5228 Make sure CreateIngest populates the stream_key and URL fields (#861) 2022-08-01 11:35:30 -07:00
Raja Subramanian
a393d64ccc Do not re-use transceiver when negotiation is pending. (#862) 2022-07-31 10:50:55 +05:30
cnderrauber
997461a2b6 rtpstats add update last packet method (#858) 2022-07-29 15:29:36 +08:00
Raja Subramanian
52b2e6398b Queue AddTrack if a published track is not yet closed (#857)
* Queue `AddTrack` if a published track is not yet closed

- Adding a queue for pending track by signal cid.
  Ideally, there should not be more than one pending,
  but making a queue to be generic.
- `TrackPublished` is sent if the queue has entries
  when a published track is closed.

* Fix tests and add more checks for queueing AddTrack
2022-07-29 11:51:36 +05:30
David Colburn
7aa5888338 Keep egress info for 24h (#856)
* Keep egress info for 24h

* updates

* better version comparison

* fix test

* duplicated if
2022-07-28 20:27:59 -05:00
David Colburn
0ab4379c5c Separate egress/ingress storage (#855) 2022-07-28 17:01:33 -05:00
Benjamin Pracht
7a2eac8e86 Initial Ingress support in API (#852)
This adds support for the Ingress related endpoints to LiveKit server. This currently doesn't handle reconnections safely.
2022-07-28 09:49:54 -07:00
Benjamin Pracht
188f9c675e Add support for Ingress in store interface (#849) 2022-07-26 16:55:03 -07:00
shishirng
a3e8304b56 send participant info/identity during track_published event (#846)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-07-21 17:34:52 -04:00
Raja Subramanian
e624604453 Revert "ListRooms using sid (#842)" (#845)
This reverts commit f2e1e67e58.
2022-07-21 14:49:41 +05:30
David Zhao
53f51c8cb0 Logging cleanup (#843)
* Logging cleanup

Changes log levels to better match significance

* fix lock
2022-07-21 00:39:49 -07:00
Raja Subramanian
f2e1e67e58 ListRooms using sid (#842)
* ListRooms using `sid`

* correct field name

* Remove contains and latest protocol
2022-07-21 11:05:33 +05:30
Raja Subramanian
51073e8918 Use TimedVersion for subscription permission update (#839)
* Use a read version for subscription permission

* Use TimedVersion for subscription permission updates

* Minor clean up

* latest protocol
2022-07-21 08:52:37 +05:30
Raja Subramanian
c88d2f9af5 Make media track test more stable(hopefully) (#841) 2022-07-20 23:44:10 +05:30
cnderrauber
b69c314145 update non block tcpmux (#840) 2022-07-20 16:33:56 +08:00
Raja Subramanian
29039b4e76 Use a go routine to clean up stats workers. (#836)
* Use a go routine to clean up stats workers.

It is possible that certain events (like TrackUnpublished) can
happen after the participant is closed. For webhooks pertaining
to those events, need details like room name/id. So,reap stats
workers a little while after the participant left event happens.

* handle data race report

* log analytics worker reap

* debug log
2022-07-18 11:47:43 +05:30
cnderrauber
aee97c68bc retransmit dd extension (#837) 2022-07-18 13:06:33 +08:00
Mathew Kamkar
e0676132d4 Packet stats from TC (#832)
* system level packet stats from tc

* drop percent

* test fix

* formatting

* formatting/wording

* prometheus metrics

* update livekit protocol go module
2022-07-15 10:41:40 -07:00
Raja Subramanian
4c7d3161a9 Record dynacast requirement of a subscriber synchronously. (#834)
With rapid changes to subscription settings, use of a goroutine
could end up processing dynacast needs for that subscriber in
a different order. So, record the susbcription needs of a subscriber
in the callback and process the data in a go routine.
2022-07-15 11:46:02 +05:30
cnderrauber
a0578db3ed resolve downtrack.bind/close timing issue (#833)
* resolve downtrack.bind/close timing issue

* fix test case
2022-07-15 14:09:45 +08:00
David Zhao
a2bf32797b Allow binding HTTP server to specific address (#831)
Improves security when running with placeholder keys. Only allowing
access from loopback by default.
2022-07-13 23:58:33 -07:00
Raja Subramanian
af93954c26 Close data channels (#830)
* Close data channels

* don't need to explicitly close data channels
2022-07-13 21:55:12 +05:30
cnderrauber
fcdff4f97a enable nack for audio track (#829) 2022-07-13 16:05:57 +08:00
Ramakrishna Chilaka
677b7c16d1 removing piBy180 from critical path (#821) 2022-07-11 16:02:51 -07:00
cnderrauber
4280a5993b correct RUnlock (#826) 2022-07-11 12:27:57 +08:00
Raja Subramanian
01f7309adc Separate close and stop on MediaTrackSubscriptions. (#823) 2022-07-09 12:42:54 +05:30
cnderrauber
cf88bdebc2 remove close check in downtrack.bind (#819)
* remove close check in downtrack.bind

* return nil but do nothing
2022-07-08 10:59:09 +08:00
Raja Subramanian
8315a547a8 Set layer state to stopped on pause. (#818)
* Set layer state to `stopped` on pause.

Previously, on pause, the worker was let run and declare
layer gone 1/2 a second (or whatever the stream tracker window
is set for) later.

But, when rapidly changing mute/unmute, the following cuold happen
and layer changes may be missed
- Available layers - 0, 1, 2
- Mute
- Before layer gone detected, unumute. Because of this layer gone
  is not reported and available layers stay at 0, 1, 2.
- Stream tracker is reset on unmute to enable quick detection of layer
  start.
- If all layers start back up, no issues.
- But, if the layers do not start back up, there is no layer start
  firing and the available layers are still 0, 1, 2 which is incorrect.

* exempt handling when paused
2022-07-07 22:52:45 +05:30
Raja Subramanian
177061712c Do not hold lock while invoking resolver. (#816)
* Do not hold lock while invoking resolver.

Resolver is in room and it will grab its lock.
It is called from partcipant when checking permissions.
Permissions processing uses the participant lock.
So, not a good idea to call a room function with
participant lock held. Avoid that.

Also, use a full lock in the add/remove subscription
path. This is to ensure that permissions path and
subscription path (like subscribing to new participant's
tracks) do not race. As subscriptions are queued now
on the subscriber side, this should be fine.

* Revoke path resolution in ops queue goroutine

* fix test
2022-07-07 13:24:26 +05:30
Raja Subramanian
52aed86080 Add remote participant context to logger (#815) 2022-07-07 10:44:10 +05:30
Raja Subramanian
ef66404a1a Keep track of pending subscriber operations. (#814)
* Keep track of pending subscriber operations.

This is required to determine if a receiver does not have
any subscription.

* correct spelling of queuing

* lock around hasPermission
2022-07-06 23:48:28 +05:30
Raja Subramanian
fbb1f9fc80 Move subscribe/unsubscribe queue to participant. (#813)
* Move subscribe/unsubscribe queue to participant.

As subscribe/unsubscribe operation can come from both
local media track or remote media track, participant
needs to have it.

* Remove comment

* Stop reneg timer on close

* address comments
2022-07-06 17:27:32 +05:30
David Colburn
fbbcbe77df Remove recording (#811)
* remove recorder service

* update protocol
2022-07-05 18:39:32 -07:00
cnderrauber
4242205ede move close downtrack to goroutine (#810) 2022-07-05 17:26:47 +08:00
cnderrauber
937882c364 add negotiate failed to ToDisconnectReason (#809) 2022-07-05 11:24:32 +08:00
cnderrauber
f17ed9b925 refine negotiation process (#807)
* refine negotiation process

* not restart during ice gathering

* fix test case
2022-07-04 17:11:09 +08:00