Origin commit data
------------------
Branch: master
Commit: 9bed7b0cf8
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-03-15 (Fri, 15 Mar 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2019-03-15 21:33:01 +01:00
13 changed files with 60 additions and 31 deletions

View File

@@ -160,7 +160,7 @@ int cVideo::setAspectRatio(int aspect, int mode)
int n;
int mo = (mode < 0||mode > 3) ? 4 : mode;
hal_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mo]);
hal_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mo)]);
if (aspect > 3 || aspect == 0)
hal_info("%s: invalid aspect: %d\n", __func__, aspect);
@@ -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()