mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
controlapi.cpp: make ScreenshotCGI() more configurable
Origin commit data
------------------
Branch: ni/coolstream
Commit: 133740da14
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-02-12 (Tue, 12 Feb 2013)
Origin message was:
------------------
- controlapi.cpp: make ScreenshotCGI() more configurable
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1463,10 +1463,23 @@ void CControlAPI::ReloadPluginsCGI(CyhookHandler *hh)
|
||||
|
||||
void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
|
||||
{
|
||||
CScreenShot * sc = new CScreenShot("/tmp/screenshot.png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
|
||||
sc->EnableOSD(true);
|
||||
bool enableOSD = true;
|
||||
bool enableVideo = true;
|
||||
std::string filename = "screenshot";
|
||||
|
||||
if(hh->ParamList["osd"] == "0")
|
||||
enableOSD = false;
|
||||
if(hh->ParamList["video"] == "0")
|
||||
enableVideo = false;
|
||||
if(hh->ParamList["name"] != "")
|
||||
filename = hh->ParamList["name"];
|
||||
|
||||
CScreenShot * sc = new CScreenShot("/tmp/" + filename + ".png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
|
||||
sc->EnableOSD(enableOSD);
|
||||
sc->EnableVideo(enableVideo);
|
||||
sc->Start();
|
||||
hh->SendOk();
|
||||
|
||||
hh->SendOk(); // FIXME what if sc->Start() failed?
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user