From b53f49f8cbd3b7666c9267f0e2d88fce28ae6c1a Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 10 May 2017 23:13:11 +0200 Subject: new protocol version with streamlined names for variables --- src/daq/flumotion-rrd/s5-flumotion-rrd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/daq/flumotion-rrd') diff --git a/src/daq/flumotion-rrd/s5-flumotion-rrd b/src/daq/flumotion-rrd/s5-flumotion-rrd index 197cb14..3170030 100755 --- a/src/daq/flumotion-rrd/s5-flumotion-rrd +++ b/src/daq/flumotion-rrd/s5-flumotion-rrd @@ -100,7 +100,7 @@ class FlumotionRRD(): self._socket = properties['socket'] self._hostname = properties['hostname'] - self._content_id = properties['content-id'] + self._content_id = properties['content'] self._format = properties['format'] self._quality = properties['quality'] self._tags = properties['tags'] @@ -191,9 +191,9 @@ class FlumotionRRD(): def _sendDatasetFull(self, timestamp, duration, client_count, bytes_sent): client_count = int(round(client_count)) if client_count else 0 bytes_sent = int(round(bytes_sent)) if bytes_sent else 0 - 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 }, @@ -208,8 +208,8 @@ class FlumotionRRD(): 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))) @@ -234,8 +234,8 @@ if __name__ == '__main__': help='the path to the data socket of the local SFive hub') parser.add_argument('--hostname', '-n', dest='hostname', required=True, help='the hostname of the machine') - parser.add_argument('--content-id', '-c', dest='content-id', required=True, - help='the content-id (i.e. av)') + parser.add_argument('--content', '-c', dest='content', required=True, + help='the content (i.e. av)') parser.add_argument('--format', '-f', dest='format', required=True, help='the format (i.e. webm)') parser.add_argument('--quality', '-q', dest='quality', required=True, -- cgit v1.2.3