neutrino multimedia-menu: add singelton,

use singelton for creating or destroying for movieplayer instance

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1066 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 1125c6ab1f
Author: Thilo Graf <dbt@novatux.de>
Date: 2011-01-26 (Wed, 26 Jan 2011)

Origin message was:
------------------
*neutrino multimedia-menu: add singelton,
use singelton for creating or destroying for movieplayer instance

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1066 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
2011-01-26 11:05:33 +00:00
parent fd617dd412
commit 32162e4af0
5 changed files with 46 additions and 13 deletions

View File

@@ -78,6 +78,7 @@
#include <playback.h>
#include "libtuxtxt/teletext.h"
int dvbsub_start(int pid);
int dvbsub_pause();
@@ -141,6 +142,31 @@ int CAPIDSelectExec::exec(CMenuTarget * /*parent*/, const std::string & actionKe
return menu_return::RETURN_EXIT;
}
CMoviePlayerGui* CMoviePlayerGui::instance_mp = NULL;
CMoviePlayerGui& CMoviePlayerGui::getInstance()
{
if ( !instance_mp )
{
instance_mp = new CMoviePlayerGui();
printf("[neutrino CMoviePlayerGui] Instance created...\n");
}
return *instance_mp;
}
void CMoviePlayerGui::Delete()
{
if ( instance_mp )
{
delete instance_mp;
printf("[neutrino CMoviePlayerGui] Instance removed...\n");
}
instance_mp = NULL;
}
CMoviePlayerGui::CMoviePlayerGui()
{
Init();