mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
do not init CEC if box start in timer record mode
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1354 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -648,6 +648,7 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings
|
|||||||
g_settings.recording_use_fdatasync = configfile.getBool("recordingmenu.use_fdatasync" , false);
|
g_settings.recording_use_fdatasync = configfile.getBool("recordingmenu.use_fdatasync" , false);
|
||||||
g_settings.recording_audio_pids_default = configfile.getInt32("recording_audio_pids_default", TIMERD_APIDS_STD | TIMERD_APIDS_AC3);
|
g_settings.recording_audio_pids_default = configfile.getInt32("recording_audio_pids_default", TIMERD_APIDS_STD | TIMERD_APIDS_AC3);
|
||||||
g_settings.recording_zap_on_announce = configfile.getBool("recording_zap_on_announce" , false);
|
g_settings.recording_zap_on_announce = configfile.getBool("recording_zap_on_announce" , false);
|
||||||
|
g_settings.shutdown_timer_record_type = configfile.getBool("shutdown_timer_record_type" , false);
|
||||||
|
|
||||||
g_settings.recording_stream_vtxt_pid = configfile.getBool("recordingmenu.stream_vtxt_pid" , false);
|
g_settings.recording_stream_vtxt_pid = configfile.getBool("recordingmenu.stream_vtxt_pid" , false);
|
||||||
g_settings.recording_stream_pmt_pid = configfile.getBool("recordingmenu.stream_pmt_pid" , false);
|
g_settings.recording_stream_pmt_pid = configfile.getBool("recordingmenu.stream_pmt_pid" , false);
|
||||||
@@ -1174,6 +1175,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
|||||||
|
|
||||||
configfile.setInt32 ("recording_audio_pids_default" , g_settings.recording_audio_pids_default);
|
configfile.setInt32 ("recording_audio_pids_default" , g_settings.recording_audio_pids_default);
|
||||||
configfile.setBool ("recording_zap_on_announce" , g_settings.recording_zap_on_announce );
|
configfile.setBool ("recording_zap_on_announce" , g_settings.recording_zap_on_announce );
|
||||||
|
configfile.setBool ("shutdown_timer_record_type" , g_settings.shutdown_timer_record_type );
|
||||||
|
|
||||||
configfile.setBool ("recordingmenu.stream_vtxt_pid" , g_settings.recording_stream_vtxt_pid );
|
configfile.setBool ("recordingmenu.stream_vtxt_pid" , g_settings.recording_stream_vtxt_pid );
|
||||||
configfile.setBool ("recordingmenu.stream_pmt_pid" , g_settings.recording_stream_pmt_pid );
|
configfile.setBool ("recordingmenu.stream_pmt_pid" , g_settings.recording_stream_pmt_pid );
|
||||||
@@ -2053,7 +2055,7 @@ static void CSSendMessage(uint32_t msg, uint32_t data)
|
|||||||
if (g_RCInput)
|
if (g_RCInput)
|
||||||
g_RCInput->postMsg(msg, data);
|
g_RCInput->postMsg(msg, data);
|
||||||
}
|
}
|
||||||
|
extern bool timer_wakeup;//timermanager.cpp
|
||||||
int CNeutrinoApp::run(int argc, char **argv)
|
int CNeutrinoApp::run(int argc, char **argv)
|
||||||
{
|
{
|
||||||
CmdParser(argc, argv);
|
CmdParser(argc, argv);
|
||||||
@@ -2102,6 +2104,8 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
|
|
||||||
pthread_create (&zapit_thread, NULL, zapit_main_thread, (void *) &ZapStart_arg);
|
pthread_create (&zapit_thread, NULL, zapit_main_thread, (void *) &ZapStart_arg);
|
||||||
audioSetupNotifier = new CAudioSetupNotifier;
|
audioSetupNotifier = new CAudioSetupNotifier;
|
||||||
|
//timer start
|
||||||
|
pthread_create (&timer_thread, NULL, timerd_main_thread, (void *) NULL);
|
||||||
|
|
||||||
while(!zapit_ready)
|
while(!zapit_ready)
|
||||||
usleep(0);
|
usleep(0);
|
||||||
@@ -2117,9 +2121,15 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
g_videoSettings = new CVideoSettings;
|
g_videoSettings = new CVideoSettings;
|
||||||
g_videoSettings->setVideoSettings();
|
g_videoSettings->setVideoSettings();
|
||||||
|
|
||||||
|
init_cec_setting = true;
|
||||||
|
if(!(g_settings.shutdown_timer_record_type && timer_wakeup && g_settings.hdmi_cec_mode)){
|
||||||
//init cec settings
|
//init cec settings
|
||||||
CCECSetup cecsetup;
|
CCECSetup cecsetup;
|
||||||
cecsetup.setCECSettings();
|
cecsetup.setCECSettings();
|
||||||
|
init_cec_setting = false;
|
||||||
|
}
|
||||||
|
g_settings.shutdown_timer_record_type = false;
|
||||||
|
timer_wakeup = false;
|
||||||
|
|
||||||
// trigger a change
|
// trigger a change
|
||||||
audioSetupNotifier->changeNotify(LOCALE_AUDIOMENU_AVSYNC, NULL);
|
audioSetupNotifier->changeNotify(LOCALE_AUDIOMENU_AVSYNC, NULL);
|
||||||
@@ -2140,7 +2150,6 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
|
|
||||||
dvbsub_init();
|
dvbsub_init();
|
||||||
|
|
||||||
pthread_create (&timer_thread, NULL, timerd_main_thread, (void *) NULL);
|
|
||||||
pthread_create (&nhttpd_thread, NULL, nhttpd_main_thread, (void *) NULL);
|
pthread_create (&nhttpd_thread, NULL, nhttpd_main_thread, (void *) NULL);
|
||||||
|
|
||||||
pthread_create (&stream_thread, NULL, streamts_main_thread, (void *) NULL);
|
pthread_create (&stream_thread, NULL, streamts_main_thread, (void *) NULL);
|
||||||
@@ -2406,7 +2415,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
ShowMsgUTF(LOCALE_PLUGINS_RESULT, g_PluginList->getScriptOutput(), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
|
ShowMsgUTF(LOCALE_PLUGINS_RESULT, g_PluginList->getScriptOutput(), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
|
||||||
}
|
}
|
||||||
g_RCInput->clearRCMsg();
|
g_RCInput->clearRCMsg();
|
||||||
if(g_settings.power_standby)
|
if(g_settings.power_standby || init_cec_setting)
|
||||||
standbyMode(true);
|
standbyMode(true);
|
||||||
|
|
||||||
cCA::GetInstance()->Ready(true);
|
cCA::GetInstance()->Ready(true);
|
||||||
@@ -3479,7 +3488,8 @@ skip_message:
|
|||||||
return messages_return::unhandled;
|
return messages_return::unhandled;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern time_t timer_minutes;
|
extern time_t timer_minutes;//timermanager.cpp
|
||||||
|
extern bool timer_is_rec;//timermanager.cpp
|
||||||
|
|
||||||
void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
||||||
{
|
{
|
||||||
@@ -3505,12 +3515,14 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
|||||||
frameBuffer->paintBackground();
|
frameBuffer->paintBackground();
|
||||||
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/shutdown.jpg");
|
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/shutdown.jpg");
|
||||||
|
|
||||||
saveSetup(NEUTRINO_SETTINGS_FILE);
|
|
||||||
|
|
||||||
if(g_settings.epg_save /* && timeset && g_Sectionsd->getIsTimeSet ()*/) {
|
if(g_settings.epg_save /* && timeset && g_Sectionsd->getIsTimeSet ()*/) {
|
||||||
saveEpg();
|
saveEpg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stop_daemons(retcode);//need here for timer_is_rec before saveSetup
|
||||||
|
g_settings.shutdown_timer_record_type = timer_is_rec;
|
||||||
|
saveSetup(NEUTRINO_SETTINGS_FILE);
|
||||||
|
|
||||||
if(retcode) {
|
if(retcode) {
|
||||||
const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on";
|
const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on";
|
||||||
printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script);
|
printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script);
|
||||||
@@ -3521,8 +3533,6 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
|||||||
mode = mode_off;
|
mode = mode_off;
|
||||||
//CVFD::getInstance()->ShowText((char *) g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN));
|
//CVFD::getInstance()->ShowText((char *) g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN));
|
||||||
|
|
||||||
stop_daemons(true);
|
|
||||||
|
|
||||||
system("/etc/init.d/rcK");
|
system("/etc/init.d/rcK");
|
||||||
system("/bin/sync");
|
system("/bin/sync");
|
||||||
system("/bin/umount -a");
|
system("/bin/umount -a");
|
||||||
@@ -3629,9 +3639,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
|||||||
delete funNotifier;
|
delete funNotifier;
|
||||||
}
|
}
|
||||||
//CVFD::getInstance()->ShowText((char *) g_Locale->getText(LOCALE_MAINMENU_REBOOT));
|
//CVFD::getInstance()->ShowText((char *) g_Locale->getText(LOCALE_MAINMENU_REBOOT));
|
||||||
|
|
||||||
delete frameBuffer;
|
delete frameBuffer;
|
||||||
stop_daemons();
|
|
||||||
|
|
||||||
#if 0 /* FIXME this next hack to test, until we find real crash on exit reason */
|
#if 0 /* FIXME this next hack to test, until we find real crash on exit reason */
|
||||||
system("/etc/init.d/rcK");
|
system("/etc/init.d/rcK");
|
||||||
@@ -3971,6 +3979,14 @@ void CNeutrinoApp::standbyMode( bool bOnOff )
|
|||||||
cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000);
|
cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000);
|
||||||
} else {
|
} else {
|
||||||
// Active standby off
|
// Active standby off
|
||||||
|
|
||||||
|
if(init_cec_setting){
|
||||||
|
//init cec settings
|
||||||
|
CCECSetup cecsetup;
|
||||||
|
cecsetup.setCECSettings();
|
||||||
|
init_cec_setting = false;
|
||||||
|
}
|
||||||
|
|
||||||
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
||||||
|
|
||||||
powerManager->SetStandby(false, false);
|
powerManager->SetStandby(false, false);
|
||||||
|
@@ -124,6 +124,7 @@ private:
|
|||||||
int lastMode;
|
int lastMode;
|
||||||
bool softupdate;
|
bool softupdate;
|
||||||
bool fromflash;
|
bool fromflash;
|
||||||
|
bool init_cec_setting;
|
||||||
CTimerd::RecordingInfo* nextRecordingInfo;
|
CTimerd::RecordingInfo* nextRecordingInfo;
|
||||||
//bool record_mode;
|
//bool record_mode;
|
||||||
int lastChannelMode;
|
int lastChannelMode;
|
||||||
|
@@ -240,6 +240,7 @@ struct SNeutrinoSettings
|
|||||||
int recording_save_in_channeldir;
|
int recording_save_in_channeldir;
|
||||||
int recording_in_spts_mode;
|
int recording_in_spts_mode;
|
||||||
int recording_zap_on_announce;
|
int recording_zap_on_announce;
|
||||||
|
int shutdown_timer_record_type;
|
||||||
|
|
||||||
int filesystem_is_utf8;
|
int filesystem_is_utf8;
|
||||||
// default plugin for ts-movieplayer (red button)
|
// default plugin for ts-movieplayer (red button)
|
||||||
|
@@ -51,6 +51,8 @@
|
|||||||
|
|
||||||
extern bool timeset;
|
extern bool timeset;
|
||||||
time_t timer_minutes;
|
time_t timer_minutes;
|
||||||
|
bool timer_is_rec;
|
||||||
|
bool timer_wakeup;
|
||||||
static pthread_mutex_t tm_eventsMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
|
static pthread_mutex_t tm_eventsMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
|
||||||
|
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
@@ -66,7 +68,7 @@ void CTimerManager::Init(void)
|
|||||||
m_saveEvents = false;
|
m_saveEvents = false;
|
||||||
m_isTimeSet = false;
|
m_isTimeSet = false;
|
||||||
wakeup = 0;
|
wakeup = 0;
|
||||||
|
timer_wakeup = false;
|
||||||
#if HAVE_COOL_HARDWARE
|
#if HAVE_COOL_HARDWARE
|
||||||
int fd = open("/dev/display", O_RDONLY);
|
int fd = open("/dev/display", O_RDONLY);
|
||||||
|
|
||||||
@@ -83,6 +85,7 @@ void CTimerManager::Init(void)
|
|||||||
printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no");
|
printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no");
|
||||||
if(wakeup){
|
if(wakeup){
|
||||||
creat("/tmp/.wakeup", 0);
|
creat("/tmp/.wakeup", 0);
|
||||||
|
timer_wakeup = true;
|
||||||
}else{
|
}else{
|
||||||
const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off";
|
const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off";
|
||||||
printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script);
|
printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script);
|
||||||
@@ -695,6 +698,8 @@ bool CTimerManager::shutdown()
|
|||||||
timerd_debug = 1; //FIXME
|
timerd_debug = 1; //FIXME
|
||||||
time_t nextAnnounceTime=0;
|
time_t nextAnnounceTime=0;
|
||||||
bool status=false;
|
bool status=false;
|
||||||
|
timer_is_rec = false;
|
||||||
|
|
||||||
dprintf("stopping timermanager thread ...\n");
|
dprintf("stopping timermanager thread ...\n");
|
||||||
|
|
||||||
dprintf("Waiting for timermanager thread to terminate ...\n");
|
dprintf("Waiting for timermanager thread to terminate ...\n");
|
||||||
@@ -728,6 +733,8 @@ bool CTimerManager::shutdown()
|
|||||||
{
|
{
|
||||||
nextAnnounceTime=event->announceTime;
|
nextAnnounceTime=event->announceTime;
|
||||||
dprintf("shutdown: nextAnnounceTime %ld\n", nextAnnounceTime);
|
dprintf("shutdown: nextAnnounceTime %ld\n", nextAnnounceTime);
|
||||||
|
if ( event->eventType == CTimerd::TIMER_RECORD )
|
||||||
|
timer_is_rec = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user