mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 10:51:12 +02:00
- movieplayer/glcd: fix compiler warnings
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -393,11 +393,11 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
|
|||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
cGLCD::MirrorOSD(false);
|
cGLCD::MirrorOSD(false);
|
||||||
|
|
||||||
channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
glcd_channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
||||||
|
glcd_epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
||||||
|
|
||||||
epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
|
||||||
cGLCD::ShowLcdIcon(false);
|
cGLCD::ShowLcdIcon(false);
|
||||||
cGLCD::lockChannel(channel, epg, 0);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, 0);
|
||||||
cGLCD::lockDuration("00/00");
|
cGLCD::lockDuration("00/00");
|
||||||
cGLCD::lockStart("00:00");
|
cGLCD::lockStart("00:00");
|
||||||
cGLCD::lockEnd("00:00");
|
cGLCD::lockEnd("00:00");
|
||||||
@@ -522,15 +522,15 @@ void CMoviePlayerGui::updateLcd(bool display_playtime)
|
|||||||
if (CMoviePlayerGui::getInstance().p_movie_info)
|
if (CMoviePlayerGui::getInstance().p_movie_info)
|
||||||
{
|
{
|
||||||
if (!CMoviePlayerGui::getInstance().p_movie_info->channelName.empty())
|
if (!CMoviePlayerGui::getInstance().p_movie_info->channelName.empty())
|
||||||
channel = CMoviePlayerGui::getInstance().p_movie_info->channelName;
|
glcd_channel = CMoviePlayerGui::getInstance().p_movie_info->channelName;
|
||||||
if (!CMoviePlayerGui::getInstance().p_movie_info->epgTitle.empty())
|
if (!CMoviePlayerGui::getInstance().p_movie_info->epgTitle.empty())
|
||||||
epg = CMoviePlayerGui::getInstance().p_movie_info->epgTitle;
|
glcd_epg = CMoviePlayerGui::getInstance().p_movie_info->epgTitle;
|
||||||
} else if (!CMoviePlayerGui::getInstance().GetFile().empty()) {
|
} else if (!CMoviePlayerGui::getInstance().GetFile().empty()) {
|
||||||
epg = CMoviePlayerGui::getInstance().GetFile();
|
glcd_epg = CMoviePlayerGui::getInstance().GetFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel.empty())
|
if (glcd_channel.empty())
|
||||||
channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
glcd_channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
char tmp[20];
|
char tmp[20];
|
||||||
@@ -558,12 +558,11 @@ void CMoviePlayerGui::updateLcd(bool display_playtime)
|
|||||||
case CMoviePlayerGui::STOPPED:
|
case CMoviePlayerGui::STOPPED:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
glcd_channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
||||||
|
glcd_epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
||||||
epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
|
||||||
|
|
||||||
cGLCD::ShowLcdIcon(false);
|
cGLCD::ShowLcdIcon(false);
|
||||||
cGLCD::lockChannel(channel, epg, 0);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, 0);
|
||||||
cGLCD::lockDuration("00/00");
|
cGLCD::lockDuration("00/00");
|
||||||
cGLCD::lockStart("00:00");
|
cGLCD::lockStart("00:00");
|
||||||
cGLCD::lockEnd("00:00");
|
cGLCD::lockEnd("00:00");
|
||||||
@@ -573,11 +572,11 @@ void CMoviePlayerGui::updateLcd(bool display_playtime)
|
|||||||
case CMoviePlayerGui::PAUSE:
|
case CMoviePlayerGui::PAUSE:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, glcd_position);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, glcd_position);
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -597,11 +596,11 @@ void CMoviePlayerGui::updateLcd(bool display_playtime)
|
|||||||
case CMoviePlayerGui::REW:
|
case CMoviePlayerGui::REW:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, glcd_position);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, glcd_position);
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -611,11 +610,11 @@ void CMoviePlayerGui::updateLcd(bool display_playtime)
|
|||||||
case CMoviePlayerGui::FF:
|
case CMoviePlayerGui::FF:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, glcd_position);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, glcd_position);
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -625,11 +624,11 @@ void CMoviePlayerGui::updateLcd(bool display_playtime)
|
|||||||
case CMoviePlayerGui::PLAY:
|
case CMoviePlayerGui::PLAY:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, glcd_position);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, glcd_position);
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1388,12 +1387,11 @@ void CMoviePlayerGui::stopPlayBack(void)
|
|||||||
playback->RequestAbort();
|
playback->RequestAbort();
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
glcd_channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
||||||
|
glcd_epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
||||||
epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
|
||||||
|
|
||||||
cGLCD::ShowLcdIcon(false);
|
cGLCD::ShowLcdIcon(false);
|
||||||
cGLCD::lockChannel(channel, epg, 0);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, 0);
|
||||||
cGLCD::lockDuration("00/00");
|
cGLCD::lockDuration("00/00");
|
||||||
cGLCD::lockStart("00:00");
|
cGLCD::lockStart("00:00");
|
||||||
cGLCD::lockEnd("00:00");
|
cGLCD::lockEnd("00:00");
|
||||||
@@ -1725,8 +1723,10 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
|
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
|
/*
|
||||||
int pos = position / (60 * 1000);
|
int pos = position / (60 * 1000);
|
||||||
int dur = duration / (60 * 1000);
|
int dur = duration / (60 * 1000);
|
||||||
|
*/
|
||||||
|
|
||||||
glcd_duration = to_string(position / (60 * 1000)) + "/" + to_string(duration / (60 * 1000));
|
glcd_duration = to_string(position / (60 * 1000)) + "/" + to_string(duration / (60 * 1000));
|
||||||
//glcd_duration = to_string(pos/10) + to_string(pos%10) + "/" + to_string(dur/10) + to_string(dur%10);
|
//glcd_duration = to_string(pos/10) + to_string(pos%10) + "/" + to_string(dur/10) + to_string(dur%10);
|
||||||
@@ -1734,19 +1734,19 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
time_t sTime = time(NULL);
|
time_t sTime = time(NULL);
|
||||||
sTime -= (position / 1000);
|
sTime -= (position / 1000);
|
||||||
tm_struct = localtime(&sTime);
|
tm_struct = localtime(&sTime);
|
||||||
start = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
glcd_start = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
||||||
|
|
||||||
time_t eTime = time(NULL);
|
time_t eTime = time(NULL);
|
||||||
eTime += (duration / 1000) - (position / 1000);
|
eTime += (duration / 1000) - (position / 1000);
|
||||||
tm_struct = localtime(&eTime);
|
tm_struct = localtime(&eTime);
|
||||||
end = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
glcd_end = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
||||||
|
|
||||||
//glcd_position = duration ? 100 * (position / duration) : 0;
|
//glcd_position = duration ? 100 * (position / duration) : 0;
|
||||||
glcd_position = file_prozent;
|
glcd_position = file_prozent;
|
||||||
cGLCD::lockChannel(channel, epg, glcd_position);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, glcd_position);
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
CVFD::getInstance()->showPercentOver(file_prozent);
|
CVFD::getInstance()->showPercentOver(file_prozent);
|
||||||
@@ -2217,12 +2217,11 @@ void CMoviePlayerGui::PlayFileEnd(bool restore)
|
|||||||
playback->Close();
|
playback->Close();
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (!bgThread) {
|
if (!bgThread) {
|
||||||
channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
glcd_channel = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD);
|
||||||
|
glcd_epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
||||||
epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
|
||||||
|
|
||||||
cGLCD::ShowLcdIcon(false);
|
cGLCD::ShowLcdIcon(false);
|
||||||
cGLCD::lockChannel(channel, epg, 0);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, 0);
|
||||||
cGLCD::lockDuration("00/00");
|
cGLCD::lockDuration("00/00");
|
||||||
cGLCD::lockStart("00:00");
|
cGLCD::lockStart("00:00");
|
||||||
cGLCD::lockEnd("00:00");
|
cGLCD::lockEnd("00:00");
|
||||||
|
@@ -118,11 +118,11 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
struct tm *tm_struct;
|
struct tm *tm_struct;
|
||||||
int glcd_position;
|
int glcd_position;
|
||||||
std::string channel;
|
std::string glcd_channel;
|
||||||
std::string epg;
|
std::string glcd_epg;
|
||||||
std::string glcd_duration;
|
std::string glcd_duration;
|
||||||
std::string start;
|
std::string glcd_start;
|
||||||
std::string end;
|
std::string glcd_end;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string file_name;
|
std::string file_name;
|
||||||
|
Reference in New Issue
Block a user