mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 11:37:03 +00:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73906ab698 | ||
|
|
ec2ec19f68 | ||
|
|
1e8f117988 | ||
|
|
00cf880a5d | ||
|
|
71472a1033 | ||
|
|
0eff9de2ee | ||
|
|
9a19009451 | ||
|
|
04c194ffc7 | ||
|
|
40125dd9bb | ||
|
|
c5a7598544 | ||
|
|
4e8e26a4b3 | ||
|
|
9ec10262d4 | ||
|
|
501701e3d3 | ||
|
|
53b5644973 | ||
|
|
17b4709c30 | ||
|
|
2bff3d0f8f | ||
|
|
6324eaf128 | ||
|
|
b31de2ec23 | ||
|
|
b3b28a5faa | ||
|
|
037adaac86 | ||
|
|
6fa46ca9e3 | ||
|
|
c507f373ff | ||
|
|
e798ff1424 | ||
|
|
613152c6db |
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
.dependencies
|
||||
*.o
|
||||
*.so
|
||||
*~
|
||||
po/*.pot
|
||||
po/*.mo
|
||||
35
HISTORY
35
HISTORY
@@ -34,7 +34,7 @@ VDR Plugin 'iptv' Revision History
|
||||
2008-01-20: Version 0.0.6
|
||||
|
||||
- Fixed some lint warnings.
|
||||
- Added Italian translation (Thanks to Gringo).
|
||||
- Added Italian translation (Thanks to Diego Pierotto).
|
||||
- Added '-Wno-parentheses' to the compiler options.
|
||||
- Mapped 'kInfo' as help key in setup menu.
|
||||
- Refactored statistic collecting code.
|
||||
@@ -43,7 +43,7 @@ VDR Plugin 'iptv' Revision History
|
||||
|
||||
- Updated for vdr-1.5.15.
|
||||
- Replaced asprintf with cString.
|
||||
- Updated French translation (Thanks to Micha<EFBFBD>l Nival).
|
||||
- Updated French translation (Thanks to Michaël Nival).
|
||||
- Modified VDR locale support detection.
|
||||
- Added preliminary automatic Pid scanning functionality.
|
||||
- Modified channels.conf format to enable/disable channel
|
||||
@@ -53,5 +53,34 @@ VDR Plugin 'iptv' Revision History
|
||||
2008-03-27: Version 0.2.0
|
||||
|
||||
- Updated for vdr-1.6.0.
|
||||
- Updated Italian translation (Thanks to Gringo).
|
||||
- Updated Italian translation (Thanks to Diego Pierotto).
|
||||
- Added Russian translation (Thanks to Alexander Gross).
|
||||
|
||||
2008-06-20: Version 0.2.1
|
||||
|
||||
- Updated Italian translation (Thanks to Diego Pierotto).
|
||||
- Removed compatibility mode for old channels.conf format.
|
||||
- Updated vlc2iptv script for new channels.conf format.
|
||||
- Added pluginparam patch for vdr-1.7.0.
|
||||
- Added new example scripts from VDR-WIKI.
|
||||
|
||||
2008-10-12: Version 0.2.2
|
||||
|
||||
- Converted HISTORY and fi_FI.po to UTF-8.
|
||||
- Updated Italian translation (Thanks to Diego Pierotto).
|
||||
- Tweaked pid scanner parameters for HD broadcasts.
|
||||
- Fixed opening of fifo tap.
|
||||
- Updated iptvstream.sh script to support optional video resolution settings.
|
||||
- Optimized streamer thread termination.
|
||||
|
||||
2008-12-16: Version 0.2.3
|
||||
|
||||
- Updated for vdr-1.7.2.
|
||||
- Silenced a compilation warning.
|
||||
|
||||
2009-02-25: Version 0.2.4
|
||||
|
||||
- Updated for vdr-1.7.4.
|
||||
- Fixed blacklisting of PAT section filter.
|
||||
- Set max IPTV device count to VDR's max devices.
|
||||
- Fixed a possible crash in sid and pid scanners.
|
||||
|
||||
5
Makefile
5
Makefile
@@ -1,7 +1,6 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
# Makefile for IPTV plugin
|
||||
#
|
||||
# $Id: Makefile,v 1.27 2008/02/19 22:29:02 rahrenbe Exp $
|
||||
|
||||
# Debugging on/off
|
||||
#IPTV_DEBUG = 1
|
||||
@@ -120,7 +119,7 @@ dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@mkdir $(TMPDIR)/$(ARCHIVE)
|
||||
@cp -a * $(TMPDIR)/$(ARCHIVE)
|
||||
@tar czf $(PACKAGE).tgz -C $(TMPDIR) --exclude CVS $(ARCHIVE)
|
||||
@tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
|
||||
4
README
4
README
@@ -3,8 +3,8 @@ This is an IPTV plugin for the Video Disk Recorder (VDR).
|
||||
Written by: Rolf Ahrenberg
|
||||
< R o l f . A h r e n b e r g @ s c i . f i >
|
||||
|
||||
Antti Sepp<EFBFBD>l<EFBFBD>
|
||||
<a j h s e p p a @ n i k s u l a . h u t . f i >
|
||||
Antti Seppälä
|
||||
< a . s e p p a l a @ g m a i l . c o m >
|
||||
|
||||
Project's homepage: http://www.saunalahti.fi/~rahrenbe/vdr/iptv/
|
||||
|
||||
|
||||
1
common.c
1
common.c
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: common.c,v 1.10 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <vdr/tools.h>
|
||||
|
||||
1
common.h
1
common.h
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: common.h,v 1.20 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_COMMON_H
|
||||
|
||||
5
config.c
5
config.c
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: config.c,v 1.21 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -18,7 +17,7 @@ cIptvConfig::cIptvConfig(void)
|
||||
useBytes(1),
|
||||
sectionFiltering(1)
|
||||
{
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i)
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters); ++i)
|
||||
disabledFilters[i] = -1;
|
||||
memset(configDirectory, '\0', sizeof(configDirectory));
|
||||
}
|
||||
@@ -26,7 +25,7 @@ cIptvConfig::cIptvConfig(void)
|
||||
unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
|
||||
{
|
||||
unsigned int n = 0;
|
||||
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1))
|
||||
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters)))
|
||||
n++;
|
||||
return n;
|
||||
}
|
||||
|
||||
1
config.h
1
config.h
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: config.h,v 1.20 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_CONFIG_H
|
||||
|
||||
53
device.c
53
device.c
@@ -3,13 +3,12 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.c,v 1.85 2008/02/19 22:29:02 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "device.h"
|
||||
|
||||
#define IPTV_MAX_DEVICES 8
|
||||
#define IPTV_MAX_DEVICES MAXDEVICES
|
||||
|
||||
cIptvDevice * IptvDevices[IPTV_MAX_DEVICES] = { NULL };
|
||||
|
||||
@@ -24,7 +23,8 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
pidScanEnabled(false),
|
||||
mutex()
|
||||
{
|
||||
debug("cIptvDevice::cIptvDevice(%d)\n", deviceIndex);
|
||||
//debug("cIptvDevice::cIptvDevice(%d)\n", deviceIndex);
|
||||
isyslog("creating IPTV device %d (CardIndex=%d)", deviceIndex, CardIndex());
|
||||
tsBuffer = new cRingBufferLinear(MEGABYTE(IptvConfig.GetTsBufferSize()),
|
||||
(TS_SIZE * IptvConfig.GetReadBufferTsCount()),
|
||||
false, "IPTV");
|
||||
@@ -49,7 +49,7 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndex);
|
||||
stat(filename, &sb);
|
||||
if (S_ISFIFO(sb.st_mode)) {
|
||||
dvrFd = open(filename, O_WRONLY | O_NONBLOCK);
|
||||
dvrFd = open(filename, O_RDWR | O_NONBLOCK);
|
||||
if (dvrFd >= 0)
|
||||
dsyslog("IPTV device %d redirecting input stream to '%s'", deviceIndex, *filename);
|
||||
}
|
||||
@@ -225,30 +225,6 @@ cString cIptvDevice::GetChannelSettings(const char *IptvParam, int *Parameter, i
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
// compatibility mode for old channels.conf format
|
||||
else if (sscanf(IptvParam, "%a[^|]|%a[^|]|%a[^|]|%u", &tag, &proto, &loc, Parameter) == 4) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
*SidScan = 0;
|
||||
*PidScan = 0;
|
||||
// check if IPTV tag
|
||||
if (strncasecmp(*tagstr, "IPTV", 4) == 0) {
|
||||
// check if protocol is supported and update the pointer
|
||||
if (strncasecmp(*protostr, "UDP", 3) == 0)
|
||||
*Protocol = pUdpProtocol;
|
||||
else if (strncasecmp(*protostr, "HTTP", 4) == 0)
|
||||
*Protocol = pHttpProtocol;
|
||||
else if (strncasecmp(*protostr, "FILE", 4) == 0)
|
||||
*Protocol = pFileProtocol;
|
||||
else if (strncasecmp(*protostr, "EXT", 3) == 0)
|
||||
*Protocol = pExtProtocol;
|
||||
else
|
||||
return NULL;
|
||||
// return location
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -302,11 +278,12 @@ bool cIptvDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
||||
}
|
||||
sidScanEnabled = sidscan ? true : false;
|
||||
pidScanEnabled = pidscan ? true : false;
|
||||
pIptvStreamer->Set(location, parameter, deviceIndex, protocol);
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetChannel(Channel);
|
||||
if (pidScanEnabled && pPidScanner)
|
||||
pPidScanner->SetChannel(Channel);
|
||||
if (pIptvStreamer->Set(location, parameter, deviceIndex, protocol)) {
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetChannel(Channel);
|
||||
if (pidScanEnabled && pPidScanner)
|
||||
pPidScanner->SetChannel(Channel);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -394,7 +371,7 @@ bool cIptvDevice::OpenDvr(void)
|
||||
void cIptvDevice::CloseDvr(void)
|
||||
{
|
||||
debug("cIptvDevice::CloseDvr(%d)\n", deviceIndex);
|
||||
if (pidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetStatus(false);
|
||||
if (pIptvStreamer)
|
||||
pIptvStreamer->Close();
|
||||
@@ -452,14 +429,14 @@ bool cIptvDevice::GetTSPacket(uchar *&Data)
|
||||
}
|
||||
isPacketDelivered = true;
|
||||
Data = p;
|
||||
// Update pid statistics
|
||||
// Update pid statistics
|
||||
AddPidStatistic(ts_pid(p), payload(p));
|
||||
// Send data also to dvr fifo
|
||||
if (dvrFd >= 0)
|
||||
write(dvrFd, p, TS_SIZE);
|
||||
if ((dvrFd >= 0) && (write(dvrFd, p, TS_SIZE) != TS_SIZE))
|
||||
error("ERROR: write failed to FIFO\n");
|
||||
// Analyze incomplete streams with built-in pid analyzer
|
||||
if (pidScanEnabled && pPidScanner)
|
||||
pPidScanner->Process(p);
|
||||
pPidScanner->Process(p);
|
||||
// Run the data through all filters
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
if (secfilters[i])
|
||||
|
||||
1
device.h
1
device.h
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.h,v 1.39 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_DEVICE_H
|
||||
|
||||
3
iptv.c
3
iptv.c
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: iptv.c,v 1.38 2008/03/27 20:27:26 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@@ -21,7 +20,7 @@
|
||||
#error "VDR-1.6.0 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
static const char VERSION[] = "0.2.0";
|
||||
static const char VERSION[] = "0.2.4";
|
||||
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
||||
|
||||
class cPluginIptv : public cPlugin {
|
||||
|
||||
67
iptv/internetradio.sh
Executable file
67
iptv/internetradio.sh
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
|
||||
# internetradio.sh is used by the VDR iptv plugin to transcode an internet
|
||||
# radio stream.
|
||||
#
|
||||
# The script originates from:
|
||||
# http://www.vdr-wiki.de/wiki/index.php/Iptv-plugin
|
||||
#
|
||||
# An example channels.conf entry:
|
||||
# internetradio;IPTV:2:IPTV|S0P0|EXT|internetradio.sh|0:P:0:0:256:0:0:2:0:0:0
|
||||
#
|
||||
# internetradio.sh is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this package; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
# MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
logger "$0: error: Invalid parameter count '$#' $*"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Channels.conf parameter
|
||||
PARAMETER=${1}
|
||||
|
||||
# Iptv plugin listens this port
|
||||
PORT=${2}
|
||||
|
||||
# Stream configuration
|
||||
URL="mms://stream"
|
||||
TITLE="internetradio"
|
||||
|
||||
# Stream temporary files
|
||||
FIFO=/tmp/internetradio.fifo
|
||||
LOG=/dev/null
|
||||
|
||||
{
|
||||
rm -f "${FIFO}"
|
||||
mkfifo "${FIFO}"
|
||||
|
||||
mplayer -dumpstream "${URL}" \
|
||||
-quiet -nolirc -noautosub -noconsolecontrols -novideo -nojoystick \
|
||||
-dumpfile "$FIFO" &
|
||||
|
||||
# Time to connect and fill pipe
|
||||
sleep 3
|
||||
|
||||
# Build audio only stream
|
||||
# PID 0x100/256 = Audio
|
||||
ffmpeg -v -1 \
|
||||
-i "${FIFO}" \
|
||||
-title "${TITLE}" \
|
||||
-f mpegts -acodec mp2 -ac 2 -ab 96k -ar 48000 \
|
||||
- | nc -u 127.0.0.1 ${PORT}
|
||||
|
||||
rm -f "${FIFO}"
|
||||
} > ${LOG} 2>&1
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# iptvstream.sh can be used by the VDR iptv plug-in to transcode external
|
||||
# iptvstream.sh can be used by the VDR iptv plugin to transcode external
|
||||
# sources
|
||||
#
|
||||
# (C) 2007 Rolf Ahrenberg, Antti Sepp<EFBFBD>l<EFBFBD>
|
||||
# (C) 2007 Rolf Ahrenberg, Antti Seppälä
|
||||
#
|
||||
# iptvstream.sh is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -31,8 +31,10 @@ PARAMETER=${1}
|
||||
# Iptv plugin listens this port
|
||||
PORT=${2}
|
||||
|
||||
# Default bitrates for stream transcoding
|
||||
# Default settings for stream transcoding
|
||||
VCODEC=mp2v
|
||||
VBITRATE=2400
|
||||
ACODEC=mpga
|
||||
ABITRATE=320
|
||||
|
||||
# There is a way to specify multiple URLs in the same script. The selection is
|
||||
@@ -40,6 +42,8 @@ ABITRATE=320
|
||||
case ${PARAMETER} in
|
||||
1)
|
||||
URL=""
|
||||
WIDTH=720
|
||||
HEIGHT=576
|
||||
;;
|
||||
2)
|
||||
URL=""
|
||||
@@ -57,13 +61,19 @@ if [ -z "${URL}" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Create transcoding options
|
||||
TRANSCODE_OPTS="vcodec=${VCODEC},acodec=${ACODEC},vb=${VBITRATE},ab=${ABITRATE}"
|
||||
if [ -n "${WIDTH}" -a -n "${HEIGHT}" ] ; then
|
||||
TRANSCODE_OPTS="${TRANSCODE_OPTS},width=${WIDTH},height=${HEIGHT}"
|
||||
fi
|
||||
|
||||
# Create unique pids for the stream
|
||||
let VPID=${PARAMETER}+1
|
||||
let APID=${PARAMETER}+2
|
||||
let SPID=${PARAMETER}+3
|
||||
|
||||
# Capture VLC pid for further management in IPTV plugin
|
||||
vlc "${URL}" --sout "#transcode{vcodec=mp2v,acodec=mpga,vb=${VBITRATE},ab=${ABITRATE}}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy &
|
||||
vlc "${URL}" --sout "#transcode{${TRANSCODE_OPTS}}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy &
|
||||
|
||||
PID=${!}
|
||||
|
||||
|
||||
54
iptv/linein.sh
Executable file
54
iptv/linein.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
|
||||
# linein.sh is used by the VDR iptv plugin to transcode line-in of
|
||||
# a soundcard.
|
||||
#
|
||||
# The script originates from:
|
||||
# http://www.vdr-wiki.de/wiki/index.php/Iptv-plugin
|
||||
#
|
||||
# An example channels.conf entry:
|
||||
# linein;IPTV:5:IPTV|S0P0|EXT|linein.sh|0:P:27500:0:256:0:0:5:5:5:0
|
||||
#
|
||||
# linein.sh is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this package; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
# MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
logger "$0: error: Invalid parameter count '$#' $*"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Channels.conf parameter
|
||||
PARAMETER=${1}
|
||||
|
||||
# Iptv plugin listens this port
|
||||
PORT=${2}
|
||||
|
||||
# Stream configuration
|
||||
TITLE="linein"
|
||||
|
||||
# Stream temporary files
|
||||
LOG=/dev/null
|
||||
|
||||
{
|
||||
# PID 0x100/256 = Audio
|
||||
arecord -q -D hw:0,0 -f dat | \
|
||||
ffmpeg -v -1 \
|
||||
-f wav \
|
||||
-i - \
|
||||
-title "${TITLE}" \
|
||||
-f mpegts -acodec mp2 -ac 2 -ab 128k -ar 48000 \
|
||||
- | nc -nu 127.0.0.1 ${PORT}
|
||||
} > ${LOG} 2>&1
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# vlc2iptv is used by the VDR iptv plug-in to transcode external sources
|
||||
# vlc2iptv is used by the VDR iptv plugin to transcode external sources
|
||||
#
|
||||
# (C) 2007 Rolf Ahrenberg, Antti Sepp<EFBFBD>l<EFBFBD>
|
||||
# (C) 2007 Rolf Ahrenberg, Antti Seppälä
|
||||
# (C) 2007 Tobias Grimm
|
||||
#
|
||||
# vlc2iptv is free software; you can redistribute it and/or modify
|
||||
@@ -52,7 +52,7 @@ lookup_channel_and_pids()
|
||||
[ ! -e "$CHANNELS_CONF" ] && \
|
||||
exit_with_error "channels.conf not found ($CHANNELS_CONF)"
|
||||
|
||||
local CHANNEL_RECORD=`grep ":IPTV|EXT|vlc2iptv|$PARAMETER:" $CHANNELS_CONF`
|
||||
local CHANNEL_RECORD=`grep "[:]IPTV[|][SP][10][SP][10][|]EXT[|]vlc2iptv[|]$PARAMETER[:]" $CHANNELS_CONF`
|
||||
[ -z "$CHANNEL_RECORD" ] && \
|
||||
exit_with_error "no iptv channel with parameter $PARAMETER found"
|
||||
|
||||
|
||||
69
iptv/webcam.sh
Executable file
69
iptv/webcam.sh
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
|
||||
# webcam.sh is used by the VDR iptv plugin to transcode an internet radio
|
||||
# stream remuxed with images (e.g. webcam) to provide a video stream.
|
||||
#
|
||||
# The script originates from:
|
||||
# http://www.vdr-wiki.de/wiki/index.php/Iptv-plugin
|
||||
#
|
||||
# An example channels.conf entry:
|
||||
# webcam;IPTV:3:IPTV|S0P0|EXT|webcam.sh|0:P:0:256:257:0:0:3:0:0:0
|
||||
#
|
||||
# webcam.sh is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this package; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
# MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
logger "$0: error: Invalid parameter count '$#' $*"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Channels.conf parameter
|
||||
PARAMETER=${1}
|
||||
|
||||
# Iptv plugin listens this port
|
||||
PORT=${2}
|
||||
|
||||
# Stream configuration
|
||||
URL="http://stream.address"
|
||||
IMAGE="image.jpg"
|
||||
TITLE="webcam"
|
||||
|
||||
# Stream temporary files
|
||||
FIFO=/tmp/webcam.fifo
|
||||
LOG=/dev/null
|
||||
|
||||
{
|
||||
rm -f "${FIFO}"
|
||||
mkfifo "${FIFO}"
|
||||
|
||||
mplayer -dumpstream "${URL}" \
|
||||
-quiet -nolirc -noautosub -noconsolecontrols -novideo -nojoystick \
|
||||
-dumpfile "${FIFO}" &
|
||||
|
||||
# Time to connect and fill pipe
|
||||
sleep 3
|
||||
|
||||
# Build stream from audiodump with cycle image as video
|
||||
# PID 0x100/256 = Video 0x101/257 = Audio
|
||||
ffmpeg -v -1 \
|
||||
-i "${FIFO}" -r 0.5 -loop_input -i '${IMAGE}' \
|
||||
-title "${TITLE}" \
|
||||
-f mpegts -intra -r 24 -vcodec mpeg2video -b 500k -s 352x288 \
|
||||
-acodec mp2 -ac 2 -ab 96k -ar 48000 \
|
||||
- | nc -u 127.0.0.1 ${PORT}
|
||||
|
||||
rm -f "${FIFO}"
|
||||
} > ${LOG} 2>&1
|
||||
287
patches/vdr-1.7.4-pluginparam.patch
Normal file
287
patches/vdr-1.7.4-pluginparam.patch
Normal file
@@ -0,0 +1,287 @@
|
||||
diff -Nru vdr-1.7.4-vanilla/channels.c vdr-1.7.4-pluginparam/channels.c
|
||||
--- vdr-1.7.4-vanilla/channels.c 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/channels.c 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -188,6 +188,7 @@
|
||||
shortName = strdup("");
|
||||
provider = strdup("");
|
||||
portalName = strdup("");
|
||||
+ pluginParam = strdup("");
|
||||
memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__);
|
||||
inversion = INVERSION_AUTO;
|
||||
bandwidth = 8000000;
|
||||
@@ -211,6 +212,7 @@
|
||||
shortName = NULL;
|
||||
provider = NULL;
|
||||
portalName = NULL;
|
||||
+ pluginParam = NULL;
|
||||
schedule = NULL;
|
||||
linkChannels = NULL;
|
||||
refChannel = NULL;
|
||||
@@ -239,6 +241,7 @@
|
||||
free(shortName);
|
||||
free(provider);
|
||||
free(portalName);
|
||||
+ free(pluginParam);
|
||||
}
|
||||
|
||||
cChannel& cChannel::operator= (const cChannel &Channel)
|
||||
@@ -247,6 +250,7 @@
|
||||
shortName = strcpyrealloc(shortName, Channel.shortName);
|
||||
provider = strcpyrealloc(provider, Channel.provider);
|
||||
portalName = strcpyrealloc(portalName, Channel.portalName);
|
||||
+ pluginParam = strcpyrealloc(pluginParam, Channel.pluginParam);
|
||||
memcpy(&__BeginData__, &Channel.__BeginData__, (char *)&Channel.__EndData__ - (char *)&Channel.__BeginData__);
|
||||
return *this;
|
||||
}
|
||||
@@ -306,9 +310,26 @@
|
||||
guard = Channel->guard;
|
||||
hierarchy = Channel->hierarchy;
|
||||
rollOff = Channel->rollOff;
|
||||
+ if (IsPlug()) pluginParam = strcpyrealloc(pluginParam, Channel->pluginParam);
|
||||
}
|
||||
}
|
||||
|
||||
+bool cChannel::SetPlugTransponderData(int Source, int Frequency, const char *PluginParam)
|
||||
+{
|
||||
+ if (source != Source || frequency != Frequency || (strcmp(pluginParam, PluginParam) != 0)) {
|
||||
+ if (Number()) {
|
||||
+ dsyslog("changing transponder data of channel %d from %s:%d:%s to %s:%d:%s", Number(), *cSource::ToString(source), frequency, pluginParam, *cSource::ToString(Source), Frequency, PluginParam);
|
||||
+ modification |= CHANNELMOD_TRANSP;
|
||||
+ Channels.SetModified();
|
||||
+ }
|
||||
+ source = Source;
|
||||
+ frequency = Frequency;
|
||||
+ pluginParam = strcpyrealloc(pluginParam, PluginParam);
|
||||
+ schedule = NULL;
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff)
|
||||
{
|
||||
// Workarounds for broadcaster stupidity:
|
||||
@@ -438,6 +459,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
+void cChannel::SetPluginParam(const char *PluginParam)
|
||||
+{
|
||||
+ if (!isempty(PluginParam) && strcmp(pluginParam, PluginParam) != 0) {
|
||||
+ if (Number()) {
|
||||
+ dsyslog("changing plugin parameters of channel %d from '%s' to '%s'", Number(), pluginParam, PluginParam);
|
||||
+ modification |= CHANNELMOD_TRANSP;
|
||||
+ Channels.SetModified();
|
||||
+ }
|
||||
+ pluginParam = strcpyrealloc(pluginParam, PluginParam);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#define STRDIFF 0x01
|
||||
#define VALDIFF 0x02
|
||||
|
||||
@@ -632,7 +665,7 @@
|
||||
if (isdigit(type))
|
||||
type = 'S';
|
||||
#define ST(s) if (strchr(s, type))
|
||||
- char buffer[64];
|
||||
+ char buffer[256];
|
||||
char *q = buffer;
|
||||
*q = 0;
|
||||
ST(" S ") q += sprintf(q, "%c", polarization);
|
||||
@@ -646,6 +679,7 @@
|
||||
ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues));
|
||||
ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
||||
ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues));
|
||||
+ ST("P ") snprintf(buffer, sizeof(buffer), "%s", pluginParam);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -674,7 +708,7 @@
|
||||
|
||||
bool cChannel::StringToParameters(const char *s)
|
||||
{
|
||||
- while (s && *s) {
|
||||
+ while (s && *s && !IsPlug()) {
|
||||
switch (toupper(*s)) {
|
||||
case 'A': s = SkipDigits(s); break; // for compatibility with the "multiproto" approach - may be removed in future versions
|
||||
case 'B': s = ParseParameter(s, bandwidth, BandwidthValues); break;
|
||||
@@ -792,7 +826,7 @@
|
||||
dpids[0] = 0;
|
||||
ok = false;
|
||||
if (parambuf && sourcebuf && vpidbuf && apidbuf) {
|
||||
- ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0;
|
||||
+ ok = ((source = cSource::FromString(sourcebuf)) >= 0) && StringToParameters(parambuf);
|
||||
|
||||
char *p;
|
||||
if ((p = strchr(vpidbuf, '=')) != NULL) {
|
||||
@@ -887,6 +921,7 @@
|
||||
shortName = strcpyrealloc(shortName, p);
|
||||
}
|
||||
name = strcpyrealloc(name, namebuf);
|
||||
+ if (IsPlug()) pluginParam = strcpyrealloc(pluginParam, parambuf);
|
||||
|
||||
free(parambuf);
|
||||
free(sourcebuf);
|
||||
diff -Nru vdr-1.7.4-vanilla/channels.h vdr-1.7.4-pluginparam/channels.h
|
||||
--- vdr-1.7.4-vanilla/channels.h 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/channels.h 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -116,6 +116,7 @@
|
||||
char *shortName;
|
||||
char *provider;
|
||||
char *portalName;
|
||||
+ char *pluginParam;
|
||||
int __BeginData__;
|
||||
int frequency; // MHz
|
||||
int source;
|
||||
@@ -171,6 +172,7 @@
|
||||
int Frequency(void) const { return frequency; } ///< Returns the actual frequency, as given in 'channels.conf'
|
||||
int Transponder(void) const; ///< Returns the transponder frequency in MHz, plus the polarization in case of sat
|
||||
static int Transponder(int Frequency, char Polarization); ///< builds the transponder from the given Frequency and Polarization
|
||||
+ const char *PluginParam(void) const { return pluginParam; }
|
||||
int Source(void) const { return source; }
|
||||
int Srate(void) const { return srate; }
|
||||
int Vpid(void) const { return vpid; }
|
||||
@@ -208,6 +210,7 @@
|
||||
int RollOff(void) const { return rollOff; }
|
||||
const cLinkChannels* LinkChannels(void) const { return linkChannels; }
|
||||
const cChannel *RefChannel(void) const { return refChannel; }
|
||||
+ bool IsPlug(void) const { return cSource::IsPlug(source); }
|
||||
bool IsCable(void) const { return cSource::IsCable(source); }
|
||||
bool IsSat(void) const { return cSource::IsSat(source); }
|
||||
bool IsTerr(void) const { return cSource::IsTerr(source); }
|
||||
@@ -215,12 +218,14 @@
|
||||
bool HasTimer(void) const;
|
||||
int Modification(int Mask = CHANNELMOD_ALL);
|
||||
void CopyTransponderData(const cChannel *Channel);
|
||||
+ bool SetPlugTransponderData(int Source, int Frequency, const char *PluginParam);
|
||||
bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff);
|
||||
bool SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH);
|
||||
bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission);
|
||||
void SetId(int Nid, int Tid, int Sid, int Rid = 0);
|
||||
void SetName(const char *Name, const char *ShortName, const char *Provider);
|
||||
void SetPortalName(const char *PortalName);
|
||||
+ void SetPluginParam(const char *PluginParam);
|
||||
void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid);
|
||||
void SetCaIds(const int *CaIds); // list must be zero-terminated
|
||||
void SetCaDescriptors(int Level);
|
||||
diff -Nru vdr-1.7.4-vanilla/config.h vdr-1.7.4-pluginparam/config.h
|
||||
--- vdr-1.7.4-vanilla/config.h 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/config.h 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -30,6 +30,8 @@
|
||||
#define APIVERSION "1.7.4"
|
||||
#define APIVERSNUM 10704 // Version * 10000 + Major * 100 + Minor
|
||||
|
||||
+#define PLUGINPARAMPATCHVERSNUM 1
|
||||
+
|
||||
// When loading plugins, VDR searches them by their APIVERSION, which
|
||||
// may be smaller than VDRVERSION in case there have been no changes to
|
||||
// VDR header files since the last APIVERSION. This allows compiled
|
||||
diff -Nru vdr-1.7.4-vanilla/menu.c vdr-1.7.4-pluginparam/menu.c
|
||||
--- vdr-1.7.4-vanilla/menu.c 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/menu.c 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -190,6 +190,7 @@
|
||||
cChannel *channel;
|
||||
cChannel data;
|
||||
char name[256];
|
||||
+ char pluginParam[256];
|
||||
void Setup(void);
|
||||
public:
|
||||
cMenuEditChannel(cChannel *Channel, bool New = false);
|
||||
@@ -222,6 +223,7 @@
|
||||
|
||||
// Parameters for all types of sources:
|
||||
strn0cpy(name, data.name, sizeof(name));
|
||||
+ strn0cpy(pluginParam, data.pluginParam, sizeof(pluginParam));
|
||||
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name)));
|
||||
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
|
||||
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
|
||||
@@ -254,6 +256,7 @@
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues));
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues));
|
||||
ST(" S ") Add(new cMenuEditMapItem( tr("Rolloff"), &data.rollOff, RollOffValues));
|
||||
+ ST("P ") Add(new cMenuEditStrItem( tr("Parameters"), pluginParam, sizeof(pluginParam), tr(FileNameChars)));
|
||||
|
||||
SetCurrent(Get(current));
|
||||
Display();
|
||||
@@ -268,6 +271,7 @@
|
||||
if (Key == kOk) {
|
||||
if (Channels.HasUniqueChannelID(&data, channel)) {
|
||||
data.name = strcpyrealloc(data.name, name);
|
||||
+ data.pluginParam = strcpyrealloc(data.pluginParam, pluginParam);
|
||||
if (channel) {
|
||||
*channel = data;
|
||||
isyslog("edited channel %d %s", channel->Number(), *data.ToText());
|
||||
diff -Nru vdr-1.7.4-vanilla/po/fi_FI.po vdr-1.7.4-pluginparam/po/fi_FI.po
|
||||
--- vdr-1.7.4-vanilla/po/fi_FI.po 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/po/fi_FI.po 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -1010,3 +1010,6 @@
|
||||
#, c-format
|
||||
msgid "VDR will shut down in %s minutes"
|
||||
msgstr "VDR sammuu %s minuutin kuluttua"
|
||||
+
|
||||
+msgid "Parameters"
|
||||
+msgstr "Parametrit"
|
||||
diff -Nru vdr-1.7.4-vanilla/po/fr_FR.po vdr-1.7.4-pluginparam/po/fr_FR.po
|
||||
--- vdr-1.7.4-vanilla/po/fr_FR.po 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/po/fr_FR.po 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -1013,3 +1013,6 @@
|
||||
#, c-format
|
||||
msgid "VDR will shut down in %s minutes"
|
||||
msgstr "VDR s'arr<72>tera dans %s minutes"
|
||||
+
|
||||
+msgid "Parameters"
|
||||
+msgstr "Param<61>tres"
|
||||
diff -Nru vdr-1.7.4-vanilla/sources.c vdr-1.7.4-pluginparam/sources.c
|
||||
--- vdr-1.7.4-vanilla/sources.c 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/sources.c 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -37,6 +37,7 @@
|
||||
char buffer[16];
|
||||
char *q = buffer;
|
||||
switch (Code & st_Mask) {
|
||||
+ case stPlug: *q++ = 'P'; break;
|
||||
case stCable: *q++ = 'C'; break;
|
||||
case stSat: *q++ = 'S';
|
||||
{
|
||||
@@ -56,6 +57,7 @@
|
||||
{
|
||||
int type = stNone;
|
||||
switch (toupper(*s)) {
|
||||
+ case 'P': type = stPlug; break;
|
||||
case 'C': type = stCable; break;
|
||||
case 'S': type = stSat; break;
|
||||
case 'T': type = stTerr; break;
|
||||
diff -Nru vdr-1.7.4-vanilla/sources.conf vdr-1.7.4-pluginparam/sources.conf
|
||||
--- vdr-1.7.4-vanilla/sources.conf 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/sources.conf 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -194,3 +194,7 @@
|
||||
# Terrestrial
|
||||
|
||||
T Terrestrial
|
||||
+
|
||||
+# Plugin
|
||||
+
|
||||
+P Plugin
|
||||
diff -Nru vdr-1.7.4-vanilla/sources.h vdr-1.7.4-pluginparam/sources.h
|
||||
--- vdr-1.7.4-vanilla/sources.h 2009-01-26 11:44:48.000000000 +0200
|
||||
+++ vdr-1.7.4-pluginparam/sources.h 2009-02-24 13:31:33.000000000 +0200
|
||||
@@ -16,10 +16,11 @@
|
||||
public:
|
||||
enum eSourceType {
|
||||
stNone = 0x0000,
|
||||
+ stPlug = 0x2000,
|
||||
stCable = 0x4000,
|
||||
stSat = 0x8000,
|
||||
stTerr = 0xC000,
|
||||
- st_Mask = 0xC000,
|
||||
+ st_Mask = 0xE000,
|
||||
st_Neg = 0x0800,
|
||||
st_Pos = 0x07FF,
|
||||
};
|
||||
@@ -35,6 +36,7 @@
|
||||
static cString ToString(int Code);
|
||||
static int FromString(const char *s);
|
||||
static int FromData(eSourceType SourceType, int Position = 0, bool East = false);
|
||||
+ static bool IsPlug(int Code) { return (Code & st_Mask) == stPlug; }
|
||||
static bool IsCable(int Code) { return (Code & st_Mask) == stCable; }
|
||||
static bool IsSat(int Code) { return (Code & st_Mask) == stSat; }
|
||||
static bool IsTerr(int Code) { return (Code & st_Mask) == stTerr; }
|
||||
75
pidscanner.c
75
pidscanner.c
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: pidscanner.c,v 1.6 2008/02/02 21:06:14 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
@@ -11,8 +10,8 @@
|
||||
|
||||
#define PIDSCANNER_TIMEOUT_IN_MS 15000 /* 15s timeout for detection */
|
||||
#define PIDSCANNER_APID_COUNT 5 /* minimum count of audio pid samples for pid detection */
|
||||
#define PIDSCANNER_VPID_COUNT 10 /* minimum count of video pid samples for pid detection */
|
||||
#define PIDSCANNER_PID_DELTA_COUNT 50 /* minimum count of pid samples for audio/video only pid detection */
|
||||
#define PIDSCANNER_VPID_COUNT 5 /* minimum count of video pid samples for pid detection */
|
||||
#define PIDSCANNER_PID_DELTA_COUNT 100 /* minimum count of pid samples for audio/video only pid detection */
|
||||
|
||||
cPidScanner::cPidScanner(void)
|
||||
: timeout(0),
|
||||
@@ -92,61 +91,67 @@ void cPidScanner::Process(const uint8_t* buf)
|
||||
// Stream ID
|
||||
if ((sid >= 0xC0) && (sid <= 0xDF)) {
|
||||
if (pid < Apid) {
|
||||
debug("Found lower Apid: 0x%X instead of 0x%X\n", pid, Apid);
|
||||
debug("cPidScanner::Process: Found lower Apid: 0x%X instead of 0x%X\n", pid, Apid);
|
||||
Apid = pid;
|
||||
numApids = 1;
|
||||
}
|
||||
else if (pid == Apid) {
|
||||
++numApids;
|
||||
debug("Incrementing Apids, now at %d\n", numApids);
|
||||
debug("cPidScanner::Process: Incrementing Apids, now at %d\n", numApids);
|
||||
}
|
||||
}
|
||||
else if ((sid >= 0xE0) && (sid <= 0xEF)) {
|
||||
if (pid < Vpid) {
|
||||
debug("Found lower Vpid: 0x%X instead of 0x%X\n", pid, Vpid);
|
||||
debug("cPidScanner::Process: Found lower Vpid: 0x%X instead of 0x%X\n", pid, Vpid);
|
||||
Vpid = pid;
|
||||
numVpids = 1;
|
||||
}
|
||||
else if (pid == Vpid) {
|
||||
++numVpids;
|
||||
debug("Incrementing Vpids, now at %d\n", numVpids);
|
||||
debug("cPidScanner::Process: Incrementing Vpids, now at %d\n", numVpids);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((numVpids > PIDSCANNER_VPID_COUNT) && (numApids > PIDSCANNER_APID_COUNT)) ||
|
||||
(abs(numApids - numVpids) > PIDSCANNER_PID_DELTA_COUNT)) {
|
||||
if (((numVpids >= PIDSCANNER_VPID_COUNT) && (numApids >= PIDSCANNER_APID_COUNT)) ||
|
||||
(abs(numApids - numVpids) >= PIDSCANNER_PID_DELTA_COUNT)) {
|
||||
// Lock channels for pid updates
|
||||
if (!Channels.Lock(true, 10)) {
|
||||
timeout.Set(PIDSCANNER_TIMEOUT_IN_MS);
|
||||
return;
|
||||
}
|
||||
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
||||
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
|
||||
int Dpids[MAXDPIDS + 1] = { 0 };
|
||||
int Spids[MAXSPIDS + 1] = { 0 };
|
||||
char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" };
|
||||
char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
||||
char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||
int Ppid = IptvChannel->Ppid();
|
||||
int Tpid = IptvChannel->Tpid();
|
||||
bool foundApid = false;
|
||||
if (numVpids <= PIDSCANNER_VPID_COUNT)
|
||||
Vpid = 0; // No detected video pid
|
||||
else if (numApids <= PIDSCANNER_APID_COUNT)
|
||||
Apid = 0; // No detected audio pid
|
||||
for (unsigned int i = 1; i < MAXAPIDS; ++i) {
|
||||
Apids[i] = IptvChannel->Apid(i);
|
||||
if (Apids[i] && (Apids[i] == Apid))
|
||||
foundApid = true;
|
||||
}
|
||||
if (!foundApid)
|
||||
Apids[0] = Apid;
|
||||
for (unsigned int i = 0; i < MAXDPIDS; ++i)
|
||||
Dpids[i] = IptvChannel->Dpid(i);
|
||||
for (unsigned int i = 0; i < MAXSPIDS; ++i)
|
||||
Spids[i] = IptvChannel->Spid(i);
|
||||
debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid);
|
||||
IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
|
||||
if (IptvChannel) {
|
||||
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
|
||||
int Dpids[MAXDPIDS + 1] = { 0 };
|
||||
int Spids[MAXSPIDS + 1] = { 0 };
|
||||
char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" };
|
||||
char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
||||
char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||
int Ppid = IptvChannel->Ppid();
|
||||
int Tpid = IptvChannel->Tpid();
|
||||
bool foundApid = false;
|
||||
if (numVpids < PIDSCANNER_VPID_COUNT)
|
||||
Vpid = 0; // No detected video pid
|
||||
else if (numApids < PIDSCANNER_APID_COUNT)
|
||||
Apid = 0; // No detected audio pid
|
||||
for (unsigned int i = 1; i < MAXAPIDS; ++i) {
|
||||
Apids[i] = IptvChannel->Apid(i);
|
||||
if (Apids[i] && (Apids[i] == Apid))
|
||||
foundApid = true;
|
||||
}
|
||||
if (!foundApid)
|
||||
Apids[0] = Apid;
|
||||
for (unsigned int i = 0; i < MAXDPIDS; ++i)
|
||||
Dpids[i] = IptvChannel->Dpid(i);
|
||||
for (unsigned int i = 0; i < MAXSPIDS; ++i)
|
||||
Spids[i] = IptvChannel->Spid(i);
|
||||
debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid);
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10700
|
||||
IptvChannel->SetPids(Vpid, Ppid, 0, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
|
||||
#else
|
||||
IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
|
||||
#endif
|
||||
}
|
||||
Channels.Unlock();
|
||||
process = false;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: pidscanner.h,v 1.3 2008/02/02 20:51:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __PIDSCANNER_H
|
||||
|
||||
38
po/fi_FI.po
38
po/fi_FI.po
@@ -12,7 +12,7 @@ msgstr ""
|
||||
"Last-Translator: Rolf Ahrenberg\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-15\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "PAT (0x00)"
|
||||
@@ -79,13 +79,13 @@ msgid "Nid"
|
||||
msgstr "Verkko-ID"
|
||||
|
||||
msgid "Tid"
|
||||
msgstr "L<EFBFBD>hete-ID"
|
||||
msgstr "Lähete-ID"
|
||||
|
||||
msgid "Rid"
|
||||
msgstr "Radio-ID"
|
||||
|
||||
msgid "Cannot find unique channel settings!"
|
||||
msgstr "Yksil<EFBFBD>llisi<EFBFBD> kanava-asetuksia ei l<EFBFBD>ydet<EFBFBD>!"
|
||||
msgstr "Yksilöllisiä kanava-asetuksia ei löydetä!"
|
||||
|
||||
msgid "IPTV Channels"
|
||||
msgstr "IPTV-kanavat"
|
||||
@@ -116,21 +116,21 @@ msgid ""
|
||||
"\n"
|
||||
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
|
||||
msgstr ""
|
||||
"M<EFBFBD><EFBFBD>rit<EFBFBD> rengaspuskurin koko TS-l<EFBFBD>hetteelle megatavuina.\n"
|
||||
"Määritä rengaspuskurin koko TS-lähetteelle megatavuina.\n"
|
||||
"\n"
|
||||
"Pienempi rengaspuskuri v<EFBFBD>hent<EFBFBD><EFBFBD> muistinkulutusta, mutta on virhealttiimpi puskurin ylivuodolle."
|
||||
"Pienempi rengaspuskuri vähentää muistinkulutusta, mutta on virhealttiimpi puskurin ylivuodolle."
|
||||
|
||||
msgid "TS buffer prefill ratio [%]"
|
||||
msgstr "TS-puskurin esit<EFBFBD>ytt<EFBFBD>aste [%]"
|
||||
msgstr "TS-puskurin esitäyttöaste [%]"
|
||||
|
||||
msgid ""
|
||||
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
|
||||
"\n"
|
||||
"This is useful if streaming media over a slow or unreliable connection."
|
||||
msgstr ""
|
||||
"M<EFBFBD><EFBFBD>rittele TS-rengaspuskurin esit<EFBFBD>ytt<EFBFBD>aste, jonka j<EFBFBD>lkeen l<EFBFBD>hetett<EFBFBD> aletaan siirt<EFBFBD>m<EFBFBD><EFBFBD>n eteenp<EFBFBD>in VDR:lle.\n"
|
||||
"Määrittele TS-rengaspuskurin esitäyttöaste, jonka jälkeen lähetettä aletaan siirtämään eteenpäin VDR:lle.\n"
|
||||
"\n"
|
||||
"Puskurin esit<EFBFBD>ytt<EFBFBD> parantaa suoratoistoa hitailla ja ep<EFBFBD>luotettavilla yhteyksill<EFBFBD>."
|
||||
"Puskurin esitäyttö parantaa suoratoistoa hitailla ja epäluotettavilla yhteyksillä."
|
||||
|
||||
msgid "EXT protocol base port"
|
||||
msgstr "EXT-protokollan perusportti"
|
||||
@@ -140,12 +140,12 @@ msgid ""
|
||||
"\n"
|
||||
"The port range is defined by the number of IPTV devices. This setting sets the port which is listened for connections from external applications when using the EXT protocol."
|
||||
msgstr ""
|
||||
"M<EFBFBD><EFBFBD>rittele EXT-protokollan k<EFBFBD>ytt<EFBFBD>m<EFBFBD> perusportti.\n"
|
||||
"Määrittele EXT-protokollan käyttämä perusportti.\n"
|
||||
"\n"
|
||||
"Porttiavaruuden koko m<EFBFBD><EFBFBD>r<EFBFBD>ytyy k<EFBFBD>ytettyjen IPTV-laitteiden mukaan. Laajennos lukee EXT-protokollan yhteydess<EFBFBD> perusportista dataa, jota ulkoiset ohjelmistot tarjoavat."
|
||||
"Porttiavaruuden koko määräytyy käytettyjen IPTV-laitteiden mukaan. Laajennos lukee EXT-protokollan yhteydessä perusportista dataa, jota ulkoiset ohjelmistot tarjoavat."
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "K<EFBFBD>yt<EFBFBD> sektioiden suodatusta"
|
||||
msgstr "Käytä sektioiden suodatusta"
|
||||
|
||||
msgid ""
|
||||
"Define whether the section filtering shall be used.\n"
|
||||
@@ -153,29 +153,29 @@ msgid ""
|
||||
"Section filtering means that IPTV plugin tries to parse and provide VDR with secondary data about the currently active stream. VDR can then use this data for providing various functionalities such as automatic pid change detection and EPG etc.\n"
|
||||
"Enabling this feature does not affect streams that do not contain section data."
|
||||
msgstr ""
|
||||
"M<EFBFBD><EFBFBD>rittele suodatuksen k<EFBFBD>ytt<EFBFBD> sektioille.\n"
|
||||
"Määrittele suodatuksen käyttö sektioille.\n"
|
||||
"\n"
|
||||
"IPTV-laajennos voi suodattaa l<EFBFBD>hetteest<EFBFBD> VDR:lle tarjottavia sektioita, joita k<EFBFBD>ytet<EFBFBD><EFBFBD>n esim. ohjelmaoppaan ja ohjelmatunnisteiden (PID) p<EFBFBD>ivitt<EFBFBD>miseen.\n"
|
||||
"Toiminto ei vaikuta l<EFBFBD>hetteeseen, jossa ei ole sektioita."
|
||||
"IPTV-laajennos voi suodattaa lähetteestä VDR:lle tarjottavia sektioita, joita käytetään esim. ohjelmaoppaan ja ohjelmatunnisteiden (PID) päivittämiseen.\n"
|
||||
"Toiminto ei vaikuta lähetteeseen, jossa ei ole sektioita."
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Poista suodattimia k<EFBFBD>yt<EFBFBD>st<EFBFBD>"
|
||||
msgstr "Poista suodattimia käytöstä"
|
||||
|
||||
msgid ""
|
||||
"Define number of section filters to be disabled.\n"
|
||||
"\n"
|
||||
"Certain section filters might cause some unwanted behaviour to VDR such as time being falsely synchronized. By black-listing the filters here useful section data can be left intact for VDR to process."
|
||||
msgstr ""
|
||||
"M<EFBFBD><EFBFBD>rittele k<EFBFBD>yt<EFBFBD>st<EFBFBD> poistettavien suodattimien lukum<EFBFBD><EFBFBD>r<EFBFBD> sektioille.\n"
|
||||
"Määrittele käytöstä poistettavien suodattimien lukumäärä sektioille.\n"
|
||||
"\n"
|
||||
"Tietyt sektiot saattavat aiheuttaa virheellist<EFBFBD> toimintaa VDR:ss<EFBFBD>, esimerkiksi asettavat v<EFBFBD><EFBFBD>r<EFBFBD>n kellonajan, ja n<EFBFBD>iden poistaminen auttaa VDR:<EFBFBD><EFBFBD> toimimaan kunnolla j<EFBFBD>ljelle j<EFBFBD><EFBFBD>vien sektioiden kanssa."
|
||||
"Tietyt sektiot saattavat aiheuttaa virheellistä toimintaa VDR:ssä, esimerkiksi asettavat väärän kellonajan, ja näiden poistaminen auttaa VDR:ää toimimaan kunnolla jäljelle jäävien sektioiden kanssa."
|
||||
|
||||
#. TRANSLATORS: note the singular!
|
||||
msgid "Disable filter"
|
||||
msgstr "Poista suodatin k<EFBFBD>yt<EFBFBD>st<EFBFBD>"
|
||||
msgstr "Poista suodatin käytöstä"
|
||||
|
||||
msgid "Define an ill-behaving filter to be blacklisted."
|
||||
msgstr "M<EFBFBD><EFBFBD>rittele k<EFBFBD>yt<EFBFBD>st<EFBFBD> poistettava suodatin, joka lis<EFBFBD>t<EFBFBD><EFBFBD>n mustalle listalle."
|
||||
msgstr "Määrittele käytöstä poistettava suodatin, joka lisätään mustalle listalle."
|
||||
|
||||
msgid "Help"
|
||||
msgstr "Opaste"
|
||||
|
||||
23
po/it_IT.po
23
po/it_IT.po
@@ -1,15 +1,15 @@
|
||||
# VDR plugin language source file.
|
||||
# Copyright (C) 2007 Rolf Ahrenberg & Antti Seppala
|
||||
# This file is distributed under the same license as the iptv package.
|
||||
# Gringo <vdr-italian@tiscali.it>, 2008.
|
||||
# Diego Pierotto <vdr-italian@tiscali.it>, 2008.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.2.0\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2008-02-22 02:08+0100\n"
|
||||
"Last-Translator: Gringo <vdr-italian@tiscali.it>\n"
|
||||
"PO-Revision-Date: 2008-07-13 03:28+0100\n"
|
||||
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
|
||||
"Language-Team: Italian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
@@ -38,7 +38,7 @@ msgid "TDT (0x70)"
|
||||
msgstr "TDT (0x70)"
|
||||
|
||||
msgid "Experience the IPTV"
|
||||
msgstr "Esperimenta la IPTV"
|
||||
msgstr "Scopri la IPTV"
|
||||
|
||||
msgid "UDP"
|
||||
msgstr "UDP"
|
||||
@@ -117,19 +117,19 @@ msgid ""
|
||||
"\n"
|
||||
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
|
||||
msgstr ""
|
||||
"Definisce una dimensione del buffer in megabytes per i flussi di trasporto.\n"
|
||||
"Definisci una dimensione del buffer in MB per i flussi di trasporto.\n"
|
||||
"\n"
|
||||
"Dimensioni più piccole aiutano il consumo di memoria, ma sono più inclini a generare buffer overflows."
|
||||
|
||||
msgid "TS buffer prefill ratio [%]"
|
||||
msgstr "Percentuale preriempimento buffer TS [%]"
|
||||
msgstr "Riempimento buffer TS [%]"
|
||||
|
||||
msgid ""
|
||||
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
|
||||
"\n"
|
||||
"This is useful if streaming media over a slow or unreliable connection."
|
||||
msgstr ""
|
||||
"Definisce un rapporto di preriempimento del buffer per i flussi di trasporto prima che i dati siano trasferiti a VDR.\n"
|
||||
"Definisci un rapporto di riempimento del buffer per i flussi di trasporto prima che i dati siano trasferiti a VDR.\n"
|
||||
"\n"
|
||||
"Questo è utile se si trasmette dati su una connessione lenta oppure inaffidabile."
|
||||
|
||||
@@ -141,7 +141,7 @@ msgid ""
|
||||
"\n"
|
||||
"The port range is defined by the number of IPTV devices. This setting sets the port which is listened for connections from external applications when using the EXT protocol."
|
||||
msgstr ""
|
||||
"Definisce una porta base usata dal protocollo EXT.\n"
|
||||
"Definisci una porta base usata dal protocollo EXT.\n"
|
||||
"\n"
|
||||
"Il range della porta è definito dal numero di periferiche IPTV. Questo parametro imposta la porta che è in ascolto per connessioni da applicazioni esterne quando si usa il protocollo EXT."
|
||||
|
||||
@@ -154,7 +154,7 @@ msgid ""
|
||||
"Section filtering means that IPTV plugin tries to parse and provide VDR with secondary data about the currently active stream. VDR can then use this data for providing various functionalities such as automatic pid change detection and EPG etc.\n"
|
||||
"Enabling this feature does not affect streams that do not contain section data."
|
||||
msgstr ""
|
||||
"Definisce se la sezione filtri sarà utilizzata.\n"
|
||||
"Definisci se la sezione filtri sarà utilizzata.\n"
|
||||
"\n"
|
||||
"La sezioni filtri significa che il plugin IPTV prova a elaborare e fornire a VDR dati secondari sul flusso attualmente attivo. VDR può successivamente usare questi dati per fornire varie funzionalità come il rilevamento del cambio Pid automatico, EPG, etc.\n"
|
||||
"Abilitare questa funzione non influisce sui flussi che non contengono dati di sezione."
|
||||
@@ -167,7 +167,7 @@ msgid ""
|
||||
"\n"
|
||||
"Certain section filters might cause some unwanted behaviour to VDR such as time being falsely synchronized. By black-listing the filters here useful section data can be left intact for VDR to process."
|
||||
msgstr ""
|
||||
"Definisce che il numero di sezione filtri sarà disabilitato.\n"
|
||||
"Definisci il numero di sezione filtri che sarà disabilitato.\n"
|
||||
"\n"
|
||||
"Certe sezioni filtri potrebbero generare alcuni comportamenti indesiderati per VDR come la non sincronizzazione dell'ora. Inserendo qui i filtri nella lista nera i dati di sezione utili possono essere lasciati intatti per l'elaborazione da parte di VDR."
|
||||
|
||||
@@ -176,7 +176,8 @@ msgid "Disable filter"
|
||||
msgstr "Disabilita filtro"
|
||||
|
||||
msgid "Define an ill-behaving filter to be blacklisted."
|
||||
msgstr "Definisce che un filtro corrotto sia messo nella lista nera."
|
||||
msgstr "Definisci un filtro corrotto che sarà messo nella lista nera."
|
||||
|
||||
msgid "Help"
|
||||
msgstr "Aiuto"
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolext.c,v 1.24 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <sys/wait.h>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolext.h,v 1.10 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_PROTOCOLEXT_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolfile.c,v 1.15 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolfile.h,v 1.8 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_PROTOCOLFILE_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolhttp.c,v 1.24 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -34,7 +33,6 @@ cIptvProtocolHttp::~cIptvProtocolHttp()
|
||||
// Free allocated memory
|
||||
free(streamPath);
|
||||
free(streamAddr);
|
||||
|
||||
}
|
||||
|
||||
bool cIptvProtocolHttp::Connect(void)
|
||||
@@ -237,7 +235,7 @@ bool cIptvProtocolHttp::Set(const char* Location, const int Parameter, const int
|
||||
else
|
||||
streamPath = strcpyrealloc(streamPath, "/");
|
||||
socketPort = Parameter;
|
||||
debug("http://%s:%d%s\n", streamAddr, socketPort, streamPath);
|
||||
//debug("http://%s:%d%s\n", streamAddr, socketPort, streamPath);
|
||||
// Re-connect the socket
|
||||
Connect();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolhttp.h,v 1.12 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_PROTOCOLHTTP_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolif.h,v 1.8 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_PROTOCOLIF_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocoludp.c,v 1.22 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocoludp.h,v 1.13 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_PROTOCOLUDP_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sectionfilter.c,v 1.19 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "sectionfilter.h"
|
||||
@@ -227,7 +226,7 @@ void cIptvSectionFilter::ProcessData(const uint8_t* buf)
|
||||
error("Not TS packet: 0x%X\n", buf[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Stop if not the PID this filter is looking for
|
||||
if (ts_pid(buf) != pid)
|
||||
return;
|
||||
@@ -241,7 +240,7 @@ void cIptvSectionFilter::ProcessData(const uint8_t* buf)
|
||||
|
||||
uint8_t cc = buf[3] & 0x0f;
|
||||
int ccok = ((feedcc + 1) & 0x0f) == cc;
|
||||
feedcc = cc;
|
||||
feedcc = cc;
|
||||
|
||||
int dc_i = 0;
|
||||
if (buf[3] & 0x20) {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sectionfilter.h,v 1.8 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_SECTIONFILTER_H
|
||||
|
||||
36
setup.c
36
setup.c
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.c,v 1.57 2008/02/19 22:29:02 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@@ -35,7 +34,7 @@ private:
|
||||
eProtocolCount
|
||||
};
|
||||
struct tIptvChannel {
|
||||
int frequency, source, protocol, parameter, vpid, ppid, tpid, sid, nid, tid, rid;
|
||||
int frequency, source, protocol, parameter, vpid, ppid, vtype, tpid, sid, nid, tid, rid;
|
||||
int apid[MAXAPIDS + 1], dpid[MAXDPIDS + 1], spid[MAXSPIDS + 1], caids[MAXCAIDS + 1];
|
||||
int sidscan, pidscan;
|
||||
char name[256], location[256];
|
||||
@@ -58,7 +57,7 @@ cIptvMenuEditChannel::cIptvMenuEditChannel(cChannel *Channel, bool New)
|
||||
protocols[eProtocolUDP] = tr("UDP");
|
||||
protocols[eProtocolHTTP] = tr("HTTP");
|
||||
protocols[eProtocolFILE] = tr("FILE");
|
||||
protocols[eProtocolEXT] = tr("EXT");
|
||||
protocols[eProtocolEXT] = tr("EXT");
|
||||
channel = Channel;
|
||||
GetChannelData(channel);
|
||||
if (New) {
|
||||
@@ -117,29 +116,6 @@ cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Parameter,
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
else if (sscanf(Param, "%a[^|]|%a[^|]|%a[^|]|%d", &tag, &proto, &loc, Parameter) == 4) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
*SidScan = 0;
|
||||
*PidScan = 0;
|
||||
// check if IPTV tag
|
||||
if (strncasecmp(*tagstr, "IPTV", 4) == 0) {
|
||||
// check if protocol is supported and update the pointer
|
||||
if (strncasecmp(*protostr, "UDP", 3) == 0)
|
||||
*Protocol = eProtocolUDP;
|
||||
else if (strncasecmp(*protostr, "HTTP", 4) == 0)
|
||||
*Protocol = eProtocolHTTP;
|
||||
else if (strncasecmp(*protostr, "FILE", 4) == 0)
|
||||
*Protocol = eProtocolFILE;
|
||||
else if (strncasecmp(*protostr, "EXT", 3) == 0)
|
||||
*Protocol = eProtocolEXT;
|
||||
else
|
||||
return NULL;
|
||||
// return location
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -151,6 +127,9 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel)
|
||||
data.source = Channel->Source();
|
||||
data.vpid = Channel->Vpid();
|
||||
data.ppid = Channel->Ppid();
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10700
|
||||
data.vtype = Channel->Vtype();
|
||||
#endif
|
||||
data.tpid = Channel->Tpid();
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i)
|
||||
data.apid[i] = Channel->Apid(i);
|
||||
@@ -176,6 +155,7 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel)
|
||||
data.source = cSource::FromData(cSource::stPlug);
|
||||
data.vpid = 0;
|
||||
data.ppid = 0;
|
||||
data.vtype = 0;
|
||||
data.tpid = 0;
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i)
|
||||
data.apid[i] = 0;
|
||||
@@ -220,7 +200,11 @@ void cIptvMenuEditChannel::SetChannelData(cChannel *Channel)
|
||||
break;
|
||||
}
|
||||
char slangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10700
|
||||
Channel->SetPids(data.vpid, data.ppid, data.vtype, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid);
|
||||
#else
|
||||
Channel->SetPids(data.vpid, data.ppid, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid);
|
||||
#endif
|
||||
Channel->SetCaIds(data.caids);
|
||||
Channel->SetId(data.nid, data.tid, data.sid, data.rid);
|
||||
Channel->SetName(data.name, "", "IPTV");
|
||||
|
||||
1
setup.h
1
setup.h
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.h,v 1.21 2008/02/19 22:29:02 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_SETUP_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sidscanner.c,v 1.1 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <libsi/section.h>
|
||||
@@ -52,8 +51,9 @@ void cSidScanner::Process(u_short Pid, u_char Tid, const u_char *Data, int Lengt
|
||||
if (!Channels.Lock(true, 10))
|
||||
return;
|
||||
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
||||
IptvChannel->SetId(IptvChannel->Nid(), IptvChannel->Tid(),
|
||||
assoc.getServiceId(), IptvChannel->Rid());
|
||||
if (IptvChannel)
|
||||
IptvChannel->SetId(IptvChannel->Nid(), IptvChannel->Tid(),
|
||||
assoc.getServiceId(), IptvChannel->Rid());
|
||||
Channels.Unlock();
|
||||
}
|
||||
SetChannel(NULL);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sidscanner.h,v 1.1 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __SIDSCANNER_H
|
||||
|
||||
1
socket.c
1
socket.c
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: socket.c,v 1.7 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
1
socket.h
1
socket.h
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: socket.h,v 1.3 2007/10/21 19:32:15 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_SOCKET_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: statistics.c,v 1.22 2008/01/19 21:08:03 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: statistics.h,v 1.11 2008/01/19 21:08:03 ajhseppa Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_STATISTICS_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: streamer.c,v 1.30 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <vdr/thread.h>
|
||||
@@ -46,11 +45,11 @@ void cIptvStreamer::Action(void)
|
||||
}
|
||||
else {
|
||||
mutex->Unlock();
|
||||
cCondWait::SleepMs(100); // to reduce cpu load
|
||||
sleep.Wait(100); // to reduce cpu load
|
||||
}
|
||||
}
|
||||
else
|
||||
cCondWait::SleepMs(100); // and avoid busy loop
|
||||
sleep.Wait(100); // and avoid busy loop
|
||||
}
|
||||
debug("cIptvStreamer::Action(): Exiting\n");
|
||||
}
|
||||
@@ -70,18 +69,18 @@ bool cIptvStreamer::Close(void)
|
||||
{
|
||||
debug("cIptvStreamer::Close()\n");
|
||||
// Stop thread
|
||||
sleep.Signal();
|
||||
if (Running())
|
||||
Cancel(3);
|
||||
// Close the protocol. A mutex should be taken here to avoid a race condition
|
||||
// where thread Action() may be in the process of accessing the protocol.
|
||||
// Taking a mutex serializes the Close() and Action() -calls.
|
||||
if (mutex)
|
||||
mutex->Lock();
|
||||
mutex->Lock();
|
||||
if (protocol)
|
||||
protocol->Close();
|
||||
if (mutex)
|
||||
mutex->Unlock();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: streamer.h,v 1.14 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_STREAMER_H
|
||||
@@ -21,6 +20,7 @@ class cIptvStreamer : public cThread, public cIptvStreamerStatistics {
|
||||
private:
|
||||
cRingBufferLinear* ringBuffer;
|
||||
cMutex* mutex;
|
||||
cCondWait sleep;
|
||||
unsigned char* readBuffer;
|
||||
unsigned int readBufferLen;
|
||||
cIptvProtocolIf* protocol;
|
||||
|
||||
Reference in New Issue
Block a user