diff options
-rw-r--r-- | packaging/rundemo.sh | 8 |
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 |