add the impl. of the periodic playback function, now pushing output up to GUI
This commit is contained in:
parent
4524c23832
commit
32c2c85abc
4 changed files with 15 additions and 13 deletions
|
|
@ -89,7 +89,7 @@ namespace proc {
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
void * const
|
const LumieraDisplayFrame
|
||||||
DummyImageGenerator::next()
|
DummyImageGenerator::next()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -137,7 +137,7 @@ namespace proc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// select output buffer to return
|
// select output buffer to return
|
||||||
unsigned char * outBuff;
|
LumieraDisplayFrame outBuff;
|
||||||
|
|
||||||
if (!current_)
|
if (!current_)
|
||||||
{
|
{
|
||||||
|
|
@ -156,7 +156,7 @@ namespace proc {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void * const
|
const LumieraDisplayFrame
|
||||||
DummyImageGenerator::current()
|
DummyImageGenerator::current()
|
||||||
{
|
{
|
||||||
if (!current_) return outFrame_A_;
|
if (!current_) return outFrame_A_;
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "lib/error.hpp"
|
#include "lib/error.hpp"
|
||||||
|
#include "include/display-facade.h"
|
||||||
|
|
||||||
|
|
||||||
namespace proc {
|
namespace proc {
|
||||||
|
|
@ -68,11 +69,11 @@ namespace proc {
|
||||||
* occupy the alternate buffer.
|
* occupy the alternate buffer.
|
||||||
* @return the buffer containing the new frame
|
* @return the buffer containing the new frame
|
||||||
*/
|
*/
|
||||||
void * const next();
|
const LumieraDisplayFrame next();
|
||||||
|
|
||||||
/** just re-return a pointer to the current frame
|
/** just re-return a pointer to the current frame
|
||||||
* without generating any new image data */
|
* without generating any new image data */
|
||||||
void * const current();
|
const LumieraDisplayFrame current();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ namespace proc {
|
||||||
ProcessImpl*
|
ProcessImpl*
|
||||||
DummyPlayerService::start (LumieraDisplaySlot viewerHandle)
|
DummyPlayerService::start (LumieraDisplaySlot viewerHandle)
|
||||||
{
|
{
|
||||||
auto_ptr<ProcessImpl> newProcess (new ProcessImpl);
|
auto_ptr<ProcessImpl> newProcess (new ProcessImpl (viewerHandle));
|
||||||
|
|
||||||
REQUIRE (!newProcess->isActive());
|
REQUIRE (!newProcess->isActive());
|
||||||
newProcess->setRate(25);
|
newProcess->setRate(25);
|
||||||
|
|
@ -282,9 +282,10 @@ namespace proc {
|
||||||
/* === Process Implementation === */
|
/* === Process Implementation === */
|
||||||
|
|
||||||
|
|
||||||
ProcessImpl::ProcessImpl()
|
ProcessImpl::ProcessImpl(LumieraDisplaySlot viewerHandle)
|
||||||
: fps_(0)
|
: fps_(0)
|
||||||
, play_(false)
|
, play_(false)
|
||||||
|
, display_(Display::facade().getHandle (viewerHandle))
|
||||||
, imageGen_(0)
|
, imageGen_(0)
|
||||||
, tick_(new TickService (bind (&ProcessImpl::doFrame, this)))
|
, tick_(new TickService (bind (&ProcessImpl::doFrame, this)))
|
||||||
{ }
|
{ }
|
||||||
|
|
@ -343,13 +344,10 @@ namespace proc {
|
||||||
REQUIRE (isActive());
|
REQUIRE (isActive());
|
||||||
ASSERT (imageGen_);
|
ASSERT (imageGen_);
|
||||||
|
|
||||||
/////////////////////////////////////////TODO rewrite impl; now actively pushing up the frame!
|
|
||||||
/*
|
|
||||||
if (play_)
|
if (play_)
|
||||||
return imageGen_->next();
|
display_(imageGen_->next());
|
||||||
else
|
else
|
||||||
return imageGen_->current();
|
display_(imageGen_->current());
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "include/dummy-player-facade.h"
|
#include "include/dummy-player-facade.h"
|
||||||
|
#include "include/display-facade.h"
|
||||||
#include "common/instancehandle.hpp"
|
#include "common/instancehandle.hpp"
|
||||||
#include "lib/singleton-ref.hpp"
|
#include "lib/singleton-ref.hpp"
|
||||||
|
|
||||||
|
|
@ -53,6 +54,7 @@ namespace proc {
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using lumiera::Subsys;
|
using lumiera::Subsys;
|
||||||
|
using lumiera::Display;
|
||||||
|
|
||||||
|
|
||||||
class DummyImageGenerator;
|
class DummyImageGenerator;
|
||||||
|
|
@ -74,12 +76,13 @@ namespace proc {
|
||||||
uint fps_;
|
uint fps_;
|
||||||
bool play_;
|
bool play_;
|
||||||
|
|
||||||
|
Display::Sink display_;
|
||||||
boost::scoped_ptr<DummyImageGenerator> imageGen_;
|
boost::scoped_ptr<DummyImageGenerator> imageGen_;
|
||||||
boost::scoped_ptr<TickService> tick_;
|
boost::scoped_ptr<TickService> tick_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ProcessImpl() ;
|
ProcessImpl(LumieraDisplaySlot) ;
|
||||||
|
|
||||||
/* Implementation-level API to be used By DummyPlayerService */
|
/* Implementation-level API to be used By DummyPlayerService */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue