add ShowPig libspark

This commit is contained in:
Frankenstone
2021-05-09 21:25:43 +02:00
committed by Thilo Graf
parent 3bb361a089
commit 1e12a166cd
2 changed files with 16 additions and 0 deletions

View File

@@ -102,6 +102,14 @@ static const char *VMPEG_framerate[] = {
"/proc/stb/vmpeg/1/framerate" "/proc/stb/vmpeg/1/framerate"
}; };
static const char *VMPEG_visible[] = {
"/proc/stb/vmpeg/0/visible",
"/proc/stb/vmpeg/1/visible",
"/proc/stb/vmpeg/2/visible",
"/proc/stb/vmpeg/3/visible"
};
static const char *vid_modes[] = { static const char *vid_modes[] = {
"pal", // VIDEO_STD_NTSC "pal", // VIDEO_STD_NTSC
"pal", // VIDEO_STD_SECAM "pal", // VIDEO_STD_SECAM
@@ -813,6 +821,13 @@ void cVideo::VideoParamWatchdog(void)
#endif #endif
} }
void cVideo::ShowPig(int _x)
{
char buffer[64];
sprintf(buffer, "%d", _x);
proc_put(VMPEG_visible[devnum], buffer, strlen(buffer));
}
void cVideo::Pig(int x, int y, int w, int h, int osd_w, int osd_h, int startx, int starty, int endx, int endy) void cVideo::Pig(int x, int y, int w, int h, int osd_w, int osd_h, int startx, int starty, int endx, int endy)
{ {
char buffer[64]; char buffer[64];

View File

@@ -202,6 +202,7 @@ class cVideo
bool ShowPicture(const char * fname, const char *_destname = NULL); bool ShowPicture(const char * fname, const char *_destname = NULL);
void StopPicture(); void StopPicture();
void Standby(unsigned int bOn); void Standby(unsigned int bOn);
void ShowPig(int _x);
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600, int startx = 0, int starty = 0, int endx = 1279, int endy = 719); void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600, int startx = 0, int starty = 0, int endx = 1279, int endy = 719);
void SetControl(int, int); void SetControl(int, int);
void VideoParamWatchdog(void); void VideoParamWatchdog(void);