Hello folks,

recently I re-adjusted my antenna to receive the BBC channels and
discovered that EPG is only available for the current and next event,
and then found out in the vdr-portal that there is the EEPG plugin which
decodes the extended EPG data they send (see
http://www.linuxtv.org/vdrwiki/index.php/Eepg-plugin).

Well, wanting to quickly write a gentoo ebuild for it, I discovered that
the build fails because the author included libsi/si.c (not si.h) to
compile the plugin. While this might work when building plugins "by
hand" inside a vdr sources tree, or on a distribution where the sources
(not only headers) are available, I'm sure that's not good practice at
all. It's better to ask the maintainer of the respective library, class
or C file to export what's needed through the header.

Well, Klaus, would you please consider adding this patch to the next
release? Just exporting 2 functions and a flag, if you prefer you could
export the flag through a read-only access function, too.

Thank you,
Lucian
diff -Naur vdr-1.7.12_orig/libsi/si.c vdr-1.7.12/libsi/si.c
--- vdr-1.7.12_orig/libsi/si.c  2009-12-05 17:20:12.000000000 +0100
+++ vdr-1.7.12/libsi/si.c       2010-02-10 01:09:08.743017649 +0100
@@ -339,7 +339,7 @@
 // a string indicating that table. If no table can be determined, the
 // default ISO6937 is returned. If a table can be determined, the buffer
 // and length are adjusted accordingly.
-static const char *getCharacterTable(const unsigned char *&buffer, int 
&length, bool *isSingleByte = NULL) {
+const char *getCharacterTable(const unsigned char *&buffer, int &length, bool 
*isSingleByte/* = NULL*/) {
    const char *cs = "ISO6937";
    // Workaround for broadcaster stupidity: according to
    // "ETSI EN 300 468" the default character set is ISO6937. But 
unfortunately some
@@ -375,7 +375,7 @@
    return cs;
 }
 
-static bool convertCharacterTable(const char *from, size_t fromLength, char 
*to, size_t toLength, const char *fromCode)
+bool convertCharacterTable(const char *from, size_t fromLength, char *to, 
size_t toLength, const char *fromCode)
 {
   if (SystemCharacterTable) {
      iconv_t cd = iconv_open(SystemCharacterTable, fromCode);
diff -Naur vdr-1.7.12_orig/libsi/si.h vdr-1.7.12/libsi/si.h
--- vdr-1.7.12_orig/libsi/si.h  2009-12-06 12:37:35.000000000 +0100
+++ vdr-1.7.12/libsi/si.h       2010-02-10 01:09:08.743017649 +0100
@@ -492,6 +492,13 @@
 // like "iso8859-15" or "utf-8" (case insensitive).
 // Returns true if the character table was recognized.
 bool SetSystemCharacterTable(const char *CharacterTable);
+// Determines the character table used in the given buffer and returns
+// a string indicating that table. If no table can be determined, the
+// default ISO6937 is returned. If a table can be determined, the buffer
+// and length are adjusted accordingly.
+const char *getCharacterTable(const unsigned char *&buffer, int &length, bool 
*isSingleByte = NULL);
+bool convertCharacterTable(const char *from, size_t fromLength, char *to, 
size_t toLength, const char *fromCode);
+extern bool SystemCharacterTableIsSingleByte;
 
 } //end of namespace
 
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to