Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37877314
en ru br
ALT Linux repos
S:20120411-alt4

Group :: Networking/Other
RPM: getstream

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: getstream-20120411-alt4.patch
Download


 .gear/rules                                        |   3 +
 .../tags/4fefa67849d4eb17af853d6964200f660de32454  |  13 ++
 .gear/tags/list                                    |   1 +
 Makefile                                           |   6 +-
 Makefile.defs.sh                                   |   4 +-
 config.c                                           |   2 +-
 config.h                                           |   2 +-
 getstream.8                                        |  30 +++
 getstream.conf                                     | 230 +++++++++++++++++++++
 getstream.h                                        |   2 +-
 getstream.init                                     |  93 +++++++++
 getstream.spec                                     |  75 +++++++
 libhttp.c                                          |  10 +-
 libhttp.h                                          |   3 +-
 output.h                                           |   2 +-
 output_http.c                                      |   2 +-
 16 files changed, 463 insertions(+), 15 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..a68f429
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,3 @@
+spec: getstream.spec
+tar: @version@:.
+diff: @version@:. .
diff --git a/.gear/tags/4fefa67849d4eb17af853d6964200f660de32454 b/.gear/tags/4fefa67849d4eb17af853d6964200f660de32454
new file mode 100644
index 0000000..3ab812c
--- /dev/null
+++ b/.gear/tags/4fefa67849d4eb17af853d6964200f660de32454
@@ -0,0 +1,13 @@
+object b71cdf5fd80d109c6e3725b2d42307167e53f389
+type commit
+tag 20120411
+tagger Alexei Takaseev <taf@altlinux.org> 1338037194 +0900
+
+20120411
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+iEYEABECAAYFAk/A08oACgkQ/bd21Jt2ne89KACdHSbf5iKO3IKEBVLq4olIw3sf
+qO0An2TX9G5VsEPzF+i3Sqi7A0iZOuMO
+=j54N
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..361ded3
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+4fefa67849d4eb17af853d6964200f660de32454 20120411
diff --git a/Makefile b/Makefile
index bb533c1..7f30517 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ else
 CFLAGS+=-O0 -g
 endif
 
-LDFLAGS=-lpthread
+LDLIBS=-lpthread
 
 MDEFS := $(shell sh Makefile.defs.sh >Makefile.defs)
 include Makefile.defs
@@ -26,10 +26,10 @@ OBJ-tsdecode=tsdecode.o psi.o crc32.o
 all: getstream tsdecode
 
 tsdecode: $(OBJ-tsdecode)
-	gcc -o $@ $+ $(LDFLAGS)
+	gcc  -o $@ $+ $(LDLIBS)
 
 getstream: $(OBJ-getstream)
-	gcc -o $@ $+ $(LDFLAGS) 
+	gcc -o $@ $+ $(LDLIBS)
 
 clean:
 	-rm -f $(OBJ-getstream) $(OBJ-tsdecode)
diff --git a/Makefile.defs.sh b/Makefile.defs.sh
index 9d065f2..3c2a13a 100644
--- a/Makefile.defs.sh
+++ b/Makefile.defs.sh
@@ -1,5 +1,5 @@
 echo CFLAGS+=`pkg-config --cflags glib-2.0`
-echo LDFLAGS+=`pkg-config --libs glib-2.0`
+echo LDLIBS+=`pkg-config --libs glib-2.0`
 
 libeventlibs=`pkg-config --libs libevent 2>/dev/null`
 libeventcflags=`pkg-config --cflags libevent 2>/dev/null`
@@ -13,4 +13,4 @@ if [ -z "${libeventlibs}" ]; then
 fi
 
 echo CFLAGS+=${libeventcflags}
-echo LDFLAGS+=${libeventlibs}
+echo LDLIBS+=${libeventlibs}
diff --git a/config.c b/config.c
index 0a6a502..11498a2 100644
--- a/config.c
+++ b/config.c
@@ -10,7 +10,7 @@
 #include <strings.h>
 #include <string.h>
 
-#include <glib/glist.h>
+#include <glib.h>
 
 #include "config.h"
 #include "libconf.h"
diff --git a/config.h b/config.h
index b035851..f899174 100644
--- a/config.h
+++ b/config.h
@@ -1,5 +1,5 @@
 
-#include <glib/glist.h>
+#include <glib.h>
 
 #include "getstream.h"
 
