Commit graph

12535 commits

Author SHA1 Message Date
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
Wim Taymans 833168c3cf fdmanager: decrement object refcount correctly
The object needs to be decremented each time a client releases it.
2016-04-13 13:01:33 +02:00
Wim Taymans a25bdf8acb pinossrc: use a queue for the buffers
Use a queue to keep the buffers around and pass them to the streaming
thread.
2016-04-12 17:05:51 +02:00
Wim Taymans c6079cf7d2 gst-source: avoid some memory leaks 2016-04-12 11:58:33 +02:00
Wim Taymans 108a42c6b3 add more docs 2016-04-12 08:55:20 +02:00
Wim Taymans 45976ffeda update DBus object with current format
Detect a format change in the payloader and post an element message.
Catch the format change element message in the client-source and use it
to update the format and possible formats in the source and source-outputs.
2016-04-11 16:06:54 +02:00
Wim Taymans 44f2c3602d add more debug statements 2016-04-11 15:26:15 +02:00
Wim Taymans d68d41b5b0 pinospay: ref payloader
Ref the payloader to make sure it does not disappear when releasing the
fds.
2016-04-11 15:24:41 +02:00
Wim Taymans ae5d26e049 fdmanager: add global object manager
Add a global object that can be used to track outstanding fds for a
client. This can later also be used to limit the number of fds per
client.
Use this in the payloader to track fds. This makes it possible to track
the fds even when the client reconnects.
Set the client patch on the socket so that we can use it to track the
fds we sent to this client.
When the client disappears, release all outstanding fds.
2016-04-08 16:50:01 +02:00
Wim Taymans 29e664ee21 more leak fixes 2016-04-07 17:40:18 +02:00
Wim Taymans 6b19e7a2d8 fix various leaks 2016-04-07 17:28:46 +02:00
Wim Taymans bc73610dd0 pinossrc: don't send empty buffers 2016-04-07 12:14:16 +02:00
Wim Taymans 4149e34e67 monitor: put marks on all properties 2016-04-07 11:51:05 +02:00
Wim Taymans 2af64edd29 pinossink: send format change messages
Rework stream connect/disconnect from start/stop
Start the stream in setcaps when the format is known.
When the stream is already started in setcaps, send a format_change
message instead.
2016-04-07 11:39:52 +02:00
Wim Taymans 4121c421aa pinossrc: handle format change messages 2016-04-07 11:39:33 +02:00
Wim Taymans ccb93c9652 stream: handle against zero length payload
Don't send empty payloads in pinospay
2016-04-07 11:38:00 +02:00
Wim Taymans 2d392c7410 buffer: construct and parse format change messages 2016-04-07 11:37:21 +02:00
Wim Taymans e408c5a9a5 buffer: fix header pointer after buffer realloc 2016-04-07 11:36:04 +02:00
Wim Taymans 50228dddf8 pinossink: stop and disconnect the old stream when renegotiating
When we get a new format, stop, disconnect and unref the old stream.
In the future we should try to send a format change on the existing stream.
2016-04-06 21:05:44 +02:00
Wim Taymans 563f2a2726 client: Fix unref of source and source-input
Make sure we unref the source-input when it is removed.
When the source-input is removed, we should also unref the source. Do
this by adding the source as data for the source-input and unreffing it
when the source-input is freed.
2016-04-06 21:03:00 +02:00
Wim Taymans 3ad403ab13 stream: don't g_free a GBytes 2016-04-06 21:02:08 +02:00
Wim Taymans f67ddb7c7e stream: ref stream in _stop and _start 2016-04-06 21:01:29 +02:00
Ognyan Tonchev 00aed12909 pinospay: don't do logic in g_assert
We still want to code to execute when asserts are disabled.
2016-03-09 10:49:22 +01:00
Ognyan Tonchev b3d07070f5 buffer: avoid alignment problems
Use memcpy do avoid alignment problems.
2016-03-09 10:48:32 +01:00
Wim Taymans 068032e1dd pinos-monitor: Improve output of removed objects
Don't print NULL properties or formats
Don't print property values for removed objects because they are all
invalid anyway.
2016-02-01 16:29:56 +01:00
Wim Taymans cdb2028f9b src -> pinos and fix include paths
Rename src to pinos and fix all the include paths so that they contain
pinos/ to avoid conflicts
2016-02-01 15:40:48 +01:00
Wim Taymans f4bd013dce pkgconfig: fix include dir 2016-01-13 10:37:53 +01:00
Wim Taymans b0cfa86c18 pinos-monitor: improve output
Always print all properties but mark the changed properties with a *
2016-01-07 15:27:35 +01:00