From 33c638d538cef475cbcd61a941dc94294417e849 Mon Sep 17 00:00:00 2001 From: "m.Rcu" <> Date: Sun, 12 Feb 2012 20:30:50 +0100 Subject: Jpeg screengrab use VDR RgbToJpeg function. --- softhddev.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'softhddev.c') diff --git a/softhddev.c b/softhddev.c index 882d2c1..99f06f8 100644 --- a/softhddev.c +++ b/softhddev.c @@ -39,9 +39,6 @@ #define __USE_GNU #endif #include -#ifdef USE_JPEG -#include -#endif #include "misc.h" #include "softhddev.h" @@ -1013,6 +1010,9 @@ int PlayVideo(const uint8_t * data, int size) #endif } + /// call VDR support function +extern uint8_t *CreateJpeg(uint8_t *, int *, int, int, int); + #if defined(USE_JPEG) && JPEG_LIB_VERSION >= 80 /** @@ -1079,21 +1079,15 @@ uint8_t *CreateJpeg(uint8_t * image, int raw_size, int *size, int quality, uint8_t *GrabImage(int *size, int jpeg, int quality, int width, int height) { if (jpeg) { -#if defined(USE_JPEG) && JPEG_LIB_VERSION >= 80 - int raw_size; - uint8_t *image; uint8_t *jpg_image; + uint8_t *image; + int raw_size = 0; - raw_size = 0; image = VideoGrab(&raw_size, &width, &height, 0); - jpg_image = CreateJpeg(image, raw_size, size, quality, width, height); + jpg_image = CreateJpeg(image, size, quality, width, height); + free(image); return jpg_image; -#else - (void)quality; - Error(_("softhddev: jpeg grabbing not supported\n")); - return NULL; -#endif } if (width != -1 && height != -1) { Warning(_("softhddev: scaling unsupported\n")); -- cgit v1.2.3