Commit graph

20 commits

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