fix (and enable) one-key-plugin; fix movieplayer-plugin

Origin commit data
------------------
Branch: ni/coolstream
Commit: 580fcc97e5
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-03-01 (Sat, 01 Mar 2014)

Origin message was:
------------------
- fix (and enable) one-key-plugin; fix movieplayer-plugin

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2014-03-01 23:33:45 +01:00
parent 57bf943af0
commit ea1379e04a
10 changed files with 61 additions and 47 deletions

View File

@@ -391,7 +391,7 @@ extra.key_pic_size 4:3 Anzeigeverhalten
extra.key_pip_close Stop/Start PiP
extra.key_pip_setup PiP Konfiguration
extra.key_pip_swap Umschalten PiP/live
extra.key_plugin One-touch-Plugin
extra.key_plugin Schnellstart-Plugin
extra.key_screenshot Screenshot Taste
extra.key_timeshift Timeshift
extra.key_unlock Entsperrtaste
@@ -937,6 +937,7 @@ menu.hint_key_pic_size_active Die Taste für das 4:3 Anzeigeverhalten deaktivier
menu.hint_key_pip_close Tastenzuordnung für Stop PiP oder Start mit aktuellem Kanal
menu.hint_key_pip_setup Tastenzuordnung für PiP Konfiguration
menu.hint_key_pip_swap Tastenzuordnung zum Umschalten PiP und aktuellem Kanal
menu.hint_key_plugin Wählen Sie eine Taste für das Schnellstart-Plugin
menu.hint_key_poweroff Wählen Sie eine Taste für den Standby und für das Verhalten für Standby und Deep-Standby
menu.hint_key_quickzap Konfigurieren Sie die Tastenbelegung für die Schnellumschaltung
menu.hint_key_repeatblock Die Verzögerung nach einem Tastendruck bis die Box reagieren soll
@@ -983,6 +984,7 @@ menu.hint_misc_filebrowser Dateisystem, Dateirechte anzeigen im Dateibrowser, St
menu.hint_misc_general Standby-, Teletext- und Rotor-Einstellungen, Pluginverzeichnis auf externem Datenträger
menu.hint_misc_zapit Verwaltung der Start-Kanäle für den TV/Radio-Modus
menu.hint_movie Wiedergabe von Filmen
menu.hint_movieplayer_plugin Wählen Sie ein Plugin, das mit einer Schnellstart-Taste im Movieplayer-Modus gestartet wird
menu.hint_net_broadcast Ändern Sie die Broadcast-Adresse.\nWenn Sie unsicher sind, verwenden Sie zuletzt .255
menu.hint_net_dhcp Verwenden Sie einen DHCP-Server für die automatische Vergabe einer IP-Adresse im Netzwerk
menu.hint_net_djmount Mountet UPnP-Geräte als Dateisystem unter /media/00upnp
@@ -1018,6 +1020,7 @@ menu.hint_net_xupnpd Freigabe von Live Channels über UPNP
menu.hint_network IP-Adresse, Gateway, DNS, Zeit-Sync, Netzwerk-Freigaben, Dienste und mehr
menu.hint_new_zap_mode Aktiviert Quickzap in der Kanalliste. Nach Betätigen der Mute-Taste wird mit den Hoch/Runter-Tasten direkt umgeschalten
menu.hint_numeric_adjust Adjust channel list mode on numeric zap
menu.hint_onekey_plugin Wählen Sie ein Plugin, das mit einer Schnellstart-Taste gestartet wird
menu.hint_osd Farben, Schriftarten, Anzeigegröße, Ansichtsoptionen der Menüs und mehr
menu.hint_osd_language Wählen Sie ihre Menü-Sprache
menu.hint_osd_preset Wählen Sie zwischen Röhren-TV (CRT) oder Flachbildschirm (LCD)
@@ -1502,7 +1505,7 @@ mpkey.bookmark Speichere Lesezeichen
mpkey.forward Vorlauf
mpkey.pause Pause
mpkey.play Play
mpkey.plugin Starte Plugin
mpkey.plugin Movieplayer-Plugin
mpkey.rewind Rücklauf
mpkey.stop Stopp
mpkey.subtitle Untertitel

