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_smilOffset += m_currentPlayLength;
m_playContext->playContext(); m_playContext->playContext();
return true;
} }

View file

@ -72,10 +72,13 @@
#include "SignalDispatcher.h" #include "SignalDispatcher.h"
#include "XmlRpcDaemonShutdownSignalHandler.h" #include "XmlRpcDaemonShutdownSignalHandler.h"
#include "XmlRpcDaemon.h" #include "XmlRpcDaemon.h"
#include <glib.h>
using namespace LiveSupport::Scheduler; using namespace LiveSupport::Scheduler;
GMainLoop *loop;
/* =================================================== local data structures */ /* =================================================== local data structures */
@ -303,7 +306,16 @@ XmlRpcDaemon :: startup (void) throw (std::logic_error)
// bind & run // bind & run
xmlRpcServer->enableIntrospection(true); xmlRpcServer->enableIntrospection(true);
xmlRpcServer->bindAndListen(xmlRpcPort); 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 void
XmlRpcDaemon :: shutdown (void) throw (std::logic_error) XmlRpcDaemon :: shutdown (void) throw (std::logic_error)
{ {
active = false;
checkForConfiguration(); checkForConfiguration();
xmlRpcServer->shutdown(); xmlRpcServer->shutdown();

View file

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