Commit graph

64 commits

Author SHA1 Message Date
Pauli Virtanen 422c270a74 meson.build: fix compile with -Dexamples=disabled 2023-11-28 10:18:25 +00:00
Barnabás Pőcze 436787d6ba treewide: try to use const char * for string literals 2023-09-16 17:47:35 +02:00
Barnabás Pőcze 8c17a6626d treewide: mark some functions static
These were found by enabling the "missing-declarations" warning.
2023-07-03 19:40:31 +02:00
Wim Taymans 3b3146e852 examples: fix type of getopt_long return value 2023-04-18 09:48:19 +02:00
Ashok Sidipotu 805a1c61d9 adapter-control: avoid the divide by zero while generating sequence. 2023-04-05 16:33:09 +05:30
Ashok Sidipotu b61bf8a27d adapter-control: bundle the volume ramp parmeters with volume 2023-04-03 19:04:55 +00:00
Ashok Sidipotu e75fe4d469 adapter-control: add support of scale volume ramp param 2023-04-03 19:04:55 +00:00
Ashok Sidipotu 7b91d506f1 adapter-control: add support for volume ramp time params
- Add support for both native and non-native modes
- Add "examples" in the help text
2023-04-03 19:04:55 +00:00
Ashok Sidipotu 075fd49ccc adapter-control: add CLI options
-To select between non-native(via control channel) and native modes(via audio
adapter ). The control port will be opened only in the non-native mode.
-To select different sample and sample step sizes. The Legacy non-native
 mode also uses these params now.
-To provide the alsa device.
2023-04-03 19:04:55 +00:00
Ashok Sidipotu b1b5367d40 adapter-control: use the volume ramp parameters to ramp volume
Add a compiler macro for now to switch between the inband(control port based)
volume ramping and out of band(using volume ramp parameters)
2023-04-03 19:04:55 +00:00
Ashok Sidipotu 2a12dfeb47 adapter-control: add more debug messages 2023-04-03 19:04:55 +00:00
Ashok Sidipotu 3ed282fad5 adapter-control: enable SPA debug logs
Also add timestamp to the logs.
2023-04-03 19:04:55 +00:00
Wim Taymans 7da61e2dfa examples: fix adapter control
target_rate and duration need to be configured now.

Fixes #3125
2023-03-30 15:15:41 +02:00
Barnabás Pőcze 934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans e0af67b670 examples: fix spelling mistake 2022-06-16 16:40:47 +02:00
Wim Taymans f74b59b39f examples: fix volume fade in and out with control 2022-06-16 09:09:27 +02:00
Wim Taymans 708b57aa64 examples: add control support to adapter
Based on patches by Julian Bouzas  in !222
2022-06-16 09:09:27 +02:00
Wim Taymans fa9baa6488 examples: fix up adapter-control
Negotiate format, then buffers.
Give quantum-limit as a property when making nodes.
Set clock and position io and fill in rate and duration.
2022-06-16 09:09:27 +02:00
Barnabás Pőcze 2b110af366 treewide: meson.build: use dependency variable for SPA
Use `spa_dep` everywhere instead of `spa_inc`,
and remove `spa_inc` altogether.
2021-12-28 18:34:06 +01:00
Pauli Virtanen bbc2136e89 meson: ensure all examples are included in doc
Move declaration of examples to use same file lists for build and docs.
2021-11-02 09:46:14 +00:00
Pauli Virtanen 98a0e54d5f doc: link examples to Doxygen docs
Include examples to the documentation, using Doxygen's example system.
2021-10-10 00:35:46 +03:00
Peter Hutterer 0054319d88 meson.build: add -D_GNU_SOURCE to the project arguments
This appends it to every compilation command so we can get rid of the c_args
for (almost all) executables.
2021-06-09 07:47:51 +00:00
Peter Hutterer 92514d57e4 treewide: replace plain strcmp() calls with spa_streq 2021-05-18 22:10:27 +10:00
Peter Hutterer 2405f0942b spa/buffer: rename SPA_MEMBER to SPA_PTROFF
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Peter Hutterer 223f20709d meson: replace join_paths(a, b) with a / b
More readable and from the meson reference manual:
(since 0.49.0) Using the/ operator on strings is equivalent to calling join_paths.
2021-04-15 06:57:00 +00:00
Thibault Saunier 485bae5eb0 meson: Use feature options everywhere it makes sense 2021-03-10 20:18:34 +00:00
Wim Taymans 5295caf0f3 examples: dlclose on some errors 2020-07-02 16:07:54 +02:00
Wim Taymans f08c35259c avoid uninitialized variables 2020-06-23 15:25:27 +02:00
Simon McVittie b852b58f82 Optionally install examples and tests
This makes it easier to test PipeWire in its "as-installed" state,
for example in an OS distribution.

The .test metadata files in ${datadir}/installed-tests/${package} are
a convention taken from GNOME's installed-tests initiative, allowing a
generic test-runner like gnome-desktop-testing to discover and run tests
in an automatic way.

