mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +02:00
Merge branch 'check/next-cc'
it compiles, but is not really tested...
Conflicts:
src/driver/netfile.cpp
src/driver/volume.cpp
src/eitd/sectionsd.cpp
src/gui/audioplayer.cpp
src/gui/bedit/bouqueteditor_bouquets.cpp
src/gui/bedit/bouqueteditor_channels.cpp
src/gui/bookmarkmanager.cpp
src/gui/bouquetlist.cpp
src/gui/eventlist.cpp
src/gui/movieplayer.cpp
src/gui/pictureviewer.cpp
src/gui/scan.cpp
src/gui/test_menu.h
src/gui/timerlist.cpp
src/gui/update.cpp
src/gui/widget/listbox.cpp
src/neutrino.cpp
src/system/flashtool.cpp
src/zapit/src/Makefile.am
src/zapit/src/femanager.cpp
Origin commit data
------------------
Commit: d5d5a60261
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-06-16 (Sun, 16 Jun 2013)
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
#include <driver/volume.h>
|
||||
#include <driver/streamts.h>
|
||||
#include <driver/display.h>
|
||||
#include <driver/scanepg.h>
|
||||
|
||||
#include "gui/audiomute.h"
|
||||
#include "gui/audioplayer.h"
|
||||
@@ -151,7 +152,7 @@ extern cAudio * audioDecoder;
|
||||
cPowerManager *powerManager;
|
||||
cCpuFreqManager * cpuFreq;
|
||||
|
||||
void stop_daemons(bool stopall = true);
|
||||
void stop_daemons(bool stopall = true, bool for_flash = false);
|
||||
void stop_video(void);
|
||||
// uncomment if you want to have a "test" menue entry (rasc)
|
||||
|
||||
@@ -437,8 +438,8 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
}
|
||||
g_settings.infobar_show = configfile.getInt32("infobar_show", 1);
|
||||
g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 );
|
||||
g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 0 );
|
||||
g_settings.casystem_display = configfile.getInt32("casystem_display", 2 );//mini ca mode default
|
||||
g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 1 ); // below channel name
|
||||
g_settings.casystem_display = configfile.getInt32("casystem_display", 1 );//discreet ca mode default
|
||||
g_settings.scrambled_message = configfile.getBool("scrambled_message", true );
|
||||
g_settings.volume_pos = configfile.getInt32("volume_pos", 0 );
|
||||
g_settings.volume_digits = configfile.getBool("volume_digits", true);
|
||||
@@ -487,6 +488,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
|
||||
g_settings.epg_save = configfile.getBool("epg_save", false);
|
||||
g_settings.epg_save_standby = configfile.getBool("epg_save_standby", true);
|
||||
g_settings.epg_scan = configfile.getBool("epg_scan", false);
|
||||
//widget settings
|
||||
g_settings.widget_fade = false;
|
||||
g_settings.widget_fade = configfile.getBool("widget_fade" , false );
|
||||
@@ -547,7 +549,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.personalize[i] = configfile.getInt32( personalize_settings[i].personalize_settings_name, personalize_settings[i].personalize_default_val );
|
||||
|
||||
g_settings.colored_events_channellist = configfile.getInt32( "colored_events_channellist" , 0 );
|
||||
g_settings.colored_events_infobar = configfile.getInt32( "colored_events_infobar" , 0 );
|
||||
g_settings.colored_events_infobar = configfile.getInt32( "colored_events_infobar" , 2 ); // next
|
||||
g_settings.colored_events_alpha = configfile.getInt32( "colored_events_alpha", 0x00 );
|
||||
g_settings.colored_events_red = configfile.getInt32( "colored_events_red", 95 );
|
||||
g_settings.colored_events_green = configfile.getInt32( "colored_events_green", 70 );
|
||||
@@ -629,12 +631,12 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
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_subtitle_pids = configfile.getBool("recordingmenu.stream_subtitle_pids", false);
|
||||
g_settings.recording_stream_vtxt_pid = configfile.getBool("recordingmenu.stream_vtxt_pid" , true);
|
||||
g_settings.recording_stream_subtitle_pids = configfile.getBool("recordingmenu.stream_subtitle_pids", true);
|
||||
g_settings.recording_stream_pmt_pid = configfile.getBool("recordingmenu.stream_pmt_pid" , false);
|
||||
g_settings.recording_choose_direct_rec_dir = configfile.getInt32( "recording_choose_direct_rec_dir", 0 );
|
||||
g_settings.recording_epg_for_filename = configfile.getBool("recording_epg_for_filename" , true);
|
||||
g_settings.recording_epg_for_end = configfile.getBool("recording_epg_for_end" , false);
|
||||
g_settings.recording_epg_for_end = configfile.getBool("recording_epg_for_end" , true);
|
||||
g_settings.recording_save_in_channeldir = configfile.getBool("recording_save_in_channeldir" , false);
|
||||
g_settings.recording_slow_warning = configfile.getBool("recording_slow_warning" , true);
|
||||
|
||||
@@ -705,6 +707,8 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
|
||||
//Software-update
|
||||
g_settings.softupdate_mode = configfile.getInt32( "softupdate_mode", 1 );
|
||||
g_settings.apply_kernel = configfile.getBool("apply_kernel" , false);
|
||||
g_settings.apply_settings = configfile.getBool("apply_settings" , true);
|
||||
|
||||
strcpy(g_settings.softupdate_url_file, configfile.getString("softupdate_url_file", "/var/etc/update.urls").c_str());
|
||||
strcpy(g_settings.softupdate_proxyserver, configfile.getString("softupdate_proxyserver", "" ).c_str());
|
||||
@@ -953,6 +957,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
// epg
|
||||
configfile.setBool("epg_save", g_settings.epg_save);
|
||||
configfile.setBool("epg_save_standby", g_settings.epg_save_standby);
|
||||
configfile.setBool("epg_scan", g_settings.epg_scan);
|
||||
configfile.setString("epg_cache_time" ,g_settings.epg_cache );
|
||||
configfile.setString("epg_extendedcache_time" ,g_settings.epg_extendedcache);
|
||||
configfile.setString("epg_old_events" ,g_settings.epg_old_events );
|
||||
@@ -1135,6 +1140,8 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
|
||||
//Software-update
|
||||
configfile.setInt32 ("softupdate_mode" , g_settings.softupdate_mode );
|
||||
configfile.setBool("apply_kernel", g_settings.apply_kernel);
|
||||
configfile.setBool("apply_settings", g_settings.apply_settings);
|
||||
configfile.setString("softupdate_url_file" , g_settings.softupdate_url_file );
|
||||
|
||||
configfile.setString("softupdate_proxyserver" , g_settings.softupdate_proxyserver );
|
||||
@@ -1764,6 +1771,7 @@ void CNeutrinoApp::InitSectiondClient()
|
||||
g_Sectionsd = new CSectionsdClient;
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_TIMESET, 222, NEUTRINO_UDS_NAME);
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_GOT_CN_EPG, 222, NEUTRINO_UDS_NAME);
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_EIT_COMPLETE, 222, NEUTRINO_UDS_NAME);
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, 222, NEUTRINO_UDS_NAME);
|
||||
}
|
||||
|
||||
@@ -2059,16 +2067,23 @@ void CNeutrinoApp::quickZap(int msg)
|
||||
|
||||
StopSubtitles();
|
||||
printf("CNeutrinoApp::quickZap haveFreeFrontend %d\n", CFEManager::getInstance()->haveFreeFrontend());
|
||||
#if 0
|
||||
if(!CFEManager::getInstance()->haveFreeFrontend())
|
||||
{
|
||||
res = channelList->numericZap(g_settings.key_zaphistory);
|
||||
StartSubtitles(res < 0);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
bool ret;
|
||||
if(!bouquetList->Bouquets.empty())
|
||||
bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->quickZap(msg, g_settings.zap_cycle);
|
||||
ret = bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->quickZap(msg, g_settings.zap_cycle);
|
||||
else
|
||||
channelList->quickZap(msg);
|
||||
ret = channelList->quickZap(msg);
|
||||
if (!ret) {
|
||||
res = channelList->numericZap(g_settings.key_zaphistory);
|
||||
StartSubtitles(res < 0);
|
||||
}
|
||||
}
|
||||
|
||||
void CNeutrinoApp::numericZap(int msg)
|
||||
@@ -2164,6 +2179,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
||||
InfoClock->StartClock();
|
||||
StartSubtitles();
|
||||
saveSetup(NEUTRINO_SETTINGS_FILE);
|
||||
if (!g_settings.epg_scan)
|
||||
CEpgScan::getInstance()->Clear();
|
||||
}
|
||||
}
|
||||
else if (((msg == CRCInput::RC_tv) || (msg == CRCInput::RC_radio)) && (g_settings.key_tvradio_mode == (int)CRCInput::RC_nokey)) {
|
||||
@@ -2190,7 +2207,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
||||
showInfo();
|
||||
break;
|
||||
case SNeutrinoSettings::VOLUME:
|
||||
g_volume->setVolume(msg, true);
|
||||
g_volume->setVolume(msg);
|
||||
break;
|
||||
default: /* SNeutrinoSettings::ZAP */
|
||||
quickZap(msg);
|
||||
@@ -2210,7 +2227,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
||||
showInfo();
|
||||
break;
|
||||
case SNeutrinoSettings::VOLUME:
|
||||
g_volume->setVolume(msg, true);
|
||||
g_volume->setVolume(msg);
|
||||
break;
|
||||
default: /* SNeutrinoSettings::ZAP */
|
||||
quickZap(msg);
|
||||
@@ -2425,6 +2442,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
|
||||
/* update scan settings for manual scan to current channel */
|
||||
CScanSetup::getInstance()->updateManualSettings();
|
||||
CEpgScan::getInstance()->handleMsg(msg, data);
|
||||
}
|
||||
if ((msg == NeutrinoMessages::EVT_TIMER)) {
|
||||
if(data == scrambled_timer) {
|
||||
@@ -2436,6 +2454,10 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
return messages_return::handled;
|
||||
}
|
||||
}
|
||||
if ((msg == NeutrinoMessages::EVT_EIT_COMPLETE)) {
|
||||
CEpgScan::getInstance()->handleMsg(msg, data);
|
||||
return messages_return::handled;
|
||||
}
|
||||
|
||||
res = res | g_RemoteControl->handleMsg(msg, data);
|
||||
res = res | g_InfoViewer->handleMsg(msg, data);
|
||||
@@ -2637,7 +2659,7 @@ _repeat:
|
||||
}
|
||||
else if ((msg == CRCInput::RC_plus) || (msg == CRCInput::RC_minus))
|
||||
{
|
||||
g_volume->setVolume(msg, (mode != mode_scart));
|
||||
g_volume->setVolume(msg);
|
||||
return messages_return::handled;
|
||||
}
|
||||
else if( msg == CRCInput::RC_spkr ) {
|
||||
@@ -3703,11 +3725,24 @@ bool CNeutrinoApp::changeNotify(const neutrino_locale_t OptionName, void * /*dat
|
||||
return false;
|
||||
}
|
||||
|
||||
void CNeutrinoApp::stopDaemonsForFlash()
|
||||
{
|
||||
stop_daemons(false, true);
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Main programm - no function here *
|
||||
**************************************************************************************/
|
||||
void stop_daemons(bool stopall)
|
||||
void stop_daemons(bool stopall, bool for_flash)
|
||||
{
|
||||
if (for_flash) {
|
||||
CVFD::getInstance()->Clear();
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||
CVFD::getInstance()->ShowText("Stop daemons...");
|
||||
g_settings.epg_scan = false;
|
||||
my_system(NEUTRINO_ENTER_FLASH_SCRIPT);
|
||||
}
|
||||
|
||||
dvbsub_close();
|
||||
tuxtxt_stop();
|
||||
tuxtxt_close();
|
||||
@@ -3723,7 +3758,7 @@ void stop_daemons(bool stopall)
|
||||
}
|
||||
printf("httpd shutdown done\n");
|
||||
CStreamManager::getInstance()->Stop();
|
||||
if(stopall) {
|
||||
if(stopall || for_flash) {
|
||||
printf("timerd shutdown\n");
|
||||
if (g_Timerd)
|
||||
g_Timerd->shutdown();
|
||||
@@ -3738,15 +3773,16 @@ void stop_daemons(bool stopall)
|
||||
#endif
|
||||
tuxtx_stop_subtitle();
|
||||
printf("zapit shutdown\n");
|
||||
if(!stopall && g_settings.hdmi_cec_mode && g_settings.hdmi_cec_standby){
|
||||
if(!for_flash && !stopall && g_settings.hdmi_cec_mode && g_settings.hdmi_cec_standby){
|
||||
videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)0);
|
||||
}
|
||||
|
||||
delete &CMoviePlayerGui::getInstance();
|
||||
CZapit::getInstance()->Stop();
|
||||
printf("zapit shutdown done\n");
|
||||
CVFD::getInstance()->Clear();
|
||||
if(stopall) {
|
||||
if (!for_flash)
|
||||
CVFD::getInstance()->Clear();
|
||||
if(stopall && !for_flash) {
|
||||
if (cpuFreq) {
|
||||
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
||||
delete cpuFreq;
|
||||
@@ -3763,6 +3799,13 @@ void stop_daemons(bool stopall)
|
||||
}
|
||||
cs_deregister_messenger();
|
||||
}
|
||||
|
||||
if (for_flash) {
|
||||
delete CRecordManager::getInstance();
|
||||
delete videoDemux;
|
||||
int ret = my_system(4, "mount", "-no", "remount,ro", "/");
|
||||
printf("remount rootfs readonly %s.\n", (ret == 0)?"successful":"failed"); fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
void stop_video()
|
||||
@@ -3826,7 +3869,7 @@ void CNeutrinoApp::loadKeys(const char * fname)
|
||||
}
|
||||
|
||||
//rc-key configuration
|
||||
g_settings.key_tvradio_mode = tconfig.getInt32( "key_tvradio_mode", CRCInput::RC_nokey );
|
||||
g_settings.key_tvradio_mode = tconfig.getInt32( "key_tvradio_mode", (unsigned int)CRCInput::RC_nokey );
|
||||
g_settings.key_power_off = tconfig.getInt32( "key_power_off", CRCInput::RC_standby );
|
||||
|
||||
g_settings.key_channelList_pageup = tconfig.getInt32( "key_channelList_pageup", CRCInput::RC_page_up );
|
||||
@@ -3836,12 +3879,12 @@ void CNeutrinoApp::loadKeys(const char * fname)
|
||||
g_settings.key_channelList_addrecord = tconfig.getInt32( "key_channelList_addrecord", CRCInput::RC_red );
|
||||
g_settings.key_channelList_addremind = tconfig.getInt32( "key_channelList_addremind", CRCInput::RC_yellow );
|
||||
|
||||
g_settings.key_list_start = tconfig.getInt32( "key_list_start", CRCInput::RC_nokey );
|
||||
g_settings.key_list_end = tconfig.getInt32( "key_list_end", CRCInput::RC_nokey );
|
||||
g_settings.key_list_start = tconfig.getInt32( "key_list_start", (unsigned int)CRCInput::RC_nokey );
|
||||
g_settings.key_list_end = tconfig.getInt32( "key_list_end", (unsigned int)CRCInput::RC_nokey );
|
||||
g_settings.key_timeshift = tconfig.getInt32( "key_timeshift", CRCInput::RC_pause );
|
||||
g_settings.key_plugin = tconfig.getInt32( "key_plugin", CRCInput::RC_nokey );
|
||||
g_settings.key_plugin = tconfig.getInt32( "key_plugin", (unsigned int)CRCInput::RC_nokey );
|
||||
g_settings.key_unlock = tconfig.getInt32( "key_unlock", CRCInput::RC_setup );
|
||||
g_settings.key_screenshot = tconfig.getInt32( "key_screenshot", CRCInput::RC_nokey );
|
||||
g_settings.key_screenshot = tconfig.getInt32( "key_screenshot", (unsigned int)CRCInput::RC_nokey );
|
||||
#ifdef ENABLE_PIP
|
||||
g_settings.key_pip_close = tconfig.getInt32( "key_pip_close", CRCInput::RC_help );
|
||||
g_settings.key_pip_setup = tconfig.getInt32( "key_pip_setup", CRCInput::RC_pos );
|
||||
@@ -3868,6 +3911,7 @@ void CNeutrinoApp::loadKeys(const char * fname)
|
||||
g_settings.mpkey_time = tconfig.getInt32( "mpkey.time", CRCInput::RC_setup );
|
||||
g_settings.mpkey_bookmark = tconfig.getInt32( "mpkey.bookmark", CRCInput::RC_blue );
|
||||
g_settings.mpkey_plugin = tconfig.getInt32( "mpkey.plugin", CRCInput::RC_red );
|
||||
g_settings.mpkey_subtitle = tconfig.getInt32( "mpkey.subtitle", CRCInput::RC_sub );
|
||||
|
||||
/* options */
|
||||
g_settings.menu_left_exit = tconfig.getInt32( "menu_left_exit", 0 );
|
||||
@@ -3931,6 +3975,7 @@ void CNeutrinoApp::saveKeys(const char * fname)
|
||||
tconfig.setInt32( "mpkey.time", g_settings.mpkey_time );
|
||||
tconfig.setInt32( "mpkey.bookmark", g_settings.mpkey_bookmark );
|
||||
tconfig.setInt32( "mpkey.plugin", g_settings.mpkey_plugin );
|
||||
tconfig.setInt32( "mpkey.subtitle", g_settings.mpkey_subtitle );
|
||||
|
||||
tconfig.setInt32( "menu_left_exit", g_settings.menu_left_exit );
|
||||
tconfig.setInt32( "audio_run_player", g_settings.audio_run_player );
|
||||
|
Reference in New Issue
Block a user