summaryrefslogtreecommitdiff
path: root/src/daq/flumotion-plug/s5.py
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-05-10 23:13:11 +0200
committerChristian Pointner <equinox@spreadspace.org>2017-05-10 23:15:47 +0200
commitb53f49f8cbd3b7666c9267f0e2d88fce28ae6c1a (patch)
tree5da51d292af7c5ad16a7198552f785f8cdf872f6 /src/daq/flumotion-plug/s5.py
parentand one more variable refactoring (diff)
new protocol version with streamlined names for variables
Diffstat (limited to 'src/daq/flumotion-plug/s5.py')
-rw-r--r--src/daq/flumotion-plug/s5.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/daq/flumotion-plug/s5.py b/src/daq/flumotion-plug/s5.py
index 0db01e4..58dc71a 100644
--- a/src/daq/flumotion-plug/s5.py
+++ b/src/daq/flumotion-plug/s5.py
@@ -126,7 +126,7 @@ class ComponentSFivePlug(base.ComponentPlug):
properties = self.args['properties']
self._socket = properties['socket']
self._hostname = properties['hostname']
- self._content_id = properties.get('content-id')
+ self._content_id = properties.get('content')
self._format = properties.get('format')
self._quality = properties.get('quality')
tagstring = properties.get('tags', '')
@@ -208,9 +208,9 @@ class ComponentSFivePlug(base.ComponentPlug):
def _sendDatasetFull(self, timestamp, duration, client_count, bytes_sent, bytes_received):
- data = { "version": 1, "hostname": self._hostname,
- "streamer-id": {
- "content-id": self._content_id,
+ data = { "version": 2, "hostname": self._hostname,
+ "stream": {
+ "content": self._content_id,
"format": self._format,
"quality": self._quality
},
@@ -226,8 +226,8 @@ class ComponentSFivePlug(base.ComponentPlug):
self._proto.sendDatagram('%s\n' % (json.dumps(data)))
def _sendInit(self):
- initdata = { "version": 1, "hostname": self._hostname,
- "streamer-id": { "content-id": self._content_id, "format": self._format, "quality": self._quality },
+ initdata = { "version": 2, "hostname": self._hostname,
+ "stream": { "content": self._content_id, "format": self._format, "quality": self._quality },
"tags": self._tags }
self._proto.sendDatagram('%s\n' % (json.dumps(initdata)))