The installation path ${libexecdir}/installed-tests/${package} is also
a convention borrowed from GNOME's installed-tests initiative.

In addition to the automated tests, I've installed example executables
in the same place, for manual testing. They could be separated into
a different directory if desired, but they seem like they have more
similarities with the automated tests than differences: both are there
to test that PipeWire works correctly, and neither should be relied on
for production use. Some examples are installed in deeper subdirectories
to avoid name clashes.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-06-16 17:58:02 +00:00
Simon McVittie 8b97d2ae74 spa examples: Load plugins from SPA_PLUGIN_DIR or installed path
This lets them be used installed or uninstalled, like pipewire itself.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-06-16 17:58:02 +00:00
Wim Taymans 0b47b47b6c libcamera: disable by default
Until it is at least more comon available in distros.
2020-06-04 10:50:54 +02:00
raghu447 9024cc4444 Integrating libcamera 2020-06-04 10:36:39 +02:00
Wim Taymans 0a54249718 fix error reporting
dlopen and dlsym don't set errno
2020-05-12 17:23:30 +02:00
Wim Taymans 4cb2d58e89 factory: do more version checks
So that we don't accidentally load an old plugin.
2020-04-22 18:10:26 +02:00
Wim Taymans 5da6973863 example: fix buffer check 2020-03-19 12:58:39 +01:00
Wim Taymans a528189d26 slave -> follower
We use master/follower terminology everywhere.
2020-02-21 10:47:32 +01:00
Wim Taymans 4bd6f5a055 examples: fix some typos and indentation errors 2020-02-04 13:02:38 +01:00
Julian Bouzas a5d17ba6d1 spa: add adapter-control example to test audioadapter nodes
Example executable that runs an output audioadapter using audiotestsrc as slave
with an input audioadapter using alsa-pcm-sink as slave for easy testing.
2020-02-04 12:00:27 +01:00
Julian Bouzas 1eba8d7f74 spa: add support system so that example-control can play audio
The example-control executable does not play audio. This is because
alsa-pcm-sink needs a data system to run. This patch fixes the example by
loading a data system from libspa-support before creating the nodes.
2020-02-04 11:55:28 +01:00
Wim Taymans ac24743b2e the epoll shim should only be used by the system library.
All other places should use the system library to get the right
fds.
2019-11-19 15:16:18 +01:00
Gleb Popov fd937fa378 On FreeBSD, add dependency on epoll-shim library.
FreeBSD doesn't provide timerfd and eventfd functions. These are implemented in
3rd party library called epoll-shim. Link targets requiring these functions to
this library.
2019-11-19 13:41:40 +01:00
Wim Taymans 9ffec214b8 fix includes 2019-10-25 15:01:02 +02:00
Wim Taymans 59bf522ce1 system: use the same bits as POLL and EPOLL
Use the same bits for the io mask as POLL and EPOLL so that we
can avoid conversions.
2019-09-19 13:15:38 +02:00
Wim Taymans 4381e79632 control: clean up some control includes
Remove control from channelmix, it's not used
Add control metadata
Add OSC control type
Improve some docs
2019-09-16 15:49:46 +02:00
Wim Taymans 8b85cc225e rename HAVE/NEED_BUFFER -> HAVE/NEED_DATA
It is more generic and works with control-only ports as well
2019-09-16 12:55:23 +02:00
Wim Taymans 6f16d6ff8e example: remove some unused fields 2019-08-16 15:02:48 +02:00
Wim Taymans dff1cfe13e fix example 2019-08-15 19:07:03 +02:00
Wim Taymans e76a7abceb Add support for client fd memory
Remove the node buffers reply again. We don't need it. Instead add a
new method to the client-node to upload an array of buffer datas.
This method is called after the client has allocated buffer mem. It
will update the buffers on the server side with the client allocated
memory.

Wait for the async reply of use_buffers when doing alloc_buffers so
that we can get the updated buffer mem before we continue.

Let the link follow the states of the ports.

Add some error code to the port error states.

Add PW_STREAM_FLAG_ALLOC_BUFFERS flag to make the client alloc buffer
memory.
2019-07-26 16:17:39 +02:00
Wim Taymans deb6c52f76 node: remove port_alloc_buffers
Remove the now obsolete port_alloc_buffer, rework to use the
port_use_buffers with the ALLOC flag.
2019-07-25 14:08:43 +02:00
Wim Taymans 8590ac158b node: add flags to port_use_buffer
Remove the CAN_USE_BUFFERS flag, it is redundant. We can know this
because of the IO params and buffer params.

Add flags to the port_use_buffer call. We also want this call to
replace port_alloc_buffer. Together with a new result event we can
ask the node to (a)synchronously fill up the buffer data for us. This
is part of a plan to let remote nodes provide buffer data.
2019-07-25 13:19:39 +02:00