Merge branch 'dvbsi++' of 109.75.98.228:cst-private-neutrino into dvbsi++

Origin commit data
------------------
Commit: cac6486202
Author: [CST] Bas <bas@coolstreamtech.com>
Date: 2012-04-13 (Fri, 13 Apr 2012)
This commit is contained in:
[CST] Bas
2012-04-13 16:24:56 +08:00
17 changed files with 156 additions and 27 deletions

View File

@@ -1604,7 +1604,7 @@
<transponder frequency="11953000" symbol_rate="27500000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="11973000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="11992000" symbol_rate="27500000" polarization="0" fec_inner="9" system="1" modulation="1"/>
<transponder frequency="12012000" symbol_rate="27500000" polarization="1" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="12012000" symbol_rate="29700000" polarization="1" fec_inner="2" system="1" modulation="2"/>
<transponder frequency="12031000" symbol_rate="27500000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="12051000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="12070000" symbol_rate="27500000" polarization="0" fec_inner="3" system="0" modulation="1"/>

View File

@@ -529,11 +529,13 @@ CFlashExpert::CFlashExpert()
void CFlashExpert::readmtd(int preadmtd)
{
char tmp[10];
sprintf(tmp, "%d", preadmtd);
std::string filename = "/tmp/mtd";
filename += tmp;
filename += ".img"; // US-ASCII (subset of UTF-8 and ISO8859-1)
char tmpStr[256];
struct timeval tv;
gettimeofday(&tv, NULL);
strftime(tmpStr, sizeof(tmpStr), "_%Y%m%d_%H%M.img", localtime(&tv.tv_sec));
CMTDInfo* mtdInfo = CMTDInfo::getInstance();
std::string filename = "/tmp/" + mtdInfo->getMTDName(preadmtd);
filename += tmpStr;
if (preadmtd == -1) {
filename = "/tmp/flashimage.img"; // US-ASCII (subset of UTF-8 and ISO8859-1)
@@ -542,10 +544,10 @@ void CFlashExpert::readmtd(int preadmtd)
setTitle(LOCALE_FLASHUPDATE_TITLEREADFLASH);
paint();
showGlobalStatus(0);
showStatusMessageUTF((std::string(g_Locale->getText(LOCALE_FLASHUPDATE_ACTIONREADFLASH)) + " (" + CMTDInfo::getInstance()->getMTDName(preadmtd) + ')')); // UTF-8
showStatusMessageUTF((std::string(g_Locale->getText(LOCALE_FLASHUPDATE_ACTIONREADFLASH)) + " (" + mtdInfo->getMTDName(preadmtd) + ')')); // UTF-8
CFlashTool ft;
ft.setStatusViewer( this );
ft.setMTDDevice(CMTDInfo::getInstance()->getMTDFileName(preadmtd));
ft.setMTDDevice(mtdInfo->getMTDFileName(preadmtd));
if(!ft.readFromMTD(filename, 100)) {
showStatusMessageUTF(ft.getErrorMessage()); // UTF-8
@@ -611,8 +613,12 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey)
CMTDInfo* mtdInfo =CMTDInfo::getInstance();
for(int lx=0;lx<mtdInfo->getMTDCount();lx++) {
char sActionKey[20];
bool enabled = true;
// disable write uboot
if ((actionkey == "writemtd") && (lx == 0))
enabled = false;
sprintf(sActionKey, "%s%d", actionkey.c_str(), lx);
mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), true, NULL, this, sActionKey));
mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey));
}
mtdselector->exec(NULL,"");
delete mtdselector;

View File

