ShowPicture: return boolean expression

This commit is contained in:
GetAway
2019-01-12 11:48:14 +01:00
parent da0d4290a3
commit 3ff02b06f2
11 changed files with 50 additions and 31 deletions

View File

@@ -469,13 +469,14 @@ void VDec::SetVideoMode(analog_mode_t mode)
fop(ioctl, MPEG_VID_SET_OUTFMT, outputformat);
}
void cVideo::ShowPicture(const char * fname)
bool cVideo::ShowPicture(const char * fname)
{
_vdec->ShowPicture(fname);
return _vdec->ShowPicture(fname);
}
void VDec::ShowPicture(const char * fname)
bool VDec::ShowPicture(const char * fname)
{
bool ret = false;
lt_debug("%s(%s)\n", __FUNCTION__, fname);
char destname[512];
char cmd[512];
@@ -487,7 +488,7 @@ void VDec::ShowPicture(const char * fname)
if (stat(fname, &st2))
{
lt_info("%s: could not stat %s (%m)\n", __func__, fname);
return;
return ret;
}
mkdir(destname, 0755);
/* the cache filename is (example for /share/tuxbox/neutrino/icons/radiomode.jpg):
@@ -542,13 +543,14 @@ void VDec::ShowPicture(const char * fname)
/* writing twice seems to be more reliable */
fop(ioctl, MPEG_VID_STILLP_WRITE, &buf);
fop(ioctl, MPEG_VID_STILLP_WRITE, &buf);
ret = true;
}
free(data);
}
close(mfd);
out:
pthread_mutex_unlock(&stillp_mutex);
return;
return ret;
#if 0
/* DirectFB based picviewer: works, but is slow and the infobar
draws in the same plane */