mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
streaminfo: since new libcs return AUDIO_FORMAT as Type in getAudioInfo() update the code and add AAC information while at it. We set audio stream to unknown if we don't know what codec is in use.
Origin commit data
------------------
Commit: 2af0d0c4ee
Author: [CST] Bas <bas@coolstreamtech.com>
Date: 2014-10-22 (Wed, 22 Oct 2014)
This commit is contained in:
@@ -2062,6 +2062,7 @@ sleeptimerbox.title2 Inaktivitätstimer
|
|||||||
streaminfo.aratio Verhältnis
|
streaminfo.aratio Verhältnis
|
||||||
streaminfo.aratio_unknown unbekannt
|
streaminfo.aratio_unknown unbekannt
|
||||||
streaminfo.audiotype Audiotyp
|
streaminfo.audiotype Audiotyp
|
||||||
|
streaminfo.audiotype_unknown unbekannt
|
||||||
streaminfo.average_bitrate Durchschnitt
|
streaminfo.average_bitrate Durchschnitt
|
||||||
streaminfo.bitrate Bitrate
|
streaminfo.bitrate Bitrate
|
||||||
streaminfo.framerate Bildrate
|
streaminfo.framerate Bildrate
|
||||||
|
@@ -2062,6 +2062,7 @@ sleeptimerbox.title2 Inactivity shutdown timer
|
|||||||
streaminfo.aratio Aspect Ratio
|
streaminfo.aratio Aspect Ratio
|
||||||
streaminfo.aratio_unknown unknown
|
streaminfo.aratio_unknown unknown
|
||||||
streaminfo.audiotype Audiotype
|
streaminfo.audiotype Audiotype
|
||||||
|
streaminfo.audiotype_unknown unknown
|
||||||
streaminfo.average_bitrate Average
|
streaminfo.average_bitrate Average
|
||||||
streaminfo.bitrate Bitrate
|
streaminfo.bitrate Bitrate
|
||||||
streaminfo.framerate Framerate
|
streaminfo.framerate Framerate
|
||||||
|
@@ -1735,6 +1735,7 @@ sleeptimerbox.title2 Inactiviteit uitschakel timer
|
|||||||
streaminfo.aratio Aspect Ratio
|
streaminfo.aratio Aspect Ratio
|
||||||
streaminfo.aratio_unknown Onbekend
|
streaminfo.aratio_unknown Onbekend
|
||||||
streaminfo.audiotype Audiotype
|
streaminfo.audiotype Audiotype
|
||||||
|
streaminfo.audiotype_unknown onbekend
|
||||||
streaminfo.bitrate Bitrate
|
streaminfo.bitrate Bitrate
|
||||||
streaminfo.framerate Framerate
|
streaminfo.framerate Framerate
|
||||||
streaminfo.framerate_unknown Framerate: onbekend
|
streaminfo.framerate_unknown Framerate: onbekend
|
||||||
|
@@ -554,12 +554,33 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
sprintf (buf, "%s:", g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE));
|
sprintf (buf, "%s:", g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE));
|
||||||
g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR_TEXT);
|
g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR_TEXT);
|
||||||
|
|
||||||
if(type == 0) {
|
if(type == AUDIO_FMT_MPEG) {
|
||||||
const char *mpegmodes[4] = { "stereo", "joint_st", "dual_ch", "single_ch" };
|
const char *mpegmodes[4] = { "stereo", "joint_st", "dual_ch", "single_ch" };
|
||||||
sprintf (buf, "MPEG %s (%d)", mpegmodes[mode], freq);
|
sprintf (buf, "MPEG %s (%d)", mpegmodes[mode], freq);
|
||||||
} else {
|
} else if (type == AUDIO_FMT_DOLBY_DIGITAL || type == AUDIO_FMT_DD_PLUS) {
|
||||||
const char *ddmodes[8] = { "CH1/CH2", "C", "L/R", "L/C/R", "L/R/S", "L/C/R/S", "L/R/SL/SR", "L/C/R/SL/SR" };
|
const char *ddmodes[8] = { "CH1/CH2", "C", "L/R", "L/C/R", "L/R/S", "L/C/R/S", "L/R/SL/SR", "L/C/R/SL/SR" };
|
||||||
sprintf (buf, "DD %s (%d)", ddmodes[mode], freq);
|
sprintf (buf, "%s %s (%d)",
|
||||||
|
(type == AUDIO_FMT_DOLBY_DIGITAL) ? "DD" : "DD+",
|
||||||
|
ddmodes[mode],
|
||||||
|
freq);
|
||||||
|
} else if (type == AUDIO_FMT_AAC || type == AUDIO_FMT_AAC_PLUS) {
|
||||||
|
const char *aacmodes[10] = {
|
||||||
|
"N/S",
|
||||||
|
"Mono",
|
||||||
|
"L/R",
|
||||||
|
"L/C/R",
|
||||||
|
"L/C/R/SR/SL",
|
||||||
|
"L/C/R/SR/SL/S",
|
||||||
|
"L/R/RL/RR",
|
||||||
|
"L/C/R/S",
|
||||||
|
"L/R/SL/SR",
|
||||||
|
"Dual-Mono"
|
||||||
|
};
|
||||||
|
sprintf (buf, "%s %s (%d)",
|
||||||
|
(type == AUDIO_FMT_AAC) ? "AAC" : "AAC+",
|
||||||
|
aacmodes[mode], freq);
|
||||||
|
} else {
|
||||||
|
sprintf (buf, "%s (%d)", g_Locale->getText(LOCALE_STREAMINFO_AUDIOTYPE_UNKNOWN), freq);
|
||||||
}
|
}
|
||||||
g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT);
|
g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT);
|
||||||
|
|
||||||
|
@@ -2089,6 +2089,7 @@ typedef enum
|
|||||||
LOCALE_STREAMINFO_ARATIO,
|
LOCALE_STREAMINFO_ARATIO,
|
||||||
LOCALE_STREAMINFO_ARATIO_UNKNOWN,
|
LOCALE_STREAMINFO_ARATIO_UNKNOWN,
|
||||||
LOCALE_STREAMINFO_AUDIOTYPE,
|
LOCALE_STREAMINFO_AUDIOTYPE,
|
||||||
|
LOCALE_STREAMINFO_AUDIOTYPE_UNKNOWN,
|
||||||
LOCALE_STREAMINFO_AVERAGE_BITRATE,
|
LOCALE_STREAMINFO_AVERAGE_BITRATE,
|
||||||
LOCALE_STREAMINFO_BITRATE,
|
LOCALE_STREAMINFO_BITRATE,
|
||||||
LOCALE_STREAMINFO_FRAMERATE,
|
LOCALE_STREAMINFO_FRAMERATE,
|
||||||
|
@@ -2089,6 +2089,7 @@ const char * locale_real_names[] =
|
|||||||
"streaminfo.aratio",
|
"streaminfo.aratio",
|
||||||
"streaminfo.aratio_unknown",
|
"streaminfo.aratio_unknown",
|
||||||
"streaminfo.audiotype",
|
"streaminfo.audiotype",
|
||||||
|
"streaminfo.audiotype_unknown",
|
||||||
"streaminfo.average_bitrate",
|
"streaminfo.average_bitrate",
|
||||||
"streaminfo.bitrate",
|
"streaminfo.bitrate",
|
||||||
"streaminfo.framerate",
|
"streaminfo.framerate",
|
||||||
|
Reference in New Issue
Block a user