Commit graph

383 commits

Author SHA1 Message Date
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
Wim Taymans
7ee66cfc35 dynamically resize connection buffers 2016-10-18 11:11:38 +02:00
Wim Taymans
d711e15f0a Redo the control code
Make a simple connection object that you can use to send and receive our
commands.
2016-10-17 18:29:05 +02:00
Wim Taymans
d8903b708d Reorganize serialization code a bit
Move the proxy plugin to the client-node
Move serialization code to pinos because its specific to pinos
Move some functions to the .h files
Make the mapper dynamic
2016-10-17 12:23:53 +02:00
Wim Taymans
8520246a1b silence debug 2016-10-14 19:30:43 +02:00
Wim Taymans
184e0a300a make separate sockets for data and control 2016-10-14 19:23:05 +02:00
Wim Taymans
ee202e13e9 Beginnings of dbus based control 2016-10-14 16:46:09 +02:00
Wim Taymans
becae3e7fa use dictionary for extra port info 2016-10-14 10:42:02 +02:00
Wim Taymans
d79489b29b use a dict for extra property info
A dictionary is probably more extensible
2016-10-14 10:32:11 +02:00
Wim Taymans
523868d6bd Remove description
Documentation should go somewhere else
2016-10-13 19:25:49 +02:00
Wim Taymans
672e5d8fa6 improve asserts 2016-10-12 17:38:02 +02:00
Wim Taymans
82414810e8 avoid deref
We can avoid a deref when we use container_of to get from the interface
to the handle.
2016-10-12 17:27:29 +02:00
Wim Taymans
6b3bb79e70 small cleanups
Remove ringbuffer code and use inline in the .h file
Add some more port status flags
Improve inspect output
2016-10-12 15:41:39 +02:00