diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 2bc9bdebf..5e9d13d8d 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -114,6 +114,8 @@ audiomenu.avsync_am Audio master audiomenu.clockrec audiomenu.dolbydigital DD-Unterkanal automatisch audiomenu.hdmi_dd DolbyDigital über HDMI +audiomenu.hdmi_dd_auto automatisch +audiomenu.hdmi_dd_force erzwingen audiomenu.monoleft mono links audiomenu.monoright mono rechts audiomenu.pref_lang Sprache @@ -341,7 +343,7 @@ extra.key_timeshift Timeshift extra.key_unlock Entsperrtaste extra.ladirection Breitengrad-Ausrichtung extra.latitude Breitengrad -extra.loadconfig Lade Einstellungen von +extra.loadconfig Neutrino-Einstellungen: Laden von extra.loadkeys Lade Tastenbelegung von extra.lodirection Längengrad-Ausrichtung extra.logo Logonummer @@ -353,7 +355,7 @@ extra.rotor_swap Rotor dreht Ost/West extra.rounded_corners Eckendarstellung extra.rounded_corners_off eckig extra.rounded_corners_on abgerundet -extra.saveconfig Speichere Einstellungen als +extra.saveconfig Neutrino-Einstellungen: Sichern als extra.savekeys Speichere Tastenbelegung als extra.scan_fast Schnell extra.scan_full Total @@ -1190,13 +1192,14 @@ scrambled_channel Verschlüsselung aktiv screensetup.lowerright grün = Bildrand unten, rechts screensetup.upperleft rot = Bildrand oben, links screenshot.count Screenshot Anzahl -screenshot.cover Film Cover -screenshot.defdir Screenshot Dir. +screenshot.cover Erzeuge Filmcover für Moviebrowser +screenshot.defdir Screenshot Verzeichnis screenshot.format Screenshot Format screenshot.info Screenshot Taste ist nicht belegt screenshot.menu Screenshot screenshot.osd OSD Auflösung -screenshot.scale Scale +screenshot.res Screenshot Auflösung +screenshot.scale Screenshot Skalierung screenshot.tv TV Auflösung screenshot.video Screenshot mit Video Hintergrund servicemenu.getplugins Plugins neu laden @@ -1210,7 +1213,7 @@ servicemenu.restart_hint Neutrino wird neu gestartet... servicemenu.restart_refused_recording Aufnahme läuft. Neustart nicht möglich. servicemenu.scants Kanalsuche servicemenu.update Software-Aktualisierung -settings.backup Alle Settings sichern +settings.backup Image-Einstellungen: Sichern settings.backup_failed Sicherung fehlgeschlagen! settings.help Hilfe settings.menu_pos Menüposition @@ -1222,7 +1225,7 @@ settings.pos_default_center oben Mitte settings.pos_higher_center unten Mitte settings.pos_top_left oben links settings.pos_top_right oben rechts -settings.restore Wiederherstellen aller Settings +settings.restore Image-Einstellungen: Wiederherstellen settings.restore_warn Alle Settings werden ersetzt.\nDie Box wird neu gestartet.\nWeiter? shutdown.recoding_query Aufnahme läuft. Trotzdem beenden? shutdowntimer.announce Die Box wird in 1 Min. heruntergefahren.\nShutdown abbrechen? diff --git a/data/locale/english.locale b/data/locale/english.locale index bca36159c..8ff6fcd75 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -114,6 +114,8 @@ audiomenu.avsync_am Audio master audiomenu.clockrec audiomenu.dolbydigital Prefer Dolby Digital audiomenu.hdmi_dd Encoded DD on HDMI +audiomenu.hdmi_dd_auto auto +audiomenu.hdmi_dd_force force audiomenu.monoleft mono left audiomenu.monoright mono right audiomenu.pref_lang Prefered language @@ -342,7 +344,7 @@ extra.key_timeshift Timeshift extra.key_unlock Unlock key extra.ladirection LaDirection extra.latitude Latitude -extra.loadconfig Load settings from +extra.loadconfig Neutrino-Settings: Load from extra.loadkeys Load keys from extra.lodirection LoDirection extra.logo Logo number @@ -354,7 +356,7 @@ extra.rotor_swap Swap rotor east/west extra.rounded_corners Shape of corners extra.rounded_corners_off angular extra.rounded_corners_on rounded -extra.saveconfig Save settings as +extra.saveconfig Neutrino-Settings: Save as extra.savekeys Save keys as extra.scan_fast Fast extra.scan_full Full @@ -1192,15 +1194,16 @@ scrambled_channel Scrambled channel screensetup.lowerright green = setup lower right screensetup.upperleft red = setup upper left screenshot.count Screenshot count -screenshot.cover Movie Cover -screenshot.defdir Screenshot dir. +screenshot.cover Create Moviecover for Moviebrowser +screenshot.defdir Screenshot directory screenshot.format Screenshot format -screenshot.info Screenshot Key is not used +screenshot.info Screenshot key is unused screenshot.menu Screenshot screenshot.osd OSD resolution -screenshot.scale Scale +screenshot.res Screenshot resolution +screenshot.scale Screenshot scale screenshot.tv TV resolution -screenshot.video Screenshot with Video background +screenshot.video Screenshot with video background servicemenu.getplugins Reload plugins servicemenu.getplugins_hint Reloading plugins,\nplease be patient. servicemenu.head Service @@ -1212,7 +1215,7 @@ servicemenu.restart_hint Restarting, please wait servicemenu.restart_refused_recording Cant restart, recording in progress servicemenu.scants Servicescan servicemenu.update Software Update -settings.backup Backup all settings +settings.backup Image-Settings: Backup settings.backup_failed Backup failed! settings.help Help settings.menu_pos Menu position @@ -1224,7 +1227,7 @@ settings.pos_default_center top center settings.pos_higher_center higher center settings.pos_top_left top left settings.pos_top_right top right -settings.restore Restore all settings +settings.restore Image-Settings: Restore settings.restore_warn This will replace all settings and reboot\nContinue ? shutdown.recoding_query You really want to to stop record ? shutdowntimer.announce Box will shutdown in 1 min.\nCancel Shutdown ? diff --git a/data/scripts/backup.sh b/data/scripts/backup.sh index 5bc2ae37d..d9998007e 100755 --- a/data/scripts/backup.sh +++ b/data/scripts/backup.sh @@ -5,9 +5,10 @@ USRF="/var/tuxbox/config/tobackup.conf" if [ -e "${USRF}" ]; then # read user-files from $USRF + TOBACKUP="${USRF}" while read i - do [ "${i:0:1}" = "#" ] || TOBACKUP="$TOBACKUP ${i%%#*}" - done < $USRF + do [ "${i:0:1}" = "#" ] || TOBACKUP="$TOBACKUP ${i%%#*}" + done < $USRF else TOBACKUP="/var/tuxbox/config/" diff --git a/lib/libcoolstream/audio_cs.h b/lib/libcoolstream/audio_cs.h index 34bd06340..049407260 100644 --- a/lib/libcoolstream/audio_cs.h +++ b/lib/libcoolstream/audio_cs.h @@ -5,6 +5,7 @@ /* */ /* (C) 2008 CoolStream International */ /* */ +/* $Id:: $ */ /*******************************************************************************/ #ifndef __AUDIO_CS_H_ #define __AUDIO_CS_H_ @@ -37,6 +38,36 @@ typedef enum { AUDIO_FMT_ADVANCED = AUDIO_FMT_MLP } AUDIO_FORMAT; +typedef enum { + HDMI_ENCODED_OFF, + HDMI_ENCODED_AUTO, + HDMI_ENCODED_FORCED +} HDMI_ENCODED_MODE; + +typedef enum +{ + HDMI_AUDIO_FMT_LPCM = 0x1, + HDMI_AUDIO_FMT_AC3 , + HDMI_AUDIO_FMT_MPEG1 , + HDMI_AUDIO_FMT_MP3 , + HDMI_AUDIO_FMT_MPEG2 , + HDMI_AUDIO_FMT_AAC , + HDMI_AUDIO_FMT_DTS , + HDMI_AUDIO_FMT_ATRAC +} HDMI_AUDIO_FORMAT; + +#define CS_MAX_AUDIO_FORMATS 10 + +typedef struct cs_audio_format { + HDMI_AUDIO_FORMAT format; + unsigned int max_channels; +} cs_audio_format_t; + +typedef struct cs_audio_caps { + unsigned char count; + cs_audio_format_t formats[CS_MAX_AUDIO_FORMATS]; +} cs_audio_caps_t; + class cAudio { private: CS_AUDIO_PDATA *privateData; @@ -57,7 +88,7 @@ private: int volume; bool clip_started; - bool hdmiDD; + HDMI_ENCODED_MODE hdmiDD; bool spdifDD; bool hasMuteScheduled; bool analogOut; @@ -110,10 +141,12 @@ public: void getAudioInfo(int &Type, int &Layer, int &Freq, int &Bitrate, int &Mode); void SetSRS(int iq_enable, int nmgr_enable, int iq_mode, int iq_level); bool IsHdmiDDSupported(void); - void SetHdmiDD(bool Enable); + void SetHdmiDD(HDMI_ENCODED_MODE type); void SetSpdifDD(bool Enable); void ScheduleMute(bool On); void EnableAnalogOut(bool Enable); + bool GetHdmiAudioCaps(cs_audio_caps_t &caps); + bool IsHdmiAudioFormatSupported(HDMI_AUDIO_FORMAT format); }; #endif //__AUDIO_CS_H_ diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index 46e912a68..11c5e5100 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -78,7 +78,8 @@ bool CScreenShot::GetData() #ifdef USE_NEVIS_GXA CFrameBuffer::getInstance()->setActive(false); #endif - + if (videoDecoder->getBlank()) + get_video = false; #if 1 // to enable after libcs/drivers update res = videoDecoder->GetScreenImage(pixel_data, xres, yres, get_video, get_osd, scale_to_video); #endif diff --git a/src/gui/audio_setup.cpp b/src/gui/audio_setup.cpp index 27f290c40..b6483b232 100644 --- a/src/gui/audio_setup.cpp +++ b/src/gui/audio_setup.cpp @@ -103,6 +103,14 @@ const CMenuOptionChooser::keyval AUDIOMENU_AVSYNC_OPTIONS[AUDIOMENU_AVSYNC_OPTIO { 2, LOCALE_AUDIOMENU_AVSYNC_AM } }; +#define AUDIOMENU_HDMI_DD_OPTION_COUNT 3 +const CMenuOptionChooser::keyval AUDIOMENU_HDMI_DD_OPTIONS[AUDIOMENU_HDMI_DD_OPTION_COUNT] = +{ + { HDMI_ENCODED_OFF, LOCALE_OPTIONS_OFF }, + { HDMI_ENCODED_AUTO, LOCALE_AUDIOMENU_HDMI_DD_AUTO }, + { HDMI_ENCODED_FORCED, LOCALE_AUDIOMENU_HDMI_DD_FORCE } +}; + // #define AUDIOMENU_CLOCKREC_OPTION_COUNT 2 // const CMenuOptionChooser::keyval AUDIOMENU_CLOCKREC_OPTIONS[AUDIOMENU_CLOCKREC_OPTION_COUNT] = // { @@ -125,7 +133,7 @@ int CAudioSetup::showAudioSetup() CMenuOptionChooser * as_oj_ddsubchn = new CMenuOptionChooser(LOCALE_AUDIOMENU_DOLBYDIGITAL, &g_settings.audio_DolbyDigital, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); //dd via hdmi - CMenuOptionChooser * as_oj_dd_hdmi = new CMenuOptionChooser(LOCALE_AUDIOMENU_HDMI_DD, &g_settings.hdmi_dd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); + CMenuOptionChooser * as_oj_dd_hdmi = new CMenuOptionChooser(LOCALE_AUDIOMENU_HDMI_DD, &g_settings.hdmi_dd, AUDIOMENU_HDMI_DD_OPTIONS, AUDIOMENU_HDMI_DD_OPTION_COUNT, true, audioSetupNotifier); //dd via spdif CMenuOptionChooser * as_oj_dd_spdif = new CMenuOptionChooser(LOCALE_AUDIOMENU_SPDIF_DD, &g_settings.spdif_dd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index b5c7fd041..62cf3e089 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -821,32 +821,34 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con aspectRatio = 0; fileplay = 0; } - +void CInfoViewer::setInfobarTimeout(int timeout_ext) +{ + int mode = CNeutrinoApp::getInstance()->getMode(); + //define timeouts + switch (mode) + { + case NeutrinoMessages::mode_tv: + timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + timeout_ext); + break; + case NeutrinoMessages::mode_radio: + timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] + timeout_ext); + break; + case NeutrinoMessages::mode_ts: + timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE] + timeout_ext); + break; + default: + timeoutEnd = CRCInput::calcTimeoutEnd(6 + timeout_ext); + break; + } +} void CInfoViewer::loop(bool show_dot) { bool hideIt = true; virtual_zap_mode = false; //bool fadeOut = false; - uint64_t timeoutEnd; - int mode = CNeutrinoApp::getInstance()->getMode(); - - //define timeouts - switch (mode) - { - case NeutrinoMessages::mode_tv: - timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR]); - break; - case NeutrinoMessages::mode_radio: - timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO]); - break; - case NeutrinoMessages::mode_ts: - timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE]); - break; - default: - timeoutEnd = CRCInput::calcTimeoutEnd(6); - break; - } - + timeoutEnd=0;; + setInfobarTimeout(); + int res = messages_return::none; neutrino_msg_t msg; neutrino_msg_data_t data; @@ -1039,14 +1041,14 @@ void CInfoViewer::showSubchan () } else g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT, 0, true); - uint64_t timeoutEnd = CRCInput::calcTimeoutEnd (2); + uint64_t timeoutEnd_tmp = CRCInput::calcTimeoutEnd (2); int res = messages_return::none; neutrino_msg_t msg; neutrino_msg_data_t data; while (!(res & (messages_return::cancel_info | messages_return::cancel_all))) { - g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd); + g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd_tmp); if (msg == CRCInput::RC_timeout) { res = messages_return::cancel_info; @@ -1210,6 +1212,8 @@ void CInfoViewer::showFailure () void CInfoViewer::showMotorMoving (int duration) { + setInfobarTimeout(duration + 1); + char text[256]; snprintf(text, sizeof(text), "%s (%ds)", g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING), duration); ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8 diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index e5830fdaf..aa4e0512e 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -111,6 +111,8 @@ class CInfoViewer char old_timestr[10]; static const short bar_width = 72; static event_id_t last_curr_id, last_next_id; + uint64_t timeoutEnd; + void setInfobarTimeout(int timeout_ext = 0); CChannelEventList evtlist; CChannelEventList::iterator eli; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 376a9248c..a9cd3e515 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -731,9 +731,9 @@ void COsdSetup::showOsdScreenshottSetup(CMenuWidget *menu_screenshot) menu_screenshot->addItem(new CMenuOptionNumberChooser(LOCALE_SCREENSHOT_COUNT, &g_settings.screenshot_count, true, 1, 5, NULL)); menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_FORMAT, &g_settings.screenshot_format, SCREENSHOT_FMT_OPTIONS, SCREENSHOT_FMT_OPTION_COUNT, true)); menu_screenshot->addItem(new CMenuForwarder(LOCALE_SCREENSHOT_DEFDIR, true, g_settings.screenshot_dir, this, "screenshot_dir")); - menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_MENU, &g_settings.screenshot_mode, SCREENSHOT_OPTIONS, SCREENSHOT_OPTION_COUNT, true)); + menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_RES, &g_settings.screenshot_mode, SCREENSHOT_OPTIONS, SCREENSHOT_OPTION_COUNT, true)); menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_VIDEO, &g_settings.screenshot_video, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); -// menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_SCALE, &g_settings.screenshot_scale, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_SCALE, &g_settings.screenshot_scale, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); menu_screenshot->addItem(new CMenuOptionChooser(LOCALE_SCREENSHOT_COVER, &g_settings.screenshot_cover, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); diff --git a/src/gui/settings_manager.cpp b/src/gui/settings_manager.cpp index eecfedcd5..1b7c4cf94 100644 --- a/src/gui/settings_manager.cpp +++ b/src/gui/settings_manager.cpp @@ -152,8 +152,8 @@ int CSettingsManager::showMenu() mset->addItem(new CMenuForwarder(LOCALE_RESET_SETTINGS, true, NULL, resetNotifier, "settings", CRCInput::RC_recall));// FIXME: RC-button RECALL is broken mset->addItem(GenericMenuSeparatorLine); - mset->addItem(new CMenuForwarder(LOCALE_EXTRA_LOADCONFIG, true, NULL, this, "loadconfig", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); - mset->addItem(new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + mset->addItem(new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); + mset->addItem(new CMenuForwarder(LOCALE_EXTRA_LOADCONFIG, true, NULL, this, "loadconfig", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); mset->addItem(GenericMenuSeparatorLine); mset->addItem(new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); mset->addItem(new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index 21b801604..945a1ebfc 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -366,7 +366,7 @@ bool CUserMenu::showUserMenu(int button) { menu_items++; menu_prev = SNeutrinoSettings::ITEM_CLOCK; - keyhelper.get(&key,&icon, CRCInput::RC_green); + keyhelper.get(&key,&icon); neutrino = CNeutrinoApp::getInstance(); menu_item = new CMenuForwarder(!g_settings.mode_clock ? LOCALE_CLOCK_SWITCH_ON:LOCALE_CLOCK_SWITCH_OFF, true, NULL, neutrino, "clock_switch", key, icon); menu->addItem(menu_item, false); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a6d953883..74bba9f4e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -705,7 +705,7 @@ int CNeutrinoApp::loadSetup(const char * fname) "2,3,4,13", // RED "6", // GREEN "7", // YELLOW - "12,10,11,20,21,19,14,15" // BLUE + "12,11,20,21,19,14,15" // BLUE }; char txt1[81]; std::string txt2; @@ -1672,7 +1672,7 @@ int CNeutrinoApp::run(int argc, char **argv) audioDecoder->SetSRS(g_settings.srs_enable, g_settings.srs_nmgr_enable, g_settings.srs_algo, g_settings.srs_ref_volume); audioDecoder->setVolume(g_settings.current_volume, g_settings.current_volume); - audioDecoder->SetHdmiDD(g_settings.hdmi_dd ? true : false); + audioDecoder->SetHdmiDD((HDMI_ENCODED_MODE)g_settings.hdmi_dd); audioDecoder->SetSpdifDD(g_settings.spdif_dd ? true : false); audioDecoder->EnableAnalogOut(g_settings.analog_out ? true : false); @@ -3335,7 +3335,6 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) if(!CRecordManager::getInstance()->RecordingStatus()) { g_Zapit->setStandby(true); - cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000); } else { g_Zapit->stopPlayBack(); } @@ -3363,6 +3362,9 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) if (system(NEUTRINO_ENTER_STANDBY_SCRIPT) != 0) perror(NEUTRINO_ENTER_STANDBY_SCRIPT " failed"); + if(!CRecordManager::getInstance()->RecordingStatus()) + cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000); + lastMode = mode; mode = mode_standby; //fan speed @@ -3787,7 +3789,7 @@ void CNeutrinoApp::loadKeys(const char * fname) g_settings.key_plugin = configfile.getInt32( "key_plugin", CRCInput::RC_nokey ); g_settings.key_unlock = configfile.getInt32( "key_unlock", CRCInput::RC_setup ); g_settings.key_screenshot = configfile.getInt32( "key_screenshot", CRCInput::RC_nokey ); - g_settings.key_current_transponder = configfile.getInt32( "key_current_transponder", CRCInput::RC_nokey ); + g_settings.key_current_transponder = configfile.getInt32( "key_current_transponder", CRCInput::RC_games ); g_settings.key_quickzap_up = tconfig.getInt32( "key_quickzap_up", CRCInput::RC_up ); g_settings.key_quickzap_down = tconfig.getInt32( "key_quickzap_down", CRCInput::RC_down ); diff --git a/src/sectionsd/sectionsd.cpp b/src/sectionsd/sectionsd.cpp index 4b6992e41..efca3dbf9 100644 --- a/src/sectionsd/sectionsd.cpp +++ b/src/sectionsd/sectionsd.cpp @@ -4582,151 +4582,159 @@ static void *insertEventsfromFile(void *) t_original_network_id onid = 0; t_transport_stream_id tsid = 0; t_service_id sid = 0; - char cclass[20]; - char cuser[20]; + char cclass[20]={0}; + char cuser[20]={0};; std::string indexname; std::string filename; std::string epgname; int ev_count = 0; - indexname = epg_dir + "index.xml"; + struct stat buf; + indexname = epg_dir + "index.tmp"; + //skip read EPG cache if index.tmp available + if (!(stat(indexname.c_str(), &buf) == 0)){ - xmlDocPtr index_parser = parseXmlFile(indexname.c_str()); + indexname = epg_dir + "index.xml"; - if (index_parser != NULL) { - time_t now = time_monotonic_ms(); - printdate_ms(stdout); - printf("[sectionsd] Reading Information from file %s:\n", indexname.c_str()); + xmlDocPtr index_parser = parseXmlFile(indexname.c_str()); - eventfile = xmlDocGetRootElement(index_parser)->xmlChildrenNode; + if (index_parser != NULL) { + time_t now = time_monotonic_ms(); + printdate_ms(stdout); + printf("[sectionsd] Reading Information from file %s:\n", indexname.c_str()); - while (eventfile) { - filename = xmlGetAttribute(eventfile, "name"); - epgname = epg_dir + filename; - if (!(event_parser = parseXmlFile(epgname.c_str()))) { - dprintf("unable to open %s for reading\n", epgname.c_str()); - } - else { - service = xmlDocGetRootElement(event_parser)->xmlChildrenNode; + eventfile = xmlDocGetRootElement(index_parser)->xmlChildrenNode; - while (service) { - onid = xmlGetNumericAttribute(service, "original_network_id", 16); - tsid = xmlGetNumericAttribute(service, "transport_stream_id", 16); - sid = xmlGetNumericAttribute(service, "service_id", 16); - - event = service->xmlChildrenNode; - - while (event) { - - SIevent e(onid,tsid,sid,xmlGetNumericAttribute(event, "id", 16)); - - node = event->xmlChildrenNode; - - while (xmlGetNextOccurence(node, "name") != NULL) { - e.setName( std::string(UTF8_to_Latin1(xmlGetAttribute(node, "lang"))), - std::string(xmlGetAttribute(node, "string"))); - node = node->xmlNextNode; - } - while (xmlGetNextOccurence(node, "text") != NULL) { - e.setText( std::string(UTF8_to_Latin1(xmlGetAttribute(node, "lang"))), - std::string(xmlGetAttribute(node, "string"))); - node = node->xmlNextNode; - } - while (xmlGetNextOccurence(node, "item") != NULL) { - e.item = std::string(xmlGetAttribute(node, "string")); - node = node->xmlNextNode; - } - while (xmlGetNextOccurence(node, "item_description") != NULL) { - e.itemDescription = std::string(xmlGetAttribute(node, "string")); - node = node->xmlNextNode; - } - while (xmlGetNextOccurence(node, "extended_text") != NULL) { - e.appendExtendedText( std::string(UTF8_to_Latin1(xmlGetAttribute(node, "lang"))), - std::string(xmlGetAttribute(node, "string"))); - node = node->xmlNextNode; - } - /* - if (xmlGetNextOccurence(node, "description") != NULL) { - if (xmlGetAttribute(node, "name") != NULL) { - e.langName = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "name"))); - } - //printf("Name: %s\n", e->name); - if (xmlGetAttribute(node, "text") != NULL) { - e.langText = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "text"))); - } - if (xmlGetAttribute(node, "item") != NULL) { - e.item = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "item"))); - } - if (xmlGetAttribute(node, "item_description") != NULL) { - e.itemDescription = std::string(UTF8_to_Latin1(xmlGetAttribute(node,"item_description"))); - } - if (xmlGetAttribute(node, "extended_text") != NULL) { - e.langExtendedText = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "extended_text"))); - } - node = node->xmlNextNode; - } - */ - while (xmlGetNextOccurence(node, "time") != NULL) { - e.times.insert(SItime(xmlGetNumericAttribute(node, "start_time", 10), - xmlGetNumericAttribute(node, "duration", 10))); - node = node->xmlNextNode; - } - - int count = 0; - while (xmlGetNextOccurence(node, "content") != NULL) { - cclass[count] = xmlGetNumericAttribute(node, "class", 16); - cuser[count] = xmlGetNumericAttribute(node, "user", 16); - node = node->xmlNextNode; - count++; - } - e.contentClassification = std::string(cclass, count); - e.userClassification = std::string(cuser, count); - - while (xmlGetNextOccurence(node, "component") != NULL) { - SIcomponent c; - c.streamContent = xmlGetNumericAttribute(node, "stream_content", 16); - c.componentType = xmlGetNumericAttribute(node, "type", 16); - c.componentTag = xmlGetNumericAttribute(node, "tag", 16); - c.component = std::string(xmlGetAttribute(node, "text")); - e.components.insert(c); - node = node->xmlNextNode; - } - while (xmlGetNextOccurence(node, "parental_rating") != NULL) { - e.ratings.insert(SIparentalRating(std::string(UTF8_to_Latin1(xmlGetAttribute(node, "country"))), (unsigned char) xmlGetNumericAttribute(node, "rating", 10))); - node = node->xmlNextNode; - } - while (xmlGetNextOccurence(node, "linkage") != NULL) { - SIlinkage l; - l.linkageType = xmlGetNumericAttribute(node, "type", 16); - l.transportStreamId = xmlGetNumericAttribute(node, "transport_stream_id", 16); - l.originalNetworkId = xmlGetNumericAttribute(node, "original_network_id", 16); - l.serviceId = xmlGetNumericAttribute(node, "service_id", 16); - l.name = std::string(xmlGetAttribute(node, "linkage_descriptor")); - e.linkage_descs.insert(e.linkage_descs.end(), l); - - node = node->xmlNextNode; - } - //lockEvents(); - //writeLockEvents(); - addEvent(e, 0); - ev_count++; - //unlockEvents(); - - event = event->xmlNextNode; - } - - service = service->xmlNextNode; + while (eventfile) { + filename = xmlGetAttribute(eventfile, "name"); + epgname = epg_dir + filename; + if (!(event_parser = parseXmlFile(epgname.c_str()))) { + dprintf("unable to open %s for reading\n", epgname.c_str()); } - xmlFreeDoc(event_parser); + else { + service = xmlDocGetRootElement(event_parser)->xmlChildrenNode; + + while (service) { + onid = xmlGetNumericAttribute(service, "original_network_id", 16); + tsid = xmlGetNumericAttribute(service, "transport_stream_id", 16); + sid = xmlGetNumericAttribute(service, "service_id", 16); + + event = service->xmlChildrenNode; + + while (event) { + + SIevent e(onid,tsid,sid,xmlGetNumericAttribute(event, "id", 16)); + + node = event->xmlChildrenNode; + + while (xmlGetNextOccurence(node, "name") != NULL) { + e.setName( std::string(UTF8_to_Latin1(xmlGetAttribute(node, "lang"))), + std::string(xmlGetAttribute(node, "string"))); + node = node->xmlNextNode; + } + while (xmlGetNextOccurence(node, "text") != NULL) { + e.setText( std::string(UTF8_to_Latin1(xmlGetAttribute(node, "lang"))), + std::string(xmlGetAttribute(node, "string"))); + node = node->xmlNextNode; + } + while (xmlGetNextOccurence(node, "item") != NULL) { + e.item = std::string(xmlGetAttribute(node, "string")); + node = node->xmlNextNode; + } + while (xmlGetNextOccurence(node, "item_description") != NULL) { + e.itemDescription = std::string(xmlGetAttribute(node, "string")); + node = node->xmlNextNode; + } + while (xmlGetNextOccurence(node, "extended_text") != NULL) { + e.appendExtendedText( std::string(UTF8_to_Latin1(xmlGetAttribute(node, "lang"))), + std::string(xmlGetAttribute(node, "string"))); + node = node->xmlNextNode; + } + /* + if (xmlGetNextOccurence(node, "description") != NULL) { + if (xmlGetAttribute(node, "name") != NULL) { + e.langName = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "name"))); + } + //printf("Name: %s\n", e->name); + if (xmlGetAttribute(node, "text") != NULL) { + e.langText = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "text"))); + } + if (xmlGetAttribute(node, "item") != NULL) { + e.item = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "item"))); + } + if (xmlGetAttribute(node, "item_description") != NULL) { + e.itemDescription = std::string(UTF8_to_Latin1(xmlGetAttribute(node,"item_description"))); + } + if (xmlGetAttribute(node, "extended_text") != NULL) { + e.langExtendedText = std::string(UTF8_to_Latin1(xmlGetAttribute(node, "extended_text"))); + } + node = node->xmlNextNode; + } + */ + while (xmlGetNextOccurence(node, "time") != NULL) { + e.times.insert(SItime(xmlGetNumericAttribute(node, "start_time", 10), + xmlGetNumericAttribute(node, "duration", 10))); + node = node->xmlNextNode; + } + + unsigned int count = 0; + while (xmlGetNextOccurence(node, "content") != NULL) { + cclass[count] = xmlGetNumericAttribute(node, "class", 16); + cuser[count] = xmlGetNumericAttribute(node, "user", 16); + node = node->xmlNextNode; + count++; + if(count > sizeof(cclass)-1) + break; + } + e.contentClassification = std::string(cclass, count); + e.userClassification = std::string(cuser, count); + + while (xmlGetNextOccurence(node, "component") != NULL) { + SIcomponent c; + c.streamContent = xmlGetNumericAttribute(node, "stream_content", 16); + c.componentType = xmlGetNumericAttribute(node, "type", 16); + c.componentTag = xmlGetNumericAttribute(node, "tag", 16); + c.component = std::string(xmlGetAttribute(node, "text")); + e.components.insert(c); + node = node->xmlNextNode; + } + while (xmlGetNextOccurence(node, "parental_rating") != NULL) { + e.ratings.insert(SIparentalRating(std::string(UTF8_to_Latin1(xmlGetAttribute(node, "country"))), (unsigned char) xmlGetNumericAttribute(node, "rating", 10))); + node = node->xmlNextNode; + } + while (xmlGetNextOccurence(node, "linkage") != NULL) { + SIlinkage l; + l.linkageType = xmlGetNumericAttribute(node, "type", 16); + l.transportStreamId = xmlGetNumericAttribute(node, "transport_stream_id", 16); + l.originalNetworkId = xmlGetNumericAttribute(node, "original_network_id", 16); + l.serviceId = xmlGetNumericAttribute(node, "service_id", 16); + l.name = std::string(xmlGetAttribute(node, "linkage_descriptor")); + e.linkage_descs.insert(e.linkage_descs.end(), l); + + node = node->xmlNextNode; + } + //lockEvents(); + //writeLockEvents(); + addEvent(e, 0); + ev_count++; + //unlockEvents(); + + event = event->xmlNextNode; + } + + service = service->xmlNextNode; + } + xmlFreeDoc(event_parser); + } + + eventfile = eventfile->xmlNextNode; } - eventfile = eventfile->xmlNextNode; + xmlFreeDoc(index_parser); + printdate_ms(stdout); + printf("[sectionsd] Reading Information finished after %ld miliseconds (%d events)\n", + time_monotonic_ms()-now, ev_count); } - - xmlFreeDoc(index_parser); - printdate_ms(stdout); - printf("[sectionsd] Reading Information finished after %ld miliseconds (%d events)\n", - time_monotonic_ms()-now, ev_count); } reader_ready = true; diff --git a/src/system/locals.h b/src/system/locals.h index 5bee7dd17..ca3afd3ba 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -141,6 +141,8 @@ typedef enum LOCALE_AUDIOMENU_CLOCKREC, LOCALE_AUDIOMENU_DOLBYDIGITAL, LOCALE_AUDIOMENU_HDMI_DD, + LOCALE_AUDIOMENU_HDMI_DD_AUTO, + LOCALE_AUDIOMENU_HDMI_DD_FORCE, LOCALE_AUDIOMENU_MONOLEFT, LOCALE_AUDIOMENU_MONORIGHT, LOCALE_AUDIOMENU_PREF_LANG, @@ -1235,6 +1237,7 @@ typedef enum LOCALE_SCREENSHOT_INFO, LOCALE_SCREENSHOT_MENU, LOCALE_SCREENSHOT_OSD, + LOCALE_SCREENSHOT_RES, LOCALE_SCREENSHOT_SCALE, LOCALE_SCREENSHOT_TV, LOCALE_SCREENSHOT_VIDEO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 08ceee983..32973bd11 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -141,6 +141,8 @@ const char * locale_real_names[] = "audiomenu.clockrec", "audiomenu.dolbydigital", "audiomenu.hdmi_dd", + "audiomenu.hdmi_dd_auto", + "audiomenu.hdmi_dd_force", "audiomenu.monoleft", "audiomenu.monoright", "audiomenu.pref_lang", @@ -1235,6 +1237,7 @@ const char * locale_real_names[] = "screenshot.info", "screenshot.menu", "screenshot.osd", + "screenshot.res", "screenshot.scale", "screenshot.tv", "screenshot.video", diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 5190cdcb6..a16f2b510 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -266,7 +266,7 @@ bool CAudioSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void } 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(g_settings.hdmi_dd ? true : false); + 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)) {