Commit graph

243 commits

Author SHA1 Message Date
Wim Taymans
97de0de0b7 Move transport to client-node extension 2017-08-07 10:25:02 +02:00
Wim Taymans
0602d76b9e Cleanups
Only pass data to callbacks.
Rename some structs
Provide methods to access structs
2017-08-06 06:42:26 +02:00
Wim Taymans
1b79419554 cleanups
Remove signals.
Rename callbacks -> events, use listeners to listen for events.
Callbacks are still used in spa for things you can listen to only
once.
2017-08-04 16:49:13 +02:00
Wim Taymans
b898eb46cd Make structure private
Make structs private. Expose methods for things we need.
Signals only work on exposed structures so make a new callback helper to
signal events.
2017-08-04 10:18:54 +02:00
Wim Taymans
e24c934a1b protocol-native: improve demarshal
Add flags to demarshal functions and check remap and write access
in just one place.
2017-08-01 20:11:38 +02:00
Wim Taymans
4f08dbcd24 Use more fine grained access control
Make it possible to add more permissions to an object than just visible
or not. Pass these permissions to the client. This way we can make a
difference between being able to see and read, modify or query an
object. More permissions can be added later when needed. Because the
permissions is set on the resource by the access control module, the
implementations can check if the right permission is set before doing
anything.
2017-08-01 17:09:57 +02:00
Wim Taymans
c59bc457d4 Improve pull on client-node
When we pull from the client-node, use any previously queued buffers.
2017-08-01 12:26:25 +02:00
Wim Taymans
9831786eb7 Work on improved scheduling or remote nodes 2017-07-28 14:28:20 +01:00
Wim Taymans
3d9f28c676 Use remote to join nodes on remote graphs
Make a new method that can take a local node and run it in a remote
pipeline. This basically replaces all functionality of the streams
and more.
Add 2 examples for exporting a sink and a v4l2 node
Make some more things const
Cleanups
Make it possible to do things when the node needs scheduling. The
default node will schedule the local pipeline but the remote node might
also schedule the remote pipeline.
2017-07-25 19:52:31 +02:00
Wim Taymans
589e3d977c module: fix registration of modules
Don't fail when protocol-native is already registered.
2017-07-19 12:44:10 +02:00
Wim Taymans
91d54364fc loop: add signal count to callback
Don't try to signal too many times
2017-07-19 10:44:03 +02:00
Wim Taymans
aff9564518 remote: make protocol configurable 2017-07-18 16:24:51 +02:00
Wim Taymans
629f824b91 pipewiresrc: improve remote connection errors 2017-07-18 15:28:14 +02:00
Wim Taymans
a003d1a39f Add parent_id
Add parent_id to globals to make hierarchy of interfaces. We can use
this to group interfaces or to describe the owner.
2017-07-18 14:58:14 +02:00
Wim Taymans
1acba78234 API cleanups
Fix docs
Add some more versions to interfaces
Make types for the various proxy object + inline methods that does type
checking and create proxys etc.
Set owner client of client-nodes in the properties
Pass type to bind to in create-node
Don't place global id in the info structs
Improve registration of marshal functions
Pass more types around as ids
2017-07-18 10:06:40 +02:00
Wim Taymans
465f12241e Implement protocol extensions
Add hooks that contain protocol specific interfaces that can be used
to extend the protocol. This makes it possible to add new interfaces
to the protocol and implement the protocol specific data transport.
Move these protocol specific extension to the extensions directory.
2017-07-12 18:04:00 +02:00
Wim Taymans
267547c884 memory leak fixes 2017-07-11 20:54:10 +02:00
Wim Taymans
83b4eaca53 Pass some more properties around
Only start listener when core is a daemon.
2017-07-11 20:38:48 +02:00
Wim Taymans
4f9d631910 Add version to more methods 2017-07-11 19:50:26 +02:00
Wim Taymans
f7e9e0c33a pass the global type as an id instead of string 2017-07-11 18:41:22 +02:00
Wim Taymans
d1655196c3 move things around 2017-07-11 16:08:22 +02: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
b0cfa86c18 pinos-monitor: improve output
Always print all properties but mark the changed properties with a *
2016-01-07 15:27:35 +01:00
Wim Taymans
050b8b0300 pinossrc: implement unlock/unlock_stop
Implement unlock and unlock_stop to unblock the create method.
2016-01-07 15:07:15 +01:00
Wim Taymans
531fd1beca introspect: fix docs 2016-01-07 13:08:58 +01:00
Wim Taymans
0a60cccf6d introspect: improve introspection API
Add GAsyncReadyCallback to the introspection API. This makes it possible
to report errors in the future. Don't pass NULL in the callback anymore
now that we have the Ready callback. We also don't need to have a return
value from the callback because now we can cancel any iteration by using
the GCancelable.
Make pinos_context_info_finish() to get the final result/error of
introspection.
Update tools for new API
2016-01-07 12:15:57 +01:00
Wim Taymans
0b7393affe gst: enable new properties on gst elements
Enable properties to handle release-fd messages
2015-12-10 13:00:54 +01:00
Wim Taymans
ae098db0bb gstpinos: detect tmpfile memory
Check if we got tmpfile memory and if we do, don't bother waiting for
the release-fd message but unref the memory directly. We know the memory
is allocated from our allocator and that we won't reuse it.
2015-12-10 10:00:30 +01:00
Wim Taymans
8a7d5a7f80 gstpinos: add stream-properties
Add a property to set the stream properties in the source and sink
streams.
2015-12-09 13:27:43 +01:00
Wim Taymans
c3fce0103b stream: remember the source path 2015-12-09 11:23:14 +01:00
Wim Taymans
c875141e69 gst-source: handle state change errors better 2015-12-09 11:19:07 +01:00
Wim Taymans
7aa3032710 gstpinos: pass client_name to stream_new 2015-12-09 09:41:01 +01:00
Wim Taymans
16946dc81c buffer: fix g_return return values 2015-12-09 09:37:50 +01:00
Wim Taymans
f82f6ce5e0 pinossink: suggest an allocator
Suggest and allocator upstream so that we might avoid doing a copy into
a tmpfile.
2015-12-04 16:38:20 +01:00
Wim Taymans
a25bf11c1c pinospay: error if downstream doesn't handle control-messages
We really need a downstream element that can handle the control-messages
or else we'll be losing the data.
2015-12-04 12:48:03 +01:00
Wim Taymans
f51307f8f8 pinospay: rename events
Rename the network message. We want the same event name for the
message we received and the one we send.
2015-12-04 12:46:36 +01:00
Wim Taymans
b6f10f508d pinossink: track the fd indices we sent
Track the fd indices we sent to Pinos and free the associated buffer
when Pinos sends us release-fd. Only do this for non tempfile fds, as we
made the tmpfile ones ourselves and we're not going to reuse them.
2015-12-03 15:59:27 +01:00
Wim Taymans
4322ddaf0f pinospay: Also handle plain pinos input
Handle application/x-pinos specially; track all the fd indices in the
buffers and send a release-fd message when the buffer is freed.
We can then use the payloader also in the client-source to handle the
release-fd messages correctly.
2015-12-03 15:55:45 +01:00
Wim Taymans
a3a0a45d0b pinossrc: handle NULL clock type 2015-12-03 15:49:15 +01:00
Wim Taymans
d81cbb2d93 client-source: fix caps handling
The caps we stream between the src and sink are always
application/x-pinos. Keep the negotiated format ouside of the
capsfilter in a separate variable. We can then also avoid a query
to get the format.
2015-12-03 15:47:53 +01:00
Wim Taymans
1e5c892564 stream: always listen from messages from pinos
Always listen for messages from Pinos, even when we are sending a stream
because we want to get the release-fd messages.
2015-12-03 15:46:05 +01:00
Wim Taymans
6864ea9830 pinospay: keep buffers around until released
If we are using the original buffer fd without copying it into a temp
file we need to make sure the memory stays alive and is not reused until
all clients are done with it.

