Creating a screenshot added to yWeb

- Create Screenshot: http://box/control/screenshot
 (patch by FlatTv)

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2194 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 45a2a6eab8
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-04-08 (Sun, 08 Apr 2012)

Origin message was:
------------------
* Creating a screenshot added to yWeb

- Create Screenshot: http://box/control/screenshot
 (patch by FlatTv)

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2194 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2012-04-08 12:26:08 +00:00
parent 94b901910c
commit f502370104
3 changed files with 38 additions and 0 deletions

View File

@@ -35,6 +35,7 @@
#include <global.h>
#include "gui/plugins.h"//for relodplugins
#include <neutrino.h>
#include <driver/screenshot.h>
// yhttpd
#include "yhttpd.h"
#include "ytypes_globals.h"
@@ -176,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"},
@@ -1447,6 +1449,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)