mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 11:37:03 +00:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6324eaf128 | ||
|
|
b31de2ec23 | ||
|
|
b3b28a5faa | ||
|
|
037adaac86 | ||
|
|
6fa46ca9e3 | ||
|
|
c507f373ff | ||
|
|
e798ff1424 | ||
|
|
613152c6db | ||
|
|
740d93aa2c | ||
|
|
94e70db977 | ||
|
|
698ebb3a3c | ||
|
|
aaf93246c1 | ||
|
|
1d8044b4e4 | ||
|
|
573584022c | ||
|
|
5420374543 | ||
|
|
71952ae0dc | ||
|
|
c8fe6b1389 | ||
|
|
dd540f8eef | ||
|
|
3de5d6c467 | ||
|
|
c525b553e4 | ||
|
|
71b0e52712 | ||
|
|
398a8d75b9 | ||
|
|
554bc5cb41 | ||
|
|
4188a5d4e2 | ||
|
|
55440bf047 | ||
|
|
3fe71ae011 | ||
|
|
16b40c6774 | ||
|
|
a03bd6309c | ||
|
|
89e3aba59e | ||
|
|
68459e6553 | ||
|
|
29cb25485f | ||
|
|
c176429338 | ||
|
|
05d70f67b1 | ||
|
|
537c16a43b | ||
|
|
b88b14912c |
27
HISTORY
27
HISTORY
@@ -34,7 +34,32 @@ 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.
|
||||
|
||||
2008-02-18: Version 0.0.7
|
||||
|
||||
- Updated for vdr-1.5.15.
|
||||
- Replaced asprintf with cString.
|
||||
- Updated French translation (Thanks to Micha<68>l Nival).
|
||||
- Modified VDR locale support detection.
|
||||
- Added preliminary automatic Pid scanning functionality.
|
||||
- Modified channels.conf format to enable/disable channel
|
||||
specific pid and sid scanning functionality.
|
||||
- Removed the general sid scanning setup option.
|
||||
|
||||
2008-03-27: Version 0.2.0
|
||||
|
||||
- Updated for vdr-1.6.0.
|
||||
- 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.
|
||||
|
||||
43
Makefile
43
Makefile
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile,v 1.24 2008/01/13 16:45:02 rahrenbe Exp $
|
||||
# $Id: Makefile,v 1.27 2008/02/19 22:29:02 rahrenbe Exp $
|
||||
|
||||
# Debugging on/off
|
||||
#IPTV_DEBUG = 1
|
||||
@@ -40,9 +40,6 @@ TMPDIR = /tmp
|
||||
|
||||
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
|
||||
|
||||
### Test whether VDR has locale support
|
||||
VDRLOCALE = $(shell grep '^LOCALEDIR' $(VDRDIR)/Makefile)
|
||||
|
||||
### The name of the distribution archive:
|
||||
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
@@ -58,11 +55,14 @@ ifdef IPTV_DEBUG
|
||||
DEFINES += -DDEBUG
|
||||
endif
|
||||
|
||||
.PHONY: all all-redirect
|
||||
all-redirect: all
|
||||
|
||||
### The object files (add further files here):
|
||||
|
||||
OBJS = $(PLUGIN).o config.o setup.o device.o streamer.o protocoludp.o \
|
||||
protocolhttp.o protocolfile.o protocolext.o sectionfilter.o \
|
||||
sidscanner.o statistics.o common.o socket.o i18n.o
|
||||
sidscanner.o pidscanner.o statistics.o common.o socket.o
|
||||
|
||||
### The main target:
|
||||
|
||||
@@ -78,7 +78,7 @@ all: libvdr-$(PLUGIN).so i18n
|
||||
MAKEDEP = $(CXX) -MM -MG
|
||||
DEPFILE = .dependencies
|
||||
$(DEPFILE): Makefile
|
||||
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(subst i18n.c,,$(OBJS:%.o=%.c)) > $@
|
||||
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
@@ -89,20 +89,11 @@ LOCALEDIR = $(VDRDIR)/locale
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
ifeq ($(strip $(APIVERSION)),1.5.7)
|
||||
I18Nvdrmo = $(PLUGIN).mo
|
||||
else
|
||||
I18Nvdrmo = vdr-$(PLUGIN).mo
|
||||
endif
|
||||
|
||||
### Do gettext based i18n stuff
|
||||
|
||||
ifneq ($(strip $(VDRLOCALE)),)
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o $@ $<
|
||||
|
||||
$(I18Npot): $(subst i18n.c,,$(wildcard *.c))
|
||||
$(I18Npot): $(wildcard *.c)
|
||||
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='Rolf Ahrenberg' -o $@ $^
|
||||
|
||||
%.po: $(I18Npot)
|
||||
@@ -114,23 +105,7 @@ $(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
||||
cp $< $@
|
||||
|
||||
.PHONY: i18n
|
||||
i18n: $(I18Nmsgs)
|
||||
|
||||
i18n.c: i18n-template.c
|
||||
@cp i18n-template.c i18n.c
|
||||
|
||||
### Do i18n.c based i18n stuff
|
||||
|
||||
else
|
||||
|
||||
i18n:
|
||||
@### nothing to do
|
||||
|
||||
#i18n compatibility generator:
|
||||
i18n.c: i18n-template.c po2i18n.pl $(I18Npo)
|
||||
./po2i18n.pl < i18n-template.c > i18n.c
|
||||
|
||||
endif
|
||||
i18n: $(I18Nmsgs) $(I18Npot)
|
||||
|
||||
### Targets:
|
||||
|
||||
@@ -150,4 +125,4 @@ dist: clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) i18n.c *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
|
||||
43
README
43
README
@@ -44,10 +44,7 @@ cd /put/your/path/here/VDR/PLUGINS/src
|
||||
tar -xzf /put/your/path/here/vdr-iptv-X.Y.Z.tgz
|
||||
ln -s iptv-X.Y.Z iptv
|
||||
cd /put/your/path/here/VDR
|
||||
# Note: pluginparam patch is required for every vdr
|
||||
patch -p1 < PLUGINS/src/iptv/patches/vdr-X.Y.Z-pluginparam.patch
|
||||
# Note: closefilter patch is required only for vdr-1.5.9 or earlier
|
||||
patch -p1 < PLUGINS/src/iptv/patches/vdr-X.Y.Z-closefilter.patch
|
||||
cp sources.conf /path/to/vdrconf/
|
||||
cp -R PLUGINS/src/iptv/iptv /path/to/vdrconf/plugins/
|
||||
make
|
||||
@@ -70,10 +67,6 @@ Setup menu:
|
||||
- Use section filtering = 1 Defines whether section filtering shall
|
||||
be used.
|
||||
Valid range: 0...1
|
||||
- Scan Sid automatically = 1 Defines whether service id shall be
|
||||
scanned automatically. Requires section
|
||||
filtering.
|
||||
Valid range: 0...1
|
||||
- Disable filters = 0 Certain section filters might cause some
|
||||
unwanted behaviour to VDR such as time
|
||||
being falsely synchronized etc. This
|
||||
@@ -96,6 +89,17 @@ Channel editor menu:
|
||||
pressing the Red button. The channel editor is functionally similar to
|
||||
VDR's built-in channel editor.
|
||||
|
||||
- Scan Sid: [yes|no] Defines whether service id shall be
|
||||
scanned automatically. Service id is
|
||||
used in channel identification and
|
||||
EPG information is set according to it.
|
||||
This option requires section filtering.
|
||||
|
||||
- Scan pids: [yes|no] Defines whether video and audio pids
|
||||
shall be scanned automatically. This
|
||||
option is useful with streams missing
|
||||
correct PAT/PMT information.
|
||||
|
||||
Information menu:
|
||||
|
||||
- [Red:General] Opens the general information page.
|
||||
@@ -107,15 +111,16 @@ Configuration:
|
||||
|
||||
- channels.conf
|
||||
|
||||
TV4;IPTV:4:IPTV|EXT|iptvstream.sh|0:P:0:0:680:0:0:4:0:0:0
|
||||
TV3;IPTV:3:IPTV|FILE|/video/stream.ts|5:P:0:514:670:2321:0:3:0:0:0
|
||||
TV2;IPTV:2:IPTV|HTTP|127.0.0.1/TS/2|3000:P:0:513:660:2321:0:2:0:0:0
|
||||
TV1;IPTV:1:IPTV|UDP|127.0.0.1|1234:P:0:512:650:2321:0:1:0:0:0
|
||||
^ ^ ^ ^ ^ ^
|
||||
| | | | | Source type ("P")
|
||||
| | | | IP Port Number, File delay (ms), Script parameter
|
||||
| | | IP Address, File location, Script location
|
||||
| | Protocol ("UDP", "HTTP", "FILE", "EXT")
|
||||
TV4;IPTV:4:IPTV|S1P0|EXT|iptvstream.sh|0:P:0:0:680:0:0:4:0:0:0
|
||||
TV3;IPTV:3:IPTV|S0P1|FILE|/video/stream.ts|5:P:0:514:670:2321:0:3:0:0:0
|
||||
TV2;IPTV:2:IPTV|S0P1|HTTP|127.0.0.1/TS/2|3000:P:0:513:660:2321:0:2:0:0:0
|
||||
TV1;IPTV:1:IPTV|S1P0|UDP|127.0.0.1|1234:P:0:512:650:2321:0:1:0:0:0
|
||||
^ ^ ^ ^ ^ ^ ^
|
||||
| | | | | | Source type ("P")
|
||||
| | | | | IP Port Number, File delay (ms), Script parameter
|
||||
| | | | IP Address, File location, Script location
|
||||
| | | Protocol ("UDP", "HTTP", "FILE", "EXT")
|
||||
| | Parameters ("S" Sid scan, "P" Pid scan, "0" disable, "1" enable)
|
||||
| Plugin ID ("IPTV")
|
||||
Unique enumeration
|
||||
|
||||
@@ -158,8 +163,12 @@ Notes:
|
||||
- The following section filters are recommended to be disabled:
|
||||
"NIT (0x40)", "SDT (0x42)", "TDT (0x70)"
|
||||
|
||||
- The IPTV devices look for a "/tmp/vdr-iptv<devicenumber>.dvr" fifo at
|
||||
startup. If the fifo is found and succesfully opened, the device writes
|
||||
the current data stream into it. This can be used for debugging purposes.
|
||||
|
||||
Acknowledgements:
|
||||
|
||||
- The IPTV section filtering code is derived from Linux kernel.
|
||||
|
||||
- Udo Richter's po2i18n package is used to support VDR's old i18n system.
|
||||
- The pid scanning code is derived from Udo Richter's streamplayer plugin.
|
||||
|
||||
6
common.c
6
common.c
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: common.c,v 1.9 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
* $Id: common.c,v 1.10 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <vdr/tools.h>
|
||||
@@ -50,9 +50,9 @@ int select_single_desc(int descriptor, const int usecs, const bool selectWrite)
|
||||
FD_SET(descriptor, &fds);
|
||||
int retval = 0;
|
||||
if (selectWrite)
|
||||
retval = select(descriptor + 1, NULL, &fds, NULL, &tv);
|
||||
retval = select(descriptor + 1, NULL, &fds, NULL, &tv);
|
||||
else
|
||||
retval = select(descriptor + 1, &fds, NULL, NULL, &tv);
|
||||
retval = select(descriptor + 1, &fds, NULL, NULL, &tv);
|
||||
// Check if error
|
||||
ERROR_IF_RET(retval < 0, "select()", return retval);
|
||||
return retval;
|
||||
|
||||
5
common.h
5
common.h
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: common.h,v 1.19 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
* $Id: common.h,v 1.20 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_COMMON_H
|
||||
@@ -29,6 +29,9 @@
|
||||
#define trVDR(s) tr(s)
|
||||
#endif
|
||||
|
||||
#define IPTV_FILTER_FILENAME "/tmp/vdr-iptv%d.filter%d"
|
||||
#define IPTV_DVR_FILENAME "/tmp/vdr-iptv%d.dvr"
|
||||
|
||||
#define IPTV_DEVICE_INFO_ALL 0
|
||||
#define IPTV_DEVICE_INFO_GENERAL 1
|
||||
#define IPTV_DEVICE_INFO_PIDS 2
|
||||
|
||||
7
config.c
7
config.c
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: config.c,v 1.19 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
* $Id: config.c,v 1.21 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -16,8 +16,7 @@ cIptvConfig::cIptvConfig(void)
|
||||
tsBufferPrefillRatio(0),
|
||||
extProtocolBasePort(4321),
|
||||
useBytes(1),
|
||||
sectionFiltering(1),
|
||||
sidScanning(1)
|
||||
sectionFiltering(1)
|
||||
{
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i)
|
||||
disabledFilters[i] = -1;
|
||||
@@ -28,7 +27,7 @@ unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
|
||||
{
|
||||
unsigned int n = 0;
|
||||
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1))
|
||||
n++;
|
||||
n++;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
5
config.h
5
config.h
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: config.h,v 1.18 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
* $Id: config.h,v 1.20 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_CONFIG_H
|
||||
@@ -21,7 +21,6 @@ private:
|
||||
unsigned int extProtocolBasePort;
|
||||
unsigned int useBytes;
|
||||
unsigned int sectionFiltering;
|
||||
unsigned int sidScanning;
|
||||
int disabledFilters[SECTION_FILTER_TABLE_SIZE];
|
||||
char configDirectory[255];
|
||||
|
||||
@@ -33,7 +32,6 @@ public:
|
||||
unsigned int GetExtProtocolBasePort(void) const { return extProtocolBasePort; }
|
||||
unsigned int GetUseBytes(void) const { return useBytes; }
|
||||
unsigned int GetSectionFiltering(void) const { return sectionFiltering; }
|
||||
unsigned int GetSidScanning(void) const { return sidScanning; }
|
||||
const char *GetConfigDirectory(void) const { return configDirectory; }
|
||||
unsigned int GetDisabledFiltersCount(void) const;
|
||||
int GetDisabledFilters(unsigned int Index) const;
|
||||
@@ -42,7 +40,6 @@ public:
|
||||
void SetExtProtocolBasePort(unsigned int PortNumber) { extProtocolBasePort = PortNumber; }
|
||||
void SetUseBytes(unsigned int On) { useBytes = On; }
|
||||
void SetSectionFiltering(unsigned int On) { sectionFiltering = On; }
|
||||
void SetSidScanning(unsigned int On) { sidScanning = On; }
|
||||
void SetDisabledFilters(unsigned int Index, int Number);
|
||||
void SetConfigDirectory(const char *directoryP);
|
||||
};
|
||||
|
||||
85
device.c
85
device.c
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.c,v 1.78 2008/01/19 21:08:02 ajhseppa Exp $
|
||||
* $Id: device.c,v 1.87 2008/04/02 22:55:04 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -17,8 +17,11 @@ unsigned int cIptvDevice::deviceCount = 0;
|
||||
|
||||
cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
: deviceIndex(Index),
|
||||
dvrFd(-1),
|
||||
isPacketDelivered(false),
|
||||
isOpenDvr(false),
|
||||
sidScanEnabled(false),
|
||||
pidScanEnabled(false),
|
||||
mutex()
|
||||
{
|
||||
debug("cIptvDevice::cIptvDevice(%d)\n", deviceIndex);
|
||||
@@ -32,6 +35,7 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
pFileProtocol = new cIptvProtocolFile();
|
||||
pExtProtocol = new cIptvProtocolExt();
|
||||
pIptvStreamer = new cIptvStreamer(tsBuffer, &mutex);
|
||||
pPidScanner = new cPidScanner;
|
||||
// Initialize filter pointers
|
||||
memset(secfilters, '\0', sizeof(secfilters));
|
||||
// Start section handler for iptv device
|
||||
@@ -40,17 +44,29 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
pSidScanner = new cSidScanner;
|
||||
if (pSidScanner)
|
||||
AttachFilter(pSidScanner);
|
||||
// Check if dvr fifo exists
|
||||
struct stat sb;
|
||||
cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndex);
|
||||
stat(filename, &sb);
|
||||
if (S_ISFIFO(sb.st_mode)) {
|
||||
dvrFd = open(filename, O_WRONLY | O_NONBLOCK);
|
||||
if (dvrFd >= 0)
|
||||
dsyslog("IPTV device %d redirecting input stream to '%s'", deviceIndex, *filename);
|
||||
}
|
||||
}
|
||||
|
||||
cIptvDevice::~cIptvDevice()
|
||||
{
|
||||
debug("cIptvDevice::~cIptvDevice(%d)\n", deviceIndex);
|
||||
// Stop section handler of iptv device
|
||||
StopSectionHandler();
|
||||
DELETE_POINTER(pIptvStreamer);
|
||||
DELETE_POINTER(pUdpProtocol);
|
||||
DELETE_POINTER(pHttpProtocol);
|
||||
DELETE_POINTER(pFileProtocol);
|
||||
DELETE_POINTER(pExtProtocol);
|
||||
DELETE_POINTER(tsBuffer);
|
||||
DELETE_POINTER(pPidScanner);
|
||||
// Detach and destroy sid filter
|
||||
if (pSidScanner) {
|
||||
Detach(pSidScanner);
|
||||
@@ -59,6 +75,12 @@ cIptvDevice::~cIptvDevice()
|
||||
// Destroy all filters
|
||||
for (int i = 0; i < eMaxSecFilterCount; ++i)
|
||||
DeleteFilter(i);
|
||||
// Close dvr fifo
|
||||
if (dvrFd >= 0) {
|
||||
int fd = dvrFd;
|
||||
dvrFd = -1;
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
||||
bool cIptvDevice::Initialize(unsigned int DeviceCount)
|
||||
@@ -155,13 +177,34 @@ cString cIptvDevice::GetInformation(unsigned int Page)
|
||||
return info;
|
||||
}
|
||||
|
||||
cString cIptvDevice::GetChannelSettings(const char *IptvParam, int *Parameter, cIptvProtocolIf* *Protocol)
|
||||
cString cIptvDevice::GetChannelSettings(const char *IptvParam, int *Parameter, int *SidScan, int *PidScan, cIptvProtocolIf* *Protocol)
|
||||
{
|
||||
debug("cIptvDevice::GetChannelSettings(%d)\n", deviceIndex);
|
||||
char *tag = NULL;
|
||||
char *proto = NULL;
|
||||
char *loc = NULL;
|
||||
if (sscanf(IptvParam, "%a[^|]|%a[^|]|%a[^|]|%u", &tag, &proto, &loc, Parameter) == 4) {
|
||||
if (sscanf(IptvParam, "%a[^|]|S%dP%d|%a[^|]|%a[^|]|%u", &tag, SidScan, PidScan, &proto, &loc, Parameter) == 6) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
else if (sscanf(IptvParam, "%a[^|]|P%dS%d|%a[^|]|%a[^|]|%u", &tag, PidScan, SidScan, &proto, &loc, Parameter) == 6) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
@@ -216,21 +259,31 @@ bool cIptvDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *N
|
||||
return result;
|
||||
}
|
||||
|
||||
int cIptvDevice::NumProvidedSystems(void) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool cIptvDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
||||
{
|
||||
int parameter;
|
||||
int parameter, sidscan, pidscan;
|
||||
cString location;
|
||||
cIptvProtocolIf *protocol;
|
||||
|
||||
debug("cIptvDevice::SetChannelDevice(%d)\n", deviceIndex);
|
||||
location = GetChannelSettings(Channel->PluginParam(), ¶meter, &protocol);
|
||||
location = GetChannelSettings(Channel->PluginParam(), ¶meter, &sidscan, &pidscan, &protocol);
|
||||
if (isempty(location)) {
|
||||
error("ERROR: Unrecognized IPTV channel settings: %s", Channel->PluginParam());
|
||||
return false;
|
||||
}
|
||||
pIptvStreamer->Set(location, parameter, deviceIndex, protocol);
|
||||
if (pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
pSidScanner->SetChannel(Channel);
|
||||
sidScanEnabled = sidscan ? true : false;
|
||||
pidScanEnabled = pidscan ? true : false;
|
||||
if (pIptvStreamer->Set(location, parameter, deviceIndex, protocol)) {
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetChannel(Channel);
|
||||
if (pidScanEnabled && pPidScanner)
|
||||
pPidScanner->SetChannel(Channel);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -309,7 +362,7 @@ bool cIptvDevice::OpenDvr(void)
|
||||
mutex.Unlock();
|
||||
ResetBuffering();
|
||||
pIptvStreamer->Open();
|
||||
if (pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetStatus(true);
|
||||
isOpenDvr = true;
|
||||
return true;
|
||||
@@ -318,10 +371,10 @@ bool cIptvDevice::OpenDvr(void)
|
||||
void cIptvDevice::CloseDvr(void)
|
||||
{
|
||||
debug("cIptvDevice::CloseDvr(%d)\n", deviceIndex);
|
||||
if (pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetStatus(false);
|
||||
if (pIptvStreamer)
|
||||
pIptvStreamer->Close();
|
||||
pIptvStreamer->Close();
|
||||
isOpenDvr = false;
|
||||
}
|
||||
|
||||
@@ -376,8 +429,14 @@ bool cIptvDevice::GetTSPacket(uchar *&Data)
|
||||
}
|
||||
isPacketDelivered = true;
|
||||
Data = p;
|
||||
// Update pid statistics
|
||||
AddPidStatistic(ts_pid(p), payload(p));
|
||||
// Update pid statistics
|
||||
AddPidStatistic(ts_pid(p), payload(p));
|
||||
// Send data also to dvr fifo
|
||||
if (dvrFd >= 0)
|
||||
write(dvrFd, p, TS_SIZE);
|
||||
// Analyze incomplete streams with built-in pid analyzer
|
||||
if (pidScanEnabled && pPidScanner)
|
||||
pPidScanner->Process(p);
|
||||
// Run the data through all filters
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
if (secfilters[i])
|
||||
|
||||
10
device.h
10
device.h
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.h,v 1.35 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
* $Id: device.h,v 1.39 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_DEVICE_H
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "protocolext.h"
|
||||
#include "streamer.h"
|
||||
#include "sectionfilter.h"
|
||||
#include "pidscanner.h"
|
||||
#include "sidscanner.h"
|
||||
#include "statistics.h"
|
||||
|
||||
@@ -34,8 +35,11 @@ private:
|
||||
eMaxSecFilterCount = 32
|
||||
};
|
||||
unsigned int deviceIndex;
|
||||
int dvrFd;
|
||||
bool isPacketDelivered;
|
||||
bool isOpenDvr;
|
||||
bool sidScanEnabled;
|
||||
bool pidScanEnabled;
|
||||
cRingBufferLinear *tsBuffer;
|
||||
int tsBufferPrefill;
|
||||
cIptvProtocolUdp *pUdpProtocol;
|
||||
@@ -43,6 +47,7 @@ private:
|
||||
cIptvProtocolFile *pFileProtocol;
|
||||
cIptvProtocolExt *pExtProtocol;
|
||||
cIptvStreamer *pIptvStreamer;
|
||||
cPidScanner *pPidScanner;
|
||||
cSidScanner *pSidScanner;
|
||||
cMutex mutex;
|
||||
cIptvSectionFilter* secfilters[eMaxSecFilterCount];
|
||||
@@ -65,7 +70,7 @@ private:
|
||||
|
||||
// for channel parsing & buffering
|
||||
private:
|
||||
cString GetChannelSettings(const char *IptvParam, int *Parameter, cIptvProtocolIf* *Protocol);
|
||||
cString GetChannelSettings(const char *IptvParam, int *Parameter, int *SidScan, int *PidScan, cIptvProtocolIf* *Protocol);
|
||||
bool ProvidesIptv(const char *Param) const;
|
||||
void ResetBuffering(void);
|
||||
bool IsBuffering(void);
|
||||
@@ -77,6 +82,7 @@ public:
|
||||
virtual bool ProvidesSource(int Source) const;
|
||||
virtual bool ProvidesTransponder(const cChannel *Channel) const;
|
||||
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
|
||||
virtual int NumProvidedSystems(void) const;
|
||||
protected:
|
||||
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* i18n.c: IPTV plugin for the Video Disk Recorder
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: i18n-template.c,v 1.1 2007/10/28 16:22:44 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "i18n.h"
|
||||
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10507
|
||||
const tI18nPhrase IptvPhrases[] = {
|
||||
// START I18N
|
||||
// END I18N
|
||||
{ NULL }
|
||||
};
|
||||
#endif
|
||||
18
i18n.h
18
i18n.h
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* i18n.h: IPTV plugin for the Video Disk Recorder
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: i18n.h,v 1.1 2007/10/28 16:22:44 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_I18N_H
|
||||
#define __IPTV_I18N_H
|
||||
|
||||
#include <vdr/i18n.h>
|
||||
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10507
|
||||
extern const tI18nPhrase IptvPhrases[];
|
||||
#endif
|
||||
|
||||
#endif // __IPTV_I18N_H
|
||||
52
iptv.c
52
iptv.c
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: iptv.c,v 1.33 2008/01/19 20:24:10 rahrenbe Exp $
|
||||
* $Id: iptv.c,v 1.39 2008/03/30 20:25:12 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@@ -12,17 +12,16 @@
|
||||
#include "config.h"
|
||||
#include "setup.h"
|
||||
#include "device.h"
|
||||
#include "i18n.h"
|
||||
|
||||
#ifndef PLUGINPARAMPATCHVERSNUM
|
||||
#error "You must apply the pluginparam patch for VDR!"
|
||||
#endif
|
||||
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10510 && !defined(CLOSEFILTERPATCHVERSNUM)
|
||||
#error "You must apply the closefilter patch for VDR!"
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10600
|
||||
#error "VDR-1.6.0 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
static const char VERSION[] = "0.0.6";
|
||||
static const char VERSION[] = "0.2.1";
|
||||
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
||||
|
||||
class cPluginIptv : public cPlugin {
|
||||
@@ -79,20 +78,20 @@ bool cPluginIptv::ProcessArgs(int argc, char *argv[])
|
||||
debug("cPluginIptv::ProcessArgs()\n");
|
||||
// Implement command line argument processing here if applicable.
|
||||
static const struct option long_options[] = {
|
||||
{ "devices", required_argument, NULL, 'd' },
|
||||
{ NULL }
|
||||
};
|
||||
{ "devices", required_argument, NULL, 'd' },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
int c;
|
||||
while ((c = getopt_long(argc, argv, "d:", long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
deviceCount = atoi(optarg);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
switch (c) {
|
||||
case 'd':
|
||||
deviceCount = atoi(optarg);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -100,9 +99,6 @@ bool cPluginIptv::Initialize(void)
|
||||
{
|
||||
debug("cPluginIptv::Initialize()\n");
|
||||
// Initialize any background activities the plugin shall perform.
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10507
|
||||
RegisterI18n(IptvPhrases);
|
||||
#endif
|
||||
IptvConfig.SetConfigDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N));
|
||||
return cIptvDevice::Initialize(deviceCount);
|
||||
}
|
||||
@@ -167,14 +163,14 @@ int cPluginIptv::ParseFilters(const char *Value, int *Filters)
|
||||
char buffer[256];
|
||||
int n = 0;
|
||||
while (Value && *Value && (n < SECTION_FILTER_TABLE_SIZE)) {
|
||||
strn0cpy(buffer, Value, sizeof(buffer));
|
||||
int i = atoi(buffer);
|
||||
//debug("cPluginIptv::ParseFilters(): Filters[%d]=%d\n", n, i);
|
||||
if (i >= 0)
|
||||
Filters[n++] = i;
|
||||
if ((Value = strchr(Value, ' ')) != NULL)
|
||||
Value++;
|
||||
}
|
||||
strn0cpy(buffer, Value, sizeof(buffer));
|
||||
int i = atoi(buffer);
|
||||
//debug("cPluginIptv::ParseFilters(): Filters[%d]=%d\n", n, i);
|
||||
if (i >= 0)
|
||||
Filters[n++] = i;
|
||||
if ((Value = strchr(Value, ' ')) != NULL)
|
||||
Value++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
@@ -190,8 +186,6 @@ bool cPluginIptv::SetupParse(const char *Name, const char *Value)
|
||||
IptvConfig.SetExtProtocolBasePort(atoi(Value));
|
||||
else if (!strcasecmp(Name, "SectionFiltering"))
|
||||
IptvConfig.SetSectionFiltering(atoi(Value));
|
||||
else if (!strcasecmp(Name, "SidScanning"))
|
||||
IptvConfig.SetSidScanning(atoi(Value));
|
||||
else if (!strcasecmp(Name, "DisabledFilters")) {
|
||||
int DisabledFilters[SECTION_FILTER_TABLE_SIZE];
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(DisabledFilters); ++i)
|
||||
|
||||
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,6 +1,6 @@
|
||||
#!/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<70>l<EFBFBD>
|
||||
|
||||
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,6 +1,6 @@
|
||||
#!/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<70>l<EFBFBD>
|
||||
# (C) 2007 Tobias Grimm
|
||||
@@ -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
|
||||
@@ -1,80 +0,0 @@
|
||||
diff -Nru vdr-1.4.7-vanilla/config.h vdr-1.4.7-closefilter/config.h
|
||||
--- vdr-1.4.7-vanilla/config.h 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-closefilter/config.h 2007-10-27 01:39:43.000000000 +0300
|
||||
@@ -29,6 +29,8 @@
|
||||
#define APIVERSION "1.4.5"
|
||||
#define APIVERSNUM 10405 // Version * 10000 + Major * 100 + Minor
|
||||
|
||||
+#define CLOSEFILTERPATCHVERSNUM 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.4.7-vanilla/device.c vdr-1.4.7-closefilter/device.c
|
||||
--- vdr-1.4.7-vanilla/device.c 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-closefilter/device.c 2007-10-27 01:37:34.000000000 +0300
|
||||
@@ -509,6 +509,11 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
+void cDevice::CloseFilter(int Handle)
|
||||
+{
|
||||
+ close(Handle);
|
||||
+}
|
||||
+
|
||||
void cDevice::AttachFilter(cFilter *Filter)
|
||||
{
|
||||
if (sectionHandler)
|
||||
diff -Nru vdr-1.4.7-vanilla/device.h vdr-1.4.7-closefilter/device.h
|
||||
--- vdr-1.4.7-vanilla/device.h 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-closefilter/device.h 2007-10-27 01:37:19.000000000 +0300
|
||||
@@ -302,6 +302,11 @@
|
||||
///< Opens a file handle for the given filter data.
|
||||
///< A derived device that provides section data must
|
||||
///< implement this function.
|
||||
+ virtual void CloseFilter(int Handle);
|
||||
+ ///< Closes a file handle that has previously been opened
|
||||
+ ///< by OpenFilter(). If this is as simple as calling close(Handle),
|
||||
+ ///< a derived class need not implement this function, because this
|
||||
+ ///< is done by the default implementation.
|
||||
void AttachFilter(cFilter *Filter);
|
||||
///< Attaches the given filter to this device.
|
||||
void Detach(cFilter *Filter);
|
||||
diff -Nru vdr-1.4.7-vanilla/dvbdevice.c vdr-1.4.7-closefilter/dvbdevice.c
|
||||
--- vdr-1.4.7-vanilla/dvbdevice.c 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-closefilter/dvbdevice.c 2007-10-27 01:37:50.000000000 +0300
|
||||
@@ -726,6 +726,11 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
+void cDvbDevice::CloseFilter(int Handle)
|
||||
+{
|
||||
+ close(Handle);
|
||||
+}
|
||||
+
|
||||
void cDvbDevice::TurnOffLiveMode(bool LiveView)
|
||||
{
|
||||
if (LiveView) {
|
||||
diff -Nru vdr-1.4.7-vanilla/dvbdevice.h vdr-1.4.7-closefilter/dvbdevice.h
|
||||
--- vdr-1.4.7-vanilla/dvbdevice.h 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-closefilter/dvbdevice.h 2007-10-27 01:37:59.000000000 +0300
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
protected:
|
||||
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
|
||||
+ virtual void CloseFilter(int Handle);
|
||||
|
||||
// Image Grab facilities
|
||||
|
||||
diff -Nru vdr-1.4.7-vanilla/sections.c vdr-1.4.7-closefilter/sections.c
|
||||
--- vdr-1.4.7-vanilla/sections.c 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-closefilter/sections.c 2007-10-27 01:34:06.000000000 +0300
|
||||
@@ -105,7 +105,7 @@
|
||||
for (fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) {
|
||||
if (fh->filterData.Is(FilterData->pid, FilterData->tid, FilterData->mask)) {
|
||||
if (--fh->used <= 0) {
|
||||
- close(fh->handle);
|
||||
+ device->CloseFilter(fh->handle);
|
||||
filterHandles.Del(fh);
|
||||
break;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -Nru vdr-1.5.13-vanilla/channels.c vdr-1.5.13-pluginparam/channels.c
|
||||
--- vdr-1.5.13-vanilla/channels.c 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/channels.c 2008-01-20 02:00:08.000000000 +0200
|
||||
diff -Nru vdr-1.6.0-vanilla/channels.c vdr-1.6.0-pluginparam/channels.c
|
||||
--- vdr-1.6.0-vanilla/channels.c 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/channels.c 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -166,6 +166,7 @@
|
||||
shortName = strdup("");
|
||||
provider = strdup("");
|
||||
@@ -44,17 +44,17 @@ diff -Nru vdr-1.5.13-vanilla/channels.c vdr-1.5.13-pluginparam/channels.c
|
||||
+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;
|
||||
+ 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)
|
||||
@@ -122,9 +122,9 @@ diff -Nru vdr-1.5.13-vanilla/channels.c vdr-1.5.13-pluginparam/channels.c
|
||||
|
||||
free(parambuf);
|
||||
free(sourcebuf);
|
||||
diff -Nru vdr-1.5.13-vanilla/channels.h vdr-1.5.13-pluginparam/channels.h
|
||||
--- vdr-1.5.13-vanilla/channels.h 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/channels.h 2008-01-20 02:00:08.000000000 +0200
|
||||
diff -Nru vdr-1.6.0-vanilla/channels.h vdr-1.6.0-pluginparam/channels.h
|
||||
--- vdr-1.6.0-vanilla/channels.h 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/channels.h 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -114,6 +114,7 @@
|
||||
char *shortName;
|
||||
char *provider;
|
||||
@@ -164,22 +164,22 @@ diff -Nru vdr-1.5.13-vanilla/channels.h vdr-1.5.13-pluginparam/channels.h
|
||||
void SetPids(int Vpid, int Ppid, 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.5.13-vanilla/config.h vdr-1.5.13-pluginparam/config.h
|
||||
--- vdr-1.5.13-vanilla/config.h 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/config.h 2008-01-20 02:00:08.000000000 +0200
|
||||
diff -Nru vdr-1.6.0-vanilla/config.h vdr-1.6.0-pluginparam/config.h
|
||||
--- vdr-1.6.0-vanilla/config.h 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/config.h 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -30,6 +30,8 @@
|
||||
#define APIVERSION "1.5.13"
|
||||
#define APIVERSNUM 10513 // Version * 10000 + Major * 100 + Minor
|
||||
#define APIVERSION "1.6.0"
|
||||
#define APIVERSNUM 10600 // 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.5.13-vanilla/menu.c vdr-1.5.13-pluginparam/menu.c
|
||||
--- vdr-1.5.13-vanilla/menu.c 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/menu.c 2008-01-20 02:00:08.000000000 +0200
|
||||
@@ -219,6 +219,7 @@
|
||||
diff -Nru vdr-1.6.0-vanilla/menu.c vdr-1.6.0-pluginparam/menu.c
|
||||
--- vdr-1.6.0-vanilla/menu.c 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/menu.c 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -253,6 +253,7 @@
|
||||
cChannel *channel;
|
||||
cChannel data;
|
||||
char name[256];
|
||||
@@ -187,7 +187,7 @@ diff -Nru vdr-1.5.13-vanilla/menu.c vdr-1.5.13-pluginparam/menu.c
|
||||
void Setup(void);
|
||||
public:
|
||||
cMenuEditChannel(cChannel *Channel, bool New = false);
|
||||
@@ -251,6 +252,7 @@
|
||||
@@ -285,6 +286,7 @@
|
||||
|
||||
// Parameters for all types of sources:
|
||||
strn0cpy(name, data.name, sizeof(name));
|
||||
@@ -195,7 +195,7 @@ diff -Nru vdr-1.5.13-vanilla/menu.c vdr-1.5.13-pluginparam/menu.c
|
||||
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name)));
|
||||
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
|
||||
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
|
||||
@@ -281,6 +283,7 @@
|
||||
@@ -315,6 +317,7 @@
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Transmission"), &data.transmission, TransmissionValues));
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues));
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues, tr("none")));
|
||||
@@ -203,7 +203,7 @@ diff -Nru vdr-1.5.13-vanilla/menu.c vdr-1.5.13-pluginparam/menu.c
|
||||
|
||||
SetCurrent(Get(current));
|
||||
Display();
|
||||
@@ -295,6 +298,7 @@
|
||||
@@ -329,6 +332,7 @@
|
||||
if (Key == kOk) {
|
||||
if (Channels.HasUniqueChannelID(&data, channel)) {
|
||||
data.name = strcpyrealloc(data.name, name);
|
||||
@@ -211,9 +211,9 @@ diff -Nru vdr-1.5.13-vanilla/menu.c vdr-1.5.13-pluginparam/menu.c
|
||||
if (channel) {
|
||||
*channel = data;
|
||||
isyslog("edited channel %d %s", channel->Number(), *data.ToText());
|
||||
diff -Nru vdr-1.5.13-vanilla/po/fi_FI.po vdr-1.5.13-pluginparam/po/fi_FI.po
|
||||
--- vdr-1.5.13-vanilla/po/fi_FI.po 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/po/fi_FI.po 2008-01-20 02:00:08.000000000 +0200
|
||||
diff -Nru vdr-1.6.0-vanilla/po/fi_FI.po vdr-1.6.0-pluginparam/po/fi_FI.po
|
||||
--- vdr-1.6.0-vanilla/po/fi_FI.po 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/po/fi_FI.po 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -1001,3 +1001,6 @@
|
||||
#, c-format
|
||||
msgid "VDR will shut down in %s minutes"
|
||||
@@ -221,9 +221,19 @@ diff -Nru vdr-1.5.13-vanilla/po/fi_FI.po vdr-1.5.13-pluginparam/po/fi_FI.po
|
||||
+
|
||||
+msgid "Parameters"
|
||||
+msgstr "Parametrit"
|
||||
diff -Nru vdr-1.5.13-vanilla/sources.c vdr-1.5.13-pluginparam/sources.c
|
||||
--- vdr-1.5.13-vanilla/sources.c 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/sources.c 2008-01-20 02:00:08.000000000 +0200
|
||||
diff -Nru vdr-1.6.0-vanilla/po/fr_FR.po vdr-1.6.0-pluginparam/po/fr_FR.po
|
||||
--- vdr-1.6.0-vanilla/po/fr_FR.po 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/po/fr_FR.po 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -1004,3 +1004,6 @@
|
||||
#, c-format
|
||||
msgid "VDR will shut down in %s minutes"
|
||||
msgstr "VDR s'arrêtera dans %s minutes"
|
||||
+
|
||||
+msgid "Parameters"
|
||||
+msgstr "Paramètres"
|
||||
diff -Nru vdr-1.6.0-vanilla/sources.c vdr-1.6.0-pluginparam/sources.c
|
||||
--- vdr-1.6.0-vanilla/sources.c 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/sources.c 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -37,6 +37,7 @@
|
||||
char buffer[16];
|
||||
char *q = buffer;
|
||||
@@ -240,9 +250,9 @@ diff -Nru vdr-1.5.13-vanilla/sources.c vdr-1.5.13-pluginparam/sources.c
|
||||
case 'C': type = stCable; break;
|
||||
case 'S': type = stSat; break;
|
||||
case 'T': type = stTerr; break;
|
||||
diff -Nru vdr-1.5.13-vanilla/sources.conf vdr-1.5.13-pluginparam/sources.conf
|
||||
--- vdr-1.5.13-vanilla/sources.conf 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/sources.conf 2008-01-20 02:00:08.000000000 +0200
|
||||
diff -Nru vdr-1.6.0-vanilla/sources.conf vdr-1.6.0-pluginparam/sources.conf
|
||||
--- vdr-1.6.0-vanilla/sources.conf 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/sources.conf 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -188,3 +188,7 @@
|
||||
# Terrestrial
|
||||
|
||||
@@ -251,9 +261,9 @@ diff -Nru vdr-1.5.13-vanilla/sources.conf vdr-1.5.13-pluginparam/sources.conf
|
||||
+# Plugin
|
||||
+
|
||||
+P Plugin
|
||||
diff -Nru vdr-1.5.13-vanilla/sources.h vdr-1.5.13-pluginparam/sources.h
|
||||
--- vdr-1.5.13-vanilla/sources.h 2008-01-13 17:31:25.000000000 +0200
|
||||
+++ vdr-1.5.13-pluginparam/sources.h 2008-01-20 02:00:08.000000000 +0200
|
||||
diff -Nru vdr-1.6.0-vanilla/sources.h vdr-1.6.0-pluginparam/sources.h
|
||||
--- vdr-1.6.0-vanilla/sources.h 2008-03-27 21:43:25.000000000 +0200
|
||||
+++ vdr-1.6.0-pluginparam/sources.h 2008-03-27 22:06:47.000000000 +0200
|
||||
@@ -16,10 +16,11 @@
|
||||
public:
|
||||
enum eSourceType {
|
||||
@@ -1,15 +1,15 @@
|
||||
diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
--- vdr-1.4.7-vanilla/channels.c 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/channels.c 2007-10-27 01:09:05.000000000 +0300
|
||||
@@ -166,6 +166,7 @@
|
||||
diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
||||
--- vdr-1.7.0-vanilla/channels.c 2008-04-12 16:49:12.000000000 +0300
|
||||
+++ vdr-1.7.0-pluginparam/channels.c 2008-04-13 18:58:41.000000000 +0300
|
||||
@@ -216,6 +216,7 @@
|
||||
shortName = strdup("");
|
||||
provider = strdup("");
|
||||
portalName = strdup("");
|
||||
+ pluginParam = strdup("");
|
||||
memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__);
|
||||
inversion = INVERSION_AUTO;
|
||||
bandwidth = BANDWIDTH_AUTO;
|
||||
@@ -187,6 +188,7 @@
|
||||
inversion = DVBFE_INVERSION_AUTO;
|
||||
bandwidth = DVBFE_BANDWIDTH_AUTO;
|
||||
@@ -241,6 +242,7 @@
|
||||
shortName = NULL;
|
||||
provider = NULL;
|
||||
portalName = NULL;
|
||||
@@ -17,7 +17,7 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
schedule = NULL;
|
||||
linkChannels = NULL;
|
||||
refChannel = NULL;
|
||||
@@ -215,6 +217,7 @@
|
||||
@@ -269,6 +271,7 @@
|
||||
free(shortName);
|
||||
free(provider);
|
||||
free(portalName);
|
||||
@@ -25,7 +25,7 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
}
|
||||
|
||||
cChannel& cChannel::operator= (const cChannel &Channel)
|
||||
@@ -223,6 +226,7 @@
|
||||
@@ -277,6 +280,7 @@
|
||||
shortName = strcpyrealloc(shortName, Channel.shortName);
|
||||
provider = strcpyrealloc(provider, Channel.provider);
|
||||
portalName = strcpyrealloc(portalName, Channel.portalName);
|
||||
@@ -33,10 +33,10 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
memcpy(&__BeginData__, &Channel.__BeginData__, (char *)&Channel.__EndData__ - (char *)&Channel.__BeginData__);
|
||||
return *this;
|
||||
}
|
||||
@@ -280,9 +284,26 @@
|
||||
transmission = Channel->transmission;
|
||||
guard = Channel->guard;
|
||||
hierarchy = Channel->hierarchy;
|
||||
@@ -338,9 +342,26 @@
|
||||
alpha = Channel->alpha;
|
||||
priority = Channel->priority;
|
||||
rollOff = Channel->rollOff;
|
||||
+ if (IsPlug()) pluginParam = strcpyrealloc(pluginParam, Channel->pluginParam);
|
||||
}
|
||||
}
|
||||
@@ -44,23 +44,23 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
+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;
|
||||
+ 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)
|
||||
bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff)
|
||||
{
|
||||
// Workarounds for broadcaster stupidity:
|
||||
@@ -407,6 +428,18 @@
|
||||
@@ -472,6 +493,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
#define STRDIFF 0x01
|
||||
#define VALDIFF 0x02
|
||||
|
||||
@@ -579,7 +612,7 @@
|
||||
@@ -665,7 +698,7 @@
|
||||
if (isdigit(type))
|
||||
type = 'S';
|
||||
#define ST(s) if (strchr(s, type))
|
||||
@@ -88,24 +88,24 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
char *q = buffer;
|
||||
*q = 0;
|
||||
ST(" S ") q += sprintf(q, "%c", polarization);
|
||||
@@ -591,6 +624,7 @@
|
||||
@@ -681,6 +714,7 @@
|
||||
ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues));
|
||||
ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
||||
ST(" T") q += PrintParameter(q, 'G', MapToUser(guard, GuardValues));
|
||||
ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues));
|
||||
+ ST("P ") snprintf(buffer, sizeof(buffer), "%s", pluginParam);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -612,7 +646,7 @@
|
||||
@@ -702,7 +736,7 @@
|
||||
|
||||
bool cChannel::StringToParameters(const char *s)
|
||||
{
|
||||
- while (s && *s) {
|
||||
+ while (s && *s && !IsPlug()) {
|
||||
switch (toupper(*s)) {
|
||||
case 'A': s = ParseParameter(s, alpha, AlphaValues); break;
|
||||
case 'B': s = ParseParameter(s, bandwidth, BandwidthValues); break;
|
||||
case 'C': s = ParseParameter(s, coderateH, CoderateValues); break;
|
||||
@@ -722,7 +756,7 @@
|
||||
@@ -817,7 +851,7 @@
|
||||
dpids[0] = 0;
|
||||
ok = false;
|
||||
if (parambuf && sourcebuf && vpidbuf && apidbuf) {
|
||||
@@ -114,7 +114,7 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
|
||||
char *p = strchr(vpidbuf, '+');
|
||||
if (p)
|
||||
@@ -813,6 +847,7 @@
|
||||
@@ -908,6 +942,7 @@
|
||||
shortName = strcpyrealloc(shortName, p);
|
||||
}
|
||||
name = strcpyrealloc(name, namebuf);
|
||||
@@ -122,10 +122,10 @@ diff -Nru vdr-1.4.7-vanilla/channels.c vdr-1.4.7-pluginparam/channels.c
|
||||
|
||||
free(parambuf);
|
||||
free(sourcebuf);
|
||||
diff -Nru vdr-1.4.7-vanilla/channels.h vdr-1.4.7-pluginparam/channels.h
|
||||
--- vdr-1.4.7-vanilla/channels.h 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/channels.h 2007-10-27 01:12:37.000000000 +0300
|
||||
@@ -114,6 +114,7 @@
|
||||
diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h
|
||||
--- vdr-1.7.0-vanilla/channels.h 2008-04-12 16:46:50.000000000 +0300
|
||||
+++ vdr-1.7.0-pluginparam/channels.h 2008-04-13 18:57:08.000000000 +0300
|
||||
@@ -118,6 +118,7 @@
|
||||
char *shortName;
|
||||
char *provider;
|
||||
char *portalName;
|
||||
@@ -133,7 +133,7 @@ diff -Nru vdr-1.4.7-vanilla/channels.h vdr-1.4.7-pluginparam/channels.h
|
||||
int __BeginData__;
|
||||
int frequency; // MHz
|
||||
int source;
|
||||
@@ -165,6 +166,7 @@
|
||||
@@ -174,6 +175,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
|
||||
@@ -141,77 +141,45 @@ diff -Nru vdr-1.4.7-vanilla/channels.h vdr-1.4.7-pluginparam/channels.h
|
||||
int Source(void) const { return source; }
|
||||
int Srate(void) const { return srate; }
|
||||
int Vpid(void) const { return vpid; }
|
||||
@@ -198,6 +200,7 @@
|
||||
int Hierarchy(void) const { return hierarchy; }
|
||||
@@ -212,6 +214,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); }
|
||||
@@ -205,12 +208,14 @@
|
||||
@@ -219,12 +222,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);
|
||||
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);
|
||||
bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission, int Alpha, int Priority);
|
||||
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 *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int Tpid);
|
||||
void SetPids(int Vpid, int Ppid, 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.4.7-vanilla/config.h vdr-1.4.7-pluginparam/config.h
|
||||
--- vdr-1.4.7-vanilla/config.h 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/config.h 2007-10-27 01:14:39.000000000 +0300
|
||||
@@ -29,6 +29,8 @@
|
||||
#define APIVERSION "1.4.5"
|
||||
#define APIVERSNUM 10405 // Version * 10000 + Major * 100 + Minor
|
||||
diff -Nru vdr-1.7.0-vanilla/config.h vdr-1.7.0-pluginparam/config.h
|
||||
--- vdr-1.7.0-vanilla/config.h 2008-04-12 16:02:10.000000000 +0300
|
||||
+++ vdr-1.7.0-pluginparam/config.h 2008-04-13 18:54:25.000000000 +0300
|
||||
@@ -30,6 +30,8 @@
|
||||
#define APIVERSION "1.7.0"
|
||||
#define APIVERSNUM 10700 // 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.4.7-vanilla/i18n.c vdr-1.4.7-pluginparam/i18n.c
|
||||
--- vdr-1.4.7-vanilla/i18n.c 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/i18n.c 2007-10-27 01:11:38.000000000 +0300
|
||||
@@ -6126,6 +6126,28 @@
|
||||
"Ingen titel",
|
||||
"Bez názvu",
|
||||
},
|
||||
+ { "Parameters",
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "Parametrit",
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ "",// TODO
|
||||
+ },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
diff -Nru vdr-1.4.7-vanilla/menu.c vdr-1.4.7-pluginparam/menu.c
|
||||
--- vdr-1.4.7-vanilla/menu.c 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/menu.c 2007-10-27 01:09:05.000000000 +0300
|
||||
@@ -216,6 +216,7 @@
|
||||
diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c
|
||||
--- vdr-1.7.0-vanilla/menu.c 2008-04-12 14:37:17.000000000 +0300
|
||||
+++ vdr-1.7.0-pluginparam/menu.c 2008-04-13 18:56:07.000000000 +0300
|
||||
@@ -189,6 +189,7 @@
|
||||
cChannel *channel;
|
||||
cChannel data;
|
||||
char name[256];
|
||||
@@ -219,23 +187,23 @@ diff -Nru vdr-1.4.7-vanilla/menu.c vdr-1.4.7-pluginparam/menu.c
|
||||
void Setup(void);
|
||||
public:
|
||||
cMenuEditChannel(cChannel *Channel, bool New = false);
|
||||
@@ -248,6 +249,7 @@
|
||||
@@ -221,6 +222,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), tr(FileNameChars)));
|
||||
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name)));
|
||||
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
|
||||
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
|
||||
@@ -276,6 +278,7 @@
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Transmission"), &data.transmission, TransmissionValues));
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues));
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues, tr("none")));
|
||||
@@ -255,6 +257,7 @@
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Alpha"), &data.alpha, AlphaValues));
|
||||
ST(" T") Add(new cMenuEditMapItem( tr("Priority"), &data.priority, PriorityValues));
|
||||
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();
|
||||
@@ -290,6 +293,7 @@
|
||||
@@ -269,6 +272,7 @@
|
||||
if (Key == kOk) {
|
||||
if (Channels.HasUniqueChannelID(&data, channel)) {
|
||||
data.name = strcpyrealloc(data.name, name);
|
||||
@@ -243,9 +211,29 @@ diff -Nru vdr-1.4.7-vanilla/menu.c vdr-1.4.7-pluginparam/menu.c
|
||||
if (channel) {
|
||||
*channel = data;
|
||||
isyslog("edited channel %d %s", channel->Number(), *data.ToText());
|
||||
diff -Nru vdr-1.4.7-vanilla/sources.c vdr-1.4.7-pluginparam/sources.c
|
||||
--- vdr-1.4.7-vanilla/sources.c 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/sources.c 2007-10-27 01:09:20.000000000 +0300
|
||||
diff -Nru vdr-1.7.0-vanilla/po/fi_FI.po vdr-1.7.0-pluginparam/po/fi_FI.po
|
||||
--- vdr-1.7.0-vanilla/po/fi_FI.po 2008-04-13 17:16:58.000000000 +0300
|
||||
+++ vdr-1.7.0-pluginparam/po/fi_FI.po 2008-04-13 18:54:25.000000000 +0300
|
||||
@@ -1019,3 +1019,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.0-vanilla/po/fr_FR.po vdr-1.7.0-pluginparam/po/fr_FR.po
|
||||
--- vdr-1.7.0-vanilla/po/fr_FR.po 2008-04-13 17:16:58.000000000 +0300
|
||||
+++ vdr-1.7.0-pluginparam/po/fr_FR.po 2008-04-13 18:54:25.000000000 +0300
|
||||
@@ -1022,3 +1022,6 @@
|
||||
#, c-format
|
||||
msgid "VDR will shut down in %s minutes"
|
||||
msgstr "VDR s'arrêtera dans %s minutes"
|
||||
+
|
||||
+msgid "Parameters"
|
||||
+msgstr "Paramètres"
|
||||
diff -Nru vdr-1.7.0-vanilla/sources.c vdr-1.7.0-pluginparam/sources.c
|
||||
--- vdr-1.7.0-vanilla/sources.c 2008-02-10 16:07:26.000000000 +0200
|
||||
+++ vdr-1.7.0-pluginparam/sources.c 2008-04-13 18:54:25.000000000 +0300
|
||||
@@ -37,6 +37,7 @@
|
||||
char buffer[16];
|
||||
char *q = buffer;
|
||||
@@ -262,9 +250,9 @@ diff -Nru vdr-1.4.7-vanilla/sources.c vdr-1.4.7-pluginparam/sources.c
|
||||
case 'C': type = stCable; break;
|
||||
case 'S': type = stSat; break;
|
||||
case 'T': type = stTerr; break;
|
||||
diff -Nru vdr-1.4.7-vanilla/sources.conf vdr-1.4.7-pluginparam/sources.conf
|
||||
--- vdr-1.4.7-vanilla/sources.conf 2007-10-27 01:08:39.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/sources.conf 2007-10-27 01:09:20.000000000 +0300
|
||||
diff -Nru vdr-1.7.0-vanilla/sources.conf vdr-1.7.0-pluginparam/sources.conf
|
||||
--- vdr-1.7.0-vanilla/sources.conf 2007-02-17 18:15:13.000000000 +0200
|
||||
+++ vdr-1.7.0-pluginparam/sources.conf 2008-04-13 18:54:25.000000000 +0300
|
||||
@@ -188,3 +188,7 @@
|
||||
# Terrestrial
|
||||
|
||||
@@ -273,9 +261,9 @@ diff -Nru vdr-1.4.7-vanilla/sources.conf vdr-1.4.7-pluginparam/sources.conf
|
||||
+# Plugin
|
||||
+
|
||||
+P Plugin
|
||||
diff -Nru vdr-1.4.7-vanilla/sources.h vdr-1.4.7-pluginparam/sources.h
|
||||
--- vdr-1.4.7-vanilla/sources.h 2007-10-27 01:08:40.000000000 +0300
|
||||
+++ vdr-1.4.7-pluginparam/sources.h 2007-10-27 01:09:20.000000000 +0300
|
||||
diff -Nru vdr-1.7.0-vanilla/sources.h vdr-1.7.0-pluginparam/sources.h
|
||||
--- vdr-1.7.0-vanilla/sources.h 2005-05-14 12:30:41.000000000 +0300
|
||||
+++ vdr-1.7.0-pluginparam/sources.h 2008-04-13 18:54:25.000000000 +0300
|
||||
@@ -16,10 +16,11 @@
|
||||
public:
|
||||
enum eSourceType {
|
||||
155
pidscanner.c
Normal file
155
pidscanner.c
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* pidscanner.c: IPTV plugin for the Video Disk Recorder
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: pidscanner.c,v 1.7 2008/04/02 22:55:04 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "pidscanner.h"
|
||||
|
||||
#define PIDSCANNER_TIMEOUT_IN_MS 15000 /* 15s timeout for detection */
|
||||
#define PIDSCANNER_APID_COUNT 10 /* 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 */
|
||||
|
||||
cPidScanner::cPidScanner(void)
|
||||
: timeout(0),
|
||||
process(true),
|
||||
Vpid(0xFFFF),
|
||||
Apid(0xFFFF),
|
||||
numVpids(0),
|
||||
numApids(0)
|
||||
{
|
||||
debug("cPidScanner::cPidScanner()\n");
|
||||
channel = cChannel();
|
||||
}
|
||||
|
||||
cPidScanner::~cPidScanner()
|
||||
{
|
||||
debug("cPidScanner::~cPidScanner()\n");
|
||||
}
|
||||
|
||||
void cPidScanner::SetChannel(const cChannel *Channel)
|
||||
{
|
||||
if (Channel) {
|
||||
debug("cPidScanner::SetChannel(): %s\n", Channel->PluginParam());
|
||||
channel = *Channel;
|
||||
}
|
||||
else {
|
||||
debug("cPidScanner::SetChannel()\n");
|
||||
channel = cChannel();
|
||||
}
|
||||
Vpid = 0xFFFF;
|
||||
numVpids = 0;
|
||||
Apid = 0xFFFF;
|
||||
numApids = 0;
|
||||
process = true;
|
||||
timeout.Set(PIDSCANNER_TIMEOUT_IN_MS);
|
||||
}
|
||||
|
||||
void cPidScanner::Process(const uint8_t* buf)
|
||||
{
|
||||
//debug("cPidScanner::Process()\n");
|
||||
if (!process)
|
||||
return;
|
||||
|
||||
// Stop scanning after defined timeout
|
||||
if (timeout.TimedOut()) {
|
||||
debug("cPidScanner::Process: Timed out determining pids\n");
|
||||
process = false;
|
||||
}
|
||||
|
||||
// Verify TS packet
|
||||
if (buf[0] != 0x47) {
|
||||
error("Not TS packet: 0x%X\n", buf[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
// Found TS packet
|
||||
int pid = ts_pid(buf);
|
||||
int xpid = (buf[1] << 8 | buf[2]);
|
||||
|
||||
// Check if payload available
|
||||
uint8_t count = payload(buf);
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
if (xpid & 0x4000) {
|
||||
// Stream start (Payload Unit Start Indicator)
|
||||
uchar *d = (uint8_t*)buf;
|
||||
d += 4;
|
||||
// pointer to payload
|
||||
if (buf[3] & 0x20)
|
||||
d += d[0] + 1;
|
||||
// Skip adaption field
|
||||
if (buf[3] & 0x10) {
|
||||
// Payload present
|
||||
if ((d[0] == 0) && (d[1] == 0) && (d[2] == 1)) {
|
||||
// PES packet start
|
||||
int sid = d[3];
|
||||
// Stream ID
|
||||
if ((sid >= 0xC0) && (sid <= 0xDF)) {
|
||||
if (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("cPidScanner::Process: Incrementing Apids, now at %d\n", numApids);
|
||||
}
|
||||
}
|
||||
else if ((sid >= 0xE0) && (sid <= 0xEF)) {
|
||||
if (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("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)) {
|
||||
// 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);
|
||||
Channels.Unlock();
|
||||
process = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
32
pidscanner.h
Normal file
32
pidscanner.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* pidscanner.h: IPTV plugin for the Video Disk Recorder
|
||||
*
|
||||
* 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
|
||||
#define __PIDSCANNER_H
|
||||
|
||||
#include <vdr/tools.h>
|
||||
#include <vdr/channels.h>
|
||||
|
||||
class cPidScanner {
|
||||
private:
|
||||
cTimeMs timeout;
|
||||
cChannel channel;
|
||||
bool process;
|
||||
int Vpid;
|
||||
int Apid;
|
||||
int numVpids;
|
||||
int numApids;
|
||||
|
||||
public:
|
||||
cPidScanner(void);
|
||||
~cPidScanner();
|
||||
void SetChannel(const cChannel *Channel);
|
||||
void Process(const uint8_t* buf);
|
||||
};
|
||||
|
||||
#endif // __PIDSCANNER_H
|
||||
19
po/de_DE.po
19
po/de_DE.po
@@ -5,9 +5,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.0.6\n"
|
||||
"Project-Id-Version: iptv 0.2.0\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-01-20 16:10+0200\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2007-10-29 21:19+0100\n"
|
||||
"Last-Translator: Tobias Grimm <tg@e-tobi.net>\n"
|
||||
"Language-Team: German\n"
|
||||
@@ -70,6 +70,12 @@ msgstr "Adresse"
|
||||
msgid "Port"
|
||||
msgstr "Port"
|
||||
|
||||
msgid "Scan Sid"
|
||||
msgstr "Scanne SID"
|
||||
|
||||
msgid "Scan pids"
|
||||
msgstr "Scanne PIDS"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Nid"
|
||||
|
||||
@@ -140,15 +146,6 @@ msgid ""
|
||||
"Enabling this feature does not affect streams that do not contain section data."
|
||||
msgstr ""
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Scanne SID automatisch"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Deaktiviere Filter"
|
||||
|
||||
|
||||
22
po/fi_FI.po
22
po/fi_FI.po
@@ -5,9 +5,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.0.6\n"
|
||||
"Project-Id-Version: iptv 0.2.0\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-01-20 15:37+0200\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
|
||||
"Last-Translator: Rolf Ahrenberg\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@@ -69,6 +69,12 @@ msgstr "Osoite"
|
||||
msgid "Port"
|
||||
msgstr "Portti"
|
||||
|
||||
msgid "Scan Sid"
|
||||
msgstr "Etsi palvelu-ID"
|
||||
|
||||
msgid "Scan pids"
|
||||
msgstr "Etsi pidit"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Verkko-ID"
|
||||
|
||||
@@ -152,18 +158,6 @@ msgstr ""
|
||||
"IPTV-laajennos voi suodattaa l<>hetteest<73> VDR:lle tarjottavia sektioita, joita k<>ytet<65><74>n esim. ohjelmaoppaan ja ohjelmatunnisteiden (PID) p<>ivitt<74>miseen.\n"
|
||||
"Toiminto ei vaikuta l<>hetteeseen, jossa ei ole sektioita."
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Etsi palvelu-ID automaattisesti"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
"M<><4D>rittele etsit<69><74>nk<6E> palvelutunniste (SID) automaattisesti.\n"
|
||||
"\n"
|
||||
"Asetus vaatii suodatuksen k<>ytt<74><74>noton sektioille. Automaattinen palvelutunnisteen (SID) etsint<6E> auttaa VDR:<3A><> havaitsemaan ohjelmatunnisteiden (PID) muutokset l<>hetteest<73>."
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Poista suodattimia k<>yt<79>st<73>"
|
||||
|
||||
|
||||
40
po/fr_FR.po
40
po/fr_FR.po
@@ -2,14 +2,15 @@
|
||||
# Copyright (C) 2007 Rolf Ahrenberg & Antti Seppala
|
||||
# This file is distributed under the same license as the iptv package.
|
||||
# Bruno ROUSSEL <bruno.roussel@free.fr>, 2007.
|
||||
# NIVAL Michaël <mnival@club-internet.fr>, 2008.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.0.6\n"
|
||||
"Project-Id-Version: iptv 0.2.0\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-01-20 16:10+0200\n"
|
||||
"PO-Revision-Date: 2007-11-07 20:18+0100\n"
|
||||
"Last-Translator: Bruno ROUSSEL <bruno.roussel@free.fr>\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2008-01-26 13:14+0100\n"
|
||||
"Last-Translator: NIVAL Michaël <mnival@club-internet.fr>\n"
|
||||
"Language-Team: French\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
@@ -70,6 +71,12 @@ msgstr "Adresse"
|
||||
msgid "Port"
|
||||
msgstr "Port"
|
||||
|
||||
msgid "Scan Sid"
|
||||
msgstr "Scanne les SID"
|
||||
|
||||
msgid "Scan pids"
|
||||
msgstr "Scanne les PID"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Nid"
|
||||
|
||||
@@ -111,6 +118,9 @@ msgid ""
|
||||
"\n"
|
||||
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
|
||||
msgstr ""
|
||||
"Définit la taille du ringbuffer pour le transport du flux en megabytes.\n"
|
||||
"\n"
|
||||
"Une taille plus petite taille aide la consommation de mémoire, mais c'est sujet à plus de débordement de tampon."
|
||||
|
||||
msgid "TS buffer prefill ratio [%]"
|
||||
msgstr "Taux du buffer de pré-remplissage TS [%]"
|
||||
@@ -120,6 +130,9 @@ msgid ""
|
||||
"\n"
|
||||
"This is useful if streaming media over a slow or unreliable connection."
|
||||
msgstr ""
|
||||
"Définit le ratio de pré-remplissage du ringbuffer pour le transport du flux avant transfert dans VDR.\n"
|
||||
"\n"
|
||||
"Cette option est utile si le streaming est sur une connexion lente ou peu fiables."
|
||||
|
||||
msgid "EXT protocol base port"
|
||||
msgstr "Port de base du protocole EXT"
|
||||
@@ -129,6 +142,9 @@ 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 ""
|
||||
"Définit le port de base utilisé par le protocole EXT.\n"
|
||||
"\n"
|
||||
"La plage de port est défini par le nombre de dispositif IPTV. Ce paramètre défini le port qui est écouté pour les connexions à partir d'applications externes en utilisant le protocole EXT."
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "Utiliser le filtrage de section"
|
||||
@@ -139,15 +155,10 @@ 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 ""
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Scanne les SID automatiquement"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"Définit si la section de filtrage doit être utilisé.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
"La section filtrage signifie que le plugin IPTV essayera d'analyser et de fournir à VDR des données secondaires disponible sur le flux. VDR peut alors utiliser ces données pour fournir des fonctionnalitées supplémentaires tel que la détection de changement de pid et d'EPG etc.\n"
|
||||
"L'activation de cette fonctionnalité n'a pas d'incidence sur les flux qui ne contiennent pas de données de la section."
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Désactiver les filtres"
|
||||
@@ -157,13 +168,16 @@ 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 ""
|
||||
"Définit le numéro de section de filtrage qui sont désactivé.\n"
|
||||
"\n"
|
||||
"Certains filtrage de section peux engendrer des comportement indésirables. Blacklist les filtres qui seront laissé intact pour VDR."
|
||||
|
||||
#. TRANSLATORS: note the singular!
|
||||
msgid "Disable filter"
|
||||
msgstr "Désactiver le filtre"
|
||||
|
||||
msgid "Define an ill-behaving filter to be blacklisted."
|
||||
msgstr ""
|
||||
msgstr "Définit les mauvais comportement qui doivent être désactivé."
|
||||
|
||||
msgid "Help"
|
||||
msgstr "Aide"
|
||||
|
||||
50
po/it_IT.po
50
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.0.6\n"
|
||||
"Project-Id-Version: iptv 0.2.0\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-01-20 16:10+0200\n"
|
||||
"PO-Revision-Date: 2008-01-13 16:46+0100\n"
|
||||
"Last-Translator: Gringo <vdr-italian@tiscali.it>\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2008-03-30 05:26+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"
|
||||
@@ -47,7 +47,7 @@ msgid "HTTP"
|
||||
msgstr "HTTP"
|
||||
|
||||
msgid "FILE"
|
||||
msgstr "DATEI"
|
||||
msgstr "FILE"
|
||||
|
||||
msgid "EXT"
|
||||
msgstr "EXT"
|
||||
@@ -59,7 +59,7 @@ msgid "Delay (ms)"
|
||||
msgstr "Ritardo (ms)"
|
||||
|
||||
msgid "Script"
|
||||
msgstr "Skript"
|
||||
msgstr "Script"
|
||||
|
||||
msgid "Parameter"
|
||||
msgstr "Parametro"
|
||||
@@ -70,6 +70,12 @@ msgstr "Indirizzo"
|
||||
msgid "Port"
|
||||
msgstr "Porta"
|
||||
|
||||
msgid "Scan Sid"
|
||||
msgstr "Scansione Sid"
|
||||
|
||||
msgid "Scan pids"
|
||||
msgstr "Scansione Pids"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Nid"
|
||||
|
||||
@@ -111,15 +117,21 @@ msgid ""
|
||||
"\n"
|
||||
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
|
||||
msgstr ""
|
||||
"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 "Percentuale 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 ""
|
||||
"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."
|
||||
|
||||
msgid "EXT protocol base port"
|
||||
msgstr "Porta base protocollo EXT"
|
||||
@@ -129,6 +141,9 @@ 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 ""
|
||||
"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."
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "Utilizza sezione filtri"
|
||||
@@ -139,15 +154,10 @@ 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 ""
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Scansione Sid automatica"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"Definisci se la sezione filtri sarà utilizzata.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
"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."
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Disabilita filtri"
|
||||
@@ -157,13 +167,17 @@ 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 ""
|
||||
"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."
|
||||
|
||||
#. TRANSLATORS: note the singular!
|
||||
msgid "Disable filter"
|
||||
msgstr "Disabilita filtro"
|
||||
|
||||
msgid "Define an ill-behaving filter to be blacklisted."
|
||||
msgstr ""
|
||||
msgstr "Definisci un filtro corrotto che sarà messo nella lista nera."
|
||||
|
||||
msgid "Help"
|
||||
msgstr "Aiuto"
|
||||
|
||||
|
||||
168
po/ru_RU.po
Normal file
168
po/ru_RU.po
Normal file
@@ -0,0 +1,168 @@
|
||||
# VDR plugin language source file.
|
||||
# Copyright (C) 2007 Rolf Ahrenberg & Antti Seppala
|
||||
# This file is distributed under the same license as the iptv package.
|
||||
# Alexander Gross <Bikalexander@gmail.com>, 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-03-16 12:14+0100\n"
|
||||
"Last-Translator: Alexander Gross <Bikalexander@gmail.com>\n"
|
||||
"Language-Team: Russian <de@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
|
||||
msgid "PAT (0x00)"
|
||||
msgstr "PAT (0x00)"
|
||||
|
||||
msgid "NIT (0x40)"
|
||||
msgstr "NIT (0x40)"
|
||||
|
||||
msgid "SDT (0x42)"
|
||||
msgstr "SDT (0x42)"
|
||||
|
||||
msgid "EIT (0x4E/0x4F)"
|
||||
msgstr "EIT (0x4E/0x4F)"
|
||||
|
||||
msgid "EIT (0x5X)"
|
||||
msgstr "EIT (0x5X)"
|
||||
|
||||
msgid "EIT (0x6X)"
|
||||
msgstr "EIT (0x6X)"
|
||||
|
||||
msgid "TDT (0x70)"
|
||||
msgstr "TDT (0x70)"
|
||||
|
||||
msgid "Experience the IPTV"
|
||||
msgstr "Попробуй IPTV"
|
||||
|
||||
msgid "UDP"
|
||||
msgstr "UDP"
|
||||
|
||||
msgid "HTTP"
|
||||
msgstr "HTTP"
|
||||
|
||||
msgid "FILE"
|
||||
msgstr "ФАЙЛ"
|
||||
|
||||
msgid "EXT"
|
||||
msgstr "EXT"
|
||||
|
||||
msgid "Protocol"
|
||||
msgstr "Протокол"
|
||||
|
||||
msgid "Delay (ms)"
|
||||
msgstr "Задержка (мс)"
|
||||
|
||||
msgid "Script"
|
||||
msgstr "Скрипт"
|
||||
|
||||
msgid "Parameter"
|
||||
msgstr "Параметр"
|
||||
|
||||
msgid "Address"
|
||||
msgstr "Адрес"
|
||||
|
||||
msgid "Port"
|
||||
msgstr "Порт"
|
||||
|
||||
msgid "Scan Sid"
|
||||
msgstr "Сканировать SID"
|
||||
|
||||
msgid "Scan pids"
|
||||
msgstr "Сканировать пиды"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Nid"
|
||||
|
||||
msgid "Tid"
|
||||
msgstr "Tid"
|
||||
|
||||
msgid "Rid"
|
||||
msgstr "Rid"
|
||||
|
||||
msgid "Cannot find unique channel settings!"
|
||||
msgstr "Невозможно найти уникальные настройки канала!"
|
||||
|
||||
msgid "IPTV Channels"
|
||||
msgstr "IPTV каналы"
|
||||
|
||||
msgid "IPTV Information"
|
||||
msgstr "IPTV информация"
|
||||
|
||||
msgid "General"
|
||||
msgstr "Общее"
|
||||
|
||||
msgid "Pids"
|
||||
msgstr "Пиды"
|
||||
|
||||
msgid "Filters"
|
||||
msgstr "Фильтры"
|
||||
|
||||
msgid "Bits/bytes"
|
||||
msgstr "Биты / байт"
|
||||
|
||||
msgid "IPTV information not available!"
|
||||
msgstr "IPTV информация отсутствует!"
|
||||
|
||||
msgid "TS buffer size [MB]"
|
||||
msgstr "Размер TS буфера [MB]"
|
||||
|
||||
msgid ""
|
||||
"Define a ringbuffer size for transport streams in megabytes.\n"
|
||||
"\n"
|
||||
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
|
||||
msgstr ""
|
||||
|
||||
msgid "TS buffer prefill ratio [%]"
|
||||
msgstr "Предварительный буфер 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 ""
|
||||
|
||||
msgid "EXT protocol base port"
|
||||
msgstr "Базисный порт EXT протокола"
|
||||
|
||||
msgid ""
|
||||
"Define a base port used by EXT protocol.\n"
|
||||
"\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 ""
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "Использовать область фильтрации"
|
||||
|
||||
msgid ""
|
||||
"Define whether the section filtering shall be used.\n"
|
||||
"\n"
|
||||
"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 ""
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Деактивировать фильтры"
|
||||
|
||||
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 ""
|
||||
|
||||
#. TRANSLATORS: note the singular!
|
||||
msgid "Disable filter"
|
||||
msgstr "Деактивировать фильтр"
|
||||
|
||||
msgid "Define an ill-behaving filter to be blacklisted."
|
||||
msgstr "Неправильно работающий фильтр, занести в черный список."
|
||||
|
||||
msgid "Help"
|
||||
msgstr "Справка"
|
||||
|
||||
156
po2i18n.pl
156
po2i18n.pl
@@ -1,156 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# po2i18n - Convert plugin po files in into i18n.c-format
|
||||
#
|
||||
# See the README file for copyright information and how to reach the author.
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my @LANGS = (
|
||||
"en_US",
|
||||
"de_DE",
|
||||
"sl_SI",
|
||||
"it_IT",
|
||||
"nl_NL",
|
||||
"pt_PT",
|
||||
"fr_FR",
|
||||
"nn_NO",
|
||||
"fi_FI",
|
||||
"pl_PL",
|
||||
"es_ES",
|
||||
"el_GR",
|
||||
"sv_SE",
|
||||
"ro_RO",
|
||||
"hu_HU",
|
||||
"ca_ES",
|
||||
"ru_RU",
|
||||
"hr_HR",
|
||||
"et_EE",
|
||||
"da_DK",
|
||||
"cs_CZ",
|
||||
"tr_TR"
|
||||
);
|
||||
|
||||
my %VERS = (
|
||||
"en_US" => 10200,
|
||||
"de_DE" => 10200,
|
||||
"sl_SI" => 10200,
|
||||
"it_IT" => 10200,
|
||||
"nl_NL" => 10200,
|
||||
"pt_PT" => 10200,
|
||||
"fr_FR" => 10200,
|
||||
"nn_NO" => 10200,
|
||||
"fi_FI" => 10200,
|
||||
"pl_PL" => 10200,
|
||||
"es_ES" => 10200,
|
||||
"el_GR" => 10200,
|
||||
"sv_SE" => 10200,
|
||||
"ro_RO" => 10200,
|
||||
"hu_HU" => 10200,
|
||||
"ca_ES" => 10200,
|
||||
"ru_RU" => 10302,
|
||||
"hr_HR" => 10307,
|
||||
"et_EE" => 10313,
|
||||
"da_DK" => 10316,
|
||||
"cs_CZ" => 10342,
|
||||
"tr_TR" => 10502
|
||||
);
|
||||
|
||||
|
||||
my %strings;
|
||||
|
||||
foreach my $lang (@LANGS) { $strings{$lang} = { }; }
|
||||
|
||||
|
||||
sub LoadLanguage(*) {
|
||||
my ($lang) = @_;
|
||||
|
||||
if (!open FILE, "<", "po/$lang.po") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
my $msgid = "";
|
||||
my $msgstr = "";
|
||||
my $last = 0; # 0=init, 1=msgid was last, 2=msgstr was last
|
||||
|
||||
while (<FILE>) {
|
||||
chomp;
|
||||
my $line = $_;
|
||||
|
||||
if ($line =~ /^msgid "(.*)"$/) {
|
||||
if ($last eq 2) {
|
||||
$strings{$lang}->{$msgid} = $msgstr;
|
||||
$strings{"en_US"}->{$msgid} = $msgid;
|
||||
}
|
||||
$msgid = $1;
|
||||
$last = 1;
|
||||
} elsif ($line =~ /^msgstr "(.*)"/) {
|
||||
$msgstr = $1;
|
||||
$last = 2;
|
||||
} elsif ($line =~ /^"(.*)"/) {
|
||||
if ($last eq 1) {
|
||||
$msgid = $msgid . $1;
|
||||
} elsif ($last eq 2) {
|
||||
$msgstr = $msgstr . $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($last eq 2) {
|
||||
$strings{$lang}->{$msgid} = $msgstr;
|
||||
$strings{"en_US"}->{$msgid} = $msgid;
|
||||
}
|
||||
|
||||
close FILE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach my $lang (@LANGS) {
|
||||
LoadLanguage($lang);
|
||||
}
|
||||
|
||||
my @msgids = sort keys %{$strings{"en_US"}};
|
||||
|
||||
|
||||
my $silent = 0;
|
||||
|
||||
while (<>) {
|
||||
my $line = $_;
|
||||
|
||||
if ($line =~ /^\/\/ START I18N/) {
|
||||
print "// START I18N - automatically generated by po2i18n.pl\n";
|
||||
for my $msgid (@msgids) {
|
||||
next if $msgid eq "";
|
||||
|
||||
my $head = " { ";
|
||||
my $endif = "";
|
||||
my $versnum = 10200;
|
||||
|
||||
for my $lang (@LANGS) {
|
||||
if ($VERS{$lang} ne $versnum) {
|
||||
$versnum = $VERS{$lang};
|
||||
print $endif;
|
||||
print "#if VDRVERSNUM >= $versnum\n";
|
||||
$endif = "#endif\n";
|
||||
}
|
||||
my $msgstr = $strings{$lang}->{$msgid};
|
||||
$msgstr = "" if !defined $msgstr;
|
||||
|
||||
print "$head\"$msgstr\",\n";
|
||||
$head = " ";
|
||||
}
|
||||
print $endif;
|
||||
print " },\n";
|
||||
}
|
||||
$silent = 1;
|
||||
}
|
||||
|
||||
if (!$silent) { print $line; }
|
||||
|
||||
if ($line =~ /^\/\/ END I18N/) {
|
||||
print "// END I18N - automatically generated by po2i18n.pl\n";
|
||||
$silent = 0;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolext.c,v 1.22 2008/01/06 20:19:02 rahrenbe Exp $
|
||||
* $Id: protocolext.c,v 1.24 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <sys/wait.h>
|
||||
@@ -22,11 +22,10 @@
|
||||
|
||||
cIptvProtocolExt::cIptvProtocolExt()
|
||||
: pid(-1),
|
||||
scriptFile(""),
|
||||
scriptParameter(0)
|
||||
{
|
||||
debug("cIptvProtocolExt::cIptvProtocolExt()\n");
|
||||
scriptFile = strdup("");
|
||||
listenAddr = strdup("127.0.0.1");
|
||||
}
|
||||
|
||||
cIptvProtocolExt::~cIptvProtocolExt()
|
||||
@@ -34,9 +33,6 @@ cIptvProtocolExt::~cIptvProtocolExt()
|
||||
debug("cIptvProtocolExt::~cIptvProtocolExt()\n");
|
||||
// Drop the socket connection
|
||||
cIptvProtocolExt::Close();
|
||||
// Free allocated memory
|
||||
free(scriptFile);
|
||||
free(listenAddr);
|
||||
}
|
||||
|
||||
void cIptvProtocolExt::ExecuteScript(void)
|
||||
@@ -56,15 +52,12 @@ void cIptvProtocolExt::ExecuteScript(void)
|
||||
for (int i = STDERR_FILENO + 1; i < MaxPossibleFileDescriptors; i++)
|
||||
close(i);
|
||||
// Execute the external script
|
||||
char* cmd = NULL;
|
||||
asprintf(&cmd, "%s %d %d", scriptFile, scriptParameter, socketPort);
|
||||
debug("cIptvProtocolExt::ExecuteScript(child): %s\n", cmd);
|
||||
if (execl("/bin/sh", "sh", "-c", cmd, NULL) == -1) {
|
||||
error("ERROR: Script execution failed: %s", cmd);
|
||||
free(cmd);
|
||||
cString cmd = cString::sprintf("%s %d %d", *scriptFile, scriptParameter, socketPort);
|
||||
debug("cIptvProtocolExt::ExecuteScript(child): %s\n", *cmd);
|
||||
if (execl("/bin/sh", "sh", "-c", *cmd, NULL) == -1) {
|
||||
error("ERROR: Script execution failed: %s", *cmd);
|
||||
_exit(-1);
|
||||
}
|
||||
free(cmd);
|
||||
_exit(0);
|
||||
}
|
||||
else {
|
||||
@@ -87,7 +80,7 @@ void cIptvProtocolExt::TerminateScript(void)
|
||||
retval = 0;
|
||||
waitms += timeoutms;
|
||||
if ((waitms % 2000) == 0) {
|
||||
error("ERROR: Script '%s' won't terminate - killing it!", scriptFile);
|
||||
error("ERROR: Script '%s' won't terminate - killing it!", *scriptFile);
|
||||
kill(pid, SIGKILL);
|
||||
}
|
||||
// Clear wait status to make sure child exit status is accessible
|
||||
@@ -115,7 +108,7 @@ bool cIptvProtocolExt::Open(void)
|
||||
debug("cIptvProtocolExt::Open()\n");
|
||||
// Reject empty script files
|
||||
if (!strlen(scriptFile))
|
||||
return false;
|
||||
return false;
|
||||
// Create the listening socket
|
||||
OpenSocket(socketPort);
|
||||
// Execute the external script
|
||||
@@ -146,10 +139,9 @@ bool cIptvProtocolExt::Set(const char* Location, const int Parameter, const int
|
||||
if (!isempty(Location)) {
|
||||
struct stat stbuf;
|
||||
// Update script file and parameter
|
||||
free(scriptFile);
|
||||
asprintf(&scriptFile, "%s/%s", IptvConfig.GetConfigDirectory(), Location);
|
||||
scriptFile = cString::sprintf("%s/%s", IptvConfig.GetConfigDirectory(), Location);
|
||||
if ((stat(scriptFile, &stbuf) != 0) || (strstr(scriptFile, "..") != 0)) {
|
||||
error("ERROR: Non-existent or relative path script '%s'", scriptFile);
|
||||
error("ERROR: Non-existent or relative path script '%s'", *scriptFile);
|
||||
return false;
|
||||
}
|
||||
scriptParameter = Parameter;
|
||||
@@ -162,5 +154,5 @@ bool cIptvProtocolExt::Set(const char* Location, const int Parameter, const int
|
||||
cString cIptvProtocolExt::GetInformation(void)
|
||||
{
|
||||
//debug("cIptvProtocolExt::GetInformation()");
|
||||
return cString::sprintf("ext://%s:%d", scriptFile, scriptParameter);
|
||||
return cString::sprintf("ext://%s:%d", *scriptFile, scriptParameter);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolext.h,v 1.9 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
* $Id: protocolext.h,v 1.10 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_PROTOCOLEXT_H
|
||||
@@ -16,8 +16,7 @@
|
||||
class cIptvProtocolExt : public cIptvUdpSocket, public cIptvProtocolIf {
|
||||
private:
|
||||
int pid;
|
||||
char* listenAddr;
|
||||
char* scriptFile;
|
||||
cString scriptFile;
|
||||
int scriptParameter;
|
||||
|
||||
private:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolhttp.c,v 1.22 2008/01/04 23:36:37 ajhseppa Exp $
|
||||
* $Id: protocolhttp.c,v 1.25 2008/04/02 22:55:04 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -34,7 +34,6 @@ cIptvProtocolHttp::~cIptvProtocolHttp()
|
||||
// Free allocated memory
|
||||
free(streamPath);
|
||||
free(streamAddr);
|
||||
|
||||
}
|
||||
|
||||
bool cIptvProtocolHttp::Connect(void)
|
||||
@@ -88,17 +87,14 @@ bool cIptvProtocolHttp::Connect(void)
|
||||
}
|
||||
|
||||
// Formulate and send HTTP request
|
||||
char buffer[256];
|
||||
memset(buffer, '\0', sizeof(buffer));
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"GET %s HTTP/1.1\r\n"
|
||||
"Host: %s\r\n"
|
||||
"User-Agent: vdr-iptv\r\n"
|
||||
"Range: bytes=0-\r\n"
|
||||
"Connection: Close\r\n"
|
||||
"\r\n", streamPath, streamAddr);
|
||||
cString buffer = cString::sprintf("GET %s HTTP/1.1\r\n"
|
||||
"Host: %s\r\n"
|
||||
"User-Agent: vdr-iptv\r\n"
|
||||
"Range: bytes=0-\r\n"
|
||||
"Connection: Close\r\n"
|
||||
"\r\n", streamPath, streamAddr);
|
||||
|
||||
//debug("Sending http request: %s\n", buffer);
|
||||
debug("Sending http request: %s\n", *buffer);
|
||||
err = send(socketDesc, buffer, strlen(buffer), 0);
|
||||
ERROR_IF_FUNC(err < 0, "send()", CloseSocket(), return false);
|
||||
|
||||
@@ -119,10 +115,10 @@ bool cIptvProtocolHttp::Disconnect(void)
|
||||
debug("cIptvProtocolHttp::Disconnect()\n");
|
||||
// Check that stream address is valid
|
||||
if (isActive) {
|
||||
// Close the socket
|
||||
CloseSocket();
|
||||
// Update active flag
|
||||
isActive = false;
|
||||
// Close the socket
|
||||
CloseSocket();
|
||||
// Update active flag
|
||||
isActive = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -228,22 +224,22 @@ bool cIptvProtocolHttp::Set(const char* Location, const int Parameter, const int
|
||||
{
|
||||
debug("cIptvProtocolHttp::Set(): Location=%s Parameter=%d Index=%d\n", Location, Parameter, Index);
|
||||
if (!isempty(Location)) {
|
||||
// Disconnect the current socket
|
||||
Disconnect();
|
||||
// Update stream address, path and port
|
||||
streamAddr = strcpyrealloc(streamAddr, Location);
|
||||
char *path = strstr(streamAddr, "/");
|
||||
if (path) {
|
||||
streamPath = strcpyrealloc(streamPath, path);
|
||||
*path = 0;
|
||||
}
|
||||
else
|
||||
streamPath = strcpyrealloc(streamPath, "/");
|
||||
socketPort = Parameter;
|
||||
debug("http://%s:%d%s\n", streamAddr, socketPort, streamPath);
|
||||
// Re-connect the socket
|
||||
Connect();
|
||||
}
|
||||
// Disconnect the current socket
|
||||
Disconnect();
|
||||
// Update stream address, path and port
|
||||
streamAddr = strcpyrealloc(streamAddr, Location);
|
||||
char *path = strstr(streamAddr, "/");
|
||||
if (path) {
|
||||
streamPath = strcpyrealloc(streamPath, path);
|
||||
*path = 0;
|
||||
}
|
||||
else
|
||||
streamPath = strcpyrealloc(streamPath, "/");
|
||||
socketPort = Parameter;
|
||||
//debug("http://%s:%d%s\n", streamAddr, socketPort, streamPath);
|
||||
// Re-connect the socket
|
||||
Connect();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocolif.h,v 1.7 2007/10/19 22:18:55 rahrenbe Exp $
|
||||
* $Id: protocolif.h,v 1.8 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_PROTOCOLIF_H
|
||||
@@ -20,8 +20,8 @@ public:
|
||||
virtual cString GetInformation(void) = 0;
|
||||
|
||||
private:
|
||||
cIptvProtocolIf(const cIptvProtocolIf&);
|
||||
cIptvProtocolIf& operator=(const cIptvProtocolIf&);
|
||||
cIptvProtocolIf(const cIptvProtocolIf&);
|
||||
cIptvProtocolIf& operator=(const cIptvProtocolIf&);
|
||||
};
|
||||
|
||||
#endif // __IPTV_PROTOCOLIF_H
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sectionfilter.c,v 1.17 2008/01/19 21:08:02 ajhseppa Exp $
|
||||
* $Id: sectionfilter.c,v 1.19 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "sectionfilter.h"
|
||||
#include "statistics.h"
|
||||
|
||||
#define IPTV_FILTER_FILENAME "/tmp/vdr-iptv%d.filter%d"
|
||||
|
||||
cIptvSectionFilter::cIptvSectionFilter(int Index, int devInd,
|
||||
u_short Pid, u_char Tid, u_char Mask)
|
||||
@@ -21,7 +18,8 @@ cIptvSectionFilter::cIptvSectionFilter(int Index, int devInd,
|
||||
seclen(0),
|
||||
tsfeedp(0),
|
||||
pid(Pid),
|
||||
id(Index)
|
||||
id(Index),
|
||||
pipeName("")
|
||||
{
|
||||
//debug("cIptvSectionFilter::cIptvSectionFilter(%d)\n", Index);
|
||||
memset(secbuf_base, '\0', sizeof(secbuf_base));
|
||||
@@ -30,7 +28,6 @@ cIptvSectionFilter::cIptvSectionFilter(int Index, int devInd,
|
||||
memset(filter_mode, '\0', sizeof(filter_mode));
|
||||
memset(maskandmode, '\0', sizeof(maskandmode));
|
||||
memset(maskandnotmode, '\0', sizeof(maskandnotmode));
|
||||
memset(pipeName, '\0', sizeof(pipeName));
|
||||
|
||||
SetPipeName(devInd);
|
||||
|
||||
@@ -38,17 +35,16 @@ cIptvSectionFilter::cIptvSectionFilter(int Index, int devInd,
|
||||
filter_mask[0] = Mask;
|
||||
|
||||
// Invert the filter
|
||||
for (int i = 0; i < DMX_MAX_FILTER_SIZE; ++i) {
|
||||
for (int i = 0; i < DMX_MAX_FILTER_SIZE; ++i)
|
||||
filter_value[i] ^= 0xff;
|
||||
}
|
||||
|
||||
uint8_t mask, mode, local_doneq = 0;
|
||||
for (int i = 0; i < DMX_MAX_FILTER_SIZE; i++) {
|
||||
mode = filter_mode[i];
|
||||
mask = filter_mask[i];
|
||||
maskandmode[i] = mask & mode;
|
||||
local_doneq |= maskandnotmode[i] = mask & ~mode;
|
||||
}
|
||||
for (int i = 0; i < DMX_MAX_FILTER_SIZE; ++i) {
|
||||
mode = filter_mode[i];
|
||||
mask = filter_mask[i];
|
||||
maskandmode[i] = mask & mode;
|
||||
local_doneq |= maskandnotmode[i] = mask & ~mode;
|
||||
}
|
||||
doneq = local_doneq ? 1 : 0;
|
||||
|
||||
struct stat sb;
|
||||
@@ -69,14 +65,13 @@ cIptvSectionFilter::~cIptvSectionFilter()
|
||||
close(fifoDescriptor);
|
||||
close(readDescriptor);
|
||||
unlink(pipeName);
|
||||
memset(pipeName, '\0', sizeof(pipeName));
|
||||
fifoDescriptor = -1;
|
||||
readDescriptor = -1;
|
||||
}
|
||||
|
||||
void cIptvSectionFilter::SetPipeName(int deviceIndex)
|
||||
{
|
||||
snprintf(pipeName, sizeof(pipeName), IPTV_FILTER_FILENAME, deviceIndex, id);
|
||||
pipeName = cString::sprintf(IPTV_FILTER_FILENAME, deviceIndex, id);
|
||||
}
|
||||
|
||||
int cIptvSectionFilter::GetReadDesc()
|
||||
@@ -115,8 +110,6 @@ int cIptvSectionFilter::dmxdev_section_callback(const uint8_t *buffer1, size_t b
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void cIptvSectionFilter::demux_swfilter_section_new()
|
||||
{
|
||||
#ifdef DEMUX_SECTION_LOSS_LOG
|
||||
@@ -131,7 +124,7 @@ void cIptvSectionFilter::demux_swfilter_section_new()
|
||||
printf("sectionfilter.c section ts padding loss: %d/%d\n",
|
||||
n, tsfeedp);
|
||||
printf("sectionfilter.c pad data:");
|
||||
for (i = 0; i < n; i++)
|
||||
for (i = 0; i < n; ++i)
|
||||
printf(" %02x", secbuf[i]);
|
||||
printf("\n");
|
||||
}
|
||||
@@ -146,7 +139,7 @@ int cIptvSectionFilter::demux_swfilter_sectionfilter()
|
||||
uint8_t neq = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < DMX_MAX_FILTER_SIZE; i++) {
|
||||
for (i = 0; i < DMX_MAX_FILTER_SIZE; ++i) {
|
||||
uint8_t local_xor = filter_value[i] ^ secbuf[i];
|
||||
if (maskandmode[i] & local_xor) {
|
||||
#ifdef DEBUG_PRINTF
|
||||
@@ -206,7 +199,7 @@ int cIptvSectionFilter::demux_swfilter_section_copy_dump(const uint8_t *buf, uin
|
||||
/* to be sure always set secbuf */
|
||||
secbuf = secbuf_base + secbufp;
|
||||
|
||||
for (n = 0; secbufp + 2 < limit; n++) {
|
||||
for (n = 0; secbufp + 2 < limit; ++n) {
|
||||
seclen_local = section_length(secbuf);
|
||||
if (seclen_local <= 0 || seclen_local > DMX_MAX_SECTION_SIZE ||
|
||||
seclen_local + secbufp > limit)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sectionfilter.h,v 1.7 2007/10/08 23:51:58 rahrenbe Exp $
|
||||
* $Id: sectionfilter.h,v 1.8 2008/02/17 19:18:47 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_SECTIONFILTER_H
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
uint8_t maskandmode[DMX_MAX_FILTER_SIZE];
|
||||
uint8_t maskandnotmode[DMX_MAX_FILTER_SIZE];
|
||||
|
||||
char pipeName[128];
|
||||
cString pipeName;
|
||||
|
||||
inline uint16_t section_length(const uint8_t *buf);
|
||||
|
||||
|
||||
175
setup.c
175
setup.c
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.c,v 1.50 2008/01/20 16:15:14 rahrenbe Exp $
|
||||
* $Id: setup.c,v 1.58 2008/04/02 20:22:48 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@@ -37,12 +37,13 @@ private:
|
||||
struct tIptvChannel {
|
||||
int frequency, source, protocol, parameter, vpid, ppid, 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];
|
||||
} data;
|
||||
cChannel *channel;
|
||||
const char *protocols[eProtocolCount];
|
||||
void Setup(void);
|
||||
cString GetIptvSettings(const char *Param, int *Parameter, int *Protocol);
|
||||
cString GetIptvSettings(const char *Param, int *Parameter, int *SidScan, int *PidScan, int *Protocol);
|
||||
void GetChannelData(cChannel *Channel);
|
||||
void SetChannelData(cChannel *Channel);
|
||||
|
||||
@@ -69,12 +70,33 @@ cIptvMenuEditChannel::cIptvMenuEditChannel(cChannel *Channel, bool New)
|
||||
Setup();
|
||||
}
|
||||
|
||||
cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Parameter, int *Protocol)
|
||||
cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Parameter, int *SidScan, int *PidScan, int *Protocol)
|
||||
{
|
||||
char *tag = NULL;
|
||||
char *proto = NULL;
|
||||
char *loc = NULL;
|
||||
if (sscanf(Param, "%a[^|]|%a[^|]|%a[^|]|%d", &tag, &proto, &loc, Parameter) == 4) {
|
||||
if (sscanf(Param, "%a[^|]|S%dP%d|%a[^|]|%a[^|]|%d", &tag, SidScan, PidScan, &proto, &loc, Parameter) == 6) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
else if (sscanf(Param, "%a[^|]|P%dS%d|%a[^|]|%a[^|]|%d", &tag, PidScan, SidScan, &proto, &loc, Parameter) == 6) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
@@ -101,7 +123,7 @@ cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Parameter,
|
||||
void cIptvMenuEditChannel::GetChannelData(cChannel *Channel)
|
||||
{
|
||||
if (Channel) {
|
||||
int parameter, protocol;
|
||||
int parameter, protocol, sidscan, pidscan;
|
||||
data.frequency = Channel->Frequency();
|
||||
data.source = Channel->Source();
|
||||
data.vpid = Channel->Vpid();
|
||||
@@ -120,7 +142,9 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel)
|
||||
data.tid = Channel->Tid();
|
||||
data.rid = Channel->Rid();
|
||||
strn0cpy(data.name, Channel->Name(), sizeof(data.name));
|
||||
strn0cpy(data.location, *GetIptvSettings(Channel->PluginParam(), ¶meter, &protocol), sizeof(data.location));
|
||||
strn0cpy(data.location, *GetIptvSettings(Channel->PluginParam(), ¶meter, &sidscan, &pidscan, &protocol), sizeof(data.location));
|
||||
data.sidscan = sidscan;
|
||||
data.pidscan = pidscan;
|
||||
data.protocol = protocol;
|
||||
data.parameter = parameter;
|
||||
}
|
||||
@@ -144,6 +168,8 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel)
|
||||
data.rid = 0;
|
||||
strn0cpy(data.name, "IPTV", sizeof(data.name));
|
||||
strn0cpy(data.location, "127.0.0.1", sizeof(data.location));
|
||||
data.sidscan = 0;
|
||||
data.pidscan = 0;
|
||||
data.protocol = eProtocolUDP;
|
||||
data.parameter = 1234;
|
||||
}
|
||||
@@ -157,25 +183,21 @@ void cIptvMenuEditChannel::SetChannelData(cChannel *Channel)
|
||||
char dlangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
||||
switch (data.protocol) {
|
||||
case eProtocolEXT:
|
||||
param = cString::sprintf("IPTV|EXT|%s|%d", data.location, data.parameter);
|
||||
param = cString::sprintf("IPTV|S%dP%d|EXT|%s|%d", data.sidscan, data.pidscan, data.location, data.parameter);
|
||||
break;
|
||||
case eProtocolFILE:
|
||||
param = cString::sprintf("IPTV|FILE|%s|%d", data.location, data.parameter);
|
||||
param = cString::sprintf("IPTV|S%dP%d|FILE|%s|%d", data.sidscan, data.pidscan, data.location, data.parameter);
|
||||
break;
|
||||
case eProtocolHTTP:
|
||||
param = cString::sprintf("IPTV|HTTP|%s|%d", data.location, data.parameter);
|
||||
param = cString::sprintf("IPTV|S%dP%d|HTTP|%s|%d", data.sidscan, data.pidscan, data.location, data.parameter);
|
||||
break;
|
||||
default:
|
||||
case eProtocolUDP:
|
||||
param = cString::sprintf("IPTV|UDP|%s|%d", data.location, data.parameter);
|
||||
param = cString::sprintf("IPTV|S%dP%d|UDP|%s|%d", data.sidscan, data.pidscan, data.location, data.parameter);
|
||||
break;
|
||||
}
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10510
|
||||
Channel->SetPids(data.vpid, data.ppid, data.apid, alangs, data.dpid, dlangs, data.tpid);
|
||||
#else
|
||||
char slangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||
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");
|
||||
@@ -192,38 +214,27 @@ void cIptvMenuEditChannel::Setup(void)
|
||||
eProtocolCount, protocols));
|
||||
switch (data.protocol) {
|
||||
case eProtocolFILE:
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10511
|
||||
Add(new cMenuEditStrItem(trVDR("File"), data.location, sizeof(data.location), trVDR(FileNameChars)));
|
||||
#else
|
||||
Add(new cMenuEditStrItem(trVDR("File"), data.location, sizeof(data.location)));
|
||||
#endif
|
||||
Add(new cMenuEditIntItem(tr("Delay (ms)"), &data.parameter, 0, 0xFFFF));
|
||||
break;
|
||||
case eProtocolEXT:
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10511
|
||||
Add(new cMenuEditStrItem(tr("Script"), data.location, sizeof(data.location), trVDR(FileNameChars)));
|
||||
#else
|
||||
Add(new cMenuEditStrItem(tr("Script"), data.location, sizeof(data.location)));
|
||||
#endif
|
||||
Add(new cMenuEditIntItem(tr("Parameter"), &data.parameter, 0, 0xFFFF));
|
||||
break;
|
||||
case eProtocolHTTP:
|
||||
case eProtocolUDP:
|
||||
default:
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10511
|
||||
Add(new cMenuEditStrItem(tr("Address"), data.location, sizeof(data.location), trVDR(FileNameChars)));
|
||||
#else
|
||||
Add(new cMenuEditStrItem(tr("Address"), data.location, sizeof(data.location)));
|
||||
#endif
|
||||
Add(new cMenuEditIntItem(tr("Port"), &data.parameter, 0, 0xFFFF));
|
||||
break;
|
||||
}
|
||||
cOsdItem *sidScanItem = new cMenuEditBoolItem(tr("Scan Sid"), &data.sidscan);
|
||||
if (!IptvConfig.GetSectionFiltering())
|
||||
sidScanItem->SetSelectable(false);
|
||||
Add(sidScanItem);
|
||||
Add(new cMenuEditBoolItem(tr("Scan pids"), &data.pidscan));
|
||||
// Normal settings
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10511
|
||||
Add(new cMenuEditStrItem(trVDR("Name"), data.name, sizeof(data.name), trVDR(FileNameChars)));
|
||||
#else
|
||||
Add(new cMenuEditStrItem(trVDR("Name"), data.name, sizeof(data.name)));
|
||||
#endif
|
||||
Add(new cMenuEditIntItem(trVDR("Frequency"), &data.frequency));
|
||||
Add(new cMenuEditIntItem(trVDR("Vpid"), &data.vpid, 0, 0x1FFF));
|
||||
Add(new cMenuEditIntItem(trVDR("Ppid"), &data.ppid, 0, 0x1FFF));
|
||||
@@ -231,10 +242,8 @@ void cIptvMenuEditChannel::Setup(void)
|
||||
Add(new cMenuEditIntItem(trVDR("Apid2"), &data.apid[1], 0, 0x1FFF));
|
||||
Add(new cMenuEditIntItem(trVDR("Dpid1"), &data.dpid[0], 0, 0x1FFF));
|
||||
Add(new cMenuEditIntItem(trVDR("Dpid2"), &data.dpid[1], 0, 0x1FFF));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10510
|
||||
Add(new cMenuEditIntItem(trVDR("Spid1"), &data.spid[0], 0, 0x1FFF));
|
||||
Add(new cMenuEditIntItem(trVDR("Spid2"), &data.spid[1], 0, 0x1FFF));
|
||||
#endif
|
||||
Add(new cMenuEditIntItem(trVDR("Tpid"), &data.tpid, 0, 0x1FFF));
|
||||
Add(new cMenuEditIntItem(trVDR("CA"), &data.caids[0], 0, 0xFFFF));
|
||||
Add(new cMenuEditIntItem(trVDR("Sid"), &data.sid, 1, 0xFFFF));
|
||||
@@ -257,44 +266,44 @@ eOSState cIptvMenuEditChannel::ProcessKey(eKeys Key)
|
||||
bool firstIncrement = true;
|
||||
// Search for identical channels as these will be ignored by vdr
|
||||
for (cChannel *iteratorChannel = Channels.First(); iteratorChannel;
|
||||
iteratorChannel = Channels.Next(iteratorChannel)) {
|
||||
// This is one of the channels cause the uniquity check to fail
|
||||
if (!iteratorChannel->GroupSep() && iteratorChannel != channel
|
||||
&& iteratorChannel->GetChannelID() == newchannel.GetChannelID()) {
|
||||
// See if it has unique Plugin param. If yes then increment
|
||||
// the corresponding Rid until it is unique
|
||||
if (strcmp(iteratorChannel->PluginParam(),
|
||||
newchannel.PluginParam())) {
|
||||
// If the channel RID is already at maximum, then fail the
|
||||
// channel modification
|
||||
if (iteratorChannel->Rid() >= 0x1FFF) {
|
||||
debug("Cannot increment RID over maximum value\n");
|
||||
uniquityFailed = true;
|
||||
break;
|
||||
}
|
||||
debug("Incrementing conflicting channel RID\n");
|
||||
iteratorChannel->SetId(iteratorChannel->Nid(),
|
||||
iteratorChannel->Tid(),
|
||||
iteratorChannel->Sid(),
|
||||
firstIncrement ?
|
||||
0 : iteratorChannel->Rid() + 1);
|
||||
iteratorChannel = Channels.Next(iteratorChannel)) {
|
||||
// This is one of the channels cause the uniquity check to fail
|
||||
if (!iteratorChannel->GroupSep() && iteratorChannel != channel &&
|
||||
iteratorChannel->GetChannelID() == newchannel.GetChannelID()) {
|
||||
// See if it has unique Plugin param. If yes then increment
|
||||
// the corresponding Rid until it is unique
|
||||
if (strcmp(iteratorChannel->PluginParam(),
|
||||
newchannel.PluginParam())) {
|
||||
// If the channel RID is already at maximum, then fail the
|
||||
// channel modification
|
||||
if (iteratorChannel->Rid() >= 0x1FFF) {
|
||||
debug("Cannot increment RID over maximum value\n");
|
||||
uniquityFailed = true;
|
||||
break;
|
||||
}
|
||||
debug("Incrementing conflicting channel RID\n");
|
||||
iteratorChannel->SetId(iteratorChannel->Nid(),
|
||||
iteratorChannel->Tid(),
|
||||
iteratorChannel->Sid(),
|
||||
firstIncrement ?
|
||||
0 : iteratorChannel->Rid() + 1);
|
||||
|
||||
// Try zero Rid:s at first increment. Prevents them from
|
||||
// creeping slowly towards their maximum value
|
||||
firstIncrement = false;
|
||||
// Try zero Rid:s at first increment. Prevents them from
|
||||
// creeping slowly towards their maximum value
|
||||
firstIncrement = false;
|
||||
|
||||
// Re-set the search and start again
|
||||
iteratorChannel = Channels.First();
|
||||
continue;
|
||||
// Cannot work around by incrementing rid because channels
|
||||
// are actually copies of each other
|
||||
}
|
||||
else {
|
||||
uniquityFailed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Re-set the search and start again
|
||||
iteratorChannel = Channels.First();
|
||||
continue;
|
||||
// Cannot work around by incrementing rid because channels
|
||||
// are actually copies of each other
|
||||
}
|
||||
else {
|
||||
uniquityFailed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!uniquityFailed) {
|
||||
if (channel) {
|
||||
SetChannelData(channel);
|
||||
@@ -363,9 +372,7 @@ cIptvMenuChannelItem::cIptvMenuChannelItem(cChannel *Channel)
|
||||
|
||||
void cIptvMenuChannelItem::Set(void)
|
||||
{
|
||||
char *buffer = NULL;
|
||||
asprintf(&buffer, "%d\t%s", channel->Number(), channel->Name());
|
||||
SetText(buffer, false);
|
||||
SetText(cString::sprintf("%d\t%s", channel->Number(), channel->Name()));
|
||||
}
|
||||
|
||||
// --- cIptvMenuChannels -----------------------------------------------------
|
||||
@@ -566,7 +573,7 @@ void cIptvMenuInfo::Display(void)
|
||||
{
|
||||
cOsdMenu::Display();
|
||||
DisplayMenu()->SetText(text, true);
|
||||
if (text)
|
||||
if (*text)
|
||||
cStatus::MsgOsdTextItem(text);
|
||||
}
|
||||
|
||||
@@ -622,7 +629,6 @@ cIptvPluginSetup::cIptvPluginSetup()
|
||||
tsBufferPrefill = IptvConfig.GetTsBufferPrefillRatio();
|
||||
extProtocolBasePort = IptvConfig.GetExtProtocolBasePort();
|
||||
sectionFiltering = IptvConfig.GetSectionFiltering();
|
||||
sidScanning = IptvConfig.GetSidScanning();
|
||||
numDisabledFilters = IptvConfig.GetDisabledFiltersCount();
|
||||
if (numDisabledFilters > SECTION_FILTER_TABLE_SIZE)
|
||||
numDisabledFilters = SECTION_FILTER_TABLE_SIZE;
|
||||
@@ -639,47 +645,28 @@ void cIptvPluginSetup::Setup(void)
|
||||
int current = Current();
|
||||
|
||||
Clear();
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Clear();
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditIntItem( tr("TS buffer size [MB]"), &tsBufferSize, 1, 4));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define a ringbuffer size for transport streams in megabytes.\n\nSmaller sizes help memory consumption, but are more prone to buffer overflows."));
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditIntItem( tr("TS buffer prefill ratio [%]"), &tsBufferPrefill, 0, 40));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n\nThis is useful if streaming media over a slow or unreliable connection."));
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditIntItem( tr("EXT protocol base port"), &extProtocolBasePort, 0, 0xFFF7));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define a base port used by EXT protocol.\n\nThe 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."));
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditBoolItem(tr("Use section filtering"), §ionFiltering));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define whether the section filtering shall be used.\n\nSection 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.\nEnabling this feature does not affect streams that do not contain section data."));
|
||||
#endif
|
||||
|
||||
if (sectionFiltering) {
|
||||
Add(new cMenuEditBoolItem(tr("Scan Sid automatically"), &sidScanning));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define whether the service id shall be scanned automatically.\n\nRequires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."));
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditIntItem( tr("Disable filters"), &numDisabledFilters, 0, SECTION_FILTER_TABLE_SIZE));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define number of section filters to be disabled.\n\nCertain 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."));
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < numDisabledFilters; ++i) {
|
||||
// TRANSLATORS: note the singular!
|
||||
Add(new cMenuEditStraItem(tr("Disable filter"), &disabledFilterIndexes[i], SECTION_FILTER_TABLE_SIZE, disabledFilterNames));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define an ill-behaving filter to be blacklisted."));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -713,10 +700,8 @@ eOSState cIptvPluginSetup::ProcessKey(eKeys Key)
|
||||
switch (Key) {
|
||||
case kRed: return EditChannel();
|
||||
case kBlue: return ShowInfo();
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
case kInfo: if (Current() < help.Size())
|
||||
return AddSubMenu(new cMenuText(cString::sprintf("%s - %s '%s'", tr("Help"), trVDR("Plugin"), PLUGIN_NAME_I18N), help[Current()]));
|
||||
#endif
|
||||
default: state = osContinue;
|
||||
}
|
||||
}
|
||||
@@ -756,14 +741,12 @@ void cIptvPluginSetup::Store(void)
|
||||
SetupStore("TsBufferPrefill", tsBufferPrefill);
|
||||
SetupStore("ExtProtocolBasePort", extProtocolBasePort);
|
||||
SetupStore("SectionFiltering", sectionFiltering);
|
||||
SetupStore("SidScanning", sidScanning);
|
||||
StoreFilters("DisabledFilters", disabledFilterIndexes);
|
||||
// Update global config
|
||||
IptvConfig.SetTsBufferSize(tsBufferSize);
|
||||
IptvConfig.SetTsBufferPrefillRatio(tsBufferPrefill);
|
||||
IptvConfig.SetExtProtocolBasePort(extProtocolBasePort);
|
||||
IptvConfig.SetSectionFiltering(sectionFiltering);
|
||||
IptvConfig.SetSidScanning(sidScanning);
|
||||
for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i)
|
||||
IptvConfig.SetDisabledFilters(i, disabledFilterIndexes[i]);
|
||||
}
|
||||
|
||||
5
setup.h
5
setup.h
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.h,v 1.18 2008/01/20 16:15:14 rahrenbe Exp $
|
||||
* $Id: setup.h,v 1.21 2008/02/19 22:29:02 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_SETUP_H
|
||||
@@ -19,13 +19,10 @@ private:
|
||||
int tsBufferPrefill;
|
||||
int extProtocolBasePort;
|
||||
int sectionFiltering;
|
||||
int sidScanning;
|
||||
int numDisabledFilters;
|
||||
int disabledFilterIndexes[SECTION_FILTER_TABLE_SIZE];
|
||||
const char *disabledFilterNames[SECTION_FILTER_TABLE_SIZE];
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
cVector<const char*> help;
|
||||
#endif
|
||||
|
||||
eOSState EditChannel(void);
|
||||
eOSState ShowInfo(void);
|
||||
|
||||
16
socket.c
16
socket.c
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: socket.c,v 1.6 2007/10/26 22:07:10 rahrenbe Exp $
|
||||
* $Id: socket.c,v 1.7 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -71,7 +71,7 @@ bool cIptvSocket::OpenSocket(const int Port, const bool isUdp)
|
||||
if (isUdp) {
|
||||
int err = bind(socketDesc, (struct sockaddr *)&sockAddr, sizeof(sockAddr));
|
||||
ERROR_IF_FUNC(err < 0, "bind()", CloseSocket(), return false);
|
||||
}
|
||||
}
|
||||
// Update socket port
|
||||
socketPort = Port;
|
||||
}
|
||||
@@ -110,9 +110,9 @@ int cIptvUdpSocket::Read(unsigned char* *BufferAddr)
|
||||
//debug("cIptvUdpSocket::Read()\n");
|
||||
// Error out if socket not initialized
|
||||
if (socketDesc <= 0) {
|
||||
error("ERROR: Invalid socket in %s\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
error("ERROR: Invalid socket in %s\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
socklen_t addrlen = sizeof(sockAddr);
|
||||
// Set argument point to read buffer
|
||||
*BufferAddr = readBuffer;
|
||||
@@ -186,9 +186,9 @@ int cIptvTcpSocket::Read(unsigned char* *BufferAddr)
|
||||
//debug("cIptvTcpSocket::Read()\n");
|
||||
// Error out if socket not initialized
|
||||
if (socketDesc <= 0) {
|
||||
error("ERROR: Invalid socket in %s\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
error("ERROR: Invalid socket in %s\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
socklen_t addrlen = sizeof(sockAddr);
|
||||
// Set argument point to read buffer
|
||||
*BufferAddr = readBuffer;
|
||||
|
||||
10
streamer.c
10
streamer.c
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: streamer.c,v 1.29 2008/01/19 21:08:03 ajhseppa Exp $
|
||||
* $Id: streamer.c,v 1.33 2008/04/04 20:55:44 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <vdr/thread.h>
|
||||
@@ -59,9 +59,8 @@ bool cIptvStreamer::Open(void)
|
||||
{
|
||||
debug("cIptvStreamer::Open()\n");
|
||||
// Open the protocol
|
||||
if (protocol)
|
||||
if(!protocol->Open())
|
||||
return false;
|
||||
if (protocol && !protocol->Open())
|
||||
return false;
|
||||
// Start thread
|
||||
Start();
|
||||
return true;
|
||||
@@ -77,12 +76,11 @@ bool cIptvStreamer::Close(void)
|
||||
// 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,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: streamer.h,v 1.13 2007/10/19 22:18:55 rahrenbe Exp $
|
||||
* $Id: streamer.h,v 1.16 2008/04/04 20:55:44 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_STREAMER_H
|
||||
@@ -36,4 +36,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // __IPTV_STREAMER_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user