bool CZapitSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void * data) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_ZAPITCONFIG_REMAINING_BOUQUET)) { g_Zapit->setRemainingChannelsBouquet((*((int *)data)) != 0); CNeutrinoApp::getInstance()->exec(NULL, "reloadchannels"); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_ZAPITCONFIG_SAVE_LAST_CHANNEL)) { g_Zapit->setSaveLastChannel((*((int *)data)) != 0); if((*((int *)data)) == 0) { for (int i=0; i<2; i++) { toDisable[i]->setActive(true); } } else { for (int i=0; i<2; i++) { toDisable[i]->setActive(false); } } } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_ZAPITCONFIG_SAVE_AUDIO_PID)) { g_Zapit->setSaveAudioPIDs((*((int *)data)) != 0); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_ZAPITCONFIG_UNCOMMITTED_SWITCH)) { g_Zapit->setUncommittedSwitchMode(*(int *)data); } return true; }
bool CVideoSetup::changeNotify(const neutrino_locale_t OptionName, void *) { bool ret = false; CNeutrinoApp * neutrino = CNeutrinoApp::getInstance(); if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOSIGNAL)) { while ((vcr_video_out_signal) == CControldClient::VIDEOOUTPUT_SVIDEO && (video_out_signal != CControldClient::VIDEOOUTPUT_SVIDEO) && (video_out_signal != CControldClient::VIDEOOUTPUT_COMPOSITE) ) { video_out_signal = (video_out_signal + 1) % VIDEOMENU_VIDEOSIGNAL_OPTION_COUNT; ret = true; } g_Controld->setVideoOutput(video_out_signal); if (VcrVideoOutSignalOptionChooser) VcrVideoOutSignalOptionChooser->setActive((video_out_signal == CControldClient::VIDEOOUTPUT_COMPOSITE) || (video_out_signal == CControldClient::VIDEOOUTPUT_SVIDEO)); #ifdef HAVE_DBOX_HARDWARE SyncControlerForwarder->setActive((video_out_signal == CControldClient::VIDEOOUTPUT_RGB) || (video_out_signal == CControldClient::VIDEOOUTPUT_YUV_VBS) || (video_out_signal == CControldClient::VIDEOOUTPUT_YUV_CVBS)); #endif } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VCRSIGNAL)) { g_Controld->setVCROutput(vcr_video_out_signal); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOFORMAT) && (neutrino->getMode() != NeutrinoMessages::mode_radio)) { g_Controld->setVideoFormat(g_settings.video_Format); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOFORMAT_BG) && (neutrino->getMode() == NeutrinoMessages::mode_radio)) { g_Controld->setVideoFormat(g_settings.video_backgroundFormat); } return ret; }
bool CVfdSetup::changeNotify(const neutrino_locale_t OptionName, void */* data */) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESS)) { CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); CVFD::getInstance()->setBrightness(brightness); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY)) { CVFD::getInstance()->setMode(CVFD::MODE_STANDBY); CVFD::getInstance()->setBrightnessStandby(brightnessstandby); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESSDEEPSTANDBY)) { CVFD::getInstance()->setBrightnessDeepStandby(brightnessdeepstandby); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LEDCONTROLER_MODE_TV)) { CVFD::getInstance()->setled(); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LEDCONTROLER_BACKLIGHT_TV)) { CVFD::getInstance()->setBacklight(g_settings.backlight_tv); } return false; }
bool CCECSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) { #if HAVE_SPARK_HARDWARE if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_CEC_MODE)) { printf("[neutrino CEC Settings] %s set CEC settings...\n", __FUNCTION__); cec1->setActive(g_settings.hdmi_cec_mode != 0); cec2->setActive(g_settings.hdmi_cec_mode != 0); CKernelOptions ko; ko.Enable("cec", g_settings.hdmi_cec_mode != 0); g_settings.hdmi_cec_mode = ko.isEnabled("cec"); } #else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_CEC_MODE)) { printf("[neutrino CEC Settings] %s set CEC settings...\n", __FUNCTION__); cec1->setActive(g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF); cec2->setActive(g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF); videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)g_settings.hdmi_cec_mode); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_CEC_STANDBY)) { videoDecoder->SetCECAutoStandby(g_settings.hdmi_cec_standby == 1); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_CEC_VIEW_ON)) { videoDecoder->SetCECAutoView(g_settings.hdmi_cec_view_on == 1); } #endif return false; }
bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* data */) { #if HAVE_SPARK_HARDWARE if (ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_ACCEPT_OTHER_REMOTES)) { struct sockaddr_un sun; memset(&sun, 0, sizeof(sun)); sun.sun_family = AF_UNIX; strcpy(sun.sun_path, "/var/run/lirc/lircd"); int lircd_sock = socket(AF_UNIX, SOCK_STREAM, 0); if (lircd_sock > -1) { if (!connect(lircd_sock, (struct sockaddr *) &sun, sizeof(sun))) { if (g_settings.accept_other_remotes) write(lircd_sock, "PREDATA_UNLOCK\n", 16); else write(lircd_sock, "PREDATA_LOCK\n", 14); } close(lircd_sock); } // work around junk data sent by vfd controller sleep(2); g_RCInput->clearRCMsg(); return false; } #endif if (ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC) || ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_REPEATBLOCK)) { unsigned int fdelay = g_settings.repeat_blocker; unsigned int xdelay = g_settings.repeat_genericblocker; g_RCInput->repeat_block = fdelay * 1000; g_RCInput->repeat_block_generic = xdelay * 1000; int fd = g_RCInput->getFileHandle(); #ifdef HAVE_COOL_HARDWARE ioctl(fd, IOC_IR_SET_F_DELAY, fdelay); ioctl(fd, IOC_IR_SET_X_DELAY, xdelay); #else /* if we have a good input device, we don't need the private ioctl above */ struct input_event ie; memset(&ie, 0, sizeof(ie)); ie.type = EV_REP; /* increase by 10 ms to trick the repeat checker code in the * rcinput loop into accepting the key event... */ ie.value = fdelay + 10; ie.code = REP_DELAY; if (write(fd, &ie, sizeof(ie)) == -1) perror("CKeySetupNotifier::changeNotify REP_DELAY"); ie.value = xdelay + 10; ie.code = REP_PERIOD; if (write(fd, &ie, sizeof(ie)) == -1) perror("CKeySetupNotifier::changeNotify REP_PERIOD"); #endif } return false; }
bool CRecordSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE) || ARE_LOCALES_EQUAL(OptionName, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER)) { g_Timerd->setRecordingSafety(g_settings.record_safety_time_before*60, g_settings.record_safety_time_after*60); } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_RECORDINGMENU_APIDS_STD) || ARE_LOCALES_EQUAL(OptionName, LOCALE_RECORDINGMENU_APIDS_ALT) || ARE_LOCALES_EQUAL(OptionName, LOCALE_RECORDINGMENU_APIDS_AC3)) { g_settings.recording_audio_pids_default = ( (g_settings.recording_audio_pids_std ? TIMERD_APIDS_STD : 0) | (g_settings.recording_audio_pids_alt ? TIMERD_APIDS_ALT : 0) | (g_settings.recording_audio_pids_ac3 ? TIMERD_APIDS_AC3 : 0)); } return false; }
bool CAudioSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void *) { //printf("notify: %d\n", OptionName); if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_PCMOFFSET)) { if (g_settings.audio_avs_Control == CControld::TYPE_LIRC) g_Controld->setVolume(100 - g_settings.audio_PCMOffset, CControld::TYPE_OST); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_ANALOGOUT)) { g_Zapit->setAudioMode(g_settings.audio_AnalogMode); } return false; }
bool CMiscMenue::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) { int ret = menu_return::RETURN_NONE; if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_CEC)) { printf("[neutrino CEC Settings] %s set CEC settings...\n", __FUNCTION__); g_settings.hdmi_cec_standby = 0; g_settings.hdmi_cec_view_on = 0; if (g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF) { g_settings.hdmi_cec_standby = 1; g_settings.hdmi_cec_view_on = 1; g_settings.hdmi_cec_mode = VIDEO_HDMI_CEC_MODE_TUNER; } videoDecoder->SetCECAutoStandby(g_settings.hdmi_cec_standby == 1); videoDecoder->SetCECAutoView(g_settings.hdmi_cec_view_on == 1); videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)g_settings.hdmi_cec_mode); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SAVE)) { if (g_settings.epg_save) g_settings.epg_read = true; epg_save_standby->setActive(g_settings.epg_save); epg_save_frequently->setActive(g_settings.epg_save); epg_dir->setActive(g_settings.epg_save || g_settings.epg_read); CNeutrinoApp::getInstance()->SendSectionsdConfig(); ret = menu_return::RETURN_REPAINT; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_READ)) { epg_dir->setActive(g_settings.epg_save || g_settings.epg_read); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SCAN)) { epg_scan->setActive(g_settings.epg_scan_mode != CEpgScan::MODE_OFF && g_settings.epg_save_mode == 0); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SAVE_MODE)) { g_settings.epg_scan = CEpgScan::SCAN_FAV; epg_scan->setActive(g_settings.epg_scan_mode != CEpgScan::MODE_OFF && g_settings.epg_save_mode == 0); ret = menu_return::RETURN_REPAINT; } return ret; }
bool CAudioSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void *) { dprintf(DEBUG_NORMAL, "CAudioSetupNotifier::changeNotify\n"); if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_ANALOGOUT)) { //g_Zapit->setAudioMode(g_settings.audio_AnalogMode); if(audioDecoder) audioDecoder->setChannel(g_settings.audio_AnalogMode); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_HDMI_DD)) { if(audioDecoder) audioDecoder->SetHdmiDD(g_settings.hdmi_dd ); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_AVSYNC)) { #if defined (PLATFORM_COOLSTREAM) videoDecoder->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); audioDecoder->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); videoDemux->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); audioDemux->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); pcrDemux->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); #else if(videoDecoder) videoDecoder->SetSyncMode(g_settings.avsync); if(audioDecoder) audioDecoder->SetSyncMode(g_settings.avsync); #endif } #if !defined (PLATFORM_COOLSTREAM) else if( ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_AC3_DELAY) ) { if(audioDecoder) audioDecoder->setHwAC3Delay(g_settings.ac3_delay); } else if( ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_PCM_DELAY) ) { if(audioDecoder) audioDecoder->setHwPCMDelay(g_settings.pcm_delay); } #endif return true; }
/************************************************************************************** * changeNotify - features menu recording start / stop * **************************************************************************************/ bool CUserMenu::changeNotify(const neutrino_locale_t OptionName, void * Data) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_PAUSESECTIONSD)) { g_Sectionsd->setPauseScanning((*((int *)Data)) == 0); } return false; }
bool CCAMMenuHandler::changeNotify(const neutrino_locale_t OptionName, void * /*Data*/) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_CLOCK)) { printf("CCAMMenuHandler::changeNotify: ci_clock %d\n", g_settings.ci_clock); ca->SetTSClock(g_settings.ci_clock * 1000000); return true; } return false; }
bool CFontSizeNotifier::changeNotify(const neutrino_locale_t OptionName, void * data) { if (data != NULL) { int xre = g_settings.screen_xres; int yre = g_settings.screen_yres; char dat[4]; char val[4]; sscanf((char*) data, "%hhu", &dat[0]); sprintf(val, "%hhu", dat[0]); if (ARE_LOCALES_EQUAL(OptionName, LOCALE_FONTMENU_SCALING_X)) { xre = atoi(val); //fallback for min/max bugs ;) if( xre < 50 || xre > 200 ) { xre = g_settings.screen_xres; snprintf((char *)data,sizeof(data), "%03d",g_settings.screen_xres); } } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_FONTMENU_SCALING_Y)) { yre = atoi(val); if( yre < 50 || yre > 200 ) { yre = g_settings.screen_yres; snprintf((char *)data,sizeof(data), "%03d",g_settings.screen_yres); } } if (xre != g_settings.screen_xres || yre != g_settings.screen_yres) { printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", xre, yre); g_settings.screen_xres = xre; g_settings.screen_yres = yre; } } CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FONTSIZE_HINT)); // UTF-8 hintBox.paint(); CNeutrinoApp::getInstance()->SetupFonts(); hintBox.hide(); return true; }
void CVfdSetup::activateNotify(const neutrino_locale_t OptionName) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY)) { g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] = brightnessstandby; CVFD::getInstance()->setMode(CVFD::MODE_STANDBY); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESSDEEPSTANDBY)) { g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] = brightnessdeepstandby; CVFD::getInstance()->setMode(CVFD::MODE_STANDBY); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESS)) { g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS] = brightness; CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDMENU_DIM_BRIGHTNESS)) { g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS] = g_settings.lcd_setting_dim_brightness; CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); } else { g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS] = brightness; CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8); } }
bool CGeneralSettings::changeNotify(const neutrino_locale_t OptionName, void */*data*/) { dprintf(DEBUG_NORMAL, "CGeneralSettings::changeNotify:\n"); if(ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_RADIOTEXT)) { bool usedBackground = CFrameBuffer::getInstance()->getuseBackground(); if (g_settings.radiotext_enable) { // if (g_Radiotext == NULL) g_Radiotext = new CRadioText; if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio)) { // hide radiomode background pic if (usedBackground) { CFrameBuffer::getInstance()->saveBackgroundImage(); CFrameBuffer::getInstance()->ClearFrameBuffer(); CFrameBuffer::getInstance()->blit(); } if(live_fe) g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); } } else { if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio)) { // restore previous background if (usedBackground) { CFrameBuffer::getInstance()->restoreBackgroundImage(); CFrameBuffer::getInstance()->useBackground(true); CFrameBuffer::getInstance()->paintBackground(); CFrameBuffer::getInstance()->blit(); } CFrameBuffer::getInstance()->loadBackgroundPic("radiomode.jpg"); CFrameBuffer::getInstance()->blit(); } delete g_Radiotext; g_Radiotext = NULL; } return true; } return false; }
bool CCAMMenuHandler::changeNotify(const neutrino_locale_t OptionName, void * Data) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_CLOCK)) { printf("CCAMMenuHandler::changeNotify: ci_clock %d\n", g_settings.ci_clock); ca->SetTSClock(g_settings.ci_clock * 1000000); return true; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_SAVE_PINCODE)) { int enabled = *(int *) Data; if (!enabled) { printf("CCAMMenuHandler::changeNotify: clear saved pincode\n"); g_settings.ci_pincode.clear(); } } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_TUNER)) { printf("CCAMMenuHandler::changeNotify: bind CI to tuner %d\n", g_settings.ci_tuner); CCamManager::getInstance()->SetCITuner(g_settings.ci_tuner); } return false; }
bool CZapitSetup::changeNotify(const neutrino_locale_t OptionName, void *) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_ZAPIT)) { zapit1->setActive(!g_settings.uselastchannel); zapit2->setActive(!g_settings.uselastchannel); zapit3->setActive(!g_settings.uselastchannel); } return true; }
bool CTimingSettingsNotifier::changeNotify(const neutrino_locale_t OptionName, void *) { for (int i = 0; i < TIMING_SETTING_COUNT; i++) { if (ARE_LOCALES_EQUAL(OptionName, timing_setting[i].name)) { g_settings.timing[i] = atoi(g_settings.timing_string[i]); return true; } } return false; }
bool CMiscMenue::changeNotify(const neutrino_locale_t OptionName, void *) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT)) { printf("[neutrino] shutdown counter changed to %d minutes\n", atoi(g_settings.shutdown_count)); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_CACHE) || ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE) || ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS) || ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS)) { CNeutrinoApp::getInstance()->SendSectionsdConfig(); } #ifndef TUXTXT_CFG_STANDALONE else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_TUXTXT_CACHE)) { int vtpid = g_RemoteControl->current_PIDs.PIDs.vtxtpid; if (g_settings.tuxtxt_cache) { tuxtxt_init(); if (vtpid) tuxtxt_start(vtpid); } else { tuxtxt_stop(); tuxtxt_close(); } } #endif return false; }
bool CVideoSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void *) { dprintf(DEBUG_NORMAL, "CVideoSetupNotifier::changeNotify\n"); CFrameBuffer *frameBuffer = CFrameBuffer::getInstance(); if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_ANALOG_MODE)) /* video analoue mode */ { if(videoDecoder) #if defined (PLATFORM_COOLSTREAM) videoDecoder->SetVideoMode((analog_mode_t) g_settings.analog_mode); #else videoDecoder->SetAnalogMode(g_settings.analog_mode); #endif } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEORATIO) || ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOFORMAT )) // format aspect-ratio { if(videoDecoder) videoDecoder->setAspectRatio(g_settings.video_Ratio, g_settings.video_Format); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOMODE)) // mode { if(videoDecoder) videoDecoder->SetVideoSystem(g_settings.video_Mode); // clear screen frameBuffer->paintBackground(); #ifdef FB_BLIT frameBuffer->blit(); #endif if(prev_video_Mode != g_settings.video_Mode) { if(MessageBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_VIDEOMODE_OK), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_INFO) != CMessageBox::mbrYes) { g_settings.video_Mode = prev_video_Mode; if(videoDecoder) videoDecoder->SetVideoSystem(g_settings.video_Mode); //no-> return to prev mode } else { prev_video_Mode = g_settings.video_Mode; } } } #if !defined (PLATFORM_COOLSTREAM) else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_COLOR_SPACE)) { if(videoDecoder) videoDecoder->SetSpaceColour(g_settings.hdmi_color_space); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_WSS)) { if(videoDecoder) videoDecoder->SetWideScreen(g_settings.wss_mode); } #endif return true; }
bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void *) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_OSDSETTINGS_ROUNDED_CORNERS)) { osd_setup->hide(); return true; } #ifdef ENABLE_RADIOTEXT else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_OSDSETTINGS_INFOVIEWER_RADIOTEXT)) { if (g_settings.radiotext_enable) { if (g_Radiotext == NULL) g_Radiotext = new CRadioText; if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio)) g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); } else { // stop radiotext PES decoding if (g_Radiotext) g_Radiotext->radiotext_stop(); delete g_Radiotext; g_Radiotext = NULL; } return false; } #endif for (int i = 0; i < TIMING_SETTING_COUNT; i++) { if (ARE_LOCALES_EQUAL(OptionName, timing_setting[i].name)) { g_settings.timing[i] = atoi(g_settings.timing_string[i]); return true; } } return false; }
bool CDriverBootSetup::changeNotify(const neutrino_locale_t OptionName, void *) { #ifdef HAVE_DBOX_HARDWARE if (ARE_LOCALES_EQUAL(OptionName, LOCALE_DRIVERSETTINGS_SPTSMODE)) { if (g_settings.misc_spts) g_Zapit->PlaybackSPTS(); else g_Zapit->PlaybackPES(); } #endif return false; }
bool CNetworkSetup::changeNotify(const neutrino_locale_t OptionName, void * Data) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_NETWORKMENU_IPADDRESS)) { char ip[16]; unsigned char _ip[4]; sscanf((char*) Data, "%hhu.%hhu.%hhu.%hhu", &_ip[0], &_ip[1], &_ip[2], &_ip[3]); sprintf(ip, "%hhu.%hhu.%hhu.255", _ip[0], _ip[1], _ip[2]); networkConfig->broadcast = ip; network_broadcast = networkConfig->broadcast; networkConfig->netmask = (_ip[0] == 10) ? "255.0.0.0" : "255.255.255.0"; network_netmask = networkConfig->netmask; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_NETWORKMENU_NTPSERVER) || ARE_LOCALES_EQUAL(OptionName, LOCALE_NETWORKMENU_NTPREFRESH) || ARE_LOCALES_EQUAL(OptionName, LOCALE_NETWORKMENU_NTPENABLE)) { CNeutrinoApp::getInstance()->SendSectionsdConfig(); } return false; }
bool CChannelListSettings::changeNotify(const neutrino_locale_t OptionName, void */*data*/) { dprintf(DEBUG_NORMAL, "CChannelListSettings::changeNotify:\n"); if(ARE_LOCALES_EQUAL(OptionName, LOCALE_CHANNELLIST_MAKE_HDLIST)) { CNeutrinoApp::getInstance()->channelsInit(); CNeutrinoApp::getInstance()->channelList->adjustToChannelID(live_channel_id);//FIXME return true; } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ZAPIT_MAKE_BOUQUET)) { setZapitConfig(&zapitCfg); CNeutrinoApp::getInstance()->channelsInit(); CNeutrinoApp::getInstance()->channelList->adjustToChannelID(live_channel_id);//FIXME return true; } return false; }
bool CVolume::changeNotify(const neutrino_locale_t OptionName, void * data) { bool ret = false; if (ARE_LOCALES_EQUAL(OptionName, NONEXISTANT_LOCALE)) { int percent = *(int *) data; int vol = CZapit::getInstance()->GetVolume(); /* keep resulting volume = (vol * percent)/100 not more than 115 */ if (vol * percent > 11500) percent = 11500 / vol; printf("CVolume::changeNotify: percent %d\n", percent); CZapit::getInstance()->SetPidVolume(channel_id, apid, percent); CZapit::getInstance()->SetVolumePercent(percent); *(int *) data = percent; } return ret; }
bool CVfdSetup::changeNotify(const neutrino_locale_t OptionName, void * /* data */) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESS)) { CVFD::getInstance()->setBrightness(brightness); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY)) { CVFD::getInstance()->setBrightnessStandby(brightnessstandby); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDCONTROLER_BRIGHTNESSDEEPSTANDBY)) { CVFD::getInstance()->setBrightnessStandby(brightnessdeepstandby); CVFD::getInstance()->setBrightnessDeepStandby(brightnessdeepstandby); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDMENU_DIM_BRIGHTNESS)) { CVFD::getInstance()->setBrightness(g_settings.lcd_setting_dim_brightness); #if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LEDCONTROLER_MODE_TV)) { CVFD::getInstance()->setled(); #endif } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LEDCONTROLER_BACKLIGHT_TV)) { CVFD::getInstance()->setBacklight(g_settings.backlight_tv); } return false; }
bool CMiscMenue::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) { int ret = menu_return::RETURN_NONE; if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_CEC)) { printf("[neutrino CEC Settings] %s set CEC settings...\n", __FUNCTION__); g_settings.hdmi_cec_standby = 0; g_settings.hdmi_cec_view_on = 0; if (g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF) { g_settings.hdmi_cec_standby = 1; g_settings.hdmi_cec_view_on = 1; g_settings.hdmi_cec_mode = VIDEO_HDMI_CEC_MODE_TUNER; } videoDecoder->SetCECAutoStandby(g_settings.hdmi_cec_standby == 1); videoDecoder->SetCECAutoView(g_settings.hdmi_cec_view_on == 1); videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)g_settings.hdmi_cec_mode); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SAVE)) { if (g_settings.epg_save) g_settings.epg_read = true; epg_save_standby->setActive(g_settings.epg_save); epg_save_frequently->setActive(g_settings.epg_save); epg_dir->setActive(g_settings.epg_save || g_settings.epg_read); CNeutrinoApp::getInstance()->SendSectionsdConfig(); ret = menu_return::RETURN_REPAINT; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_READ)) { epg_read_frequently->setActive(g_settings.epg_read); epg_read_now->setActive(g_settings.epg_read); epg_dir->setActive(g_settings.epg_read || g_settings.epg_save); CNeutrinoApp::getInstance()->SendSectionsdConfig(); ret = menu_return::RETURN_REPAINT; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_READ_FREQUENTLY)) { g_settings.epg_read_frequently = g_settings.epg_read ? g_settings.epg_read_frequently : 0; CNeutrinoApp::getInstance()->SendSectionsdConfig(); ret = menu_return::RETURN_REPAINT; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SAVE_FREQUENTLY)) { g_settings.epg_save_frequently = g_settings.epg_save ? g_settings.epg_save_frequently : 0; CNeutrinoApp::getInstance()->SendSectionsdConfig(); ret = menu_return::RETURN_REPAINT; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SCAN)) { epg_scan->setActive(g_settings.epg_scan_mode != CEpgScan::MODE_OFF && g_settings.epg_save_mode == 0); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SAVE_MODE)) { g_settings.epg_scan = CEpgScan::SCAN_FAV; epg_scan->setActive(g_settings.epg_scan_mode != CEpgScan::MODE_OFF && g_settings.epg_save_mode == 0); ret = menu_return::RETURN_REPAINT; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_TMDB_API_KEY)) { g_settings.tmdb_enabled = check_tmdb_api_key(); if (g_settings.tmdb_enabled) tmdb_api_key_short = g_settings.tmdb_api_key.substr(0, 8) + "..."; else tmdb_api_key_short.clear(); tmdb_onoff->setActive(g_settings.tmdb_enabled); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_YOUTUBE_DEV_ID)) { g_settings.youtube_enabled = check_youtube_dev_id(); if (g_settings.youtube_enabled) youtube_dev_id_short = g_settings.youtube_dev_id.substr(0, 8) + "..."; else youtube_dev_id_short.clear(); youtube_onoff->setActive(g_settings.youtube_enabled); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SHOUTCAST_DEV_ID)) { g_settings.shoutcast_enabled = check_shoutcast_dev_id(); if (g_settings.shoutcast_enabled) shoutcast_dev_id_short = g_settings.shoutcast_dev_id.substr(0, 8) + "..."; else shoutcast_dev_id_short.clear(); shoutcast_onoff->setActive(g_settings.shoutcast_enabled); } return ret; }
bool CAudioSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void *) #endif { //printf("notify: %d\n", OptionName); #if 0 //FIXME to do ? manual audio delay if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_PCMOFFSET)) { } #endif if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_ANALOG_MODE)) { g_Zapit->setAudioMode(g_settings.audio_AnalogMode); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_ANALOG_OUT)) { audioDecoder->EnableAnalogOut(g_settings.analog_out ? true : false); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_HDMI_DD)) { audioDecoder->SetHdmiDD((HDMI_ENCODED_MODE) g_settings.hdmi_dd); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_SPDIF_DD)) { audioDecoder->SetSpdifDD(g_settings.spdif_dd ? true : false); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_AVSYNC)) { videoDecoder->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); audioDecoder->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); videoDemux->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); audioDemux->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); pcrDemux->SetSyncMode((AVSYNC_TYPE)g_settings.avsync); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_CLOCKREC)) { //.Clock recovery enable/disable // FIXME add code here. #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_MIXER_VOLUME_ANALOG)) { audioDecoder->setMixerVolume("Analog", (long)(*((int *)(data)))); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_MIXER_VOLUME_HDMI)) { audioDecoder->setMixerVolume("HDMI", (long)(*((int *)(data)))); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_MIXER_VOLUME_SPDIF)) { audioDecoder->setMixerVolume("SPDIF", (long)(*((int *)(data)))); #endif } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIO_SRS_ALGO) || ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIO_SRS_NMGR) || ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIO_SRS_VOLUME)) { audioDecoder->SetSRS(g_settings.srs_enable, g_settings.srs_nmgr_enable, g_settings.srs_algo, g_settings.srs_ref_volume); } return false; }