mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Conflicts:
data/locale/deutsch.locale
data/locale/english.locale
src/gui/lua/lua_misc.cpp
src/neutrino.cpp
src/system/locals.h
src/system/locals_intern.h
Origin commit data
------------------
Commit: 3420991007
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-11-19 (Sat, 19 Nov 2016)
This commit is contained in:
@@ -623,24 +623,48 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
||||
ypos += iheight;
|
||||
int type, layer, freq, mode, lbitrate;
|
||||
audioDecoder->getAudioInfo(type, layer, freq, lbitrate, mode);
|
||||
printf("\n**** mode: %d\n\n", mode);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s:", g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE));
|
||||
g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_MENUCONTENT_TEXT);
|
||||
|
||||
if(type == AUDIO_FMT_MPEG) {
|
||||
const int max_mode = 4;
|
||||
const char *mpegmodes[max_mode] = { "stereo", "joint_st", "dual_ch", "single_ch" };
|
||||
snprintf(buf, sizeof(buf), "MPEG %s (%d)", (mode > max_mode) ?"unk":mpegmodes[mode], freq);
|
||||
} else if (type == AUDIO_FMT_DOLBY_DIGITAL || type == AUDIO_FMT_DD_PLUS) {
|
||||
const int max_mode = 8;
|
||||
const char *ddmodes[max_mode] = { "CH1/CH2", "C", "L/R", "L/C/R", "L/R/S", "L/C/R/S", "L/R/SL/SR", "L/C/R/SL/SR" };
|
||||
if (type == AUDIO_FMT_MPEG)
|
||||
{
|
||||
const char *mpegmodes[] =
|
||||
{
|
||||
"stereo",
|
||||
"joint_st",
|
||||
"dual_ch",
|
||||
"single_ch"
|
||||
};
|
||||
int max_mode = sizeof(mpegmodes) / sizeof(mpegmodes[0]);
|
||||
snprintf(buf, sizeof(buf), "MPEG %s (%d)",
|
||||
(mode > max_mode) ? "unk" : mpegmodes[mode],
|
||||
freq);
|
||||
}
|
||||
else if (type == AUDIO_FMT_DOLBY_DIGITAL || type == AUDIO_FMT_DD_PLUS)
|
||||
{
|
||||
const char *ddmodes[] =
|
||||
{
|
||||
"CH1/CH2",
|
||||
"C",
|
||||
"L/R",
|
||||
"L/C/R",
|
||||
"L/R/S",
|
||||
"L/C/R/S",
|
||||
"L/R/SL/SR",
|
||||
"L/C/R/SL/SR"
|
||||
};
|
||||
int max_mode = sizeof(ddmodes) / sizeof(ddmodes[0]);
|
||||
snprintf(buf, sizeof(buf), "%s %s (%d)",
|
||||
(type == AUDIO_FMT_DOLBY_DIGITAL) ? "DD" : "DD+",
|
||||
(mode > max_mode) ?"unk": ddmodes[mode],
|
||||
(mode > max_mode) ? "unk" : ddmodes[mode],
|
||||
freq);
|
||||
} else if (type == AUDIO_FMT_AAC || type == AUDIO_FMT_AAC_PLUS) {
|
||||
const int max_mode = 10;
|
||||
const char *aacmodes[max_mode] = {
|
||||
}
|
||||
else if (type == AUDIO_FMT_AAC || type == AUDIO_FMT_AAC_PLUS)
|
||||
{
|
||||
const char *aacmodes[] =
|
||||
{
|
||||
"N/S",
|
||||
"Mono",
|
||||
"L/R",
|
||||
@@ -652,11 +676,17 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
||||
"L/R/SL/SR",
|
||||
"Dual-Mono"
|
||||
};
|
||||
int max_mode = sizeof(aacmodes) / sizeof(aacmodes[0]);
|
||||
snprintf(buf, sizeof(buf), "%s %s (%d)",
|
||||
(type == AUDIO_FMT_AAC) ? "AAC" : "AAC+",
|
||||
(mode > max_mode) ?"unk":aacmodes[mode], freq);
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf), "%s (%d)", g_Locale->getText(LOCALE_STREAMINFO_AUDIOTYPE_UNKNOWN), freq);
|
||||
(mode > max_mode) ? "unk" : aacmodes[mode],
|
||||
freq);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s (%d)",
|
||||
g_Locale->getText(LOCALE_STREAMINFO_AUDIOTYPE_UNKNOWN),
|
||||
freq);
|
||||
}
|
||||
g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width2, buf, COL_MENUCONTENT_TEXT);
|
||||
|
||||
|
Reference in New Issue
Block a user