41 using std::unique_ptr;
59 operator string ()
const {
return "Dummy-Player"; }
73 thePlayer_.createInstance (terminationHandle);
80 thePlayer_.shutdown();
88 return bool(thePlayer_);
101 ,lumieraorg_DummyPlayerFacade_descriptor
103 , LUMIERA_INTERFACE_INLINE (
name,
104 const char*, (LumieraInterface ifa),
105 { (void)ifa;
return "DummyPlayer"; }
107 , LUMIERA_INTERFACE_INLINE (brief,
108 const char*, (LumieraInterface ifa),
109 { (void)ifa;
return "Steam Interface: dummy player to test integration with the GUI"; }
111 , LUMIERA_INTERFACE_INLINE (homepage,
112 const char*, (LumieraInterface ifa),
113 { (void)ifa;
return "http://www.lumiera.org/develompent.html" ;}
115 , LUMIERA_INTERFACE_INLINE (version,
116 const char*, (LumieraInterface ifa),
117 { (void)ifa;
return "0.1~pre"; }
119 , LUMIERA_INTERFACE_INLINE (author,
120 const char*, (LumieraInterface ifa),
121 { (void)ifa;
return "Hermann Vosseler"; }
123 , LUMIERA_INTERFACE_INLINE (email,
124 const char*, (LumieraInterface ifa),
125 { (void)ifa;
return "Ichthyostega@web.de"; }
127 , LUMIERA_INTERFACE_INLINE (copyright,
128 const char*, (LumieraInterface ifa),
133 " 2009, Hermann Vosseler <Ichthyostega@web.de>";
136 , LUMIERA_INTERFACE_INLINE (license,
137 const char*, (LumieraInterface ifa),
141 "**Lumiera** is free software; you can redistribute it and/or modify it\n" 142 "under the terms of the GNU General Public License as published by the\n" 143 "Free Software Foundation; either version 2 of the License, or (at your\n" 144 "option) any later version. See the file COPYING for further details." 148 , LUMIERA_INTERFACE_INLINE (state,
149 int, (LumieraInterface ifa),
152 , LUMIERA_INTERFACE_INLINE (versioncmp,
153 int, (
const char* a,
const char* b),
154 {(void)a;(void)b;
return 0;}
162 using LERR_(LIFECYCLE);
169 ,lumieraorg_DummyPlayerService
173 , LUMIERA_INTERFACE_INLINE (startPlay,
174 LumieraPlayProcess, (LumieraDisplaySlot viewerHandle),
182 return static_cast<LumieraPlayProcess
> (
_instance().start(viewerHandle));
185 , LUMIERA_INTERFACE_INLINE (togglePlay,
186 void, (LumieraPlayProcess handle,
bool doPlay),
195 ProcP proc =
static_cast<ProcP
> (handle);
200 , LUMIERA_INTERFACE_INLINE (terminate,
201 void, (LumieraPlayProcess handle),
210 ProcP proc =
static_cast<ProcP
> (handle);
225 DummyPlayerService::DummyPlayerService (Subsys::SigTerm terminationHandle)
227 , notifyTermination_(terminationHandle)
228 , serviceInstance_(
LUMIERA_INTERFACE_REF (lumieraorg_DummyPlayer, 0, lumieraorg_DummyPlayerService))
230 INFO (progress,
"DummyPlayer Facade opened.");
249 unique_ptr<ProcessImpl> newProcess (
new ProcessImpl (viewerHandle));
251 REQUIRE (!newProcess->isActive());
252 newProcess->setRate(25);
254 return newProcess.release();
265 ProcessImpl::ProcessImpl(LumieraDisplaySlot viewerHandle)
274 ProcessImpl::~ProcessImpl()
276 INFO (proc_dbg,
"Playback process halted...");
301 handle.
activate(implementationLink, &terminate);
310 REQUIRE (fps==0 || fps_==0 );
311 REQUIRE (fps==0 || !play_ );
321 tick_->activate(fps);
329 REQUIRE (isActive());
330 tick_->activate (yes? fps_:0);
339 REQUIRE (isActive());
343 display_(imageGen_->next());
345 display_(imageGen_->current());
364 return steam::play::theDummyPlayerDescriptor();
Dependencies and lifecycle of a partially independent Subsystem of the Application.
DummyPlayer::Process createHandle()
activate a forwarding smart-Handle to be used by client code for communication with the play process ...
static lib::Depend< Display > facade
get an implementation instance of this service
Playback process, front-end to be used by client code.
void doPlay(bool yes)
forward the play/pause toggle to the play process implementation
lib::Depend< DummyPlayerService > _instance
a backdoor for the C Language impl to access the actual SessionCommand implementation...
Configuration handle to expose a service implementation through the Depend<SRV> front-end.
Generator for test dummy video frames to simulate playback of rendered output.
ProcessImpl * start(LumieraDisplaySlot viewerHandle)
conceptually, this serves as implementation of the DummyPlayer::start() function. ...
Per type specific configuration of instances created as service dependencies.
A public service provided by the Steam-Layer, implementing a dummy/mockup playback process...
bool checkRunningState() noexcept override
whether this subsystem is actually operational.
Frontend for handling the Lumiera application commandline arguments.
static lumiera::Subsys & getDescriptor()
provide a descriptor for lumiera::AppState, wired accordingly to allow main to deal with the dummy pl...
Mediator to allow the client to communicate with the Process implementation via the Process handle...
Steam-Layer implementation namespace root.
Access point to singletons and other kinds of dependencies designated by type.
Not finished development code.
bool start(lumiera::Option &, Subsys::SigTerm terminationHandle) override
attempt to bring up this subsystem up.
#define LUMIERA_INTERFACE_INSTANCE(iname, version, name, descriptor, acquire, release,...)
Define an interface instance.
bool shouldStart(lumiera::Option &) override
query application option state to determine if this subsystem should be activated.
#define LUMIERA_INTERFACE_REF(iname, version, dname)
Return a reference (pointer) to an interface implementation.
void setRate(uint fps)
activate a playback process with given specification
void triggerShutdown() noexcept override
initiate termination of this subsystem.
void doFrame()
periodically invoked while playing
details of how the DummyPlayer service can be started and used as independent "subsystem" within main...
static void terminate(DummyPlayer::ProcessImplementationLink *)
deleter function for lib::Handle
Tick generating service for a periodic callback, with adjustable frequency.
Actual implementation of a single (dummy) playback process.
Singleton services and Dependency Injection.
lumiera_err lumiera_error_set(lumiera_err nerr, const char *extra)
Set error state for the current thread.
Handle & activate(IMP *impl, DEL whenDead)
Activation of the handle by the managing service.
A data record to describe interface, interface instances and plug-in instances.
Lumiera public interface.
A timer service invoking a given callback periodically.