Commit graph

45 commits

Author SHA1 Message Date
Wim Taymans
46928cbc04 alsa: use timerfd
Use timerfd instead of period events to wake up alsa.
module-autolink: fix crash
Some cleanups
2017-03-28 19:29:08 +02:00
Wim Taymans
25b7ede0bc uri -> type
Clean up some more types.
2017-03-24 13:11:57 +01: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
d9a51b5d14 mapper: place strings in array
mapper: place strings in a big array.
Make it possible to configure array and map extend size.
2017-03-23 17:57:03 +01:00
Wim Taymans
4c4c0f2a7f context: use need_flush signal to schedule flush
Use the need_flush signal to signal an event that triggers a flush in
the main thread.
2017-03-15 16:17:24 +01:00
Wim Taymans
c1cf1e6f67 Add update_uris method and event
Add a way to send mapper updates between client and server and a way
to map between client and server types.
2017-03-14 20:18:31 +01:00
Wim Taymans
ff659ad1a7 proxy: use 0 as the core resource
Make it possible to insert and object with a fixed id for the proxy.
Make it possible to choose an id for a resource.
2017-03-14 16:15:09 +01:00
Wim Taymans
3e472c2dae loop: add before_iterate signal
Add before_iterate signal and use it to flush data to clients.
2017-03-14 16:13:29 +01:00
Wim Taymans
8fbcb0fef1 remove some unused event and seqnum 2017-03-09 19:21:50 +01:00
Wim Taymans
7ad02f553a improve interfaces
Make an interface structure to hold methods and events.
Move interface setup to protocol
2017-03-09 13:00:56 +01:00
Wim Taymans
78a3cd61b8 pod-builder: make more generic builder
Make a vararg based builder that produces much smaller code.
Catch demarshal errors.
Simplify array handling
2017-03-07 17:23:35 +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
41399b0b25 Rework serialization
Move serialization to the protocol, we now just send blocks of bytes
over the connection and let the protocol deserialize them.
2017-03-06 15:48:04 +01:00
Wim Taymans
842d73ca4b protocol-native: move to separate file
Move protocol-native to separate client and server file
2017-03-03 19:06:54 +01:00
Wim Taymans
b9a0b067be use interfaces in client 2017-03-03 17:43:23 +01:00
David Svensson Fors
c433df9d32 context: connect to a specified socket
Support in the context API for connecting to a Pinos instance
listening at a specified socket - not only to the one pointed out by
the environment variables XDG_RUNTIME_DIR and PINOS_CORE.
2017-02-15 11:57:40 +01:00
David Svensson Fors
dda5a22fcd context: free objects map in destroy() 2017-02-15 11:56:17 +01:00
Wim Taymans
fd54471249 Implement SYNC message
A sync message returns a notify-done after all request are finished and
can be used to wait for completion of a bunch of commands. Use it wait
for all proxy BIND requests to complete so that we can look at the
info immediately.
Copy the default value of unset properties.
2017-02-01 17:48:12 +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
8b84d8fde6 fix some leaks
Fix some leaks
Remove some unused fields
Install a loop so that plugins can use it
Start on adding format introspection
2017-01-31 09:57:58 +01:00
Wim Taymans
4b55d7c4da Fix proxy ids
The proxy/resource ids are generated by the client and so we need to
used them as index in the client resource map instead of making our own
number.
Fix stream disconnect and client-node destroy
Fix gstreamer device provider
Make all sockets non-blocking to avoid errors with bad clients
Advertise the subsystems we monitor and disable the gstreamer monitors.
Implement core properties updates
Make sure we send REMOVE_ID after we are done with the resource.
2017-01-20 15:53:03 +01:00
Wim Taymans
cae971e106 improve error reporting
Move signals from core to the objects themselves
Use per object info to track object signals
Use periods in alsasink and source
2017-01-17 10:27:58 +01:00
Wim Taymans
ee0aa6a2ac Implement access control
Move send and dispatch functions to the implementation. This makes it
possible to place an access check before sending and dispatching.
Add module-access that allows to bind and notify on globals owned by
the client.
2017-01-10 17:26:43 +01:00
Wim Taymans
85d375e4bb Implement subscription with a signal
Use a signal for subscription events
Work on handling OOM errors and other errors.
2016-12-22 16:50:01 +01:00
Wim Taymans
ff5e260d67 Add client info message
Update client info and improve core info
2016-12-21 17:19:06 +01:00
Wim Taymans
8ce3f949e2 Add core introspection
Use global ids in info messages to refer to global objects.
2016-12-15 20:09:48 +01:00
Wim Taymans
5e8a3afe17 handle cleanup of remote proxies
Destroying a resource informs the client to destroy the proxy.
Destroying an object destroys all the bound resources on it.
2016-12-02 17:14:32 +01:00
Wim Taymans
e6f45a7686 Add link introspection 2016-12-02 16:06:16 +01:00
Wim Taymans
b969623ec8 Work on introspection 2016-12-02 13:38:43 +01:00
Wim Taymans
7c29209023 Registry: implement registry
Make GET_REGISTRY method to create a registry resource, send global
added and removed to this resource.
Use map for storing proxies and resources.
2016-11-30 19:09:09 +01:00
Wim Taymans
ee67929a7c cleanups 2016-11-25 13:38:49 +01:00
Wim Taymans
27bba6f587 Make native protocol
Remove DBus and work towards something like wayland.
Remove more glib stuff from the client code
2016-11-24 17:00:42 +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
bdbddaf75b improve introspection
Small cleanups
2016-08-18 12:17:31 +02:00
Wim Taymans
f7d02c8d77 client: add client object instrospection 2016-07-20 17:55:02 +02:00
Wim Taymans
e167d30296 reintroduce channels
Bring back the channel object. Making a node and port on the client side
was rather awkward because of the async nature of many methods. It feels
better to have a specific communication channel object to interface with
a server side port.
Use port activate/deactivate to start/stop streams
Remove links from the ports. We let other objects install a callback on
the port to receive and route buffers.
2016-07-20 17:29:34 +02:00
Wim Taymans
eefe6aacb9 some more rework 2016-07-18 17:40:58 +02:00
Wim Taymans
89f8f41045 remove READY state on context
Now that we don't need to register anymore to the daemon we can just
remove this state.
2016-05-19 11:29:11 +02:00
Wim Taymans
5f10a933a1 remove client object
Remove the client object, it is not very useful now that we have the
nodes.
Fix some properties on the proxy objects.
Use sendmsg and recvmsg directly because the GIO ones do allocations.
make pinos_properties_merge and use it to combine properties from nodes
and ports.
2016-05-18 17:22:34 +02:00
Wim Taymans
4a5ed1e1f5 Rework how clients connect.
Add buffer flags. The idea is to make it possible to easily check when a
buffer contains control information that we need to parse to update the
port fields.
Make the client create remote nodes and ports and set up proxies for
them.
Make a port base class implementing most of the logic to pass buffers
locally and remotely.
Remove most code from stream.c, it's now in the port.
Make a portsink and portsrc that can write and read to/from any port. We
use these in the server to send and receive data.
Rework format negotiation. The final format is now sent in-line before
the data. The server will select a format on output ports.
2016-05-17 09:38:30 +02:00
Wim Taymans
8407430891 rework: make client and server nodes
work on making nodes and ports on the client.
2016-05-12 17:03:28 +02:00
Wim Taymans
ba4ef9b5d9 Introduce the concept of a Port
A port is an input or output on a Node.
Channels are created from the ports and inherit the direction of the
port.
do automatic port selection based on the direction and caps and
node/port name.
Simplify stream_connect by passing the direction.
Fix pinossink to connect in setcaps so that we know the format and can
select a good sink to connect to.
2016-05-06 13:01:52 +02:00
Wim Taymans
7597e48e02 source-output -> channel
Rename the source-output object to channel because it is used for both
input and output.
Start the beginnings of sink support. This will make it possible to make
pinos consume data as well as provide data.
2016-05-03 18:00:56 +02:00
Wim Taymans
cdb2028f9b src -> pinos and fix include paths
Rename src to pinos and fix all the include paths so that they contain
pinos/ to avoid conflicts
2016-02-01 15:40:48 +01:00
Renamed from src/client/context.c (Browse further)