Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
engine-service.hpp
Go to the documentation of this file.
1 /*
2  ENGINE-SERVICE.hpp - primary service access point for using the renderengine
3 
4  Copyright (C) Lumiera.org
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
51 #ifndef PROC_ENGINE_ENGINE_SERVICE_H
52 #define PROC_ENGINE_ENGINE_SERVICE_H
53 
54 
55 #include "lib/error.hpp"
56 #include "lib/nocopy.hpp"
57 //#include "include/dummy-player-facade.h"
58 //#include "include/display-facade.h"
61 #include "proc/play/timings.hpp"
63 //#include "common/instancehandle.hpp"
64 //#include "lib/singleton-ref.hpp"
66 #include "lib/depend.hpp"
67 
68 #include <functional>
69 //#include <string>
70 
71 
72 namespace proc {
73 namespace engine{
74 
75 // using std::string;
76 // using lumiera::Subsys;
77 // using lumiera::Display;
78 // using lumiera::DummyPlayer;
79 // using std::function;
80  using mobject::ModelPort;
81  using proc::play::Timings;
82 
84 
85 
86 
87 
88 
89  /**************************************************/
102  {
103 
104 
105  /* The following typedefs allow to hand out predefined
106  * Quality-of-Service strategy definitions as value objects,
107  * without disclosing implementation details here in this header.
108  */
109  enum{ QoS_IMPL_SIZE = sizeof(size_t) };
110 
111 
112  public:
113  /*********************************************************/
120  class Quality
121  {
122  public:
123  virtual ~Quality() { };
124  };
125 
126 
129 
130  static QoS_Definition QoS_DEFAULT;
131  static QoS_Definition QoS_BACKGROUND;
132  static QoS_Definition QoS_SYNC_PRIORITY;
133  static QoS_Definition QoS_PERFECT_RESULT;
134  static QoS_Definition QoS_COMPROMISE;
135 
136 
142 
143 
144  virtual ~EngineService() { }
145 
146  EngineService();
147 
149  calculate(ModelPort mPort,
150  Timings nominalTimings,
151  OutputConnection& output,
152  Quality serviceQuality =QoS_DEFAULT);
153 
155  calculateBackground(ModelPort mPort,
156  Timings nominalTimings,
157  Quality serviceQuality =QoS_BACKGROUND);
158 
159 
160  protected:
162 
163  void activateTracing();
164  void disableTracing();
165 
166  friend class EngineDiagnostics;
167 
168  private:
170  };
171 
172 
173 
174 
175 
176 
177 }} // namespace proc::engine
178 #endif /*PROC_ENGINE_ENGINE_SERVICE_H*/
Organising the output data calculation possibilities.
An (abstract) capability to send media data to an external output.
CalcStreams calculate(ModelPort mPort, Timings nominalTimings, OutputConnection &output, Quality serviceQuality=QoS_DEFAULT)
core operation: activate the Lumiera Render Engine.
lib::PolymorphicValue< Quality, QoS_IMPL_SIZE, _Clonable_QoS_Strategy > QoS_Definition
denotes an opened connection ready to receive media data for output.
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
A variation for limited copy support.
A mechanism to allow for opaque polymorphic value objects.
Abstract definition of the environment hosting a given render activity (CalcStream).
Definition: calc-stream.hpp:81
A calculation stream groups and abstracts a series of calculation jobs, delivering frames into the co...
Quality-of-Service definition for an Render Engine usage.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:275
virtual RenderEnvironmentClosure & configureCalculation(ModelPort, Timings, Quality)
std::vector< CalcStream > CalcStreams
CalcStreams calculateBackground(ModelPort mPort, Timings nominalTimings, Quality serviceQuality=QoS_BACKGROUND)
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Template to build polymorphic value objects.
A service to schedule series of calculations, delivering the rendered data into an external output si...
void activateTracing()
Switch the complete engine into diagnostics mode.
static CalcStream activateCalculation(play::DataSink, RenderEnvironmentClosure &)
A core abstraction within the render engine to represent an ongoing calculation.
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
static QoS_Definition QoS_DEFAULT
static QoS_Definition QoS_COMPROMISE
Render engine diagnostic facility.
static QoS_Definition QoS_SYNC_PRIORITY
How to define a timing specification or constraint.
proc::play::OutputSlot::Allocation OutputConnection
static QoS_Definition QoS_PERFECT_RESULT
Proc-Layer implementation namespace root.
Definition: id-scheme.hpp:63
lib::polyvalue::CloneValueSupport< Quality > _Clonable_QoS_Strategy
static lib::Depend< EngineService > instance
access point to the Engine Interface.
Generic frame timing specification.
Definition: timings.hpp:95
static QoS_Definition QoS_BACKGROUND