mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Updated for vdr-2.3.1.
This commit is contained in:
parent
03a1e33e2f
commit
ccc9bab5e0
9
HISTORY
9
HISTORY
@ -272,3 +272,12 @@ VDR Plugin 'iptv' Revision History
|
|||||||
detection (Thanks to Daniel Ribeiro).
|
detection (Thanks to Daniel Ribeiro).
|
||||||
- Got rid of IPTV_DEBUG.
|
- Got rid of IPTV_DEBUG.
|
||||||
- Added support for tracing modes.
|
- Added support for tracing modes.
|
||||||
|
|
||||||
|
|
||||||
|
==================================
|
||||||
|
VDR Plugin 'iptv' Revision History
|
||||||
|
==================================
|
||||||
|
|
||||||
|
2015-XX-XX: Version 2.3.0
|
||||||
|
|
||||||
|
- Updated for vdr-2.3.1.
|
||||||
|
3
device.c
3
device.c
@ -125,12 +125,13 @@ cIptvDevice *cIptvDevice::GetIptvDevice(int cardIndexP)
|
|||||||
cString cIptvDevice::GetGeneralInformation(void)
|
cString cIptvDevice::GetGeneralInformation(void)
|
||||||
{
|
{
|
||||||
debug16("%s [device %d]", __PRETTY_FUNCTION__, deviceIndexM);
|
debug16("%s [device %d]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
|
LOCK_CHANNELS_READ;
|
||||||
return cString::sprintf("IPTV device: %d\nCardIndex: %d\nStream: %s\nStream bitrate: %s\n%sChannel: %s",
|
return cString::sprintf("IPTV device: %d\nCardIndex: %d\nStream: %s\nStream bitrate: %s\n%sChannel: %s",
|
||||||
deviceIndexM, CardIndex(),
|
deviceIndexM, CardIndex(),
|
||||||
pIptvStreamerM ? *pIptvStreamerM->GetInformation() : "",
|
pIptvStreamerM ? *pIptvStreamerM->GetInformation() : "",
|
||||||
pIptvStreamerM ? *pIptvStreamerM->GetStreamerStatistic() : "",
|
pIptvStreamerM ? *pIptvStreamerM->GetStreamerStatistic() : "",
|
||||||
*GetBufferStatistic(),
|
*GetBufferStatistic(),
|
||||||
*Channels.GetByNumber(cDevice::CurrentChannel())->ToText());
|
*Channels->GetByNumber(cDevice::CurrentChannel())->ToText());
|
||||||
}
|
}
|
||||||
|
|
||||||
cString cIptvDevice::GetPidsInformation(void)
|
cString cIptvDevice::GetPidsInformation(void)
|
||||||
|
6
iptv.c
6
iptv.c
@ -13,15 +13,15 @@
|
|||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "iptvservice.h"
|
#include "iptvservice.h"
|
||||||
|
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM < 20200
|
#if defined(APIVERSNUM) && APIVERSNUM < 20301
|
||||||
#error "VDR-2.2.0 API version or greater is required!"
|
#error "VDR-2.3.1 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GITVERSION
|
#ifndef GITVERSION
|
||||||
#define GITVERSION ""
|
#define GITVERSION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char VERSION[] = "2.2.1" GITVERSION;
|
const char VERSION[] = "2.3.0" GITVERSION;
|
||||||
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
||||||
|
|
||||||
class cPluginIptv : public cPlugin {
|
class cPluginIptv : public cPlugin {
|
||||||
|
14
pidscanner.c
14
pidscanner.c
@ -108,11 +108,13 @@ void cPidScanner::Process(const uint8_t* bufP)
|
|||||||
if (((numVpidsM >= PIDSCANNER_VPID_COUNT) && (numApidsM >= PIDSCANNER_APID_COUNT)) ||
|
if (((numVpidsM >= PIDSCANNER_VPID_COUNT) && (numApidsM >= PIDSCANNER_APID_COUNT)) ||
|
||||||
(abs(numApidsM - numVpidsM) >= PIDSCANNER_PID_DELTA_COUNT)) {
|
(abs(numApidsM - numVpidsM) >= PIDSCANNER_PID_DELTA_COUNT)) {
|
||||||
// Lock channels for pid updates
|
// Lock channels for pid updates
|
||||||
if (!Channels.Lock(true, 10)) {
|
timeoutM.Set(PIDSCANNER_TIMEOUT_IN_MS);
|
||||||
timeoutM.Set(PIDSCANNER_TIMEOUT_IN_MS);
|
cStateKey StateKey;
|
||||||
|
cChannels *Channels = cChannels::GetChannelsWrite(StateKey, 10);
|
||||||
|
if (!Channels)
|
||||||
return;
|
return;
|
||||||
}
|
bool ChannelsModified = false;
|
||||||
cChannel *IptvChannel = Channels.GetByChannelID(channelIdM);
|
cChannel *IptvChannel = Channels->GetByChannelID(channelIdM);
|
||||||
if (IptvChannel) {
|
if (IptvChannel) {
|
||||||
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
|
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
|
||||||
int Atypes[MAXAPIDS + 1] = { 0 };
|
int Atypes[MAXAPIDS + 1] = { 0 };
|
||||||
@ -147,9 +149,9 @@ void cPidScanner::Process(const uint8_t* bufP)
|
|||||||
for (unsigned int i = 0; i < MAXSPIDS; ++i)
|
for (unsigned int i = 0; i < MAXSPIDS; ++i)
|
||||||
Spids[i] = IptvChannel->Spid(i);
|
Spids[i] = IptvChannel->Spid(i);
|
||||||
debug1("%s vpid=0x%04X, apid=0x%04X", __PRETTY_FUNCTION__, vPidM, aPidM);
|
debug1("%s vpid=0x%04X, apid=0x%04X", __PRETTY_FUNCTION__, vPidM, aPidM);
|
||||||
IptvChannel->SetPids(vPidM, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid);
|
ChannelsModified |= IptvChannel->SetPids(vPidM, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid);
|
||||||
}
|
}
|
||||||
Channels.Unlock();
|
StateKey.Remove(ChannelsModified);
|
||||||
processM = false;
|
processM = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-iptv 2.2.1\n"
|
"Project-Id-Version: vdr-iptv 2.3.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-iptv 2.2.1\n"
|
"Project-Id-Version: vdr-iptv 2.3.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-iptv 2.2.1\n"
|
"Project-Id-Version: vdr-iptv 2.3.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-iptv 2.2.1\n"
|
"Project-Id-Version: vdr-iptv 2.3.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-iptv 2.2.1\n"
|
"Project-Id-Version: vdr-iptv 2.3.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-iptv 2.2.1\n"
|
"Project-Id-Version: vdr-iptv 2.3.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-iptv 2.2.1\n"
|
"Project-Id-Version: vdr-iptv 2.3.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||||
|
14
sidscanner.c
14
sidscanner.c
@ -89,13 +89,17 @@ void cSidScanner::Process(u_short pidP, u_char tidP, const u_char *dataP, int le
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((newSid >= 0) || (newNid >= 0) || (newTid >= 0)) {
|
if ((newSid >= 0) || (newNid >= 0) || (newTid >= 0)) {
|
||||||
if (!Channels.Lock(true, 10))
|
cStateKey StateKey;
|
||||||
|
cChannels *Channels = cChannels::GetChannelsWrite(StateKey, 10);
|
||||||
|
if (!Channels)
|
||||||
return;
|
return;
|
||||||
cChannel *IptvChannel = Channels.GetByChannelID(channelIdM);
|
bool ChannelsModified = false;
|
||||||
|
cChannel *IptvChannel = Channels->GetByChannelID(channelIdM);
|
||||||
if (IptvChannel)
|
if (IptvChannel)
|
||||||
IptvChannel->SetId((newNid < 0) ? IptvChannel->Nid() : newNid, (newTid < 0) ? IptvChannel->Tid() : newTid,
|
ChannelsModified |= IptvChannel->SetId(Channels, (newNid < 0) ? IptvChannel->Nid() : newNid,
|
||||||
(newSid < 0) ? IptvChannel->Sid() : newSid, IptvChannel->Rid());
|
(newTid < 0) ? IptvChannel->Tid() : newTid,
|
||||||
Channels.Unlock();
|
(newSid < 0) ? IptvChannel->Sid() : newSid, IptvChannel->Rid());
|
||||||
|
StateKey.Remove(ChannelsModified);
|
||||||
}
|
}
|
||||||
if (sidFoundM && nidFoundM && tidFoundM) {
|
if (sidFoundM && nidFoundM && tidFoundM) {
|
||||||
SetChannel(tChannelID::InvalidID);
|
SetChannel(tChannelID::InvalidID);
|
||||||
|
2
source.c
2
source.c
@ -164,7 +164,7 @@ void cIptvSourceParam::GetData(cChannel *channelP)
|
|||||||
{
|
{
|
||||||
debug1("%s (%s)", __PRETTY_FUNCTION__, channelP->Parameters());
|
debug1("%s (%s)", __PRETTY_FUNCTION__, channelP->Parameters());
|
||||||
channelP->SetTransponderData(channelP->Source(), channelP->Frequency(), dataM.Srate(), itpM.ToString(Source()), true);
|
channelP->SetTransponderData(channelP->Source(), channelP->Frequency(), dataM.Srate(), itpM.ToString(Source()), true);
|
||||||
channelP->SetId(channelP->Nid(), channelP->Tid(), channelP->Sid(), ridM);
|
channelP->SetId(NULL, channelP->Nid(), channelP->Tid(), channelP->Sid(), ridM);
|
||||||
}
|
}
|
||||||
|
|
||||||
cOsdItem *cIptvSourceParam::GetOsdItem(void)
|
cOsdItem *cIptvSourceParam::GetOsdItem(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user