1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 07:15:47 +01:00
Commit graph

66 commits

Author SHA1 Message Date
Juliusz Chroboczek
e7e8a9b555 Add method Addr to client. 2024-05-01 23:38:21 +02:00
Juliusz Chroboczek
3409f5a27f Replace uses of os.IsExist and os.IsNotExist with errors.Is.
The former don't properly unwrap errors.
2024-04-14 13:34:32 +02:00
Juliusz Chroboczek
aa53b78b2c Distinguish between no username and empty username. 2023-04-03 22:58:38 +02:00
Juliusz Chroboczek
db21575df3 Implement audio-video sync in diskwriter.
We used to simply synchronise on the first keyframe.  This
could lead to important time offets, since every audio frame
is a keyframe, while we only request video keyframes every
four seconds.

Fix that by parsing the RTCP synchronisation data and adjusting
timestamp offsets accordingly.  If we have no RTCP sync, we simply
assume that the first frames received are synchronised.
2022-04-17 21:07:49 +02:00
Juliusz Chroboczek
e3c8645897 Split reopen into close/open.
Only call close if there's already a writer, which avoids flushing
packets before the first call.
2022-04-17 18:24:08 +02:00
Juliusz Chroboczek
d36111d9f9 Set keyframe flag on audio samples. 2022-04-16 01:19:12 +02:00
Juliusz Chroboczek
a183ac4bcd Increase the size of the diskwriter's reordering buffer.
This must be larger than the samplebuilder's MaxLate.
2022-03-21 23:38:09 +01:00
Juliusz Chroboczek
a2ce703512 Reduce MaxLate values in diskwriter. 2022-03-21 21:40:33 +01:00
Juliusz Chroboczek
de3a016f4d Set the username in the server when using tokens.
This avoids the need to pass the username in the URL without
requiring the client to parse tokens.
2022-02-20 15:33:11 +01:00
Juliusz Chroboczek
a86fb08f6c Replace ClientPermissions with a list of strings.
Now that we support external auth, the permissions list is
open-ended.  Make it a list for simplicity.
2022-02-19 23:44:57 +01:00
Juliusz Chroboczek
24187430e8 Rename client status to data, add group data.
We now distinguish between status, which is maintained by the server,
and data, which is provided by the client.  In addition to client data,
we now support group data.
2022-01-29 23:28:08 +01:00
Juliusz Chroboczek
1fb4288630 Don't send NACKs from disk writer.
We're already doing it in the receiver loop.
2022-01-26 02:31:34 +01:00
Juliusz Chroboczek
564dcd4167 Move keyframe handling back to the packet level.
Doing that at the sample level suffers from too much delay
due to buffering in the samplebuilder.
2022-01-25 23:11:03 +01:00
Juliusz Chroboczek
0cbfa7b0ca Write out disk writer packets unconditionally.
If the stream was very short, we may not have created
a writer yet.  Write out packets even in that case.
2022-01-25 22:04:57 +01:00
Juliusz Chroboczek
fdf1fb4b16 Rework packet recovery in diskwriter.
We now request a keyframe if we lose too many packets.
2021-11-28 13:58:07 +01:00
Juliusz Chroboczek
1f9e45a30b Increase samplebuilder buffers even more. 2021-11-27 23:21:39 +01:00
Juliusz Chroboczek
501edd4a88 Update samplebuilder, increase buffer size.
This avoids a crash when a single frame was too large for the
samplebuilder.
2021-11-23 19:39:40 +01:00
Juliusz Chroboczek
869eb9b839 Move password checking into group.go.
It used to be delegated to clients.
2021-10-27 04:15:44 +02:00
Juliusz Chroboczek
cf9c0edb89 Update Pion to 3.1.0-beta.3, new samplebuilder. 2021-08-23 18:15:55 +02:00
Juliusz Chroboczek
a5c97fd849 Add System permission.
This replaces the OverridePermissions method, and is communicated
to clients that can reliably and safely identify a system user.
2021-07-30 19:26:34 +02:00
Juliusz Chroboczek
0623e92760 Add support for recording h.264 video.
We store h.264 in Matroska, since we already have the library.
We currently store the video width and height as 0.
2021-07-29 23:44:24 +02:00
Juliusz Chroboczek
7d29ef5a64 Make disk writer use the codecs package.
Instead of testing whether a sample is a keyframe, we test at the
packet level, then compare timestamps to identify the keyframe.
2021-07-29 23:07:08 +02:00
Juliusz Chroboczek
52a26327d7 Implement group status.
We now inform clients of the status of a group (locked, etc.).  Also
cleans up the handling of administrative messages, which solves the
issue of receiving "user" before "joined".
2021-07-16 19:51:54 +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
bcd62f190b Flush buffered packets in diskwriter at shutdown. 2021-07-11 23:22:46 +02:00
Juliusz Chroboczek
b0c39fca22 Implement loss handling in diskwriter. 2021-07-11 23:09:19 +02:00
Juliusz Chroboczek
39d8cf72fe Define a type maybeUint32 and use it in diskwriter. 2021-07-11 22:44:50 +02:00
Juliusz Chroboczek
eec6c8a5b0 Use a partition tail checker in the diskwriter.
Now that we have our own samplebuilder, we can use the mark bit
to avoid dropping packets before a dropped packet.
2021-07-11 21:01:10 +02:00
Juliusz Chroboczek
e840e53ac2 Switch to our own samplebuilder.
Pion's samplebuilder has been broken for over a month now, switch
to our own.
2021-07-11 20:18:44 +02:00
Juliusz Chroboczek
6143f53ca2 Remove unreachable code. 2021-06-20 18:40:01 +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
7665067a91 Rate-limit keyframe requests in disk writer.
We were requesting two keyframes in a row.
2021-05-17 03:10:00 +02:00
Juliusz Chroboczek
25b70bb72a Remove debugging statement. 2021-05-15 16:08:46 +02:00
Juliusz Chroboczek
515c4a5cd0 Rename pushConns to requestConns, move into Client interface.
Also allow selecting just a single connection.
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
0205695bd7 Fix disk writer when doing simulcast. 2021-05-12 16:39:46 +02:00
Juliusz Chroboczek
1130295e0b Use strings.EqualFold for comparing codec names. 2021-05-12 16:18:23 +02:00
Juliusz Chroboczek
c53cc20d26 Use Write instead of WriteRTP in the downTrack interface. 2021-05-11 23:48:17 +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
26bf8a341a Don't send client parameters in delete message.
This avoids a race condition since the delete messages are sent
asynchronously.
2021-05-10 16:58:28 +02:00
Juliusz Chroboczek
795a40ceaf Simulcast. 2021-05-08 21:12:29 +02:00
Juliusz Chroboczek
3ba2394be7 Implement user statuses.
The server now maintains a set of statuses for each user that are not
interpreted by the server but communicated to the other members of the
group using 'user' messages.
2021-04-28 17:01:05 +02:00
Juliusz Chroboczek
f0a39fca48 Send user permissions to client.
We now maintain the user list in the serverConnection.
2021-04-28 00:07:19 +02:00
Juliusz Chroboczek
1fd8b92f02 Avoid race in newDiskConn. 2021-02-28 16:27:26 +01:00
Juliusz Chroboczek
c72cbe8f27 Don't attempt to replace empty connection in disk writer. 2021-02-04 22:01:41 +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
6098d4af9d Implement autolock. 2021-01-14 03:56:37 +01:00
Juliusz Chroboczek
81e155a45f Implement saving to disk of VP9. 2021-01-03 22:19:25 +01:00