aboutsummaryrefslogtreecommitdiff
path: root/voctocore
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-11-14 17:07:02 +0100
committerMaZderMind <git@mazdermind.de>2015-11-14 17:13:11 +0100
commit87f7057a5d59dcddb1f5f54c4013ec1ae0014a93 (patch)
tree0619dbb92ca724a0a736e54edeb2d46563a78413 /voctocore
parentc099bc00d7d793be7d35a896cce2a2ca1222715f (diff)
issue a warning when a client is too slow and about to get disconnected, #16
Diffstat (limited to 'voctocore')
-rw-r--r--voctocore/lib/avrawoutput.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/voctocore/lib/avrawoutput.py b/voctocore/lib/avrawoutput.py
index f7dcdf4..ee77c4d 100644
--- a/voctocore/lib/avrawoutput.py
+++ b/voctocore/lib/avrawoutput.py
@@ -58,7 +58,12 @@ class AVRawOutput(TCPMultiConnection):
self.log.debug('fd %u removed from multifdsink', fileno)
self.close_connection(conn)
+ def on_about_to_disconnect(multifdsink, fileno, status):
+ if fileno == conn.fileno() and status == 3: # Gst.MultiHandleSinkClientStatus.Slow
+ self.log.warning('about to remove fd %u from multifdsink because it is too slow!', fileno)
+
fdsink.connect('client-fd-removed', on_disconnect)
+ fdsink.connect('client-removed', on_about_to_disconnect)
def on_eos(self, bus, message):
self.log.debug('Received End-of-Stream-Signal on Output-Pipeline')