This commit is contained in:
Jacek Jendrzej
2018-03-22 13:38:29 +01:00
parent 06f9a1b694
commit 8aa8152d09

View File

@@ -844,17 +844,21 @@ void cVideo::SetColorFormat(COLOR_FORMAT color_format) {
bool getvideo2(unsigned char *video, int xres, int yres)
{
bool ret = false;
if(video == NULL)
return false;
return ret;
char videosnapshot[] = "/dev/dvb/adapter0/video0";
int fd_video = open(videosnapshot, O_RDONLY);
if (fd_video < 0) {
perror(videosnapshot);
return false;
return ret;
}
ssize_t r = read(fd_video, video, xres * yres * 3);
if(r){
ret = true;
}
//ssize_t r = read(fd_video, video, xres * yres * 3);
close(fd_video);
return true;
return ret;
}
static bool swscale(unsigned char *src, unsigned char *dst, int sw, int sh, int dw, int dh, AVPixelFormat sfmt)
{