Fix video playing when VA-API is not available accepted/tizen_3.0.2014.q4_common accepted/tizen_4.0_unified accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_common accepted/tizen_unified tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_4.0 tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/3.0.2014.q4/common/20150302.130953 accepted/tizen/4.0/unified/20170816.015956 accepted/tizen/4.0/unified/20170828.221930 accepted/tizen/5.0/unified/20181106.202219 accepted/tizen/5.5/unified/20191031.033816 accepted/tizen/5.5/unified/mobile/hotfix/20201027.071053 accepted/tizen/5.5/unified/wearable/hotfix/20201027.094936 accepted/tizen/common/20150302.131006 accepted/tizen/unified/20170310.112557 submit/tizen_3.0.2014.q4_common/20150302.130804 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100008 submit/tizen_4.0_unified/20170814.115522 submit/tizen_5.0/20181101.000008 submit/tizen_5.0/20181106.000001 submit/tizen_5.5/20191031.000009 submit/tizen_5.5/20191031.000011 submit/tizen_5.5/20191031.000013 submit/tizen_5.5_mobile_hotfix/20201026.185109 submit/tizen_5.5_wearable_hotfix/20201026.184309 submit/tizen_common/20150302.130730 submit/tizen_unified/20170310.112129 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release tizen_5.5.m2_release
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>
Mon, 2 Mar 2015 13:07:07 +0000 (14:07 +0100)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Mon, 2 Mar 2015 13:07:07 +0000 (14:07 +0100)
Change-Id: Ic0b318da3d14041a64209a4f176b174973a13e6c
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Script/launch_video.sh
Script/launch_video2.sh

index 8c64aaa..8f15014 100755 (executable)
@@ -13,10 +13,14 @@ video=/usr/share/media/videos/AmazingNature_480p.mp4
 
 if [ $(echo $alreadyrunning | wc -w) -lt 3  ] ; 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 &
+       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 &
+       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
index 6402784..24d4107 100755 (executable)
@@ -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