View File

@@ -937,6 +937,7 @@ menu.hint_key_pic_size_active Disable/enable key for the 4:3 display behavior
menu.hint_key_pip_close Assign button to stop PiP\nor start it for current channel
menu.hint_key_pip_setup Assign button to configure PiP
menu.hint_key_pip_swap Assign button to swap PiP and live channel
menu.hint_key_plugin Assign button to execute the one touch plugin
menu.hint_key_poweroff Assign button to switch power state\n (standby/deepstandby <-> running)
menu.hint_key_quickzap Configure keybingdings for quick\nchannel switch
menu.hint_key_repeatblock Delay after button press and before\nfirst key repeat
@@ -983,6 +984,7 @@ menu.hint_misc_filebrowser Filesystem encoding, file rights\ndeny directory leav
menu.hint_misc_general Start to standby, cache teletext, swp rotor\nplugin hdd dir
menu.hint_misc_zapit Initial TV/Radio channels
menu.hint_movie Play movies
menu.hint_movieplayer_plugin Choose a plugin that's executed with the one touch key in movieplayer mode
menu.hint_net_broadcast Enter broadcast address\nif unsure, use IP address with last .255
menu.hint_net_dhcp Use DHCP server to auto-configure
menu.hint_net_djmount Mount UPnP devices as filesystem\nunder /media/00upnp
@@ -1018,6 +1020,7 @@ menu.hint_net_xupnpd Share live channels over UPNP
menu.hint_network IP address, gateway, DNS, Time sync\nNetwork shares and services
menu.hint_new_zap_mode Allow channel switch while browsing\n(toggle mode with 'mute' in channel list)
menu.hint_numeric_adjust Adjust channel list mode on numeric zap
menu.hint_onekey_plugin Choose a plugin that's executed with the one touch key
menu.hint_osd Colors, fonts, screen size\nGUI look and feel options
menu.hint_osd_language Select OSD language
menu.hint_osd_preset Pre-configured screen margins for CRT and LCD TV
@@ -1502,7 +1505,7 @@ mpkey.bookmark save bookmark
mpkey.forward Forward
mpkey.pause Pause
mpkey.play Play
mpkey.plugin Run plugin
mpkey.plugin Movieplayer plugin
mpkey.rewind Rewind
mpkey.stop Stop
mpkey.subtitle Subtitles

View File

