From a46b44fba49f5074feedc2f1da4fb77d27365049 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 15 Feb 2012 13:34:07 +0000 Subject: [PATCH] Enable screenshots; handle screenshot key in streaminfo git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2091 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/013ce5ce28ff3b9bdf7c75c69eac7dca360def2f Author: [CST] Focus Date: 2012-02-15 (Wed, 15 Feb 2012) --- lib/libcoolstream/video_cs.h | 1 + src/driver/screenshot.cpp | 2 +- src/gui/streaminfo2.cpp | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libcoolstream/video_cs.h b/lib/libcoolstream/video_cs.h index 5b3ca08a5..a80d59051 100644 --- a/lib/libcoolstream/video_cs.h +++ b/lib/libcoolstream/video_cs.h @@ -230,6 +230,7 @@ public: int CloseVBI(void); int StartVBI(unsigned short pid); int StopVBI(void); + bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); }; #endif // __VIDEO_CS_H_ diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index 35b6aa062..985af7f92 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -79,7 +79,7 @@ bool CScreenShot::GetData() CFrameBuffer::getInstance()->setActive(false); #endif -#if 0 // to enable after libcs/drivers update +#if 1 // to enable after libcs/drivers update res = videoDecoder->GetScreenImage(pixel_data, xres, yres, get_video, get_osd, scale_to_video); #endif diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 0515b2815..493b7451b 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -246,6 +246,10 @@ int CStreamInfo2::doSignalStrengthLoop () res = menu_return::RETURN_EXIT_ALL; break; } + else if (msg == (neutrino_msg_t) g_settings.key_screenshot) { + CNeutrinoApp::getInstance ()->handleMsg (msg, data); + continue; + } // -- any key --> abort if (msg <= CRCInput::RC_MaxRC) {