@@ -421,7 +421,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
strncpy(g_settings.pref_subs[i], configfile.getString(cfg_key, "").c_str(), 30);
}
g_settings.zap_cycle = configfile.getInt32( "zap_cycle", 0 );
g_settings.sms_channel = configfile.getInt32( "sms_channel", 0 );
strcpy( g_settings.audio_PCMOffset, configfile.getString( "audio_PCMOffset", "0" ).c_str() );
//vcr
@@ -604,7 +603,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.cacheTXT = configfile.getInt32( "cacheTXT", 0);
g_settings.minimode = configfile.getInt32( "minimode", 0);
g_settings.mode_clock = configfile.getInt32( "mode_clock", 0);
g_settings.mode_left_right_key_tv = configfile.getInt32( "mode_left_right_key_tv", SNeutrinoSettings::ZAP);
g_settings.zapto_pre_time = configfile.getInt32( "zapto_pre_time", 0);
g_settings.spectrum = configfile.getBool("spectrum" , false);
g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false);
@@ -651,8 +649,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
strcpy( g_settings.ttx_font_file, configfile.getString( "ttx_font_file", FONTDIR"/DejaVuLGCSansMono-Bold.ttf" ).c_str() );
ttx_font_file = g_settings.ttx_font_file;
strcpy( g_settings.update_dir, configfile.getString( "update_dir", "/tmp" ).c_str() );
//BouquetHandling
g_settings.bouquetlist_mode = configfile.getInt32( "bouquetlist_mode", 0 );
// parentallock
if (!parentallocked) {
@@ -829,7 +825,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32( "rotor_swap", g_settings.rotor_swap);
configfile.setInt32( "emlog", g_settings.emlog);
configfile.setInt32( "zap_cycle", g_settings.zap_cycle );
configfile.setInt32( "sms_channel", g_settings.sms_channel );
configfile.setInt32( "hdd_fs", g_settings.hdd_fs);
configfile.setInt32( "hdd_sleep", g_settings.hdd_sleep);
configfile.setInt32( "hdd_noise", g_settings.hdd_noise);
@@ -1021,7 +1016,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32( "cacheTXT", g_settings.cacheTXT );
configfile.setInt32( "minimode", g_settings.minimode );
configfile.setInt32( "mode_clock", g_settings.mode_clock );
configfile.setInt32( "mode_left_right_key_tv", g_settings.mode_left_right_key_tv );
configfile.setInt32( "zapto_pre_time", g_settings.zapto_pre_time );
configfile.setBool("spectrum", g_settings.spectrum);
configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right);
@@ -1057,8 +1051,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setString("update_dir", g_settings.update_dir);
configfile.setString("font_file", g_settings.font_file);
configfile.setString("ttx_font_file", g_settings.ttx_font_file);
//BouquetHandling
configfile.setInt32( "bouquetlist_mode", g_settings.bouquetlist_mode );
//parentallock
configfile.setInt32( "parentallock_prompt", g_settings.parentallock_prompt );
@@ -3693,6 +3685,10 @@ void CNeutrinoApp::loadKeys(const char * fname)
g_settings.key_click = tconfig.getInt32( "key_click", 1 );
strcpy(g_settings.repeat_blocker, tconfig.getString("repeat_blocker", "150").c_str());
strcpy(g_settings.repeat_genericblocker, tconfig.getString("repeat_genericblocker", "100").c_str());
g_settings.bouquetlist_mode = tconfig.getInt32( "bouquetlist_mode", 0 );
g_settings.sms_channel = tconfig.getInt32( "sms_channel", 0 );
g_settings.mode_left_right_key_tv = tconfig.getInt32( "mode_left_right_key_tv", SNeutrinoSettings::ZAP);
}
void CNeutrinoApp::saveKeys(const char * fname)
@@ -3747,6 +3743,10 @@ void CNeutrinoApp::saveKeys(const char * fname)
tconfig.setString( "repeat_blocker", g_settings.repeat_blocker );
tconfig.setString( "repeat_genericblocker", g_settings.repeat_genericblocker );
tconfig.setInt32( "bouquetlist_mode", g_settings.bouquetlist_mode );
tconfig.setInt32( "sms_channel", g_settings.sms_channel );
tconfig.setInt32( "mode_left_right_key_tv", g_settings.mode_left_right_key_tv );
if(fname)
tconfig.saveConfig(fname);
}

