mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #2949 from CvH/9.0/minisatip
minisatip: initial package
This commit is contained in:
commit
84c634a8ce
2
packages/addons/service/minisatip/changelog.txt
Normal file
2
packages/addons/service/minisatip/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
100
|
||||
- Initial Release
|
BIN
packages/addons/service/minisatip/icon/icon.png
Normal file
BIN
packages/addons/service/minisatip/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
47
packages/addons/service/minisatip/package.mk
Normal file
47
packages/addons/service/minisatip/package.mk
Normal file
@ -0,0 +1,47 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="minisatip"
|
||||
PKG_VERSION="110e6e99bc6c823b2a2c30ea02c58c91f59d077e"
|
||||
PKG_SHA256="8ac997ae70d80bc50603609baf9a86253cf525f179c71fada5320301abaea902"
|
||||
PKG_VERSION_NUMBER="0.7.16"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/catalinii/minisatip"
|
||||
PKG_URL="https://github.com/catalinii/minisatip/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain dvb-apps libdvbcsa libxml2"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="minisatip: a Sat>IP streaming server for Linux"
|
||||
PKG_LONGDESC="minisatip($PKG_VERSION_NUMBER): is a Sat>IP streaming server for Linux supporting DVB-C, DVB-S/S2, DVB-T/T2, ATSC and ISDB-T"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Minisatip"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static \
|
||||
--disable-netcv \
|
||||
--enable-dvbca \
|
||||
--enable-dvbaes \
|
||||
--enable-dvbcsa \
|
||||
--with-xml2=$(get_build_dir libxml2)"
|
||||
|
||||
pre_configure_target() {
|
||||
cd $PKG_BUILD
|
||||
rm -rf .$TARGET_NAME
|
||||
|
||||
# enables Common Interface (DVBEN50221)
|
||||
CFLAGS="$CFLAGS -I$(get_build_dir dvb-apps)/lib"
|
||||
LDFLAGS="$LDFLAGS -L$(get_build_dir dvb-apps)/lib/libdvbapi -L$(get_build_dir dvb-apps)/lib/libdvben50221 -L$(get_build_dir dvb-apps)/lib/libucsi"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/minisatip $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/webif
|
||||
cp -PR $PKG_BUILD/html/* $ADDON_BUILD/$PKG_ADDON_ID/webif
|
||||
}
|
64
packages/addons/service/minisatip/source/bin/minisatip.start
Normal file
64
packages/addons/service/minisatip/source/bin/minisatip.start
Normal file
@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.minisatip
|
||||
|
||||
chmod a+x $ADDON_DIR/bin/*
|
||||
|
||||
# wait for dvb card
|
||||
if [ "$WAIT_FOR_FEINIT" = "true" ]; then
|
||||
while [ true ] ; do
|
||||
if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
# sleep for x seconds
|
||||
if [ "$WORKAROUND_SLEEP" = "true" ]; then
|
||||
sleep $WORKAROUND_SLEEP_TIME
|
||||
fi
|
||||
|
||||
## options
|
||||
# simulate x adapters
|
||||
if [ "$MINISATIP_TESTMODE" = "true" ]; then
|
||||
MINISATIP_ARG_TEST="-a 2:2:2"
|
||||
fi
|
||||
|
||||
# debug log
|
||||
if [ "$MINISATIP_DEBUG" = "true" ]; then
|
||||
MINISATIP_ARG="-l -l -l"
|
||||
fi
|
||||
|
||||
# RTSP over TCP instead UDP
|
||||
if [ "$MINISATIP_SATIP_TCP" = "true" ]; then
|
||||
MINISATIP_ARG="$MINISATIP_ARG -O"
|
||||
fi
|
||||
|
||||
# clean the PSI from all CA information
|
||||
if [ "$MINISATIP_CLEANPSI" = "true" ]; then
|
||||
MINISATIP_ARG="$MINISATIP_ARG -t"
|
||||
fi
|
||||
|
||||
# port for listening for rtsp requests
|
||||
if [ "$MINISATIP_RTSP_PORT" != "554" ]; then
|
||||
MINISATIP_ARG="$MINISATIP_ARG -y $MINISATIP_RTSP_PORT"
|
||||
fi
|
||||
|
||||
# specify the hostname and port for the dvbapi server (oscam)
|
||||
if [ "$MINISATIP_CLEANPSI" = "true" ]; then
|
||||
MINISATIP_ARG="$MINISATIP_ARG -o ${MINISATIP_DVBAPI_IP}:${MINISATIP_DVBAPI_PORT}"
|
||||
fi
|
||||
|
||||
if [ "$MINISATIP_STARTUP" = "true" ]; then
|
||||
echo "Minisatip was started with this settings: ${MINISATIP_STARTUP_ARGS}" > $ADDON_LOG_FILE
|
||||
exec $ADDON_DIR/bin/minisatip -f ${MINISATIP_ARG_TEST} -x ${MINISATIP_WEBPORT} -R /storage/.kodi/addons/service.minisatip/webif ${MINISATIP_STARTUP_ARGS} >> $ADDON_LOG_FILE
|
||||
else
|
||||
echo "Minisatip was started with this settings: ${MINISATIP_ARG}" > $ADDON_LOG_FILE
|
||||
$ADDON_DIR/bin/minisatip -f ${MINISATIP_ARG_TEST} -x ${MINISATIP_WEBPORT} -R /storage/.kodi/addons/service.minisatip/webif ${MINISATIP_ARG} >> $ADDON_LOG_FILE
|
||||
fi
|
18
packages/addons/service/minisatip/source/default.py
Normal file
18
packages/addons/service/minisatip/source/default.py
Normal file
@ -0,0 +1,18 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
self.id = xbmcaddon.Addon().getAddonInfo('id')
|
||||
|
||||
def onSettingsChanged(self):
|
||||
subprocess.call(['systemctl', 'restart', self.id])
|
||||
|
||||
if __name__ == "__main__":
|
||||
Monitor().waitForAbort()
|
@ -0,0 +1,82 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: minisatip
|
||||
# Addon id: service.minisatip
|
||||
# Addon Provider: Team LibreELEC
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Hardware"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "Wait for frontend initialization"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "Number of adapters to wait for"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "Unload DVB modules before suspend"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "Delay the start of Minisatip"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30005"
|
||||
msgid "time (s)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30006"
|
||||
msgid "Minisatip"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30007"
|
||||
msgid "Use RTSP over TCP for data transport"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30008"
|
||||
msgid "Clean the PSI from all CA information"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30009"
|
||||
msgid "Specify the hostname for the dvbapi server (OScam)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30010"
|
||||
msgid "Specify the port for the dvbapi server (OScam)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30011"
|
||||
msgid "Port for listening for RTSP requests"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30012"
|
||||
msgid "Webui Port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30013"
|
||||
msgid "Debugging"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30014"
|
||||
msgid "Debug Log"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30015"
|
||||
msgid "Simulate DVB adapters"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30016"
|
||||
msgid "Advanced Options"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30017"
|
||||
msgid "Manually enter startup command-line"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30018"
|
||||
msgid "Command-line"
|
||||
msgstr ""
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting id="WAIT_FOR_FEINIT" type="bool" label="30001" default="false" />
|
||||
<setting id="NUM_ADAPTERS" type="slider" range="1,16" option="int" label="30002" default="1" enable="eq(-1,true)" />
|
||||
<setting id="REMOVE_MODULES" type="text" label="30003" values="" default=""/>
|
||||
<setting id="WORKAROUND_SLEEP" type="bool" label="30004" default="false" />
|
||||
<setting id="WORKAROUND_SLEEP_TIME" type="slider" range="1,30" option="int" label="30005" default="1" enable="eq(-1,true)" />
|
||||
</category>
|
||||
<category label="30006">
|
||||
<setting id="MINISATIP_SATIP_TCP" type="bool" label="30007" default="false" />
|
||||
<setting id="MINISATIP_CLEANPSI" type="bool" label="30008" default="false" />
|
||||
<setting id="MINISATIP_DVBAPI_IP" type="ipaddress" label="30009" default="127.0.0.1" enable="eq(-1,true)" />
|
||||
<setting id="MINISATIP_DVBAPI_PORT" type="text" label="30010" default="9000" enable="eq(-2,true)" />
|
||||
<setting id="MINISATIP_RTSP_PORT" type="text" label="30011" default="554" />
|
||||
<setting id="MINISATIP_WEBPORT" type="text" label="30012" default="9999" />
|
||||
</category>
|
||||
<category label="30013">
|
||||
<setting id="MINISATIP_DEBUG" type="bool" label="30014" default="false" />
|
||||
<setting id="MINISATIP_TESTMODE" type="bool" label="30015" default="false" />
|
||||
</category>
|
||||
<category label="30016">
|
||||
<setting id="MINISATIP_STARTUP" type="bool" label="30017" default="false" />
|
||||
<setting id="MINISATIP_STARTUP_ARGS" type="text" label="30018" enable="eq(-1,true)" />
|
||||
</category>
|
||||
</settings>
|
@ -0,0 +1,17 @@
|
||||
<settings version="2">
|
||||
<setting id="MINISATIP_CLEANPSI" default="true">false</setting>
|
||||
<setting id="MINISATIP_DEBUG" default="true">false</setting>
|
||||
<setting id="MINISATIP_DVBAPI_IP" default="true">127.0.0.1</setting>
|
||||
<setting id="MINISATIP_DVBAPI_PORT" default="true">9000</setting>
|
||||
<setting id="MINISATIP_RTSP_PORT" default="true">554</setting>
|
||||
<setting id="MINISATIP_SATIP_TCP" default="true">false</setting>
|
||||
<setting id="MINISATIP_STARTUP" default="true">false</setting>
|
||||
<setting id="MINISATIP_STARTUP_ARGS" default="true"></setting>
|
||||
<setting id="MINISATIP_TESTMODE" default="true">false</setting>
|
||||
<setting id="MINISATIP_WEBPORT" default="true">9999</setting>
|
||||
<setting id="NUM_ADAPTERS">1</setting>
|
||||
<setting id="REMOVE_MODULES" default="true"></setting>
|
||||
<setting id="WAIT_FOR_FEINIT" default="true">false</setting>
|
||||
<setting id="WORKAROUND_SLEEP" default="true">false</setting>
|
||||
<setting id="WORKAROUND_SLEEP_TIME">1</setting>
|
||||
</settings>
|
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.minisatip
|
||||
|
||||
SERVICE="service.minisatip"
|
||||
|
||||
if [ "$RESTART_ON_RESUME" == "true" ] ; then
|
||||
case "$1" in
|
||||
pre)
|
||||
if systemctl is-active "$SERVICE" &>/dev/null ; then
|
||||
systemctl stop "$SERVICE"
|
||||
fi
|
||||
;;
|
||||
post)
|
||||
if systemctl is-enabled "$SERVICE" &>/dev/null ; then
|
||||
systemctl start "$SERVICE"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=minisatip
|
||||
After=network-online.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.minisatip/bin/minisatip.start"
|
||||
TimeoutStopSec=2
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user