Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dispatcher.cpp
Go to the documentation of this file.
1 /*
2  Dispatcher - translating calculation streams into frame jobs
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 
31 //#include "lib/frameid.hpp"
32 //#include "proc/state.hpp"
33 
34 
35 
36 namespace proc {
37 namespace engine {
38 
39  Dispatcher::~Dispatcher() { } // emit VTables and Typeinfo here....
41 
42 
45  Dispatcher::onCalcStream (ModelPort modelPort, uint channel)
46  {
47  JobBuilder builder = {this, modelPort,channel};
48  return builder;
49  }
50 
51 
55  {
56  FrameCoord frame;
57  frame.absoluteNominalTime = refPoint;
58  frame.absoluteFrameNumber = refPoint.getStartFrame();
59  frame.absoluteRealDeadline = refPoint.establishDeadlineFor (frameOffset);
60  frame.modelPort = this->modelPort_;
61  frame.channelNr = this->channel_;
62 
63  ENSURE (frame.isDefined());
64  return dispatcher_->locateRelative (frame, frameOffset);
65  }
66 
67 
68 
69 
70 
71 }} // namespace engine
int64_t FrameCnt
Definition: job.h:94
virtual ~FrameSequencer()
this is an interface
Definition: dispatcher.cpp:40
Service abstraction within the render engine for generating render jobs.
virtual FrameCoord locateRelative(FrameCoord const &, FrameCnt frameOffset)=0
core dispatcher operation: based on the coordinates of a reference point, establish binding frame num...
The process of playback or rendering is a continued series of exploration and evaluation.
Definition: time-anchor.hpp:97
FrameCoord relativeFrameLocation(TimeAnchor &refPoint, FrameCnt frameCountOffset=0)
Definition: dispatcher.cpp:54
Time establishDeadlineFor(FrameCnt frameOffset)
define the deadline for a grid point relative to this reference point.
virtual ~Dispatcher()
this is an interface
Definition: dispatcher.cpp:39
FrameCnt getStartFrame() const
effective coordinates of a frame to be calculated.
Definition: frame-coord.hpp:65
Proc-Layer implementation namespace root.
Definition: id-scheme.hpp:63
JobBuilder onCalcStream(ModelPort modelPort, uint channel)
Definition: dispatcher.cpp:45
ENSURE(r==&pq)