diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/supervisord.conf | 14 | ||||
-rwxr-xr-x | scripts/sydra-sender.sh | 45 |
2 files changed, 57 insertions, 2 deletions
diff --git a/scripts/supervisord.conf b/scripts/supervisord.conf index 1e0df7f..860b547 100644 --- a/scripts/supervisord.conf +++ b/scripts/supervisord.conf @@ -12,7 +12,7 @@ pidfile=%(here)s/supervisord.pid nodaemon=false identifier=sydra childlogdir=%(here)s/logs -environment=SYDRA_TEST=1 +;environment=SYDRA_TEST=1 [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface @@ -51,5 +51,15 @@ autorestart=true startsecs=0 startretries=10 +[program:sender] +command=/home/equinox/spreadspace/sydra/scripts/sydra-sender.sh %(here)s +process_name=sender +numprocs=1 +priority=20 +autostart=true +autorestart=true +startsecs=0 +startretries=10 + [group:e14] -programs=manager,overview,main +programs=manager,overview,main,sender diff --git a/scripts/sydra-sender.sh b/scripts/sydra-sender.sh new file mode 100755 index 0000000..bf6a5dd --- /dev/null +++ b/scripts/sydra-sender.sh @@ -0,0 +1,45 @@ +#!/bin/bash +############################ + +ROOT_D="$1" + +SYDRA_RTP="/home/equinox/spreadspace/sydra/src/sydra-rtp" +SYDRA_LAUNCH="/home/equinox/spreadspace/sydra/src/sydra-launch" + +############################ + +printUsage() { + echo "Usage: $0 <basedir>" +} + +if [ -z "$ROOT_D" ]; then + printUsage + exit 1 +fi +if [ ! -d "$ROOT_D" ]; then + echo "ERROR: can't change to non-existent directory: $ROOT_D" + exit 2 +fi + +. ./include.sh + +start_rtp() { + PORT_BASE=8000 + RECORD_D="$ROOT_D/recordings/sender" + mkdir -p "$RECORD_D" + + herbstclient rule once title="sender" tag="control" + exec $SYDRA_RTP -n "sender" -D --log stdout:3 --mode sender -O $PORT_BASE \ + --previewsink "textoverlay text=\"local\" shaded-background=true font-desc=\"Sans 18\" ! videoscale add-borders=true ! xvimagesink" \ + --rec-mux matroskamux --rec-name-format "$RECORD_D/%Y-%m-%d_%H-%M-%S.mkv" --rec-video-encoder jpegenc \ + --rec-audio-encoder "audioconvert ! vorbisenc" +} + +start_test() { + herbstclient rule once title="sender" tag="control" + exec $SYDRA_LAUNCH -n "sender" -D --log stdout:3 -p "videotestsrc ! video/x-raw,width=864,height=480,framerate=25/1 ! textoverlay text=\"local\" shaded-background=true font-desc=\"Sans 18\" ! videoscale add-borders=true ! xvimagesink" +} + +cd $ROOT_D +[ -n "$SYDRA_TEST" ] || start_rtp +[ -n "$SYDRA_TEST" ] && start_test |