mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
Movieplayer cleanup: remove unused, split huge PlayFile to functions, fix MB jumps, etc. Please test.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1977 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -913,9 +913,12 @@ void CInfoViewer::loop(bool show_dot)
|
||||
res = CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
||||
|
||||
}
|
||||
#if 0
|
||||
else if (CMoviePlayerGui::getInstance().start_timeshift && (msg == NeutrinoMessages::EVT_TIMER)) {
|
||||
CMoviePlayerGui::getInstance().start_timeshift = false;
|
||||
} else if (CMoviePlayerGui::getInstance().timeshift && ((msg == (neutrino_msg_t) g_settings.mpkey_rewind) || \
|
||||
}
|
||||
#endif
|
||||
else if (CMoviePlayerGui::getInstance().timeshift && ((msg == (neutrino_msg_t) g_settings.mpkey_rewind) || \
|
||||
(msg == (neutrino_msg_t) g_settings.mpkey_forward) || \
|
||||
(msg == (neutrino_msg_t) g_settings.mpkey_pause) || \
|
||||
(msg == (neutrino_msg_t) g_settings.mpkey_stop) || \
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -66,35 +66,40 @@ class CMoviePlayerGui : public CMenuTarget
|
||||
private:
|
||||
CFrameBuffer * frameBuffer;
|
||||
int m_LastMode;
|
||||
const char *filename;
|
||||
bool stopped;
|
||||
CMoviePlayerGui::state playstate;
|
||||
bool isBookmark;
|
||||
bool isMovieBrowser;
|
||||
int speed;
|
||||
off64_t fullposition;
|
||||
int startposition;
|
||||
int jumpseconds;
|
||||
bool showaudioselectdialog;
|
||||
off64_t minuteoffset;
|
||||
off64_t secondoffset;
|
||||
std::string startfilename;
|
||||
|
||||
std::string Path_local;
|
||||
static unsigned short g_numpida;
|
||||
static unsigned short g_vtype;
|
||||
static unsigned short g_vpid;
|
||||
static std::string g_language[REC_MAX_APIDS];
|
||||
std::string full_name;
|
||||
std::string file_name;
|
||||
|
||||
bool playing;
|
||||
CMoviePlayerGui::state playstate;
|
||||
int speed;
|
||||
int startposition;
|
||||
|
||||
unsigned short numpida;
|
||||
unsigned short vpid;
|
||||
unsigned short vtype;
|
||||
std::string language[REC_MAX_APIDS];
|
||||
unsigned short apids[REC_MAX_APIDS];
|
||||
unsigned short ac3flags[REC_MAX_APIDS];
|
||||
unsigned short currentapid, currentac3;
|
||||
|
||||
/* playback from MB */
|
||||
bool isMovieBrowser;
|
||||
CMovieBrowser* moviebrowser;
|
||||
MI_MOVIE_INFO * p_movie_info;
|
||||
const static short MOVIE_HINT_BOX_TIMER = 5; // time to show bookmark hints in seconds
|
||||
|
||||
/* playback from file */
|
||||
bool is_file_player;
|
||||
CFileBrowser * filebrowser;
|
||||
CMovieBrowser* moviebrowser;
|
||||
|
||||
CBookmarkManager * bookmarkmanager;
|
||||
|
||||
CFileFilter tsfilefilter;
|
||||
std::string Path_local;
|
||||
|
||||
static cPlayback *playback;
|
||||
/* playback from bookmark */
|
||||
CBookmarkManager * bookmarkmanager;
|
||||
bool isBookmark;
|
||||
|
||||
cPlayback *playback;
|
||||
static CMoviePlayerGui* instance_mp;
|
||||
|
||||
void Init(void);
|
||||
@@ -103,35 +108,27 @@ class CMoviePlayerGui : public CMenuTarget
|
||||
void restoreNeutrino();
|
||||
|
||||
void showHelpTS(void);
|
||||
void showHelpVLC(void);
|
||||
void callInfoViewer(MI_MOVIE_INFO * p_movie_info, const int duration, const int pos);
|
||||
void fillPids(MI_MOVIE_INFO * p_movie_info);
|
||||
void callInfoViewer(const int duration, const int pos);
|
||||
void fillPids();
|
||||
bool getAudioName(int pid, std::string &apidtitle);
|
||||
void selectAudioPid(bool file_player);
|
||||
|
||||
void handleMovieBrowser(neutrino_msg_t msg, int position = 0);
|
||||
bool SelectFile();
|
||||
void updateLcd();
|
||||
|
||||
CMoviePlayerGui(const CMoviePlayerGui&) {};
|
||||
CMoviePlayerGui();
|
||||
|
||||
public:
|
||||
CMoviePlayerGui();
|
||||
~CMoviePlayerGui();
|
||||
|
||||
static CMoviePlayerGui& getInstance();
|
||||
static void Delete();
|
||||
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
void updateLcd(const std::string & sel_filename);
|
||||
bool Playing();
|
||||
bool Playing() { return playing; };
|
||||
int timeshift;
|
||||
bool start_timeshift;
|
||||
int file_prozent;
|
||||
};
|
||||
|
||||
|
||||
class CAPIDSelectExec : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
static unsigned short g_apids[REC_MAX_APIDS];
|
||||
static unsigned short g_ac3flags[REC_MAX_APIDS];
|
||||
static unsigned short g_currentapid, g_currentac3, apidchanged;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -3771,11 +3771,11 @@ void stop_daemons(bool stopall)
|
||||
g_Zapit->shutdown();
|
||||
pthread_join(zapit_thread, NULL);
|
||||
#endif
|
||||
delete &CMoviePlayerGui::getInstance();
|
||||
CZapit::getInstance()->Stop();
|
||||
printf("zapit shutdown done\n");
|
||||
CVFD::getInstance()->Clear();
|
||||
if(stopall) {
|
||||
CMoviePlayerGui::Delete(); //remove instance
|
||||
if (cpuFreq)
|
||||
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
||||
if (powerManager) {
|
||||
|
Reference in New Issue
Block a user