@@ -183,7 +183,7 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] =
{LOCALE_MPKEY_BOOKMARK, &g_settings.mpkey_bookmark, LOCALE_MENU_HINT_KEY_MPBOOKMARK },
{LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, LOCALE_MENU_HINT_KEY_MPTIMESHIFT },
{LOCALE_MPKEY_PLUGIN, &g_settings.mpkey_plugin, LOCALE_MENU_HINT_KEY_MPPLUGIN },
/*{LOCALE_EXTRA_KEY_PLUGIN, &g_settings.key_plugin, },*/
{LOCALE_EXTRA_KEY_PLUGIN, &g_settings.key_plugin, LOCALE_MENU_HINT_KEY_PLUGIN },
{LOCALE_EXTRA_KEY_UNLOCK, &g_settings.key_unlock, LOCALE_MENU_HINT_KEY_UNLOCK},
{LOCALE_EXTRA_KEY_SCREENSHOT, &g_settings.key_screenshot, LOCALE_MENU_HINT_KEY_SCREENSHOT },
{LOCALE_EXTRA_KEY_PIP_CLOSE, &g_settings.key_pip_close, LOCALE_MENU_HINT_KEY_PIP_CLOSE },
@@ -337,7 +337,6 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings)
//misc
bindSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_MISC));
//bindSettings->addItem(new CMenuForwarder(keydescription[KEY_PLUGIN], true, NULL, keychooser[KEY_PLUGIN]));
//Special keys
CMenuWidget* bindSettings_special = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_SPECIAL);
@@ -346,6 +345,10 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings)
mf->setHint("", LOCALE_MENU_HINT_KEY_SPECIAL_ACTIVE);
bindSettings->addItem(mf);
//onekey-plugin
mf = new CMenuForwarder(key_settings[KEY_PLUGIN].keydescription, true, keychooser[KEY_PLUGIN]->getKeyName(), keychooser[KEY_PLUGIN]);
mf->setHint("", key_settings[KEY_PLUGIN].hint);
bindSettings->addItem(mf);
// unlock
mf = new CMenuForwarder(key_settings[KEY_UNLOCK].keydescription, true, keychooser[KEY_UNLOCK]->getKeyName(), keychooser[KEY_UNLOCK]);
mf->setHint("", key_settings[KEY_UNLOCK].hint);
@@ -432,7 +435,7 @@ void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplaye
{
bindSettings_mplayer->addIntroItems(LOCALE_MAINMENU_MOVIEPLAYER);
for (int i = MPKEY_REWIND; i < MPKEY_PLUGIN; i++) {
for (int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++) {
CMenuForwarder * mf = new CMenuForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]);
mf->setHint("", key_settings[i].hint);
bindSettings_mplayer->addItem(mf);

View File

@@ -74,7 +74,7 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver
MPKEY_BOOKMARK,
KEY_TIMESHIFT,
MPKEY_PLUGIN,
/*KEY_PLUGIN,*/
KEY_PLUGIN,
KEY_UNLOCK,
KEY_SCREENSHOT,
KEY_PIP_CLOSE,

View File

@@ -57,8 +57,6 @@
#include <cs_api.h>
#include <video.h>
//#define ONE_KEY_PLUGIN
extern CPlugins * g_PluginList;
extern cVideo *videoDecoder;
@@ -95,10 +93,31 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
return menu_return::RETURN_REPAINT;
}
#ifdef ONE_KEY_PLUGIN
else if(actionKey == "onekeyplugin")
else if(actionKey == "onekey_plugin")
{
CMenuWidget MoviePluginSelector(LOCALE_EXTRA_KEY_PLUGIN, NEUTRINO_ICON_FEATURES);
CMenuWidget OneKeyPluginSelector(LOCALE_EXTRA_KEY_PLUGIN, NEUTRINO_ICON_FEATURES);
OneKeyPluginSelector.addItem(GenericMenuSeparator);
char id[5];
int cnt = 0;
int enabled_count = 0;
for(unsigned int count=0;count < (unsigned int) g_PluginList->getNumberOfPlugins();count++)
{
if (!g_PluginList->isHidden(count))
{
sprintf(id, "%d", count);
enabled_count++;
OneKeyPluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, new COnekeyPluginChangeExec(), id, CRCInput::convertDigitToKey(count)), (cnt == 0));
cnt++;
}
}
OneKeyPluginSelector.exec(NULL, "");
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "movieplayer_plugin")
{
CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_DEFPLUGIN, NEUTRINO_ICON_FEATURES);
MoviePluginSelector.addItem(GenericMenuSeparator);
char id[5];
@@ -106,12 +125,11 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
int enabled_count = 0;
for(unsigned int count=0;count < (unsigned int) g_PluginList->getNumberOfPlugins();count++)
{
if (g_PluginList->getType(count)== CPlugins::P_TYPE_TOOL && !g_PluginList->isHidden(count))
if (!g_PluginList->isHidden(count))
{
// e.g. vtxt-plugins
sprintf(id, "%d", count);
enabled_count++;
MoviePluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, new COnekeyPluginChangeExec(), id, CRCInput::convertDigitToKey(count)), (cnt == 0));
MoviePluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, new CMoviePluginChangeExec(), id, CRCInput::convertDigitToKey(count)), (cnt == 0));
cnt++;
}
}
@@ -119,7 +137,6 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
MoviePluginSelector.exec(NULL, "");
return menu_return::RETURN_REPAINT;
}
#endif /*ONE_KEY_PLUGIN*/
else if(actionKey == "info")
{
unsigned num = CEitManager::getInstance()->getEventsCount();
@@ -315,12 +332,19 @@ void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general)
ms_general->addItem(mc);
}
ms_general->addItem(GenericMenuSeparatorLine);
CMenuForwarder * mf = new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "plugin_dir");
mf->setHint("", LOCALE_MENU_HINT_PLUGINS_HDD_DIR);
ms_general->addItem(mf);
#ifdef ONE_KEY_PLUGIN
ms_general->addItem(new CMenuForwarder(LOCALE_EXTRA_KEY_PLUGIN, true, g_settings.onekey_plugin,this,"onekeyplugin"));
#endif /*ONE_KEY_PLUGIN*/
mf = new CMenuForwarder(LOCALE_EXTRA_KEY_PLUGIN, true, g_settings.onekey_plugin, this, "onekey_plugin");
mf->setHint("", LOCALE_MENU_HINT_ONEKEY_PLUGIN);
ms_general->addItem(mf);
mf = new CMenuForwarder(LOCALE_MPKEY_PLUGIN, true, g_settings.movieplayer_plugin, this, "movieplayer_plugin");
mf->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_PLUGIN);
ms_general->addItem(mf);
}
#define VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT 2

