mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
fix commit 6d8a853e82
Origin commit data
------------------
Branch: master
Commit: d3201d6c49
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2018-03-22 (Thu, 22 Mar 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -845,17 +845,21 @@ void cVideo::SetColorFormat(COLOR_FORMAT color_format) {
|
|||||||
|
|
||||||
bool getvideo2(unsigned char *video, int xres, int yres)
|
bool getvideo2(unsigned char *video, int xres, int yres)
|
||||||
{
|
{
|
||||||
|
bool ret = false;
|
||||||
if(video == NULL)
|
if(video == NULL)
|
||||||
return false;
|
return ret;
|
||||||
char videosnapshot[] = "/dev/dvb/adapter0/video0";
|
char videosnapshot[] = "/dev/dvb/adapter0/video0";
|
||||||
int fd_video = open(videosnapshot, O_RDONLY);
|
int fd_video = open(videosnapshot, O_RDONLY);
|
||||||
if (fd_video < 0) {
|
if (fd_video < 0) {
|
||||||
perror(videosnapshot);
|
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);
|
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)
|
static bool swscale(unsigned char *src, unsigned char *dst, int sw, int sh, int dw, int dh, AVPixelFormat sfmt)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user