Commit graph

53 commits

Author SHA1 Message Date
Wim Taymans
85f2e93c54 Relicense as MIT/X11
Remove some obsolete files
2018-11-05 17:48:52 +01:00
Wim Taymans
1ebb3850e9 alsa: remove useless debug 2018-09-20 10:11:22 +02:00
Wim Taymans
ca2d35ca30 alsa: fix monitor strings 2018-09-17 17:15:05 +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
2631db14a8 pod: use {} as object delimited, like json
Use <> for sequence
2018-08-30 09:53:29 +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
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
3b1c40f17f pod: move compare and filter functions out of the library 2018-08-14 14:52:32 +02:00
Wim Taymans
1ede97577b small cleanups 2018-05-08 12:23:23 +02:00
Wim Taymans
4c9c939527 alsa-monitor: keep track of cards and devices
Keep better track of cards and devices so that we can remove them
without having to open (the removed device).
2018-04-24 17:01:04 +02:00
Wim Taymans
de36330917 handle: make method to get size 2018-04-09 10:06:17 +02:00
Wim Taymans
528d0a1c7d alsa: put device name in separate property 2018-02-20 09:59:52 +01:00
Wim Taymans
7204f3e047 update docs 2017-11-13 19:58:52 +01:00
Wim Taymans
440f681f4b Improve enum_param
Add an argument to pass the result param to the caller instead of
having the caller have to pick it up from the builder.
Improve docs for node, clock and monitor
Pass spa_pod everywhere instead of spa_pod_object.
Pass result argument to spa_pod_filter to make things a little
nicer.
2017-11-13 17:57:38 +01:00
Wim Taymans
6fb0f580ea Use errno for result errors
Make new enumeration for data transport status and use errno
style error numbers for errors.
2017-11-13 09:41:41 +01:00
Wim Taymans
caaeaff223 Reorganise SPA tree
Reorganise the SPA includes to make it more extensible later
Simplify the naming of the buffer and meta params
2017-11-10 13:36:14 +01:00
Wim Taymans
24d80e5c00 Add new pod parser and builder
Add a new pod builder and parser that is less verbose and
a little more powerful.
2017-09-28 17:00:51 +02:00
Marcos Paulo de Souza
b0c3936477 Fix clang warnings about comparing uint32 < 0 (#10)
* Fix clang warnings about comparing uint32 < 0

clangs complains about an uint32 compared to < 0:
warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]

So remove these comparisos and an uint32 never will be less than 0.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>

