summaryrefslogtreecommitdiff
path: root/Script/launch_video2.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Script/launch_video2.sh')
-rwxr-xr-xScript/launch_video2.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/Script/launch_video2.sh b/Script/launch_video2.sh
index 6402784..24d4107 100755
--- a/Script/launch_video2.sh
+++ b/Script/launch_video2.sh
@@ -13,10 +13,14 @@ video=/usr/share/media/videos/Caminandes_1080p.mp4
if [ $(echo $alreadyrunning | wc -w) -lt 1 ] ; then
echo "create new"
- #gst-launch-1.0 playbin uri=$URL &
- gst-launch-1.0 filesrc location=$video ! qtdemux name=demux \
- demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink \
- demux.video_0 ! queue ! vaapidecode ! vaapisink fullscreen=1 &
+ if gst-inspect-1.0 | grep ^vaapi &>/dev/null; then
+ gst-launch-1.0 filesrc location=$video ! qtdemux name=demux \
+ demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink \
+ demux.video_0 ! queue ! vaapidecode ! vaapisink fullscreen=1 &
+ else
+ echo "Playing without VA-API"
+ gst-launch-1.0 playbin uri=file://$video video-sink=waylandsink &
+ fi
echo $! >> $pidfile
else echo "already running"
for x in $alreadyrunning; do kill -9 $x; done