From 772461a733cf0a72b53ffe7b809cba9ac5f8bb18 Mon Sep 17 00:00:00 2001 From: satbaby Date: Wed, 6 Oct 2010 11:05:38 +0000 Subject: [PATCH] -show infoviewer with rc pause,play,forward,rewind in movieplayer git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@821 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/infoviewer.cpp | 7 +++-- src/gui/movieplayer.cpp | 62 ++++++++++++++++++++++++----------------- src/gui/movieplayer.h | 2 +- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 73e7737e1..23f09266f 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -826,6 +826,9 @@ void CInfoViewer::loop(int fadeValue, bool show_dot ,bool fadeIn) 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)) ) { + g_RCInput->postMsg (msg, data); + res = messages_return::cancel_info; } } @@ -1994,8 +1997,8 @@ void CInfoViewer::showIcon_CA_Status (int notfirst) return; } - char * white = (char *) "white"; - char * yellow = (char *) "yellow"; + const char * white = (char *) "white"; + const char * yellow = (char *) "yellow"; static int icon_space_offset = 0; bool paintIconFlag = false; diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index ed696be51..775de6bf8 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -943,6 +943,8 @@ void CMoviePlayerGui::PlayFile(void) playstate = CMoviePlayerGui::PLAY; speed = 1; playback->SetSpeed(speed); + if (!timeshift) + callInfoViewer(p_movie_info->epgTitle, p_movie_info->epgInfo1, p_movie_info->epgChannel ); } else if (!timeshift) { open_filebrowser = true; } @@ -959,11 +961,16 @@ void CMoviePlayerGui::PlayFile(void) //CVFD::getInstance()->ShowIcon(VFD_ICON_PAUSE, false); speed = 1; playback->SetSpeed(speed); + if (!timeshift ) + callInfoViewer(p_movie_info->epgTitle, p_movie_info->epgInfo1, p_movie_info->epgChannel ); } else { playstate = CMoviePlayerGui::PAUSE; //CVFD::getInstance()->ShowIcon(VFD_ICON_PAUSE, true); speed = 0; playback->SetSpeed(speed); + if (!timeshift) + callInfoViewer(p_movie_info->epgTitle, p_movie_info->epgInfo1, p_movie_info->epgChannel ); + } } else if (msg == (neutrino_msg_t) g_settings.mpkey_bookmark) { // is there already a bookmark activity? @@ -1093,6 +1100,10 @@ void CMoviePlayerGui::PlayFile(void) playback->SetSpeed(speed); playstate = CMoviePlayerGui::REW; update_lcd = true; + + if (!timeshift) + callInfoViewer(p_movie_info->epgTitle, p_movie_info->epgInfo1, p_movie_info->epgChannel ); + if (!FileTime.IsVisible()) { if (g_settings.mode_clock) InfoClock->StartClock(); @@ -1112,6 +1123,9 @@ void CMoviePlayerGui::PlayFile(void) update_lcd = true; playstate = CMoviePlayerGui::FF; + if (!timeshift) + callInfoViewer(p_movie_info->epgTitle, p_movie_info->epgInfo1, p_movie_info->epgChannel ); + if (!FileTime.IsVisible()) { if (g_settings.mode_clock) InfoClock->StartClock(); @@ -1125,30 +1139,7 @@ void CMoviePlayerGui::PlayFile(void) g_InfoViewer->showTitle(CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber(), CNeutrinoApp::getInstance()->channelList->getActiveChannelName(), CNeutrinoApp::getInstance()->channelList->getActiveSatellitePosition(), CNeutrinoApp::getInstance()->channelList->getActiveChannel_ChannelID()); // UTF-8 else { - if (isMovieBrowser) { - g_file_epg = p_movie_info->epgTitle; - g_file_epg1 = p_movie_info->epgInfo1; - //g_InfoViewer->showTitle(0, p_movie_info->epgChannel.c_str(), 0, 0); // UTF-8 - g_InfoViewer->showMovieTitle(playstate, p_movie_info->epgChannel.c_str(), g_file_epg, g_file_epg1); - } else { - char temp_name[255]; - const char *slash = strrchr(filename, '/'); - if (slash) { - slash++; - int len = strlen(slash); - for (int i = 0; i < len; i++) { - if (slash[i] == '_') - temp_name[i] = ' '; - else - temp_name[i] = slash[i]; - } - temp_name[len] = 0; - } - g_file_epg = ""; - g_file_epg1 = ""; -// g_InfoViewer->showTitle(0, temp_name, 0, 0); // UTF-8 - g_InfoViewer->showMovieTitle(playstate, temp_name, g_file_epg, g_file_epg1); // UTF-8 - } + callInfoViewer(p_movie_info->epgTitle, p_movie_info->epgInfo1, p_movie_info->epgChannel ); CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8); update_lcd = true; //showHelpTS(); @@ -1276,7 +1267,28 @@ printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %x\n", i if (g_settings.mode_clock) InfoClock->StartClock(); } - +void CMoviePlayerGui::callInfoViewer(const std::string & epg_title, const std::string & epg_info1, const std::string & epg_channel ) +{ + if (isMovieBrowser) { + g_InfoViewer->showMovieTitle(playstate, epg_channel.c_str(), epg_title, epg_info1); + } else { + char temp_name[255]; + const char *slash = strrchr(filename, '/'); + if (slash) { + slash++; + int len = strlen(slash); + for (int i = 0; i < len; i++) { + if (slash[i] == '_') + temp_name[i] = ' '; + else + temp_name[i] = slash[i]; + } + temp_name[len] = 0; + } + // g_InfoViewer->showTitle(0, temp_name, 0, 0); // UTF-8 + g_InfoViewer->showMovieTitle(playstate, temp_name, "", ""); // UTF-8 + } +} void CMoviePlayerGui::showHelpTS() { Helpbox helpbox; diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index a203bdce7..06431b2c7 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -109,7 +109,7 @@ class CMoviePlayerGui : public CMenuTarget CFileFilter vlcfilefilter; void showHelpTS(void); void showHelpVLC(void); - + void callInfoViewer(const std::string & epg_title, const std::string & epg_info1, const std::string & epg_channel ); public: CMoviePlayerGui(); ~CMoviePlayerGui();