1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 08:35:57 +01:00
Commit graph

74 commits

Author SHA1 Message Date
Juliusz Chroboczek
002d519f91 Use a named type for trackAction kind. 2023-12-09 22:13:24 +01:00
Juliusz Chroboczek
00fbfafeeb Make unbounded channels explicit.
We used to have unbounded channels embedded within rtpconn
and webClient.  Make the structure explicit and testable.
2023-12-09 17:27:38 +01:00
Juliusz Chroboczek
fc9f28fd68 Minor cleanups. 2022-04-23 18:43:01 +02:00
Juliusz Chroboczek
461c78b0e3 Fix race condition in estimator. 2022-04-21 01:28:41 +02:00
Juliusz Chroboczek
af462329ab Set time offsets and cname as soon as possible. 2022-03-27 23:32:25 +02:00
Juliusz Chroboczek
e8fbfcb9ba Avoid overflow in bitrate computation. 2022-01-25 20:11:28 +01:00
Juliusz Chroboczek
c64ec4ccd0 Update dependencies. 2021-10-30 18:54:24 +02:00
Juliusz Chroboczek
e81ee4af5e Remove userId and userName from rtpconn.
They're redundant with the client field.
2021-09-16 16:53:44 +02:00
Juliusz Chroboczek
6aa7a9394a More tweaks to layer switching.
I'm not seeing any non-keyframe spatial sync frames, so simplify
the code by only switching spatial layers on keyframes.
2021-08-05 00:03:42 +02:00
Juliusz Chroboczek
f4aa86a491 Switch spatial layers at the right point. 2021-08-03 23:21:44 +02:00
Juliusz Chroboczek
48a9b10ce8 Use spatial scalability when simulcast is not available.
If the client requested a low-resolution stream and there is none,
switch to SID=0.
2021-08-03 13:14:11 +02:00
Juliusz Chroboczek
4f7be19644 Implement pid and mark rewriting for VP9, fix VP9 sync bits.
The sync bits were incorrect.  In addition, we need to set the
marker at the new end of the frame when doing spatial decimation.
2021-08-03 13:09:43 +02:00
Juliusz Chroboczek
56226a2934 Export the max requested rate in track statistics. 2021-08-03 03:28:36 +02:00
Juliusz Chroboczek
200c0dd68c Refresh layer info after adjusting in down.Write.
Otherwise we might act on outdated info, which could cause a spurious
drop.
2021-08-03 03:15:08 +02:00
Juliusz Chroboczek
dd4dbeaee5 Add spatial scalability support.
Only used as a last-resort fallback.
2021-08-01 13:57:14 +02:00
Juliusz Chroboczek
efb298f002 Use sendonly transceiver for down tracks, embed receiver in track. 2021-08-01 13:33:01 +02:00
Juliusz Chroboczek
3bdcb8af28 Fix typo in down layer selection. 2021-07-31 23:22:01 +02:00
Juliusz Chroboczek
89780b866b Move packet parsing code into its own package. 2021-07-29 21:30:39 +02:00
Juliusz Chroboczek
6ae79f21d6 Use unbounded buffer for track actions.
Without that, we might deadlock if the reader is blocked in read.
2021-07-16 03:03:45 +02:00
Juliusz Chroboczek
9b8d868647 Fix a race between delUpConn and addLocal.
We could call addLocal after the remote was closed, which
would cause the local connection to remain forever.

