mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
- movieplayer: align some variables names to tango's names
Conflicts: src/gui/infoviewer.cpp src/gui/movieplayer.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -929,7 +929,7 @@ bool CFileBrowser::exec(const char * const dirname)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CFileBrowser::playlist_manager(CFileList &playlist, unsigned int playing, bool is_audio_player)
|
bool CFileBrowser::playlist_manager(CFileList &playlist, unsigned int playing, bool is_audio_playing)
|
||||||
{
|
{
|
||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
neutrino_msg_data_t data;
|
neutrino_msg_data_t data;
|
||||||
@@ -1066,7 +1066,7 @@ bool CFileBrowser::playlist_manager(CFileList &playlist, unsigned int playing, b
|
|||||||
addfiles->Hide_records = true;
|
addfiles->Hide_records = true;
|
||||||
addfiles->Multi_Select = true;
|
addfiles->Multi_Select = true;
|
||||||
addfiles->Dirs_Selectable = true;
|
addfiles->Dirs_Selectable = true;
|
||||||
addfiles->exec(is_audio_player ? g_settings.network_nfs_audioplayerdir.c_str() : g_settings.network_nfs_moviedir.c_str());
|
addfiles->exec(is_audio_playing ? g_settings.network_nfs_audioplayerdir.c_str() : g_settings.network_nfs_moviedir.c_str());
|
||||||
CFileList tmplist = addfiles->getSelectedFiles();
|
CFileList tmplist = addfiles->getSelectedFiles();
|
||||||
filelist.insert( filelist.end(), tmplist.begin(), tmplist.end() );
|
filelist.insert( filelist.end(), tmplist.begin(), tmplist.end() );
|
||||||
tmplist.clear();
|
tmplist.clear();
|
||||||
|
@@ -222,7 +222,7 @@ class CFileBrowser
|
|||||||
~CFileBrowser();
|
~CFileBrowser();
|
||||||
|
|
||||||
bool exec(const char * const dirname);
|
bool exec(const char * const dirname);
|
||||||
bool playlist_manager(CFileList &playlist, unsigned int playing, bool is_audio_player = false);
|
bool playlist_manager(CFileList &playlist, unsigned int playing, bool is_audio_playing = false);
|
||||||
CFile *getSelectedFile();
|
CFile *getSelectedFile();
|
||||||
|
|
||||||
inline const CFileList & getSelectedFiles(void) const
|
inline const CFileList & getSelectedFiles(void) const
|
||||||
|
@@ -925,7 +925,7 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext)
|
|||||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] + timeout_ext);
|
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] + timeout_ext);
|
||||||
break;
|
break;
|
||||||
case NeutrinoModes::mode_ts:
|
case NeutrinoModes::mode_ts:
|
||||||
if (CMoviePlayerGui::getInstance().IsAudioPlayer())
|
if (CMoviePlayerGui::getInstance().IsAudioPlaying())
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MEDIA_AUDIO] + timeout_ext);
|
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MEDIA_AUDIO] + timeout_ext);
|
||||||
else
|
else
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MEDIA_VIDEO] + timeout_ext);
|
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MEDIA_VIDEO] + timeout_ext);
|
||||||
|
@@ -164,6 +164,7 @@ void CMoviePlayerGui::Init(void)
|
|||||||
stopped = true;
|
stopped = true;
|
||||||
currentVideoSystem = -1;
|
currentVideoSystem = -1;
|
||||||
currentOsdResolution = 0;
|
currentOsdResolution = 0;
|
||||||
|
is_audio_playing = false;
|
||||||
|
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
|
|
||||||
@@ -410,13 +411,13 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
|
|||||||
isYT = true;
|
isYT = true;
|
||||||
}
|
}
|
||||||
else if (actionKey == "fileplayback_video") {
|
else if (actionKey == "fileplayback_video") {
|
||||||
is_audio_player = false;
|
is_audio_playing = false;
|
||||||
if (filebrowser)
|
if (filebrowser)
|
||||||
filebrowser->Filter = &filefilter_video;
|
filebrowser->Filter = &filefilter_video;
|
||||||
//wakeup_hdd(g_settings.network_nfs_moviedir.c_str());
|
//wakeup_hdd(g_settings.network_nfs_moviedir.c_str());
|
||||||
}
|
}
|
||||||
else if (actionKey == "fileplayback_audio") {
|
else if (actionKey == "fileplayback_audio") {
|
||||||
is_audio_player = true;
|
is_audio_playing = true;
|
||||||
if (filebrowser)
|
if (filebrowser)
|
||||||
filebrowser->Filter = &filefilter_audio;
|
filebrowser->Filter = &filefilter_audio;
|
||||||
//wakeup_hdd(g_settings.network_nfs_audioplayerdir.c_str());
|
//wakeup_hdd(g_settings.network_nfs_audioplayerdir.c_str());
|
||||||
@@ -590,7 +591,7 @@ void CMoviePlayerGui::ClearFlags()
|
|||||||
isWebChannel = false;
|
isWebChannel = false;
|
||||||
isYT = false;
|
isYT = false;
|
||||||
is_file_player = false;
|
is_file_player = false;
|
||||||
is_audio_player = false;
|
is_audio_playing = false;
|
||||||
timeshift = TSHIFT_MODE_OFF;
|
timeshift = TSHIFT_MODE_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -693,7 +694,7 @@ bool CMoviePlayerGui::SelectFile()
|
|||||||
cookie_header.clear();
|
cookie_header.clear();
|
||||||
//reinit Path_local for webif reloadsetup
|
//reinit Path_local for webif reloadsetup
|
||||||
Path_local = "/";
|
Path_local = "/";
|
||||||
if (is_audio_player)
|
if (is_audio_playing)
|
||||||
{
|
{
|
||||||
if (!g_settings.network_nfs_audioplayerdir.empty())
|
if (!g_settings.network_nfs_audioplayerdir.empty())
|
||||||
Path_local = g_settings.network_nfs_audioplayerdir;
|
Path_local = g_settings.network_nfs_audioplayerdir;
|
||||||
@@ -704,7 +705,7 @@ bool CMoviePlayerGui::SelectFile()
|
|||||||
Path_local = g_settings.network_nfs_moviedir;
|
Path_local = g_settings.network_nfs_moviedir;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("CMoviePlayerGui::SelectFile: isBookmark %d timeshift %d isMovieBrowser %d is_audio_playing %d\n", isBookmark, timeshift, isMovieBrowser, is_audio_player);
|
printf("CMoviePlayerGui::SelectFile: isBookmark %d timeshift %d isMovieBrowser %d is_audio_playing %d\n", isBookmark, timeshift, isMovieBrowser, is_audio_playing);
|
||||||
#if 0
|
#if 0
|
||||||
wakeup_hdd(g_settings.network_nfs_recordingdir.c_str());
|
wakeup_hdd(g_settings.network_nfs_recordingdir.c_str());
|
||||||
#endif
|
#endif
|
||||||
@@ -776,7 +777,7 @@ bool CMoviePlayerGui::SelectFile()
|
|||||||
menu_ret = filebrowser->getMenuRet();
|
menu_ret = filebrowser->getMenuRet();
|
||||||
enableOsdElements(MUTE);
|
enableOsdElements(MUTE);
|
||||||
}
|
}
|
||||||
if (!is_audio_player)
|
if (!is_audio_playing)
|
||||||
g_settings.network_nfs_moviedir = Path_local;
|
g_settings.network_nfs_moviedir = Path_local;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1302,6 +1303,15 @@ bool CMoviePlayerGui::PlayFileStart(void)
|
|||||||
showStartingHint = true;
|
showStartingHint = true;
|
||||||
pthread_create(&thrStartHint, NULL, CMoviePlayerGui::ShowStartHint, this);
|
pthread_create(&thrStartHint, NULL, CMoviePlayerGui::ShowStartHint, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (filefilter_audio.matchFilter(file_name))
|
||||||
|
{
|
||||||
|
frameBuffer->showFrame("mp3.jpg");
|
||||||
|
is_audio_playing = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
is_audio_playing = false;
|
||||||
|
|
||||||
bool res = playback->Start((char *) file_name.c_str(), vpid, vtype, currentapid, currentac3, duration);
|
bool res = playback->Start((char *) file_name.c_str(), vpid, vtype, currentapid, currentac3, duration);
|
||||||
|
|
||||||
if (thrStartHint) {
|
if (thrStartHint) {
|
||||||
@@ -1679,7 +1689,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
CFile *pfile = NULL;
|
CFile *pfile = NULL;
|
||||||
int selected = std::distance( filelist.begin(), filelist_it );
|
int selected = std::distance( filelist.begin(), filelist_it );
|
||||||
filelist_it = filelist.end();
|
filelist_it = filelist.end();
|
||||||
if (playlist->playlist_manager(filelist, selected, is_audio_player))
|
if (playlist->playlist_manager(filelist, selected, is_audio_playing))
|
||||||
{
|
{
|
||||||
playstate = CMoviePlayerGui::STOPPED;
|
playstate = CMoviePlayerGui::STOPPED;
|
||||||
CFile *sfile = NULL;
|
CFile *sfile = NULL;
|
||||||
|
@@ -160,7 +160,7 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
|
|
||||||
/* playback from file */
|
/* playback from file */
|
||||||
bool is_file_player;
|
bool is_file_player;
|
||||||
bool is_audio_player;
|
bool is_audio_playing;
|
||||||
bool iso_file;
|
bool iso_file;
|
||||||
bool stopped;
|
bool stopped;
|
||||||
CFileBrowser * filebrowser;
|
CFileBrowser * filebrowser;
|
||||||
@@ -270,7 +270,7 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
void setLuaInfoFunc(lua_State* L, bool func) { luaState = L; haveLuaInfoFunc = func; };
|
void setLuaInfoFunc(lua_State* L, bool func) { luaState = L; haveLuaInfoFunc = func; };
|
||||||
void getLivestreamInfo(std::string *i1, std::string *i2) { *i1=livestreamInfo1; *i2=livestreamInfo2; };
|
void getLivestreamInfo(std::string *i1, std::string *i2) { *i1=livestreamInfo1; *i2=livestreamInfo2; };
|
||||||
bool getLiveUrl(const std::string &url, const std::string &script, std::string &realUrl, std::string &_pretty_name, std::string &info1, std::string &info2, std::string &header);
|
bool getLiveUrl(const std::string &url, const std::string &script, std::string &realUrl, std::string &_pretty_name, std::string &info1, std::string &info2, std::string &header);
|
||||||
bool IsAudioPlayer() { return is_audio_player; };
|
bool IsAudioPlaying() { return is_audio_playing; };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user