Merge branch 'uncool/dvbsi++' commit '7ea3a20a808'

...needs buildfixing...

Conflicts:
	data/Makefile.am
	src/driver/volume.cpp
	src/gui/infoviewer.cpp
	src/gui/miscsettings_menu.cpp
	src/gui/movieplayer.cpp
	src/gui/scan.cpp
	src/gui/widget/buttons.cpp
	src/gui/widget/menue.cpp
	src/gui/widget/stringinput.cpp
	src/neutrino.cpp
	src/nhttpd/tuxboxapi/coolstream/controlapi.cpp
	src/system/setting_helpers.cpp
	src/zapit/src/capmt.cpp
This commit is contained in:
Stefan Seyfried
2012-11-03 10:43:14 +01:00
123 changed files with 1901 additions and 1088 deletions

View File

@@ -711,6 +711,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);
@@ -735,6 +738,78 @@ 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)");
#ifndef HAVE_SPARK_HARDWARE
enabled = false;
#endif
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);
@@ -745,7 +820,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];
}
@@ -767,38 +841,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)");
#ifndef HAVE_SPARK_HARDWARE
enabled = false;
#endif
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));
@@ -816,7 +864,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()));
}
}