- screenshot: allow screenshots using external utility; most code is taken from TangoCash

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2019-12-26 23:53:50 +01:00
committed by Thilo Graf
parent 275fbb7c4f
commit b94d31cb75
2 changed files with 75 additions and 6 deletions

View File

@@ -23,6 +23,14 @@
#ifndef __screenshot_h_
#define __screenshot_h_
#ifdef SCREENSHOT
#if BOXMODEL_VUPLUS
#define SCREENSHOT_EXTERNAL 1
#else
#define SCREENSHOT_INTERNAL 1
#endif
#endif
#include <pthread.h>
class CScreenShot
@@ -37,13 +45,15 @@ class CScreenShot
private:
screenshot_format_t format;
std::string filename;
unsigned char * pixel_data;
int xres;
int yres;
bool extra_osd;
bool get_osd;
bool get_video;
bool scale_to_video;
#if SCREENSHOT_INTERNAL
unsigned char * pixel_data;
FILE *fd;
pthread_t scs_thread;
pthread_mutex_t thread_mutex;
@@ -65,6 +75,7 @@ class CScreenShot
#ifdef BOXMODEL_CS_HD2
bool mergeOsdScreen(uint32_t dx, uint32_t dy, fb_pixel_t* osdData);
#endif
#endif // SCREENSHOT_INTERNAL
public:
CScreenShot(const std::string fname = "", screenshot_format_t fmt = CScreenShot::FORMAT_JPG);