* Handle no codecs in track info.
Not sure how it happens, but seeing a panic caused by no codecs in track
info. Avoiding that and logging information when it happens.
* log request
* Populate SDP cid in track info when available.
- Adding SDP cid to TrackInfo. Browsers like FF uses a different stream
id for AddTrack and actual SDP offer. So, have to look up using both
on server side. To make it easier, store both (only if different) in
TrackInfo.
- Use a codec in TrackInfo for audio also. There is some discussion
around doing simulcast codec for audio so that something like PSTN can
use G.711 without any transcoding. So, just keep it consistent between
audio and video.
- Populate SDP cid when SDP offer is received. It could populate a
pending track or an already published track if the new offer is for a
back up codec where the primary codec is already published.
- Passed around parsed offer to more places to avoid parsing multiple
times.
- Clean up MediaTrack interface a bit and remove unneeded methods.
* WIP
* WIP
* deps
* stream allocator mime aware
* clean up
* populate SDP cid before munging
* interface methods
* Send `participant_connection_aborted` when participant session is closed
without becoming `ACTIVE`.
There is one sticky case. If there is a migration and the migration
fails, this will send `participant_connection_aborted` even though the
participant may have connected properly on the previous node.
* depsg
* Update go deps
Generated by renovateBot
* update go version
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Zhao <dz@livekit.io>
Proper message id checks.
Some refactoring for common code in rtcv2service handlers.
Instantiate signalling based on synchronous local candidates flag, but
needs better defined code.
* More v2 signalling changes
- Use wire message in relay signal
- Generate offerId for SDP for sync mode also
- more checks for SDP offer/answer state to see if there are cases of
missed/duplicate messages
* clean up
* Split signal segmenter and reassembler.
As reassembler may need to run a goroutine for pruning, splitting it up
so that we do not have unnecessary goroutines. Keeping the UT unified
though.
Also, for now, trying to see if `Prune` can be called from external
place to avoid creating a goroutine and have extra state/functions to
close the reassembler and clean up goroutine etc. May still have to do
goroutine, but have not created one for now.
* fix: do not increase packetId for each fragment of a packet
* HTTP PATCH on participant sid
* rename
* signal handler
* new files
* clean up
* clean up reassembly
* handle messages on server side
* deps
* staticcheck
* clean up
Currently, it is a bit of a mish-mash
- some compose the message fully and just call send()
- some give parameters and the message is composed in
participant_signal.go
Was thinking about making an interface for signalling and have v1/v2
impls, but did not want to repeat composing messages if there are common
messages. And some of those function reach into `ParicipantImpl` object
and use information (simple example of p.IsReady()) which would become
more elaborate if the signaller is split out into its own struct.
Maybe, just need to make an interface for the sink and send to the
correct sink based on v1 /v2 signal transport.
But, for now, just grouping all signal messaages in one file
so that it is easier to manage later.
Normalize the rids in SDP to known patterns.
Currently,
- LK protocol uses q;h;f
- Sean's OBS WHIP uses 0;1;2
As the ordering in SDP could be different, normalize to known order.
For RIDs not in the known set, just use it as is.
Back up codecs will not have pending track. The update needs to happen
on published track.
Have added a note about updating in published track. Can happen when we
have separate layers for primary and backup.