diff --git a/ini/base.ini b/ini/base.ini index 6212850..316a161 100644 --- a/ini/base.ini +++ b/ini/base.ini @@ -5,6 +5,7 @@ require version 0.4.2 # Define allowed remote host IP addresses. If omitted then only 127.0.0.1 will be accepted. system host allow 127.0.0.1 +system host allow 192.168.11.211 # Listen on port 9999 for command control connections system control port 9999 diff --git a/python/videocontroller.py b/python/videocontroller.py index 3f1bacb..c3f0c5f 100644 --- a/python/videocontroller.py +++ b/python/videocontroller.py @@ -3,17 +3,17 @@ import sys import socket -from gi.repository import Gtk +from gi.repository import Gtk, GObject from scenechanger import SceneChanger from textchanger import TextChanger from timercontroller import TimerController -class VideoController: - def __init__(self): +class VideoController(object): + def __init__(self, ip): self.snowmix_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.snowmix_socket.connect(("localhost", 9999)) + self.snowmix_socket.connect((ip, 9999)) self.scenechanger = SceneChanger(self.snowmix_socket) self.textchanger = TextChanger(self.snowmix_socket) @@ -99,5 +99,10 @@ class VideoController: self.messagebox.hide() return True -videocontroller = VideoController() +if len(sys.argv) != 2: + print "Usage %s " % sys.argv[0] + sys.exit(-1) + +videocontroller = VideoController(sys.argv[1]) +GObject.threads_init() Gtk.main() diff --git a/scripts/output2screen b/scripts/output2screen index a31175b..2403658 100755 --- a/scripts/output2screen +++ b/scripts/output2screen @@ -2,6 +2,13 @@ # Deliver mixer1 output to screen. # Taken from the original snowmix sources +if [ -z "$1" ]; then + echo "Usage $0 " + exit +fi + +remote_ip="$1" + tmpfile=/tmp/output2screen.tmp.$$ echo 'system info' | nc 127.0.0.1 9999 >$tmpfile geometry=`grep 'STAT: System geometry' $tmpfile |cut -f3 -d: |cut -f2 -d' '|tr 'x' ' '` @@ -53,6 +60,6 @@ while true ; do 'video/x-raw-yuv' !\ jpegenc !\ rtpjpegpay !\ - udpsink host=192.168.11.90 port=9998 sync=true + udpsink host=$remote_ip port=9998 sync=true sleep 2 done