mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-15 01:13:36 +02:00
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@427 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 7264e3f506
Author: yjogol <yjogol2@online.de>
Date: 2010-02-27 (Sat, 27 Feb 2010)
------------------
This commit was generated by Migit
116 lines
2.2 KiB
Bash
Executable File
116 lines
2.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# -----------------------------------------------------------
|
|
# Live (yjogol)
|
|
# $Date$
|
|
# $Revision: 1.3 $
|
|
# -----------------------------------------------------------
|
|
|
|
. ./_Y_Globals.sh
|
|
. ./_Y_Library.sh
|
|
|
|
# -----------------------------------------------------------
|
|
live_lock()
|
|
{
|
|
call_webserver "control/lcd?lock=1&clear=1&rect=10,10,110,50,1,0&xpos=20&ypos=27&size=22&font=2&text=%20%20%20%20yWeb%0A%20%20LiveView&update=1" >/dev/null
|
|
call_webserver "control/rc?lock" >/dev/null
|
|
call_webserver "control/zapto?stopplayback" >/dev/null
|
|
}
|
|
# -----------------------------------------------------------
|
|
live_unlock()
|
|
{
|
|
call_webserver "control/lcd?lock=0" >/dev/null
|
|
call_webserver "control/rc?unlock" >/dev/null
|
|
call_webserver "control/zapto?startplayback" >/dev/null
|
|
}
|
|
# -----------------------------------------------------------
|
|
prepare_tv()
|
|
{
|
|
# SPTS on
|
|
call_webserver "control/system?setAViAExtPlayBack=spts" >/dev/null
|
|
}
|
|
# -----------------------------------------------------------
|
|
prepare_radio()
|
|
{
|
|
# SPTS off
|
|
call_webserver "control/system?setAViAExtPlayBack=pes" >/dev/null
|
|
}
|
|
|
|
# -----------------------------------
|
|
# Main
|
|
# -----------------------------------
|
|
echo "$1" >/tmp/debug.txt
|
|
echo "$*"
|
|
case "$1" in
|
|
zapto)
|
|
if [ "$2" != "" ]
|
|
then
|
|
call_webserver "control/zapto?$2" >/dev/null
|
|
fi
|
|
;;
|
|
|
|
switchto)
|
|
if [ "$2" = "Radio" ]
|
|
then
|
|
call_webserver "control/setmode?radio" >/dev/null
|
|
else
|
|
call_webserver "control/setmode?tv" >/dev/null
|
|
fi
|
|
;;
|
|
|
|
url)
|
|
url=`buildStreamingRawURL`
|
|
echo "$url" ;;
|
|
|
|
audio-url)
|
|
url=`buildStreamingAudioRawURL`
|
|
echo "$url" ;;
|
|
|
|
live_lock)
|
|
live_lock ;;
|
|
|
|
live_unlock)
|
|
live_unlock ;;
|
|
|
|
dboxIP)
|
|
buildLocalIP ;;
|
|
|
|
prepare_radio)
|
|
prepare_radio
|
|
Y_APid=`call_webserver "control/yweb?radio_stream_pid"`
|
|
url="http://$2:31338/$Y_APid"
|
|
echo "$url" > $y_tmp_m3u
|
|
echo "$url" > $y_tmp_pls
|
|
;;
|
|
|
|
prepare_tv)
|
|
prepare_tv
|
|
;;
|
|
|
|
udp_stream)
|
|
if [ "$2" = "start" ]
|
|
then
|
|
shift 2
|
|
killall streamts
|
|
killall streampes
|
|
killall udpstreamts
|
|
if [ -e /var/bin/udpstreamts ]
|
|
then
|
|
/var/bin/udpstreamts $* &
|
|
else
|
|
udpstreamts $* &
|
|
fi
|
|
pidof udpstreamts >/tmp/udpstreamts.pid
|
|
fi
|
|
if [ "$2" = "stop" ]
|
|
then
|
|
killall udpstreamts
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
echo "Parameter falsch: $*" ;;
|
|
esac
|
|
|
|
|
|
|