mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
reduce globales, show epginfo in timeshift
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1070 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -53,6 +53,7 @@
|
|||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
#include <gui/customcolor.h>
|
#include <gui/customcolor.h>
|
||||||
#include <gui/pictureviewer.h>
|
#include <gui/pictureviewer.h>
|
||||||
|
#include <gui/movieplayer.h>
|
||||||
|
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -86,12 +87,10 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b)
|
|||||||
return a.startTime < b.startTime;
|
return a.startTime < b.startTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int timeshift;
|
|
||||||
extern bool autoshift;
|
extern bool autoshift;
|
||||||
extern uint32_t shift_timer;
|
extern uint32_t shift_timer;
|
||||||
extern std::string ext_channel_name;
|
extern std::string ext_channel_name;
|
||||||
extern bool timeset;
|
extern bool timeset;
|
||||||
extern unsigned char file_prozent;
|
|
||||||
|
|
||||||
CInfoViewer::CInfoViewer ()
|
CInfoViewer::CInfoViewer ()
|
||||||
{
|
{
|
||||||
@@ -519,13 +518,12 @@ void CInfoViewer::showMovieTitle(const int playState, const std::string Channel,
|
|||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(ChanNameX + 10 , ChanNameY + time_height,BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 ,ChannelName, COL_INFOBAR, 0, true); // UTF-8
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(ChanNameX + 10 , ChanNameY + time_height,BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 ,ChannelName, COL_INFOBAR, 0, true); // UTF-8
|
||||||
|
|
||||||
// show_Data
|
// show_Data
|
||||||
char runningPercent = file_prozent;
|
if (CMoviePlayerGui::getInstance().file_prozent > 100)
|
||||||
if (runningPercent > 100)
|
CMoviePlayerGui::getInstance().file_prozent = 100;
|
||||||
runningPercent = 100;
|
|
||||||
|
|
||||||
char runningRest[32]; // %d can be 10 digits max...
|
char runningRest[32]; // %d can be 10 digits max...
|
||||||
sprintf(runningRest, "%d / %d min", (curr_pos + 30000) / 60000, (duration + 30000) / 60000);
|
sprintf(runningRest, "%d / %d min", (curr_pos + 30000) / 60000, (duration + 30000) / 60000);
|
||||||
display_Info(g_file_epg.c_str(), g_file_epg1.c_str(), true, false, runningPercent, NULL, runningRest);
|
display_Info(g_file_epg.c_str(), g_file_epg1.c_str(), true, false, CMoviePlayerGui::getInstance().file_prozent, NULL, runningRest);
|
||||||
|
|
||||||
const char *playicon = NULL;
|
const char *playicon = NULL;
|
||||||
switch (playState) {
|
switch (playState) {
|
||||||
@@ -791,7 +789,7 @@ void CInfoViewer::loop(int fadeValue, bool show_dot ,bool fadeIn)
|
|||||||
} else {
|
} else {
|
||||||
#if 0
|
#if 0
|
||||||
if ((msg != CRCInput::RC_timeout) && (msg != CRCInput::RC_ok))
|
if ((msg != CRCInput::RC_timeout) && (msg != CRCInput::RC_ok))
|
||||||
if (!fileplay && !timeshift)
|
if (!fileplay && !CMoviePlayerGui::getInstance().timeshift)
|
||||||
g_RCInput->postMsg (msg, data);
|
g_RCInput->postMsg (msg, data);
|
||||||
#endif
|
#endif
|
||||||
res = messages_return::cancel_info;
|
res = messages_return::cancel_info;
|
||||||
@@ -808,7 +806,7 @@ void CInfoViewer::loop(int fadeValue, bool show_dot ,bool fadeIn)
|
|||||||
virtual_zap_mode = true;
|
virtual_zap_mode = true;
|
||||||
res = messages_return::cancel_all;
|
res = messages_return::cancel_all;
|
||||||
hideIt = true;
|
hideIt = true;
|
||||||
} else if (!fileplay && !timeshift) {
|
} else if (!fileplay && !CMoviePlayerGui::getInstance().timeshift) {
|
||||||
CNeutrinoApp *neutrino = CNeutrinoApp::getInstance ();
|
CNeutrinoApp *neutrino = CNeutrinoApp::getInstance ();
|
||||||
if ((msg == (neutrino_msg_t) g_settings.key_quickzap_up) || (msg == (neutrino_msg_t) g_settings.key_quickzap_down) || (msg == CRCInput::RC_0) || (msg == NeutrinoMessages::SHOW_INFOBAR)) {
|
if ((msg == (neutrino_msg_t) g_settings.key_quickzap_up) || (msg == (neutrino_msg_t) g_settings.key_quickzap_down) || (msg == CRCInput::RC_0) || (msg == NeutrinoMessages::SHOW_INFOBAR)) {
|
||||||
hideIt = false;
|
hideIt = false;
|
||||||
@@ -834,7 +832,7 @@ void CInfoViewer::loop(int fadeValue, bool show_dot ,bool fadeIn)
|
|||||||
res = messages_return::cancel_info;
|
res = messages_return::cancel_info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (fileplay && !timeshift && ( (msg == (neutrino_msg_t) g_settings.mpkey_pause) || (msg == (neutrino_msg_t) g_settings.mpkey_rewind) || (msg == (neutrino_msg_t) g_settings.mpkey_play) || (msg == (neutrino_msg_t) g_settings.mpkey_forward) || (msg == (neutrino_msg_t) g_settings.mpkey_stop)) ) {
|
} else if (fileplay && !CMoviePlayerGui::getInstance().timeshift && ( (msg == (neutrino_msg_t) g_settings.mpkey_pause) || (msg == (neutrino_msg_t) g_settings.mpkey_rewind) || (msg == (neutrino_msg_t) g_settings.mpkey_play) || (msg == (neutrino_msg_t) g_settings.mpkey_forward) || (msg == (neutrino_msg_t) g_settings.mpkey_stop)) ) {
|
||||||
g_RCInput->postMsg (msg, data);
|
g_RCInput->postMsg (msg, data);
|
||||||
res = messages_return::cancel_info;
|
res = messages_return::cancel_info;
|
||||||
}
|
}
|
||||||
@@ -1875,7 +1873,7 @@ void CInfoViewer::showLcdPercentOver ()
|
|||||||
{
|
{
|
||||||
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) {
|
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) {
|
||||||
if (fileplay || (NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode())) {
|
if (fileplay || (NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode())) {
|
||||||
CVFD::getInstance ()->showPercentOver (file_prozent);
|
CVFD::getInstance ()->showPercentOver (CMoviePlayerGui::getInstance().file_prozent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int runningPercent = -1;
|
int runningPercent = -1;
|
||||||
|
@@ -110,11 +110,6 @@ static unsigned short g_vtype = 0;
|
|||||||
static std::string g_language[REC_MAX_APIDS];
|
static std::string g_language[REC_MAX_APIDS];
|
||||||
static unsigned short g_currentapid = 0, g_currentac3 = 0, apidchanged = 0;
|
static unsigned short g_currentapid = 0, g_currentac3 = 0, apidchanged = 0;
|
||||||
|
|
||||||
std::string g_file_epg;
|
|
||||||
std::string g_file_epg1;
|
|
||||||
int file_prozent;
|
|
||||||
int timeshift;
|
|
||||||
|
|
||||||
bool get_movie_info_apid_name(int apid, MI_MOVIE_INFO * movie_info, std::string * apidtitle)
|
bool get_movie_info_apid_name(int apid, MI_MOVIE_INFO * movie_info, std::string * apidtitle)
|
||||||
{
|
{
|
||||||
if (movie_info == NULL || apidtitle == NULL)
|
if (movie_info == NULL || apidtitle == NULL)
|
||||||
@@ -1250,6 +1245,20 @@ void CMoviePlayerGui::PlayFile(void)
|
|||||||
} else if ( msg == NeutrinoMessages::ANNOUNCE_RECORD ||
|
} else if ( msg == NeutrinoMessages::ANNOUNCE_RECORD ||
|
||||||
msg == NeutrinoMessages::RECORD_START) {
|
msg == NeutrinoMessages::RECORD_START) {
|
||||||
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
||||||
|
} else if (timeshift && msg == NeutrinoMessages::SHOW_EPG ) {
|
||||||
|
bool restore = FileTime.IsVisible();
|
||||||
|
FileTime.hide();
|
||||||
|
if (g_settings.mode_clock)
|
||||||
|
InfoClock->StopClock();
|
||||||
|
|
||||||
|
g_EpgData->show(CNeutrinoApp::getInstance()->channelList->getActiveChannel_ChannelID());
|
||||||
|
|
||||||
|
if(restore) {
|
||||||
|
FileTime.show(position / 1000);
|
||||||
|
FileTime.updatePos(file_prozent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} else if ( msg == NeutrinoMessages::ZAPTO ||
|
} else if ( msg == NeutrinoMessages::ZAPTO ||
|
||||||
msg == NeutrinoMessages::STANDBY_ON ||
|
msg == NeutrinoMessages::STANDBY_ON ||
|
||||||
msg == NeutrinoMessages::SHUTDOWN ||
|
msg == NeutrinoMessages::SHUTDOWN ||
|
||||||
|
@@ -92,6 +92,8 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
std::string Path_local;
|
std::string Path_local;
|
||||||
std::string Path_vlc;
|
std::string Path_vlc;
|
||||||
std::string Path_vlc_settings;
|
std::string Path_vlc_settings;
|
||||||
|
std::string g_file_epg;
|
||||||
|
std::string g_file_epg1;
|
||||||
|
|
||||||
CFileBrowser * filebrowser;
|
CFileBrowser * filebrowser;
|
||||||
CMovieBrowser* moviebrowser;
|
CMovieBrowser* moviebrowser;
|
||||||
@@ -125,6 +127,8 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
void updateLcd(const std::string & sel_filename);
|
void updateLcd(const std::string & sel_filename);
|
||||||
bool Playing();
|
bool Playing();
|
||||||
|
int timeshift;
|
||||||
|
int file_prozent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user