Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into dvbsi++

This commit is contained in:
[CST] Focus
2013-02-04 10:04:05 +04:00
7 changed files with 81 additions and 42 deletions

View File

@@ -515,6 +515,33 @@
<transponder frequency="538000" symbol_rate="6790000" fec_inner="0" modulation="3"/> <transponder frequency="538000" symbol_rate="6790000" fec_inner="0" modulation="3"/>
<transponder frequency="540000" symbol_rate="6110000" fec_inner="0" modulation="3"/> <transponder frequency="540000" symbol_rate="6110000" fec_inner="0" modulation="3"/>
</cable> </cable>
<cable name="Antennengemeinschaft Penig" satfeed="true" flags="9">
<transponder frequency="129000" symbol_rate="6900000" fec_inner="0" modulation="3"/>
<transponder frequency="306000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="314000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="322000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="330000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="328000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="346000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="354000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="362000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="370000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="378000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="386000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="394000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="402000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="410000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="418000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="426000" symbol_rate="6900000" fec_inner="0" modulation="3"/>
<transponder frequency="434000" symbol_rate="6875000" fec_inner="0" modulation="5"/>
<transponder frequency="442000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="450000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="466000" symbol_rate="6875000" fec_inner="0" modulation="3"/>
<transponder frequency="506000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="514000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="538000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="546000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
</cable>
<cable name="M-net" satfeed="true" flags="9"> <cable name="M-net" satfeed="true" flags="9">
<transponder frequency="114000" symbol_rate="6900000" fec_inner="0" modulation="5"/> <transponder frequency="114000" symbol_rate="6900000" fec_inner="0" modulation="5"/>
<transponder frequency="122000" symbol_rate="6900000" fec_inner="0" modulation="5"/> <transponder frequency="122000" symbol_rate="6900000" fec_inner="0" modulation="5"/>

View File

@@ -739,6 +739,7 @@ menu.hint_channellist_epg_align Hier kann man festlegen, wie der Text für das E
menu.hint_channellist_extended Bei aktivierter Funktion wird vor dem Sendernamen ein Balken eingeblendet,\nder den Sendungsfortschritt anzeigt menu.hint_channellist_extended Bei aktivierter Funktion wird vor dem Sendernamen ein Balken eingeblendet,\nder den Sendungsfortschritt anzeigt
menu.hint_channellist_fonts Ändern Sie in der Kanalliste die Schriftgrößen menu.hint_channellist_fonts Ändern Sie in der Kanalliste die Schriftgrößen
menu.hint_channellist_foot Definiert welche Informationen im unteren Sendungsfenster angezeigt werden sollen menu.hint_channellist_foot Definiert welche Informationen im unteren Sendungsfenster angezeigt werden sollen
menu.hint_channellist_minitv Schaltet den MiniTV Modus ein/aus
menu.hint_channellist_setup Hier können Sie Anzeigeoptionen für die Kanalliste auswählen menu.hint_channellist_setup Hier können Sie Anzeigeoptionen für die Kanalliste auswählen
menu.hint_ci Conditional-Access-Menü zum Einrichten\nIhres CI-Moduls oder der eingebetteten Conax-Karte menu.hint_ci Conditional-Access-Menü zum Einrichten\nIhres CI-Moduls oder der eingebetteten Conax-Karte
menu.hint_colors Konfigurieren Sie die Menü-Farben menu.hint_colors Konfigurieren Sie die Menü-Farben

View File

@@ -739,6 +739,7 @@ menu.hint_channellist_epg_align EPG event align
menu.hint_channellist_extended Show current event progress bar menu.hint_channellist_extended Show current event progress bar
menu.hint_channellist_fonts Change channel list font sizes menu.hint_channellist_fonts Change channel list font sizes
menu.hint_channellist_foot Show additional information\nin bottom box menu.hint_channellist_foot Show additional information\nin bottom box
menu.hint_channellist_minitv Switches the MiniTV mode on/off
menu.hint_channellist_setup Configure channe list GUI options menu.hint_channellist_setup Configure channe list GUI options
menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card
menu.hint_colors Configure GUI colors menu.hint_colors Configure GUI colors

