ShowPicture: return boolean expression

This commit is contained in:
GetAway
2019-01-12 11:47:33 +01:00
parent 0b6120d170
commit 4f15222d9c
13 changed files with 57 additions and 28 deletions

View File

@@ -580,18 +580,26 @@ void cVideo::SetVideoMode(analog_mode_t mode)
proc_put("/proc/stb/avs/0/colorformat", m, strlen(m));
}
void cVideo::ShowPicture(const char * fname)
bool cVideo::ShowPicture(const char * fname)
{
bool ret = false;
hal_debug("%s(%s)\n", __func__, fname);
if (video_standby)
{
/* does not work and the driver does not seem to like it */
hal_info("%s: video_standby == true\n", __func__);
return;
return ret;
}
/* in movieplayer mode, fd is not opened */
if (fd == -1)
{
hal_info("%s: decoder not opened\n", __func__);
return ret;
}
struct stat st;
if (stat(fname, &st)){
return;
return ret;
}
closeDevice();
openDevice();
@@ -611,8 +619,9 @@ void cVideo::ShowPicture(const char * fname)
usleep(150000);
ioctl(fd, VIDEO_STOP, 0);
ioctl(fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX);
ret = true;
}
return;
return ret;
}
void cVideo::StopPicture()