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);
|
res = CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
else if (CMoviePlayerGui::getInstance().start_timeshift && (msg == NeutrinoMessages::EVT_TIMER)) {
|
else if (CMoviePlayerGui::getInstance().start_timeshift && (msg == NeutrinoMessages::EVT_TIMER)) {
|
||||||
CMoviePlayerGui::getInstance().start_timeshift = false;
|
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_forward) || \
|
||||||
(msg == (neutrino_msg_t) g_settings.mpkey_pause) || \
|
(msg == (neutrino_msg_t) g_settings.mpkey_pause) || \
|
||||||
(msg == (neutrino_msg_t) g_settings.mpkey_stop) || \
|
(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:
|
private:
|
||||||
CFrameBuffer * frameBuffer;
|
CFrameBuffer * frameBuffer;
|
||||||
int m_LastMode;
|
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;
|
std::string full_name;
|
||||||
static unsigned short g_numpida;
|
std::string file_name;
|
||||||
static unsigned short g_vtype;
|
|
||||||
static unsigned short g_vpid;
|
bool playing;
|
||||||
static std::string g_language[REC_MAX_APIDS];
|
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
|
const static short MOVIE_HINT_BOX_TIMER = 5; // time to show bookmark hints in seconds
|
||||||
|
|
||||||
|
/* playback from file */
|
||||||
|
bool is_file_player;
|
||||||
CFileBrowser * filebrowser;
|
CFileBrowser * filebrowser;
|
||||||
CMovieBrowser* moviebrowser;
|
|
||||||
|
|
||||||
CBookmarkManager * bookmarkmanager;
|
|
||||||
|
|
||||||
CFileFilter tsfilefilter;
|
CFileFilter tsfilefilter;
|
||||||
|
std::string Path_local;
|
||||||
|
|
||||||
static cPlayback *playback;
|
/* playback from bookmark */
|
||||||
|
CBookmarkManager * bookmarkmanager;
|
||||||
|
bool isBookmark;
|
||||||
|
|
||||||
|
cPlayback *playback;
|
||||||
static CMoviePlayerGui* instance_mp;
|
static CMoviePlayerGui* instance_mp;
|
||||||
|
|
||||||
void Init(void);
|
void Init(void);
|
||||||
@@ -103,35 +108,27 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
void restoreNeutrino();
|
void restoreNeutrino();
|
||||||
|
|
||||||
void showHelpTS(void);
|
void showHelpTS(void);
|
||||||
void showHelpVLC(void);
|
void callInfoViewer(const int duration, const int pos);
|
||||||
void callInfoViewer(MI_MOVIE_INFO * p_movie_info, const int duration, const int pos);
|
void fillPids();
|
||||||
void fillPids(MI_MOVIE_INFO * p_movie_info);
|
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(const CMoviePlayerGui&) {};
|
||||||
|
CMoviePlayerGui();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMoviePlayerGui();
|
|
||||||
~CMoviePlayerGui();
|
~CMoviePlayerGui();
|
||||||
|
|
||||||
static CMoviePlayerGui& getInstance();
|
static CMoviePlayerGui& getInstance();
|
||||||
static void Delete();
|
|
||||||
|
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
void updateLcd(const std::string & sel_filename);
|
bool Playing() { return playing; };
|
||||||
bool Playing();
|
|
||||||
int timeshift;
|
int timeshift;
|
||||||
bool start_timeshift;
|
|
||||||
int file_prozent;
|
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
|
#endif
|
||||||
|
@@ -3771,11 +3771,11 @@ void stop_daemons(bool stopall)
|
|||||||
g_Zapit->shutdown();
|
g_Zapit->shutdown();
|
||||||
pthread_join(zapit_thread, NULL);
|
pthread_join(zapit_thread, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
delete &CMoviePlayerGui::getInstance();
|
||||||
CZapit::getInstance()->Stop();
|
CZapit::getInstance()->Stop();
|
||||||
printf("zapit shutdown done\n");
|
printf("zapit shutdown done\n");
|
||||||
CVFD::getInstance()->Clear();
|
CVFD::getInstance()->Clear();
|
||||||
if(stopall) {
|
if(stopall) {
|
||||||
CMoviePlayerGui::Delete(); //remove instance
|
|
||||||
if (cpuFreq)
|
if (cpuFreq)
|
||||||
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
||||||
if (powerManager) {
|
if (powerManager) {
|
||||||
|
Reference in New Issue
Block a user