To do this, track what fd ids are in the outgoing buffers and ref the
original buffer. We also need to know when a message is sent to a client
and when that client does a release-fd on the fd index. This is done
with some new events on the multisocketsink.

Every time a message is sent to a client we hash the fd index in it and
ref the buffer in a per-client hash table (on the socket). Every time we
receive release-fd we remove the fd index from the hash and unref the
buffer again.

Clients that are killed get their socket removed, which also cleans up
the hashtable and frees the memory again.
2015-12-02 21:03:53 +01:00
Wim Taymans
7aa82d9476 pinossrc: slave a clock to the server clock
Slave our clock to the server clock and provide it as the pipeline
clock.
2015-12-02 20:43:37 +01:00
Wim Taymans
6b93b17298 source: don't leak sockets 2015-12-02 20:42:45 +01:00
Wim Taymans
dd9721ee46 reset stream-state
Reset stream_state to unconnected when we remove the stream.
2015-09-30 12:59:42 +02:00
Wim Taymans
dbeee31c89 Track stream state
Keep track of the stream state better
2015-09-30 10:51:38 +02:00
Wim Taymans
205a471e49 Improve state output in pinos-monitor
Make a method to return the string representation of the states and
use that in pinos-monitor to improve output
2015-09-30 10:50:45 +02:00
Wim Taymans
d8067da158 Add po files and desktop.in 2015-09-04 17:10:48 +02:00
Wim Taymans
f0cd100d4c spec: add rpm specfile 2015-09-02 09:10:49 +02:00
Wim Taymans
a6dfb8831f properties: add init_builder method
Add method to init a GVariant builder from properties.
2015-09-01 12:48:04 +02:00