View File

@@ -194,6 +194,11 @@
<td><a href="http://dbox/control/reloadplugins">
http://dbox/control/reloadplugins</a></td>
</tr>
<tr>
<td>42. <a href="#screenshot">Screenshot erstellen</a></td>
<td><a href="http://dbox/control/screenshot">
http://dbox/control/screenshot</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
@@ -1806,6 +1811,29 @@ Beispiel:<br>
43700016d66<br>
ok<br>
&nbsp;</div>
<br>
<!-- ----------------------------------------------------------- -->
<div class="title1"><a name="reloadplugins"></a>41. Plugins neu laden</div>
<div class="URL">Handler: http://dbox/control/reloadplugins</div>
<br>
<b>Parameter:</b> keine<br>
<b>R<EFBFBD>kgabe</b>: ok<br>
<br>
Die Pluginliste wird neu geladen.
<br><br>
<!-- ----------------------------------------------------------- -->
<div class="title1"><a name="screenshot"></a>42. Screenshot erstellen</div>
<div class="URL">Handler: http://dbox/control/screenshot</div>
<br>
<b>Parameter:</b> keine<br>
<b>R<EFBFBD>kgabe</b>: ok<br>
<br>
Screenshot mit TV Bild und OSD wird erstellt und unter /tmp/screenshot.png abgelegt.
<br>
&nbsp;&nbsp;</p>

View File