* module-jack.c: Differentiate error msg from protocol-native

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2017-09-04 11:09:08 +02:00
Wim Taymans
80cf20a255 monitor: fix some leaks 2017-08-22 19:22:04 +02:00
Wim Taymans
0602d76b9e Cleanups
Only pass data to callbacks.
Rename some structs
Provide methods to access structs
2017-08-06 06:42:26 +02:00
Wim Taymans
763bd1100e Add user_data to callbacks
Add user data to callbacks, it's more flexible and natural
2017-06-18 19:48:31 +02:00
Wim Taymans
c3b73ba47d Add versions to structures
Use versions instead of size
Remove user_data from callbacks, we can simply pass the callback struct.
2017-06-14 18:32:39 +02:00
Wim Taymans
ded1ea69a1 indent 2017-05-26 18:19:51 +02:00
Wim Taymans
5b037661d9 indent 2017-05-26 08:05:01 +02:00
Wim Taymans
11f23a3ffa spa: don't use typedef for struct and enum 2017-05-25 13:28:15 +02:00
Wim Taymans
90ea120d3c audiomixer: don't mix when no input
Give the app a chance to provide some input when there is nothing to mix
anymore in process_output.
alsa: fix buffer size
2017-04-19 13:06:03 +02:00
Wim Taymans
28389e05f3 alsa: fix device enumeration 2017-04-06 17:32:00 +02:00
Wim Taymans
4808f8f10e link: fix negotiation
Fix renegotiation of idle but not yet suspended nodes.
2017-04-06 16:12:47 +02:00
Wim Taymans
8594d28f59 alsa: rework monitor
Enumerate all playback and capture devices
2017-04-05 18:37:12 +02:00
Wim Taymans
39c3650b5f fix media.class 2017-04-04 15:32:11 +02:00
Wim Taymans
b05d82d514 plugins: use macros for input checks
That way we can compile them out if we want
2017-04-04 09:00:49 +02:00
Wim Taymans
5825c62d6d types: more work on types 2017-03-24 11:40:58 +01:00
Wim Taymans
acedfe71c0 clean up types 2017-03-23 21:15:52 +01:00
Wim Taymans
7270986c3a monitor: use dynamic types
Make the monitor item a POD object and use dynamic types.
2017-03-23 08:54:04 +01:00
Wim Taymans
f92b68c3c3 Use types with known sizes where we can, easier to serialize
Add iterator for POD and use it to implement some demarshalling.
2017-03-07 11:56:43 +01:00
Wim Taymans
1370fafd5b Fix renegotiation
When we are idle and are asked to negotiate, suspend first so that we
can do full negotiation again instead of using the old format.
Stability fixes.
2017-02-02 17:48:39 +01:00
Wim Taymans
b38ecafe81 Use int counters for iterating items
Use counters instead of void* to iterate items. This simplifies some
things and makes it easier to do over the wire.
Add format description to NodeInfo and use this to add format
descriptions to pinos devices.
Small fixes to fix leaks and crashes.
2017-02-01 08:58:21 +01:00
Wim Taymans
ae93f15965 Work on event loop
Make a new epoll based event loop and use it for the data tranport.
Simplify the spa event api a little and rename to SpaLoop
2016-11-18 17:46:01 +01:00
Wim Taymans
7e46f9e3ad More hacking
Move array and map to pinos
Move more things to spa lib
ControlCmd -> Message
Make pinos log, use for plugins as well
work on ringbuffer in alsa and nodes
work on making registry with all objects
2016-11-03 19:41:53 +01:00
Wim Taymans
3f4ccaaea2 More hacking
Add connection message for PORT_COMMAND
Add rtkit support to ask for realtime priority
work on stream states and improve negotiation
Rework of port linking works, keep separate state for realtime threads
and use message passing to update the state.
Don't try to link nodes that are removed.
Open the device in the ALSA monitor to detect source or sink
Implement send_command as async methods on the plugins, use async
replies to sync start and stop.
Work on alsa sink.
Implement async PAUSE/START on v4l2 src. move the STREAMON/OFF calls to
the mainloop because they have high latency, add the poll descriptors
from the data loop.
2016-10-28 16:56:33 +02:00
Wim Taymans
d3dd90bb05 simplify events and commands 2016-10-24 15:30:15 +02:00
Wim Taymans
82414810e8 avoid deref
We can avoid a deref when we use container_of to get from the interface
to the handle.
2016-10-12 17:27:29 +02:00
Wim Taymans
50c3b40cd0 Remove monitor poll and hook in mainloop
Provide a mainloop SpaPoll and let the monitors hook into it.
2016-10-07 18:19:03 +02:00
Wim Taymans
fc4fd1424a Add mapper
Ger rid of static ids for interfaces and replace with something we can
register dynamically
Implement logger.
2016-10-07 13:19:50 +02:00
Wim Taymans
a68e5d5124 Rename to Support 2016-10-05 21:05:22 +02:00
Wim Taymans
49dae17dfb Add logger
Add logger interface
Make it possible to pass extra interfaces to the element at init time,
such as a logger.
2016-10-05 17:43:11 +02:00
Wim Taymans
24108e01c1 mem: remove memory stuff
Remove the memory stuff from the spa API, we can do thing more simple
and efficiently if we always allocate buffers outside of the plugins and
only implement an alloc function on the node when it can do something
clever.
Move serialize code to the props/format/buffer code
Make it possible to copy a format and properties.
2016-09-29 18:18:59 +02:00