Lumiera  0.pre.03
»edit your freedom«
engine-config.cpp
Go to the documentation of this file.
1 /*
2  EngineConfig - access point to any kind of engine configuration parameters
3 
4  Copyright (C) Lumiera.org
5  2013, 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 
23 
33 #include "lib/time/timevalue.hpp"
34 #include "lib/rational.hpp"
35 
36 
38 using lib::time::FSecs;
39 using util::Rat;
40 
41 
42 namespace vault{
43 namespace gear {
44 
45  namespace { // Hard wired placeholder settings...
46 
47  const auto EIGHTY_PERCENT = 8_r/10;
48 
49  const Duration DEFAULT_ENGINE_LATENCY = EIGHTY_PERCENT * Duration(1, FrameRate{25});
50  const Duration DEFAULT_JOB_PLANNING_TURNOVER(FSecs(3,2));
51 
52  }//(End)hard wired settings
53 
54 
55  EngineConfig::~EngineConfig() { }
56 
57 
60 
61 
68  { }
69 
70 
71 
72 
73  Duration
75  {
76  return DEFAULT_ENGINE_LATENCY;
77  }
78 
79 
80  Duration
82  {
83  return DEFAULT_JOB_PLANNING_TURNOVER;
84  }
85 
86 }} // namespace vault::gear
Rational number support, based on boost::rational.
Framerate specified as frames per second.
Definition: timevalue.hpp:664
Duration currentEngineLatency() const
reasonable guess of the current engine working delay.
static lib::Depend< EngineConfig > get
access point to the Engine Interface.
access point to configuration of engine parameters
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:289
EngineConfig()
build up a new engine configuration set, based on reasonable default values
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Definition: timevalue.hpp:229
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:477
Duration currentJobPlanningRhythm() const
Time interval for ahead planning of render jobs.
a family of time value like entities and their relationships.
Vault-Layer implementation namespace root.