From b2ea79a8aaff5b69fc2d0a84f55d5a8ed38f539a Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 19 Mar 2013 17:24:09 +0400 Subject: [PATCH] nhttpd/tuxboxapi/coolstream/controlapi.cpp: create screenshot in sync mode Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/370e3dd6904da7406dc07427994d23077ef77457 Author: [CST] Focus Date: 2013-03-19 (Tue, 19 Mar 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index 8957d6d2a..c77451c15 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -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 } //-----------------------------------------------------------------------------