View File

@@ -94,6 +94,8 @@ extern int old_b_id;
extern cVideo * videoDecoder; extern cVideo * videoDecoder;
#define ConnectLineBox_Width 16
CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist, bool ) CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist, bool )
{ {
frameBuffer = CFrameBuffer::getInstance(); frameBuffer = CFrameBuffer::getInstance();
@@ -465,9 +467,6 @@ void CChannelList::calcSize()
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth(); int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth();
width = w_max (((g_settings.channellist_extended)?(frameBuffer->getScreenWidth() / 20 * (fw+6)):(frameBuffer->getScreenWidth() / 20 * (fw+5))), 100); width = w_max (((g_settings.channellist_extended)?(frameBuffer->getScreenWidth() / 20 * (fw+6)):(frameBuffer->getScreenWidth() / 20 * (fw+5))), 100);
widthDetails = width; widthDetails = width;
if (g_settings.channellist_minitv){
widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX();
}
height = h_max ((frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20 * 2)); height = h_max ((frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20 * 2));
if (g_settings.channellist_minitv) if (g_settings.channellist_minitv)
height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), 0); height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), 0);
@@ -505,12 +504,15 @@ void CChannelList::calcSize()
if (g_settings.channellist_minitv) if (g_settings.channellist_minitv)
{ {
width = frameBuffer->getScreenWidth() / 3 * 2; width = frameBuffer->getScreenWidth() / 3 * 2;
widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX() - 2*ConnectLineBox_Width;
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - widthDetails) / 2; x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - widthDetails) / 2;
if (x < ConnectLineBox_Width)
x = ConnectLineBox_Width;
y = frameBuffer->getScreenY(); y = frameBuffer->getScreenY();
pig_width = widthDetails / 3 - 16; infozone_width = widthDetails - width;
pig_height = pig_width / 16 * 9; pig_width = infozone_width;
// infozone_width = pig_width - 8; pig_height = (pig_width * 9) / 16;
infozone_height = height - theight - pig_height; infozone_height = height - theight - pig_height - footerHeight;
} }
else else
{ {
@@ -570,7 +572,7 @@ int CChannelList::show()
if (g_settings.channellist_minitv) if (g_settings.channellist_minitv)
{ {
frameBuffer->paintBoxRel(x,y,widthDetails,height + info_height,COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_ALL); frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,pig_height+infozone_height,COL_MENUCONTENT_PLUS_0);
} }
paintHead(); paintHead();
@@ -1602,8 +1604,6 @@ void CChannelList::clearItem2DetailsLine()
void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/) void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
{ {
#define ConnectLineBox_Width 16
int xpos = x - ConnectLineBox_Width; int xpos = x - ConnectLineBox_Width;
int ypos1 = y + theight+0 + pos*fheight; int ypos1 = y + theight+0 + pos*fheight;
int ypos2 = y + height; int ypos2 = y + height;
@@ -1629,19 +1629,17 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
void CChannelList::showChannelLogo() void CChannelList::showChannelLogo()
{ {
if (g_settings.channellist_minitv)
return;
if(g_settings.infobar_show_channellogo){ if(g_settings.infobar_show_channellogo){
static int logo_w = 0; static int logo_w = 0;
static int logo_h = 0; static int logo_h = 0;
int logo_w_max = width / 4; int logo_w_max = widthDetails / 4;
frameBuffer->paintBoxRel(x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0); frameBuffer->paintBoxRel(x + widthDetails - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0);
std::string lname; std::string lname;
if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->getName(), lname, &logo_w, &logo_h)) { if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->getName(), lname, &logo_w, &logo_h)) {
if((logo_h > theight) || (logo_w > logo_w_max)) if((logo_h > theight) || (logo_w > logo_w_max))
g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, theight); g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, theight);
g_PicViewer->DisplayImage(lname, x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h); g_PicViewer->DisplayImage(lname, x + widthDetails - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h);
} }
} }
} }
@@ -1730,7 +1728,7 @@ void CChannelList::paintButtonBar(bool is_current)
//paint buttons //paint buttons
int y_foot = y + (height - footerHeight); int y_foot = y + (height - footerHeight);
::paintButtons(x, y_foot, width,num_buttons, Button, footerHeight,0,false,COL_INFOBAR_SHADOW,NULL,0,true, buttonID_rest); ::paintButtons(x, y_foot, widthDetails,num_buttons, Button, footerHeight,0,false,COL_INFOBAR_SHADOW,NULL,0,true, buttonID_rest);
} }
void CChannelList::paintItem(int pos) void CChannelList::paintItem(int pos)
@@ -1957,6 +1955,7 @@ void CChannelList::paintHead()
char timestr[10] = {0}; char timestr[10] = {0};
time_t now = time(NULL); time_t now = time(NULL);
struct tm *tm = localtime(&now); struct tm *tm = localtime(&now);
bool gotTime = g_Sectionsd->getIsTimeSet(); bool gotTime = g_Sectionsd->getIsTimeSet();
if(gotTime) { if(gotTime) {
@@ -1973,28 +1972,24 @@ void CChannelList::paintHead()
// head // head
frameBuffer->paintBoxRel(x,y, widthDetails,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round frameBuffer->paintBoxRel(x,y, widthDetails,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + width - iw1 - 4, y, theight); //y+ 5 ); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + widthDetails - iw1 - 10, y, theight); //y+ 5 );
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, x + width - iw1 - iw2 - 8, y, theight);//y + 5); // icon for bouquet list button frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, x + widthDetails - iw1 - iw2 - 14, y, theight);//y + 5); // icon for bouquet list button
if (g_settings.channellist_new_zap_mode) if (g_settings.channellist_new_zap_mode)
frameBuffer->paintIcon(this->new_mode_active ? frameBuffer->paintIcon(this->new_mode_active ?
NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE, NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE,
x + width - iw1 - iw2 - iw3 - 12, y, theight); x + widthDetails - iw1 - iw2 - iw3 - 18, y, theight);
if (gotTime) { if (gotTime) {
int iw3x = (g_settings.channellist_new_zap_mode) ? iw3 : -4; int iw3x = (g_settings.channellist_new_zap_mode) ? iw3 : -4;
if (g_settings.channellist_minitv) g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + widthDetails - iw1 - iw2 - iw3x - 28 -timestr_len,
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + widthDetails - 16 -timestr_len,
y+theight, timestr_len, timestr, COL_MENUHEAD, 0, true); // UTF-8
else
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + width - iw1 - iw2 - iw3x - 16 -timestr_len,
y+theight, timestr_len, timestr, COL_MENUHEAD, 0, true); // UTF-8 y+theight, timestr_len, timestr, COL_MENUHEAD, 0, true); // UTF-8
timestr_len += 4; timestr_len += 4;
} }
timestr_len += iw1 + iw2 + 12; timestr_len += iw1 + iw2 + 12;
if (g_settings.channellist_new_zap_mode) if (g_settings.channellist_new_zap_mode)
timestr_len += iw3 + 4; timestr_len += iw3 + 10;
logo_off = timestr_len + 4; logo_off = timestr_len + 10;
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, widthDetails - timestr_len, name, COL_MENUHEAD, 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, widthDetails - timestr_len, name, COL_MENUHEAD, 0, true); // UTF-8
} }
@@ -2099,7 +2094,7 @@ void CChannelList::paint_pig (int _x, int _y, int w, int h)
void CChannelList::paint_events(int index) void CChannelList::paint_events(int index)
{ {
readEvents(chanlist[index]->channel_id); readEvents(chanlist[index]->channel_id);
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, widthDetails - width, infozone_height,COL_MENUHEAD_PLUS_0); frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0);
char text1[10]; char text1[10];
CChannelEventList::iterator e; CChannelEventList::iterator e;
@@ -2126,21 +2121,24 @@ void CChannelList::paint_events(int index)
do do
{ {
//printf("%d seconds in the past - deleted %s\n", dif, e->description.c_str()); //printf("%d seconds in the past - deleted %s\n", dif, e->description.c_str());
if(!evtlist.empty()) e = evtlist.erase( e );
e = evtlist.erase(e); if (e == evtlist.end())
break;
dif = azeit - e->startTime; dif = azeit - e->startTime;
} }
while (!evtlist.empty() && dif > 0 ); while ( dif > 0 );
} }
if (e == evtlist.end())
break;
//Display the remaining events //Display the remaining events
struct tm *tmStartZeit = localtime(&e->startTime); struct tm *tmStartZeit = localtime(&e->startTime);
strftime(text1, sizeof(text1), "%H:%M", tmStartZeit ); strftime(text1, sizeof(text1), "%H:%M", tmStartZeit );
//printf("%s %s\n", text1, e->description.c_str()); //printf("%s %s\n", text1, e->description.c_str());
int timewidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(text1, true); int timewidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(text1, true);
if ((y+ theight+ pig_height + i*ffheight) < (y+ height)) if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height))
{ {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, timewidth, text1, COL_MENUCONTENTDARK, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, timewidth, text1, COL_MENUCONTENTDARK, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5+timewidth+5, y+ theight+ pig_height + i*ffheight, widthDetails - width - timewidth - 20, e->description, COL_MENUCONTENTDARK, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5+timewidth+5, y+ theight+ pig_height + i*ffheight, infozone_width - timewidth - 20, e->description, COL_MENUCONTENTDARK, 0, true);
} }
else else
{ {

View File

@@ -232,7 +232,6 @@ typedef enum
LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT,
LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT,
LOCALE_CHANNELLIST_EXTENDED, LOCALE_CHANNELLIST_EXTENDED,
LOCALE_CHANNELLIST_MINITV,
LOCALE_CHANNELLIST_FAVS, LOCALE_CHANNELLIST_FAVS,
LOCALE_CHANNELLIST_FOOT, LOCALE_CHANNELLIST_FOOT,
LOCALE_CHANNELLIST_FOOT_FREQ, LOCALE_CHANNELLIST_FOOT_FREQ,
@@ -248,6 +247,7 @@ typedef enum
LOCALE_CHANNELLIST_MAKE_HDLIST, LOCALE_CHANNELLIST_MAKE_HDLIST,
LOCALE_CHANNELLIST_MAKE_NEWLIST, LOCALE_CHANNELLIST_MAKE_NEWLIST,
LOCALE_CHANNELLIST_MAKE_REMOVEDLIST, LOCALE_CHANNELLIST_MAKE_REMOVEDLIST,
LOCALE_CHANNELLIST_MINITV,
LOCALE_CHANNELLIST_NEW_ZAP_MODE, LOCALE_CHANNELLIST_NEW_ZAP_MODE,
LOCALE_CHANNELLIST_NONEFOUND, LOCALE_CHANNELLIST_NONEFOUND,
LOCALE_CHANNELLIST_PROVS, LOCALE_CHANNELLIST_PROVS,
@@ -764,9 +764,9 @@ typedef enum
LOCALE_MENU_HINT_CHANNELLIST_COLORED, LOCALE_MENU_HINT_CHANNELLIST_COLORED,
LOCALE_MENU_HINT_CHANNELLIST_EPG_ALIGN, LOCALE_MENU_HINT_CHANNELLIST_EPG_ALIGN,
LOCALE_MENU_HINT_CHANNELLIST_EXTENDED, LOCALE_MENU_HINT_CHANNELLIST_EXTENDED,
LOCALE_MENU_HINT_CHANNELLIST_MINITV,
LOCALE_MENU_HINT_CHANNELLIST_FONTS, LOCALE_MENU_HINT_CHANNELLIST_FONTS,
LOCALE_MENU_HINT_CHANNELLIST_FOOT, LOCALE_MENU_HINT_CHANNELLIST_FOOT,
LOCALE_MENU_HINT_CHANNELLIST_MINITV,
LOCALE_MENU_HINT_CHANNELLIST_SETUP, LOCALE_MENU_HINT_CHANNELLIST_SETUP,
LOCALE_MENU_HINT_CI, LOCALE_MENU_HINT_CI,
LOCALE_MENU_HINT_COLORS, LOCALE_MENU_HINT_COLORS,

View File

@@ -232,7 +232,6 @@ const char * locale_real_names[] =
"channellist.epgtext_align_left", "channellist.epgtext_align_left",
"channellist.epgtext_align_right", "channellist.epgtext_align_right",
"channellist.extended", "channellist.extended",
"channellist.minitv",
"channellist.favs", "channellist.favs",
"channellist.foot", "channellist.foot",
"channellist.foot_freq", "channellist.foot_freq",
@@ -248,6 +247,7 @@ const char * locale_real_names[] =
"channellist.make_hdlist", "channellist.make_hdlist",
"channellist.make_newlist", "channellist.make_newlist",
"channellist.make_removedlist", "channellist.make_removedlist",
"channellist.minitv",
"channellist.new_zap_mode", "channellist.new_zap_mode",
"channellist.nonefound", "channellist.nonefound",
"channellist.provs", "channellist.provs",
@@ -764,9 +764,9 @@ const char * locale_real_names[] =
"menu.hint_channellist_colored", "menu.hint_channellist_colored",
"menu.hint_channellist_epg_align", "menu.hint_channellist_epg_align",
"menu.hint_channellist_extended", "menu.hint_channellist_extended",
"menu.hint_channellist_minitv",
"menu.hint_channellist_fonts", "menu.hint_channellist_fonts",
"menu.hint_channellist_foot", "menu.hint_channellist_foot",
"menu.hint_channellist_minitv",
"menu.hint_channellist_setup", "menu.hint_channellist_setup",
"menu.hint_ci", "menu.hint_ci",
"menu.hint_colors", "menu.hint_colors",

View File

@@ -222,15 +222,27 @@ CZapitChannel * CServiceManager::FindChannel48(const t_channel_id channel_id)
return NULL; return NULL;
} }
/* TODO: those FindChannel* functions are naive at best. By using a different construction
* scheme for the channel_id,they could easily be made much more efficient. Side effects would
* need to be checked first, though */
CZapitChannel* CServiceManager::FindChannelFuzzy(const t_channel_id channel_id, CZapitChannel* CServiceManager::FindChannelFuzzy(const t_channel_id channel_id,
const t_satellite_position pos, const freq_id_t freq) const t_satellite_position pos, const freq_id_t freq)
{ {
CZapitChannel *ret; for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
ret = FindChannel48(channel_id); CZapitChannel *ret = &it->second;
if (!ret || !(pos == ret->getSatellitePosition())) if ((ret->getChannelID() & 0xFFFFFFFFFFFFULL) != (channel_id & 0xFFFFFFFFFFFFULL))
return NULL; continue;
if (abs((int)ret->getFreqId() - (int)freq) < 3) /* use position only on SAT boxes.
return ret; * Cable/terr does not need thix: There usually is no second cable provider
* to choose from and people are wondering why their ubouquets are no longer
* working => because they had the wrong 's="x"' attribute.
* TODO: think about mixed-mode (sat/cable/terrestrial) operation */
if (frontendType == FE_QPSK && pos != ret->getSatellitePosition())
continue;
/* match +-2MHz to make old ubouquets work with updated satellites.xml */
if (abs((int)ret->getFreqId() - (int)freq) < 3)
return ret;
}
return NULL; return NULL;
} }