Commit graph

5250 commits

Author SHA1 Message Date
Wim Taymans
7aa79a2a0d Add audiotestsrc
Work on idle poll
Move node state to the node interface so that we can actually get it in
the sync case.
Add enabled field to the poll event
Work on audiotestsrc
2016-09-05 16:23:40 +02:00
Wim Taymans
7d3e46e7f9 Remove port
Remove the port object. We don't use it as a dbus object and we don't
need it, we can use the link and node object directy.
Move poll code and event handler to the node.
2016-09-02 19:51:23 +02:00
Wim Taymans
463954a299 cleanups
Remove some unused things.
Work on shutdown.
2016-09-01 10:04:25 +02:00
Wim Taymans
9485bd77e7 Remove direction
Direction is tied to the port id.
Handle nodes with fixed ports.
2016-08-29 18:31:53 +02:00
Linus Svensson
7d8e2d53f7 daemon-conf: Add conf file parsing
Support to parse configuration files. By default, the default conf file
is parsed ({sysconfdir}/pinos/pinos.conf), but that can be changed with
an environment variable (PINOS_CONFIG_FILE). The file can contain
commands and assignments (no assignment supported this far).

Support for command module-load is added.
2016-08-29 18:31:08 +02:00
Wim Taymans
4cf6860752 cleanups
Remove old files
Use set/unset macros to change properties
2016-08-29 10:54:43 +02:00
Wim Taymans
80ed927885 props: improve unset mask
Add support for more than 32 properties
2016-08-29 10:44:41 +02:00
David Svensson Fors
c8830adaa3 v4l2-utils: invert frame interval to get framerate 2016-08-29 10:22:53 +02:00
Wim Taymans
a3e75a1de3 fix compiler errors 2016-08-29 10:18:51 +02:00
Wim Taymans
ee17176faf improve format support 2016-08-26 20:26:34 +02:00
Wim Taymans
a973007a49 Fix up audio formats as well 2016-08-26 19:22:50 +02:00
Wim Taymans
b67c216a04 Make new USE_BUFFERS command
Make a new USE_BUFFERS command to atomically send a buffer array to the
remote client. We can use this to then clean up an old array and go to
the PAUSED state if possible.
Work on formats. Make one structure that can hold all video formats.
Work on pipeline suspend and resume.
Add jpeg support to v4l2.
Work on enum_formats with a filter in v4l2.
2016-08-26 17:43:48 +02:00
Wim Taymans
7e858ff694 Improve state handling
Improve the state handling in v4l2
Send buffers in one message
Update design doc
2016-08-25 17:07:40 +02:00
Wim Taymans
fbd6304663 Cleanups
Remove old code
Only depend on GStreamer for the plugins
Rename STOP to PAUSE because that's what it really does
Start working on format_fixate.
Remove default property value from props
Fix framerate
2016-08-25 14:10:38 +02:00
Wim Taymans
da5fb808e7 fix the formats 2016-08-24 17:37:13 +02:00
Wim Taymans
ca7d08c406 Work on sink
Remove _remove from properties, we can do the same with set of a NULL
value.
Add signals to the stream API to manage the buffers. Wrap those buffers
in a GstBuffer in the pinossrc and pinossink elements and pool them in a
bufferpool.
Remove SPA_EVENT_TYPE_PULL_INPUT, we can do the same with NEED_INPUT and
by using a ringbuffer.
Do more complete allocation of buffers in the link. Use the buffer
allocator if none of the nodes can allocate.
Follow the node state to trigger negotiation and allocation.
Remove offset and size when refering to buffers, we want to always deal
with the complete buffer and use a ringbuffer for ranges or change the
offset/size in the buffer data when needed.
Serialize port_info structures as part of the port_update
Print both the enum number and the name when debuging properties or
formats.
2016-08-24 16:38:51 +02:00
Wim Taymans
a03352353f work on sink 2016-08-18 12:43:25 +02:00
Wim Taymans
bdbddaf75b improve introspection
Small cleanups
2016-08-18 12:17:31 +02:00
Wim Taymans
ab0537305f handle set_format with existing format
If one calls set-format with the current format, we return success
Remove some unused utils now
Work on cleanup of buffers
2016-08-11 11:20:12 +02:00
Wim Taymans
55c3262a6a add node-update support 2016-08-09 16:58:41 +02:00
Wim Taymans
45ee7b4490 remove more unused stuff 2016-08-09 16:46:59 +02:00
Wim Taymans
ad71c82159 remove hardcoded negotiation
Remove the hardcoded negotiation and replace by filtering accepted and
possible formats. Not quite correct yet because v4l2 doesn't actually do
filtering yet.
2016-08-09 15:53:12 +02:00
Wim Taymans
837c23a370 format: implement more gstreamer -> pinos format 2016-08-09 14:35:44 +02:00
Wim Taymans
0d2f5a1386 work on port-update control message
Serialize format and properties.
Simplify the properties by moving the unset-mask inside the property
structure. We can then also just use the index of the property as the
bit in the mask.
Work on stopping on disconnect
2016-08-08 22:10:57 +02:00
Wim Taymans
de53315f6e Work on node creation
Implements the basics of the PORT_UPDATE control message
Add the ports to the proxy node with whe PORT_UPDATE control message.
Let the proxy node check the events and create dbus objects based on
added/removed ports.
2016-08-05 19:46:37 +02:00
Wim Taymans
ac5d22ec79 Work on negotiation
Add helpers to convert between pinos and gstreamer formats.
Use pinos formats in the API.
Work on removing some hardcoded stuff and instead use the real format
from the pinos server.
Use memfd and sealing.
2016-08-05 16:39:26 +02:00
Wim Taymans
dd1fbef28f work on memory references
Add a memory reference helper struct that we can use to track the memory
in buffers and formats.
Remove custom property get and set, the default ones will work fine.
Custom ones are problematic when we want to serialize properties in
formats etc.
Deserialized Formats are now tracked in the memory pool and can be freed
if needed.
2016-08-04 19:24:16 +02:00
Wim Taymans
8f9222bf9e implement set_format
Serialize the formats
Use SpaMemoryRef where we can
Add more debug
2016-08-04 17:33:49 +02:00
Wim Taymans
98679cbd53 make test app work again
Some cleanups and removal of unused code
2016-08-03 22:11:03 +02:00
Wim Taymans
1169c2419b Make buffer data point to memory blocks
Make buffer data point to a registered memory block by its mem_id.
Add some more helpers to allocate memfd backed memory.
Allocate buffers in memfd so that we easily share them between client
and server.
Update pts and seq in v4l2 now that this change will actually be visible
at the client.
2016-08-03 21:33:57 +02:00
Wim Taymans
98993c680b Make buffer structure sharable
Use stucture offsets instead of pointers so that we can share the buffer
structure between client and server.
We can then pass an fd wrapping the memory of the buffer to the client.
Add beginnings of a memory pool
2016-08-03 15:59:17 +02:00
Wim Taymans
3ace7e9648 More work on implementing remote protocol
Rework things so that we negotiate buffer pools beforehand and only pass
buffer ids around We can then remove the refcount of buffers, events and
commands.
More work on buffer reuse
Use the node state changes to trigger the next step in the configuration
sequence.
Move most of the client-node to a plugin
Do buffer allocation in the port link.
2016-08-02 16:34:44 +02:00
Wim Taymans
05829f33e6 Work on memory allocation
We now only allow per port preallocated buffers. We exchange the index
into the array instead of passing the buffers around. We still use the
refcount to track when a buffer can be reused.
Improve API a little, allow passing the node as the first argument of
the interface call.
Implement alloc_buffer in v4l2 and improve the test.
2016-07-30 20:35:34 +02:00
Wim Taymans
4cb90f3b86 Rework transport protocol
Remove the old PinosBuffer object and replace it with SpaControl, this
communication protocol is designed to make it possible to implement
remote nodes and so it is moved to Spa.
Move SpaBuffer into to API
Work on easier API to make formats, implement enumeration and support
for all formats in v4l2.
Improve format output in -inspect
2016-07-28 21:19:20 +02:00
Wim Taymans
96df59274c Add flags to set_format
Use flags to control the behaviour of set_format
Move poll into separate file
2016-07-25 10:50:46 +02:00
Wim Taymans
b9320c67c2 inspect: improve output
Keep state variable to enumerate things. This allows us to remove the
expectation that the same index will give the same item.
Use a new rectangle type for video size. When enumerating sizes, this
allows us to specify relations between width and height more easily.
Remove the struct and bytes type, they are like pointer.
Add filter to enum_formats to speed up enumerations.
2016-07-25 10:50:46 +02:00
Wim Taymans
77bc2a1793 v4l2: work on format enumeration
Start work on format enumeration
fix fd leak in v4l2-source
Improve spa-inspect output
2016-07-25 10:50:46 +02:00
Wim Taymans
61caf0e19c buffer: add ptr_type to the data
We can give more info about the memory or fd that way and we can also
pass other structures as data later if we need to.
2016-07-25 10:50:46 +02:00
Wim Taymans
16d2a3a69c v4l2: add support for DMABUF
Export dmafd on buffers and use those directly to send to the client.
Do some v4l2 cleanup.
2016-07-25 10:50:46 +02:00
Wim Taymans
6ab8af91e0 More hacking
Add spa based v4l2 pinos module
Add allocation params to port_alloc_buffers
Let the app do allocation for handles.
2016-07-25 10:50:46 +02:00
Wim Taymans
4c7cee6b28 improve buffer import
Add generic pointer metadata type that is copied on import
Pass array of pointers to SpaBuffers in use_buffers.
Make sure we use the same data and metadata as the imported buffer.
2016-07-25 10:50:05 +02:00
Wim Taymans
c5a31acf8c v4l2: add support for buffer import
Add support for buffer import
Rename some methods
2016-07-25 10:50:05 +02:00
Wim Taymans
5fa334a89b poll: remove threads from alsa-sink
Remove the thread from alsa sink and use the pollfd event.
Make it possible to pass multiple fds in one pollfd event
Add 3 callbacks to the pollfd event and add support for timeouts
2016-07-25 10:50:05 +02:00
Wim Taymans
ac59fa9371 test: pass device as parameter 2016-07-25 10:50:05 +02:00
Wim Taymans
81bde64550 v4l2: remove poll and send event instead
Don't start a thread for polling in the node itself but let this be
handled by the app.
2016-07-25 10:50:05 +02:00
Wim Taymans
cbde76f500 v4l2: show v4l captured output in SDL window 2016-07-25 10:50:05 +02:00
Wim Taymans
a31eb56663 More hacking
Add beginnings of Xv plugin
Add Poll event
Clean up props handling
V4l2 add beginnings of poll event
2016-07-25 10:50:05 +02:00
Wim Taymans
a1a27328e2 v4l2: continue work on the capture device
Remove activate and deactivate commands.
Add STEP property range type for v4l2 frame sizes later
v4l2: implement negotiation and data capture
2016-07-25 10:50:05 +02:00
Wim Taymans
beedb65f00 video: add video format
start working on v4l2 source
2016-07-25 10:50:05 +02:00
Wim Taymans
3c029cba53 more hacking
Move plugin API to separate directory for now
Add ringbuffer and way to get ringbuffer from a port
2016-07-25 10:50:05 +02:00