From 9d4ced9ca3b75012326168314984e34fdf274762 Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Sun, 9 May 2021 21:25:43 +0200 Subject: [PATCH] add ShowPig libspark Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/06eda228fca090541f896368291c89554ee2515c Author: Frankenstone Date: 2021-05-09 (Sun, 09 May 2021) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libspark/video.cpp | 15 +++++++++++++++ libspark/video_lib.h | 1 + 2 files changed, 16 insertions(+) diff --git a/libspark/video.cpp b/libspark/video.cpp index 11205b9..9f01bd5 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -102,6 +102,14 @@ static const char *VMPEG_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[] = { "pal", // VIDEO_STD_NTSC "pal", // VIDEO_STD_SECAM @@ -813,6 +821,13 @@ void cVideo::VideoParamWatchdog(void) #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) { char buffer[64]; diff --git a/libspark/video_lib.h b/libspark/video_lib.h index d77415c..71fdacb 100644 --- a/libspark/video_lib.h +++ b/libspark/video_lib.h @@ -202,6 +202,7 @@ class cVideo bool ShowPicture(const char * fname, const char *_destname = NULL); void StopPicture(); 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 SetControl(int, int); void VideoParamWatchdog(void);