Commit graph

7922 commits

Author SHA1 Message Date
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
David Svensson Fors b85420ddb4 port: show peers on D-Bus 2016-06-02 11:20:30 +02:00
David Svensson Fors 888353bb9d gst-source: expose properties in node 2016-06-02 11:19:20 +02:00
Wim Taymans 1c184b7dfd clean up debug info 2016-06-02 10:37:37 +02:00
Linus Svensson 9f63e16fd6 Ignore generated files 2016-05-26 13:27:28 +02:00
Linus Svensson 072e8b90f2 Make make distcheck to work properly
make distcheck now passes.
2016-05-26 13:27:21 +02:00
Linus Svensson a4ecfca176 pinos/Makefile.am: Possible to run configure outside srcdir
Make it possible to run configure outside of srcdir.
2016-05-26 13:27:01 +02:00
Linus Svensson 9a6c52737a pinos/modules/gst/gst-manager: Don't pass around NULL
gst_device_monitor_get_providers() will return NULL in case there are
no available providers.
2016-05-26 13:26:38 +02:00
David Svensson Fors 5ae6da69e6 test-client: don't unref format in on_state_notify
possible_formats is transfer full for pinos_stream_connect().
2016-05-26 13:26:19 +02:00
Wim Taymans 9e87ef0a67 remove obsolete pinosprovide element
This is not folded into the pinossink
2016-05-26 13:25:34 +02:00
Wim Taymans 323b0c55f2 Fix upload mode
Add autoconnect property to the ports
Remove the upload-node, clients that want to upload media just create a
node with an (unconnected) output port. Other clients can then connect
to this new output port.
Copy formats on newly linked ports.
2016-05-26 12:25:07 +02:00
Wim Taymans 6108487d4e buffer: add next pointer
Add next pointer to easily make linked lists
2016-05-24 20:40:04 +02:00
Wim Taymans 89f8f41045 remove READY state on context
Now that we don't need to register anymore to the daemon we can just
remove this state.
2016-05-19 11:29:11 +02:00
Wim Taymans 5f10a933a1 remove client object
Remove the client object, it is not very useful now that we have the
nodes.
Fix some properties on the proxy objects.
Use sendmsg and recvmsg directly because the GIO ones do allocations.
make pinos_properties_merge and use it to combine properties from nodes
and ports.
2016-05-18 17:22:34 +02:00
Wim Taymans 60475165d6 improve debug 2016-05-18 12:01:57 +02:00
Wim Taymans 0f67434ae8 buffer: improve memory management
Add refcounting to buffers.
Use static memory on ports for buffer input and output memory.
Improve negotiation, let format and properties be negotiated on ports as
the data passes.
Improve some debug info.
2016-05-17 20:14:06 +02:00
Wim Taymans 4a5ed1e1f5 Rework how clients connect.
Add buffer flags. The idea is to make it possible to easily check when a
buffer contains control information that we need to parse to update the
port fields.
Make the client create remote nodes and ports and set up proxies for
them.
Make a port base class implementing most of the logic to pass buffers
locally and remotely.
Remove most code from stream.c, it's now in the port.
Make a portsink and portsrc that can write and read to/from any port. We
use these in the server to send and receive data.
Rework format negotiation. The final format is now sent in-line before
the data. The server will select a format on output ports.
2016-05-17 09:38:30 +02:00
Wim Taymans e85c3002f7 add missing files 2016-05-12 17:06:48 +02:00
Wim Taymans 8407430891 rework: make client and server nodes
work on making nodes and ports on the client.
2016-05-12 17:03:28 +02:00
Wim Taymans c67d3d7f04 buffer: allow building into custom memory
Make it possible to pass custom memory to the builder so that it can
construct packets directly into specified memory and avoid allocs.
Remove GError and GSocketControlMessage in the buffer API to make it
possible to use other (rt-safe) API later.
2016-05-09 18:48:18 +02:00
Wim Taymans 91385a782e Remove vfunc from port
Update docs
Remove virtual functions from port, we don't want this to be changed.
2016-05-09 12:16:04 +02:00
Wim Taymans 20c50772fa Add provide mode to pinossink
Add a mode to provide a stream to pinossink
Small improvements, leak fixes.
2016-05-06 17:54:23 +02:00
Wim Taymans ba4ef9b5d9 Introduce the concept of a Port
A port is an input or output on a Node.
Channels are created from the ports and inherit the direction of the
port.
do automatic port selection based on the direction and caps and
node/port name.
Simplify stream_connect by passing the direction.
Fix pinossink to connect in setcaps so that we know the format and can
select a good sink to connect to.
2016-05-06 13:01:52 +02:00