mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libspark/video: ShowPicture: add flag to indicate that input file is already m2v and doesn't need to be converted
This commit is contained in:
@@ -364,7 +364,11 @@ void cVideo::SetVideoMode(analog_mode_t mode)
|
||||
proc_put("/proc/stb/avs/0/colorformat", m, strlen(m));
|
||||
}
|
||||
|
||||
#ifdef MARTII
|
||||
void cVideo::ShowPicture(const char * fname, bool isM2V)
|
||||
#else
|
||||
void cVideo::ShowPicture(const char * fname)
|
||||
#endif
|
||||
{
|
||||
lt_debug("%s(%s)\n", __func__, fname);
|
||||
static const unsigned char pes_header[] = { 0x00, 0x00, 0x01, 0xE0, 0x00, 0x00, 0x80, 0x00, 0x00 };
|
||||
@@ -380,6 +384,11 @@ void cVideo::ShowPicture(const char * fname)
|
||||
lt_info("%s: video_standby == true\n", __func__);
|
||||
return;
|
||||
}
|
||||
#ifdef MARTII
|
||||
if (isM2V)
|
||||
strncpy(destname, fname, sizeof(destname));
|
||||
else {
|
||||
#endif
|
||||
strcpy(destname, "/var/cache");
|
||||
if (stat(fname, &st2))
|
||||
{
|
||||
@@ -408,6 +417,9 @@ void cVideo::ShowPicture(const char * fname)
|
||||
system(cmd); /* TODO: use libavcodec to directly convert it */
|
||||
utime(destname, &u);
|
||||
}
|
||||
#ifdef MARTII
|
||||
}
|
||||
#endif
|
||||
mfd = open(destname, O_RDONLY);
|
||||
if (mfd < 0)
|
||||
{
|
||||
|
@@ -174,7 +174,11 @@ class cVideo
|
||||
bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; };
|
||||
void SetCECAutoView(bool) { return; };
|
||||
void SetCECAutoStandby(bool) { return; };
|
||||
#ifdef MARTII
|
||||
void ShowPicture(const char * fname, bool isM2V = false);
|
||||
#else
|
||||
void ShowPicture(const char * fname);
|
||||
#endif
|
||||
void StopPicture();
|
||||
void Standby(unsigned int bOn);
|
||||
#ifdef MARTII
|
||||
|
Reference in New Issue
Block a user