Project

General

Profile

Bug #883 » vdradmind.patch

queaker, 04/19/2012 11:48 PM

View differences:

/usr/bin/vdradmind 2012-04-19 23:45:57.118031121 +0200
$CONFIG{ST_LIVE_ON} = 1;
$CONFIG{ST_URL} = "";
$CONFIG{ST_STREAMDEV_HOST} = ""; # streamdev/xineliboutput host
$CONFIG{ST_STREAMDEV_PATH} = "";
$CONFIG{ST_STREAMDEV_PORT} = 3000;
$CONFIG{ST_XINELIB_PORT} = 37890;
$CONFIG{ST_VIDEODIR} = "";
......
}
if ($FEATURES{STREAMDEV}) {
$url->port($CONFIG{ST_STREAMDEV_PORT});
$url->path($channel);
if ($CONFIG{ST_STREAMDEV_PATH}) {
$url->path($CONFIG{ST_STREAMDEV_PATH} . $channel);
} else {
$url->path($channel);
}
} elsif ($FEATURES{XINELIB}) {
$url->port($CONFIG{ST_XINELIB_PORT});
# No channel support in xineliboutput URLs, need to switch here
......
my $data = "";
foreach (sort({ $a->{vdr_id} <=> $b->{vdr_id} } (@{$CHAN{$wanted}->{channels}}))) {
$url->path($_->{uniq_id});
if ($CONFIG{ST_STREAMDEV_PATH}) {
$url->path($CONFIG{ST_STREAMDEV_PATH} . $_->{uniq_id});
} else {
$url->path($_->{uniq_id});
}
$data .= sprintf("#EXTINF:0,%s\n%s\n", $_->{name}, $url);
}
return (header("200", $CONFIG{TV_MIMETYPE}, $data, sprintf("%s.%s", $filenames[$wanted], $CONFIG{TV_EXT}) ));
(2-2/2)