Commit graph

4 commits

Author SHA1 Message Date
Wim Taymans 0e1a858d89 socketsrc: handle GstNetworkMessage events
Add a property to handle GstNetworkMessage events. These events contain
a buffer that is sent on the socket to allow for simple bidirectional
communication.
2015-12-10 12:44:42 +01:00
Wim Taymans 2b2766494b socketsrc: add caps property
Add caps property that allows the src to easily negotiate a format.
2015-07-14 16:01:10 +02:00
William Manley a297b0545f socketsrc: Add connection-closed-by-peer signal
This provides notification that the socket in use was closed by the peer
and gives an opportunity to replace it with a new one which is not
closed, allowing reading from many sockets in order.

I use this in pulsevideo to implement reconnection logic to handle the
pulsevideo service dieing, such that is can be restarted without
disrupting downstream.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=739546
2015-03-13 20:05:00 +01:00
William Manley 7c10499ecd tcp: Add element socketsrc
`socketsrc` can be considered a source counterpart to `multisocketsink`.
It can be considered a generalization of `tcpclientsrc` and
`tcpserversrc`:  it contains all the logic required to communicate over
the socket but none of the logic for creating the sockets/establishing
the connection in the first place, allowing the user to accomplish this
externally in whatever manner they wish making it applicable to other
types of sockets besides TCP.

This commit essentially copies the implementation directly from
tcpserversrc.  Later patches will tidy the implementation up and
re-implement `tcpclientsrc` and `tcpserversrc` in terms of `socketsrc`.

See https://bugzilla.gnome.org/show_bug.cgi?id=739546
2015-03-13 20:05:00 +01:00