Commit graph

12535 commits

Author SHA1 Message Date
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
Jonas Ådahl 8a509ec2a4 pc: Include MAJORMINOR in the .pc filename 2015-12-10 10:12:05 +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
Jonas Ådahl df171356fe pc: Include MAJORMINOR version in Ldflags
The .so file is libpinos-MAJOR.MINOR.so, so the .pc file should reflect
this.
2015-12-10 09:51:42 +01:00
Wim Taymans 1a9aaa3f11 pc: remove @PTHREAD_LIBS@ 2015-12-10 09:07:31 +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 9bdc9d757a docs: update design docs
Update design docs with some info about how the lifecycle of fds
are managed.
2015-12-04 16:39:29 +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 48fdc1d37c doc updates 2015-09-30 13:00:14 +02: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 c75efac3f9 po: remove autogenerated file 2015-09-14 09:12:50 +02:00
Wim Taymans 8df5f332f8 po: add missing files 2015-09-14 09:11:05 +02:00
Wim Taymans 19707883d0 spec: update version 2015-09-09 17:20:27 +02:00
Wim Taymans f91467b50e spec: fix spec file some more 2015-09-09 17:08:57 +02:00
Wim Taymans d8067da158 Add po files and desktop.in 2015-09-04 17:10:48 +02:00
Wim Taymans dd32d65faf man: add some man pages 2015-09-02 14:58:03 +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
Wim Taymans fd276b4820 add continuation packet
Add continuation type packet that would make it possible to send
commands using a piece of shared memory.
2015-08-31 17:10:44 +02:00
Wim Taymans 8d1ad2ea63 More work on wire protocol
Make separate payload for the header.
Make release-fd payloads
capture_buffer -> peek_buffer to avoid a copy
remove release-buffer, we really need to release each fd in the buffer
separately.
provide_buffer -> send_buffer so that we can also use this to send the
release-fd messages.
in pinossrc, send back release-fd messages when the fd is no longer in
use.
2015-08-31 16:47:32 +02:00
Wim Taymans c2cf359076 Rework pay/depay elements
Rename the payloader and depayloader to pinospay/pinosdepay because they
now store data in a pinos specific format.
Subclass GstElement because they are not real transform elements.
Rework/remove some buffer functions that are not used by some more
performant ones.
2015-08-27 16:41:25 +02:00
Wim Taymans eada50916a fix some more leaks 2015-08-26 17:11:10 +02:00
Wim Taymans 78a7a1ea72 Fix some memory leaks 2015-08-26 15:44:29 +02:00
Wim Taymans 0e03080002 Rework buffer API a little
Use BufferIter and BufferBuilder instead of Packet*
Make separate method to set the header so you can set it later and not
only at builder init time.
Add method to clear the builder if you want to abort.
Add method to add fd to builder instead of in _add_fd_payload. This
would make it easier to add multiple fd-payloads using data from the
same fd.
Pass PinosPacketFDPayload to add_fd_payload to make it symetric with the
parsing code. We should be able to get the size from the VERSION passed
when the builder was made.
Add ideas about releasing the fds back to the server.
2015-08-26 12:46:28 +02:00
Marc-Antoine Perennou 4e92d32540 add m4 macros from autoconf archive
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2015-08-26 09:53:16 +02:00
Marc-Antoine Perennou 6422cda2c5 Revert "m4: add m4 macros"
This reverts commit 104632ea7a.

No need to add libtool m4 macros, they're isntalled by libtoolize anyway
2015-08-26 09:53:12 +02:00
Wim Taymans f2c9b6badd stream: handle renegotiation
Don't allow multiple connects on a stream, you need to first disconnect.
Make sure we disconnect before reconnecting again in the source.
2015-08-25 16:36:01 +02:00
Wim Taymans e098dde0a3 improve application name 2015-08-25 13:06:05 +02:00
Wim Taymans ec5b9b26df small cleanups and some leak fixing 2015-08-24 16:55:29 +02:00
Wim Taymans c47fcd8105 Rework the wire protocol
Send a command stream over the socket.
Implement a new buffer object that holds the data and commands.
Make iterator and builders to parse and construct buffers.
Rework gstreamer elements to use new API for creating and parsing
buffers.
Add _release_buffer to notify a stream when we are done processing the
buffer. This will eventually go all the way to the server and will allow
us to do more complicated buffer management.
2015-08-24 16:41:04 +02:00
Wim Taymans d0f3f3125b doc: add simple design doc 2015-08-21 11:46:29 +02:00