fixed scheduler problem of not being able to play smils

This commit is contained in:
nebojsa 2008-11-17 01:34:27 +00:00
parent ea8524664e
commit 0d84838ea4
3 changed files with 18 additions and 1 deletions

View File

@ -301,6 +301,7 @@ GstreamerPlayer :: playNextSmil(void) throw (
}
m_smilOffset += m_currentPlayLength;
m_playContext->playContext();
return true;
}

View File

@ -72,10 +72,13 @@
#include "SignalDispatcher.h"
#include "XmlRpcDaemonShutdownSignalHandler.h"
#include "XmlRpcDaemon.h"
#include <glib.h>
using namespace LiveSupport::Scheduler;
GMainLoop *loop;
/* =================================================== local data structures */
@ -303,7 +306,16 @@ XmlRpcDaemon :: startup (void) throw (std::logic_error)
// bind & run
xmlRpcServer->enableIntrospection(true);
xmlRpcServer->bindAndListen(xmlRpcPort);
xmlRpcServer->work(-1.0);
active = true;
loop = g_main_loop_new (NULL, FALSE);
GMainContext* maincontext = g_main_context_default();
while(active)
{
g_main_context_iteration(maincontext, FALSE);
xmlRpcServer->work(0.);
}
// xmlRpcServer->work(-1.0);
}
@ -350,6 +362,7 @@ XmlRpcDaemon :: stop (void) throw (std::logic_error)
void
XmlRpcDaemon :: shutdown (void) throw (std::logic_error)
{
active = false;
checkForConfiguration();
xmlRpcServer->shutdown();

View File

@ -188,6 +188,8 @@ class XmlRpcDaemon
*/
pid_t
loadPid(void) throw();
bool active;
protected:
/**
@ -197,6 +199,7 @@ class XmlRpcDaemon
{
background = true;
configured = false;
active = false;
xmlRpcServer.reset(new XmlRpcServer());
}