Commit graph

10326 commits

Author SHA1 Message Date
Wim Taymans
345582dd15 module-rtp: add opus encoding 2023-03-12 18:40:36 +01:00
Wim Taymans
bcc052f5f1 module-rtp: move stream init to specific media types
Move the stream function setup to a stream specific method.
Keep a separate stream format, that can be different later from the
rtp format once we add encoding.
Rename some methods to make them more unique.
2023-03-12 18:40:36 +01:00
Barnabás Pőcze
35829468f8 meson.build: remove explicit install_dir
Executables are installed in the bindir by default. And
furthermore if the directory is explicitly specified, then
the target won't be considered when setting up $PATH in the devenv.

Fixes 1ef43a5255
2023-03-12 10:37:37 +01:00
Pauli Virtanen
1664df2c85 bluez5: guard against processing when errored or not started
Add some guards against doing processing when there has been an error or
the node is not started. Set error status to IO.  Continue driving on IO
errors.
2023-03-11 11:11:08 +00:00
Robert Mader
8fff69353b gst: deviceprodiver: Sort devices by session priority
Applications using the device provider typically list devices in the
order they were added. In order to ensure that apps pick nodes like cameras
with the highest priority by default, sort devices accordingly.

This unfortunately does not not have an effect on nodes added later,
e.g. on hotplug.

Closes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3072
2023-03-11 10:55:07 +01:00
Viktar Vauchkevich
fe1b9c2d49 po: Update Belarusian translation 2023-03-11 10:33:23 +01:00
Barnabás Pőcze
1ef43a5255 meson.build: install symbolic links instead of compiling multiple times
Currently, among others, the `pipewire-pulse` executable is an
exact copy of the `pipewire` executable. Use meson's
`install_symlink()` to avoid the need for compiling the same thing
multiple times. Also use `custom_target()` so that the aliases
are available in an uninstalled environment.

Do the same for `pw-cat`. The benefit is that all aliases
of `pw-cat` are now available in an uninstalled environment.

This commit increasese the minimum meson version to 0.61.1
as that is needed for `install_symlink()`.

The reason for using 0.61.1 instead of 0.61.0 is the following bug:
https://github.com/mesonbuild/meson/issues/9820
2023-03-10 19:50:29 +01:00
Wim Taymans
f3230ca2e6 module-rtp: fix sender latency
The sender should ask for a latency that matches the packet size, not
the playout latency, that is for the receiver only.
2023-03-10 17:29:43 +01:00
Wim Taymans
7c9ce63795 impl-link: use spa_aprintf when we can 2023-03-10 12:31:35 +01:00
Wim Taymans
2429674970 Merge branch 'master' into 'fix_san_build'
# Conflicts:
#   src/modules/module-rtp/apple-midi.h
2023-03-10 10:10:25 +00:00
Wim Taymans
f841a0d3f1 module-rtp: send journal feedback
Parse the journal and send feedback.
Handle the NO and RS commands.
2023-03-10 10:47:03 +01:00
Barnabás Pőcze
9dcfcd7099 ci: add job that builds with ASan and UBSan 2023-03-10 00:00:53 +01:00
Barnabás Pőcze
defd9be03c ci: use meson to compile 2023-03-10 00:00:53 +01:00
Barnabás Pőcze
7b5ac42699 ci: use meson to install build artifacts 2023-03-10 00:00:53 +01:00
Barnabás Pőcze
6021cea49c ci: use meson to run tests 2023-03-10 00:00:53 +01:00
Barnabás Pőcze
b382d2eba8 ci: do not omit "setup" from the meson command
meson prints the following warning:

  WARNING: Running the setup command as `meson [options]` instead
           of `meson setup [options]` is ambiguous and deprecated.
2023-03-10 00:00:52 +01:00
Barnabás Pőcze
82e30d46a9 pipewire: module-rtp: fix compilation with UBSan
The type of `0xffff` is `int`, and UBSan does not like
when that value is shifted left by 16 bits, which causes
e.g.

  case APPLE_MIDI_CMD_IN:

to not compile with the following error:

  error: case label does not reduce to an integer constant

