module-rtp: Copy sess.ts-direct in RTP sink and add direct ts documentation

In the past, it made no difference whether or not an RTP sink's
sess.ts-direct property was set to true. This changed in commit
6bf81ebe59 . Now, sess.ts-direct must be
set to true if an associated RTP source is using direct timestamp mode.
That's because when the RTP sink's direct timestamp mode is not enabled,
it will set the new internal ts_align offset to a nonzero value, which
then corrupts timestamps and causes out of sync playback in the RTP
sources.

Also, copy the sess.ts-direct property from the global RTP sink props
to the stream props to match the behavior of the RTP source module.
This commit is contained in:
Carlos Rafael Giani 2026-06-12 10:47:24 +02:00
parent e85e8d8c31
commit f904168433
2 changed files with 7 additions and 0 deletions

View file

@ -65,6 +65,10 @@
* - `sess.ts-offset = <int>`: an offset to apply to the timestamp, default -1 = random offset
* - `sess.ts-refclk = <string>`: the name of a reference clock
* - `sess.media = <string>`: the media type audio|midi|opus, default audio
* - `sess.ts-direct = <bool>`: use direct timestamp mode, default false.
* \note RTP sources that use direct timestamp mode expect the
* associated RTP sink to use direct timestamp mode as well. See the
* `sess.ts-direct` documentation in \ref page_module_rtp_source for more.
* - `stream.props = {}`: properties to be passed to the stream
* - `aes67.driver-group = <string>`: for AES67 streams, can be specified in order to allow
* the sink to be driven by a different node than the PTP driver.
@ -590,6 +594,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
copy_props(impl, props, "sess.min-ptime");
copy_props(impl, props, "sess.max-ptime");
copy_props(impl, props, "sess.latency.msec");
copy_props(impl, props, "sess.ts-direct");
copy_props(impl, props, "sess.ts-refclk");
copy_props(impl, props, "aes67.driver-group");

View file

@ -149,6 +149,8 @@
* so any output sinks in the graph will already adjust their consumption pace to
* match the pace of the graph driver.
* AES67 sessions use this mode, for example.
* \note If an RTP source uses this mode, the associated \ref page_module_rtp_sink
* _must_ use this mode as well.
*
* \since 0.3.60
*/