lcd4l: use global Neutrinomodes instead of own enum

Origin commit data
------------------
Commit: e17aeb43eb
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-12-01 (Fri, 01 Dec 2017)

Origin message was:
------------------
- lcd4l: use global Neutrinomodes instead of own enum
This commit is contained in:
vanhofen
2017-12-01 15:24:50 +01:00
parent 03f13be48b
commit 91b7b2f7ee
2 changed files with 13 additions and 30 deletions

View File

@@ -270,7 +270,7 @@ void* CLCD4l::LCD4lProc(void* arg)
{
usleep(5 * 100 * 1000); // 0.5 sec
NewParseID = PLCD4l->CompareParseID(p_ParseID);
if (NewParseID || p_ParseID == MODE_AUDIO)
if (NewParseID || p_ParseID == NeutrinoModes::mode_audio)
break;
}
@@ -528,7 +528,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
/* ----------------------------------------------------------------- */
if (newID || parseID == MODE_AUDIO || parseID == MODE_TS)
if (newID || parseID == NeutrinoModes::mode_audio || parseID == NeutrinoModes::mode_ts)
{
std::string Service = "";
int ChannelNr = 0;
@@ -548,7 +548,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
ChannelNr = CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber();
}
else if (parseID == MODE_AUDIO)
else if (parseID == NeutrinoModes::mode_audio)
{
const CAudioMetaData meta = CAudioPlayer::getInstance()->getMetaData();
if ( (!meta.sc_station.empty()) && (CAudioPlayer::getInstance()->getState() != CBaseDec::STOP))
@@ -576,11 +576,11 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
}
}
}
else if (parseID == MODE_PIC)
else if (parseID == NeutrinoModes::mode_pic)
{
Service = g_Locale->getText(LOCALE_PICTUREVIEWER_HEAD);
}
else if (parseID == MODE_TS)
else if (parseID == NeutrinoModes::mode_ts)
{
if (ModeTshift)
Service = g_Locale->getText(LOCALE_RECORDINGMENU_TIMESHIFT);
@@ -619,11 +619,11 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT;
}
}
else if (parseID == MODE_UPNP)
else if (parseID == NeutrinoModes::mode_upnp)
{
Service = g_Locale->getText(LOCALE_UPNPBROWSER_HEAD);
}
else if (parseID == MODE_STANDBY)
else if (parseID == NeutrinoModes::mode_standby)
{
Service = "STANDBY";
ModeStandby = 1;
@@ -667,7 +667,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
Layout = "standby";
}
#ifdef NI
else if ((g_settings.lcd4l_skin_radio) && (m_Mode == MODE_RADIO))
else if ((g_settings.lcd4l_skin_radio) && (m_Mode == NeutrinoModes::mode_radio))
{
Layout = "radio";
}
@@ -783,7 +783,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
snprintf(End, sizeof(End), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
}
}
else if (parseID == MODE_AUDIO)
else if (parseID == NeutrinoModes::mode_audio)
{
if (CAudioPlayer::getInstance()->getState() == CBaseDec::STOP)
{
@@ -822,12 +822,12 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
snprintf(Start, sizeof(Start), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
}
#if 0
else if (parseID == MODE_PIC)
else if (parseID == NeutrinoModes::mode_pic)
{
// TODO: Event = Bildname
}
#endif
else if (parseID == MODE_TS)
else if (parseID == NeutrinoModes::mode_ts)
{
if (CMoviePlayerGui::getInstance().p_movie_info)
{
@@ -867,7 +867,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
snprintf(End, sizeof(End), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
}
#if 0
else if (parseID == MODE_UPNP)
else if (parseID == NeutrinoModes::mode_upnp)
{
// TODO?
}
@@ -961,7 +961,7 @@ uint64_t CLCD4l::GetParseID()
m_Mode = (int) ID;
m_ModeChannel = 0;
if (ID == MODE_TV || ID == MODE_WEBTV || ID == MODE_RADIO)
if (ID == NeutrinoModes::mode_tv || ID == NeutrinoModes::mode_webtv || ID == NeutrinoModes::mode_radio)
{
if (!(g_RemoteControl->subChannels.empty()) && (g_RemoteControl->selected_subchannel > 0))
m_ModeChannel = 2;

View File

@@ -51,23 +51,6 @@ class CLCD4l
int RemoveFile(const char *file);
private:
enum
{
MODE_UNKNOWN = -1,
MODE_TV = 1,
MODE_RADIO = 2,
MODE_SCART = 3,
MODE_STANDBY = 4,
MODE_AUDIO = 5,
MODE_PIC = 6,
MODE_TS = 7,
MODE_OFF = 8,
MODE_WEBTV = 9,
MODE_UPNP = 10,
MODE_MASK = 0xFF,
NOREZAP = 0x100
};
pthread_t thrLCD4l;
static void* LCD4lProc(void *arg);