mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
ShowPicture: return boolean expression
This commit is contained in:
@@ -321,8 +321,9 @@ 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);
|
||||
char destname[512];
|
||||
char cmd[512];
|
||||
@@ -334,18 +335,18 @@ void cVideo::ShowPicture(const char * fname)
|
||||
{
|
||||
/* does not work and the driver does not seem to like it */
|
||||
hal_info("%s: video_standby == true\n", __func__);
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
if (fd < 0)
|
||||
if (fd == -1)
|
||||
{
|
||||
hal_info("%s: decoder not opened?\n", __func__);
|
||||
return;
|
||||
hal_info("%s: decoder not opened\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
strcpy(destname, "/var/cache");
|
||||
if (stat(fname, &st2))
|
||||
{
|
||||
hal_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):
|
||||
@@ -395,10 +396,11 @@ void cVideo::ShowPicture(const char * fname)
|
||||
read(mfd, iframe, st.st_size);
|
||||
show_iframe(fd, iframe, st.st_size);
|
||||
free(iframe);
|
||||
ret = true;
|
||||
out:
|
||||
close(mfd);
|
||||
pthread_mutex_unlock(&stillp_mutex);
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void cVideo::StopPicture()
|
||||
|
Reference in New Issue
Block a user