aboutsummaryrefslogtreecommitdiffstats
path: root/web/stream.gathering.org
diff options
context:
space:
mode:
Diffstat (limited to 'web/stream.gathering.org')
-rw-r--r--web/stream.gathering.org/.htaccess4
-rwxr-xr-xweb/stream.gathering.org/embed.pl2
-rwxr-xr-xweb/stream.gathering.org/generate_vlc.pl2
-rwxr-xr-xweb/stream.gathering.org/index.pl2
-rw-r--r--web/stream.gathering.org/streamlib/stream.pm36
-rw-r--r--web/stream.gathering.org/streamlib/stream/config.pm163
6 files changed, 206 insertions, 3 deletions
diff --git a/web/stream.gathering.org/.htaccess b/web/stream.gathering.org/.htaccess
new file mode 100644
index 0000000..7a37cd3
--- /dev/null
+++ b/web/stream.gathering.org/.htaccess
@@ -0,0 +1,4 @@
+# Deny access to streamlib from web browser
+RewriteEngine On
+RewriteBase /
+RewriteRule ^streamlib.* - [F,L] \ No newline at end of file
diff --git a/web/stream.gathering.org/embed.pl b/web/stream.gathering.org/embed.pl
index bdd00eb..91fc413 100755
--- a/web/stream.gathering.org/embed.pl
+++ b/web/stream.gathering.org/embed.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -I /root/tgmanage/web/streamlib
+#!/usr/bin/perl -I /root/tgmanage/web/stream.gathering.org/streamlib
use warnings;
use strict;
use CGI;
diff --git a/web/stream.gathering.org/generate_vlc.pl b/web/stream.gathering.org/generate_vlc.pl
index 2b7ff04..178973d 100755
--- a/web/stream.gathering.org/generate_vlc.pl
+++ b/web/stream.gathering.org/generate_vlc.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -I /root/tgmanage/web/streamlib
+#!/usr/bin/perl -I /root/tgmanage/web/stream.gathering.org/streamlib
use warnings;
use strict;
diff --git a/web/stream.gathering.org/index.pl b/web/stream.gathering.org/index.pl
index e2bc165..cc83454 100755
--- a/web/stream.gathering.org/index.pl
+++ b/web/stream.gathering.org/index.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -I /root/tgmanage/web/streamlib
+#!/usr/bin/perl -I /root/tgmanage/web/stream.gathering.org/streamlib
use warnings;
use strict;
use CGI;
diff --git a/web/stream.gathering.org/streamlib/stream.pm b/web/stream.gathering.org/streamlib/stream.pm
new file mode 100644
index 0000000..c28136e
--- /dev/null
+++ b/web/stream.gathering.org/streamlib/stream.pm
@@ -0,0 +1,36 @@
+package stream;
+use strict;
+use warnings;
+
+BEGIN {
+ use Exporter();
+
+ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+
+ @ISA = qw(Exporter);
+ $VERSION = 1.00;
+ @EXPORT = qw(&is_ip_local);
+
+}
+
+sub is_ip_local($$$) {
+ my $clip = shift;
+ my $v4net = shift;
+ my $v6net = shift;
+ return 0 unless defined($clip);
+
+ my $is_local = 0;
+ if ($clip =~ m/\:/){
+ if (NetAddr::IP->new($clip)->within($v6net)){
+ $is_local = 1;
+ }
+ } else {
+ if (NetAddr::IP->new($clip)->within($v4net)){
+ $is_local = 1;
+ }
+ }
+ return $is_local;
+}
+
+
+1;
diff --git a/web/stream.gathering.org/streamlib/stream/config.pm b/web/stream.gathering.org/streamlib/stream/config.pm
new file mode 100644
index 0000000..1c968da
--- /dev/null
+++ b/web/stream.gathering.org/streamlib/stream/config.pm
@@ -0,0 +1,163 @@
+package stream::config;
+use strict;
+use warnings;
+use NetAddr::IP;
+
+our $v4net = NetAddr::IP->new("151.216.128.0/17");
+our $v6net = NetAddr::IP->new("2a02:ed02::/32");
+our $multicast = "udp://\@233.191.12.1";
+our $video_url = "http://cubemap.tg15.gathering.org/creativia.flv";
+our $tg = 15;
+our $tg_full = 2015;
+
+
+# priority = sorting order in streaming list
+# port , "post port number"
+# has_external , shows on OVH/.fr reflector if set
+# external , replaces static url link
+# source , video source pew pew
+# title , title doh \:D/
+our %streams = (
+ 'event-hd' => {
+ 'type' => 'event',
+ 'quality' => 'hd',
+ 'priority' => 20,
+ 'port' => 80,
+ 'url' => 'http://cubemap.tg15.gathering.org/event.flv',
+ 'ts_enabled' => 1,
+ 'online' => 0,
+ 'external' => 1,
+ 'interlaced' => 0,
+ 'has_multicast' => 0,
+ 'multicast_ip' => 'udp://@[ff7e:a40:2a02:ed02:ffff::15]:2015',
+ 'source' => 'Event',
+ 'title' => 'Event HD (720p50 H.264) 6Mbit/s'
+ },
+ 'creativia-hd' => {
+ 'type' => 'event',
+ 'quality' => 'hd',
+ 'priority' => 100,
+ 'port' => 80,
+ 'url' => 'http://cubemap.tg15.gathering.org/creativia.flv',
+ 'ts_enabled' => 1,
+ 'online' => 1,
+ 'external' => 1,
+ 'interlaced' => 0,
+ 'has_multicast' => 0,
+ 'multicast_ip' => 'udp://@[ff7e:a40:2a02:ed02:ffff::15]:2015',
+ 'source' => 'Event',
+ 'title' => 'Creativia HD (1080p50 H.264) 10Mbit/s'
+ },
+ 'game-hd' => {
+ 'type' => 'event',
+ 'quality' => 'hd',
+ 'priority' => 110,
+ 'port' => 80,
+ 'url' => 'http://cubemap.tg15.gathering.org/game.flv',
+ 'ts_enabled' => 1,
+ 'online' => 0,
+ 'external' => 1,
+ 'interlaced' => 0,
+ 'has_multicast' => 0,
+ 'multicast_ip' => 'udp://@[ff7e:a40:2a02:ed02:ffff::15]:2015',
+ 'source' => 'Event',
+ 'title' => 'Game HD (720p50 H.264) 6Mbit/s'
+ },
+
+# 'creativia-hd' => {
+# 'type' => 'event',
+# 'quality' => 'hd',
+# 'priority' => 150,
+# 'port' => 5004,
+# 'url' => '/creativia-lounge.ts',
+# 'interlaced' => 0,
+# 'has_multicast' => 0,
+# 'multicast_ip' => 'udp://@[ff7e:a40:2a02:ed02:ffff::15]:2015',
+# 'source' => 'Tech',
+# 'title' => 'Creativia Lounge HD (720p50)'
+# },
+ 'event-sd' => {
+ 'type' => 'event',
+ 'quality' => 'sd',
+ 'priority' => 24,
+ 'port' => 80,
+ 'online' => 0,
+ 'url' => '/event-sd.ts',
+ 'interlaced' => 0,
+ 'has_multicast' => 0,
+ 'multicast_ip' => 'udp://@[ff7e:a40:2a02:ed02:ffff::14]',
+ 'source' => 'Event',
+ 'title' => 'Event SD (576p) (2mbps)'
+ },
+ 'event-superlow' => {
+ 'type' => 'event',
+ 'quality' => 'sd',
+ 'priority' => 25,
+ 'port' => 80,
+ 'online' => 0,
+ 'url' => '/event-superlow.ts',
+ 'interlaced' => 0,
+ 'has_multicast' => 0,
+ 'multicast_ip' => 'udp://@[ff7e:a40:2a02:ed02:ffff::16]',
+ 'source' => 'Event',
+ 'title' => 'Event Superlow SD (360p) (500kbit)'
+ },
+# 'event-flash' => {
+# 'type' => 'event',
+# 'quality' => 'sd',
+# 'priority' => 25,
+# 'interlaced' => 0,
+# 'external' => 1,
+# 'url' => 'http://www.gathering.org/tg13/no/live-tv/',
+# 'source' => 'Event',
+# 'title' => 'Event SD (gathering.org flash player)',
+# },
+ 'south-raw' => {
+ 'type' => 'camera',
+ 'quality' => 'hd',
+ 'priority' => 40,
+ 'url' => "http://cubemap.tg15.gathering.org/southcam.flv", # <-- In use (Need to rebuild row 67 in index.pl)
+ 'port' => 80,
+ 'ts_enabled' => 0,
+ 'interlaced' => 0,
+ 'has_multicast' => 0,
+ 'external' => 1, # <-- In use (Need to rebuild row 67 in index.pl)
+ 'online' => 1,
+# 'multicast_ip' => "udp://@[ff7e:a40:2a02:ed02:ffff::16]",
+ 'source' => 'Tech',
+ 'title' => "Webcam South (HD) (720p H.264) 3Mbit/s",
+ },
+
+ 'roofcam-raw' => {
+ 'type' => 'camera',
+ 'quality' => 'hd',
+ 'priority' => 118,
+ 'url' => "/roofcam.ts",
+ 'port' => 80,
+ 'ts_enabled' => 0,
+ 'interlaced' => 1,
+ 'online' => 0,
+ 'has_multicast' => 0,
+ #'multicast_ip' => "udp://\@[ff7e:a40:2a02:ed02:ffff::15]",
+ 'source' => 'Tech',
+ 'title' => 'Webcam Roof (HD) (1536x1536 H.264) 8mbps',
+ },
+
+ 'noccam-raw' => {
+ 'type' => 'camera',
+ 'quality' => 'hd',
+ 'priority' => 130,
+ 'url' => 'http://cubemap.tg15.gathering.org/noccam.flv',
+ 'port' => 80, # <-- Safe to remove
+ 'external' => 1,
+ 'has_multicast' => 0, # <-- Safe to remove
+ 'interlaced' => 0, # <-- Safe to remove
+ 'online' => 1,
+ 'multicast_ip' => "udp://@[ff7e:a40:2a02:ed02:ffff::18]:2018",# <-- Safe to remove
+ 'source' => "Tech", # <-- Safe to remove
+ 'title' => "Webcam NOC (HD) (720p H.264) 3Mbit/s"
+ },
+);
+
+
+1;