Giter Site home page Giter Site logo

vdr-projects / vdr-plugin-osdteletext Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 1.17 MB

This is a "plugin" for the Video Disk Recorder (VDR) to display Teletext directly on the OSD

License: GNU General Public License v2.0

Makefile 0.93% C++ 98.25% C 0.83%
vdr vdr-plugin-osdteletext

vdr-plugin-osdteletext's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

tfels pbiering

vdr-plugin-osdteletext's Issues

Strange compiler message related to legacystorage.c

found during compilation on Fedora 34

n member function 'write',
    inlined from 'save' at txtrecv.c:194:21:
legacystorage.c:131:25: warning: 'write' reading 3612 bytes from a region of size 12 [-Wstringop-overread]
  131 |    if (!(written=::write((int)stream, ptr, size)) ) {
      |                         ^
legacystorage.c: In member function 'save':
storage.h:34:18: note: source object 'pageheader' of size 12
   34 |    unsigned char pageheader[12];     // 12 chars (extracted from 8 chars of line X/0)
      |                  ^
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^
In member function 'write',
    inlined from 'write' at legacystorage.c:129:9,
    inlined from 'save' at txtrecv.c:194:21:
legacystorage.c:135:24: warning: 'write' reading 3612 bytes from a region of size 12 [-Wstringop-overread]
  135 |          return ::write((int)stream, ptr, size);
      |                        ^
legacystorage.c: In member function 'save':
storage.h:34:18: note: source object 'pageheader' of size 12
   34 |    unsigned char pageheader[12];     // 12 chars (extracted from 8 chars of line X/0)
      |                  ^
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^

Code is working well in case of "-s legacy" is used, each teletext subpage is stored in it's own file (below /var/cache/vdr/vtx/) with expected size of 3162 bytes. No clue so far why compiler think that the related call is only containing pagedata.pageheader in the pointer of the complete pagedata structure.

From txtrecv.c:

void cTelePage::save()
{
   unsigned char buf;
   StorageHandle fd;
   if ( (fd=storage->openForWriting(page)) ) {
      // page header (12)
      memcpy(pagedata.pageheader, "VTXV5", 5);      // prefix (5)  "VTXV4" < 2.0.0
      buf=0x01;      pagedata.pageheader[5]  = buf; // fixed 0x01 (1)
      buf=mag;       pagedata.pageheader[6]  = buf; // mag (1)
      buf=page.page; pagedata.pageheader[7]  = buf; // page (1)
      buf=flags;     pagedata.pageheader[8]  = buf; // flags (1)
      buf=lang;      pagedata.pageheader[9]  = buf; // lang (1)
      buf=0x00;      pagedata.pageheader[10] = buf; // fixed 0x00 (1)
      buf=0x00;      pagedata.pageheader[11] = buf; // fixed 0x00 (1)
      storage->write(&pagedata, TELETEXT_PAGESIZE, fd);  <-!!!
      storage->close(fd);
   }
}

From storage.h

struct TelePageData {
   unsigned char pageheader[12];     // 12 chars (extracted from 8 chars of line X/0)
   unsigned char pagebuf[25*40];     // 25 lines with 40 chars X/0-24
   unsigned char pagebuf_X25[40];    // 1 line with 40 chars (since 2.0.0 / VTX5)
   unsigned char pagebuf_X26[16*40]; // max 16 lines with 40 chars (since 2.0.0 / VTX5)
   unsigned char pagebuf_X27[16*40]; // max 16 lines with 40 chars (since 2.0.0 / VTX5)
   unsigned char pagebuf_X28[16*40]; // max 16 lines with 40 chars (since 2.0.0 / VTX5)
   unsigned char pagebuf_M29[16*40]; // max 16 lines with 40 chars (since 2.0.0 / VTX5)
};

From txtrecv.h

class cTelePage {
   ...
  TelePageData pagedata;
  ...

Potentially one can enlight me why this is happening

compilation results in warning related to deprecated readdir_r

compilation results in warning related to deprecated readdir_r -> helpful contribution would be fine - thank you!

storage.c: In member function 'int Storage::doCleanUp()':
storage.c:20:47: warning: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated [-Wdeprecated-declarations]
   20 |       while ( (!readdir_r(top, &path, &chandir) && chandir != NULL) ) {
      |                                               ^
In file included from /usr/include/features.h:465,
                 from /usr/include/arpa/inet.h:21,
                 from /usr/include/vdr/config.h:13,
                 from /usr/include/vdr/status.h:13,
                 from pageid.h:14,
                 from storage.h:15,
                 from storage.c:11:
/usr/include/dirent.h:189:12: note: declared here
  189 | extern int __REDIRECT (readdir_r,
      |            ^~~~~~~~~~
storage.c: In member function 'int Storage::cleanSubDir(const char*)':
storage.c:47:45: warning: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated [-Wdeprecated-declarations]
   47 |       while ( (!readdir_r(d, &path, &txtfile) && txtfile != NULL) ) {
      |                                             ^
In file included from /usr/include/features.h:465,
                 from /usr/include/arpa/inet.h:21,
                 from /usr/include/vdr/config.h:13,
                 from /usr/include/vdr/status.h:13,
                 from pageid.h:14,
                 from storage.h:15,
                 from storage.c:11:
/usr/include/dirent.h:189:12: note: declared here
  189 | extern int __REDIRECT (readdir_r,
      |            ^~~~~~~~~~
storage.c: In member function 'void Storage::freeSpace()':
storage.c:100:47: warning: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated [-Wdeprecated-declarations]
  100 |       while ( (!readdir_r(top, &path, &chandir) && chandir != NULL) ) {
      |                                               ^
In file included from /usr/include/features.h:465,
                 from /usr/include/arpa/inet.h:21,
                 from /usr/include/vdr/config.h:13,
                 from /usr/include/vdr/status.h:13,
                 from pageid.h:14,
                 from storage.h:15,
                 from storage.c:11:
/usr/include/dirent.h:189:12: note: declared here
  189 | extern int __REDIRECT (readdir_r,
      |            ^~~~~~~~~~

2.2.0.beta.1 - farbtasten

hab hier folgendes problem:
farbtasten werden mit seitennummern belegt,
z.b. rot mit 100, gruen mit 200
klappt so weit auch, solange der vdr nicht beendet oder neu gestartet wird.

wird letzteres durchgefuehrt, sind die tasten allerdings nicht mehr belegt,
die korrekten parameter aber sind in der setup.conf eingetragen.
werden die evtl. bei einem neustart nicht korrekt initialisiert?

Teletext OSD size

I would suggest, instead of explicitly setting the length and height of the OSD in the plugin setup, use OsdWidth() and OsdHeight().
And also change OSDHAlign & OSDVAlign to something else, need to think about what.
For example, OSDHAlign & OSDVAlign symmetrically reduce OSD size on both sides, not just offset on one side.

v2.0.0: warnings when compiling with clang

When I compile this plugin with export CC="clang"; export CXX="clang++" then clang throws some warnings that may be of interest.

I assume txtrender.c:565 should most probably be changed to
} else if ((PageCode_X26[row*40] & 0x80) != 0x80) {

txtrender.c:565:41: warning: & has lower precedence than !=; != will be evaluated first [-Wparentheses]
        } else if (PageCode_X26[row*40] & 0x80 != 0x80) {
                                        ^~~~~~~~~~~~~~
txtrender.c:565:41: note: place parentheses around the '!=' expression to silence this warning
        } else if (PageCode_X26[row*40] & 0x80 != 0x80) {
                                        ^
                                          (           )                                                                                                                                      
txtrender.c:565:41: note: place parentheses around the & expression to evaluate it first
        } else if (PageCode_X26[row*40] & 0x80 != 0x80) {
                                        ^
                   (                          )                                                                                                                                              
txtrender.c:637:26: warning: result of comparison of constant 4096 with expression of type 'uint8_t' (aka 'unsigned char') is always false
      [-Wtautological-constant-out-of-range-compare]
                if (mode == 0x1000) {
                    ~~~~ ^  ~~~~~~
menu.c:930:7: warning: result of comparison of constant 100 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textRed   , AkRed   );
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:922:16: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      if (mode < 100) { \
          ~~~~ ^ ~~~
menu.c:930:7: warning: result of comparison of constant 999 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textRed   , AkRed   );
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:924:23: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      } else if (mode < 999) { \
                 ~~~~ ^ ~~~
menu.c:931:7: warning: result of comparison of constant 100 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textGreen , AkGreen );
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:922:16: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      if (mode < 100) { \
          ~~~~ ^ ~~~
menu.c:931:7: warning: result of comparison of constant 999 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textGreen , AkGreen );
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:924:23: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      } else if (mode < 999) { \
                 ~~~~ ^ ~~~
menu.c:932:7: warning: result of comparison of constant 100 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textYellow, AkYellow);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:922:16: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      if (mode < 100) { \
          ~~~~ ^ ~~~
menu.c:932:7: warning: result of comparison of constant 999 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textYellow, AkYellow);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:924:23: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      } else if (mode < 999) { \
                 ~~~~ ^ ~~~
menu.c:933:7: warning: result of comparison of constant 100 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textBlue  , AkBlue  );
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:922:16: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      if (mode < 100) { \
          ~~~~ ^ ~~~
menu.c:933:7: warning: result of comparison of constant 999 with expression of type 'eTeletextAction' is always true [-Wtautological-constant-out-of-range-compare]
      CONVERT_ACTION_TO_TEXT(textBlue  , AkBlue  );
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.c:924:23: note: expanded from macro 'CONVERT_ACTION_TO_TEXT'
      } else if (mode < 999) { \
                 ~~~~ ^ ~~~
2 warnings generated.

missing X/26 support to display different national chars

Strange issue found while comparing "3sat" 898-01 page with current osdteletext output.

Special iso-8859-1 chars line line 02 and 09 like 0xe8 (E MIT GRAVIS) and 0xe9 (E MIT AKUT) are not displayed, the standard character is "e" is shown also.

One can play around based on development fork/branch:

https://github.com/pbiering/vdr-plugin-osdteletext/tree/fix-charset

using

DEBUG_OSDTELETEXT=0x80000000

-> this prints the received chars, e.g.

y=02 30 32 20 6f 38 4e 54 AlWh(07) 7f 45 7f 45 7f 41 7f 43 7f 45 7f 49 7f 49 7f 41 7f 4f 7f 55 7f 55 7f 45 7f 20 7f 20 7f 20 7f 20 
y=03 30 33 20 6f 38 4e 54 AlCy(06) 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 7f 5b 5c 5d 31 32 

y=02 -> line with special chars E, A, ...
y=03 -> normal chars

Strangewise, 0x45 is shown in both lines and also 0x45 is shown 2x in line 02 but my Panasonic TV is displaying 2 different chars here: 0xc9 and 0xc8.

-> I have no clue how the TV knows about 0xc9 and 0xc8, it looks like something is doing a base mapping to "ascii" in advance...but where?

README sollte überarbeitet werden

Hi,

freut mich zu sehen daß wieder jemand weiter an vdr-plugins entwickelt!

Ich bin der Maintainer von
https://packages.gentoo.org/packages/media-plugins/vdr-osdteletext und
will mal anfragen wo die aktuellen Entwicklungsziele liegen?

An den letzten commits kann ich eine Version 2.0.0 erahnen? (hat sich erledigt, sie ist da...)

Würde mich freuen zu hören.

Übrigens: in der aktuellen README fehlt bei

Latest version available at:
https://github.com/vdr-projects/vdr-plugin-osdteletex <<< ein T !!!

Grüsse aus Berlin

Martin

charset issue related to 0x7f

there is an issue is with 0x7f, which should be according to txtfont.c a filled box (and Panasonic TV is also displaying that), but on osdteletext it is a unfilled box

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.