vdr-1.7.12 - few libsi exports needed in eepg plugin
Commit Message
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
@@ -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);
@@ -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