[Spice-devel,spice-server,v4,4/4] RFC EXAMPLE Some automatic check on video encoders

Submitted by Frediano Ziglio on Nov. 28, 2016, 12:05 p.m.

Details

Message ID 20161128120505.14925-5-fziglio@redhat.com
State Superseded
Headers show
Series "Gstreamer testing" ( rev: 2 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Nov. 28, 2016, 12:05 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/tests/Makefile.am    |  1 +
 server/tests/video-encoders | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100755 server/tests/video-encoders

Patch hide | download patch | download mbox

diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 188b78b..f43ed59 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -64,6 +64,7 @@  noinst_PROGRAMS =				\
 	$(NULL)
 
 TESTS = $(check_PROGRAMS)			\
+	video-encoders				\
 	$(NULL)
 
 noinst_LIBRARIES += \
diff --git a/server/tests/video-encoders b/server/tests/video-encoders
new file mode 100755
index 0000000..26b0edc
--- /dev/null
+++ b/server/tests/video-encoders
@@ -0,0 +1,21 @@ 
+#!/bin/bash
+
+set -e
+
+base_test() {
+    echo "Running test with options: $*"
+    ./test-gst -i 'filesrc num-buffers=200 location=/home/freddy/Downloads/bbb_sunflower_1080p_30fps_normal.mp4 ! decodebin ! videoconvert qos=false' "$@"
+}
+
+for clipping in '' '--clipping (10%,10%)-(50%,50%)'
+do
+    for encoder in mjpeg 'gstreamer:mjpeg --min-psnr 20' gstreamer:vp8 gstreamer:h264
+    do
+        # TODO check if encoder is supported
+        for format in 16BIT 24BIT 32BIT RGBA
+        do
+            base_test -f $format -e $encoder $clipping
+        done
+    done
+done
+