Commit graph

395 commits

Author SHA1 Message Date
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
0d0385b881 Rework buffer memory layout
Move offset, size and stride to separate chunk structure that we
can keep in shared memory.
Add shared metadata type to hold the memory block holding the
metadata.
2016-12-15 14:57:34 +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
3dada4731c rename signal -> sig
Meson puts the directory of the source file in the include path and then
it picks up our signal.h instead of the system one...
2016-11-28 16:24:10 +01:00
David Svensson Fors
497febf2f1 node: check links list in get_free_port()
When searching for an unused port, look for an empty links list.
2016-11-28 15:46:09 +01:00
Wim Taymans
046c2b1cae remove last glib bits
Improve pinossink
2016-11-26 19:18:51 +01:00
Wim Taymans
ee67929a7c cleanups 2016-11-25 13:38:49 +01:00
Wim Taymans
1d61fd3696 Work on async cleanup
Track all async changes and only perform free of resources when all
previous async operations completed.
2016-11-25 13:06:23 +01:00
Wim Taymans
7ecfc28d0f use plain libdbus instead of GDBus 2016-11-24 18:17:29 +01:00
Wim Taymans
4e94743906 Use pinos loop for mainloop
Remove more glib stuff
2016-11-24 17:40:26 +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
efae64a759 Mainloop: use PinosLoop
Implement the main-loop with pinos_loop except for the parts that still
need to go through glib mainloop.
Start working on native protocol
2016-11-22 13:06:22 +01:00
Wim Taymans
e7cae649aa Use mapper to make object id
Reuse object ids by using a mapper
Simpify the uri struct a little.
2016-11-21 16:29:15 +01:00
Wim Taymans
f42268b9a5 loop: build loop with SPA interface 2016-11-21 15:55:30 +01:00
Wim Taymans
80deb6b387 node: remove unused code 2016-11-21 12:59:47 +01:00
Wim Taymans
3dcbf4b228 Move suspend on idle in module
Move suspend-on-idle code from the node to a module
Add some more SpaLoop API
2016-11-21 12:54:40 +01:00
Wim Taymans
d250ed42e6 Use global id in dbus name
This allows us to use the dbus name to connect again
2016-11-21 10:03:31 +01:00
David Svensson Fors
bc4893057b videotestsrc: add pattern property and snow pattern 2016-11-21 09:06:25 +01:00
David Svensson Fors
5c56fbdfc2 videotestsrc: add support for UYVY 2016-11-21 09:05:42 +01:00
David Svensson Fors
ddcbca3c4b video-raw: set default framerate to 25/1 2016-11-21 09:03:22 +01:00
Jonathan Karlsson
7c127f91a5 Pinos modules: Parse options with getopt
Make it possible to add options for modules in pinos.conf.in.
Only a few options for videotestsrc is supported at the moment.
2016-11-21 08:58:54 +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
0d2fa5ebc8 cleanups 2016-11-16 17:21:59 +01:00
Wim Taymans
dfbfb4c9ee Rework dbus handling
Remove the Daemon object and remove all dbus code from the main
objects. We can use the signals in a separate module to create and
destroy the DBus interfaces.
Move the dbus protocol in a module
Move the autolink policy to a module
2016-11-16 16:57:47 +01:00
Wim Taymans
b9e2b1c0e3 Remove glib from config loading 2016-11-16 09:43:51 +01:00
Wim Taymans
1a48bccca0 cleanups
Remove hastables, use lists
Remove obsolete ringbuffer
some small cleanups
2016-11-15 20:12:31 +01:00
Wim Taymans
b6ad45bb74 track client resources 2016-11-15 17:06:09 +01:00
Wim Taymans
0d21d633c9 WIP object model change
Work on cleanup
2016-11-15 13:29:58 +01:00
Wim Taymans
c25ccbb4ba WIP change object model 2016-11-14 12:42:00 +01:00
Wim Taymans
190f01d88e WIP
Change object model
2016-11-10 15:42:14 +01:00
Wim Taymans
d0f95fc323 Remove SpaQueue, use SpaList instead 2016-11-09 12:57:51 +01:00
Wim Taymans
89bc235924 Cleanups
Hide GDBus from RTKit API
Remove register node from dbus API
Add signal
Add object and register objects in the registry
Add some preregistered types to the registry
Let the daemon listen to the registry
2016-11-08 18:00:52 +01:00
Wim Taymans
e88a376d7c Optimize transport some more
We can optimize the transport some more if we allow the host to
configure the area used for transfering buffers. We can then also place
the current status in the area and avoid calling get_status(). We can
also allocate this area in shared memory, avoiding a memcpy in the
client-node.
2016-11-07 18:23:09 +01:00
Wim Taymans
b774b99db5 Rework transport protocol
Use a more simple tranport protocol for the realtime data. Use a piece
of shared memory and a socket where we use a 1byte read/write to trigger
remote actions. Also use a ringbuffer for events.
2016-11-07 10:24:13 +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
a1c0bef2ed node: fix pause 2016-10-28 17:24:03 +02: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
984375c0b2 ringbuffer: improve ringbuffer
Simplify the ringbuffer code by using ideas from the portaudio ringbuffer
implementation.
2016-10-25 15:43:01 +02:00
Wim Taymans
4148e0ff78 cleanups:
Keep lock while doing recycle_buffer
Pass context to main loop
Recycle WorkItems in a free list
Push and pull from the node data loop
Do async start/pause in alsa
Add alsa fds right after open.
2016-10-25 11:21:53 +02:00
Wim Taymans
73e6272488 node: keep separate array of links
Keep a separate array with the links that we only access and update from
the data-thread.
2016-10-24 18:01:04 +02:00
Wim Taymans
d3dd90bb05 simplify events and commands 2016-10-24 15:30:15 +02:00
Wim Taymans
0373f73bac Add invoke method to schedule executing in a main loop 2016-10-24 12:20:44 +02:00
Wim Taymans
1bd751372e Cleanups
Remove unused events, drained and marker can be done with
ASYNC_COMPLETED messages
Handle result of idle callback to disable the poll item
Identify poll items with a unique id.
Remove set_state vfunc
push_event -> send_command, commands are to do something, events are the
result of something.
Add poll item in v4l2 as soon as we have the fd but disable the item
until streaming starts.
2016-10-21 15:03:32 +02:00
Wim Taymans
9b2b4b9b5c cancel pending defers 2016-10-20 19:36:26 +02:00
Wim Taymans
8fac22afdb Work on main loop
Make a main-loop object with associated helper functions to handle async
methods.
rtloop -> data_loop
Handle async results a lot better.
Remove REMOVE_MEM command. We don't need it.
Handle stream memory updates better.
2016-10-20 16:36:29 +02:00
Wim Taymans
98dbb6424d Cleanups
spa_serialize -> pinos_serialize
Improve PinosPort, move links to the object and make it part of
PinosNode
Work on improving signals to react to changes in the graph
Error when a client-node becomes unlinked, like when removing a camera.
2016-10-19 17:18:30 +02:00
Wim Taymans
70fb53cdc6 SpaConnection -> PinosConnection 2016-10-18 18:19:04 +02:00