Lumiera  0.pre.03
»edit your freedom«
dummy-play-connection.hpp
Go to the documentation of this file.
1 /*
2  DUMMY-PLAY-CONNECTION.hpp - simplified test setup for playback
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 
68 #ifndef STEAM_PLAY_DUMMY_PLAY_CONNECTION_H
69 #define STEAM_PLAY_DUMMY_PLAY_CONNECTION_H
70 
71 
74 #include "lib/time/timequant.hpp"
75 
76 #include "lib/iter-source.hpp"
77 #include "lib/nocopy.hpp"
78 #include "lib/util.hpp"
79 
80 #include <vector>
81 
82 
83 namespace steam{
84 namespace play {
85 namespace test {
86 
87 // using std::string;
88  using lib::time::Duration;
89 
90 
91 
94  {
95 
96  };
97 
98 
99  /****************************************************************/
110  template<class DEF>
113  {
114  SimulatedBuilderContext mockBuilder_;
115 
116  public:
117 
118  ModelPorts
119  getAllModelPorts()
120  {
121  return mockBuilder_.getAllModelPorts();
122  }
123 
124  DummyOutputLink
125  getModelPort (uint index)
126  {
127  return mockBuilder_.getModelPort (index);
128  }
129 
134  bool
136  {
137  uint i{0};
138  for (auto it=getAllModelPorts(); bool{it}; ++it, ++i)
139  if (port == *it)
140  {
141  auto [refPort, refSink] = getModelPort(i);
142  if (refSink == sink)
143  return true;
144  }
145  return false;
146  }
147 
149  provide_testOutputSlot()
150  {
151  UNIMPLEMENTED ("provide a suitable output sink simulation");
152  }
153 
154 
155  /* === Test Support API === */
156 
157  bool
158  isWired()
159  {
160  UNIMPLEMENTED ("is this dummy in activated state?");
161  }
162 
163  Duration
164  getPlannedTestDuration()
165  {
166  UNIMPLEMENTED ("manage the a planned test duration");
167  }
168 
173  void
175  {
176  UNIMPLEMENTED ("do a blocking wait, while an output test is performed in other threads");
177  }
178 
179  bool
180  gotCorrectOutput()
181  {
182  UNIMPLEMENTED ("verify proper operation by inspecting the provided test dummy components");
183  }
184  };
185 
186 
187 
188 
189 }}} // namespace steam::play::test
190 #endif /*STEAM_PLAY_DUMMY_PLAY_CONNECTION_H*/
Simulated result of a builder run for test purposes, without actual session and model content...
Framework for dummy playback and rendering.
Definition: run.hpp:40
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
denotes an opened connection ready to receive media data for output.
Steam-Layer implementation namespace root.
void waitUntilDue()
test helper: blocking wait during an output test.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
helper for dummy render engine: Simulate the result of a build process, without actually running the ...
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Handle designating a point within the model, where actually output data can be pulled.
Definition: model-port.hpp:95
Support library to represent grid-aligned time specifications This is part of Lumiera&#39;s time and time...
A global service to handle all external output connections.
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:468
bool isSupported(ModelPort port, DataSink sink)
search through all port <-> sink connections supported by this DummyPlayConnection ...
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.