getservices.cpp: fix e2tv streaming on cable boxes

Origin commit data
------------------
Branch: ni/coolstream
Commit: bbed77d8d1
Author: GetAway <get-away@t-online.de>
Date: 2024-05-03 (Fri, 03 May 2024)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
GetAway
2024-05-03 21:09:51 +02:00
committed by vanhofen
parent 371f806fdc
commit 21465ade0c
2 changed files with 19 additions and 12 deletions

View File

@@ -128,7 +128,7 @@ class CServiceManager
CZapitChannel* FindChannel(const t_channel_id channel_id, bool * current_is_nvod = NULL);
CZapitChannel* FindChannelByName(std::string name);
CZapitChannel* FindChannelByPattern(std::string pattern); //NI
CZapitChannel* FindChannelByPattern(std::string pattern);
CZapitChannel* FindCurrentChannel(const t_channel_id channel_id);
CZapitChannel* FindChannel48(const t_channel_id channel_id);
CZapitChannel* FindChannel48Pos(const t_channel_id channel_id,

View File

@@ -220,7 +220,6 @@ CZapitChannel * CServiceManager::FindChannelByName(std::string name)
return NULL;
}
//NI
CZapitChannel* CServiceManager::FindChannelByPattern(std::string pattern)
{
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
@@ -245,7 +244,7 @@ CZapitChannel * CServiceManager::FindChannel48(const t_channel_id channel_id)
{
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
if ((it->second.getChannelID() & 0xFFFFFFFFFFFFULL) == (channel_id & 0xFFFFFFFFFFFFULL))
return &it->second;
return &(it->second);
}
return NULL;
}
@@ -254,11 +253,19 @@ CZapitChannel* CServiceManager::FindChannel48Pos(const t_channel_id channel_id,
const t_satellite_position pos)
{
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
CZapitChannel *ret = &it->second;
if ((ret->getChannelID() & 0xFFFFFFFFFFFFULL) != (channel_id & 0xFFFFFFFFFFFFULL))
CZapitChannel &channel = it->second;
if (CFrontend::isCable(channel.delsys))
{
if ((channel.getChannelID() & 0xFFFFFFFFFFFFULL) == (channel_id & 0xFFFFFFFFFFFFULL))
return &channel;
}
else
{
if ((channel.getChannelID() & 0xFFFFFFFFFFFFULL) != (channel_id & 0xFFFFFFFFFFFFULL))
continue;
if (pos == ret->getSatellitePosition())
return ret;
if (pos == channel.getSatellitePosition())
return &channel;
}
}
return NULL;
}