GRAB enabled

This commit is contained in:
jojo61
2018-10-04 16:49:06 +02:00
parent fdedeb6944
commit 35af60f504
7 changed files with 300 additions and 294 deletions

View File

@@ -2460,20 +2460,20 @@ 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) {
uint8_t *image;
int raw_size;
uint8_t *image;
int raw_size;
raw_size = 0;
image = VideoGrab(&raw_size, &width, &height, 0);
if (image) { // can fail, suspended, ...
uint8_t *jpg_image;
raw_size = 0;
image = VideoGrab(&raw_size, &width, &height, 0);
if (image) { // can fail, suspended, ...
uint8_t *jpg_image;
jpg_image = CreateJpeg(image, size, quality, width, height);
jpg_image = CreateJpeg(image, size, quality, width, height);
free(image);
return jpg_image;
}
return NULL;
free(image);
return jpg_image;
}
return NULL;
}
return VideoGrab(size, &width, &height, 1);
}