View File

@@ -629,7 +629,7 @@ void CMoviePlayerGui::PlayFile(void)
showSubtitle(0);
if (msg == (neutrino_msg_t) g_settings.mpkey_plugin) {
//g_PluginList->start_plugin_by_name (g_settings.movieplayer_plugin.c_str (), pidt);
g_PluginList->start_plugin_by_name (g_settings.movieplayer_plugin.c_str (), 0 /*param is unused*/);
} else if (msg == (neutrino_msg_t) g_settings.mpkey_stop) {
playstate = CMoviePlayerGui::STOPPED;
} else if (msg == (neutrino_msg_t) g_settings.mpkey_play) {

View File

@@ -618,7 +618,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.recording_startstop_msg = configfile.getBool("recording_startstop_msg" , true);
// default plugin for movieplayer
g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "Teletext" );
g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "noplugin" );
g_settings.onekey_plugin = configfile.getString( "onekey_plugin", "noplugin" );
g_settings.plugin_hdd_dir = configfile.getString( "plugin_hdd_dir", "/media/sda1/plugins" );
g_settings.logo_hdd_dir = configfile.getString( "logo_hdd_dir", "/media/sda1/logos" );
@@ -1962,8 +1962,6 @@ TIMER_START();
//load Pluginlist before main menu (only show script menu if at least one script is available
g_PluginList->loadPlugins();
MoviePluginChanger = new CMoviePluginChangeExec;
// setup recording device
setupRecordingDevice();
@@ -3643,27 +3641,6 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "movieplugin") {
parent->hide();
CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_DEFPLUGIN, NEUTRINO_ICON_FEATURES);
MoviePluginSelector.addItem(GenericMenuSeparator);
char id[5];
int cnt = 0;
int enabled_count = 0;
for(unsigned int count=0;count < (unsigned int) g_PluginList->getNumberOfPlugins();count++) {
if (g_PluginList->getType(count)== CPlugins::P_TYPE_TOOL && !g_PluginList->isHidden(count)) {
// zB vtxt-plugins
sprintf(id, "%d", count);
enabled_count++;
MoviePluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, MoviePluginChanger, id, CRCInput::convertDigitToKey(count)), (cnt == 0));
cnt++;
}
}
MoviePluginSelector.exec(NULL, "");
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "clearSectionsd")
{
g_Sectionsd->freeMemory();
@@ -3885,7 +3862,7 @@ void CNeutrinoApp::loadKeys(const char * fname)
g_settings.mpkey_audio = tconfig.getInt32( "mpkey.audio", CRCInput::RC_green );
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_plugin = tconfig.getInt32( "mpkey.plugin", (unsigned int)CRCInput::RC_nokey );
g_settings.mpkey_subtitle = tconfig.getInt32( "mpkey.subtitle", CRCInput::RC_sub );
g_settings.key_format_mode_active = tconfig.getInt32( "key_format_mode_active", 1 );
@@ -4149,7 +4126,6 @@ void CNeutrinoApp::Cleanup()
printf("cleanup 13\n");fflush(stdout);
delete audioSetupNotifier; audioSetupNotifier = NULL;
delete MoviePluginChanger; MoviePluginChanger = NULL;
printf("cleanup 14\n");fflush(stdout);
delete TVbouquetList; TVbouquetList = NULL;

View File

@@ -102,7 +102,6 @@ private:
int tvsort[LIST_MODE_LAST];
int radiosort[LIST_MODE_LAST];
CMoviePluginChangeExec *MoviePluginChanger;
bool channellist_visible;
void SDT_ReloadChannels();

View File

@@ -964,6 +964,7 @@ typedef enum
LOCALE_MENU_HINT_KEY_PIP_CLOSE,
LOCALE_MENU_HINT_KEY_PIP_SETUP,
LOCALE_MENU_HINT_KEY_PIP_SWAP,
LOCALE_MENU_HINT_KEY_PLUGIN,
LOCALE_MENU_HINT_KEY_POWEROFF,
LOCALE_MENU_HINT_KEY_QUICKZAP,
LOCALE_MENU_HINT_KEY_REPEATBLOCK,
@@ -1010,6 +1011,7 @@ typedef enum
LOCALE_MENU_HINT_MISC_GENERAL,
LOCALE_MENU_HINT_MISC_ZAPIT,
LOCALE_MENU_HINT_MOVIE,
LOCALE_MENU_HINT_MOVIEPLAYER_PLUGIN,
LOCALE_MENU_HINT_NET_BROADCAST,
LOCALE_MENU_HINT_NET_DHCP,
LOCALE_MENU_HINT_NET_DJMOUNT,
@@ -1045,6 +1047,7 @@ typedef enum
LOCALE_MENU_HINT_NETWORK,
LOCALE_MENU_HINT_NEW_ZAP_MODE,
LOCALE_MENU_HINT_NUMERIC_ADJUST,
LOCALE_MENU_HINT_ONEKEY_PLUGIN,
LOCALE_MENU_HINT_OSD,
LOCALE_MENU_HINT_OSD_LANGUAGE,
LOCALE_MENU_HINT_OSD_PRESET,

View File

@@ -964,6 +964,7 @@ const char * locale_real_names[] =
"menu.hint_key_pip_close",
"menu.hint_key_pip_setup",
"menu.hint_key_pip_swap",
"menu.hint_key_plugin",
"menu.hint_key_poweroff",
"menu.hint_key_quickzap",
"menu.hint_key_repeatblock",
@@ -1010,6 +1011,7 @@ const char * locale_real_names[] =
"menu.hint_misc_general",
"menu.hint_misc_zapit",
"menu.hint_movie",
"menu.hint_movieplayer_plugin",
"menu.hint_net_broadcast",
"menu.hint_net_dhcp",
"menu.hint_net_djmount",
@@ -1045,6 +1047,7 @@ const char * locale_real_names[] =
"menu.hint_network",
"menu.hint_new_zap_mode",
"menu.hint_numeric_adjust",
"menu.hint_onekey_plugin",
"menu.hint_osd",
"menu.hint_osd_language",
"menu.hint_osd_preset",