Commit graph

12612 commits

Author SHA1 Message Date
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
Wim Taymans b885d40390 Introduce the concept of a Node
Make an object for a processing node.
Implement a sink node. Make it possible to implement Sink and Source
interfaces to provide input/output from the node.
Improve pinosdepay to track fds and handle format changes.
2016-05-05 13:31:18 +02:00
Wim Taymans 7597e48e02 source-output -> channel
Rename the source-output object to channel because it is used for both
input and output.
Start the beginnings of sink support. This will make it possible to make
pinos consume data as well as provide data.
2016-05-03 18:00:56 +02:00
Wim Taymans 76afc1e330 pinossink: clear the cache
Now that we don't destroy the cache anymore when suspending, we need to
manually clear the buffers in the cache.
2016-04-29 17:16:41 +02:00
Wim Taymans 5c7447fb4d gst-source: fix state changes
Only go to READY in setup_pipeline, this is enough to get the caps. We
don't want to go to PAUSED yet because we don't want to negotiate a
format.
Mark the source busy after we configured the capsfilter so that we can
let the source negotiate correctly.
2016-04-29 16:51:56 +02:00
Wim Taymans b86eb22922 pinossrc: fix timestamp and clock handling
Send the base-time to the client so that it can calibrarte the clock.
Wait until we are completely negotiated before completing the state
change to paused. This makes it possible to provide a clock and decide
if we are live or not.
2016-04-28 16:42:25 +02:00
Wim Taymans f3053c963d source: send latency to client
Send the latency to the client and use this to configure the pinossrc
element latency correctly.
2016-04-28 11:18:10 +02:00
Wim Taymans 1c16fd5533 socketsink: track buffers with the fdmanager 2016-04-27 16:05:02 +02:00
Wim Taymans 45c5e4c47f burstcache: add error quark 2016-04-27 12:16:15 +02:00
Wim Taymans c8f34750e2 pinossocketsink: add new socket sink
Add a new sink that replaces the pinospay ! multisocketsink element
pair. This would allow us to track the fds per client more closely.
2016-04-27 12:05:45 +02:00
Wim Taymans d5e333ac4b add refresh message
Add a new refresh message to request a keyframe from the pinos server.
pinospay: pass the refresh-request message upstream
pinossink: turn refresh-request messages into events
pinossrc: turn a keyframe event into a refresh-request message
2016-04-13 13:04:32 +02:00