Commit graph

216 commits

Author SHA1 Message Date
Wim Taymans
6e9d3bdb36 tests: add small dict benchmark 2020-01-14 13:52:08 +01:00
Wim Taymans
f391353c7f Make interface types a string
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
c5ee45044d fix unit test 2019-11-29 13:34:07 +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
9ab4e39704 Add a stub implementation for sched_getcpu, as this function isn't present on
FreeBSD.
2019-11-19 13:41:40 +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
a18c8df7d0 meta: make sequence number 64 bits
Add offset in current cycle
2019-10-29 22:44:45 +01:00
Wim Taymans
d94019ccd2 io: Add current video frame size to position
Add some padding, tweak some padding
Remove count in the clock, it's useless
For video frames we will want to use metadata to place
this on individual buffers.
2019-10-29 14:08:40 +01:00
Wim Taymans
9ffec214b8 fix includes 2019-10-25 15:01:02 +02:00
Wim Taymans
5383782336 alsa: Disable rate matching for the same card
Add a clock name to the clock, remove the old api/clock_id. This makes
it easier to add descriptive names

Place the alsa card number in the clock name.

Check the clock name of the master clock and if it matches our own
clock, disable rate matching.
2019-10-23 16:04:03 +02:00
Wim Taymans
54f6834de4 io: add clock_id to clock
Can be used to determine if we need to slave or not.
Add node abi test
Fix some headers
2019-10-23 13:13:01 +02:00
Wim Taymans
6756a3c8fc monitor: remove monitor API and use device
Remove the monitor API, we can use the device API for it. Make sure
we support creating devices (like alsa) from another device (udev).

Use new object.id to store the object id in the object properties. Use
the port.id/node.id etc to make relations to other objects.
2019-09-20 13:04:14 +02:00
Wim Taymans
565f0475f0 tests: update test 2019-09-16 21:08:03 +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
f41720e7db Add PortConfig parameter
Add a new PortConfig parameter to configure ports of elements that
are marked with the SPA_NODE_FLAG_*_PORT_CONFIG. This is used to
configure the operation of the audioconver/audioadapter nodes and
how it should convert the internal format. We want to use the
Profile parameter only for cases where there is an enumeration of
values, like with device configuration.

Add unit tests for audioconvert and adapter to check if they handle
PortConfig correctly.

Make the media session use the PortConfig to dynamically configure
the device nodes.

Remove audio-dsp, it is not used anymore and can/should be implemented
with a simple audioconvert spa node now and some PortConfig.
2019-08-06 12:45:20 +02:00
Wim Taymans
bf618c3440 tests: fix unit tests again 2019-07-29 17:13:13 +02:00
Wim Taymans
891c5fd79d builder: make _rewind part of _reset()
_reset() should also rewind the work that has been done. We don't
need _rewind() anymore then.
2019-06-26 12:45:36 +02:00
Wim Taymans
350e8051a7 builder: add _rewind method
Add a rewind method to undoes the data of a frame.
Add unit test for overflow and rewind
2019-06-26 12:17:01 +02:00
Wim Taymans
497a8364c5 printf format fixes 2019-06-07 17:16:02 +02:00
Wim Taymans
9785d99821 monitor: Remove monitor event
Remove the monitor event and emit events with structures like we do
for the devices.
2019-05-30 12:51:12 +02:00
Wim Taymans
448c1937ad hook: separate spa_callbacks from the hook
Make a spa_callbacks with just the functions and data and use this
in the hook and objects.
2019-05-15 12:17:52 +02:00
Wim Taymans
6ee192dff5 hooks: use hook to implement the callbacks
This way we get the version check implemented and save some
code.
2019-05-15 11:19:23 +02:00
Wim Taymans
499dd3ff22 node: add port and node params
Add a new struct spa_param_info that lists the available params on
a node/port and if they are readable/writable/updated. We can use
this to replace and improve the PARAM_List and also to notify
property change and updates.

Update elements and code to deal with this new param stuff. Add
port and node info to most elements and signal changes.

Use async enum_params in -inspect and use the param info to know
which ones to enumerate.

