Commit graph

3637 commits

Author SHA1 Message Date
Wim Taymans
558a1f0bb2 filter: ENOSPC is the error when we can't deref 2020-04-01 12:56:17 +02:00
Wim Taymans
7a29c15628 enable more warnings
Fix some warnings
2020-04-01 12:51:42 +02:00
Wim Taymans
edd019d539 defs: add SPA_UNUSED 2020-04-01 12:45:11 +02:00
Wim Taymans
de22ca68da filter: return the newly filtered object
Always take the state of the builder to get the newly filtered
object, even in the case there is no filter.

Handle the case where we can't copy the pod in the case of
a NULL filter by reverting the state of the builder.

Rework the function a bit to make it possible to pass a NULL
result (to calculate the required size, for example)

Fixes #226
2020-04-01 12:44:31 +02:00
Wim Taymans
74665de68e alsa-seq: keep track of last port
Keep track of the last port and only iterate until that port.
2020-03-31 17:52:22 +02:00
Wim Taymans
b3bddb853f context: improve debug of quantum 2020-03-31 13:54:11 +02:00
Gleb Popov
b552863ec9 Don't include alloca.h on FreeBSD. 2020-03-31 12:16:45 +02:00
Wim Taymans
e6675ff2a8 alsa-seq: unsubscribe when paused/suspended
When we are suspended or paused, unsubscribe from the ports so that
we don't block the hardware devices.

See #225
2020-03-31 12:14:52 +02:00
Wim Taymans
9b24a84ce6 fmt-ops: fix copy/paste error 2020-03-30 11:02:13 -04:00
Wim Taymans
527dc89365 fmt-ops: add neon optimizations for format conversion 2020-03-30 10:59:21 -04:00
Wim Taymans
afb93eb6ea conf: add comment 2020-03-30 15:27:54 +02:00
Wim Taymans
2b7f01f5af media-session: add getopt support
Add options to media-session
Add an option to enable or disable modules
Add an option to set properties for later use
2020-03-30 14:09:44 +02:00
George Kiagiadakis
e00c0ffd2d tests: add endpoint unit test
This tests exporting a PW_TYPE_INTERFACE_Endpoint and binding
a proxy for it through the registry, verifying that info and params
are propagated properly from one to the other
2020-03-27 14:56:07 +00:00
George Kiagiadakis
e918d60959 session-manager: implement factories for session, endpoint-stream & endpoint-link
Heavily based on the endpoint factory
2020-03-27 14:56:07 +00:00
George Kiagiadakis
444d180218 session-manager: endpoint: implement caching info & params
The info structure needs to be cached because there is no way to
request it from the implementation, unless we hack the add_listener
API to be used for making info requests or add a new method that
will be used just in the implementation (both are bad ideas).

The params are cached because
1) a client doing enum_params + sync will not work correctly, since
 the sync call syncs with the server and not the implementation...
 we could block the client to solve that, but then there is also #2
2) the implementation is not aware of the clients and therefore
 it cannot keep track of who is subscribed and who is not, this
 needs to happen in the server. Then if we only keep track of the
 subscriptions in the server and keep requesting params from the
 impl, there is no way to know if a param event coming from the
 impl matches a call to enum_params or to subscribe or if it's
 just an update that needs to be forwarded to subscribers.
2020-03-27 14:56:07 +00:00
George Kiagiadakis
74718d6def session-manager: add update/free functions for the info structures 2020-03-27 14:56:07 +00:00
George Kiagiadakis
df66edd9ab session-manager: implement 'endpoint' factory
This is modeled after the 'metadata' factory and provides
a way to use the pw_endpoint interface directly to implement
an endpoint object in a client.
2020-03-27 14:56:07 +00:00
George Kiagiadakis
0a8ec0380b session-manager: check error code when registering the marshallers 2020-03-27 14:56:07 +00:00
George Kiagiadakis
e971a79fce session-manager: implement export functions for session-manager objects 2020-03-27 14:56:07 +00:00
George Kiagiadakis
234c642746 session-manager: move files into client-endpoint / client-session subdirs
To clean up space for the new implementation.
The existing code is exclusively for use with the client-endpoint
and client-session factories.
2020-03-27 14:56:07 +00:00
George Kiagiadakis
bc3a92e950 session-manager: add impl marshallers for endpoint, -stream, -link and session 2020-03-27 14:56:07 +00:00
Wim Taymans
67a5dd35be resample: add neon optimizations 2020-03-27 08:27:11 -04:00
Wim Taymans
397787ec3e spa-resample: getopt_long returns an int 2020-03-26 18:10:11 +01:00
Wim Taymans
f0f3a0a660 0.3.2 2020-03-26 12:34:54 +01:00
Wim Taymans
b3d0aa6f8c pw-cat: allow latency=none 2020-03-26 11:34:59 +01:00
Wim Taymans
125f1f109c context: allow quantum up to configured max
Clip the quantum values between absolute min and max.
If a client selected a quantum, allow this to exceed the default
quantum up to the max-quantum.
If a client doesn't select a quantum, use the default.
2020-03-26 11:27:36 +01:00
Wim Taymans
7693834a81 pw-profiler: report error when we can't bind 2020-03-26 10:24:14 +01:00
Wim Taymans
413bda908a pw-cli: continue after parsed options 2020-03-25 18:00:50 +01:00
Wim Taymans
c292a6d54e pw-cli: add non-interactive mode
You can now pass a command to pw-cli and it will execute immediately
and exit.

