Commit Graph

46 Commits

Author SHA1 Message Date
Alessandro Ros
425fce20fc rename Transport* into Protocol* (#895) 2025-09-16 12:06:50 +02:00
Alessandro Ros
ec81d388d1 switch to v5 (#890)
* switch from v4 to v5

* remove deprecated entities

* remove "2" suffix from entities

* rename TransportProtocol into Protocol
2025-09-16 11:46:52 +02:00
Alessandro Ros
ead4471b5c support RTSP-over-HTTP (#433) (#768) (#887) 2025-09-15 19:00:50 +02:00
Alessandro Ros
9259df7cff modernize code (#884) 2025-09-07 16:05:13 +02:00
Alessandro Ros
c466c342ba expose transport details (#850)
add Client.Transport, ServerConn.Transport ServerSession.Transport
2025-09-06 16:28:40 +02:00
Alessandro Ros
cf2ff2b564 add Transport.Profile, media.Profile (#873)
this will allow to support AVPF in the future.
2025-09-04 18:08:51 +02:00
Alessandro Ros
367eb4dffd fix encoding and decoding of NTP fractional part (#869) (#870)
Fractional part now is in 1/(2^32) units, while it was in 1/(1^9) units.
2025-08-31 12:36:17 +02:00
Alessandro Ros
1021950db8 update linter settings (#840) 2025-07-26 16:28:03 +02:00
Alessandro Ros
9c1011567a client: add Start2; deprecate Start (#801) 2025-07-05 13:02:45 +02:00
Alessandro Ros
616fa7ea89 support encrypted streams with SRTP and MIKEY (#520) (#809) 2025-07-05 12:48:13 +02:00
Alessandro Ros
4f3337f56c set SSRC of outgoing packets (#803)
In client and server, each format now has a fixed, unique, known in
advance SSRC, that is applied to outgoing packets belonging to each
format.

This is needed to support SRTP/MIKEY, that require each format to have
a fixed, unique, and known in advance SSRC.

A secondary effect is that SETUP responses now always contain SSRCs of
each format, regardless of the fact that the first packet has been
produced or not (previously we needed at least one packet, from which
the SSRC was extracted).
2025-07-05 11:08:57 +02:00
Alessandro Ros
bf3ce11479 client: prevent downgrading from RTSPS to RTSP during redirect (#816) 2025-06-30 16:03:05 +02:00
Alessandro Ros
6cf27aac05 remove useless code from tests (#815) 2025-06-30 10:15:11 +02:00
Alessandro Ros
ff08b85700 server: add ServerStreamStatsFormat.LocalSSRC (#804) 2025-06-28 16:56:44 +02:00
Alessandro Ros
904b0a1920 client: enable keepalives in most cases (#775) 2025-05-04 15:39:07 +02:00
Alessandro Ros
ca6286321d fix various race conditions when writing packets to closed clients or server sessions (#684) 2025-01-19 12:07:59 +01:00
Alessandro Ros
87c6d81053 add statistics to Client, ServerSession, ServerConn, ServerStream (#556) (#656) 2024-12-25 13:30:08 +01:00
Alessandro Ros
8f74559616 close connections in case of write errors (#613) (#655) 2024-12-14 13:45:11 +01:00
Alessandro Ros
a2df9d83b3 client: fix BytesSent / BytesReceived computation (#612) (#654)
When the TCP transport protocol is in use, BytesSent and BytesReceived
were increased twice.
2024-12-13 20:55:50 +01:00
Alessandro Ros
72e74f349e server: use relative control attributes (#620) 2024-09-15 22:51:55 +02:00
Alessandro Ros
c9bf79f340 client: omit mode from Transport header (#611) (#574) (#614) 2024-09-09 10:28:34 +02:00
Alessandro Ros
363b48e632 update golangci-lint (#554) 2024-04-28 18:20:25 +02:00
Alessandro Ros
24ed937861 update golangci-lint (#535) 2024-03-19 12:50:26 +01:00
Alessandro Ros
93b02bc0e8 simplify tests (#461) 2023-11-07 23:21:33 +01:00
Alessandro Ros
01b3bfc6ab move url.URL into base.URL (#459) 2023-11-07 16:51:45 +01:00
Alessandro Ros
8f18a0d83b check SPS/PPS of H264/H265 SDPs (#394) 2023-09-01 18:31:52 +02:00
Alessandro Ros
3bdae4ed46 make WritePacket*() return errors when write queue is full (#388) 2023-08-26 18:09:45 +02:00
Alessandro Ros
ed4bbe3986 client: support server-sent requests (#93) (#378) 2023-08-24 16:07:09 +02:00
aler9
cdbecb1f5d allow setting additional properties of streams through description.Stream 2023-08-22 16:46:18 +02:00
aler9
4e000eb2dd emit a decode error in case of packets with wrong SSRC 2023-08-18 18:20:13 +02:00
aler9
bfef17b717 add Client.PacketNTP(), ServerSession.PacketNTP() 2023-08-17 13:23:16 +02:00
aler9
939c065f6f client: invert arguments of Setup() and SetupAll() 2023-08-17 13:23:15 +02:00
aler9
5e5a21240d rename pkg/formats into pkt/format 2023-08-16 13:26:17 +02:00
aler9
80106144e6 bump to v4 2023-08-16 13:26:17 +02:00
aler9
18ddae4c50 enable errcheck 2023-08-13 16:29:53 +02:00
Alessandro Ros
0f97e8158c client: return an error in case of invalid packet (#305)
when reading with TCP and packet has an unknown format.
2023-06-08 23:33:29 +02:00
Alessandro Ros
2fbba142cc add OnTransportSwitch, OnPacketLost, OnDecodeError to server and client (#225)
These new hooks replace the generic hooks Log() and OnWarning().
2023-04-04 17:10:37 +02:00
Alessandro Ros
af3ed2bd83 merge format and formatdecenc into formats (#222) 2023-04-01 13:23:16 +02:00
Alessandro Ros
04f5a4041c change owner (#217) 2023-03-31 12:34:07 +02:00
Alessandro Ros
1ad059a80b server: use absolute RTSP URL as control attribute (#210)
this is necessary in order to make GStreamer's rtspsrc to send query parameters correctly in SETUP requests.
2023-03-24 10:54:14 +01:00
Alessandro Ros
d369d215c2 client: replace OnWarning with Log (#208) 2023-03-19 18:15:33 +01:00
Alessandro Ros
a2d6ce8af6 replace OnDecodeError with OnWarning (#177) 2023-01-23 12:54:57 +01:00
aler9
5a2ea9cf9c partially revert cabfcd6 2022-12-22 20:36:41 +01:00
Alessandro Ros
ae9dac0ad3 use random UUIDs as media IDs (#163)
* remove Medias.Clone(), Media.Clone(), Format.Clone()

* server: use random UUIDs as media IDs

* client: use random UUIDs as media IDs
2022-12-22 20:32:28 +01:00
aler9
cabfcd627b client: do not override media controls inside Announce()
this fixes the client-read-republish example and allows users to set
their own media controls.

Function medias.SetControls() is provided in order to automatically set
media controls and must be called manually.
2022-12-22 18:54:09 +01:00
Alessandro Ros
a1396206b5 convert Tracks into Medias and Formats (#155)
* split tracks from medias

* move tracks into dedicated package

* move media into dedicated package

* edit Medias.Marshal() in order to return SDP

* add medias.Find() and simplify examples

* improve coverage

* fix rebase errors

* replace TrackIDs with MediaIDs

* implement media-specific and track-specific callbacks for reading RTCP and RTP packets

* rename publish into record, read into play

* add v2 tag

* rename tracks into formats
2022-12-11 22:03:22 +01:00