summaryrefslogtreecommitdiff
path: root/scripts/client
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/client')
-rw-r--r--scripts/client/include.sh3
-rw-r--r--scripts/client/supervisord.conf45
-rwxr-xr-xscripts/client/sydra-receiver.sh40
-rwxr-xr-xscripts/client/sydra-sender.sh41
4 files changed, 129 insertions, 0 deletions
diff --git a/scripts/client/include.sh b/scripts/client/include.sh
new file mode 100644
index 0000000..4b67bc9
--- /dev/null
+++ b/scripts/client/include.sh
@@ -0,0 +1,3 @@
+RTP_HOST=wuerfel.realraum.at
+SEND_PORT_BASE=8000
+RECV_PORT_BASE=5010
diff --git a/scripts/client/supervisord.conf b/scripts/client/supervisord.conf
new file mode 100644
index 0000000..34863b9
--- /dev/null
+++ b/scripts/client/supervisord.conf
@@ -0,0 +1,45 @@
+[unix_http_server]
+file=%(here)s/supervisor.sock
+chmod=0700
+
+[inet_http_server]
+port=127.0.0.1:9001
+
+[supervisord]
+logfile=%(here)s/logs/supervisord.log
+loglevel=info
+pidfile=%(here)s/supervisord.pid
+nodaemon=false
+identifier=sydra
+childlogdir=%(here)s/logs
+;environment=SYDRA_TEST=1
+
+[rpcinterface:supervisor]
+supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
+
+[supervisorctl]
+serverurl=unix://%(here)s/supervisor.sock
+prompt=sydractl
+
+[program:receiver]
+command=%(here)s/sydra-receiver.sh %(here)s
+process_name=receiver
+numprocs=1
+priority=20
+autostart=false
+autorestart=true
+startsecs=0
+startretries=10
+
+[program:sender]
+command=%(here)s/sydra-sender.sh %(here)s
+process_name=sender
+numprocs=1
+priority=20
+autostart=false
+autorestart=true
+startsecs=0
+startretries=10
+
+[group:e14]
+programs=receiver,sender
diff --git a/scripts/client/sydra-receiver.sh b/scripts/client/sydra-receiver.sh
new file mode 100755
index 0000000..be117bb
--- /dev/null
+++ b/scripts/client/sydra-receiver.sh
@@ -0,0 +1,40 @@
+#!/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() {
+ RECORD_D="$ROOT_D/recordings/sender"
+ mkdir -p "$RECORD_D"
+
+ exec $SYDRA_RTP -n "receiver" -D --log stdout:3 --mode receiver -a $RTP_HOST -o $SEND_PORT_BASE -O 5000 \
+ --sink "videoconvert name=videosink ! textoverlay text=\"remote\" shaded-background=true font-desc=\"Sans 18\" ! videoscale add-borders=true ! xvimagesink audioconvert name=\"audiosink\" ! autoaudiosink"
+}
+
+start_test() {
+ exec $SYDRA_LAUNCH -n "receiver" -D --log stdout:3 -p "videotestsrc ! video/x-raw,width=864,height=480,framerate=25/1 ! textoverlay text=\"remote\" 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
diff --git a/scripts/client/sydra-sender.sh b/scripts/client/sydra-sender.sh
new file mode 100755
index 0000000..19f8495
--- /dev/null
+++ b/scripts/client/sydra-sender.sh
@@ -0,0 +1,41 @@
+#!/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() {
+ RECORD_D="$ROOT_D/recordings"
+ mkdir -p "$RECORD_D"
+
+ exec $SYDRA_RTP -n "sender" -D --log stdout:3 --mode sender -a $RTP_HOST -o $RECV_PORT_BASE -O 6000 \
+ --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-audio-encoder "audioconvert ! vorbisenc"
+}
+
+start_test() {
+ 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