mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-16 01:43:35 +02:00
movieplayer: introduce g_settings.movieplayer_select_ac3_atype0
Origin commit data
------------------
Commit: 13589d8689
Author: retsim01 <mrdata1972+neutrino@gmail.com>
Date: 2021-10-03 (Sun, 03 Oct 2021)
Origin message was:
------------------
- movieplayer: introduce g_settings.movieplayer_select_ac3_atype0
This commit is contained in:
@@ -1485,6 +1485,12 @@ bool CMoviePlayerGui::PlayFileStart(void)
|
||||
|
||||
if (is_audio_playing)
|
||||
frameBuffer->showFrame("mp3.jpg");
|
||||
|
||||
#if HAVE_CST_HARDWARE
|
||||
if ((g_settings.movieplayer_select_ac3_atype0 == true) && (currentac3 == AC3_ATYPE1))
|
||||
currentac3 = AC3_ATYPE0;
|
||||
#endif
|
||||
|
||||
#if HAVE_ARM_HARDWARE
|
||||
bool res = playback->Start((char *) file_name.c_str(), vpid, vtype, currentapid, currentac3, duration,"",second_file_name);
|
||||
#else
|
||||
@@ -2575,12 +2581,17 @@ void CMoviePlayerGui::selectAudioPid()
|
||||
#if HAVE_CST_HARDWARE
|
||||
if (select == numpida) {
|
||||
currentac3 == 1 ? currentac3 = 0 : currentac3 = 1;
|
||||
currentac3 == 1 ? g_settings.movieplayer_select_ac3_atype0 = false : g_settings.movieplayer_select_ac3_atype0 = true;
|
||||
playback->SetAPid(currentapid, currentac3);
|
||||
printf("[movieplayer] currentac3 changed to %d\n", currentac3);
|
||||
}
|
||||
else if ((select >= 0) && (currentapid != apids[select])) {
|
||||
currentapid = apids[select];
|
||||
currentac3 = ac3flags[select];
|
||||
|
||||
if ((g_settings.movieplayer_select_ac3_atype0 == true) && (currentac3 == AC3_ATYPE1))
|
||||
currentac3 = AC3_ATYPE0;
|
||||
|
||||
playback->SetAPid(currentapid, currentac3);
|
||||
getCurrentAudioName(is_file_player, currentaudioname);
|
||||
printf("[movieplayer] apid changed to %d type %d\n", currentapid, currentac3);
|
||||
|
@@ -62,6 +62,11 @@ extern "C" {
|
||||
#define MAX_PLAYBACK_PIDS 40
|
||||
#endif
|
||||
|
||||
#if HAVE_CST_HARDWARE
|
||||
#define AC3_ATYPE0 0
|
||||
#define AC3_ATYPE1 1
|
||||
#endif
|
||||
|
||||
class CFrameBuffer;
|
||||
class CMoviePlayerGui : public CMenuTarget
|
||||
{
|
||||
|
@@ -1187,6 +1187,9 @@ int CNeutrinoApp::loadSetup(const char *fname)
|
||||
g_settings.movieplayer_bisection_jump = configfile.getInt32("movieplayer_bisection_jump", 5);
|
||||
g_settings.movieplayer_display_playtime = configfile.getInt32("movieplayer_display_playtime", g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM);
|
||||
g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF);
|
||||
#if HAVE_CST_HARDWARE
|
||||
g_settings.movieplayer_select_ac3_atype0 = configfile.getBool("movieplayer_select_ac3_atype0", false);
|
||||
#endif
|
||||
g_settings.movieplayer_timeosd_while_searching = configfile.getInt32("movieplayer_timeosd_while_searching", 1);
|
||||
|
||||
// filebrowser
|
||||
@@ -2189,6 +2192,9 @@ void CNeutrinoApp::saveSetup(const char *fname)
|
||||
configfile.setInt32("movieplayer_bisection_jump", g_settings.movieplayer_bisection_jump);
|
||||
configfile.setInt32("movieplayer_display_playtime", g_settings.movieplayer_display_playtime);
|
||||
configfile.setInt32("movieplayer_repeat_on", g_settings.movieplayer_repeat_on);
|
||||
#if HAVE_CST_HARDWARE
|
||||
configfile.setBool("movieplayer_select_ac3_atype0", g_settings.movieplayer_select_ac3_atype0);
|
||||
#endif
|
||||
configfile.setInt32("movieplayer_timeosd_while_searching", g_settings.movieplayer_timeosd_while_searching);
|
||||
|
||||
// filebrowser
|
||||
|
@@ -976,6 +976,9 @@ struct SNeutrinoSettings
|
||||
int movieplayer_bisection_jump;
|
||||
int movieplayer_display_playtime;
|
||||
int movieplayer_repeat_on;
|
||||
#if HAVE_CST_HARDWARE
|
||||
bool movieplayer_select_ac3_atype0;
|
||||
#endif
|
||||
int movieplayer_timeosd_while_searching;
|
||||
|
||||
// filebrowser
|
||||
|
Reference in New Issue
Block a user