some testing and debugging

This commit is contained in:
Fischlurch 2009-02-08 04:10:37 +01:00
parent 73f29f3a6a
commit b0e6468293
8 changed files with 42 additions and 15 deletions

View file

@ -152,13 +152,13 @@ namespace gui {
~GuiSubsysDescriptor()
{
FIXME ("ichthyo: when you want to ignore errors, then you have to error_get() them to clear the error state");
if (facade)
{
WARN (guifacade, "GUI subsystem terminates, but GuiFacade isn't properly closed. "
"Closing it forcedly; this indicates broken startup logic and should be fixed.");
try { facade.reset (0); }
catch(...) { WARN_IF (lumiera_error_peek(), guifacade, "Ignoring error: %s", lumiera_error()); }
lumiera_error(); // clear any remaining error state...
}
}
};

View file

@ -243,6 +243,12 @@ namespace gui {
}
DisplayerSlot::~DisplayerSlot()
{
TRACE (gui_dbg, "Displayer Slot closing...");
}
void
DisplayerSlot::displayCurrentFrame()
{

View file

@ -82,6 +82,7 @@ namespace gui {
public:
DisplayerSlot (FrameDestination const&) ;
~DisplayerSlot () ;
/* Implementation-level API to be used by DisplayService */
@ -134,7 +135,10 @@ namespace gui {
public:
DisplayService();
~DisplayService() { }
~DisplayService() {
INFO (proc_dbg, "Display service dying...");
}
/** open a new display, sending frames to the given output destination

View file

@ -70,7 +70,9 @@ namespace lib {
class Handle
{
protected:
std::tr1::shared_ptr<IMP> smPtr_;
typedef std::tr1::shared_ptr<IMP> SmPtr;
SmPtr smPtr_;
public:
@ -113,11 +115,11 @@ namespace lib {
void close () { smPtr_.reset(); }
typedef std::tr1::shared_ptr<IMP> Handle::*__unspecified_bool_type;
typedef SmPtr Handle::*__unspecified_bool_type;
/** implicit conversion to "bool" */
operator __unspecified_bool_type() const { return &Handle::smPtr_; } // never throws
bool operator! () const { return !bool(smPtr_); } // dito
operator __unspecified_bool_type() const { return smPtr_? &Handle::smPtr_ : 0; } // never throws
bool operator! () const { return !bool(smPtr_); } // ditto

View file

@ -63,7 +63,7 @@ namespace proc {
public:
DummyImageGenerator(uint fps);
~DummyImageGenerator() { }
~DummyImageGenerator() { }
/** generate the next frame and
* occupy the alternate buffer.

View file

@ -291,12 +291,9 @@ namespace proc {
{ }
DummyPlayer::Process
ProcessImpl::createHandle()
ProcessImpl::~ProcessImpl()
{
DummyPlayer::Process handle;
handle.activate(this, &terminate);
return handle;
INFO (proc_dbg, "Playback process halted...");
}
@ -309,6 +306,16 @@ namespace proc {
DummyPlayer::Process
ProcessImpl::createHandle()
{
DummyPlayer::Process handle;
handle.activate(this, &terminate);
return handle;
}
void
ProcessImpl::setRate (uint fps)
{

View file

@ -83,6 +83,7 @@ namespace proc {
public:
ProcessImpl(LumieraDisplaySlot) ;
~ProcessImpl() ;
/* Implementation-level API to be used By DummyPlayerService */

View file

@ -69,13 +69,17 @@ namespace proc {
TickService (Tick callback)
: Thread("Tick generator (dummy)",
bind (&TickService::timerLoop, this, callback))
{ }
{
INFO (proc, "TickService started.");
}
~TickService ()
{
uint curr_tick = timespan_;
timespan_ = 0;
usleep (curr_tick); ////TODO actually should wait for timer thread termination
usleep (2*curr_tick); ////TODO actually should wait for timer thread termination
INFO (proc, "TickService shutdown.");
}
@ -106,7 +110,10 @@ namespace proc {
periodicFun();
usleep (timespan_);
} }
}
TRACE (proc_dbg, "Tick Thread timer loop exiting...");
}
};