socketsrc: Add `connection-closed-by-peer` signal
authorWilliam Manley <will@williammanley.net>
Fri, 13 Mar 2015 13:56:13 +0000 (13:56 +0000)
committerWim Taymans <wtaymans@redhat.com>
Fri, 13 Mar 2015 19:05:00 +0000 (20:05 +0100)
commita297b0545f664c82351bbae1fd3f943d068b5031
tree502423dc31b58b30ae8b393ac0d3de8b786b7911
parenta19ac4b85c9dbd930bf68058e8581b7e09a640ea
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
gst/tcp/gstsocketsrc.c
gst/tcp/gstsocketsrc.h
tests/check/pipelines/tcp.c