Commit graph

2580 commits

Author SHA1 Message Date
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