Commit graph

199 commits

Author SHA1 Message Date
Wim Taymans
e918f9f77c fix sign confusion 2019-01-07 15:52:42 +01:00
Wim Taymans
9573b24e52 cpu: add force cpu flags
Use PIPEWIRE_CPU to force cpu flags.
2019-01-07 15:02:18 +01:00
Wim Taymans
7104df1b21 cpu: detect MMXEXT as well 2018-12-17 13:37:27 +01:00
Wim Taymans
9ca9fda253 cpu: add cpu support implementation 2018-12-17 13:25:27 +01:00
Wim Taymans
85f2e93c54 Relicense as MIT/X11
Remove some obsolete files
2018-11-05 17:48:52 +01:00
Wim Taymans
7a0a150337 logger: add support for logging to file 2018-09-26 10:48:01 +02:00
Wim Taymans
39240fb9c0 use _list_consume to destroy objects 2018-09-25 13:05:13 +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
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
a6ad8f747f remove spalib 2018-08-14 15:29:25 +02:00
Wim Taymans
a63523650d hooks: enforce version on hook emission
Pass the minimum required version to the hook emission and only call
events when the handler is recent enough.
Add some macros to make event emission easier to read.
2018-08-01 21:41:25 +02:00
Wim Taymans
1bfb1d9228 loop: return number of dispatched fds and update docs 2018-06-01 11:16:53 +02:00
Wim Taymans
22b8a6f01a logger: make info lines green 2018-05-10 11:28:25 +02:00
Wim Taymans
c2cd56d903 loop: inline frequently used function 2018-04-27 17:29:39 +02:00
Wim Taymans
8961e6d1c7 logger: add colors
Add colors and option to enable them
2018-04-26 09:47:24 +02:00
Wim Taymans
0eb73f0f06 loop: add back the destroy loop
We need to keep the sources around until all sources are dispatched. If
not: source A and B are active after poll, A is dispatched first and
removes B, when B is then dispatched, the memory is gone. We don't
free the source but simply mark the fd invalid and move it do a
destroy list. After all sources are dispatched we destroy.
This is safe because removing a source is either done from the poll
context (with invoke) or when holding the right locks.
2018-04-20 16:28:47 +02:00
Wim Taymans
ebd13a2a74 loop: blocking wait
Release the locks before waiting.
2018-04-19 22:01:18 +02:00
Wim Taymans
de36330917 handle: make method to get size 2018-04-09 10:06:17 +02:00
Wim Taymans
33a322b96e graph: new scheduling model
Make explicit links between elements that are used to activate the
next element in the graph.
Make subgraphs a special regular node. Make a link from the
subgraph children to the parent so that the subgraph completes when
all the children completed.
Implement a single process function in plugins
Remove many messages in the client node
2018-04-03 16:29:36 +02:00
Wim Taymans
638916e065 loop: remove the destroy_list
Don't use a destroy_list anymore, it's not safe anyway. Instead require
that sources be removed with (a blocking) invoke. Make sure we don't
dispatch sources that were removed from the loop.
2018-03-14 14:51:36 +01:00
Wim Taymans
8e2ceb773e Improve some debug 2018-03-01 09:01:52 +01:00
Wim Taymans
9d4b0d8358 dbus: move rtkit to module
Move the rtkit code to a module.
Make sure we don't need to include the dbus headers in the spa dbus
interface. This removes the dependency on dbus.
2018-02-08 10:02:17 +01:00
Wim Taymans
f7b6fea43d Add dbus support interface
Add an interface that can manager a dbus connection.
Make a dbus interface in the core that can create connections running
in the core main loop. Keep this as support for spa plugins.
2017-12-18 12:41:47 +01:00
Wim Taymans
4d6ac37398 Use int instead of bool as result
Prefer to use an int return from a function instead of bool because
it can contain more info about failures.
2017-12-18 11:38:30 +01:00
Wim Taymans
5bebfe022b cleanups
Follow the data/size argument order convention to make the api
more consistent.
2017-11-20 15:26:44 +01:00
Wim Taymans
2923b623b3 Meta: rework ringbuffer meta
ringbuffer: remove size and mask from the ringbuffer, we have that
elsewhere in the user of the ringbuffer.
Remove the buffer data offset and size fields and replace with a
ringbuffer. We then have a ringbuffer in all buffer data, which
simplifies things.
We can now remove the ringbuffer metadata.
2017-11-15 17:25:36 +01:00
Wim Taymans
c78fe6a353 port: work on port commands 2017-11-14 15:44:48 +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
58451d626c Implement param filtering
Make a new pod filter function and use it in the plugins to filter
in enum_params.
Small tweaks to the pod_builder
2017-11-09 17:16:54 +01:00
Wim Taymans
f3bca48398 Unify props, params and formats
Make enum_params and set_param to configure properties, format
and other parameters. This allows us to remove some duplicate
code and make the properties and parameters much more extensible.
Use the object id to mark the id of the parameter.
Remove the spa_format and spa_props.
We can now make the client-node easier by merging the various
format methods into the params.
Make the stream API more powerful now that we can pass params
around.
2017-11-07 17:48:40 +01:00
Wim Taymans
323c644084 fix crashes and leaks on shutdown 2017-10-17 10:14:56 +02:00
Wim Taymans
6af4f08c6e cli: small cleanups
Add make cli to start the cli
Only print changes once
Notify of changed objects
2017-09-18 22:23:18 +02:00
Wim Taymans
577f86be0d graph: use spa_node as implementation
Always use a spa_node as the graph implementation, implementing the
methods is just as easy.
Plug some mem leaks in remote
2017-08-27 12:12:14 +02:00
Wim Taymans
c25834a692 Work on cleanup
Add signal handlers for daemon to shut down
Add destroy listeners for modules and do cleanup
Fix some leaks
Simplify port registration in new nodes
Hide some more data structures
Let the node implementation take care of the reuse_buffer signal because
then we can get to the graph nodes to find the destination port.
Destroy modules in core cleanup. Modules should undo everything they
have done.
Activate the link after we negotiated format and buffers.
2017-08-22 18:30:10 +02:00
Wim Taymans
9ad1f911b2 Improve loop callbacks
Pass just one data item to the callbacks.
Add properties to port.
Add user data to link
Handle autolink with multiple ports
More work on jack support
2017-08-11 19:21:31 +02:00
Wim Taymans
eeda53dbef Fix leaks
Add some docs
Add properties to loop objects for future use
2017-08-08 18:24:15 +02:00
Wim Taymans
600055bd68 Move listeners to spa and rename to hooks
The listeners are generally useful in spa, move it there and rename
to hooks. Implement loop hooks with it.
Fix some cleanup issues in stream and remote
2017-08-08 16:56:29 +02:00
Wim Taymans
3d9f28c676 Use remote to join nodes on remote graphs
Make a new method that can take a local node and run it in a remote
pipeline. This basically replaces all functionality of the streams
and more.
Add 2 examples for exporting a sink and a v4l2 node
Make some more things const
Cleanups
Make it possible to do things when the node needs scheduling. The
default node will schedule the local pipeline but the remote node might
also schedule the remote pipeline.
2017-07-25 19:52:31 +02:00
Wim Taymans
91d54364fc loop: add signal count to callback
Don't try to signal too many times
2017-07-19 10:44:03 +02:00
Wim Taymans
465f12241e Implement protocol extensions
Add hooks that contain protocol specific interfaces that can be used
to extend the protocol. This makes it possible to add new interfaces
to the protocol and implement the protocol specific data transport.
Move these protocol specific extension to the extensions directory.
2017-07-12 18:04:00 +02:00
Wim Taymans
da94f65493 fix some compiler warnings 2017-07-04 12:21:01 +02:00
Wim Taymans
791137e9e5 loop: fix ringbuffer handling 2017-07-04 10:18:24 +02:00
Wim Taymans
bc56c59597 loop: add block flag to invoke
Remove async shutdown and block instead.
2017-06-26 10:41:19 +02:00
Wim Taymans
4a6b1b42bc Don't hardcode plugin path
Use SPA_PLUGIN_DIR to get the plugin path.
Install plugins in subdirectory to make it match the build tree.
2017-06-19 12:19:22 +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
4a219e81dd loop: move to plugin
Move the loop implementation to a plugin.
Organize the hooks in a list so that we can add many.
2017-06-14 16:27:04 +02:00
Wim Taymans
f55f1739e1 Rework support
Load the mapper from the support plugin
Move the support setup in pw_init
2017-06-14 11:48:41 +02:00
Wim Taymans
9257e3b8f3 make support plugin 2017-06-14 10:15:17 +02:00