C code doesn't lend itself well to using classes and pages are best for prose.
A doxygen group is a set of related functions - which is exactly what we have
here, e.g. pw_context.
This patch basically adds the following lines to each header:
\defgroup pw_whatever
\addtogroup pw_whatever
\{
.... function declarations ....
\}
Doxygen is smart enough to merge documentation in the header with
documentation in the correspondin .c file where the function is implemented.
This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.
Here is the command I used to generate this commit. There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```
I didn’t add it to the CI, but this would be a good place for it.
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.
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.
The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
Remove the node buffers reply again. We don't need it. Instead add a
new method to the client-node to upload an array of buffer datas.
This method is called after the client has allocated buffer mem. It
will update the buffers on the server side with the client allocated
memory.
Wait for the async reply of use_buffers when doing alloc_buffers so
that we can get the updated buffer mem before we continue.
Let the link follow the states of the ports.
Add some error code to the port error states.
Add PW_STREAM_FLAG_ALLOC_BUFFERS flag to make the client alloc buffer
memory.
Do not pass the params of the node in the node_info, instead,
make a method to enumerate the params. This makes it possible for
clients to only enumerate what they need and when they need it.
Improve introspection of a port, add the name and properties.
Add an enum_param method on the port that can be used to enumerate
port formats.
Change -monitor and -cli and add support for enum_params on the node
and port.
Add properties to global objects to make it easier to select what
nodes and objects to bind too. They can also be used to implement
permissions on the globals based on properties.
Add more error handling in _register.
Make more functions return a result code.
Make a separate pw_module_register, like all other objects.
Add control objects for all controllable properties on ports.
Try to link compatible control properties in autolink.
Allocate shared memory for the output property memory and configure
the io area on the ports when the controls are linked.
Send the shared memfd to clients when the io area is configured.
Add port_set_io support in remote.c, mmap the control io area and
set on the port.
Add some param helpers
Add volume control to export-source update the volume before
sending each buffer.
Sometimes we insert NULL into the client object map to mark the object
freed. Now that the map also returns those NULL's, don't try to free
them.
Small cleanups
Make some port methods private.
Avoid duplicating API, remove implementations from port and node and
always use an spa_node as the implementation, it's just as easy to
implement a spa node. With the implementation always being a spa_node
we will be able to better implement the negotiation of the mixers.
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
Remove signals.
Rename callbacks -> events, use listeners to listen for events.
Callbacks are still used in spa for things you can listen to only
once.
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.
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.