Fixes #195
2020-03-25 11:17:02 +01:00
Wim Taymans
646088b90c tools: add getopt argument parsing
Add some help, version, remote options for tools
Add option for output filename in pw-profiler
Add option to start pw-cli as daemon or not, make it connect to the
default PipeWire instance by default (instead of local instance)
2020-03-24 16:36:48 +01:00
Wim Taymans
a1846c9780 udev: don't loop forever on errors
When we can't find the v4l2 device id, unref the device and continue
instead of looping forever and consuming all memory.

Fixes #219
2020-03-24 15:54:58 +01:00
Gleb Popov
f22b7b22a8 Define alsa_dep a bit earlier and even in case the option is off to fix meson setup:
src/examples/meson.build:47:12 uses alsa_dep unconditionally.
2020-03-24 12:29:46 +01:00
Wim Taymans
a880012e72 fmtconvert: order formats better
Place float and higher resolution formats first so that they are
selected first.
2020-03-24 11:47:41 +01:00
Wim Taymans
b8a1ea1d3a fmt-ops: fix 32 bit compilation
_mm256_extract_epi64 is only for 64 bits, add workaround for 32
bits.

Fixes #220
2020-03-23 14:18:10 +01:00
Wim Taymans
c4cf5e6629 bluez5: protect against NULL transport
The transport can be destroyed at any time, make sure we don't
crash when it does.
2020-03-23 13:49:30 +01:00
Wim Taymans
4c80656a7b examples: small improvements
Don't set EXCLUSIVE flag on video-play
2020-03-20 11:24:29 +01:00
Wim Taymans
67eb89689d stream: only warn about mlock when in RT mode
Only warn about mlock failure when the stream is configured to
operate in REALTIME mode.
2020-03-20 11:21:44 +01:00
Wim Taymans
0d3aa1fd30 Fix export type prototype
Pass the type as provided by the export type. This way we can
look up the owner of the export type later.
2020-03-19 18:12:07 +01:00
Wim Taymans
3cb019de51 vulkan: only set flags when buffer is in the io area 2020-03-19 18:09:30 +01:00
Wim Taymans
2948d504c8 example: fix v4l2 example
We need to emit a port param update to notify of new Buffer
parameters.
2020-03-19 18:08:34 +01:00
Wim Taymans
a9b191971c v4l2: fix buffer recycle
Only set the OUTSTANDING flag when we placed the buffer in an
io area and need to recycle it later.
When we captured a frame, put it in the queue. Then dequeue it
into the io area after recycling buffers.

Fixes #217
2020-03-19 13:15:49 +01:00
Wim Taymans
441fdb2333 alsa: fix buffer recycle
We only set the OUT flag when we put the buffer on an io area and
might need to recycle later.
Before placing the output buffer into the io area, recycle any
buffer that might be left in there.
Only emit the ready callback when we have some data queued.
2020-03-19 13:12:49 +01:00
Wim Taymans
acccccd2c0 Use SPA_IO_BUFFERS_INIT when we can
We should not have to initialize the state to NEED_DATA, anything
that is not HAVE_DATA is good. Also we need to set the buffer to
INVALID because else it might be recycled.
2020-03-19 13:09:21 +01:00
Wim Taymans
07f935a5ed add some more debug 2020-03-19 13:00:35 +01:00
Wim Taymans
5da6973863 example: fix buffer check 2020-03-19 12:58:39 +01:00
Wim Taymans
6d673cc77c conf: update defaults 2020-03-18 17:53:46 +01:00
Wim Taymans
0db9c4ef6b jack: use current buffer and samplerate 2020-03-18 17:52:48 +01:00
Wim Taymans
e8cf29a7c8 jack: remove some hardcoded defaults
We get those from the server instead.
2020-03-18 17:42:11 +01:00
Wim Taymans
c4708f97ff examples: don't use lrintf for each sample 2020-03-18 17:40:26 +01:00
Wim Taymans
13d66df2df example: fix buffer size calculation 2020-03-18 17:23:14 +01:00