summaryrefslogtreecommitdiff
path: root/py/tests
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2021-01-14 08:49:01 +0200
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2021-01-14 08:49:01 +0200
commit52a534d024c824c9359b3b9ea605f4fbb719f1f8 (patch)
tree0b4bb1b256fb7e84b1862ffbde4d11b504b7d56c /py/tests
parentb12aab5d4bb45e77934d9838576a817bc8defe4b (diff)
py: add fourcc_to_pixelformat
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Diffstat (limited to 'py/tests')
-rwxr-xr-xpy/tests/cam.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/tests/cam.py b/py/tests/cam.py
index b7294ed..957eb11 100755
--- a/py/tests/cam.py
+++ b/py/tests/cam.py
@@ -9,11 +9,12 @@ import time
parser = argparse.ArgumentParser()
parser.add_argument("width", type=int)
parser.add_argument("height", type=int)
+parser.add_argument("fourcc", type=str, nargs="?", default="YUVY")
args = parser.parse_args()
w = args.width
h = args.height
-fmt = pykms.PixelFormat.YUYV
+fmt = pykms.fourcc_to_pixelformat(args.fourcc)
print("Capturing in {}x{}".format(w, h))