Use the port info to know what parameters to update in the
remote-node.
2019-02-27 16:43:01 +01:00
George Kiagiadakis
71eb538fba meson: prefix the names of the tests so that they are unique in the tree
meson < 0.46 does not allow two targets to share the same name;
meson >= 0.46 relaxes that requirement, but I see no reason to require
a new version of meson just for this
2019-02-13 11:22:45 +01:00
Wim Taymans
68bcc6b8e8 pod: move vararg macros to separate file 2019-01-25 16:17:29 +01:00
Wim Taymans
93e8074b2c alloc: improve alignment in alloactor
link: use buffer allocator
Add more tests
2019-01-25 13:32:35 +01:00
Wim Taymans
6f586602af audioconvert: add unit test for format conversion
Add unit test for fmt conversion and fix some bugs
Add empty fmt-ops benchmark
2019-01-23 15:59:54 +01:00
Wim Taymans
a1d45d2b25 add missing file 2019-01-22 17:47:55 +01:00
Wim Taymans
351fb9ce29 pod: improve parser and builder
Remove the spa_pod_iter helpers
Remove builder/parser vararg recurse option, you have to
manually recurse into structures when needed. This simplifies
things a lot.
Pass spa_pod_frames to builder and parser explicitly, we don't
have to keep an internal stack anymore.
The parser is now almost a mirror image of the builder.
Make the parser safer when iterating over objects, add functions
to check and get pod contents in a safe way.
Make the builder return errno style results on errors
Improve performance of object properties when they are stored and
retrieved in the same order.
Add many more tests for the builder and parser
Add some benchmarks
2019-01-22 17:38:23 +01:00
Wim Taymans
878ae769ef parser: improve parser
Add more unit tests
2019-01-18 13:40:05 +01:00
Wim Taymans
5f236203d6 test: add more pod tests 2019-01-17 18:05:52 +01:00
Wim Taymans
2622e085a9 pod: add more helpers
Implement more unit-tests
2019-01-17 17:23:47 +01:00
Wim Taymans
3ee463ed3a spa: Update tests and examples
Keep tests in spa/tests
Make spa/examples
Remove some old examples
2019-01-17 09:27:41 +01:00
Wim Taymans
80cfda89c1 pod: improve the vararg pod builder and parser
Automatically parse and build key/value when in objects without having
to prefix the key with ":"
Automatically build control/value when in sequence without the "."
prefix.
Remove the builder with key/pod, taking a reference to the stack built
temporary pods is not allowed in c++. We can use the varargs version
with the same convenient syntax.
Remove the parser "*" option, it is unused.
Improve spa_pod_builder_add_* and spa_pod_parser_get_* and make them
look similar.
2019-01-16 11:05:12 +01:00
Wim Taymans
3dc6820e9e Don't use __ in defines or declarations, it's reserved
SPA_TYPE -> SPA_TYPE_INFO for type info strings
improve includes

Fixes #115
2019-01-14 13:00:00 +01:00
Wim Taymans
1ed27a8f2b add _GNU_SOURCE as compiler flag 2019-01-08 17:36:58 +01:00
Wim Taymans
f8556f1a08 make c++ optional 2019-01-08 12:18:45 +01:00
Wim Taymans
3e77e9bf99 test: add c++ test 2019-01-08 11:59:05 +01:00
Wim Taymans
d12148cfba graph: remove scheduler2
Move graph code into graph.h
2019-01-08 11:56:44 +01:00
Wim Taymans
19e4b04939 add more tests 2019-01-07 18:01:44 +01:00
Wim Taymans
5b7ddb0105 buffer: remove buffer id
The buffer id is not needed/used, we use the index of the buffer in the
buffer array when configuring the port.
2019-01-07 17:57:03 +01:00
Wim Taymans
e918f9f77c fix sign confusion 2019-01-07 15:52:42 +01:00
Wim Taymans
57e94f7bc4 monitor: remove enum_items
Make the monitor and device emit the info and items when the callbacks
are set. This makes it easier to implement the monitor because there
is much less state to keep around and invalidate etc.
Rework the monitors
Add bluez5 device
2018-11-26 12:18:53 +01:00
Wim Taymans
9825932b88 test-convert2: add channel position 2018-11-07 11:59:12 +01:00
Wim Taymans
e47bfa02e5 audiotestsrc: properties are float 2018-11-07 11:57:58 +01:00
Wim Taymans
088ee9f09e Improve TIMESPEC_TO_TIME
Add explicit TO_NSEC and TO_USEC versions to make it clearer and to
allow for some optimizations.
2018-11-07 09:56:24 +01:00
Wim Taymans
85f2e93c54 Relicense as MIT/X11
Remove some obsolete files
2018-11-05 17:48:52 +01:00
George Kiagiadakis
57cd209d2a spa: tests: add automated unit test for spa_ringbuffer 2018-10-31 10:50:36 +00:00
George Kiagiadakis
9724aea17f spa: tests: add automated unit test for spa_hook_list 2018-10-31 10:50:36 +00:00
George Kiagiadakis
ef8b7bc003 spa: tests: add automated unit test for spa_list 2018-10-31 10:50:36 +00:00