One could use `0xffffu` to force the type to be `unsigned int`,
or simply use `0xffff0000` which has no shifts. This patch
does the latter.
2023-03-10 00:00:51 +01:00
Barnabás Pőcze
57cd5611d1 pipewire: module-rtp: add missing include
Include `stdint.h` in `apple-midi.h` to make it self-contained.
2023-03-10 00:00:32 +01:00
Wim Taymans
1276c946fd fix compilation 2023-03-09 17:27:57 +01:00
Wim Taymans
45c7709bf6 jack: avoid division by 0 2023-03-09 17:14:05 +01:00
Wim Taymans
54cf394b1b wav: fix build 2023-03-09 17:09:47 +01:00
Wim Taymans
670bf8fe8f echo-cancel: add wav debug file support 2023-03-09 16:31:30 +01:00
Wim Taymans
0563e1da52 audioconvert: add debug.wav-path to save wav 2023-03-09 16:22:55 +01:00
Wim Taymans
7b13f6d26b module-rtp: data and ctrl socket have different initiator 2023-03-09 13:14:23 +01:00
Wim Taymans
c5effbd979 module-rtp: add timer for ck requests
Scale RTP timestamps against the clock, allow some jitter.
Make method to query current RTP timestamps.
2023-03-09 13:14:23 +01:00
Wim Taymans
8e5b9da177 module-rtp: fix direct timestamps
fix some other properties.
2023-03-09 13:14:23 +01:00
Wim Taymans
3b685581a4 module-rtp: fix compilation 2023-03-09 13:14:23 +01:00
Wim Taymans
25f4e38781 module-rtp: keep track who initiated the session 2023-03-09 13:14:22 +01:00
Wim Taymans
3b33098cd7 module-rtp: improve session setup 2023-03-09 13:14:22 +01:00
Wim Taymans
0885899b7a module-rtp: fix docs 2023-03-09 13:14:22 +01:00
Wim Taymans
9c45bb9c8d module-rtp: use default source.ip 2023-03-09 13:14:22 +01:00
Wim Taymans
933743581b module-rtp: fix rtp.media property
Use sess.media for the media type (audio/midi) because rtp.media is used
in the SDP to describe the media (midi and audio are both are audio).
2023-03-09 13:14:22 +01:00
Wim Taymans
9e67d6781d module-rtp: fix loading of source 2023-03-09 13:14:22 +01:00
Wim Taymans
be09198249 module-rtp: port source and sink to new stream 2023-03-09 13:14:22 +01:00
Wim Taymans
e8119cb087 docs: improve docs 2023-03-09 13:14:22 +01:00
Wim Taymans
3208677ec3 pipewire-pulse: port module-rtp-send
In addition to loading the rtp-sink module, we now also need to load the
SAP module to announce this stream with SAP.
2023-03-09 13:14:22 +01:00
Wim Taymans
77b7c3d180 pipewire-pulse: port module-rtp-recv
Use the new module-rtp-sap to listen and create RTP streams from
SAP.
2023-03-09 13:14:22 +01:00
Wim Taymans
9a6fa2e6a1 module-rtp: use new random functions 2023-03-09 13:14:22 +01:00
Wim Taymans
56d2e1e880 module-rtp: improve SSRC, seq and timestamp randomness 2023-03-09 13:14:22 +01:00
Wim Taymans
eca9bbf73b module-rtp-sap: handle session timeout
Handle module unload
2023-03-09 13:14:22 +01:00
Wim Taymans
de6f04a1ac module-rtp-sap: add default rules 2023-03-09 13:14:22 +01:00
Wim Taymans
104ecad44d module-rtp: fix SAP multicast send/recv 2023-03-09 13:14:22 +01:00
Wim Taymans
a015edb934 module-rtp: fix some memory leaks 2023-03-09 13:14:22 +01:00
Wim Taymans
e010559ffe module-rtp: don't autoconnect midi
Don't unload module for inactive source, we should signal the owner
of the module with a property update instead.
2023-03-09 13:14:22 +01:00
Wim Taymans
a48822c38a module-rtp: make source from module
Add match rules to SAP to decide when to announce and create RTP
streams.
Use SAP to load an RTP source.
Remove SAP code from RTP source.
2023-03-09 13:14:22 +01:00
Wim Taymans
cb1e5661dc move SAP in separate module
The idea is to have the rtp-source and rtp-sink be separate modules that
can be loaded a static ip/port as well.

The SAP module would then expose existing rtp-sinks or additionally load
rtp-sources based on SAP messages.

This makes things a bit more flexible when we also want to expose the
rtp-sink using zeroconf, for example.
2023-03-09 13:14:22 +01:00
Wim Taymans
7a31278511 module-rtp: improve properties and some cleanups 2023-03-09 13:14:22 +01:00
Wim Taymans
c46e021734 module-rtp: improve properties
Improve refclk and ts-offset handling.
Add some more properties to avahi
2023-03-09 13:14:22 +01:00
Wim Taymans
2c28047370 module-rtp: make the streams sink/source 2023-03-09 13:14:22 +01:00
Wim Taymans
03d11953a6 module-rtp: handle state of stream better
Don't try to read packets when the data port or stream is not
ready.
Don't send packets when the data port is not ready or the stream
is paused.
2023-03-09 13:14:21 +01:00