lj-clitools/generators/blank.py

48 lines
990 B
Python
Raw Normal View History

2020-11-11 16:31:08 +00:00
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# -*- mode: Python -*-
'''
Send only black points
v0.1.0
2020-11-11 21:14:38 +00:00
Use it to stop showing anything i.e. visual silence
2020-11-11 16:31:08 +00:00
2020-11-11 21:14:38 +00:00
Licensed under GNU GPLv3
2020-11-11 16:31:08 +00:00
by cocoa
'''
import sys
2020-11-11 21:14:38 +00:00
from os import path, getcwd
abspath, filename = path.split(path.realpath(__file__ ))
sys.path.insert(0, path.join(abspath,"../lib"))
from clitools import Clitools
2020-11-11 16:31:08 +00:00
2020-11-11 21:14:38 +00:00
import argparse
2020-11-11 16:31:08 +00:00
argsparser = argparse.ArgumentParser(description="dummy generator")
argsparser.add_argument("-f","--fps",help="Frame Per Second",default=30,type=int)
argsparser.add_argument("-v","--verbose",action="store_true",help="Verbose output")
args = argsparser.parse_args()
2020-11-11 21:14:38 +00:00
fps = args.fps
verbose = args.verbose
looptime = 1 / fps
shape = [[400,400,0],[400,400,4],[400,400,0]]
name = "generator::dummy"
cli = Clitools({
"verbose" : verbose,
"looptime" : looptime,
"name" : name
})
2020-11-11 16:31:08 +00:00
while True:
2020-11-11 21:14:38 +00:00
cli.startFrame()
2020-11-11 16:31:08 +00:00
print(shape, flush=True);
2020-11-11 21:14:38 +00:00
cli.endFrame()
2020-11-11 16:31:08 +00:00