#!/bin/sh

play()
{
    jhbuild run gst-launch-1.0 ${options} videotestsrc num-buffers=50 ! video/x-raw,format="${1}",width=1920,height=1080 ! vaapisink --gst-debug="${debug}"
#    jhbuild run gst-launch-1.0 ${options} v4l2src num-buffers=50 io-mode=dmabuf-import ! video/x-raw,format="${1}",width=1920,height=1080 ! vaapisink --gst-debug="${debug}"
}

formats="
NV12
YV12
I420
YUY2
UYVY
422H
RGBx
BGRx
P010_10LE
"
#options="-mev"
debug=${DEBUG:=vaapi*:5,v4l2*:5}

for i in $formats; do
    echo $i
    play $i
done
