diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/daq/flumotion-plug/sfive.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/daq/flumotion-plug/sfive.py b/src/daq/flumotion-plug/sfive.py index 59918ca..231081b 100644 --- a/src/daq/flumotion-plug/sfive.py +++ b/src/daq/flumotion-plug/sfive.py @@ -45,6 +45,7 @@ from flumotion.common.i18n import N_ T_ = i18n.gettexter() _DEFAULT_POLL_INTERVAL = 5 # in seconds +_RECONNECT_TIMEOUT = 2 # in seconds __version__ = "$Rev$" @@ -91,6 +92,8 @@ class ComponentSFivePlug(base.ComponentPlug): self._content_id = properties.get('content-id') self._format = properties.get('format') self._quality = properties.get('quality') + tagstring = properties.get('tags', '') + self._tags = [x.strip() for x in tagstring.split(',')] self._duration = properties.get('duration', _DEFAULT_POLL_INTERVAL) self._sfivepoller = Poller(self._updateSFive, self._duration, start=False) @@ -118,7 +121,7 @@ class ComponentSFivePlug(base.ComponentPlug): if self._conn: self._conn.stopListening() - reactor.callLater(5, self._initSocket) + reactor.callLater(_RECONNECT_TIMEOUT, self._initSocket) def _socketReady(self): self.info('SFive: connection to sfive hub established') @@ -132,7 +135,7 @@ class ComponentSFivePlug(base.ComponentPlug): self.debug('SFive: sending init message') initdata = { "hostname": self._hostname, "streamer-id": { "content-id": self._content_id, "format": self._format, "quality": self._quality }, - "tags": [] } + "tags": self._tags } self._proto.sendDatagram(json.dumps(initdata)); def _updateSFive(self): |