Added remote ip arguments to scripts
This commit is contained in:
parent
537e0681f2
commit
ac920fae91
|
@ -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
|
||||
|
|
|
@ -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 <remote ip>" % sys.argv[0]
|
||||
sys.exit(-1)
|
||||
|
||||
videocontroller = VideoController(sys.argv[1])
|
||||
GObject.threads_init()
|
||||
Gtk.main()
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
# Deliver mixer1 output to screen.
|
||||
# Taken from the original snowmix sources
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage $0 <remote ip>"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue