summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffroy Van Cutsem <geoffroy.vancutsem@intel.com>2012-10-08 17:55:59 +0200
committerGeoffroy Van Cutsem <geoffroy.vancutsem@intel.com>2012-10-08 17:55:59 +0200
commit3aafc8256211ca64d2276ea1862e976b1f082aa5 (patch)
tree500099647a8cc62a449c9757d21bd92ce685a2e0
parent795a693484977bc0b8159d54d9a8044f5010d03b (diff)
downloadivi-demo-config-accepted/trunk/20121009.042153.tar.gz
ivi-demo-config-accepted/trunk/20121009.042153.tar.bz2
ivi-demo-config-accepted/trunk/20121009.042153.zip
Add function ('Button2') to skip to next video on the list Change-Id: I87cd2f40992c18ced7754dd073ced98bad0e8317
-rw-r--r--packaging/rundemo.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/packaging/rundemo.sh b/packaging/rundemo.sh
index 0de2a05..723ddc8 100644
--- a/packaging/rundemo.sh
+++ b/packaging/rundemo.sh
@@ -5,7 +5,7 @@ echo "Button pressed: ${BUTTONVALUE}"
GST_LAUNCH_BIN="/usr/bin/gst-launch-0.10"
-VIDEO_SCRIPT_NAME="/usr/lib/automotive-message-broker/scripts/start_video.sh"
+VIDEO_SCRIPT_NAME=$0
RIGHT_CAMERA_DEV="/dev/video0"
LEFT_CAMERA_DEV="/dev/video1"
@@ -49,7 +49,11 @@ case ${BUTTONVALUE} in
;;
"Button2")
#Run script 2 here
- echo "Button 2 script!"
+ echo "Skipping to the next video"
+ VIDEO_SCRIPT_PID=$[ $(pgrep -f $VIDEO_SCRIPT_NAME) ]
+ if [ $VIDEO_SCRIPT_PID != "0" ]; then
+ pkill -P $VIDEO_SCRIPT_PID gst-launch
+ fi
;;
"Button3")
#Run script 3 here