nhttpd/tuxboxapi/coolstream/controlapi.cpp: create screenshot in sync mode

Origin commit data
------------------
Branch: ni/coolstream
Commit: 370e3dd690
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-03-19 (Tue, 19 Mar 2013)


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

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2013-03-19 17:24:09 +04:00
parent 9c50ed92e8
commit b2ea79a8aa

View File

@@ -1477,9 +1477,15 @@ void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
CScreenShot * sc = new CScreenShot("/tmp/" + filename + ".png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
sc->EnableOSD(enableOSD);
sc->EnableVideo(enableVideo);
#if 0
sc->Start();
hh->SendOk(); // FIXME what if sc->Start() failed?
#else
if (sc->StartSync())
hh->SendOk();
else
hh->SendError();
#endif
}
//-----------------------------------------------------------------------------