Sample systemd config
Make num cameras configurable
Change-Id: I4e1bbaf548dc366e7d9e8e3b8a0c369be9eef1e2
diff --git a/person_detection/app.py b/person_detection/app.py
index 0c15bec..59cc966 100644
--- a/person_detection/app.py
+++ b/person_detection/app.py
@@ -19,8 +19,10 @@
@app.route('/')
def index():
"""Video streaming home page."""
+ global args
+ devices = {str(x):"Camera "+str(x) for x in range(args.num)}
log.info("{} - connected".format(flask.request.remote_addr))
- return flask.render_template('index.html', devices=config.cameras)
+ return flask.render_template('index.html', devices=devices)
def gen(camera):
@@ -88,6 +90,10 @@
args.add_argument("--password",
help = "ROC password",
type = str)
+ args.add_argument("--num",
+ help="Number of camera devices",
+ default=1,
+ type=int)
args.add_argument("--mbrlow",
help="Low range of MBR",
default=7000000,