mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 11:37:03 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73906ab698 | ||
|
|
ec2ec19f68 | ||
|
|
1e8f117988 | ||
|
|
00cf880a5d | ||
|
|
71472a1033 | ||
|
|
0eff9de2ee | ||
|
|
9a19009451 | ||
|
|
04c194ffc7 | ||
|
|
40125dd9bb | ||
|
|
c5a7598544 | ||
|
|
4e8e26a4b3 | ||
|
|
9ec10262d4 | ||
|
|
501701e3d3 | ||
|
|
53b5644973 | ||
|
|
17b4709c30 | ||
|
|
2bff3d0f8f |
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.dependencies
|
||||||
|
*.o
|
||||||
|
*.so
|
||||||
|
*~
|
||||||
|
po/*.pot
|
||||||
|
po/*.mo
|
||||||
23
HISTORY
23
HISTORY
@@ -43,7 +43,7 @@ VDR Plugin 'iptv' Revision History
|
|||||||
|
|
||||||
- Updated for vdr-1.5.15.
|
- Updated for vdr-1.5.15.
|
||||||
- Replaced asprintf with cString.
|
- Replaced asprintf with cString.
|
||||||
- Updated French translation (Thanks to Micha<EFBFBD>l Nival).
|
- Updated French translation (Thanks to Michaël Nival).
|
||||||
- Modified VDR locale support detection.
|
- Modified VDR locale support detection.
|
||||||
- Added preliminary automatic Pid scanning functionality.
|
- Added preliminary automatic Pid scanning functionality.
|
||||||
- Modified channels.conf format to enable/disable channel
|
- Modified channels.conf format to enable/disable channel
|
||||||
@@ -63,3 +63,24 @@ VDR Plugin 'iptv' Revision History
|
|||||||
- Updated vlc2iptv script for new channels.conf format.
|
- Updated vlc2iptv script for new channels.conf format.
|
||||||
- Added pluginparam patch for vdr-1.7.0.
|
- Added pluginparam patch for vdr-1.7.0.
|
||||||
- Added new example scripts from VDR-WIKI.
|
- Added new example scripts from VDR-WIKI.
|
||||||
|
|
||||||
|
2008-10-12: Version 0.2.2
|
||||||
|
|
||||||
|
- Converted HISTORY and fi_FI.po to UTF-8.
|
||||||
|
- Updated Italian translation (Thanks to Diego Pierotto).
|
||||||
|
- Tweaked pid scanner parameters for HD broadcasts.
|
||||||
|
- Fixed opening of fifo tap.
|
||||||
|
- Updated iptvstream.sh script to support optional video resolution settings.
|
||||||
|
- Optimized streamer thread termination.
|
||||||
|
|
||||||
|
2008-12-16: Version 0.2.3
|
||||||
|
|
||||||
|
- Updated for vdr-1.7.2.
|
||||||
|
- Silenced a compilation warning.
|
||||||
|
|
||||||
|
2009-02-25: Version 0.2.4
|
||||||
|
|
||||||
|
- Updated for vdr-1.7.4.
|
||||||
|
- Fixed blacklisting of PAT section filter.
|
||||||
|
- Set max IPTV device count to VDR's max devices.
|
||||||
|
- Fixed a possible crash in sid and pid scanners.
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -1,7 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Makefile for a Video Disk Recorder plugin
|
# Makefile for IPTV plugin
|
||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.27 2008/02/19 22:29:02 rahrenbe Exp $
|
|
||||||
|
|
||||||
# Debugging on/off
|
# Debugging on/off
|
||||||
#IPTV_DEBUG = 1
|
#IPTV_DEBUG = 1
|
||||||
@@ -120,7 +119,7 @@ dist: clean
|
|||||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||||
@mkdir $(TMPDIR)/$(ARCHIVE)
|
@mkdir $(TMPDIR)/$(ARCHIVE)
|
||||||
@cp -a * $(TMPDIR)/$(ARCHIVE)
|
@cp -a * $(TMPDIR)/$(ARCHIVE)
|
||||||
@tar czf $(PACKAGE).tgz -C $(TMPDIR) --exclude CVS $(ARCHIVE)
|
@tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
|
||||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||||
@echo Distribution package created as $(PACKAGE).tgz
|
@echo Distribution package created as $(PACKAGE).tgz
|
||||||
|
|
||||||
|
|||||||
4
README
4
README
@@ -3,8 +3,8 @@ This is an IPTV plugin for the Video Disk Recorder (VDR).
|
|||||||
Written by: Rolf Ahrenberg
|
Written by: Rolf Ahrenberg
|
||||||
< R o l f . A h r e n b e r g @ s c i . f i >
|
< R o l f . A h r e n b e r g @ s c i . f i >
|
||||||
|
|
||||||
Antti Sepp<EFBFBD>l<EFBFBD>
|
Antti Seppälä
|
||||||
<a j h s e p p a @ n i k s u l a . h u t . f i >
|
< a . s e p p a l a @ g m a i l . c o m >
|
||||||
|
|
||||||
Project's homepage: http://www.saunalahti.fi/~rahrenbe/vdr/iptv/
|
Project's homepage: http://www.saunalahti.fi/~rahrenbe/vdr/iptv/
|
||||||
|
|
||||||
|
|||||||
1
common.c
1
common.c
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: common.c,v 1.10 2008/01/30 21:57:33 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vdr/tools.h>
|
#include <vdr/tools.h>
|
||||||
|
|||||||
1
common.h
1
common.h
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: common.h,v 1.20 2008/02/17 19:18:47 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_COMMON_H
|
#ifndef __IPTV_COMMON_H
|
||||||
|
|||||||
5
config.c
5
config.c
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.c,v 1.21 2008/02/01 21:54:24 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -18,7 +17,7 @@ cIptvConfig::cIptvConfig(void)
|
|||||||
useBytes(1),
|
useBytes(1),
|
||||||
sectionFiltering(1)
|
sectionFiltering(1)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i)
|
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters); ++i)
|
||||||
disabledFilters[i] = -1;
|
disabledFilters[i] = -1;
|
||||||
memset(configDirectory, '\0', sizeof(configDirectory));
|
memset(configDirectory, '\0', sizeof(configDirectory));
|
||||||
}
|
}
|
||||||
@@ -26,7 +25,7 @@ cIptvConfig::cIptvConfig(void)
|
|||||||
unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
|
unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
|
||||||
{
|
{
|
||||||
unsigned int n = 0;
|
unsigned int n = 0;
|
||||||
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1))
|
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters)))
|
||||||
n++;
|
n++;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|||||||
1
config.h
1
config.h
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.h,v 1.20 2008/02/01 21:54:24 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_CONFIG_H
|
#ifndef __IPTV_CONFIG_H
|
||||||
|
|||||||
14
device.c
14
device.c
@@ -3,13 +3,12 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.c,v 1.87 2008/04/02 22:55:04 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
|
||||||
#define IPTV_MAX_DEVICES 8
|
#define IPTV_MAX_DEVICES MAXDEVICES
|
||||||
|
|
||||||
cIptvDevice * IptvDevices[IPTV_MAX_DEVICES] = { NULL };
|
cIptvDevice * IptvDevices[IPTV_MAX_DEVICES] = { NULL };
|
||||||
|
|
||||||
@@ -24,7 +23,8 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
|||||||
pidScanEnabled(false),
|
pidScanEnabled(false),
|
||||||
mutex()
|
mutex()
|
||||||
{
|
{
|
||||||
debug("cIptvDevice::cIptvDevice(%d)\n", deviceIndex);
|
//debug("cIptvDevice::cIptvDevice(%d)\n", deviceIndex);
|
||||||
|
isyslog("creating IPTV device %d (CardIndex=%d)", deviceIndex, CardIndex());
|
||||||
tsBuffer = new cRingBufferLinear(MEGABYTE(IptvConfig.GetTsBufferSize()),
|
tsBuffer = new cRingBufferLinear(MEGABYTE(IptvConfig.GetTsBufferSize()),
|
||||||
(TS_SIZE * IptvConfig.GetReadBufferTsCount()),
|
(TS_SIZE * IptvConfig.GetReadBufferTsCount()),
|
||||||
false, "IPTV");
|
false, "IPTV");
|
||||||
@@ -49,7 +49,7 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
|||||||
cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndex);
|
cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndex);
|
||||||
stat(filename, &sb);
|
stat(filename, &sb);
|
||||||
if (S_ISFIFO(sb.st_mode)) {
|
if (S_ISFIFO(sb.st_mode)) {
|
||||||
dvrFd = open(filename, O_WRONLY | O_NONBLOCK);
|
dvrFd = open(filename, O_RDWR | O_NONBLOCK);
|
||||||
if (dvrFd >= 0)
|
if (dvrFd >= 0)
|
||||||
dsyslog("IPTV device %d redirecting input stream to '%s'", deviceIndex, *filename);
|
dsyslog("IPTV device %d redirecting input stream to '%s'", deviceIndex, *filename);
|
||||||
}
|
}
|
||||||
@@ -429,11 +429,11 @@ bool cIptvDevice::GetTSPacket(uchar *&Data)
|
|||||||
}
|
}
|
||||||
isPacketDelivered = true;
|
isPacketDelivered = true;
|
||||||
Data = p;
|
Data = p;
|
||||||
// Update pid statistics
|
// Update pid statistics
|
||||||
AddPidStatistic(ts_pid(p), payload(p));
|
AddPidStatistic(ts_pid(p), payload(p));
|
||||||
// Send data also to dvr fifo
|
// Send data also to dvr fifo
|
||||||
if (dvrFd >= 0)
|
if ((dvrFd >= 0) && (write(dvrFd, p, TS_SIZE) != TS_SIZE))
|
||||||
write(dvrFd, p, TS_SIZE);
|
error("ERROR: write failed to FIFO\n");
|
||||||
// Analyze incomplete streams with built-in pid analyzer
|
// Analyze incomplete streams with built-in pid analyzer
|
||||||
if (pidScanEnabled && pPidScanner)
|
if (pidScanEnabled && pPidScanner)
|
||||||
pPidScanner->Process(p);
|
pPidScanner->Process(p);
|
||||||
|
|||||||
1
device.h
1
device.h
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.h,v 1.39 2008/02/17 19:18:47 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_DEVICE_H
|
#ifndef __IPTV_DEVICE_H
|
||||||
|
|||||||
3
iptv.c
3
iptv.c
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: iptv.c,v 1.39 2008/03/30 20:25:12 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@@ -21,7 +20,7 @@
|
|||||||
#error "VDR-1.6.0 API version or greater is required!"
|
#error "VDR-1.6.0 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char VERSION[] = "0.2.1";
|
static const char VERSION[] = "0.2.4";
|
||||||
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
||||||
|
|
||||||
class cPluginIptv : public cPlugin {
|
class cPluginIptv : public cPlugin {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# iptvstream.sh can be used by the VDR iptv plugin to transcode external
|
# iptvstream.sh can be used by the VDR iptv plugin to transcode external
|
||||||
# sources
|
# sources
|
||||||
#
|
#
|
||||||
# (C) 2007 Rolf Ahrenberg, Antti Sepp<EFBFBD>l<EFBFBD>
|
# (C) 2007 Rolf Ahrenberg, Antti Seppälä
|
||||||
#
|
#
|
||||||
# iptvstream.sh is free software; you can redistribute it and/or modify
|
# iptvstream.sh is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -31,8 +31,10 @@ PARAMETER=${1}
|
|||||||
# Iptv plugin listens this port
|
# Iptv plugin listens this port
|
||||||
PORT=${2}
|
PORT=${2}
|
||||||
|
|
||||||
# Default bitrates for stream transcoding
|
# Default settings for stream transcoding
|
||||||
|
VCODEC=mp2v
|
||||||
VBITRATE=2400
|
VBITRATE=2400
|
||||||
|
ACODEC=mpga
|
||||||
ABITRATE=320
|
ABITRATE=320
|
||||||
|
|
||||||
# There is a way to specify multiple URLs in the same script. The selection is
|
# There is a way to specify multiple URLs in the same script. The selection is
|
||||||
@@ -40,6 +42,8 @@ ABITRATE=320
|
|||||||
case ${PARAMETER} in
|
case ${PARAMETER} in
|
||||||
1)
|
1)
|
||||||
URL=""
|
URL=""
|
||||||
|
WIDTH=720
|
||||||
|
HEIGHT=576
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
URL=""
|
URL=""
|
||||||
@@ -57,13 +61,19 @@ if [ -z "${URL}" ]; then
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create transcoding options
|
||||||
|
TRANSCODE_OPTS="vcodec=${VCODEC},acodec=${ACODEC},vb=${VBITRATE},ab=${ABITRATE}"
|
||||||
|
if [ -n "${WIDTH}" -a -n "${HEIGHT}" ] ; then
|
||||||
|
TRANSCODE_OPTS="${TRANSCODE_OPTS},width=${WIDTH},height=${HEIGHT}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create unique pids for the stream
|
# Create unique pids for the stream
|
||||||
let VPID=${PARAMETER}+1
|
let VPID=${PARAMETER}+1
|
||||||
let APID=${PARAMETER}+2
|
let APID=${PARAMETER}+2
|
||||||
let SPID=${PARAMETER}+3
|
let SPID=${PARAMETER}+3
|
||||||
|
|
||||||
# Capture VLC pid for further management in IPTV plugin
|
# Capture VLC pid for further management in IPTV plugin
|
||||||
vlc "${URL}" --sout "#transcode{vcodec=mp2v,acodec=mpga,vb=${VBITRATE},ab=${ABITRATE}}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy &
|
vlc "${URL}" --sout "#transcode{${TRANSCODE_OPTS}}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy &
|
||||||
|
|
||||||
PID=${!}
|
PID=${!}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# vlc2iptv is used by the VDR iptv plugin to transcode external sources
|
# vlc2iptv is used by the VDR iptv plugin to transcode external sources
|
||||||
#
|
#
|
||||||
# (C) 2007 Rolf Ahrenberg, Antti Sepp<EFBFBD>l<EFBFBD>
|
# (C) 2007 Rolf Ahrenberg, Antti Seppälä
|
||||||
# (C) 2007 Tobias Grimm
|
# (C) 2007 Tobias Grimm
|
||||||
#
|
#
|
||||||
# vlc2iptv is free software; you can redistribute it and/or modify
|
# vlc2iptv is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
diff -Nru vdr-1.7.4-vanilla/channels.c vdr-1.7.4-pluginparam/channels.c
|
||||||
--- vdr-1.7.0-vanilla/channels.c 2008-04-12 16:49:12.000000000 +0300
|
--- vdr-1.7.4-vanilla/channels.c 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/channels.c 2008-04-13 18:58:41.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/channels.c 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -216,6 +216,7 @@
|
@@ -188,6 +188,7 @@
|
||||||
shortName = strdup("");
|
shortName = strdup("");
|
||||||
provider = strdup("");
|
provider = strdup("");
|
||||||
portalName = strdup("");
|
portalName = strdup("");
|
||||||
+ pluginParam = strdup("");
|
+ pluginParam = strdup("");
|
||||||
memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__);
|
memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__);
|
||||||
inversion = DVBFE_INVERSION_AUTO;
|
inversion = INVERSION_AUTO;
|
||||||
bandwidth = DVBFE_BANDWIDTH_AUTO;
|
bandwidth = 8000000;
|
||||||
@@ -241,6 +242,7 @@
|
@@ -211,6 +212,7 @@
|
||||||
shortName = NULL;
|
shortName = NULL;
|
||||||
provider = NULL;
|
provider = NULL;
|
||||||
portalName = NULL;
|
portalName = NULL;
|
||||||
@@ -17,7 +17,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
schedule = NULL;
|
schedule = NULL;
|
||||||
linkChannels = NULL;
|
linkChannels = NULL;
|
||||||
refChannel = NULL;
|
refChannel = NULL;
|
||||||
@@ -269,6 +271,7 @@
|
@@ -239,6 +241,7 @@
|
||||||
free(shortName);
|
free(shortName);
|
||||||
free(provider);
|
free(provider);
|
||||||
free(portalName);
|
free(portalName);
|
||||||
@@ -25,7 +25,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
cChannel& cChannel::operator= (const cChannel &Channel)
|
cChannel& cChannel::operator= (const cChannel &Channel)
|
||||||
@@ -277,6 +280,7 @@
|
@@ -247,6 +250,7 @@
|
||||||
shortName = strcpyrealloc(shortName, Channel.shortName);
|
shortName = strcpyrealloc(shortName, Channel.shortName);
|
||||||
provider = strcpyrealloc(provider, Channel.provider);
|
provider = strcpyrealloc(provider, Channel.provider);
|
||||||
portalName = strcpyrealloc(portalName, Channel.portalName);
|
portalName = strcpyrealloc(portalName, Channel.portalName);
|
||||||
@@ -33,9 +33,9 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
memcpy(&__BeginData__, &Channel.__BeginData__, (char *)&Channel.__EndData__ - (char *)&Channel.__BeginData__);
|
memcpy(&__BeginData__, &Channel.__BeginData__, (char *)&Channel.__EndData__ - (char *)&Channel.__BeginData__);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -338,9 +342,26 @@
|
@@ -306,9 +310,26 @@
|
||||||
alpha = Channel->alpha;
|
guard = Channel->guard;
|
||||||
priority = Channel->priority;
|
hierarchy = Channel->hierarchy;
|
||||||
rollOff = Channel->rollOff;
|
rollOff = Channel->rollOff;
|
||||||
+ if (IsPlug()) pluginParam = strcpyrealloc(pluginParam, Channel->pluginParam);
|
+ if (IsPlug()) pluginParam = strcpyrealloc(pluginParam, Channel->pluginParam);
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff)
|
bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff)
|
||||||
{
|
{
|
||||||
// Workarounds for broadcaster stupidity:
|
// Workarounds for broadcaster stupidity:
|
||||||
@@ -472,6 +493,18 @@
|
@@ -438,6 +459,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
#define STRDIFF 0x01
|
#define STRDIFF 0x01
|
||||||
#define VALDIFF 0x02
|
#define VALDIFF 0x02
|
||||||
|
|
||||||
@@ -665,7 +698,7 @@
|
@@ -632,7 +665,7 @@
|
||||||
if (isdigit(type))
|
if (isdigit(type))
|
||||||
type = 'S';
|
type = 'S';
|
||||||
#define ST(s) if (strchr(s, type))
|
#define ST(s) if (strchr(s, type))
|
||||||
@@ -88,7 +88,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
char *q = buffer;
|
char *q = buffer;
|
||||||
*q = 0;
|
*q = 0;
|
||||||
ST(" S ") q += sprintf(q, "%c", polarization);
|
ST(" S ") q += sprintf(q, "%c", polarization);
|
||||||
@@ -681,6 +714,7 @@
|
@@ -646,6 +679,7 @@
|
||||||
ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues));
|
ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues));
|
||||||
ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
||||||
ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues));
|
ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues));
|
||||||
@@ -96,25 +96,25 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,7 +736,7 @@
|
@@ -674,7 +708,7 @@
|
||||||
|
|
||||||
bool cChannel::StringToParameters(const char *s)
|
bool cChannel::StringToParameters(const char *s)
|
||||||
{
|
{
|
||||||
- while (s && *s) {
|
- while (s && *s) {
|
||||||
+ while (s && *s && !IsPlug()) {
|
+ while (s && *s && !IsPlug()) {
|
||||||
switch (toupper(*s)) {
|
switch (toupper(*s)) {
|
||||||
case 'A': s = ParseParameter(s, alpha, AlphaValues); break;
|
case 'A': s = SkipDigits(s); break; // for compatibility with the "multiproto" approach - may be removed in future versions
|
||||||
case 'B': s = ParseParameter(s, bandwidth, BandwidthValues); break;
|
case 'B': s = ParseParameter(s, bandwidth, BandwidthValues); break;
|
||||||
@@ -817,7 +851,7 @@
|
@@ -792,7 +826,7 @@
|
||||||
dpids[0] = 0;
|
dpids[0] = 0;
|
||||||
ok = false;
|
ok = false;
|
||||||
if (parambuf && sourcebuf && vpidbuf && apidbuf) {
|
if (parambuf && sourcebuf && vpidbuf && apidbuf) {
|
||||||
- ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0;
|
- ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0;
|
||||||
+ ok = ((source = cSource::FromString(sourcebuf)) >= 0) && StringToParameters(parambuf);
|
+ ok = ((source = cSource::FromString(sourcebuf)) >= 0) && StringToParameters(parambuf);
|
||||||
|
|
||||||
char *p = strchr(vpidbuf, '+');
|
char *p;
|
||||||
if (p)
|
if ((p = strchr(vpidbuf, '=')) != NULL) {
|
||||||
@@ -908,6 +942,7 @@
|
@@ -887,6 +921,7 @@
|
||||||
shortName = strcpyrealloc(shortName, p);
|
shortName = strcpyrealloc(shortName, p);
|
||||||
}
|
}
|
||||||
name = strcpyrealloc(name, namebuf);
|
name = strcpyrealloc(name, namebuf);
|
||||||
@@ -122,10 +122,10 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c
|
|||||||
|
|
||||||
free(parambuf);
|
free(parambuf);
|
||||||
free(sourcebuf);
|
free(sourcebuf);
|
||||||
diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h
|
diff -Nru vdr-1.7.4-vanilla/channels.h vdr-1.7.4-pluginparam/channels.h
|
||||||
--- vdr-1.7.0-vanilla/channels.h 2008-04-12 16:46:50.000000000 +0300
|
--- vdr-1.7.4-vanilla/channels.h 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/channels.h 2008-04-13 18:57:08.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/channels.h 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -118,6 +118,7 @@
|
@@ -116,6 +116,7 @@
|
||||||
char *shortName;
|
char *shortName;
|
||||||
char *provider;
|
char *provider;
|
||||||
char *portalName;
|
char *portalName;
|
||||||
@@ -133,7 +133,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h
|
|||||||
int __BeginData__;
|
int __BeginData__;
|
||||||
int frequency; // MHz
|
int frequency; // MHz
|
||||||
int source;
|
int source;
|
||||||
@@ -174,6 +175,7 @@
|
@@ -171,6 +172,7 @@
|
||||||
int Frequency(void) const { return frequency; } ///< Returns the actual frequency, as given in 'channels.conf'
|
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
|
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
|
static int Transponder(int Frequency, char Polarization); ///< builds the transponder from the given Frequency and Polarization
|
||||||
@@ -141,7 +141,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h
|
|||||||
int Source(void) const { return source; }
|
int Source(void) const { return source; }
|
||||||
int Srate(void) const { return srate; }
|
int Srate(void) const { return srate; }
|
||||||
int Vpid(void) const { return vpid; }
|
int Vpid(void) const { return vpid; }
|
||||||
@@ -212,6 +214,7 @@
|
@@ -208,6 +210,7 @@
|
||||||
int RollOff(void) const { return rollOff; }
|
int RollOff(void) const { return rollOff; }
|
||||||
const cLinkChannels* LinkChannels(void) const { return linkChannels; }
|
const cLinkChannels* LinkChannels(void) const { return linkChannels; }
|
||||||
const cChannel *RefChannel(void) const { return refChannel; }
|
const cChannel *RefChannel(void) const { return refChannel; }
|
||||||
@@ -149,37 +149,37 @@ diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h
|
|||||||
bool IsCable(void) const { return cSource::IsCable(source); }
|
bool IsCable(void) const { return cSource::IsCable(source); }
|
||||||
bool IsSat(void) const { return cSource::IsSat(source); }
|
bool IsSat(void) const { return cSource::IsSat(source); }
|
||||||
bool IsTerr(void) const { return cSource::IsTerr(source); }
|
bool IsTerr(void) const { return cSource::IsTerr(source); }
|
||||||
@@ -219,12 +222,14 @@
|
@@ -215,12 +218,14 @@
|
||||||
bool HasTimer(void) const;
|
bool HasTimer(void) const;
|
||||||
int Modification(int Mask = CHANNELMOD_ALL);
|
int Modification(int Mask = CHANNELMOD_ALL);
|
||||||
void CopyTransponderData(const cChannel *Channel);
|
void CopyTransponderData(const cChannel *Channel);
|
||||||
+ bool SetPlugTransponderData(int Source, int Frequency, const char *PluginParam);
|
+ bool SetPlugTransponderData(int Source, int Frequency, const char *PluginParam);
|
||||||
bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff);
|
bool 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 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, int Alpha, int Priority);
|
bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission);
|
||||||
void SetId(int Nid, int Tid, int Sid, int Rid = 0);
|
void SetId(int Nid, int Tid, int Sid, int Rid = 0);
|
||||||
void SetName(const char *Name, const char *ShortName, const char *Provider);
|
void SetName(const char *Name, const char *ShortName, const char *Provider);
|
||||||
void SetPortalName(const char *PortalName);
|
void SetPortalName(const char *PortalName);
|
||||||
+ void SetPluginParam(const char *PluginParam);
|
+ void SetPluginParam(const char *PluginParam);
|
||||||
void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid);
|
void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid);
|
||||||
void SetCaIds(const int *CaIds); // list must be zero-terminated
|
void SetCaIds(const int *CaIds); // list must be zero-terminated
|
||||||
void SetCaDescriptors(int Level);
|
void SetCaDescriptors(int Level);
|
||||||
diff -Nru vdr-1.7.0-vanilla/config.h vdr-1.7.0-pluginparam/config.h
|
diff -Nru vdr-1.7.4-vanilla/config.h vdr-1.7.4-pluginparam/config.h
|
||||||
--- vdr-1.7.0-vanilla/config.h 2008-04-12 16:02:10.000000000 +0300
|
--- vdr-1.7.4-vanilla/config.h 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/config.h 2008-04-13 18:54:25.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/config.h 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -30,6 +30,8 @@
|
@@ -30,6 +30,8 @@
|
||||||
#define APIVERSION "1.7.0"
|
#define APIVERSION "1.7.4"
|
||||||
#define APIVERSNUM 10700 // Version * 10000 + Major * 100 + Minor
|
#define APIVERSNUM 10704 // Version * 10000 + Major * 100 + Minor
|
||||||
|
|
||||||
+#define PLUGINPARAMPATCHVERSNUM 1
|
+#define PLUGINPARAMPATCHVERSNUM 1
|
||||||
+
|
+
|
||||||
// When loading plugins, VDR searches them by their APIVERSION, which
|
// When loading plugins, VDR searches them by their APIVERSION, which
|
||||||
// may be smaller than VDRVERSION in case there have been no changes to
|
// may be smaller than VDRVERSION in case there have been no changes to
|
||||||
// VDR header files since the last APIVERSION. This allows compiled
|
// VDR header files since the last APIVERSION. This allows compiled
|
||||||
diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c
|
diff -Nru vdr-1.7.4-vanilla/menu.c vdr-1.7.4-pluginparam/menu.c
|
||||||
--- vdr-1.7.0-vanilla/menu.c 2008-04-12 14:37:17.000000000 +0300
|
--- vdr-1.7.4-vanilla/menu.c 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/menu.c 2008-04-13 18:56:07.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/menu.c 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -189,6 +189,7 @@
|
@@ -190,6 +190,7 @@
|
||||||
cChannel *channel;
|
cChannel *channel;
|
||||||
cChannel data;
|
cChannel data;
|
||||||
char name[256];
|
char name[256];
|
||||||
@@ -187,7 +187,7 @@ diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c
|
|||||||
void Setup(void);
|
void Setup(void);
|
||||||
public:
|
public:
|
||||||
cMenuEditChannel(cChannel *Channel, bool New = false);
|
cMenuEditChannel(cChannel *Channel, bool New = false);
|
||||||
@@ -221,6 +222,7 @@
|
@@ -222,6 +223,7 @@
|
||||||
|
|
||||||
// Parameters for all types of sources:
|
// Parameters for all types of sources:
|
||||||
strn0cpy(name, data.name, sizeof(name));
|
strn0cpy(name, data.name, sizeof(name));
|
||||||
@@ -195,15 +195,15 @@ diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c
|
|||||||
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name)));
|
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name)));
|
||||||
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
|
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
|
||||||
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
|
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
|
||||||
@@ -255,6 +257,7 @@
|
@@ -254,6 +256,7 @@
|
||||||
ST(" T") Add(new cMenuEditMapItem( tr("Alpha"), &data.alpha, AlphaValues));
|
ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues));
|
||||||
ST(" T") Add(new cMenuEditMapItem( tr("Priority"), &data.priority, PriorityValues));
|
ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues));
|
||||||
ST(" S ") Add(new cMenuEditMapItem( tr("Rolloff"), &data.rollOff, RollOffValues));
|
ST(" S ") Add(new cMenuEditMapItem( tr("Rolloff"), &data.rollOff, RollOffValues));
|
||||||
+ ST("P ") Add(new cMenuEditStrItem( tr("Parameters"), pluginParam, sizeof(pluginParam), tr(FileNameChars)));
|
+ ST("P ") Add(new cMenuEditStrItem( tr("Parameters"), pluginParam, sizeof(pluginParam), tr(FileNameChars)));
|
||||||
|
|
||||||
SetCurrent(Get(current));
|
SetCurrent(Get(current));
|
||||||
Display();
|
Display();
|
||||||
@@ -269,6 +272,7 @@
|
@@ -268,6 +271,7 @@
|
||||||
if (Key == kOk) {
|
if (Key == kOk) {
|
||||||
if (Channels.HasUniqueChannelID(&data, channel)) {
|
if (Channels.HasUniqueChannelID(&data, channel)) {
|
||||||
data.name = strcpyrealloc(data.name, name);
|
data.name = strcpyrealloc(data.name, name);
|
||||||
@@ -211,29 +211,29 @@ diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c
|
|||||||
if (channel) {
|
if (channel) {
|
||||||
*channel = data;
|
*channel = data;
|
||||||
isyslog("edited channel %d %s", channel->Number(), *data.ToText());
|
isyslog("edited channel %d %s", channel->Number(), *data.ToText());
|
||||||
diff -Nru vdr-1.7.0-vanilla/po/fi_FI.po vdr-1.7.0-pluginparam/po/fi_FI.po
|
diff -Nru vdr-1.7.4-vanilla/po/fi_FI.po vdr-1.7.4-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.4-vanilla/po/fi_FI.po 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/po/fi_FI.po 2008-04-13 18:54:25.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/po/fi_FI.po 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -1019,3 +1019,6 @@
|
@@ -1010,3 +1010,6 @@
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "VDR will shut down in %s minutes"
|
msgid "VDR will shut down in %s minutes"
|
||||||
msgstr "VDR sammuu %s minuutin kuluttua"
|
msgstr "VDR sammuu %s minuutin kuluttua"
|
||||||
+
|
+
|
||||||
+msgid "Parameters"
|
+msgid "Parameters"
|
||||||
+msgstr "Parametrit"
|
+msgstr "Parametrit"
|
||||||
diff -Nru vdr-1.7.0-vanilla/po/fr_FR.po vdr-1.7.0-pluginparam/po/fr_FR.po
|
diff -Nru vdr-1.7.4-vanilla/po/fr_FR.po vdr-1.7.4-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.4-vanilla/po/fr_FR.po 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/po/fr_FR.po 2008-04-13 18:54:25.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/po/fr_FR.po 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -1022,3 +1022,6 @@
|
@@ -1013,3 +1013,6 @@
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "VDR will shut down in %s minutes"
|
msgid "VDR will shut down in %s minutes"
|
||||||
msgstr "VDR s'arrêtera dans %s minutes"
|
msgstr "VDR s'arrêtera dans %s minutes"
|
||||||
+
|
+
|
||||||
+msgid "Parameters"
|
+msgid "Parameters"
|
||||||
+msgstr "Paramètres"
|
+msgstr "Paramètres"
|
||||||
diff -Nru vdr-1.7.0-vanilla/sources.c vdr-1.7.0-pluginparam/sources.c
|
diff -Nru vdr-1.7.4-vanilla/sources.c vdr-1.7.4-pluginparam/sources.c
|
||||||
--- vdr-1.7.0-vanilla/sources.c 2008-02-10 16:07:26.000000000 +0200
|
--- vdr-1.7.4-vanilla/sources.c 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/sources.c 2008-04-13 18:54:25.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/sources.c 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -37,6 +37,7 @@
|
@@ -37,6 +37,7 @@
|
||||||
char buffer[16];
|
char buffer[16];
|
||||||
char *q = buffer;
|
char *q = buffer;
|
||||||
@@ -250,10 +250,10 @@ diff -Nru vdr-1.7.0-vanilla/sources.c vdr-1.7.0-pluginparam/sources.c
|
|||||||
case 'C': type = stCable; break;
|
case 'C': type = stCable; break;
|
||||||
case 'S': type = stSat; break;
|
case 'S': type = stSat; break;
|
||||||
case 'T': type = stTerr; break;
|
case 'T': type = stTerr; break;
|
||||||
diff -Nru vdr-1.7.0-vanilla/sources.conf vdr-1.7.0-pluginparam/sources.conf
|
diff -Nru vdr-1.7.4-vanilla/sources.conf vdr-1.7.4-pluginparam/sources.conf
|
||||||
--- vdr-1.7.0-vanilla/sources.conf 2007-02-17 18:15:13.000000000 +0200
|
--- vdr-1.7.4-vanilla/sources.conf 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/sources.conf 2008-04-13 18:54:25.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/sources.conf 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -188,3 +188,7 @@
|
@@ -194,3 +194,7 @@
|
||||||
# Terrestrial
|
# Terrestrial
|
||||||
|
|
||||||
T Terrestrial
|
T Terrestrial
|
||||||
@@ -261,9 +261,9 @@ diff -Nru vdr-1.7.0-vanilla/sources.conf vdr-1.7.0-pluginparam/sources.conf
|
|||||||
+# Plugin
|
+# Plugin
|
||||||
+
|
+
|
||||||
+P Plugin
|
+P Plugin
|
||||||
diff -Nru vdr-1.7.0-vanilla/sources.h vdr-1.7.0-pluginparam/sources.h
|
diff -Nru vdr-1.7.4-vanilla/sources.h vdr-1.7.4-pluginparam/sources.h
|
||||||
--- vdr-1.7.0-vanilla/sources.h 2005-05-14 12:30:41.000000000 +0300
|
--- vdr-1.7.4-vanilla/sources.h 2009-01-26 11:44:48.000000000 +0200
|
||||||
+++ vdr-1.7.0-pluginparam/sources.h 2008-04-13 18:54:25.000000000 +0300
|
+++ vdr-1.7.4-pluginparam/sources.h 2009-02-24 13:31:33.000000000 +0200
|
||||||
@@ -16,10 +16,11 @@
|
@@ -16,10 +16,11 @@
|
||||||
public:
|
public:
|
||||||
enum eSourceType {
|
enum eSourceType {
|
||||||
65
pidscanner.c
65
pidscanner.c
@@ -3,16 +3,15 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* 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 "common.h"
|
||||||
#include "pidscanner.h"
|
#include "pidscanner.h"
|
||||||
|
|
||||||
#define PIDSCANNER_TIMEOUT_IN_MS 15000 /* 15s timeout for detection */
|
#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_APID_COUNT 5 /* minimum count of audio pid samples for pid detection */
|
||||||
#define PIDSCANNER_VPID_COUNT 10 /* minimum count of video pid samples for pid detection */
|
#define PIDSCANNER_VPID_COUNT 5 /* minimum count of video pid samples for pid detection */
|
||||||
#define PIDSCANNER_PID_DELTA_COUNT 50 /* minimum count of pid samples for audio/video only pid detection */
|
#define PIDSCANNER_PID_DELTA_COUNT 100 /* minimum count of pid samples for audio/video only pid detection */
|
||||||
|
|
||||||
cPidScanner::cPidScanner(void)
|
cPidScanner::cPidScanner(void)
|
||||||
: timeout(0),
|
: timeout(0),
|
||||||
@@ -121,32 +120,38 @@ void cPidScanner::Process(const uint8_t* buf)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
||||||
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
|
if (IptvChannel) {
|
||||||
int Dpids[MAXDPIDS + 1] = { 0 };
|
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
|
||||||
int Spids[MAXSPIDS + 1] = { 0 };
|
int Dpids[MAXDPIDS + 1] = { 0 };
|
||||||
char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" };
|
int Spids[MAXSPIDS + 1] = { 0 };
|
||||||
char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" };
|
||||||
char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
||||||
int Ppid = IptvChannel->Ppid();
|
char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||||
int Tpid = IptvChannel->Tpid();
|
int Ppid = IptvChannel->Ppid();
|
||||||
bool foundApid = false;
|
int Tpid = IptvChannel->Tpid();
|
||||||
if (numVpids < PIDSCANNER_VPID_COUNT)
|
bool foundApid = false;
|
||||||
Vpid = 0; // No detected video pid
|
if (numVpids < PIDSCANNER_VPID_COUNT)
|
||||||
else if (numApids < PIDSCANNER_APID_COUNT)
|
Vpid = 0; // No detected video pid
|
||||||
Apid = 0; // No detected audio pid
|
else if (numApids < PIDSCANNER_APID_COUNT)
|
||||||
for (unsigned int i = 1; i < MAXAPIDS; ++i) {
|
Apid = 0; // No detected audio pid
|
||||||
Apids[i] = IptvChannel->Apid(i);
|
for (unsigned int i = 1; i < MAXAPIDS; ++i) {
|
||||||
if (Apids[i] && (Apids[i] == Apid))
|
Apids[i] = IptvChannel->Apid(i);
|
||||||
foundApid = true;
|
if (Apids[i] && (Apids[i] == Apid))
|
||||||
}
|
foundApid = true;
|
||||||
if (!foundApid)
|
}
|
||||||
Apids[0] = Apid;
|
if (!foundApid)
|
||||||
for (unsigned int i = 0; i < MAXDPIDS; ++i)
|
Apids[0] = Apid;
|
||||||
Dpids[i] = IptvChannel->Dpid(i);
|
for (unsigned int i = 0; i < MAXDPIDS; ++i)
|
||||||
for (unsigned int i = 0; i < MAXSPIDS; ++i)
|
Dpids[i] = IptvChannel->Dpid(i);
|
||||||
Spids[i] = IptvChannel->Spid(i);
|
for (unsigned int i = 0; i < MAXSPIDS; ++i)
|
||||||
debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid);
|
Spids[i] = IptvChannel->Spid(i);
|
||||||
IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
|
debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid);
|
||||||
|
#if defined(APIVERSNUM) && APIVERSNUM >= 10700
|
||||||
|
IptvChannel->SetPids(Vpid, Ppid, 0, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
|
||||||
|
#else
|
||||||
|
IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
Channels.Unlock();
|
Channels.Unlock();
|
||||||
process = false;
|
process = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* 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
|
#ifndef __PIDSCANNER_H
|
||||||
|
|||||||
38
po/fi_FI.po
38
po/fi_FI.po
@@ -12,7 +12,7 @@ msgstr ""
|
|||||||
"Last-Translator: Rolf Ahrenberg\n"
|
"Last-Translator: Rolf Ahrenberg\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=ISO-8859-15\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
msgid "PAT (0x00)"
|
msgid "PAT (0x00)"
|
||||||
@@ -79,13 +79,13 @@ msgid "Nid"
|
|||||||
msgstr "Verkko-ID"
|
msgstr "Verkko-ID"
|
||||||
|
|
||||||
msgid "Tid"
|
msgid "Tid"
|
||||||
msgstr "L<EFBFBD>hete-ID"
|
msgstr "Lähete-ID"
|
||||||
|
|
||||||
msgid "Rid"
|
msgid "Rid"
|
||||||
msgstr "Radio-ID"
|
msgstr "Radio-ID"
|
||||||
|
|
||||||
msgid "Cannot find unique channel settings!"
|
msgid "Cannot find unique channel settings!"
|
||||||
msgstr "Yksil<EFBFBD>llisi<EFBFBD> kanava-asetuksia ei l<EFBFBD>ydet<EFBFBD>!"
|
msgstr "Yksilöllisiä kanava-asetuksia ei löydetä!"
|
||||||
|
|
||||||
msgid "IPTV Channels"
|
msgid "IPTV Channels"
|
||||||
msgstr "IPTV-kanavat"
|
msgstr "IPTV-kanavat"
|
||||||
@@ -116,21 +116,21 @@ msgid ""
|
|||||||
"\n"
|
"\n"
|
||||||
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
|
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"M<EFBFBD><EFBFBD>rit<EFBFBD> rengaspuskurin koko TS-l<EFBFBD>hetteelle megatavuina.\n"
|
"Määritä rengaspuskurin koko TS-lähetteelle megatavuina.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Pienempi rengaspuskuri v<EFBFBD>hent<EFBFBD><EFBFBD> muistinkulutusta, mutta on virhealttiimpi puskurin ylivuodolle."
|
"Pienempi rengaspuskuri vähentää muistinkulutusta, mutta on virhealttiimpi puskurin ylivuodolle."
|
||||||
|
|
||||||
msgid "TS buffer prefill ratio [%]"
|
msgid "TS buffer prefill ratio [%]"
|
||||||
msgstr "TS-puskurin esit<EFBFBD>ytt<EFBFBD>aste [%]"
|
msgstr "TS-puskurin esitäyttöaste [%]"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
|
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"This is useful if streaming media over a slow or unreliable connection."
|
"This is useful if streaming media over a slow or unreliable connection."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"M<EFBFBD><EFBFBD>rittele TS-rengaspuskurin esit<EFBFBD>ytt<EFBFBD>aste, jonka j<EFBFBD>lkeen l<EFBFBD>hetett<EFBFBD> aletaan siirt<EFBFBD>m<EFBFBD><EFBFBD>n eteenp<EFBFBD>in VDR:lle.\n"
|
"Määrittele TS-rengaspuskurin esitäyttöaste, jonka jälkeen lähetettä aletaan siirtämään eteenpäin VDR:lle.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Puskurin esit<EFBFBD>ytt<EFBFBD> parantaa suoratoistoa hitailla ja ep<EFBFBD>luotettavilla yhteyksill<EFBFBD>."
|
"Puskurin esitäyttö parantaa suoratoistoa hitailla ja epäluotettavilla yhteyksillä."
|
||||||
|
|
||||||
msgid "EXT protocol base port"
|
msgid "EXT protocol base port"
|
||||||
msgstr "EXT-protokollan perusportti"
|
msgstr "EXT-protokollan perusportti"
|
||||||
@@ -140,12 +140,12 @@ msgid ""
|
|||||||
"\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."
|
"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 ""
|
msgstr ""
|
||||||
"M<EFBFBD><EFBFBD>rittele EXT-protokollan k<EFBFBD>ytt<EFBFBD>m<EFBFBD> perusportti.\n"
|
"Määrittele EXT-protokollan käyttämä perusportti.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Porttiavaruuden koko m<EFBFBD><EFBFBD>r<EFBFBD>ytyy k<EFBFBD>ytettyjen IPTV-laitteiden mukaan. Laajennos lukee EXT-protokollan yhteydess<EFBFBD> perusportista dataa, jota ulkoiset ohjelmistot tarjoavat."
|
"Porttiavaruuden koko määräytyy käytettyjen IPTV-laitteiden mukaan. Laajennos lukee EXT-protokollan yhteydessä perusportista dataa, jota ulkoiset ohjelmistot tarjoavat."
|
||||||
|
|
||||||
msgid "Use section filtering"
|
msgid "Use section filtering"
|
||||||
msgstr "K<EFBFBD>yt<EFBFBD> sektioiden suodatusta"
|
msgstr "Käytä sektioiden suodatusta"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Define whether the section filtering shall be used.\n"
|
"Define whether the section filtering shall be used.\n"
|
||||||
@@ -153,29 +153,29 @@ msgid ""
|
|||||||
"Section filtering means that IPTV plugin tries to parse and provide VDR with secondary data about the currently active stream. VDR can then use this data for providing various functionalities such as automatic pid change detection and EPG etc.\n"
|
"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."
|
"Enabling this feature does not affect streams that do not contain section data."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"M<EFBFBD><EFBFBD>rittele suodatuksen k<EFBFBD>ytt<EFBFBD> sektioille.\n"
|
"Määrittele suodatuksen käyttö sektioille.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"IPTV-laajennos voi suodattaa l<EFBFBD>hetteest<EFBFBD> VDR:lle tarjottavia sektioita, joita k<EFBFBD>ytet<EFBFBD><EFBFBD>n esim. ohjelmaoppaan ja ohjelmatunnisteiden (PID) p<EFBFBD>ivitt<EFBFBD>miseen.\n"
|
"IPTV-laajennos voi suodattaa lähetteestä VDR:lle tarjottavia sektioita, joita käytetään esim. ohjelmaoppaan ja ohjelmatunnisteiden (PID) päivittämiseen.\n"
|
||||||
"Toiminto ei vaikuta l<EFBFBD>hetteeseen, jossa ei ole sektioita."
|
"Toiminto ei vaikuta lähetteeseen, jossa ei ole sektioita."
|
||||||
|
|
||||||
msgid "Disable filters"
|
msgid "Disable filters"
|
||||||
msgstr "Poista suodattimia k<EFBFBD>yt<EFBFBD>st<EFBFBD>"
|
msgstr "Poista suodattimia käytöstä"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Define number of section filters to be disabled.\n"
|
"Define number of section filters to be disabled.\n"
|
||||||
"\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."
|
"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 ""
|
msgstr ""
|
||||||
"M<EFBFBD><EFBFBD>rittele k<EFBFBD>yt<EFBFBD>st<EFBFBD> poistettavien suodattimien lukum<EFBFBD><EFBFBD>r<EFBFBD> sektioille.\n"
|
"Määrittele käytöstä poistettavien suodattimien lukumäärä sektioille.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Tietyt sektiot saattavat aiheuttaa virheellist<EFBFBD> toimintaa VDR:ss<EFBFBD>, esimerkiksi asettavat v<EFBFBD><EFBFBD>r<EFBFBD>n kellonajan, ja n<EFBFBD>iden poistaminen auttaa VDR:<EFBFBD><EFBFBD> toimimaan kunnolla j<EFBFBD>ljelle j<EFBFBD><EFBFBD>vien sektioiden kanssa."
|
"Tietyt sektiot saattavat aiheuttaa virheellistä toimintaa VDR:ssä, esimerkiksi asettavat väärän kellonajan, ja näiden poistaminen auttaa VDR:ää toimimaan kunnolla jäljelle jäävien sektioiden kanssa."
|
||||||
|
|
||||||
#. TRANSLATORS: note the singular!
|
#. TRANSLATORS: note the singular!
|
||||||
msgid "Disable filter"
|
msgid "Disable filter"
|
||||||
msgstr "Poista suodatin k<EFBFBD>yt<EFBFBD>st<EFBFBD>"
|
msgstr "Poista suodatin käytöstä"
|
||||||
|
|
||||||
msgid "Define an ill-behaving filter to be blacklisted."
|
msgid "Define an ill-behaving filter to be blacklisted."
|
||||||
msgstr "M<EFBFBD><EFBFBD>rittele k<EFBFBD>yt<EFBFBD>st<EFBFBD> poistettava suodatin, joka lis<EFBFBD>t<EFBFBD><EFBFBD>n mustalle listalle."
|
msgstr "Määrittele käytöstä poistettava suodatin, joka lisätään mustalle listalle."
|
||||||
|
|
||||||
msgid "Help"
|
msgid "Help"
|
||||||
msgstr "Opaste"
|
msgstr "Opaste"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ msgstr ""
|
|||||||
"Project-Id-Version: iptv 0.2.0\n"
|
"Project-Id-Version: iptv 0.2.0\n"
|
||||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||||
"PO-Revision-Date: 2008-03-30 05:26+0100\n"
|
"PO-Revision-Date: 2008-07-13 03:28+0100\n"
|
||||||
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
|
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
|
||||||
"Language-Team: Italian\n"
|
"Language-Team: Italian\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@@ -122,7 +122,7 @@ msgstr ""
|
|||||||
"Dimensioni più piccole aiutano il consumo di memoria, ma sono più inclini a generare buffer overflows."
|
"Dimensioni più piccole aiutano il consumo di memoria, ma sono più inclini a generare buffer overflows."
|
||||||
|
|
||||||
msgid "TS buffer prefill ratio [%]"
|
msgid "TS buffer prefill ratio [%]"
|
||||||
msgstr "Percentuale riempimento buffer TS [%]"
|
msgstr "Riempimento buffer TS [%]"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
|
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocolext.c,v 1.24 2008/02/17 19:18:47 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocolext.h,v 1.10 2008/02/17 19:18:47 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_PROTOCOLEXT_H
|
#ifndef __IPTV_PROTOCOLEXT_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocolfile.c,v 1.15 2008/01/04 23:36:37 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocolfile.h,v 1.8 2008/01/04 23:36:37 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_PROTOCOLFILE_H
|
#ifndef __IPTV_PROTOCOLFILE_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocolhttp.c,v 1.25 2008/04/02 22:55:04 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocolhttp.h,v 1.12 2008/01/04 23:36:37 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_PROTOCOLHTTP_H
|
#ifndef __IPTV_PROTOCOLHTTP_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocolif.h,v 1.8 2008/01/30 21:57:33 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_PROTOCOLIF_H
|
#ifndef __IPTV_PROTOCOLIF_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocoludp.c,v 1.22 2008/01/04 23:36:37 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: protocoludp.h,v 1.13 2008/01/04 23:36:37 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_PROTOCOLUDP_H
|
#ifndef __IPTV_PROTOCOLUDP_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: sectionfilter.c,v 1.19 2008/02/17 19:18:47 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sectionfilter.h"
|
#include "sectionfilter.h"
|
||||||
@@ -227,7 +226,7 @@ void cIptvSectionFilter::ProcessData(const uint8_t* buf)
|
|||||||
error("Not TS packet: 0x%X\n", buf[0]);
|
error("Not TS packet: 0x%X\n", buf[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop if not the PID this filter is looking for
|
// Stop if not the PID this filter is looking for
|
||||||
if (ts_pid(buf) != pid)
|
if (ts_pid(buf) != pid)
|
||||||
return;
|
return;
|
||||||
@@ -241,7 +240,7 @@ void cIptvSectionFilter::ProcessData(const uint8_t* buf)
|
|||||||
|
|
||||||
uint8_t cc = buf[3] & 0x0f;
|
uint8_t cc = buf[3] & 0x0f;
|
||||||
int ccok = ((feedcc + 1) & 0x0f) == cc;
|
int ccok = ((feedcc + 1) & 0x0f) == cc;
|
||||||
feedcc = cc;
|
feedcc = cc;
|
||||||
|
|
||||||
int dc_i = 0;
|
int dc_i = 0;
|
||||||
if (buf[3] & 0x20) {
|
if (buf[3] & 0x20) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: sectionfilter.h,v 1.8 2008/02/17 19:18:47 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_SECTIONFILTER_H
|
#ifndef __IPTV_SECTIONFILTER_H
|
||||||
|
|||||||
13
setup.c
13
setup.c
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: setup.c,v 1.58 2008/04/02 20:22:48 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -35,7 +34,7 @@ private:
|
|||||||
eProtocolCount
|
eProtocolCount
|
||||||
};
|
};
|
||||||
struct tIptvChannel {
|
struct tIptvChannel {
|
||||||
int frequency, source, protocol, parameter, vpid, ppid, tpid, sid, nid, tid, rid;
|
int frequency, source, protocol, parameter, vpid, ppid, vtype, tpid, sid, nid, tid, rid;
|
||||||
int apid[MAXAPIDS + 1], dpid[MAXDPIDS + 1], spid[MAXSPIDS + 1], caids[MAXCAIDS + 1];
|
int apid[MAXAPIDS + 1], dpid[MAXDPIDS + 1], spid[MAXSPIDS + 1], caids[MAXCAIDS + 1];
|
||||||
int sidscan, pidscan;
|
int sidscan, pidscan;
|
||||||
char name[256], location[256];
|
char name[256], location[256];
|
||||||
@@ -58,7 +57,7 @@ cIptvMenuEditChannel::cIptvMenuEditChannel(cChannel *Channel, bool New)
|
|||||||
protocols[eProtocolUDP] = tr("UDP");
|
protocols[eProtocolUDP] = tr("UDP");
|
||||||
protocols[eProtocolHTTP] = tr("HTTP");
|
protocols[eProtocolHTTP] = tr("HTTP");
|
||||||
protocols[eProtocolFILE] = tr("FILE");
|
protocols[eProtocolFILE] = tr("FILE");
|
||||||
protocols[eProtocolEXT] = tr("EXT");
|
protocols[eProtocolEXT] = tr("EXT");
|
||||||
channel = Channel;
|
channel = Channel;
|
||||||
GetChannelData(channel);
|
GetChannelData(channel);
|
||||||
if (New) {
|
if (New) {
|
||||||
@@ -128,6 +127,9 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel)
|
|||||||
data.source = Channel->Source();
|
data.source = Channel->Source();
|
||||||
data.vpid = Channel->Vpid();
|
data.vpid = Channel->Vpid();
|
||||||
data.ppid = Channel->Ppid();
|
data.ppid = Channel->Ppid();
|
||||||
|
#if defined(APIVERSNUM) && APIVERSNUM >= 10700
|
||||||
|
data.vtype = Channel->Vtype();
|
||||||
|
#endif
|
||||||
data.tpid = Channel->Tpid();
|
data.tpid = Channel->Tpid();
|
||||||
for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i)
|
for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i)
|
||||||
data.apid[i] = Channel->Apid(i);
|
data.apid[i] = Channel->Apid(i);
|
||||||
@@ -153,6 +155,7 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel)
|
|||||||
data.source = cSource::FromData(cSource::stPlug);
|
data.source = cSource::FromData(cSource::stPlug);
|
||||||
data.vpid = 0;
|
data.vpid = 0;
|
||||||
data.ppid = 0;
|
data.ppid = 0;
|
||||||
|
data.vtype = 0;
|
||||||
data.tpid = 0;
|
data.tpid = 0;
|
||||||
for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i)
|
for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i)
|
||||||
data.apid[i] = 0;
|
data.apid[i] = 0;
|
||||||
@@ -197,7 +200,11 @@ void cIptvMenuEditChannel::SetChannelData(cChannel *Channel)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
char slangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
char slangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||||
|
#if defined(APIVERSNUM) && APIVERSNUM >= 10700
|
||||||
|
Channel->SetPids(data.vpid, data.ppid, data.vtype, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid);
|
||||||
|
#else
|
||||||
Channel->SetPids(data.vpid, data.ppid, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid);
|
Channel->SetPids(data.vpid, data.ppid, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid);
|
||||||
|
#endif
|
||||||
Channel->SetCaIds(data.caids);
|
Channel->SetCaIds(data.caids);
|
||||||
Channel->SetId(data.nid, data.tid, data.sid, data.rid);
|
Channel->SetId(data.nid, data.tid, data.sid, data.rid);
|
||||||
Channel->SetName(data.name, "", "IPTV");
|
Channel->SetName(data.name, "", "IPTV");
|
||||||
|
|||||||
1
setup.h
1
setup.h
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: setup.h,v 1.21 2008/02/19 22:29:02 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_SETUP_H
|
#ifndef __IPTV_SETUP_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: sidscanner.c,v 1.1 2007/10/01 18:14:57 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <libsi/section.h>
|
#include <libsi/section.h>
|
||||||
@@ -52,8 +51,9 @@ void cSidScanner::Process(u_short Pid, u_char Tid, const u_char *Data, int Lengt
|
|||||||
if (!Channels.Lock(true, 10))
|
if (!Channels.Lock(true, 10))
|
||||||
return;
|
return;
|
||||||
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
||||||
IptvChannel->SetId(IptvChannel->Nid(), IptvChannel->Tid(),
|
if (IptvChannel)
|
||||||
assoc.getServiceId(), IptvChannel->Rid());
|
IptvChannel->SetId(IptvChannel->Nid(), IptvChannel->Tid(),
|
||||||
|
assoc.getServiceId(), IptvChannel->Rid());
|
||||||
Channels.Unlock();
|
Channels.Unlock();
|
||||||
}
|
}
|
||||||
SetChannel(NULL);
|
SetChannel(NULL);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: sidscanner.h,v 1.1 2007/10/01 18:14:57 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SIDSCANNER_H
|
#ifndef __SIDSCANNER_H
|
||||||
|
|||||||
1
socket.c
1
socket.c
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: socket.c,v 1.7 2008/01/30 21:57:33 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|||||||
1
socket.h
1
socket.h
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: socket.h,v 1.3 2007/10/21 19:32:15 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_SOCKET_H
|
#ifndef __IPTV_SOCKET_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: statistics.c,v 1.22 2008/01/19 21:08:03 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: statistics.h,v 1.11 2008/01/19 21:08:03 ajhseppa Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_STATISTICS_H
|
#ifndef __IPTV_STATISTICS_H
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: streamer.c,v 1.33 2008/04/04 20:55:44 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vdr/thread.h>
|
#include <vdr/thread.h>
|
||||||
@@ -46,11 +45,11 @@ void cIptvStreamer::Action(void)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mutex->Unlock();
|
mutex->Unlock();
|
||||||
cCondWait::SleepMs(100); // to reduce cpu load
|
sleep.Wait(100); // to reduce cpu load
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cCondWait::SleepMs(100); // and avoid busy loop
|
sleep.Wait(100); // and avoid busy loop
|
||||||
}
|
}
|
||||||
debug("cIptvStreamer::Action(): Exiting\n");
|
debug("cIptvStreamer::Action(): Exiting\n");
|
||||||
}
|
}
|
||||||
@@ -70,6 +69,7 @@ bool cIptvStreamer::Close(void)
|
|||||||
{
|
{
|
||||||
debug("cIptvStreamer::Close()\n");
|
debug("cIptvStreamer::Close()\n");
|
||||||
// Stop thread
|
// Stop thread
|
||||||
|
sleep.Signal();
|
||||||
if (Running())
|
if (Running())
|
||||||
Cancel(3);
|
Cancel(3);
|
||||||
// Close the protocol. A mutex should be taken here to avoid a race condition
|
// Close the protocol. A mutex should be taken here to avoid a race condition
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: streamer.h,v 1.16 2008/04/04 20:55:44 rahrenbe Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_STREAMER_H
|
#ifndef __IPTV_STREAMER_H
|
||||||
@@ -21,6 +20,7 @@ class cIptvStreamer : public cThread, public cIptvStreamerStatistics {
|
|||||||
private:
|
private:
|
||||||
cRingBufferLinear* ringBuffer;
|
cRingBufferLinear* ringBuffer;
|
||||||
cMutex* mutex;
|
cMutex* mutex;
|
||||||
|
cCondWait sleep;
|
||||||
unsigned char* readBuffer;
|
unsigned char* readBuffer;
|
||||||
unsigned int readBufferLen;
|
unsigned int readBufferLen;
|
||||||
cIptvProtocolIf* protocol;
|
cIptvProtocolIf* protocol;
|
||||||
|
|||||||
Reference in New Issue
Block a user