mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
Merge branch 'dvbsi++' of coolstreamtech.de:cst-private-neutrino into neutrino-apollo
Conflicts: src/neutrino.cpp
This commit is contained in:
@@ -697,6 +697,9 @@ void CMoviePlayerGui::callInfoViewer(const int duration, const int curr_pos)
|
||||
CNeutrinoApp::getInstance()->channelList->getActiveChannel_ChannelID());
|
||||
return;
|
||||
}
|
||||
currentaudioname = "Unk";
|
||||
getCurrentAudioName( is_file_player, currentaudioname);
|
||||
|
||||
if (isMovieBrowser && p_movie_info) {
|
||||
g_InfoViewer->showMovieTitle(playstate, p_movie_info->epgChannel, p_movie_info->epgTitle, p_movie_info->epgInfo1,
|
||||
duration, curr_pos);
|
||||
@@ -721,6 +724,76 @@ bool CMoviePlayerGui::getAudioName(int apid, std::string &apidtitle)
|
||||
return false;
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::addAudioFormat(int count, std::string &apidtitle, bool file_player, bool& enabled)
|
||||
{
|
||||
enabled = true;
|
||||
switch(ac3flags[count])
|
||||
{
|
||||
case 1: /*AC3,EAC3*/
|
||||
if (apidtitle.find("AC3") == std::string::npos || file_player)
|
||||
apidtitle.append(" (AC3)");
|
||||
break;
|
||||
case 2: /*teletext*/
|
||||
apidtitle.append(" (Teletext)");
|
||||
enabled = false;
|
||||
break;
|
||||
case 3: /*MP2*/
|
||||
apidtitle.append("( MP2)");
|
||||
break;
|
||||
case 4: /*MP3*/
|
||||
apidtitle.append(" (MP3)");
|
||||
break;
|
||||
case 5: /*AAC*/
|
||||
apidtitle.append(" (AAC)");
|
||||
break;
|
||||
case 6: /*DTS*/
|
||||
apidtitle.append(" (DTS)");
|
||||
enabled = false;
|
||||
break;
|
||||
case 7: /*MLP*/
|
||||
apidtitle.append(" (MLP)");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::getCurrentAudioName( bool file_player, std::string &audioname)
|
||||
{
|
||||
if(file_player && !numpida){
|
||||
playback->FindAllPids(apids, ac3flags, &numpida, language);
|
||||
if(numpida)
|
||||
currentapid = apids[0];
|
||||
}
|
||||
bool dumm = true;
|
||||
for (unsigned int count = 0; count < numpida; count++) {
|
||||
|
||||
if(currentapid == apids[count]){
|
||||
if(!file_player){
|
||||
getAudioName(apids[count], audioname);
|
||||
return ;
|
||||
}else if (!language[count].empty()){
|
||||
audioname = language[count];
|
||||
addAudioFormat(count, audioname, file_player, dumm);
|
||||
if(!dumm && (count < numpida)){
|
||||
currentapid = apids[count+1];
|
||||
continue;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
char apidnumber[20];
|
||||
sprintf(apidnumber, "Stream %d %X", count + 1, apids[count]);
|
||||
audioname = apidnumber;
|
||||
addAudioFormat(count, audioname, file_player, dumm);
|
||||
if(!dumm && (count < numpida)){
|
||||
currentapid = apids[count+1];
|
||||
continue;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::selectAudioPid(bool file_player)
|
||||
{
|
||||
CMenuWidget APIDSelector(LOCALE_APIDSELECTOR_HEAD, NEUTRINO_ICON_AUDIO);
|
||||
@@ -731,7 +804,6 @@ void CMoviePlayerGui::selectAudioPid(bool file_player)
|
||||
|
||||
if(file_player && !numpida){
|
||||
playback->FindAllPids(apids, ac3flags, &numpida, language);
|
||||
/* fix current pid in case of file play */
|
||||
if(numpida)
|
||||
currentapid = apids[0];
|
||||
}
|
||||
@@ -753,36 +825,12 @@ void CMoviePlayerGui::selectAudioPid(bool file_player)
|
||||
sprintf(apidnumber, "Stream %d %X", count + 1, apids[count]);
|
||||
apidtitle = apidnumber;
|
||||
}
|
||||
|
||||
switch(ac3flags[count])
|
||||
{
|
||||
case 1: /*AC3,EAC3*/
|
||||
if (apidtitle.find("AC3") == std::string::npos || file_player)
|
||||
apidtitle.append(" (AC3)");
|
||||
break;
|
||||
case 2: /*teletext*/
|
||||
apidtitle.append(" (Teletext)");
|
||||
enabled = false;
|
||||
break;
|
||||
case 3: /*MP2*/
|
||||
apidtitle.append("( MP2)");
|
||||
break;
|
||||
case 4: /*MP3*/
|
||||
apidtitle.append(" (MP3)");
|
||||
break;
|
||||
case 5: /*AAC*/
|
||||
apidtitle.append(" (AAC)");
|
||||
break;
|
||||
case 6: /*DTS*/
|
||||
apidtitle.append(" (DTS)");
|
||||
enabled = false;
|
||||
break;
|
||||
case 7: /*MLP*/
|
||||
apidtitle.append(" (MLP)");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
addAudioFormat(count, apidtitle, file_player, enabled);
|
||||
if(defpid && !enabled && (count < numpida)){
|
||||
currentapid = apids[count+1];
|
||||
defpid = false;
|
||||
}
|
||||
|
||||
char cnt[5];
|
||||
sprintf(cnt, "%d", count);
|
||||
CMenuForwarderNonLocalized * item = new CMenuForwarderNonLocalized(apidtitle.c_str(), enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(count + 1));
|
||||
@@ -800,7 +848,7 @@ void CMoviePlayerGui::selectAudioPid(bool file_player)
|
||||
APIDSelector.addItem(new CMenuOptionNumberChooser(NONEXISTANT_LOCALE, &percent[i],
|
||||
currentapid == apids[i],
|
||||
0, 999, CVolume::getInstance(), 0, 0, NONEXISTANT_LOCALE,
|
||||
g_RemoteControl->current_PIDs.APIDs[i].desc));
|
||||
p_movie_info->audioPids[i].epgAudioPidName.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user