Commit graph

36 commits

Author SHA1 Message Date
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
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
0a4ef3d2c0 resample: add SSE peaks resampler 2018-12-19 16:47:20 +01:00
Wim Taymans
a331779a28 resample-peaks: fix peaks resampler
Keep separate variable to check if we searched a complete chunk.
2018-12-13 16:23:02 +01:00
Wim Taymans
74c71e9bad resample: only free resampler when implemented 2018-12-05 16:05:40 +01:00
Wim Taymans
5fa7e0f3eb resample: add peaks resampler 2018-12-05 15:58:55 +01:00
Wim Taymans
7bc9c1ebfe node: remove info from node interface
Replace with info event emited when callbacks are set. This makes it
easier to implement dynamic changes.
2018-11-26 12:41:40 +01:00
Wim Taymans
3e1e6b02b5 resample: add property to change resample rate 2018-11-16 16:54:56 +01:00
Wim Taymans
85f2e93c54 Relicense as MIT/X11
Remove some obsolete files
2018-11-05 17:48:52 +01:00
Wim Taymans
66de372e9a add node set_io function
Also allow setting io areas on nodes. We need this to set the
graph clock and period size on the nodes.
2018-10-23 12:31:41 +02:00
Wim Taymans
d2570142fa resample: don't output 0 buffers 2018-10-22 11:32:53 +02:00
Wim Taymans
78b7da608f channelmix: more improvements
work with the default channel layout
remap to default channel layout in fmconvert
Pass channel positions in resample format
2018-09-17 09:41:41 +02:00
Wim Taymans
fcd90b25d3 More work on multichannel
Reorder channels to a more common default order.
Only add channel layout when channels > 1
Don't try to link to a session that is still starting
Small sse fixes.
2018-09-14 15:23:12 +02:00
Wim Taymans
5196f7f053 audio: remove layout from audio
Make special format types for planar and interleaved instead of
having a field.
Add enum for audio channel positions
Add some default audio channel layouts
Place the channel layout in the audio format when possible
alsa: place audio channel positions in format
Add sse optimized channel mixing for some common cases
Remove name from port info, it's not mandatory and in the properties
Add direction to port info
2018-09-13 17:03:56 +02:00
Wim Taymans
cc842cbdc8 Type changes
Only allow properties inside objects, this makes it easier to
iterate the object, which is needed for efficiently processing
control streams.
Add a choice type to mark variable properties.
SPA_TYPE_Enum -> SPA_TYPE_Id to avoid confusion with choice enum
Make it easier to allocate and initialize properties on the stack
Make more efficient methods to make objects.
2018-09-05 16:41:07 +02:00
Wim Taymans
ff6a244d8f Make media type and subtype properties
This is easier to debug and we only want properties in objects
in the future.
2018-08-29 18:08:52 +02:00
Wim Taymans
514528f2c7 format: make helper functions to create formats
Use helper functions to create a fully specified format.
2018-08-29 15:53:26 +02:00
Wim Taymans
80de83f38a format: make helper function to parse media type 2018-08-29 14:50:58 +02:00
Wim Taymans
5976beb149 hook up some more control streams 2018-08-29 12:43:31 +02:00
Wim Taymans
c9526dc2bb Implement control streams
spa_io_control_range -> spa_io_range
Add helpers for sequence and control pod objects
Implement control properties in audiotestsrc, update test example.
2018-08-28 18:16:41 +02:00
Wim Taymans
90c1a95eef More type cleanups
SPA_ID_* -> SPA_TYPE_*. We use 'type' for all registered types.
ID refers to either a registered type or an enum.
Improve introspection of object ids. Make 0 an invalid enum and
use it to look up the object id type.
Move some type-info files together.
Swap type and id of the object, we first specify the type and then
the id because the meaning of the id depends on the object type.
2018-08-27 15:03:11 +02:00
Wim Taymans
d26aecfef2 More type fixes
Param ids and IO ids are now simple enums.
Move some type info in one place, delete some type-info files
Fix type debug
Make audio layout an enum
Mark more enums as enums in types so they show us with their names in
the debug.
2018-08-25 12:08:29 +02:00
Wim Taymans
805e3bb6c1 types: work on types
Move static pod types to type system
work on type info for types
Move the event and command ids to an enum to make it easier to extend
later.
2018-08-24 10:53:09 +02:00
Wim Taymans
fca3e1d85d Remove dynamic types
Do not use dynamic types anymore. The reason is that it's difficult:

- to maintain a shared type database over a network.
- the extra overhead when translating between processes and for
  maintaining the translation tables.
- race conditions in translating in RT-threads, this is a problem
  because we want to make event streams.

We now have simple enums with types and extension points for all
types. This is also nicer to use in general.
We don't need the mapper anymore or pass strings around as types.
There is a parallel type info system to get more info about ids and
enums and their hierarchy. It can also be used for debugging.
2018-08-23 17:47:57 +02:00
Wim Taymans
5de4dab21b spa: set buffer sizes better 2018-08-20 17:56:59 +02:00
Wim Taymans
3b1c40f17f pod: move compare and filter functions out of the library 2018-08-14 14:52:32 +02:00
Wim Taymans
c98fbfe0a9 meta: make safer find_meta_data function 2018-07-09 12:04:23 +02:00
Wim Taymans
1a786e04f9 resample: improve output buffer size
If we don't have an output size configued, produce output as soon as we
can.
2018-06-25 17:09:45 +02:00
Wim Taymans
75a18d5c7f audioconvert: fix s24 samples
Various cleanups
2018-06-25 14:34:36 +02:00
Wim Taymans
18f0194008 audioconvert: apply ouput range to resampler as well 2018-06-15 12:45:04 +02:00
Wim Taymans
4ac21aea53 stream: remove conversion
Improve audioconvert to also split the output.
Remove the format conversion from the stream and move into the
server client-stream.
2018-06-15 11:31:42 +02:00
Wim Taymans
1b37db8add resample: fix resample length
Don't use output sizes as input size for the next channel.
2018-06-08 12:27:19 +02:00
Wim Taymans
bd3b7e8ee4 alsa: cleanups
Use a periodic timer to catch underruns
Small cleanups
2018-05-11 09:56:46 +02:00
Wim Taymans
06dd7095fc audioconvert: various fixes 2018-04-19 20:12:24 +02:00
Wim Taymans
d88b88444d resample: use speex resampler for now 2018-04-10 16:54:15 +02:00
Wim Taymans
b3b47d3fe9 more work on audioconvert
Implement audioconvert as a complex element of fmtconver,
channelmix and resample.
Make copying resample just to test.
Plug the converter into pw_stream.
2018-04-10 15:54:29 +02:00