273 Commits

Author SHA1 Message Date
Alessandro Ros a27d6f0476 client: support Axis SRTP variant (#1033) 2026-04-08 19:13:19 +02:00
Ondrej Sery 7876c4f31f client: fix RTSP-over-HTTP tunnel request target (#1041) 2026-04-08 19:12:11 +02:00
Alessandro Ros 9cee396d33 expose DialTLSContext and TLSListen (#1037)
these allows to intercept unencrypted packets.
2026-03-31 20:58:41 +02:00
Alessandro Ros 762e9758b3 client: fill server name indication (SNI) of TLS connections (#1038) 2026-03-31 20:38:22 +02:00
Alessandro Ros 569226dd3a use safer atomic structs instead of atomic functions (#1039) 2026-03-31 11:31:08 +02:00
Alessandro Ros 9b8a0c6cfa move supported schemas into constants (#1035) 2026-03-30 16:14:22 +02:00
Alessandro Ros e55d889e89 refactor statistics (#1020) 2026-03-16 20:51:58 +01:00
Alessandro Ros 4c54b29a94 allocate a rtp sender for each server session (#1021)
this produces more realistic statistics and in the future will
allow to implement per-session statistics and packet retransmission.
2026-03-16 19:46:09 +01:00
Alessandro Ros 5bea1d7f68 client: fix support for hostnames in source and dest headers (#1009) (bluenviron/mediamtx#5304) (#1014) 2026-03-13 15:25:03 +01:00
Alessandro Ros 7dbc385204 update documentation (#1004) 2026-02-20 22:41:13 +01:00
Alessandro Ros 01f9fd7843 update documentation (#991) 2026-02-06 15:38:50 +01:00
Alessandro Ros 93d1306e95 client: add UDPSourcePortRange parameter (#988)
Co-authored-by: Bjørn Steen Saethre <bjorn.sathre@scaleaq.com>
2026-01-23 14:15:30 +01:00
Alessandro Ros ad9b0207ae update documentation (#987) 2026-01-22 19:17:08 +01:00
bluenviron-bot f11773805d bump golangci-lint to 2.8.0 (#983) 2026-01-15 23:19:03 +01:00
Alessandro Ros 0e56f305d1 allow rtpreceiver and rtpsender to count received, lost and sent packets (#947) 2025-11-12 18:07:09 +01:00
Alessandro Ros 9a257e65c8 simplify code with ptrOf (#943) 2025-11-11 11:51:31 +01:00
Alessandro Ros 1214bdc17e server: fix timeout when reading with Media Foundation (bluenviron/mediamtx#5090) (#932) 2025-11-02 17:03:44 +01:00
Tristan Matthews 69481ce0bd Apply modernize changes (#917) 2025-11-02 17:00:34 +01:00
ProtoTess b4355d3099 use AVP profile when scheme is RTSPS and protocol is TCP (#916)
plus, allow to pick between AVP and SAVP when scheme is RTSPS and protocol is TCP.

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-10-21 18:46:24 +02:00
Alessandro Ros 449624b60f server: add idle timeout (#912)
this prevents idle connections and sessions from stacking up.
2025-10-13 18:06:27 +02:00
Alessandro Ros 6107dea9a0 add RTSP-over-WebSocket (#891) (#898) 2025-09-17 21:30:11 +02:00
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 8c7e4320bc server: fix panic due to regression in #887 (#892)
This happened when writing a TCP packet to a conn after a read error.
2025-09-16 10:36:06 +02:00
Alessandro Ros ead4471b5c support RTSP-over-HTTP (#433) (#768) (#887) 2025-09-15 19:00:50 +02:00
Alessandro Ros 0e674daa7b client: remove automatic SNI support (#888)
SNI support should be enabled by properly filling TLSConfig.
2025-09-15 15:54:37 +02:00
Alessandro Ros 9db34842c8 move host resolution from headers to client/server (#883) 2025-09-07 15:39:02 +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 3c2625c7cf make most methods thread safe (#882)
Client: Stats

ServerConn: Session, Stats

ServerSession: State, Stats, Medias, Path, Query, Stream,
SetuppedSecure, SetuppedTransport, AnnouncedDescription
2025-09-06 15:42:07 +02:00
Alessandro Ros 65da49ffc0 optimize code (#878)
* remove unused code

* initialize UDP listeners and SRTP before initializing medias

* make rtpSender and rtpReceiver available before PLAY / RECORD

* use writerMutex to protect writer only
2025-09-05 23:11:51 +02:00
Alessandro Ros 1f543a0331 rename rtcpreceiver into rtpreceiver, rtcpsender into rtpsender (#874)
These utilities were originally meant to handle RTCP only, now they are
in charge of every QoS mechanism.
2025-09-04 19:06:56 +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 7a5df14b2c add UDPReadBufferSize option (#857) 2025-08-11 10:49:54 +02:00
Alessandro Ros 314288ef12 client: prevent setting up undesired back channels (#856) 2025-08-09 17:14:22 +02:00
Alessandro Ros 5cbe14c918 remove useless check (#849) 2025-08-07 16:31:12 +02:00
Alessandro Ros e9db56f913 client: use server interface as multicast interface (#762) (#847)
this fixes most errors "found no interface that is multicast-capable
and can communicate with IP".
2025-08-04 15:17:49 +02:00
Alessandro Ros 63f7ffc3e3 improve Stats performance (#839)
Build aggregated statistics by using already-available data.
2025-07-26 14:01:17 +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 2c2f99e1a3 client: open firewall before sending PLAY request (#821)
this prevents losing some initial packets.
2025-07-05 11:13:51 +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 d7f40e5026 client: when reading UDP streams, write reports to right IP (#818)
source IPs sent by the server were not taken into consideration. This
fixes the issue.
2025-06-30 20:07:48 +02:00
Alessandro Ros 3055b4f9a1 client: when reading multicast streams, write unicast reports (#817)
Previously, receiver reports were broadcasted to all connected clients. Now they are sent to the server only.
2025-06-30 20:07:19 +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 33a87b2270 client: deprecate Seek() (#806) 2025-06-29 10:27:54 +02:00
Alessandro Ros 5681eddb28 update documentation (#788) 2025-05-29 19:40:03 +02:00
Alessandro Ros 4e3c5e6c0d client: skip firewall opening when writing back channels (#776) 2025-05-04 15:47:06 +02:00
Alessandro Ros 904b0a1920 client: enable keepalives in most cases (#775) 2025-05-04 15:39:07 +02:00
Alessandro Ros 2cbdc2a0b7 client: fix timeout when writing to back channels (#575) (#774)
Keep alives are now sent when writing to back channels too.
2025-05-04 13:17:53 +02:00
Alessandro Ros 74a65e4c08 expose back rtcpreceiver, rtcpsender, rtpreorderer, rtplossdetector (#755) 2025-04-12 10:10:05 +02:00