mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Renamed SidFinder to SidScanner.
This commit is contained in:
parent
206475928b
commit
e210b8197b
4
Makefile
4
Makefile
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile,v 1.13 2007/09/29 16:21:04 rahrenbe Exp $
|
||||
# $Id: Makefile,v 1.14 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
|
||||
# Debugging on/off
|
||||
#IPTV_DEBUG = 1
|
||||
@ -58,7 +58,7 @@ endif
|
||||
### The object files (add further files here):
|
||||
|
||||
OBJS = $(PLUGIN).o config.o setup.o device.o streamer.o protocoludp.o \
|
||||
protocolhttp.o protocolfile.o sectionfilter.o sidfinder.o
|
||||
protocolhttp.o protocolfile.o sectionfilter.o sidscanner.o
|
||||
|
||||
### The main target:
|
||||
|
||||
|
37
device.c
37
device.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.c,v 1.48 2007/09/30 21:38:31 rahrenbe Exp $
|
||||
* $Id: device.c,v 1.49 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
@ -34,23 +34,26 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
pIptvStreamer = new cIptvStreamer(tsBuffer, &mutex);
|
||||
// Initialize filter pointers
|
||||
memset(&secfilters, '\0', sizeof(secfilters));
|
||||
// Start section handler for iptv device
|
||||
StartSectionHandler();
|
||||
// Sid filter must be created after the section handler
|
||||
sidFinder = new cSidFinder;
|
||||
if (sidFinder)
|
||||
AttachFilter(sidFinder);
|
||||
// Sid scanner must be created after the section handler
|
||||
pSidScanner = new cSidScanner;
|
||||
if (pSidScanner)
|
||||
AttachFilter(pSidScanner);
|
||||
}
|
||||
|
||||
cIptvDevice::~cIptvDevice()
|
||||
{
|
||||
debug("cIptvDevice::~cIptvDevice(%d)\n", deviceIndex);
|
||||
delete pIptvStreamer;
|
||||
delete pUdpProtocol;
|
||||
delete tsBuffer;
|
||||
DELETENULL(pIptvStreamer);
|
||||
DELETENULL(pUdpProtocol);
|
||||
DELETENULL(pHttpProtocol);
|
||||
DELETENULL(pFileProtocol);
|
||||
DELETENULL(tsBuffer);
|
||||
// Detach and destroy sid filter
|
||||
if (sidFinder) {
|
||||
Detach(sidFinder);
|
||||
delete sidFinder;
|
||||
if (pSidScanner) {
|
||||
Detach(pSidScanner);
|
||||
DELETENULL(pSidScanner);
|
||||
}
|
||||
// Destroy all filters
|
||||
for (int i = 0; i < eMaxSecFilterCount; ++i)
|
||||
@ -152,8 +155,8 @@ bool cIptvDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
||||
return false;
|
||||
}
|
||||
pIptvStreamer->Set(addr, port, protocol);
|
||||
if (sidFinder && IptvConfig.GetSidScanning())
|
||||
sidFinder->SetChannel(Channel);
|
||||
if (pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
pSidScanner->SetChannel(Channel);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -232,8 +235,8 @@ bool cIptvDevice::OpenDvr(void)
|
||||
mutex.Unlock();
|
||||
ResetBuffering();
|
||||
pIptvStreamer->Open();
|
||||
if (sidFinder && IptvConfig.GetSidScanning())
|
||||
sidFinder->SetStatus(true);
|
||||
if (pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
pSidScanner->SetStatus(true);
|
||||
isOpenDvr = true;
|
||||
return true;
|
||||
}
|
||||
@ -241,8 +244,8 @@ bool cIptvDevice::OpenDvr(void)
|
||||
void cIptvDevice::CloseDvr(void)
|
||||
{
|
||||
debug("cIptvDevice::CloseDvr(%d)\n", deviceIndex);
|
||||
if (sidFinder && IptvConfig.GetSidScanning())
|
||||
sidFinder->SetStatus(false);
|
||||
if (pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
pSidScanner->SetStatus(false);
|
||||
pIptvStreamer->Close();
|
||||
isOpenDvr = false;
|
||||
}
|
||||
|
6
device.h
6
device.h
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.h,v 1.22 2007/09/29 16:21:05 rahrenbe Exp $
|
||||
* $Id: device.h,v 1.23 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_DEVICE_H
|
||||
@ -15,7 +15,7 @@
|
||||
#include "protocolfile.h"
|
||||
#include "streamer.h"
|
||||
#include "sectionfilter.h"
|
||||
#include "sidfinder.h"
|
||||
#include "sidscanner.h"
|
||||
|
||||
class cIptvDevice : public cDevice {
|
||||
// static ones
|
||||
@ -39,7 +39,7 @@ private:
|
||||
cIptvProtocolHttp *pHttpProtocol;
|
||||
cIptvProtocolFile *pFileProtocol;
|
||||
cIptvStreamer *pIptvStreamer;
|
||||
cSidFinder *sidFinder;
|
||||
cSidScanner *pSidScanner;
|
||||
cMutex mutex;
|
||||
cIptvSectionFilter* secfilters[eMaxSecFilterCount];
|
||||
|
||||
|
18
po/fi_FI.po
18
po/fi_FI.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VDR 1.5.7\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2007-10-01 00:37+0300\n"
|
||||
"POT-Creation-Date: 2007-10-01 21:07+0300\n"
|
||||
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
|
||||
"Last-Translator: Rolf Ahrenberg\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@ -47,26 +47,30 @@ msgstr "Osoite"
|
||||
msgid "Port"
|
||||
msgstr "Portti"
|
||||
|
||||
#: setup.c:259
|
||||
#: setup.c:195
|
||||
msgid "Rid"
|
||||
msgstr "Radio-ID"
|
||||
|
||||
#: setup.c:267
|
||||
msgid "Cannot find unique channel settings!"
|
||||
msgstr "Yksilöllisiä kanava-asetuksia ei löydetä!"
|
||||
|
||||
#: setup.c:333
|
||||
#: setup.c:341
|
||||
msgid "IPTV Channels"
|
||||
msgstr "IPTV-kanavat"
|
||||
|
||||
#: setup.c:478
|
||||
#: setup.c:486
|
||||
msgid "TS buffer size [MB]"
|
||||
msgstr "TS-puskurin koko [MB]"
|
||||
|
||||
#: setup.c:479
|
||||
#: setup.c:487
|
||||
msgid "TS buffer prefill ratio [%]"
|
||||
msgstr "TS-puskurin esitäyttöaste [%]"
|
||||
|
||||
#: setup.c:480
|
||||
#: setup.c:488
|
||||
msgid "Use section filtering"
|
||||
msgstr "Käytä sektioiden suodatusta"
|
||||
|
||||
#: setup.c:482
|
||||
#: setup.c:490
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Etsi palvelu-ID automaattisesti"
|
||||
|
8
setup.c
8
setup.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.c,v 1.18 2007/10/01 15:38:44 ajhseppa Exp $
|
||||
* $Id: setup.c,v 1.19 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -192,6 +192,7 @@ void cIptvMenuEditChannel::Setup(void)
|
||||
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));
|
||||
Add(new cMenuEditIntItem(tr ("Rid"), &data.rid, 0, 0x1FFF));
|
||||
SetCurrent(Get(current));
|
||||
Display();
|
||||
}
|
||||
@ -218,7 +219,7 @@ eOSState cIptvMenuEditChannel::ProcessKey(eKeys Key)
|
||||
newchannel.PluginParam())) {
|
||||
// If the channel RID is already at maximum, then fail the
|
||||
// channel modification
|
||||
if (iteratorChannel->Rid() >= 8192) {
|
||||
if (iteratorChannel->Rid() >= 0x1FFF) {
|
||||
debug("Cannot increment RID over maximum value\n");
|
||||
uniquityFailed = true;
|
||||
break;
|
||||
@ -231,7 +232,7 @@ eOSState cIptvMenuEditChannel::ProcessKey(eKeys Key)
|
||||
0 : iteratorChannel->Rid() + 1);
|
||||
|
||||
// Try zero Rid:s at first increment. Prevents them from
|
||||
// creeping slowly towards their maximum value
|
||||
// creeping slowly towards their maximum value
|
||||
firstIncrement = false;
|
||||
|
||||
// Re-set the search and start again
|
||||
@ -523,4 +524,3 @@ void cIptvPluginSetup::Store(void)
|
||||
IptvConfig.SetSectionFiltering(sectionFiltering);
|
||||
IptvConfig.SetSidScanning(sidScanning);
|
||||
}
|
||||
|
||||
|
@ -1,46 +1,46 @@
|
||||
/*
|
||||
* sidfilter.c: IPTV plugin for the Video Disk Recorder
|
||||
* sidscanner.c: IPTV plugin for the Video Disk Recorder
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sidfinder.c,v 1.3 2007/09/30 17:33:02 ajhseppa Exp $
|
||||
* $Id: sidscanner.c,v 1.1 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <libsi/section.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "sidfinder.h"
|
||||
#include "sidscanner.h"
|
||||
|
||||
cSidFinder::cSidFinder(void)
|
||||
cSidScanner::cSidScanner(void)
|
||||
{
|
||||
debug("cSidFinder::cSidFinder()\n");
|
||||
debug("cSidScanner::cSidScanner()\n");
|
||||
channel = cChannel();
|
||||
Set(0x00, 0x00); // PAT
|
||||
}
|
||||
|
||||
void cSidFinder::SetStatus(bool On)
|
||||
void cSidScanner::SetStatus(bool On)
|
||||
{
|
||||
debug("cSidFinder::SetStatus(): %d\n", On);
|
||||
debug("cSidScanner::SetStatus(): %d\n", On);
|
||||
cFilter::SetStatus(On);
|
||||
}
|
||||
|
||||
void cSidFinder::SetChannel(const cChannel *Channel)
|
||||
void cSidScanner::SetChannel(const cChannel *Channel)
|
||||
{
|
||||
if (Channel) {
|
||||
debug("cSidFinder::SetChannel(): %s\n", Channel->PluginParam());
|
||||
debug("cSidScanner::SetChannel(): %s\n", Channel->PluginParam());
|
||||
channel = *Channel;
|
||||
}
|
||||
else {
|
||||
debug("cSidFinder::SetChannel()\n");
|
||||
debug("cSidScanner::SetChannel()\n");
|
||||
channel = cChannel();
|
||||
}
|
||||
}
|
||||
|
||||
void cSidFinder::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
|
||||
void cSidScanner::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
|
||||
{
|
||||
//debug("cSidFinder::Process()\n");
|
||||
//debug("cSidScanner::Process()\n");
|
||||
if ((Pid == 0x00) && (Tid == 0x00) && channel.GetChannelID().Valid()) {
|
||||
debug("cSidFinder::Process(): Pid=%d Tid=%02X\n", Pid, Tid);
|
||||
debug("cSidScanner::Process(): Pid=%d Tid=%02X\n", Pid, Tid);
|
||||
SI::PAT pat(Data, false);
|
||||
if (!pat.CheckCRCAndParse())
|
||||
return;
|
||||
@ -48,11 +48,12 @@ void cSidFinder::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
||||
for (SI::Loop::Iterator it; pat.associationLoop.getNext(assoc, it); ) {
|
||||
if (!assoc.isNITPid()) {
|
||||
if (assoc.getServiceId() != channel.Sid()) {
|
||||
debug("cSidFinder::Process(): Sid=%d\n", assoc.getServiceId());
|
||||
debug("cSidScanner::Process(): Sid=%d\n", assoc.getServiceId());
|
||||
if (!Channels.Lock(true, 10))
|
||||
return;
|
||||
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
||||
IptvChannel->SetId(IptvChannel->Nid(), IptvChannel->Tid(), assoc.getServiceId(), IptvChannel->Rid());
|
||||
IptvChannel->SetId(IptvChannel->Nid(), IptvChannel->Tid(),
|
||||
assoc.getServiceId(), IptvChannel->Rid());
|
||||
Channels.Unlock();
|
||||
}
|
||||
SetChannel(NULL);
|
||||
@ -62,4 +63,3 @@ void cSidFinder::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* sidfinder.h: IPTV plugin for the Video Disk Recorder
|
||||
* sidscanner.h: IPTV plugin for the Video Disk Recorder
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: sidfinder.h,v 1.1 2007/09/28 23:23:12 rahrenbe Exp $
|
||||
* $Id: sidscanner.h,v 1.1 2007/10/01 18:14:57 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __SIDFINDER_H
|
||||
#define __SIDFINDER_H
|
||||
#ifndef __SIDSCANNER_H
|
||||
#define __SIDSCANNER_H
|
||||
|
||||
#include <vdr/channels.h>
|
||||
#include <vdr/filter.h>
|
||||
|
||||
class cSidFinder : public cFilter {
|
||||
class cSidScanner : public cFilter {
|
||||
private:
|
||||
cChannel channel;
|
||||
|
||||
@ -20,9 +20,9 @@ protected:
|
||||
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
|
||||
|
||||
public:
|
||||
cSidFinder(void);
|
||||
cSidScanner(void);
|
||||
virtual void SetStatus(bool On);
|
||||
void SetChannel(const cChannel *Channel);
|
||||
};
|
||||
|
||||
#endif // __SIDFINDER_H
|
||||
#endif // __SIDSCANNER_H
|
Loading…
Reference in New Issue
Block a user