bool isInitted() { return initted; };
- virtual void screenShot(const char* fileName)=0;
+ virtual bool screenShot(const char* fileName)=0;
virtual int getFontNames(const char*** /* names */,const char*** /* names_keys */) { return 0; };
virtual void setFont(const char* /* fontname */) {};
return 1;
}
-void OsdDirectFB::screenShot(char* fileName)
+bool OsdDirectFB::screenShot(const char* fileName)
{
- screen->screenShot(fileName);
+ return screen->screenShot(fileName);
}
int init();
int shutdown();
- void screenShot(char* fileName);
+ bool screenShot(const char* fileName);
IDirectFB* getDfb() {return dfb;};
IDirectFBDisplayLayer* getOsdLayer(){return osd_layer;};
return 1;
}
-void OsdOpenGL::screenShot(const char* fileName)
+bool OsdOpenGL::screenShot(const char* fileName)
{
BeginPainting();
- screen->screenShot(fileName);
+ bool ret = screen->screenShot(fileName);
EndPainting();
+ return ret;
}
void OsdOpenGL::threadMethod()
int init();
int shutdown();
- void screenShot(const char* fileName);
+ bool screenShot(const char* fileName);
Surface * createNewSurface();
height = display_height;
}
-bool OsdOpenVG::screenShot(void* buffer, int width, int height, bool osd /*include osd*/)
+bool OsdOpenVG::screenShotInternal(void* buffer, int width, int height, bool includeOSD)
{
if (!initted) return false;
res = vc_dispmanx_resource_create(VC_IMAGE_RGBA32, width, height, &image_ptr);
display = vc_dispmanx_display_open(0);
- if (!osd)
+ if (!includeOSD)
{
vc_dispmanx_snapshot(display, res,
static_cast<DISPMANX_TRANSFORM_T>(DISPMANX_SNAPSHOT_NO_RGB | DISPMANX_SNAPSHOT_FILL/*|DISPMANX_SNAPSHOT_PACK*/));
int shutdown();
int stopUpdate();
- bool screenShot(void* buffer, int width, int height, bool osd /*include osd*/);
+ bool screenShotInternal(void* buffer, int width, int height, bool includeOSD);
float getFontHeight();
float getCharWidth(wchar_t c);
#endif
}
-void OsdVector::screenShot(const char* fileName)
+bool OsdVector::screenShot(const char* fileName)
{
//Do nothing, if no libmagick is there
#ifdef PICTURE_DECODER_MAGICK
{
Blob myblob;
- if (!screenShot(mem, width, height, true))
+ if (!screenShotInternal(mem, width, height, true))
{
Log::getInstance()->log("OsdVector", Log::DEBUG, "Screenshot failed!");
free(mem);
- return;
+ return false;
}
myblob.updateNoCopy(mem, length, Blob::MallocAllocator);
catch ( Exception& error_ )
{
Log::getInstance()->log("MagickEncoder", Log::DEBUG, "Libmagick: %s", error_.what());
-
+ return false;
}
+ return true;
#endif
+ return false;
}
Surface* OsdVector::createNewSurface()
int restore();
- void screenShot(const char* fileName);
- virtual bool screenShot(void* buffer, int width, int height, bool osd /*include osd*/) = 0;
+ bool screenShot(const char* fileName);
+ virtual bool screenShotInternal(void* buffer, int width, int height, bool osd /*include osd*/) = 0;
Surface* createNewSurface();
return 1;
}
-void OsdWinPixel::screenShot(const char* fileName)
+bool OsdWinPixel::screenShot(const char* fileName)
{
- screen->screenShot(fileName);
+ return screen->screenShot(fileName);
}
LPDIRECT3DTEXTURE9 OsdWinPixel::getNextOsdTexture()
bool isInitialized() { return initted; }
- void screenShot(const char* fileName);
+ bool screenShot(const char* fileName);
Surface * createNewSurface();
height = BACKBUFFER_HEIGHT;
}
-bool OsdWinVector::screenShot(void *buffer, int width, int height, bool osd /*include osd*/)
+bool OsdWinVector::screenShotInternal(void *buffer, int width, int height, bool includeOSD)
{
//screen->screenShot(fileName);
return false;
float getFontHeight();
float getCharWidth(wchar_t c);
- bool screenShot(void *buffer, int width, int height, bool osd /*include osd*/);
+ bool screenShotInternal(void *buffer, int width, int height, bool includeOSD);
int getFontNames(const char *** names, const char *** names_keys);
virtual void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, DrawStyle& nextColour);
virtual int updateToScreen(int sx, int sy, int w, int h, int dx, int dy)=0;
virtual void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)=0;
- virtual void screenShot(const char* fileName)=0;
+ virtual bool screenShot(const char* fileName)=0;
/* This is for system which need a locking of the drawing surface to speed up drawing */
virtual void startFastDraw() {};
return 0;
}
-void SurfaceDirectFB::screenShot(const char* fileName)
+bool SurfaceDirectFB::screenShot(const char* fileName)
{
- return;
-
+ return false;
}
void SurfaceDirectFB::readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)
void drawBitmap(int x, int y, const Bitmap& bm);
int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
- void screenShot(const char* fileName);
+ bool screenShot(const char* fileName);
IDirectFBSurface* getSurfaceDFB(){return surface;};
return 0;
}
-void SurfaceOpenGL::screenShot(const char* fileName)
+bool SurfaceOpenGL::screenShot(const char* fileName)
{
//Isn't this for debugging only, so I won't implement it yet
+ return false;
}
void SurfaceOpenGL::readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)
void drawBitmap(int x, int y, const Bitmap& bm,const DisplayRegion & region);
int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
- void screenShot(const char* fileName);
+ bool screenShot(const char* fileName);
void ReleaseSurface();
int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy);
void drawJpeg(const char *fileName,int x, int y,int *width, int *height);
void drawTTChar(int ox, int oy, int x, int y, cTeletextChar c);
- void readPixel(int /* x */, int /* y */, unsigned char* /* r */, unsigned char* /* g */, unsigned char* /* b */) {};
- void screenShot(const char* /* fileName */) {};
+ void readPixel(int /* x */, int /* y */, unsigned char* /* r */, unsigned char* /* g */, unsigned char* /* b */) {}
+ bool screenShot(const char* /* fileName */) { return false; }
protected:
return 0;
}
-void SurfaceWin::screenShot(const char* fileName)
+bool SurfaceWin::screenShot(const char* fileName)
{
//Isn't this for debugging only, so I won't implement it yet
+ return false;
}
void SurfaceWin::readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)
void drawBitmap(int x, int y, const Bitmap& bm,const DisplayRegion & region);
int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
- void screenShot(const char* fileName);
+ bool screenShot(const char* fileName);
void ReleaseSurface();
int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy);
void drawJpeg(const char *fileName,int x, int y,int *width, int *height);