diff options
Diffstat (limited to 'upnpcomponents')
-rw-r--r-- | upnpcomponents/dlna.cpp | 1 | ||||
-rw-r--r-- | upnpcomponents/upnpwebserver.cpp | 15 | ||||
-rw-r--r-- | upnpcomponents/upnpwebserver.h | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/upnpcomponents/dlna.cpp b/upnpcomponents/dlna.cpp index a68c6db..1d57d0e 100644 --- a/upnpcomponents/dlna.cpp +++ b/upnpcomponents/dlna.cpp @@ -72,6 +72,7 @@ DLNAProfile* cDlna::getProfileOfChannel(cChannel* Channel){ // Switching the video types of the DVB-Stream switch(Channel->Vtype()){ case 0x02: + // MPEG2 Video return &DLNA_PROFILE_MPEG2_TS_SD_EU; case 0x1B: return &DLNA_PROFILE_AVC_TS_HD_EU; diff --git a/upnpcomponents/upnpwebserver.cpp b/upnpcomponents/upnpwebserver.cpp index 9be3d6a..77572f5 100644 --- a/upnpcomponents/upnpwebserver.cpp +++ b/upnpcomponents/upnpwebserver.cpp @@ -95,7 +95,7 @@ cUPnPWebServer::cUPnPWebServer(const char* root) : mRootdir(root) { } cUPnPWebServer::~cUPnPWebServer(){ - delete this->mRootdir; + delete [] this->mRootdir; } cUPnPWebServer* cUPnPWebServer::mInstance = NULL; @@ -136,6 +136,13 @@ bool cUPnPWebServer::init(){ return true; } +bool cUPnPWebServer::uninit(){ + MESSAGE("Disabling the internal webserver"); + UpnpEnableWebserver(FALSE); + + MESSAGE("Closing open file transfers"); +} + cUPnPWebServer* cUPnPWebServer::getInstance(const char* rootdir){ if(cUPnPWebServer::mInstance == NULL) cUPnPWebServer::mInstance = new cUPnPWebServer(rootdir); @@ -146,10 +153,6 @@ cUPnPWebServer* cUPnPWebServer::getInstance(const char* rootdir){ else return NULL; } -void cUPnPWebServer::free(){ - delete cUPnPWebServer::mInstance; -} - int cUPnPWebServer::getInfo(const char* filename, File_Info* info){ MESSAGE("Getting information of file '%s'", filename); @@ -332,4 +335,4 @@ int cUPnPWebServer::close(UpnpWebFileHandle fh){ delete FileHandle->FileHandle; delete FileHandle; return 0; -} +}
\ No newline at end of file diff --git a/upnpcomponents/upnpwebserver.h b/upnpcomponents/upnpwebserver.h index 55ef260..613f97b 100644 --- a/upnpcomponents/upnpwebserver.h +++ b/upnpcomponents/upnpwebserver.h @@ -20,9 +20,9 @@ private: cUPnPWebServer(const char* root = "/"); protected: bool enable(bool enable); - static void free(); public: bool init(); + bool uninit(); static cUPnPWebServer* getInstance(const char* rootdir = "/"); virtual ~cUPnPWebServer(); //}; |