mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
Merge branch 'cst-next' into nmp-cst-next
Origin commit data
------------------
Branch: ni/coolstream
Commit: ed99066466
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-26 (Tue, 26 Jan 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -66,7 +66,7 @@ public:
|
||||
void FindAllPids(playback_audio_pid_info_t *audiopids, uint16_t size, uint16_t *numpida);
|
||||
void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language);
|
||||
void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language);
|
||||
bool SelectSubtitles(int pid);
|
||||
bool SelectSubtitles(int pid, std::string charset = "");
|
||||
void GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
|
||||
void RequestAbort();
|
||||
void GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t);
|
||||
|
@@ -67,7 +67,7 @@ public:
|
||||
void FindAllPids(playback_audio_pid_info_t *audiopids, uint16_t size, uint16_t *numpida);
|
||||
void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language);
|
||||
void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language);
|
||||
bool SelectSubtitles(int pid);
|
||||
bool SelectSubtitles(int pid, std::string charset = "");
|
||||
void GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
|
||||
void RequestAbort();
|
||||
void GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t);
|
||||
|
@@ -221,7 +221,7 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
icon = NEUTRINO_ICON_BUTTON_RED;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
|
||||
if (mode == NeutrinoMessages::mode_ts) {
|
||||
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active, g_settings.infobar_buttons_usertitle);
|
||||
if (!text.empty())
|
||||
break;
|
||||
@@ -236,7 +236,7 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
icon = NEUTRINO_ICON_BUTTON_GREEN;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
|
||||
if (mode == NeutrinoMessages::mode_ts) {
|
||||
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active, g_settings.infobar_buttons_usertitle);
|
||||
if (!text.empty())
|
||||
break;
|
||||
@@ -251,7 +251,7 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
icon = NEUTRINO_ICON_BUTTON_YELLOW;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
|
||||
if (mode == NeutrinoMessages::mode_ts) {
|
||||
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active, g_settings.infobar_buttons_usertitle);
|
||||
if (!text.empty())
|
||||
break;
|
||||
@@ -266,7 +266,7 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
icon = NEUTRINO_ICON_BUTTON_BLUE;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
|
||||
if (mode == NeutrinoMessages::mode_ts) {
|
||||
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active, g_settings.infobar_buttons_usertitle);
|
||||
if (!text.empty())
|
||||
break;
|
||||
@@ -279,16 +279,11 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//label audio control button in movieplayer/upnp mode
|
||||
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio)
|
||||
{
|
||||
if (!CMoviePlayerGui::getInstance().timeshift)
|
||||
//label audio control button in movieplayer mode
|
||||
if (mode == NeutrinoMessages::mode_ts && !CMoviePlayerGui::getInstance().timeshift)
|
||||
{
|
||||
if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO) && !g_settings.infobar_buttons_usertitle)
|
||||
{
|
||||
text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName();
|
||||
}
|
||||
}
|
||||
text = CMoviePlayerGui::getInstance(false).CurrentAudioName(); // use instance_mp
|
||||
}
|
||||
bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(text) + w + 10;
|
||||
bbButtonInfo[i].cx = w + 5;
|
||||
|
@@ -1891,7 +1891,7 @@ void CMoviePlayerGui::selectSubtitle()
|
||||
if (!numsubs)
|
||||
playback->FindAllSubs(spids, sub_supported, &numsubs, slanguage);
|
||||
|
||||
CMenuOptionStringChooser * sc = new CMenuOptionStringChooser(LOCALE_SUBTITLES_CHARSET, &g_settings.subs_charset, true, NULL, CRCInput::RC_red, NULL, true);
|
||||
CMenuOptionStringChooser * sc = new CMenuOptionStringChooser(LOCALE_SUBTITLES_CHARSET, &g_settings.subs_charset, currentspid == -1, NULL, CRCInput::RC_red, NULL, true);
|
||||
sc->addOption("UTF-8");
|
||||
sc->addOption("UCS-2");
|
||||
sc->addOption("CP1250");
|
||||
@@ -1919,7 +1919,7 @@ void CMoviePlayerGui::selectSubtitle()
|
||||
APIDSelector.addItem(item);
|
||||
}
|
||||
sprintf(cnt, "%d", count);
|
||||
APIDSelector.addItem(new CMenuForwarder(LOCALE_SUBTITLES_STOP, true, NULL, selector, cnt, CRCInput::RC_stop), currentspid > 0);
|
||||
APIDSelector.addItem(new CMenuForwarder(LOCALE_SUBTITLES_STOP, currentspid != -1, NULL, selector, cnt, CRCInput::RC_stop), currentspid > 0);
|
||||
|
||||
APIDSelector.exec(NULL, "");
|
||||
delete selector;
|
||||
@@ -1928,12 +1928,12 @@ void CMoviePlayerGui::selectSubtitle()
|
||||
currentspid = spids[select];
|
||||
/* external subtitles pid is 0x1FFF */
|
||||
ext_subs = (currentspid == 0x1FFF);
|
||||
playback->SelectSubtitles(currentspid);
|
||||
playback->SelectSubtitles(currentspid, g_settings.subs_charset);
|
||||
printf("[movieplayer] spid changed to %d\n", currentspid);
|
||||
} else if (select > 0) {
|
||||
ext_subs = false;
|
||||
currentspid = -1;
|
||||
playback->SelectSubtitles(currentspid);
|
||||
playback->SelectSubtitles(currentspid, g_settings.subs_charset);
|
||||
printf("[movieplayer] spid changed to %d\n", currentspid);
|
||||
}
|
||||
}
|
||||
@@ -2160,7 +2160,7 @@ void CMoviePlayerGui::selectAutoLang()
|
||||
for (unsigned count = 0; count < numsubs; count++) {
|
||||
if (spids[count] == 0x1FFF) {
|
||||
currentspid = spids[count];
|
||||
playback->SelectSubtitles(currentspid);
|
||||
playback->SelectSubtitles(currentspid, g_settings.subs_charset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -92,8 +92,8 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/
|
||||
CNeutrinoApp::getInstance()->stopPlayBack(true);
|
||||
m_frameBuffer->showFrame("mp3.jpg");
|
||||
|
||||
// tell neutrino we're in audio mode
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_audio);
|
||||
// tell neutrino we're in upnp mode
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_upnp);
|
||||
|
||||
// remember last mode
|
||||
m_LastMode=(CNeutrinoApp::getInstance()->getLastMode());
|
||||
@@ -1230,12 +1230,18 @@ printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed);
|
||||
|
||||
void CUpnpBrowserGui::playAudio(std::string name, int type)
|
||||
{
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_audio);
|
||||
|
||||
CAudiofile mp3(name, (CFile::FileType) type);
|
||||
CAudioPlayer::getInstance()->play(&mp3, g_settings.audioplayer_highprio == 1);
|
||||
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::showPicture(std::string name)
|
||||
{
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_pic);
|
||||
|
||||
g_PicViewer->SetScaling((CPictureViewer::ScalingMode)g_settings.picviewer_scaling);
|
||||
g_PicViewer->SetVisible(g_settings.screen_StartX, g_settings.screen_EndX, g_settings.screen_StartY, g_settings.screen_EndY);
|
||||
|
||||
@@ -1246,14 +1252,20 @@ void CUpnpBrowserGui::showPicture(std::string name)
|
||||
|
||||
g_PicViewer->ShowImage(name, false);
|
||||
g_PicViewer->Cleanup();
|
||||
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::playVideo(std::string name, std::string url)
|
||||
{
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_ts);
|
||||
|
||||
if (CAudioPlayer::getInstance()->getState() != CBaseDec::STOP)
|
||||
CAudioPlayer::getInstance()->stop();
|
||||
|
||||
m_frameBuffer->stopFrame();
|
||||
CMoviePlayerGui::getInstance().SetFile(name, url);
|
||||
CMoviePlayerGui::getInstance().exec(NULL, "upnp");
|
||||
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
||||
}
|
||||
|
@@ -488,6 +488,7 @@ const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool retu
|
||||
|
||||
neutrino_locale_t loc = NONEXISTANT_LOCALE;
|
||||
const char *text = NULL;
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
|
||||
std::vector<std::string> items = ::split(g_settings.usermenu[button]->items, ',');
|
||||
for (std::vector<std::string>::iterator it = items.begin(); it != items.end(); ++it) {
|
||||
@@ -538,7 +539,9 @@ const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool retu
|
||||
continue;
|
||||
case SNeutrinoSettings::ITEM_AUDIO_SELECT:
|
||||
if(loc == NONEXISTANT_LOCALE && !text) {
|
||||
if (!g_RemoteControl->current_PIDs.APIDs.empty())
|
||||
if (mode == NeutrinoMessages::mode_webtv)
|
||||
text = CMoviePlayerGui::getInstance(true).CurrentAudioName().c_str(); // use instance_bg
|
||||
else if (!g_RemoteControl->current_PIDs.APIDs.empty())
|
||||
text = g_RemoteControl->current_PIDs.APIDs[
|
||||
g_RemoteControl->current_PIDs.PIDs.selected_apid].desc;
|
||||
} else
|
||||
|
@@ -3329,7 +3329,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
lastMode=mode;
|
||||
mode=mode_pic;
|
||||
}
|
||||
if((data & mode_mask)== mode_ts && CMoviePlayerGui::getInstance().Playing()) {
|
||||
if((data & mode_mask)== mode_ts) {
|
||||
if(mode == mode_radio)
|
||||
frameBuffer->stopFrame();
|
||||
lastMode=mode;
|
||||
|
@@ -153,6 +153,7 @@ public:
|
||||
mode_ts = 7,
|
||||
mode_off = 8,
|
||||
mode_webtv = 9,
|
||||
mode_upnp = 10,
|
||||
mode_mask = 0xFF,
|
||||
norezap = 0x100
|
||||
};
|
||||
|
@@ -177,6 +177,7 @@ struct NeutrinoMessages {
|
||||
mode_pic = 6,
|
||||
mode_ts = 7,
|
||||
mode_webtv = 9,
|
||||
mode_upnp = 10,
|
||||
mode_mask = 0xFF,
|
||||
norezap = 0x100
|
||||
};
|
||||
|
Reference in New Issue
Block a user