diff --git a/getstream.8 b/getstream.8
new file mode 100644
index 0000000..5a2b6bc
--- /dev/null
+++ b/getstream.8
@@ -0,0 +1,30 @@
+.TH GETSTREAM 8  "2007-06-06" "20070419" "Lightweight DVB Streaming tool"
+
+.SH NAME
+GETSTREAM \- Lightweight DVB Streaming tool
+
+.SH SYNOPSIS
+.B getstream
+.I [OPTION]
+
+.SH DESCRIPTION
+.B GETSTREAM
+is a lightweight tool that streams a full DVB-S transponder into individual Multicast
+groups, one per program into the local area network.
+symbol tables.
+
+.SH OPTIONS
+.IP -d
+Start GetStream in debug mode.
+.IP "-c config-file"
+Mandatory path to the configuration file. See the package documentation for examples.
+
+.SH SEE ALSO
+.BR Website
+<http://silicon-verl.de/home/flo/projects/streaming/>
+
+.SH AUTHOR
+GETSTREAM was writter by Florian Lohoff <flo@rfc822.org>
+.PP
+This manual page was writter by Herve Rousseau <herve@moulticast.net>, for the
+Debian project (but may be used by others).
diff --git a/getstream.conf b/getstream.conf
new file mode 100644
index 0000000..b5b97af
--- /dev/null
+++ b/getstream.conf
@@ -0,0 +1,230 @@
+
+http {
+	port 8001;
+};
+
+adapter 0 {
+	packet-buffer 50;
+	stat-interval 120;
+
+        dvb-s {
+                #lnb-sharing yes;
+                lnb {
+                        lof1 9750000;
+                        lof2 10600000;
+                        slof 11700000;
+                };
+
+                transponder {
+                        frequency 10995000;
+                        polarisation v;
+                        symbol-rate 20000000;
+                };
+        };
+        stream {
+                name "Perviy kanal";
+                input {
+                        pnr 13;
+                };
+                output-http {
+                        url /tv/1.ts;
+                };
+                output-udp {
+                        remote-address 239.255.1.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "Perviy kanal";
+                        };
+                };
+        };
+
+        stream {
+                name "Telekanal Rossiya";
+                input {
+                        pnr 14;
+                };
+                output-http {
+                        url /tv/2.ts;
+                };
+                output-udp {
+                        remote-address 239.255.2.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "Telekanal Rossiya";
+                        };
+                };
+        };
+
+        stream {
+                name "Kultura";
+                input {
+                        pnr 15;
+                };
+                output-http {
+                        url /tv/3.ts;
+                };
+                output-udp {
+                        remote-address 239.255.3.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "Kultura";
+                        };
+                };
+        };
+        stream {
+                name "STS";
+                input {
+                        pnr 16;
+                };
+                output-http {
+                        url /tv/4.ts;
+                };
+                output-udp {
+                        remote-address 239.255.4.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "STS";
+                        };
+                };
+        };
+
+        stream {
+                name "TNT";
+                input {
+                        pnr 17;
+                };
+                output-http {
+                        url /tv/5.ts;
+                };
+                output-udp {
+                        remote-address 239.255.5.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "TNT";
+                        };
+                };
+        };
+
+        stream {
+                name "Muz TV";
+                input {
+                        pnr 18;
+                };
+                output-http {
+                        url /tv/6.ts;
+                };
+                output-udp {
+                        remote-address 239.255.6.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "Muz TV";
+                        };
+                };
+        };
+        stream {
+                name "TNV Tatarstan";
+                input {
+                        pnr 19;
+                };
+                output-http {
+                        url /tv/7.ts;
+                };
+                output-udp {
+                        remote-address 239.255.7.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "TNV Tatarstan";
+                        };
+                };
+        };
+
+        stream {
+                name "Domashniy";
+                input {
+                        pnr 20;
+                };
+                output-http {
+                        url /tv/8.ts;
+                };
+                output-udp {
+                        remote-address 239.255.8.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "Domashniy";
+                        };
+                };
+        };
+
+        stream {
+                name "TV Centr";
+                input {
+                        pnr 21;
+                };
+                output-http {
+                        url /tv/9.ts;
+                };
+                output-udp {
+                        remote-address 239.255.9.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "TV Centr";
+                        };
+                };
+        };
+        stream {
+                name "Sport";
+                input {
+                        pnr 22;
+                };
+                output-http {
+                        url /tv/10.ts;
+                };
+                output-udp {
+                        remote-address 239.255.10.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "Sport";
+                        };
+                };
+        };
+
+        stream {
+                name "5 kanal";
+                input {
+                        pnr 23;
+                };
+                output-http {
+                        url /tv/11.ts;
+                };
+                output-udp {
+                        remote-address 239.255.11.1;
+                        remote-port 3000;
+                        sap {
+                                scope global;
+                                ttl 4;
+                                playgroup "5 kanal";
+                        };
+                };
+        }
+
+};
diff --git a/getstream.h b/getstream.h
index e67a16b..d5111c1 100644
--- a/getstream.h
+++ b/getstream.h
@@ -10,7 +10,7 @@
 #include <linux/dvb/frontend.h>
 
 #include <event.h>
