mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
ShowPicture: return boolean expression
This commit is contained in:
@@ -394,13 +394,14 @@ 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)
|
||||
{
|
||||
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", __func__, fname);
|
||||
char destname[512];
|
||||
char cmd[512];
|
||||
@@ -411,13 +412,19 @@ void VDec::ShowPicture(const char * fname)
|
||||
{
|
||||
/* does not work and the driver does not seem to like it */
|
||||
lt_info("%s: video_standby == true\n", __func__);
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
if (fd == -1)
|
||||
{
|
||||
lt_info("%s: decoder not opened\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
strcpy(destname, "/var/cache");
|
||||
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):
|
||||
@@ -470,10 +477,11 @@ void VDec::ShowPicture(const char * fname)
|
||||
video_still_picture sp = { iframe, st.st_size };
|
||||
fop(ioctl, VIDEO_STILLPICTURE, &sp);
|
||||
free(iframe);
|
||||
ret = true;
|
||||
}
|
||||
out:
|
||||
close(mfd);
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void cVideo::StopPicture()
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
int Stop(bool blank = true);
|
||||
int SetStreamType(VIDEO_FORMAT type);
|
||||
void SetSyncMode(AVSYNC_TYPE mode);
|
||||
void ShowPicture(const char * fname);
|
||||
bool ShowPicture(const char * fname);
|
||||
void Standby(unsigned int bOn);
|
||||
|
||||
/* used internally by dmx */
|
||||
|
Reference in New Issue
Block a user