Skip to content

wpipc

Julian Bouzas requested to merge julian/wireplumber:wpipc into master

This MR implements a simple libwpipc.so library that uses sockets for inter-process communication between wireplumber and external applications. Apart from that, a new wireplumber module called ipc is also added to handle requests coming from external wpipc applications. Only PLAY and STOP requests are handled by such module. These requests will set or remove metadata that will be used by the policy to unlink or re-link endpoints with client nodes.

The above can be easily tested with the wpipc-client example executable. To unlink all endpoint links while audio is being played, execute the client like this:

./build/tests/examples/wpipc-client /tmp/wpipc STOP

Audio should stop playing. To re-link all endpoints, execute the client like this:

./build/tests/examples/wpipc-client /tmp/wpipc PLAY

Audio should start playing again. Note that several clients can send STOP and PLAY requests, so the ipc module keeps internally a counter to decided whether endpoint links should be unlinked or not. For example, if 2 clients send a PLAY request, and another one sends a STOP request, the endpoints won't be unlinked. You would have to send an extra STOP request for the endpoints to be unlinked.

Merge request reports

Loading