Commit graph

14344 commits

Author SHA1 Message Date
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
7cfd1eb8ee remove old files 2016-07-28 21:30:15 +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
b795fb851f stream: work on stream upload 2016-07-25 15:55:56 +02:00
Wim Taymans
f06b991a5a port to new API 2016-07-25 12:28:21 +02:00
Wim Taymans
fcc9639479 fix modules 2016-07-25 10:50:46 +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
17ef36c9c1 update modules 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
Wim Taymans
b8f6e99537 Add plugin API
Add plugin api, define a factory and methods for introspecting
interfaces.
2016-07-25 10:47:22 +02:00
Wim Taymans
6377b9bd12 event: add PULL_INPUT event
Rename some events, add an explicit event to pull input
2016-07-25 10:47:22 +02:00
Wim Taymans
e56f120559 add some docs 2016-07-25 10:47:22 +02:00
Wim Taymans
82420e483d cleanups: doc updates 2016-07-25 10:47:22 +02:00
Wim Taymans
613216613e remove some printf, add some more debug 2016-07-25 10:47:22 +02:00
Wim Taymans
4b2520d173 Split out header files
Use separate header files
Add pull-based alsasink
Add audiotestsrc
Implement negotiation and scheduling of audiotestsrc ! alsasink
2016-07-25 10:47:22 +02:00
Wim Taymans
03046301bf spi: implement processing
Implement processing with writing to provided buffer or in-place
Fix types.
Add more PortInfo flags
Remove release-id, we now use a callback, which is more practical and
still allows deallocation out of the rt-threads if needed as well as
recycling the buffers into an atomic pool
Add more comments
Allow NULL in set_params to reset params
2016-07-25 10:47:22 +02:00
Wim Taymans
b44d2d86b6 pinos: add new plugin API
Experiment with new plugin API that is designed for speed, minimal
allocations and locking, for use with real-time scheduling.
2016-07-25 10:47:22 +02:00
Wim Taymans
d374f50d28 channel: remove the channel
Remove the channel, the functionality is now in the client-node.
2016-07-25 10:46:29 +02:00
Wim Taymans
907bd7bfd7 add client-node again
Add a client node again that uses the channel protocol but looks like
a node in the graph.
2016-07-22 17:17:44 +02:00
Wim Taymans
86afa66206 remove unused methods 2016-07-21 20:03:50 +02:00
Wim Taymans
af3de36416 work on stream negotiation and start
Add more buffer types to add and remove memory shared memory between the
server and client. We would like to send buffers only once and then
simply reference them by index.
Do format negotiation and stream start with a START message.
2016-07-21 18:38:24 +02:00
Wim Taymans
31041a4e16 node: update state in the skeleton 2016-07-20 18:04:34 +02:00
Wim Taymans
f7d02c8d77 client: add client object instrospection 2016-07-20 17:55:02 +02:00
Wim Taymans
e167d30296 reintroduce channels
Bring back the channel object. Making a node and port on the client side
was rather awkward because of the async nature of many methods. It feels
better to have a specific communication channel object to interface with
a server side port.
Use port activate/deactivate to start/stop streams
Remove links from the ports. We let other objects install a callback on
the port to receive and route buffers.
2016-07-20 17:29:34 +02:00
Wim Taymans
eefe6aacb9 some more rework 2016-07-18 17:40:58 +02:00
Wim Taymans
ca4f3d84cd node: add support for multiple input and output ports
Make it possible to have a mixer/spliter and converter for the gstreamer
sources and sinks.
Add logic to make a new input/output port when the existing ports are
not of the required format.
2016-07-05 12:24:51 +02:00
Wim Taymans
e7e141a31d port: Implement max-peers property
Make a property to limit the number of peers on a port. By default we can
link an output port multiple times (with the same format) but we can only
link to an input port once (else we would have to do mixing).
Use a pointer array to keep track of peers
2016-06-30 11:10:55 +02:00
Wim Taymans
830197f8e6 node: fix docs 2016-06-29 17:51:00 +02:00
Wim Taymans
2838accda0 client-node: initialize socket 2016-06-29 17:50:25 +02:00
David Svensson Fors
00ff707208 gst-node-factory: node factory for GstSource nodes
The GstNodeFactory creates GstSource nodes without ports. When an
output port is created later, the proper GStreamer element will be
created in the node.

main.c registers a GstNodeFactory in the daemon, so clients can use it
in calls to CreateNode and CreatePort.
2016-06-28 12:29:42 +02:00
David Svensson Fors
649882f42a gst-source: on-demand element creation
Add to GstSource the possibility to create the GStreamer element
when an output port is created, and not directly when the node is
created.

The element is chosen based on the requested format, using
GStreamer typefind as in the GstAutoDetect class.
2016-06-28 12:29:36 +02:00
David Svensson Fors
c70e24c51c daemon: use node factories for creating nodes 2016-06-28 12:29:31 +02:00
David Svensson Fors
90dbf50042 node-factory: a class for creating nodes 2016-06-28 12:29:23 +02:00
David Svensson Fors
6fcd0985a3 pinos-monitor: show peer ports 2016-06-28 12:29:12 +02:00
David Svensson Fors
e8116fa68d main, gst-manager, pinos-monitor: plug leaks 2016-06-28 12:28:53 +02:00
David Svensson Fors
c9aaf71dc3 stream: merge properties of peer node
This gives the stream access to pinos.clock properties, which are
needed in the client for handling buffer timestamps correctly.
2016-06-02 11:23:41 +02:00