@@ -34,6 +34,8 @@
#include <cs_api.h>
#include <global.h>
#include "gui/plugins.h"//for relodplugins
#include <neutrino.h>
#include <driver/screenshot.h>
// yhttpd
#include "yhttpd.h"
#include "ytypes_globals.h"
@@ -175,6 +177,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"version", &CControlAPI::VersionCGI, ""},
{"reloadsetup", &CControlAPI::ReloadNutrinoSetupfCGI, ""},
{"reloadplugins", &CControlAPI::ReloadPluginsCGI, ""},
{"screenshot", &CControlAPI::ScreenshotCGI, ""},
// boxcontrol - devices
{"volume", &CControlAPI::VolumeCGI, "text/plain"},
{"lcd", &CControlAPI::LCDAction, "text/plain"},
@@ -440,11 +443,9 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh)
hh->SendError();
}
else
#if HAVE_DBOX2 // FIXME: not implemented
if(NeutrinoAPI->Controld->getVideoPowerDown())
if(CNeutrinoApp::getInstance()->getMode() == 4)//mode_standby = 4
hh->WriteLn("on");
else
#endif
hh->WriteLn("off");
}
@@ -732,7 +733,9 @@ static const struct key keynames[] = {
{"KEY_PAUSE", KEY_PAUSE},
{"KEY_RECORD", KEY_RECORD},
{"KEY_STOP", KEY_STOP},
{"KEY_PLAY", KEY_PLAY}
{"KEY_PLAY", KEY_PLAY},
{"KEY_WWW", KEY_WWW},
{"KEY_GAMES", KEY_GAMES}
};
// The code here is based on rcsim. Thx Carjay!
@@ -1448,6 +1451,13 @@ void CControlAPI::ReloadPluginsCGI(CyhookHandler *hh)
hh->SendOk();
}
void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
{
CScreenShot * sc = new CScreenShot("/tmp/screenshot.png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
sc->EnableOSD(true);
sc->Start();
hh->SendOk();
}
//-----------------------------------------------------------------------------
void CControlAPI::ZaptoCGI(CyhookHandler *hh)

View File

@@ -82,6 +82,7 @@ private:
void VersionCGI(CyhookHandler *hh);
void ReloadNutrinoSetupfCGI(CyhookHandler *hh);
void ReloadPluginsCGI(CyhookHandler *hh);
void ScreenshotCGI(CyhookHandler *hh);
void ZaptoCGI(CyhookHandler *hh);
void StartPluginCGI(CyhookHandler *hh);
void LCDAction(CyhookHandler *hh);

View File

@@ -87,6 +87,7 @@ install_DATA = channels.js \
Y_Tools_remote_osd.yhtm \
Y_Tools_Timer_Sync.js \
Y_Tools_Timer_Sync.yhtm \
Y_Tools_tvshot.yhtm \
Y_Version.txt \
Y_VLC.js \
Y_Wait.yhtm \

View File

@@ -544,6 +544,8 @@ start-block~remote_neo
<area shape="rect" href="javascript:rcsim('KEY_RECORD')" coords="212, 628, 237, 651" />
<area shape="rect" href="javascript:rcsim('KEY_STOP')" coords="330, 593, 353, 614" />
<area shape="rect" href="javascript:rcsim('KEY_PLAY')" coords="252, 593, 275, 614" />
<area shape="rect" href="javascript:rcsim('KEY_WWW')" coords="216, 128, 237, 150" />
<area shape="rect" href="javascript:rcsim('KEY_GAMES')" coords="290, 628, 315, 651" />
</map>
end-block~remote_neo
@@ -596,6 +598,8 @@ start-block~remote_zee
<area shape="rect" href="javascript:rcsim('KEY_RECORD')" coords="216, 582, 236, 604" />
<area shape="rect" href="javascript:rcsim('KEY_STOP')" coords="311, 552, 333, 574" />
<area shape="rect" href="javascript:rcsim('KEY_PLAY')" coords="248, 552, 269, 574" />
<area shape="rect" href="javascript:rcsim('KEY_WWW')" coords="216, 512, 236, 534" />
<area shape="rect" href="javascript:rcsim('KEY_GAMES')" coords="279, 582, 300, 604" />
</map>
end-block~remote_zee
@@ -648,5 +652,6 @@ start-block~remote_hd1
<area shape="rect" href="javascript:rcsim('KEY_RECORD')" coords="224, 620, 259, 645" />
<area shape="rect" href="javascript:rcsim('KEY_STOP')" coords="265, 625, 310, 645" />
<area shape="rect" href="javascript:rcsim('KEY_PLAY')" coords="315, 625, 350, 645" />
<area shape="rect" href="javascript:rcsim('KEY_GAMES')" coords="318, 422, 360, 455" />
</map>
end-block~remote_hd1

View File

@@ -90,11 +90,14 @@ function init(){
~
<li class="disabled" title="{=L:bc.menue.lcd_screenshot_desc_ni=}">{=L:bc.menue.lcd_screenshot=}</li>
=}
~=}
{=if-equal:{=global-var-get:boxtype=}~coolstream~
<li><a target="work" title="{=L:bc.menue.tv_screenshot_desc=}" href="Y_Tools_tvshot.yhtm">{=L:bc.menue.tv_screenshot=}</a></li>
~=}
{=if-equal:{=var-get:fbshot=}~true~
<li><a target="work" title="{=L:bc.menue.osd_screenshot_desc=}" href="Y_Tools_fbshot.yhtm">{=L:bc.menue.osd_screenshot=}</a></li>
~
<li class="disabled" title="{=L:bc.menue.osd_screenshot_desc_ni=}>{=L:bc.menue.osd_screenshot=}</li>
<li class="disabled" title="{=L:bc.menue.osd_screenshot_desc_ni=}">{=L:bc.menue.osd_screenshot=}</li>
=}
{=if-equal:{=var-get:dboxshot=}~true~
<li><a target="work" title="{=L:bc.menue.remote_osd_desc=}" href="Y_Tools_remote_osd.yhtm">{=L:bc.menue.remote_osd=}</a></li>

View File

@@ -34,9 +34,11 @@ function goUrl(_url){
<td>
<input type="button" value="{=L:on=}" onclick='goUrl("/control/standby?on");'/>
<input type="button" value="{=L:off=}" onclick='goUrl("/control/standby?off");'/>
{=if-not-equal:{=global-var-get:boxtype=}~coolstream~
{=if-equal:{=global-var-get:boxtype=}~coolstream~
<input type="button" value="{=L:bc.control.status=}" onclick='goUrl("/control/standby");'/>
~
<input type="button" value="{=L:bc.control.status=}" onclick='goUrl("/control/exec?Y_Tools&amp;standby_status");'/>
~=}
=}
</td>
</tr>
<tr><td class="y_form_header">{=L:bc.control.playback=}</td><td class="y_form_header">{=L:bc.control.recording_mode=}</td></tr>

View File

@@ -30,7 +30,7 @@ function do_clearshot2(){
<div class="work_box_head"><div class="work_box_head_h2">
{=var-set:help_url=Help-BoxControl-Remote_OSD=}{=var-set:menu={=L:bc.menue.remote_osd=}=}{=include-block:Y_Blocks.txt;work_menu=}</div></div>
<div class="work_box_body">
<div style="height:30x;">
<div style="height:30px;">
<span id="buttons" style="display:none"><button name="dboxshot" ytype="shot" onclick="do_dboxshot()">{=L:bc.osd.shot=}</button>&nbsp;
<button name="clearshot" ytype="clearshot" onclick="do_clearshot()">{=L:bc.osd.delete_shots=}</button></span>
<span id="statusline"><img border="0" src="/images/wait.gif" width="20" height="20" alt="wait"/></span>

View File

@@ -0,0 +1,51 @@
{=include-block:Y_Blocks.txt;head=}
<script type="text/javascript" src="/Y_Baselib.js"></script>
<script type="text/javascript" src="/prototype.js"></script>
<script type="text/javascript">
//<![CDATA[
function do_snapshot(){
loadSyncURL("/control/screenshot");
window.setTimeout("do_showshot();", 3500);
}
function do_showshot(){
$('statusline').hide();
$('buttons').show();
$('shot').src = "/tmp/screenshot.png?"+Math.random();
$('shot').show();
}
function do_snapshot_again(){
$('buttons').hide();
$('statusline').show();
window.setTimeout('do_snapshot()', 100);
}
function do_clearshot(){
$('shot').hide();
loadSyncURL("/control/exec?Y_Tools&tvshot_clear");
}
//]]>
</script>
</head>
<body onload="do_snapshot();">
<div class="work_box">
<div class="work_box_head">
<div class="work_box_head_h2">
{=var-set:menu={=L:bc.menue.tv_screenshot=}=}
{=include-block:Y_Blocks.txt;work_menu=}
</div>
</div>
<div class="work_box_body">
<div style="height:30px;">
<span id="buttons" style="display: none;">
<button name="snapshot" ytype="shot" onclick="do_snapshot_again();">{=L:bc.tv.shot=}</button>
<button name="clearshot" ytype="clearshot" onclick="do_clearshot();">{=L:bc.tv.delete_shot=}</button>
</span>
<span id="statusline">
<img border="0" src="/images/wait.gif" width="20" height="20" alt="wait"/>
{=L:bc.tv.shap_wait_text=}
</span>
</div>
<img id="shot" src="" style="display: none; width: 100%; margin: 1em 0"/>
</div>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -79,12 +79,14 @@ bc.menue.messages_desc=Nachricht an die Box senden
bc.menue.messages=Nachrichten
bc.menue.remote_desc=Fernbedinung
bc.menue.remote=Fernbedienung
bc.menue.lcd_screenshot_desc=lcd screenshot machen
bc.menue.lcd_screenshot_desc=LCD Screenshot erstellen
bc.menue.lcd_screenshot=LCD Screenshot
bc.menue.lcd_screenshot_desc_ni=lcshot nicht installiert in /bin oder /var/bin
bc.menue.osd_screenshot_desc=osd screenshot machen
bc.menue.osd_screenshot_desc=OSD Screenshot erstellen
bc.menue.osd_screenshot=OSD Screenshot
bc.menue.osd_screenshot_desc_ni=fbshot nicht installiert in /bin oder /var/bin
bc.menue.tv_screenshot_desc=TV Screenshot erstellen
bc.menue.tv_screenshot=TV Screenshot
bc.menue.remote_osd_desc=Fernbedienung und On Screen Display
bc.menue.remote_osd=Fernbed. & OSD
bc.menue.remote_osd_desc_ni=dboxshot nicht installiert in /bin oder /var/bin
@@ -130,6 +132,11 @@ bc.osd.shot=Schnappschuss
bc.osd.delete_shots=Schnappschuss löschen
bc.osd.shap_wait_text=Schnappschuss wird erstellt
======== Boxcontrol - TV-Screenshot
bc.tv.shot=Schnappschuss
bc.tv.delete_shot=Schnappschuss löschen
bc.tv.shap_wait_text=Schnappschuss wird erstellt
========= Boxcontrol - Others
bc.channels=Sender

View File

@@ -87,6 +87,8 @@ bc.menue.lcd_screenshot_desc_ni=lcshot not installed at /bin or /var/bin
bc.menue.osd_screenshot_desc=make osd screenshot
bc.menue.osd_screenshot=OSD Screenshot
bc.menue.osd_screenshot_desc_ni=fbshot not installed at /bin or /var/bin
bc.menue.tv_screenshot_desc=make tv screenshot
bc.menue.tv_screenshot=TV Screenshot
bc.menue.remote_osd_desc=remote and osd
bc.menue.remote_osd=Remote & OSD
bc.menue.remote_osd_desc_ni=dboxshot not installed at /bin or /var/bin
@@ -132,6 +134,11 @@ bc.osd.shot=Shot
bc.osd.delete_shots=Delete shots
bc.osd.shap_wait_text=Take Snapshot
======== Boxcontrol - TV-Screenshot
bc.tv.shot=Shot
bc.tv.delete_shot=Delete shot
bc.tv.shap_wait_text=Take Snapshot
========= Boxcontrol - Others
bc.channels=Channels

View File

@@ -87,6 +87,8 @@ bc.menue.lcd_screenshot_desc_ni=lcshot não se encontra instalado em /bin ou /va
bc.menue.osd_screenshot_desc=fazer um osd screenshot
bc.menue.osd_screenshot=OSD Screenshot
bc.menue.osd_screenshot_desc_ni=fbshot não se encontra instalado em /bin ou /var/bin
bc.menue.tv_screenshot_desc=frazer um tv screenshot
bc.menue.tv_screenshot=TV Screenshot
bc.menue.remote_osd_desc=remote e osd
bc.menue.remote_osd=Remote & OSD
bc.menue.remote_osd_desc_ni=dboxshot não se encontra instalado em /bin ou /var/bin
@@ -132,6 +134,11 @@ bc.osd.shot=Shot
bc.osd.delete_shots=Apagar shots
bc.osd.shap_wait_text=Fazer Snapshot
======== Boxcontrol - TV-Screenshot
bc.tv.shot=Shot
bc.tv.delete_shot=Apagar shots
bc.tv.shap_wait_text=Frazer Snapshot
========= Boxcontrol - Others
bc.channels=Canais

View File

@@ -565,6 +565,7 @@ case "$1" in
lcshot) shift 1; do_lcshot $* ;;
fbshot) shift 1; do_fbshot $* ;;
fbshot_clear) do_fbshot_clear ;;
tvshot_clear) rm -f /tmp/screenshot.png ;;
get_update_version_dbox) wget -O /tmp/version.txt "http://www.yjogol.com/download/Y_Version.txt" ;;
get_update_version_coolstream) wget -O /tmp/version.txt "http://www.yjogol.com/download/coolstream/Y_Version.txt" ;;
settings_backup_restore) shift 1; do_settings_backup_restore $* ;;