Wim Taymans
965b220206
module-rtp: clear ringbuffer in resync
...
When we resync to the timestamp, clear the ringbuffer to avoid playing
old stale samples.
2023-02-15 11:08:08 +01:00
Wim Taymans
aed394cf89
module-rtp: use timestamps as ringbuffer index
...
Use the timestamps directly as the ringbuffer index. We can save some
conversions to bytes and there is a direct mapping to RTP timestamp,
clock position and ringbuffer index.
Simplify the source a little. Remove the buffering state, we always
start with read and write pointers separted by the target buffering.
2023-02-02 15:54:53 +01:00
Wim Taymans
16e995be26
module-rtp: remove some useless debug
2023-02-02 12:12:01 +01:00
Wim Taymans
1a5de467db
module-rtp: support direct clock timestamps
...
Always use the timestamp of the graph clock for RTP packets. Add an
option to apply a random or fixed offset.
Add a ts-refclk option on the sender to specify a reference clock to
use for timestamping. This will activate the direct timestamp mode and
signal this in the SDP.
Parse ts-refclk and ts-offset from the SDP. Make it possible to match
them in rules. Add option to activate the direct-timestamp, where the
rate matching is disabled and the timestamps are used directly for
writing and reading from the ringbuffer using the graph clock.
This makes it possible to set a PTP clock on sink and source and avoid
rate matching by using a shared clock.
2023-02-01 18:31:33 +01:00
Wim Taymans
fab9d12a44
module-rtp-source: use simple boolean to check activity
...
Avoid doing clock_gettime for each RTP packet and use a simple boolean
to check if packets arrived since the last SAP timeout check.
2023-01-27 11:49:20 +01:00
Dmitry Sharshakov
7b3d02b7fa
module-rtp-source: touch session on RTP
...
Don't time out while actually running
2023-01-27 10:35:44 +00:00
Dmitry Sharshakov
785694db31
module-rtp-source: close socket while idle
...
Reduce network bandwidth when many streams are present but not used
2023-01-27 10:35:44 +00:00
Dmitry Sharshakov
62766d8175
module-rtp-source: set custom channel names if available
...
Some AES67 devices set `i` attribute with necessary information
2023-01-27 10:35:44 +00:00
Wim Taymans
97dd95ddec
module-rtp-source: increase SAP timeout some more
...
Some AES67 senders need more time.
2023-01-26 09:09:46 +01:00
Wim Taymans
6e99ccb73e
module-rtp-source: increase overrun watermark a little
...
On Wifi we can get big bursts.
2023-01-25 17:23:52 +01:00
Wim Taymans
9fb44c3a71
module-rtp-source: improve buffer handling
...
Try to keep half the packet size in the ringbuffer as well. This helps
us adapt to the packet size of the sender.
Drop samples from the ringbuffer for the first packet we read. This
makes us lock onto the stream with the exact requested latency.
2023-01-25 16:23:00 +01:00
Wim Taymans
6a375d5778
module-rtp-source: add match rules
...
Add match rules so that one can select what SAP announcements to
listen to. Also make it possible to set per session latency.
2023-01-25 14:58:15 +01:00
Wim Taymans
b9a144e478
module-rtp: handle property failure better
...
The cleanup might want to iterate the session list so make sure it is
initialized.
2023-01-25 13:23:39 +01:00
Dmitry Sharshakov
f8dfdf7b99
module-rtp-source: lower priority of frequent messages
2023-01-25 10:37:14 +01:00
Dmitry Sharshakov
974a9019d1
module-rtp-source: lower overrun log level
2023-01-25 10:36:45 +01:00
Dmitry Sharshakov
8000a55654
module-rtp-source: make incoming RTP messages more elaborate
2023-01-25 10:36:32 +01:00
Dmitry Sharshakov
f59b652142
module-rtp-source: set node name
...
useful for Audio/Source role
2023-01-25 10:36:17 +01:00
Dmitry Sharshakov
f2c3baf93f
module-rtp-source: make SAP cleanup interval configurable
...
Audinate AES67 devices send SAP messages with 30-second interval, so hardcoded timeout has to be bumped. Just bumping it will reduce efficiency of common RTP module use-case, so a config is introduced for this. 70 second will be set as default for AES67 mode.
2023-01-25 10:36:08 +01:00
Wim Taymans
164e343dbf
remove pipewire/private.h includes when possible
...
In many places this is not needed.
Expose pw_impl_node_set_param() for adapter.
2023-01-20 16:08:38 +01:00
Wim Taymans
860b8fc27f
modules: fix rate update
...
Setting the rate with the PROP_rate would actually result in a rate
adjustment of 1.0f / rate, so do the same here.
See #2891
2022-12-29 12:22:56 +01:00
Wim Taymans
2f397035b8
modules: don't call pw_stream_set_control in process
...
pw_stream_set_control can only be used from the pipewire main_loop, not
the process callback. Instead, use the rate_match field directly.
Fixes #2633
2022-12-08 11:01:24 +01:00
Gleb Popov
525e7aa734
FreeBSD build fixes.
2022-11-14 21:03:22 +03:00
Wim Taymans
3e9b4657cb
modules: add since tag
2022-10-13 13:16:33 +02:00
Dmitry Sharshakov
ec0688fa87
module-rtp-source: reduce log level for RTP packets to trace
...
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-10-12 07:36:13 +00:00
Wim Taymans
9dd1c78f50
module-rtp: for multicast we need to add the TTL
2022-10-07 16:40:04 +02:00
Wim Taymans
c06f936a88
module-rtp: improve properties
2022-10-07 16:12:22 +02:00
Wim Taymans
0d7e20534f
module-rtp: half buffer-time for node latency
...
Spend half of the allowed latency on buffering and the other half
on the node-latency.
2022-10-07 13:05:17 +02:00
Wim Taymans
b32093b896
module-rtp: receive packets in the RT thread
2022-10-07 13:04:46 +02:00
Wim Taymans
ecc53cfcdb
module-rtp: handle non-multicast addresses
...
Handle errors when creating a session by destroying the session.
2022-10-07 10:33:24 +02:00
Wim Taymans
68b30e36b4
module-rtp: improve debug messages
2022-10-06 17:29:05 +02:00
Wim Taymans
4a41a03f5c
module-rtp: fix L24 sample size
2022-10-06 16:16:49 +02:00
Wim Taymans
dfb6206207
module-rtp: support more formats
2022-10-06 16:04:15 +02:00
Wim Taymans
be1159eb66
module-rtp: make sender work
...
Small cleanups
2022-10-06 11:41:01 +02:00
Wim Taymans
3e57570e9a
module-rtp: add beginnings of rtp-sink
2022-10-05 21:42:36 +02:00
Wim Taymans
1b4ade211d
module-rtp: improve debug
2022-10-05 21:42:36 +02:00
Wim Taymans
04cc036f94
module-rtp: add session timeout and bye
...
Handle recovery better.
2022-10-05 21:42:36 +02:00
Wim Taymans
afc3c12bea
module-rtp: add rate control
2022-10-05 21:42:36 +02:00
Wim Taymans
6065c699bf
module-rtp: add some properties
2022-10-05 21:42:36 +02:00
Wim Taymans
f20959d62f
module-rtp: add receive to ringbuffer
2022-10-05 21:42:36 +02:00
Wim Taymans
6f1e96bb59
module-rtp: work on session setup
2022-10-05 21:42:36 +02:00
Wim Taymans
14194e137f
module-rtp: parse some more SDP
2022-10-05 21:42:36 +02:00
Wim Taymans
38f908e758
rtp: add SAP parsing
2022-10-05 21:42:36 +02:00
Wim Taymans
d21fc6f378
Start of RTP module
2022-10-05 21:42:36 +02:00