frontend: add a "frontend index", set by femanager

this allows to easily find the "first" or "second" tuner, which
fixes the tuner number display in the infobar


Origin commit data
------------------
Branch: ni/coolstream
Commit: 2e84a632f5
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-02-24 (Sun, 24 Feb 2013)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-02-24 15:25:36 +01:00
parent 453f07a04b
commit f5816d4cdc
2 changed files with 9 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
* (C) 2002-2003 Andreas Oberritter <obi@tuxbox.org>
*
* Copyright (C) 2011 CoolStream International Ltd
* Copyright (C) 2009,2010,2012,2013 Stefan Seyfried
*
* 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
@@ -122,6 +123,7 @@ class CFrontend
TP_params currentTransponder;
bool slave;
int fenumber;
int feindex; /* the index (starts with 0) of this FE, not always the same as fenumber */
bool standby;
bool buildProperties(const FrontendParameters*, struct dtv_properties &);
@@ -226,7 +228,10 @@ class CFrontend
bool Locked() { return usecount; };
satellite_map_t & getSatellites() { return satellites; }
void setSatellites(satellite_map_t satmap) { satellites = satmap; }
int getNumber() { return fenumber; };
/* getNumber is now only used for displaying the tuner ID in the infobar,
* which wants the index. If the fenumber is needed, call "getNumber(true)" */
int getNumber(bool real = false) { return real?fenumber:feindex; }
void setIndex(int i) { feindex = i; };
static void getDelSys(uint8_t type, int f, int m, char * &fec, char * &sys, char * &mod);
};
#endif /* __zapit_frontend_h__ */

View File

@@ -2,7 +2,7 @@
Neutrino-GUI - DBoxII-Project
Copyright (C) 2011 CoolStream International Ltd
Copyright (C) 2012 Stefan Seyfried
Copyright (C) 2012,2013 Stefan Seyfried
License: GPLv2
@@ -59,6 +59,7 @@ bool CFEManager::Init()
CFrontend * fe;
unsigned short fekey;
int idx = 0;
other_fe.clear();
for(int i = 0; i < MAX_ADAPTERS; i++) {
for(int j = 0; j < MAX_FE; j++) {
@@ -72,6 +73,7 @@ bool CFEManager::Init()
INFO("add fe %d", fe->fenumber);
if(livefe == NULL)
livefe = fe;
fe->setIndex(idx++);
} else {
/* neutrino can not yet handle differing mixed frontend types... */
INFO("not adding fe %d of different type", fe->fenumber);