summaryrefslogtreecommitdiff
path: root/src/daq/flumotion-rrd/s5-flumotion-rrd
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-rrd/s5-flumotion-rrd
parentand one more variable refactoring (diff)
new protocol version with streamlined names for variables
Diffstat (limited to 'src/daq/flumotion-rrd/s5-flumotion-rrd')
-rwxr-xr-xsrc/daq/flumotion-rrd/s5-flumotion-rrd16
1 files changed, 8 insertions, 8 deletions
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,