Thanks to Ludovic Rateau.
2021-07-15 16:03:06 +02:00
Juliusz Chroboczek
3d2089f40f Merge GetRTP and Nack into GetPacket.
The two function were always called together.  This factors out
the NACKing logic into the track.
2021-07-14 14:22:22 +02:00
Juliusz Chroboczek
36d31f0db8 Maintain a reference to the connection associated to each track.
This avoids carrying an extra parameter in many places.
2021-07-14 14:05:23 +02:00
Juliusz Chroboczek
f3b73263c8 Fix handling of NACKed packets when dropping.
We were not rewriting in this case.
2021-05-17 20:06:08 +02:00
Juliusz Chroboczek
22585e9d10 Handle spatial scalability.
Maintain spatial layer information, and drop lower layers when
possible.  Yields a 20% saving with VP9.
2021-05-17 18:17:43 +02:00
Juliusz Chroboczek
fd76abb61d Send up actions synchronously. 2021-05-17 03:54:58 +02:00
Juliusz Chroboczek
c00a21995e Move PLI rate-limiting into the reader loop. 2021-05-17 03:54:20 +02:00
Juliusz Chroboczek
c0da658b9f Send sender report more often.
Now that we start at 200kbps, we need to increase our rate faster.
2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
2da8faa8cf Implement per-stream requests. 2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
6f9d7fc306 Scalable video coding (SVC). 2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
5ad0244267 Allow the loss-based congestion controller to yield higher values. 2021-05-12 17:06:26 +02:00
Juliusz Chroboczek
c53cc20d26 Use Write instead of WriteRTP in the downTrack interface. 2021-05-11 23:48:17 +02:00
Juliusz Chroboczek
b09dba0e26 Remove FIR sending code.
We no longer send FIRs.
2021-05-11 23:46:57 +02:00
Juliusz Chroboczek
d3f53e6ada Move rate estimation into rtpDownTrack.WriteRTP. 2021-05-11 22:45:33 +02:00
Juliusz Chroboczek
c52e1f4ce0 Move keyframe handling to the sender side.
This is simpler and gets rid of ErrKeyframeNeeded.
2021-05-11 22:36:56 +02:00
Juliusz Chroboczek
795a40ceaf Simulcast. 2021-05-08 21:12:29 +02:00
Juliusz Chroboczek
ed88a7a4b5 Fix typo in REMB sending. 2021-05-08 18:51:15 +02:00
Juliusz Chroboczek
65972fabe8 Remove dead code. 2021-05-08 16:03:32 +02:00
Juliusz Chroboczek
9b1d814b58 Rework packetcache loss statistics.
Don't maintain loss, which is too error-prone.  Instead, maintain
expected and received packet counts, and compute loss from that.
2021-04-30 16:26:17 +02:00
Juliusz Chroboczek
cd6920d7e2 Allow group.API() to fail. 2021-04-29 21:10:04 +02:00
Juliusz Chroboczek
be73380f9f Label streams, not tracks.
We used to label tracks individually, in a view to using the labelling
for simulcast.  Since then, the WebRTC community has converged on a
different strategy, where multiple tracks share a single mid and
are labelled with the rid extension.

We now label whole streams, which is simpler, and use the track's
kind (and, in the future, the rid) to disambiguate.  This changes the
protocol in two ways:

  * in offers, the "labels" dictionary is replaced by a single "label"
    field; and
  * the syntax of the "request" message has changed.
2021-04-29 18:28:16 +02:00
Juliusz Chroboczek
fe83f61998 Don't complain about ErrClosedPipe in RTCP receiver.
This simply indicates that the server closed the connection
before we received the close indication from the client.
2021-02-11 16:19:36 +01:00
Juliusz Chroboczek
263258a0c1 Implement renegotiation of down streams.
We used to destroy and recreate down streams whenever something changed,
which turned out to be racy.  We now properly implement renegotiation,
as well as atomic replacement of a stream by another one.
2021-02-03 19:15:40 +01:00
Juliusz Chroboczek
6c4a71fda0 Increase timeout for connection completion. 2021-02-02 23:12:52 +01:00
Juliusz Chroboczek
73f72c45fc Fix race in pushConn. 2021-02-02 22:46:40 +01:00
Juliusz Chroboczek
14a4303664 Rework connection replacement.
We used to signal connection replacement by reusing the same connection
id.  This turned out to be racy, as we couldn't reliably discard old
answers after a connection id was refused.

We now use a new id for every new connection, and explicitly signal
stream replacement in the offer message.  This requires maintaining a
local id on the client side.
2021-01-31 23:59:17 +01:00
Juliusz Chroboczek
fb17778ba6 Increase receiver report timeout. 2021-01-21 21:19:07 +01:00
Juliusz Chroboczek
f0dcd0b1d9 Rework locking of tracks.
We now add tracks after the stream has been pushed, so we need a lock
on down streams.  Also rework sendUpRTCP to reduce locking.
2021-01-19 23:55:33 +01:00
Juliusz Chroboczek
49bcc342ed Queue negotiation if not in stable state.
If we send two offers back to back, the second answer will arive in
stable state, which will confuse us.  Instead, queue the second offer.
2021-01-12 20:44:48 +01:00
Juliusz Chroboczek
dad113c1f9 Generate transceivers from incoming SDP. 2021-01-11 20:24:09 +01:00
Juliusz Chroboczek
f53276b89e Simplify the protocol and the protocol interface.
Split the id field into id and source, where source indicates the sender
of the message and id the entity being sent.  Remove the label request,
just use the offerer's username.  Maintain the username within the
ServerConnection, this removes a parameter from some methods.
2021-01-03 12:17:30 +01:00