mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Init/Cleanup libxml only once at VDR start/end. Copied from xmltv2vdr plugin.
This commit is contained in:
parent
234c855990
commit
d7aa09fec3
@ -12,7 +12,6 @@ cXmlParser::cXmlParser(void) {
|
|||||||
root = NULL;
|
root = NULL;
|
||||||
ctxt = NULL;
|
ctxt = NULL;
|
||||||
|
|
||||||
xmlInitParser();
|
|
||||||
initGenericErrorDefaultFunc(NULL);
|
initGenericErrorDefaultFunc(NULL);
|
||||||
xmlSetStructuredErrorFunc(NULL, SkinDesignerXMLErrorHandler);
|
xmlSetStructuredErrorFunc(NULL, SkinDesignerXMLErrorHandler);
|
||||||
ctxt = xmlNewParserCtxt();
|
ctxt = xmlNewParserCtxt();
|
||||||
@ -21,7 +20,6 @@ cXmlParser::cXmlParser(void) {
|
|||||||
cXmlParser::~cXmlParser() {
|
cXmlParser::~cXmlParser() {
|
||||||
DeleteDocument();
|
DeleteDocument();
|
||||||
xmlFreeParserCtxt(ctxt);
|
xmlFreeParserCtxt(ctxt);
|
||||||
xmlCleanupParser();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
@ -737,3 +735,11 @@ bool cXmlParser::DebugViewElement(xmlNodePtr node) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cXmlParser::InitLibXML() {
|
||||||
|
xmlInitParser();
|
||||||
|
}
|
||||||
|
|
||||||
|
void cXmlParser::CleanupLibXML() {
|
||||||
|
xmlCleanupParser();
|
||||||
|
}
|
||||||
|
@ -51,6 +51,8 @@ public:
|
|||||||
bool ParseView(void);
|
bool ParseView(void);
|
||||||
bool ParseGlobals(void);
|
bool ParseGlobals(void);
|
||||||
void DeleteDocument(void);
|
void DeleteDocument(void);
|
||||||
|
static void InitLibXML();
|
||||||
|
static void CleanupLibXML();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__XMLPARSER_H
|
#endif //__XMLPARSER_H
|
@ -95,6 +95,7 @@ bool cPluginSkinDesigner::Initialize(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool cPluginSkinDesigner::Start(void) {
|
bool cPluginSkinDesigner::Start(void) {
|
||||||
|
cXmlParser::InitLibXML();
|
||||||
bool trueColorAvailable = true;
|
bool trueColorAvailable = true;
|
||||||
if (!cOsdProvider::SupportsTrueColor()) {
|
if (!cOsdProvider::SupportsTrueColor()) {
|
||||||
esyslog("skindesigner: No TrueColor OSD found! Using default Skin LCARS!");
|
esyslog("skindesigner: No TrueColor OSD found! Using default Skin LCARS!");
|
||||||
@ -121,6 +122,7 @@ bool cPluginSkinDesigner::Start(void) {
|
|||||||
void cPluginSkinDesigner::Stop(void) {
|
void cPluginSkinDesigner::Stop(void) {
|
||||||
delete imgCache;
|
delete imgCache;
|
||||||
delete fontManager;
|
delete fontManager;
|
||||||
|
cXmlParser::CleanupLibXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cPluginSkinDesigner::Housekeeping(void) {
|
void cPluginSkinDesigner::Housekeeping(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user