|
|
|
@ -57,6 +57,10 @@ class Photography(Bureau):
|
|
|
|
|
gpio.setcfg(self.a5_pin, gpio.INPUT)
|
|
|
|
|
gpio.pullup(self.a5_pin, gpio.PULLUP)
|
|
|
|
|
|
|
|
|
|
# make sure tmp dir exists
|
|
|
|
|
tmpdir = "/tmp/webcam"
|
|
|
|
|
if not os.path.exists(tmpdir):
|
|
|
|
|
os.mkdir(tmpdir)
|
|
|
|
|
|
|
|
|
|
def _doc_light_on(self):
|
|
|
|
|
gpio.output(self.doc_light_pin, gpio.HIGH)
|
|
|
|
@ -87,7 +91,7 @@ class Photography(Bureau):
|
|
|
|
|
mjpg = os.path.join(modpath, "..", "..", "lib", "mjpg-streamer",
|
|
|
|
|
"mjpg-streamer-experimental", "run.sh")
|
|
|
|
|
mjpg_dir = os.path.dirname(mjpg)
|
|
|
|
|
cmd = mjpg.split() + ["-i", "input_uvc.so -r 3264x2448 -n", "-o", "output_file.so -f /tmp/webcam -d 500 -s 2"]
|
|
|
|
|
cmd = mjpg.split() + ["-i", "input_uvc.so -r 1920x1080 -n", "-o", "output_file.so -f /tmp/webcam -d 500 -s 2"]
|
|
|
|
|
|
|
|
|
|
print(cmd)
|
|
|
|
|
#proc = subprocess.Popen(cmd, shell=True, env={"LD_LIBRARY_PATH": mjpg_dir})
|
|
|
|
|