gst-test-jpegdec.sh: split out height and width settings
authorAntonio Ospite <ao2@ao2.it>
Mon, 8 Jan 2018 12:03:04 +0000 (13:03 +0100)
committerAntonio Ospite <ao2@ao2.it>
Mon, 8 Jan 2018 12:30:15 +0000 (13:30 +0100)
This makes it easier to change the values to test different sizes.

shell/gst-test-jpegdec.sh

index 997a629..d478c77 100755 (executable)
@@ -9,7 +9,9 @@ command -v cjpeg &> /dev/null || { echo "cjpeg needed, should be in libjpeg-turb
 
 if [ "x$1" = "x" ];
 then
-  gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,width=996,height=784 ! jpegenc ! filesink location=videotest.jpg
+  WIDTH=996
+  HEIGHT=784
+  gst-launch-1.0 videotestsrc num-buffers=1 ! "video/x-raw,width=${WIDTH},height=${HEIGHT}" ! jpegenc ! filesink location=videotest.jpg
   INPUT_FILE="videotest.jpg"
 else
   INPUT_FILE="$1"