Lumiera  0.pre.03
»edityourfreedom«
calc-stream.hpp
Go to the documentation of this file.
1 /*
2  CALC-STREAM.hpp - abstraction representing a series of scheduled calculations
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 
23 
44 #ifndef PROC_ENGINE_CALC_STREAM_H
45 #define PROC_ENGINE_CALC_STREAM_H
46 
47 
48 #include "lib/error.hpp"
49 #include "proc/play/timings.hpp"
52 //#include "include/dummy-player-facade.h"
53 //#include "include/display-facade.h"
54 //#include "common/instancehandle.hpp"
55 //#include "lib/singleton-ref.hpp"
56 //
57 //#include <string>
58 #include <vector>
59 
60 
61 namespace proc {
62 namespace engine{
63 
64  namespace error = lumiera::error;
65 
66 // using std::string;
67 // using lumiera::Subsys;
68 // using lumiera::Display;
69 // using lumiera::DummyPlayer;
70 
71 
82  {
83  public:
85 
86  virtual play::Timings& effectiveTimings() =0;
87  };
88 
89 
90 
91 
92  /*****************************************************/
110  {
113 
114  protected:
116  : eng_(&abstractEngine)
117  { }
118 
119  friend class EngineService;
120 
121 
122  CalcStream
124  {
125  UNIMPLEMENTED ("set up dispatcher to start calculating and feeding to the given output sink");
126  return *this;
127  }
128 
129 
130  public:
132  : eng_(0)
133  , plan_(0)
134  { }
135 
137 
138  // using standard copy operations
139 
140 
141  play::Timings const&
143  {
144  if (!eng_)
145  throw error::State ("attempt to get the playback timings "
146  "of an unconfigured, disabled or halted calculation stream"
147  ,error::LUMIERA_ERROR_LIFECYCLE);
148  return eng_->effectiveTimings();
149  }
150 
151  };
152 
153  typedef std::vector<CalcStream> CalcStreams;
154 
155 
156 
157 
158 
159 }}// namespace proc::engine
160 #endif /*PROC_ENGINE_CALC_STREAM_H*/
An (abstract) capability to send media data to an external output.
denotes an opened connection ready to receive media data for output.
virtual ~RenderEnvironmentClosure()
this is an interface
Definition: calc-stream.hpp:84
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...
play::Timings const & getTimings()
std::vector< CalcStream > CalcStreams
engine::CalcPlanContinuation * plan_
CalcStream(RenderEnvironmentClosure &abstractEngine)
RenderEnvironmentClosure * eng_
A service to schedule series of calculations, delivering the rendered data into an external output si...
LumieraError< LERR_(STATE)> State
Definition: error.hpp:214
CalcStream sendToOutput(play::DataSink)
virtual play::Timings & effectiveTimings()=0
Lumiera error handling (C++ interface).
Special job to perform the job planning.
How to define a timing specification or constraint.
A specialised render job to care for the planning of the calculation process itself.
Proc-Layer implementation namespace root.
Definition: id-scheme.hpp:63
Generic frame timing specification.
Definition: timings.hpp:95