Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Conflicts:
	src/gui/streaminfo2.cpp


Origin commit data
------------------
Commit: f166f36e9a
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-14 (Sat, 14 Oct 2017)
This commit is contained in:
vanhofen
2017-10-14 16:10:22 +02:00

View File

@@ -684,6 +684,9 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
ddmode is always 1 ("CH1/CH2"). ddmode is always 1 ("CH1/CH2").
*/ */
audioDecoder->getAudioInfo(type, layer, freq, lbitrate, mode); audioDecoder->getAudioInfo(type, layer, freq, lbitrate, mode);
std::string desc = "N/A";
if (!g_RemoteControl->current_PIDs.APIDs.empty())
desc = g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].desc;
if (type == AUDIO_FMT_MPEG || type == AUDIO_FMT_MP3) if (type == AUDIO_FMT_MPEG || type == AUDIO_FMT_MP3)
{ {
@@ -695,9 +698,9 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
"single_ch" "single_ch"
}; };
int max_mode = sizeof(mpegmodes) / sizeof(mpegmodes[0]); int max_mode = sizeof(mpegmodes) / sizeof(mpegmodes[0]);
snprintf(buf, sizeof(buf), "%s %s (%d)",type == AUDIO_FMT_MPEG ? "MPEG":"MP3", snprintf(buf, sizeof(buf), "%s %s (%d) (%s)",type == AUDIO_FMT_MPEG ? "MPEG":"MP3",
(mode > max_mode) ? "unk" : mpegmodes[mode], (mode > max_mode) ? "unk" : mpegmodes[mode],
freq); freq, desc.c_str());
} }
else if (type == AUDIO_FMT_DOLBY_DIGITAL || type == AUDIO_FMT_DD_PLUS) else if (type == AUDIO_FMT_DOLBY_DIGITAL || type == AUDIO_FMT_DD_PLUS)
{ {
@@ -713,10 +716,10 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
"L/C/R/SL/SR" "L/C/R/SL/SR"
}; };
int max_mode = sizeof(ddmodes) / sizeof(ddmodes[0]); int max_mode = sizeof(ddmodes) / sizeof(ddmodes[0]);
snprintf(buf, sizeof(buf), "%s %s (%d)", snprintf(buf, sizeof(buf), "%s %s (%d) (%s)",
(type == AUDIO_FMT_DOLBY_DIGITAL) ? "DD" : "DD+", (type == AUDIO_FMT_DOLBY_DIGITAL) ? "DD" : "DD+",
(mode > max_mode) ? "unk" : ddmodes[mode], (mode > max_mode) ? "unk" : ddmodes[mode],
freq); freq, desc.c_str());
} }
else if (type == AUDIO_FMT_AAC || type == AUDIO_FMT_AAC_PLUS) else if (type == AUDIO_FMT_AAC || type == AUDIO_FMT_AAC_PLUS)
{ {
@@ -734,16 +737,16 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
"Dual-Mono" "Dual-Mono"
}; };
int max_mode = sizeof(aacmodes) / sizeof(aacmodes[0]); int max_mode = sizeof(aacmodes) / sizeof(aacmodes[0]);
snprintf(buf, sizeof(buf), "%s %s (%d)", snprintf(buf, sizeof(buf), "%s %s (%d) (%s)",
(type == AUDIO_FMT_AAC) ? "AAC" : "AAC+", (type == AUDIO_FMT_AAC) ? "AAC" : "AAC+",
(mode > max_mode) ? "unk" : aacmodes[mode], (mode > max_mode) ? "unk" : aacmodes[mode],
freq); freq, desc.c_str());
} }
else else
{ {
snprintf(buf, sizeof(buf), "%s (%d)", snprintf(buf, sizeof(buf), "%s (%d) (%s)",
g_Locale->getText(LOCALE_STREAMINFO_AUDIOTYPE_UNKNOWN), g_Locale->getText(LOCALE_STREAMINFO_AUDIOTYPE_UNKNOWN),
freq); freq, desc.c_str());
} }
g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width2, buf, COL_MENUCONTENT_TEXT); g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width2, buf, COL_MENUCONTENT_TEXT);