diff --git a/libspark/video.cpp b/libspark/video.cpp index c7ef086..407345f 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -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) { diff --git a/libspark/video_lib.h b/libspark/video_lib.h index 014bc4a..d5035c6 100644 --- a/libspark/video_lib.h +++ b/libspark/video_lib.h @@ -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