Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
engine-service.cpp
Go to the documentation of this file.
1/*
2 EngineService - primary service access point for using the renderengine
3
4 Copyright (C)
5 2011, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
14
22#include "lib/itertools.hpp"
23
24//#include <string>
25//#include <memory>
26#include <functional>
27
28
29
30namespace steam {
31namespace engine{
32
33// using std::string;
34// using lumiera::Subsys;
35 using std::function;
36 using std::bind;
37 using std::ref;
39 using lib::append_all;
40
41
42 namespace { // hidden local details of the service implementation....
43
44 } // (End) hidden service impl details
45
46
47
48
49
52
53
54
58
59
60
72 Timings nominalTimings,
73 OutputConnection& output,
74 Quality serviceQuality)
75 {
76 RenderEnvironment& renderConfig = configureCalculation (mPort,nominalTimings,serviceQuality);
77 function<CalcStream(play::DataSink)> triggerRenderStart = bind (activateCalculation, _1, ref(renderConfig));
78
79 CalcStreams runningCalculations;
80 append_all (transform (output.getOpenedSinks()
81 ,triggerRenderStart
82 )
83 ,runningCalculations);
84 return runningCalculations;
86// treat_all(output.getOpenedSinks())
87// .apply (activateCalculation, _1, renderConfig)
88// .buildVector();
89 }
90
91
92
96 Timings nominalTimings,
97 Quality serviceQuality)
98 {
99 UNIMPLEMENTED ("build calculation streams for background rendering");
100 }
101
102
111 {
112 CalcStream calcStream(engineCallback);
113 calcStream.sendToOutput (sink);
114 return calcStream;
115 }
116
117
118
140 Timings nominalTimings,
141 Quality serviceQuality)
142 {
143 UNIMPLEMENTED ("Access and wire to the Scheduler-frontend. "
144 "Then access the Segmentation and invoke a builder function for a suitable dispatcher table. "
145 "Package all of this into a suitable RenderEnvironementClosure subclass.");
146 RenderEnvironment* todo_fake(0);
147
148 return *todo_fake;
149 }
150
151
152
159 void
161 {
162 UNIMPLEMENTED ("tracing/diagnostics mode of the render engine");
163 }
164
165 void
167 {
168 UNIMPLEMENTED ("tracing/diagnostics mode of the render engine");
170 }
171
172
173
174
175
176 /* ===== Quality-of-Service ===== */
177
178
184
185
188 {
190
191 public:
193 : type_(type)
194 { }
195 };
196
198 : public DefaultQoS
199 {
200
201 public:
204 { }
205 };
206
208 : public DefaultQoS
209 {
210
211 public:
213 : DefaultQoS(type)
214 { }
215 };
216
217
218 EngineService::QoS_Definition EngineService::QoS_DEFAULT = QoS_Definition::build<DefaultQoS> (PLAYBACK);
219 EngineService::QoS_Definition EngineService::QoS_BACKGROUND = QoS_Definition::build<DefaultQoS> (BACKGROUND);
220 EngineService::QoS_Definition EngineService::QoS_COMPROMISE = QoS_Definition::build<Compromise> (PLAYBACK);
221 EngineService::QoS_Definition EngineService::QoS_PERFECT_RESULT = QoS_Definition::build<DefaultQoS> (RENDER);
222 EngineService::QoS_Definition EngineService::QoS_SYNC_PRIORITY = QoS_Definition::build<PriorityQoS>();
223
224
225
226}} // namespace steam::engine
Access point to singletons and other kinds of dependencies designated by type.
Definition depend.hpp:281
A calculation stream groups and abstracts a series of calculation jobs, delivering frames into the co...
void sendToOutput(play::DataSink)
Quality-of-Service definition for an Render Engine usage.
CalcStreams calculate(ModelPort mPort, Timings nominalTimings, OutputConnection &output, Quality serviceQuality=QoS_DEFAULT)
core operation: activate the Lumiera Render Engine.
void activateTracing()
Switch the complete engine into diagnostics mode.
static QoS_Definition QoS_DEFAULT
static QoS_Definition QoS_COMPROMISE
static lib::Depend< EngineService > instance
access point to the Engine Interface.
virtual RenderEnvironment & configureCalculation(ModelPort, Timings, Quality)
CalcStreams calculateBackground(ModelPort mPort, Timings nominalTimings, Quality serviceQuality=QoS_BACKGROUND)
lib::PolymorphicValue< Quality, QoS_IMPL_SIZE, _Clonable_QoS_Strategy > QoS_Definition
static CalcStream activateCalculation(play::DataSink, RenderEnvironment &)
static QoS_Definition QoS_PERFECT_RESULT
static QoS_Definition QoS_SYNC_PRIORITY
static QoS_Definition QoS_BACKGROUND
Abstract definition of the environment hosting a given render activity (CalcStream).
Handle designating a point within the model, where actually output data can be pulled.
denotes an opened connection ready to receive media data for output.
virtual OpenedSinks getOpenedSinks()=0
Generic frame timing specification.
Definition timings.hpp:87
Access point for the (core) calculation service of the render engine.
Helpers for working with iterators based on the pipeline model.
_TransformIterT< IT, FUN >::Iter transform(IT &&source, FUN processingFunc)
pipes a given Lumiera Forward Iterator through a transformation function and wraps the resulting tran...
void append_all(IT iter, CON &container)
std::vector< CalcStream > CalcStreams
Steam-Layer implementation namespace root.