mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
Merge branch 'dvbsi++' into next
This commit is contained in:
@@ -131,6 +131,8 @@ class CServiceManager
|
|||||||
CZapitChannel* FindChannelByName(std::string name);
|
CZapitChannel* FindChannelByName(std::string name);
|
||||||
CZapitChannel* FindCurrentChannel(const t_channel_id channel_id);
|
CZapitChannel* FindCurrentChannel(const t_channel_id channel_id);
|
||||||
CZapitChannel* FindChannel48(const t_channel_id channel_id);
|
CZapitChannel* FindChannel48(const t_channel_id channel_id);
|
||||||
|
CZapitChannel* FindChannelFuzzy(const t_channel_id channel_id,
|
||||||
|
const t_satellite_position pos, const freq_id_t freq);
|
||||||
|
|
||||||
std::string GetServiceName(t_channel_id channel_id);
|
std::string GetServiceName(t_channel_id channel_id);
|
||||||
|
|
||||||
|
@@ -7,6 +7,8 @@
|
|||||||
* rasc <rasc@berlios.de>,
|
* rasc <rasc@berlios.de>,
|
||||||
* thegoodguy <thegoodguy@berlios.de>
|
* thegoodguy <thegoodguy@berlios.de>
|
||||||
*
|
*
|
||||||
|
* (C) 2009, 2011, 2013 Stefan Seyfried
|
||||||
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program 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
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@@ -383,10 +385,11 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
|||||||
freq = freq/1000;
|
freq = freq/1000;
|
||||||
|
|
||||||
CZapitChannel* chan;
|
CZapitChannel* chan;
|
||||||
|
t_channel_id chid = CREATE_CHANNEL_ID64;
|
||||||
if(bUser)
|
if(bUser)
|
||||||
chan = CServiceManager::getInstance()->FindChannel48(CREATE_CHANNEL_ID64);
|
chan = CServiceManager::getInstance()->FindChannelFuzzy(chid, satellitePosition, freq);
|
||||||
else
|
else
|
||||||
chan = CServiceManager::getInstance()->FindChannel(CREATE_CHANNEL_ID64);
|
chan = CServiceManager::getInstance()->FindChannel(chid);
|
||||||
if (chan != NULL) {
|
if (chan != NULL) {
|
||||||
DBG("%04x %04x %04x %s\n", transport_stream_id, original_network_id, service_id, xmlGetAttribute(channel_node, "n"));
|
DBG("%04x %04x %04x %s\n", transport_stream_id, original_network_id, service_id, xmlGetAttribute(channel_node, "n"));
|
||||||
#if 0
|
#if 0
|
||||||
|
@@ -3,6 +3,8 @@
|
|||||||
*
|
*
|
||||||
* (C) 2002, 2003 by Andreas Oberritter <obi@tuxbox.org>
|
* (C) 2002, 2003 by Andreas Oberritter <obi@tuxbox.org>
|
||||||
*
|
*
|
||||||
|
* (C) 2007-2009, 2013 Stefan Seyfried
|
||||||
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program 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
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@@ -220,6 +222,18 @@ CZapitChannel * CServiceManager::FindChannel48(const t_channel_id channel_id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CZapitChannel* CServiceManager::FindChannelFuzzy(const t_channel_id channel_id,
|
||||||
|
const t_satellite_position pos, const freq_id_t freq)
|
||||||
|
{
|
||||||
|
CZapitChannel *ret;
|
||||||
|
ret = FindChannel48(channel_id);
|
||||||
|
if (!ret || !(pos == ret->getSatellitePosition()))
|
||||||
|
return NULL;
|
||||||
|
if (abs((int)ret->getFreqId() - (int)freq) < 3)
|
||||||
|
return ret;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bool CServiceManager::GetAllRadioChannels(ZapitChannelList &list, int flags)
|
bool CServiceManager::GetAllRadioChannels(ZapitChannelList &list, int flags)
|
||||||
{
|
{
|
||||||
list.clear();
|
list.clear();
|
||||||
|
Reference in New Issue
Block a user