-#include <glib/glist.h>
+#include <glib.h>
 
 #include "sap.h"
 #include "psi.h"
diff --git a/getstream.init b/getstream.init
new file mode 100755
index 0000000..dec4faa
--- /dev/null
+++ b/getstream.init
@@ -0,0 +1,93 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides:       getstream
+# Required-Start: $network $syslog
+# Should-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
+# Description:    getstream is a Lightweight DVB Streaming tool
+### END INIT INFO
+
+#
+# getstream:        This is an init script for ALT Linux distribution.
+#
+# chkconfig: 345 42 10
+# description: getstream is a Lightweight DVB Streaming tool
+
+# Source function library.
+WITHOUT_RC_COMPAT=1
+
+. /etc/rc.d/init.d/functions
+
+[ -x /usr/bin/getstream ] || exit 0
+
+LOCKFILE="/var/lock/subsys/getstream"
+PIDFILE="/var/run/getstream.pid"
+RETVAL=0
+
+start()
+{
+    touch "$PIDFILE"
+    chown getstream "$PIDFILE"
+    if start-stop-daemon --start --test --quiet --pidfile "$PIDFILE" \
+        --user getstream --exec /usr/bin/getstream >/dev/null; then
+        action "Starting getstream:" \
+            start-stop-daemon --start --pidfile "$PIDFILE" --make-pidfile \
+            --background --chuid getstream --exec /usr/bin/getstream -- -c /etc/getstream.conf
+    else
+        msg_already_running getstream
+        passed "getstream startup"
+        echo
+    fi
+    RETVAL=$?
+    [ "$RETVAL" -ne 0 ] || touch "$LOCKFILE"
+    return $RETVAL
+}
+
+stop()
+{
+    action "Stopping getstream:" \
+        start-stop-daemon --stop --pidfile "$PIDFILE" --user getstream --exec /usr/bin/getstream
+    RETVAL=$?
+    [ "$RETVAL" -ne 0 ] || rm -f -- "$LOCKFILE" "$PIDFILE"
+    return $RETVAL
+
+}
+
+restart()
+{
+    stop
+    start
+}
+
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+	status getstream
+	;;
+  restart)
+	restart
+	;;
+  condstop)
+	if [ -e "$LOCKFILE" ]; then
+	    stop
+	fi
+	;;
+  condrestart)
+	if [ -e "$LOCKFILE" ]; then
+	    restart
+	fi
+	;;
+  *)
+	echo "Usage: getstream {start|stop|status|restart|condstop|condrestart}"
+	RETVAL=1
+esac
+
+exit $RETVAL
diff --git a/getstream.spec b/getstream.spec
new file mode 100644
index 0000000..7eb9a22
--- /dev/null
+++ b/getstream.spec
@@ -0,0 +1,75 @@
+Name: getstream
+Summary: DVB to multicast streamer
+Version: 20120411
+Release: alt4
+License: GPL
+Group: Networking/Other
+Source: %name-%version.tar
+Patch0: %name-%version-%release.patch
+# Automatically added by buildreq on Thu Nov 12 2009
+BuildRequires: glib2-devel libevent-devel
+
+Packager: Alexei Takaseev <taf@altlinux.ru>
+
+Url: http://silicon-verl.de/home/flo/projects/streaming/
+
+%description
+getstream is an DVB to multicast or unicast streamer
+Features provided by getstream:
+  * Full transponder streaming
+  * DVB-T/C/S/S2 support (S2 only via multiproto API)
+  * UDP or RTP multicast streaming
+  * SAP/SDP Announcements (VLC Compatible) for multicast streams
+  * HTTP streaming for unicast setups
+  * High optimization for multiple transponders per machine
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%make LIBDIR=%_lib
+
+%install
+
+install -pm0755 -D %name %buildroot%_bindir/%name
+install -pm0755 -D %name.init %buildroot%_sysconfdir/rc.d/init.d/%name
+install -pm0644 -D %name.conf %buildroot%_sysconfdir/
+install -pm0644 -D %name.8 %buildroot%_mandir/man8/%name.8
+mkdir -p %buildroot%_localstatedir/%name
+
+%pre
+/usr/sbin/useradd -G video -s /bin/false -r -c "user for getstream" -d /var/lib/getstream getstream &>/dev/null ||:
+
+%files
+%doc README configs
+%_bindir/%name
+%_mandir/*/*
+%_sysconfdir/rc.d/init.d/%name
+%config %attr(644,root,root) %_sysconfdir/getstream.conf
+%dir %_localstatedir/%name
+
+%changelog
+* Fri Mar 29 2019 Alexei Takaseev <taf@altlinux.org> 20120411-alt4
+- Change BR to libevent-devel
+
+* Tue Feb 26 2019 Alexei Takaseev <taf@altlinux.org> 20120411-alt3
+- rebuilt with libevent2.1
+
+* Thu Aug 09 2012 Alexei Takaseev <taf@altlinux.org> 20120411-alt2
+- Add lsb-init headers to startscripts
+
+* Sat May 26 2012 Alexei Takaseev <taf@altlinux.org> 20120411-alt1
+- new version
+
+* Wed Apr 04 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 20100816-alt1.2
+- Fixed built with new glib2
+
+* Sat Jun 25 2011 Igor Vlasenko <viy@altlinux.ru> 20100816-alt1.1
+- rebuilt with libevent2
+
+* Tue Sep 28 2010 Anton Farygin <rider@altlinux.ru> 20100816-alt1
+- new version
+
+* Thu Nov 12 2009 Anton Farygin <rider@altlinux.ru> 20090226-alt1
+- first build for Sisyphus
diff --git a/libhttp.c b/libhttp.c
index 8d1105c..be9fbb4 100644
--- a/libhttp.c
+++ b/libhttp.c
@@ -13,7 +13,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 
-#include <glib/glist.h>
+#include <glib.h>
 
 #include "libhttp.h"
 
@@ -556,11 +556,15 @@ struct http_server *http_init(int port) {
 	hs->sin.sin_addr.s_addr=INADDR_ANY;
 
 	if (bind(hs->fd, (struct sockaddr *) &hs->sin,
-				sizeof(struct sockaddr_in)))
+				sizeof(struct sockaddr_in))) {
+		free(hs);
 		return NULL;
+	}
 
-	if (listen(hs->fd, 3))
+	if (listen(hs->fd, 3)) {
+		free(hs);
 		return NULL;
+	}
 
 	flags=fcntl(hs->fd, F_GETFL);
 	fcntl(hs->fd, F_GETFL, flags | O_NONBLOCK);
diff --git a/libhttp.h b/libhttp.h
index 6c4b7a5..a88f59f 100644
--- a/libhttp.h
+++ b/libhttp.h
@@ -7,8 +7,7 @@
 #include <netinet/in.h>
 #include <event.h>
 
-#include <glib/glist.h>
-#include <glib/ghash.h>
+#include <glib.h>
 
 
 #define MAX_HEADER_SIZE	3000
diff --git a/output.h b/output.h
index d11b2a1..4fc6f20 100644
--- a/output.h
+++ b/output.h
@@ -4,7 +4,7 @@
 #include "getstream.h"
 #include "libhttp.h"
 
-#include <glib/glist.h>
+#include <glib.h>
 
 #include <event.h>
 
diff --git a/output_http.c b/output_http.c
index eddd22e..cebf59d 100644
--- a/output_http.c
+++ b/output_http.c
@@ -5,7 +5,7 @@
 #include <string.h>
 #include <stdio.h>
 
-#include <glib/glist.h>
+#include <glib.h>
 
 #include "output.h"
 #include "simplebuffer.h"
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin