Commit graph

719 commits

Author SHA1 Message Date
Wim Taymans
b314547702 videoconvert: beginnings of video converter 2019-07-25 12:19:41 +02:00
Wim Taymans
18776b155b mem: Add tag to memmap
Add a tag field when creating a memmap so that we can do lookup on it.
This makes it easier to implement the tracking of mappings for io areas.
Remove custom io memory tracking and use the tags.

Add flags to spa_chunk to make data corrupted. The flags on the buffer
stay constant for the life of the buffer. Add flags to mark memory
readable and writable. Mark memory readonly in v4l2-source.

Pass the daemon activation area to the client in the transport event.
This never changes and need to be handled differently from the other
activation areas.

Use the right flags when importing memory.

Add the (desired) memory type to mempool_alloc.

improve some debug.
2019-07-25 12:10:05 +02:00
Wim Taymans
22b67cc95d adapter: remove slave hooks 2019-07-17 15:23:19 +02:00
Wim Taymans
6b82163e94 audioadapter: don't fail if the slave can't provide a filter
When the slave can't provide a format or buffer suggestion, just
continue without any filter.
2019-07-16 10:05:39 +02:00
Wim Taymans
453e75a23e improve some debug 2019-07-15 17:09:44 +02:00
Wim Taymans
93006d6d90 resample-native: only do full resample when rate == 1.0
Otherwise choose the interpollating resampler.
2019-07-15 17:06:07 +02:00
Wim Taymans
80face4b92 audioadapter: handle set_io errors better 2019-07-15 17:05:13 +02:00
Wim Taymans
10426790b0 audioconvert: clear buffer allocation state as well 2019-07-12 14:36:49 +02:00
George Kiagiadakis
129ccd3a3e audioconvert: do setup internal links and buffers also in convert mode 2019-07-12 14:30:31 +02:00
Wim Taymans
6fc02ca5e0 move some debug to trace 2019-07-12 10:26:44 +02:00
Wim Taymans
356f1242be a2dp: pull more data when needed
When we still have a buffer but it does not have enough data to encode a
frame, ask for more buffers.
2019-07-12 09:55:55 +02:00
Wim Taymans
1acefc00a6 audioadapter: implement reuse_buffer on the slave 2019-07-12 09:51:49 +02:00
Wim Taymans
0e765de519 props: remove pointers in property values in protocol
Mark pointers in property values with pointer: and remove them
when sending the properties over the wire to avoid errors.
2019-07-11 12:52:55 +02:00
Wim Taymans
00c2f6fe4f adapter: produce output when we have a monitor 2019-07-11 11:28:26 +02:00
Wim Taymans
a6ce5e7eeb merger: respect DYNAMIC_DATA flag when copy pointers 2019-07-11 11:19:09 +02:00
Wim Taymans
afd6e578a8 audioadapter: we don't need to clear the dynamic flag 2019-07-11 11:15:47 +02:00
Wim Taymans
a9bce3803a cleanups and debug improvements 2019-07-11 11:15:24 +02:00
Wim Taymans
a9cb74f908 alsa: don't clear io area ever 2019-07-11 11:13:53 +02:00
Wim Taymans
a07fb58a21 adapter: set driver property
Pass the node.driver property from the slave to the adapter.
Set the media-class on the adapter.
2019-07-10 19:18:53 +02:00
Wim Taymans
9364f64b10 adapter: move to SPA plugin
Move the adapter code to a SPA plugin and make the adapter module
use the plugin instead.
2019-07-10 18:04:59 +02:00
Wim Taymans
c7d7058896 Improve rate matching and clock slaving
Use a new rate_match io area to exhange rate matching info between
sink/source and resampler.
Compensate for the rate match delay when scheduling timeouts.
Let the resampler notify the source of how many samples it needs to
produce the desired quantum. Make sure we keep an extra buffer in
the device to be able to make this possible.
Let the adapter directly call the slave node process function.
2019-07-09 17:44:07 +02:00
Wim Taymans
595dc0ab5b resample: fix phase calculation 2019-07-09 16:54:52 +02:00
Wim Taymans
a6a7b3ab54 resample: add functions to calculate in/out length
Add test for this as well
2019-07-08 18:26:08 +02:00
Wim Taymans
0154e6eaac small cleanups
resample: remove unused index variable
2019-07-08 18:23:22 +02:00
Wim Taymans
0726a608df Improve debug and small cleanups 2019-07-02 17:11:45 +02:00
Wim Taymans
170c3e4d6c small cleanups 2019-07-01 09:31:15 +02:00
Wim Taymans
bee88e5279 v4l2: handle and recover from control failure
When we fail to construct the labels of a control, reset and
continue without labels.
2019-06-26 07:23:34 -04:00
Wim Taymans
15b6c7ef7e v4l2: warn when control fails 2019-06-26 06:13:25 -04:00
Wim Taymans
cbe3a88397 evl: add build option 2019-06-24 09:45:22 +02:00
Wim Taymans
ffaa365bef Add evl system support
Add system functions that can execute on the evenless Real-Time
subsystem. https://evlproject.org/
Enable this plugin as the system library for the data thread and
all poll/timerfd/eventfd will execute on the evl subsystem.
2019-06-24 09:42:05 +02:00
Wim Taymans
9934e62fe4 don't use error() 2019-06-21 16:14:36 +02:00
Wim Taymans
6720ded529 names: add standard factory name definitions
Define a set of standard factory names and document what they
contain. This makes it possible to change the implementation by
mapping the factory-name to a different shared library.
2019-06-21 13:31:34 +02:00
Wim Taymans
5b7e95c71c system: make system functions return error on error
Return -errno from system functions instead of -1 in errors. This
makes it easier to pass along the result without having to go to
errno etc..
2019-06-20 17:31:29 +02:00
Wim Taymans
03eeb945f3 daemon: add support for properties in the config file
Make a set-prop command to set a property from the config file
into a pw_properties. Pass this to the pw_core_new() and the
main-loop to tweak some stuff.

Move some warns to errors
2019-06-20 15:19:28 +02:00
Wim Taymans
d1241e2c1c improve error handling
Make sure we free properties we take ownership of.
Add some more return values to functions that can fail.
2019-06-19 18:15:04 +02:00
Wim Taymans
5850044599 improve error handling 2019-06-18 16:55:37 +02:00
Wim Taymans
b2992a0f8a improve error handling 2019-06-07 17:50:46 +02:00
Wim Taymans
8cda0dd962 test: clear resample struct before use 2019-06-07 17:25:28 +02:00
Wim Taymans
497a8364c5 printf format fixes 2019-06-07 17:16:02 +02:00
Wim Taymans
d46c239ab0 some printf fixes 2019-06-07 16:37:08 +02:00
Wim Taymans
504d78cd18 improve error handling
Set errno for functions returning NULL if relevant.
Propagate errno and result codes better.
Handle more error cases.
2019-06-07 10:11:23 +02:00
Wim Taymans
0a5bce4a3b bluez5: expose factories in the plugin 2019-06-07 09:19:40 +02:00
Wim Taymans
db88e9f954 System: More work on making system functions pluggable
Move the epoll functions to the system functions and make the loop
use those. Use simple mask for events instead of enum.
Add the used system api in pw_loop.
Add System API to spa_support and use it where possible.
Pass the system API used in the realtime loops in spa_support as
well and use this in the realtime paths.
Improve bootstrapping, load only the log and cpu interfaces because
those can/need to be shared between instances. Let the core load
the other interfaces.
Add keys to configure the System and Loop implementations used in
pw_loop.
2019-06-06 15:31:53 +02:00
Wim Taymans
86dc0496a5 simply use INTERFACE_Loop for the main-loop 2019-06-06 15:20:43 +02:00
Wim Taymans
4c2b6c7c91 log: add log level option 2019-06-06 15:12:59 +02:00
Wim Taymans
3f5c75c52d cpu: add CPU_FORCE option to cpu interface 2019-06-06 15:11:37 +02:00
Wim Taymans
f5192d533f system: pass right flag 2019-06-04 17:43:52 +02:00
Wim Taymans
81c7dd4433 support: abstract some system functions
Make a new API to hide some the implementation of eventfd, timerfd
and signalfd along with clock and read/write/ioctl/close functions.
We would like to have plugins use the abstractions so that we
can switch them to something else when needed.
2019-06-04 17:07:34 +02:00
Wim Taymans
98602f0343 alsa-monitor: make valid device path 2019-06-03 17:15:44 +02:00
Wim Taymans
49ef8f9b5f spa: add keys for properties
Define and document property keys
2019-06-03 16:48:01 +02:00