From 51e387d6cb7e2b69c73843dd4eadf8f3088e665c Mon Sep 17 00:00:00 2001 From: GetAway Date: Thu, 26 Apr 2018 09:09:24 +0200 Subject: [PATCH 01/21] fix HD51 mix-up letterbox<->panscan Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/f10ab4605634c1ed76973b098ad0c44d9225c4e6 Author: GetAway Date: 2018-04-26 (Thu, 26 Apr 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video_lib.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libarmbox/video_lib.h b/libarmbox/video_lib.h index 1631cb4..7a914fe 100644 --- a/libarmbox/video_lib.h +++ b/libarmbox/video_lib.h @@ -73,8 +73,12 @@ typedef enum { } DISPLAY_AR; typedef enum { - DISPLAY_AR_MODE_PANSCAN = 0, - DISPLAY_AR_MODE_LETTERBOX, + /* FIX for HD51 mix-up of letterbox / panscan + Standard is 1. PANSCAN 2. LETTERBOX + If next drivers are correct please revert + this and pzapit.cpp */ + DISPLAY_AR_MODE_LETTERBOX = 0, + DISPLAY_AR_MODE_PANSCAN, DISPLAY_AR_MODE_NONE, DISPLAY_AR_MODE_PANSCAN2 } DISPLAY_AR_MODE; From dc29c8f303e00e1ae3ccd0317b91347dd9711d7b Mon Sep 17 00:00:00 2001 From: TangoCash Date: Fri, 27 Apr 2018 07:53:48 +0200 Subject: [PATCH 02/21] small fix Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/32e4a04910d4885c6b5f7b966148799cf2c35bf2 Author: TangoCash Date: 2018-04-27 (Fri, 27 Apr 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index a9f6bda..b3e5f96 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -363,7 +363,7 @@ int cVideo::setAspectRatio(int aspect, int mode) { static const char *a[] = { "n/a", "4:3", "14:9", "16:9" }; // static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; - static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; + static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; int n; lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); From 40f3aff67ad61c08ced7103bbb1cd6267c173509 Mon Sep 17 00:00:00 2001 From: GetAway Date: Thu, 26 Apr 2018 09:10:04 +0200 Subject: [PATCH 03/21] fix possible segfault Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/c3261a5627a3f0a23044030461beb82d9a75e03c Author: GetAway Date: 2018-04-26 (Thu, 26 Apr 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- azbox/video.cpp | 8 +++++--- libarmbox/video.cpp | 8 +++++--- libspark/video.cpp | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/azbox/video.cpp b/azbox/video.cpp index bf08c65..8ce3817 100644 --- a/azbox/video.cpp +++ b/azbox/video.cpp @@ -158,7 +158,9 @@ int cVideo::setAspectRatio(int aspect, int mode) /* { "panscan", "letterbox", "fullscreen", "14:9", "(unset)" } */ static const char *m[] = { "1", "2", "0", "1", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -173,8 +175,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/scalingmode -> %s\n", __func__, m[mode]); - n = proc_put("/proc/scalingmode", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/scalingmode -> %s\n", __func__, m[mo]); + n = proc_put("/proc/scalingmode", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index b3e5f96..3b1f244 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -365,7 +365,9 @@ int cVideo::setAspectRatio(int aspect, int mode) // static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -380,8 +382,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mode]); - n = proc_put("/proc/stb/video/policy", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mo]); + n = proc_put("/proc/stb/video/policy", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; diff --git a/libspark/video.cpp b/libspark/video.cpp index 3e331d9..a190ac8 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -361,7 +361,9 @@ int cVideo::setAspectRatio(int aspect, int mode) static const char *a[] = { "n/a", "4:3", "14:9", "16:9" }; static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -376,8 +378,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mode]); - n = proc_put("/proc/stb/video/policy", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mo]); + n = proc_put("/proc/stb/video/policy", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; From a8fbeb0f1a010cff5a8d72a1082f43e50fdf71f0 Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Fri, 27 Apr 2018 23:33:05 +0200 Subject: [PATCH 04/21] Revert "fix HD51 mix-up letterbox<->panscan" This reverts commit 51e387d6cb7e2b69c73843dd4eadf8f3088e665c. Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/2f706f87db8a4d950ddfd521928ea12ef06bdc08 Author: Frankenstone Date: 2018-04-27 (Fri, 27 Apr 2018) ------------------ This commit was generated by Migit --- libarmbox/video_lib.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libarmbox/video_lib.h b/libarmbox/video_lib.h index 7a914fe..1631cb4 100644 --- a/libarmbox/video_lib.h +++ b/libarmbox/video_lib.h @@ -73,12 +73,8 @@ typedef enum { } DISPLAY_AR; typedef enum { - /* FIX for HD51 mix-up of letterbox / panscan - Standard is 1. PANSCAN 2. LETTERBOX - If next drivers are correct please revert - this and pzapit.cpp */ - DISPLAY_AR_MODE_LETTERBOX = 0, - DISPLAY_AR_MODE_PANSCAN, + DISPLAY_AR_MODE_PANSCAN = 0, + DISPLAY_AR_MODE_LETTERBOX, DISPLAY_AR_MODE_NONE, DISPLAY_AR_MODE_PANSCAN2 } DISPLAY_AR_MODE; From 7fa71875f9f9ca9f6f727dab992851adc9b5922d Mon Sep 17 00:00:00 2001 From: GetAway Date: Thu, 26 Apr 2018 09:10:04 +0200 Subject: [PATCH 05/21] fix possible segfault Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/320b2f02bf81e47f90c03d85836fb68a8c60a680 Author: GetAway Date: 2018-04-26 (Thu, 26 Apr 2018) ------------------ This commit was generated by Migit --- azbox/video.cpp | 8 +++++--- libarmbox/video.cpp | 8 +++++--- libspark/video.cpp | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/azbox/video.cpp b/azbox/video.cpp index bf08c65..8ce3817 100644 --- a/azbox/video.cpp +++ b/azbox/video.cpp @@ -158,7 +158,9 @@ int cVideo::setAspectRatio(int aspect, int mode) /* { "panscan", "letterbox", "fullscreen", "14:9", "(unset)" } */ static const char *m[] = { "1", "2", "0", "1", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -173,8 +175,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/scalingmode -> %s\n", __func__, m[mode]); - n = proc_put("/proc/scalingmode", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/scalingmode -> %s\n", __func__, m[mo]); + n = proc_put("/proc/scalingmode", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index a9f6bda..06aab75 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -365,7 +365,9 @@ int cVideo::setAspectRatio(int aspect, int mode) // static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -380,8 +382,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mode]); - n = proc_put("/proc/stb/video/policy", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mo]); + n = proc_put("/proc/stb/video/policy", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; diff --git a/libspark/video.cpp b/libspark/video.cpp index 3e331d9..a190ac8 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -361,7 +361,9 @@ int cVideo::setAspectRatio(int aspect, int mode) static const char *a[] = { "n/a", "4:3", "14:9", "16:9" }; static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -376,8 +378,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mode]); - n = proc_put("/proc/stb/video/policy", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mo]); + n = proc_put("/proc/stb/video/policy", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; From e6f48fec2da44f38aa4ac5b318497a7a1452a05a Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 18 May 2018 12:50:12 +0200 Subject: [PATCH 06/21] use SetCECState in deepstandby Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/2f1e2277477e3758aa451fb36e531ea6d092ebbc Author: Jacek Jendrzej Date: 2018-05-18 (Fri, 18 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 06aab75..2b0ad32 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -323,6 +323,9 @@ cVideo::cVideo(int, void *, void *, unsigned int unit) cVideo::~cVideo(void) { + if (standby_cec_activ && fd >= 0) + SetCECState(true); + closeDevice(); } From 161597e49b3649aa3862f3ebd1fa6265f41490e6 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 19 May 2018 18:34:26 +0200 Subject: [PATCH 07/21] add av input switch in deep/standby Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/5bccf15d9ce5075cd61862f5f75f5059d626ae70 Author: Jacek Jendrzej Date: 2018-05-19 (Sat, 19 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 2b0ad32..8d502b7 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -301,6 +301,19 @@ int image_to_mpeg2(const char *image_name, int fd) return ret; } +void setAVInput(int val) +{ + if (val != 0 && val != 1) + return; + + int input_fd = open("/proc/stb/avs/0/input", O_WRONLY); + if(input_fd){ + const char *input[] = {"encoder", "aux"}; + write(input_fd, input[val], strlen(input[val])); + close(input_fd); + } +} + cVideo::cVideo(int, void *, void *, unsigned int unit) { lt_debug("%s unit %u\n", __func__, unit); @@ -323,6 +336,8 @@ cVideo::cVideo(int, void *, void *, unsigned int unit) cVideo::~cVideo(void) { + if(fd >= 0) + setAVInput(1); if (standby_cec_activ && fd >= 0) SetCECState(true); @@ -619,10 +634,14 @@ void cVideo::Standby(unsigned int bOn) if (bOn) { closeDevice(); + if(fd < 0) + setAVInput(1); } else { openDevice(); + if(fd >= 0) + setAVInput(0); } video_standby = bOn; SetCECState(video_standby); From 2ad3047c82b7a843981fdf994feea01ee3417f43 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 19 May 2018 19:21:22 +0200 Subject: [PATCH 08/21] use enum for setAVInput Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/acf02c7dbdf67efcde4bad16c146796aa5a1b64f Author: Jacek Jendrzej Date: 2018-05-19 (Sat, 19 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 8d502b7..4017b10 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -300,12 +300,9 @@ int image_to_mpeg2(const char *image_name, int fd) av_free(formatContext); return ret; } - +enum{ENCODER,AUX}; void setAVInput(int val) { - if (val != 0 && val != 1) - return; - int input_fd = open("/proc/stb/avs/0/input", O_WRONLY); if(input_fd){ const char *input[] = {"encoder", "aux"}; @@ -337,7 +334,7 @@ cVideo::cVideo(int, void *, void *, unsigned int unit) cVideo::~cVideo(void) { if(fd >= 0) - setAVInput(1); + setAVInput(AUX); if (standby_cec_activ && fd >= 0) SetCECState(true); @@ -634,14 +631,12 @@ void cVideo::Standby(unsigned int bOn) if (bOn) { closeDevice(); - if(fd < 0) - setAVInput(1); + setAVInput(AUX); } else { openDevice(); - if(fd >= 0) - setAVInput(0); + setAVInput(ENCODER); } video_standby = bOn; SetCECState(video_standby); From 6b681a5c71e5a884b48f9d42cd37a8f125c91b96 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 25 May 2018 17:05:09 +0200 Subject: [PATCH 09/21] fix CEC TV ON after deepstandby Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/19b27c9a7e5347a954d1b36d3be6f76bfba16c80 Author: Jacek Jendrzej Date: 2018-05-25 (Fri, 25 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 4017b10..a807eb0 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -1125,7 +1125,7 @@ bool cVideo::SetCECMode(VIDEO_HDMI_CEC_MODE _deviceType) physicalAddress[0] = 0x10; physicalAddress[1] = 0x00; logicalAddress = 1; - + if (_deviceType == VIDEO_HDMI_CEC_MODE_OFF) { if (hdmiFd >= 0) { @@ -1209,11 +1209,15 @@ bool cVideo::SetCECMode(VIDEO_HDMI_CEC_MODE _deviceType) if (ioctl(hdmiFd, CEC_S_MODE, &monitor) < 0) lt_info("%s: CEC monitor failed (%m)\n", __func__); + GetCECAddressInfo(); + + if(autoview_cec_activ) + SetCECState(false); + + return true; + } - - GetCECAddressInfo(); - - return true; + return false; } void cVideo::GetCECAddressInfo() From d4d6e0f2a11ae90a582394d1c2d43eee699d4e68 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 29 May 2018 18:06:21 +0200 Subject: [PATCH 10/21] fix framerate for movieplayer Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/30ab6eebc4b09aaf1231715d62f54f744f8a9df1 Author: Jacek Jendrzej Date: 2018-05-29 (Tue, 29 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index a807eb0..f4ae1b3 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -730,7 +730,10 @@ void cVideo::getPictureInfo(int &width, int &height, int &rate) if (fd == -1) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ - r = proc_get_hex(VMPEG_framerate[devnum]); + char buf[16]; + int n = proc_get(VMPEG_framerate[devnum], buf, 16); + if (n > 0) + sscanf(buf, "%i", &r); width = proc_get_hex(VMPEG_xres[devnum]); height = proc_get_hex(VMPEG_yres[devnum]); rate = rate2csapi(r); From 9c3682de283a14c7d18b334a1e9a7e12c8579619 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 29 May 2018 18:37:58 +0200 Subject: [PATCH 11/21] fix getAspectRatio for movieplayer Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/03af3ec950e2cb6449c76d3420f6675471947ce7 Author: Jacek Jendrzej Date: 2018-05-29 (Tue, 29 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index f4ae1b3..463428d 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -411,7 +411,7 @@ int cVideo::getAspectRatio(void) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ int n = proc_get_hex(VMPEG_aspect[devnum]); - return n * 2 + 1; + return n; } if (fop(ioctl, VIDEO_GET_SIZE, &s) < 0) { From 0a7ebe3cb8223829b2def31a0333ad40899e6d54 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 29 May 2018 16:32:47 +0200 Subject: [PATCH 12/21] set av input on start Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/41ca398eee13f99ccca2e12ed8015ea56da31836 Author: Jacek Jendrzej Date: 2018-05-29 (Tue, 29 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 463428d..81435d7 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -329,6 +329,7 @@ cVideo::cVideo(int, void *, void *, unsigned int unit) hdmiFd = -1; standby_cec_activ = autoview_cec_activ = false; openDevice(); + setAVInput(ENCODER); } cVideo::~cVideo(void) From 10479dd33ffc1b89c8eb732448ad6e52fd5cfef1 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 30 May 2018 10:40:58 +0200 Subject: [PATCH 13/21] fix signalisation bitrate 599940 (by bazi98) Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/9c788ccfcb78bb70abf63c74c328ed6f14891caf Author: Jacek Jendrzej Date: 2018-05-30 (Wed, 30 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 81435d7..0f8381d 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -714,7 +714,7 @@ static inline int rate2csapi(int rate) return 4; case 50000: return 5; - case 50940: + case 59940: return 6; case 60000: return 7; From 0b63d2cd38ea6bd93bd0bfcd5bf97e50e3b7532f Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Wed, 30 May 2018 18:36:02 +0200 Subject: [PATCH 14/21] port from https://github.com/tuxbox-neutrino/library-stb-hal/commits/mpx - https://github.com/tuxbox-neutrino/library-stb-hal/commit/7e4f4fd907e08702df853e2d5b4d5c671fe4b659 - https://github.com/tuxbox-neutrino/library-stb-hal/commit/dc7076847f1cc8359536a534dcf7aa2fa813b798 - https://github.com/tuxbox-neutrino/library-stb-hal/commit/8292a45148e2d22dd5861261ee1d3a40c59494bc Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/1e26cd81b38df923bf6b2b32ffe1b9fbab713890 Author: Frankenstone Date: 2018-05-30 (Wed, 30 May 2018) ------------------ This commit was generated by Migit --- libspark/video.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libspark/video.cpp b/libspark/video.cpp index a190ac8..8510ca5 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -392,7 +392,7 @@ int cVideo::getAspectRatio(void) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ int n = proc_get_hex(VMPEG_aspect[devnum]); - return n * 2 + 1; + return n; } if (fop(ioctl, VIDEO_GET_SIZE, &s) < 0) { @@ -800,7 +800,7 @@ static inline int rate2csapi(int rate) return 4; case 50000: return 5; - case 50940: + case 59940: return 6; case 60000: return 7; @@ -817,7 +817,10 @@ void cVideo::getPictureInfo(int &width, int &height, int &rate) if (fd == -1) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ - r = proc_get_hex(VMPEG_framerate[devnum]); + char buf[16]; + int n = proc_get(VMPEG_framerate[devnum], buf, 16); + if (n > 0) + sscanf(buf, "%i", &r); width = proc_get_hex(VMPEG_xres[devnum]); height = proc_get_hex(VMPEG_yres[devnum]); rate = rate2csapi(r); From 95a9b875d6caf132a4f573559308bf574bb13e59 Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Wed, 30 May 2018 19:06:00 +0200 Subject: [PATCH 15/21] fix last commit 0b63d2cd38ea6bd93bd0bfcd5bf97e50e3b7532f for azbox Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/6aefb51252849b528cf42567ae90aba4d8c3ef2f Author: Frankenstone Date: 2018-05-30 (Wed, 30 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- azbox/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azbox/video.cpp b/azbox/video.cpp index 8ce3817..fdf24d8 100644 --- a/azbox/video.cpp +++ b/azbox/video.cpp @@ -500,7 +500,7 @@ static inline int rate2csapi(int rate) return 4; case 50: return 5; - case 50940: + case 59940: return 6; case 60: return 7; From 9ad39d908e02ce8f59c395cf38e67427867706db Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Wed, 30 May 2018 19:25:10 +0200 Subject: [PATCH 16/21] part revert 0b63d2c - on sh4 wrong getAspectRatio Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/01c97129dcc833c4955e45b183b3bfcc68bdbc9b Author: Frankenstone Date: 2018-05-30 (Wed, 30 May 2018) ------------------ This commit was generated by Migit --- libspark/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libspark/video.cpp b/libspark/video.cpp index 8510ca5..616df69 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -392,7 +392,7 @@ int cVideo::getAspectRatio(void) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ int n = proc_get_hex(VMPEG_aspect[devnum]); - return n; + return n *2 + 1; } if (fop(ioctl, VIDEO_GET_SIZE, &s) < 0) { From 010387e0ed79dcdd023ec6c977bd3dae022f1824 Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Wed, 30 May 2018 19:37:44 +0200 Subject: [PATCH 17/21] fix typo , no changes Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/c4e7fd97a638ef32abcc389e4e7b67ad432f0735 Author: Frankenstone Date: 2018-05-30 (Wed, 30 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libspark/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libspark/video.cpp b/libspark/video.cpp index 616df69..0f12344 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -392,7 +392,7 @@ int cVideo::getAspectRatio(void) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ int n = proc_get_hex(VMPEG_aspect[devnum]); - return n *2 + 1; + return n * 2 + 1; } if (fop(ioctl, VIDEO_GET_SIZE, &s) < 0) { From f8df23a5aba506fecd6b36aa8bf6abe046870d15 Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Fri, 1 Jun 2018 21:34:31 +0200 Subject: [PATCH 18/21] port from https://github.com/tuxbox-neutrino/library-stb-hal - https://github.com/tuxbox-neutrino/library-stb-hal/commit/921c5e248f6a022bcadd6d09a262603bc5250399 Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/540f92daa324b242d729b4da228e2883a93d411e Author: Frankenstone Date: 2018-06-01 (Fri, 01 Jun 2018) ------------------ This commit was generated by Migit --- azbox/video.cpp | 2 +- libarmbox/video.cpp | 2 +- libspark/video.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azbox/video.cpp b/azbox/video.cpp index fdf24d8..230f514 100644 --- a/azbox/video.cpp +++ b/azbox/video.cpp @@ -494,7 +494,7 @@ static inline int rate2csapi(int rate) return 1; case 25: return 2; - case 29976: + case 29970: return 3; case 30: return 4; diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index ea8d6b9..f9991d0 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -708,7 +708,7 @@ static inline int rate2csapi(int rate) return 1; case 25000: return 2; - case 29976: + case 29970: return 3; case 30000: return 4; diff --git a/libspark/video.cpp b/libspark/video.cpp index 0f12344..f4c0b34 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -794,7 +794,7 @@ static inline int rate2csapi(int rate) return 1; case 25000: return 2; - case 29976: + case 29970: return 3; case 30000: return 4; From d34583e67b069b4d92116063d44f018288c3f35b Mon Sep 17 00:00:00 2001 From: BPanther Date: Thu, 9 Aug 2018 18:22:50 +0200 Subject: [PATCH 19/21] fix possible segfault (thx satbaby) Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/c66ec401c229b5f9bb228960d24fdde08e06e04b Author: BPanther Date: 2018-08-09 (Thu, 09 Aug 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3-arm/playback/playback.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libeplayer3-arm/playback/playback.c b/libeplayer3-arm/playback/playback.c index 97e0c9a..c17b998 100644 --- a/libeplayer3-arm/playback/playback.c +++ b/libeplayer3-arm/playback/playback.c @@ -300,7 +300,8 @@ static int PlaybackPlay(Context_t *context) context->playback->BackWard = 0; context->playback->SlowMotion = 0; context->playback->Speed = 0; - context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); + if (context->container && context->container->selectedContainer); + context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); } else { @@ -331,7 +332,8 @@ static int PlaybackPlay(Context_t *context) context->playback->isCreationPhase = 0; // allow thread to go into next state - ret = context->container->selectedContainer->Command(context, CONTAINER_PLAY, NULL); + if (context->container && context->container->selectedContainer); + context->container->selectedContainer->Command(context, CONTAINER_PLAY, NULL); if (ret != 0) { playback_err("CONTAINER_PLAY failed!\n"); From e4d2a3bcc8d8b8d474cbedecb2e7483d54774b25 Mon Sep 17 00:00:00 2001 From: BPanther Date: Thu, 9 Aug 2018 18:25:28 +0200 Subject: [PATCH 20/21] small fix Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/c4849c64b993e8923d7c04d5b60301897775ae28 Author: BPanther Date: 2018-08-09 (Thu, 09 Aug 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3-arm/playback/playback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libeplayer3-arm/playback/playback.c b/libeplayer3-arm/playback/playback.c index c17b998..908716f 100644 --- a/libeplayer3-arm/playback/playback.c +++ b/libeplayer3-arm/playback/playback.c @@ -301,7 +301,7 @@ static int PlaybackPlay(Context_t *context) context->playback->SlowMotion = 0; context->playback->Speed = 0; if (context->container && context->container->selectedContainer); - context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); + ret = context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); } else { @@ -333,7 +333,7 @@ static int PlaybackPlay(Context_t *context) context->playback->isCreationPhase = 0; // allow thread to go into next state if (context->container && context->container->selectedContainer); - context->container->selectedContainer->Command(context, CONTAINER_PLAY, NULL); + ret = context->container->selectedContainer->Command(context, CONTAINER_PLAY, NULL); if (ret != 0) { playback_err("CONTAINER_PLAY failed!\n"); From da07edb97edefd7a63c8e4bac63c306e6652a26e Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Thu, 9 Aug 2018 21:57:35 +0200 Subject: [PATCH 21/21] small fix , semicolon too much Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/57705780f0e70c80de711d2236c78123b899eed9 Author: Frankenstone Date: 2018-08-09 (Thu, 09 Aug 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3-arm/playback/playback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libeplayer3-arm/playback/playback.c b/libeplayer3-arm/playback/playback.c index 908716f..3c5597b 100644 --- a/libeplayer3-arm/playback/playback.c +++ b/libeplayer3-arm/playback/playback.c @@ -300,7 +300,7 @@ static int PlaybackPlay(Context_t *context) context->playback->BackWard = 0; context->playback->SlowMotion = 0; context->playback->Speed = 0; - if (context->container && context->container->selectedContainer); + if (context->container && context->container->selectedContainer) ret = context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); } else @@ -332,7 +332,7 @@ static int PlaybackPlay(Context_t *context) context->playback->isCreationPhase = 0; // allow thread to go into next state - if (context->container && context->container->selectedContainer); + if (context->container && context->container->selectedContainer) ret = context->container->selectedContainer->Command(context, CONTAINER_PLAY, NULL); if (ret != 0) {