diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-03-29 10:08:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-03-29 10:29:42 -0300 |
commit | 80c8da2569568fa06b39279a8ea6cb51f3e87a0a (patch) | |
tree | f63c0f9a52f430108fe426f987840f004330dd72 | |
parent | e76a80494b59726e443de9b8e49b4d7a93edd435 (diff) |
vim2m_test_with_qvidcap: fix formats selection
The formats selection was wrong: it was setting the format at
the output, instead of changing it at the capture stream.
As it makes sense to change both, add such support to the
script.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rwxr-xr-x | contrib/test/vim2m_test_with_qvidcap.sh | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/contrib/test/vim2m_test_with_qvidcap.sh b/contrib/test/vim2m_test_with_qvidcap.sh index 020a0ed0..07d54900 100755 --- a/contrib/test/vim2m_test_with_qvidcap.sh +++ b/contrib/test/vim2m_test_with_qvidcap.sh @@ -19,8 +19,11 @@ unset CAPFMT VDEV=video0 HOST=127.0.0.1 PORT=8632 +OUTFMT=RGB CAPWIDTH=340 +OUTWIDTH=320 CAPHEIGHT=240 +OUTHEIGHT=200 unset HELP # @@ -47,6 +50,10 @@ while [ "$1" != "" ]; do shift CAPFMT="${CAPFMT} $1" ;; + --outfmt) + shift + OUTFMT="$1" + ;; --count) shift COUNT="$1" @@ -55,10 +62,18 @@ while [ "$1" != "" ]; do shift CAPWIDTH="$1" ;; + --outwidth) + shift + OUTWIDTH="$1" + ;; --capheight) shift CAPHEIGHT="$1" ;; + --outheight) + shift + OUTHEIGHT="$1" + ;; *) echo "Unknown argument '$1'" HELP=1 @@ -105,8 +120,10 @@ for FMT in $CAPFMT; do echo "Format $FMT"; v4l2-ctl --stream-mmap --stream-out-mmap \ --stream-to-host ${HOST}:${PORT} \ - --stream-out-hor-speed 1 -x pixelformat=${FMT} \ - --set-fmt-video width=${CAPWIDTH},height=${CAPHEIGHT} \ + --stream-lossless \ + --stream-out-hor-speed 1 \ + --set-fmt-video-out pixelformat=${OUTFMT},width=${OUTWIDTH},height=${OUTHEIGHT} \ + --set-fmt-video pixelformat=${FMT},width=${CAPWIDTH},height=${CAPHEIGHT} \ -d /dev/${VDEV} --stream-count=${COUNT} echo sleep 3 |