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) 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
77
#ifndef STEAM_PLAY_DUMMY_PLAY_CONNECTION_H
78
#define STEAM_PLAY_DUMMY_PLAY_CONNECTION_H
79
80
81
#include "
steam/play/dummy-builder-context.hpp
"
82
#include "
steam/play/output-manager.hpp
"
83
#include "
lib/time/timequant.hpp
"
84
85
#include "
lib/iter-source.hpp
"
86
#include "
lib/nocopy.hpp
"
87
#include "
lib/util.hpp
"
88
89
#include <vector>
90
91
92
namespace
steam
{
93
namespace
play {
94
namespace
test
{
95
96
// using std::string;
97
using
lib::time::Duration
;
98
99
100
102
struct
PlayTestFrames_Strategy
103
{
104
105
};
106
107
108
/****************************************************************/
119
template
<
class
DEF>
120
class
DummyPlayConnection
121
:
util::NonCopyable
122
{
123
SimulatedBuilderContext
mockBuilder_;
124
125
public
:
126
127
ModelPorts
128
getAllModelPorts()
129
{
130
return
mockBuilder_.getAllModelPorts();
131
}
132
133
DummyOutputLink
134
getModelPort (uint index)
135
{
136
return
mockBuilder_.getModelPort (index);
137
}
138
143
bool
144
isSupported
(
ModelPort
port,
DataSink
sink)
145
{
146
uint i{0};
147
for
(
auto
it=getAllModelPorts();
bool
{it}; ++it, ++i)
148
if
(port == *it)
149
{
150
auto
[refPort, refSink] = getModelPort(i);
151
if
(refSink == sink)
152
return
true
;
153
}
154
return
false
;
155
}
156
157
POutputManager
158
provide_testOutputSlot()
159
{
160
UNIMPLEMENTED (
"provide a suitable output sink simulation"
);
161
}
162
163
164
/* === Test Support API === */
165
166
bool
167
isWired()
168
{
169
UNIMPLEMENTED (
"is this dummy in activated state?"
);
170
}
171
172
Duration
173
getPlannedTestDuration()
174
{
175
UNIMPLEMENTED (
"manage the a planned test duration"
);
176
}
177
182
void
183
waitUntilDue
()
184
{
185
UNIMPLEMENTED (
"do a blocking wait, while an output test is performed in other threads"
);
186
}
187
188
bool
189
gotCorrectOutput()
190
{
191
UNIMPLEMENTED (
"verify proper operation by inspecting the provided test dummy components"
);
192
}
193
};
194
195
196
197
198
}}}
// namespace steam::play::test
199
#endif
/*STEAM_PLAY_DUMMY_PLAY_CONNECTION_H*/
dummy-builder-context.hpp
Simulated result of a builder run for test purposes, without actual session and model content...
steam::play::test::DummyPlayConnection
Framework for dummy playback and rendering.
Definition:
dummy-play-connection.hpp:120
test
Definition:
run.hpp:49
util::NonCopyable
Any copy and copy construction prohibited.
Definition:
nocopy.hpp:46
steam::play::DataSink
denotes an opened connection ready to receive media data for output.
Definition:
output-slot.hpp:168
lib::IterSource::iterator
Definition:
iter-source.hpp:146
steam
Steam-Layer implementation namespace root.
Definition:
dummy-player-facade.h:46
steam::play::test::DummyPlayConnection::waitUntilDue
void waitUntilDue()
test helper: blocking wait during an output test.
Definition:
dummy-play-connection.hpp:183
std::shared_ptr
Definition:
trait.hpp:74
nocopy.hpp
Mix-Ins to allow or prohibit various degrees of copying and cloning.
steam::play::test::SimulatedBuilderContext
helper for dummy render engine: Simulate the result of a build process, without actually running the ...
Definition:
dummy-builder-context.hpp:131
util.hpp
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
steam::mobject::ModelPort
Handle designating a point within the model, where actually output data can be pulled.
Definition:
model-port.hpp:104
timequant.hpp
Support library to represent grid-aligned time specifications This is part of Lumiera's time and time...
output-manager.hpp
A global service to handle all external output connections.
lib::time::Duration
Duration is the internal Lumiera time metric.
Definition:
timevalue.hpp:477
steam::play::test::DummyPlayConnection::isSupported
bool isSupported(ModelPort port, DataSink sink)
search through all port <-> sink connections supported by this DummyPlayConnection ...
Definition:
dummy-play-connection.hpp:144
iter-source.hpp
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.
steam::play::test::PlayTestFrames_Strategy
Definition:
dummy-play-connection.hpp:102
core
steam
play
dummy-play-connection.hpp
Generated on Sat Apr 20 2024 02:03:39 for Lumiera by
1.8.13