mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	* Python 3 * fix travis osx * try fix * get info * digging in the dirt * . * . * cleanup * . * . * finalize, add multi threaded python support
		
			
				
	
	
		
			17 lines
		
	
	
		
			551 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			551 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os, hyperion, time
 | |
| 
 | |
| # Get the parameters
 | |
| imageFile = hyperion.args.get('image')
 | |
| framesPerSecond = float(hyperion.args.get('fps', 25))
 | |
| reverse       = bool(hyperion.args.get('reverse', False))
 | |
| 
 | |
| sleepTime = 1./framesPerSecond
 | |
| if imageFile:
 | |
| 	imageList = list(reversed(hyperion.getImage(imageFile))) if reverse else hyperion.getImage(imageFile)
 | |
| 
 | |
| # Start the write data loop
 | |
| while not hyperion.abort() and imageList:
 | |
| 	for image in imageList:
 | |
| 		hyperion.setImage(image["imageWidth"], image["imageHeight"], image["imageData"])
 | |
| 		time.sleep(sleepTime)
 |