Commit graph

3607 commits

Author SHA1 Message Date
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
Wim Taymans
b6dde8d76f vulkan: use image height of current cycle for buffer size 2020-03-18 17:21:38 +01:00
Wim Taymans
64e00165d5 Add MIT licensed compute example instead
Fixes #218
2020-03-18 17:20:36 +01:00
Wim Taymans
8a2af908a7 small optimizations
Add some SPA_LIKELY
Enable FASTPATH by default
2020-03-18 15:43:29 +01:00
Wim Taymans
57f84ae5ae fmt-ops: use gather to read samples 2020-03-18 11:41:14 +01:00
Wim Taymans
8fe83dcd02 pulse: make sure we never set latency num to 0 2020-03-18 11:40:25 +01:00
Wim Taymans
55633ebf9a fmt-ops: move AVX 2020-03-18 10:06:54 +01:00
Wim Taymans
949dba7bfc fmt-ops: flesh out avx optimizations 2020-03-17 17:27:47 +01:00
Dan Shick
2a59ef5146 Fix includes
Fixes #215
2020-03-17 11:46:28 +01:00
Wim Taymans
72d70b0f48 Add and fix some more warnings
Fixes #216
2020-03-17 11:37:56 +01:00
Wim Taymans
4dcd0dacc9 fmt-ops: add more benchmark cases 2020-03-16 16:45:20 +01:00
Wim Taymans
37d3864949 merger: add some SPA_LIKELY 2020-03-16 16:12:34 +01:00
Wim Taymans
3a911dfe3b fmt-ops: add avx2 optimized version
Only one optimized version but the sse2 version are compiled with
the avx2 flags so that they get optimized better.
2020-03-16 16:11:29 +01:00
Wim Taymans
6eca935e61 also test optimized versions 2020-03-16 13:08:33 +01:00
Wim Taymans
fd3dd14ebe fmt-ops: add optimized f32 to s16 stereo conversion 2020-03-16 13:04:21 +01:00
Wim Taymans
0548fbf690 fmt-ops: fix bug in s32 to f32 conversion 2020-03-16 12:57:21 +01:00
Wim Taymans
cb7bfdf98a sprinkly SPA_LIKELY/UNLIKELY around 2020-03-16 12:52:28 +01:00
Wim Taymans
d762d57665 impl-node: the mix output port is always 0 2020-03-16 11:11:35 +01:00
Wim Taymans
5273320825 jack: fix midi output 2020-03-15 08:45:56 +01:00
Jonas Holmberg
b99313a59e pipewire-alsa: Get period_bytes from config
Use period_bytes constraint from config if present.
2020-03-12 15:00:50 +01:00
Wim Taymans
9613f16caf alsa-pcm: ignore error after recover
If we get an error after receovering, ignore it and assume we filled
the buffer completely. We need to do this or otherwise we stop the
timer and audio stops.
2020-03-12 10:52:52 +01:00
Jonas Holmberg
195ac82394 pipewire-alsa: Correct the max channels value 2020-03-12 09:19:58 +01:00
Jonas Holmberg
56f4ee5999 pipewire-alsa: Support hw constraints in config
Use rate, format and channels constraints from config if present.
2020-03-11 17:10:15 +01:00
Wim Taymans
e13e81881f examples: use dataType mask
Set the dataType mask to MemFd because that is what we can
produce. Check the negotiated buffer data types.
2020-03-09 18:05:51 +01:00
Wim Taymans
f94c24af97 buffers: negotiate dataType in buffers
Use the dataType in the Buffers param. It contains a bitmask
of compatible types between ports.
2020-03-09 17:44:42 +01:00
Wim Taymans
c66d60fbdb buffers: handle param enum errors
When filtering parameters, return an error when something went
wrong as opposed to 0. This way we can see if there was an error
or just no parameters.  Fail when there was an error negotiating
the buffer size because that means incompatible values.
2020-03-09 17:04:00 +01:00
Wim Taymans
66f4834df3 param: add dataType buffer parameter
The dataType parameter is a bitmask of allowed data types for the
buffer memory. Make the mask by or-ing all (1 << enum spa_data_type)
you accept/produce.
2020-03-09 12:52:35 +01:00
Wim Taymans
387fcfdc8a pod: add support for flags filter
Add macro to make flags choice from int and long.
Implement the filter for flags by or-ing the flags.
2020-03-09 12:49:14 +01:00
Jan Koester
6c911993fb fixed yaml file 2020-03-09 09:57:12 +01:00
Rasmus Thomsen
fba9d8931d module-protocol-native: fix build on s390x 2020-03-09 08:52:16 +00:00
Rasmus Thomsen
cfd829913e meson: add rpath on the modules_install_dir for all modules
Otherwise the dynamic loader won't be able to find libraries in
modules_install_dir we link against

fixes #214
2020-03-09 08:51:49 +00:00