screenshot: add bmp format and options to dump fb and scale

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2054 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 14bb685b1e
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-01-12 (Thu, 12 Jan 2012)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-01-12 15:14:46 +00:00
parent 5fe9c45f6b
commit c2fa63c409
2 changed files with 70 additions and 4 deletions

View File

@@ -29,7 +29,8 @@ class CScreenShot : public OpenThreads::Thread
public:
typedef enum {
FORMAT_PNG,
FORMAT_JPG
FORMAT_JPG,
FORMAT_BMP,
} screenshot_format_t;
private:
@@ -38,6 +39,9 @@ class CScreenShot : public OpenThreads::Thread
unsigned char * pixel_data;
int xres;
int yres;
bool get_osd;
bool get_video;
bool scale_to_video;
FILE *fd;
bool GetData();
@@ -46,6 +50,7 @@ class CScreenShot : public OpenThreads::Thread
bool SavePng();
bool SaveJpg();
bool SaveBmp();
void run();
public:
@@ -53,6 +58,10 @@ class CScreenShot : public OpenThreads::Thread
~CScreenShot();
void MakeFileName(const t_channel_id channel_id);
void SetSize(int w, int h) { xres = w; yres = h; }
void EnableVideo(bool enable) { get_video = enable; }
void EnableOSD(bool enable) { get_osd = enable; }
void ScaleToVideo(bool enable) { scale_to_video = enable; }
bool Start();
bool StartSync();
};