summaryrefslogtreecommitdiff
path: root/rotord/preview
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-09-30 11:51:58 +0100
committerComment <tim@gray.(none)>2013-09-30 11:51:58 +0100
commit38edd2e78c326059209c1fd15bf1b543f5fd7a46 (patch)
treedd31a0687e5f7f4ab32b3b7548412e3fd64eac0e /rotord/preview
parent873f295e28a20e2e774852d8d7010ff5629549b4 (diff)
mutex locking progress bar
Diffstat (limited to 'rotord/preview')
-rwxr-xr-xrotord/preview49
1 files changed, 49 insertions, 0 deletions
diff --git a/rotord/preview b/rotord/preview
new file mode 100755
index 0000000..f1f70af
--- /dev/null
+++ b/rotord/preview
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+import httplib
+import argparse
+from lxml import etree
+import os, time
+
+method="PUT"
+ip="127.0.0.1:9000"
+path="/a/render"
+
+parser = argparse.ArgumentParser()
+parser.add_argument("filename",default="",nargs='?')
+parser.add_argument("start",default=0,nargs='?')
+parser.add_argument("stop",default=0,nargs='?')
+parser.add_argument("framerate",default="",nargs='?')
+args=parser.parse_args()
+connection = httplib.HTTPConnection(ip)
+body=args.filename
+if args.start!=0:
+ body=body+","+args.start
+ if args.stop!=0:
+ body=body+","+args.stop
+#print method,path,body
+connection.request(method,path,body)
+root = etree.XML(connection.getresponse().read())
+path=""
+for element in root.iter():
+ if element.tag=="path":
+ path=element.text
+
+if path!="":
+ print path
+ waiting=True
+ query="GET a/render"
+ while waiting:
+ time.sleep(0.1)
+ connection.request("GET","a/render","")
+ root = etree.XML(connection.getresponse().read())
+ for element in root.iter():
+ if element.tag=="error":
+ waiting=False
+ os.popen('vlc '+path)
+
+
+
+#connection = httplib.HTTPConnection('54.228.219.55:80')
+#connection = httplib.HTTPConnection('127.0.0.1:9000')
+
+