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
72
#include "
steam/play/dummy-builder-context.hpp
"
73
#include "
steam/play/output-manager.hpp
"
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
93
struct
PlayTestFrames_Strategy
94
{
95
96
};
97
98
99
/****************************************************************/
110
template
<
class
DEF>
111
class
DummyPlayConnection
112
:
util::NonCopyable
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
135
isSupported
(
ModelPort
port,
DataSink
sink)
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
148
POutputManager
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
174
waitUntilDue
()
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*/
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:111
test
Definition:
run.hpp:40
util::NonCopyable
Any copy and copy construction prohibited.
Definition:
nocopy.hpp:37
steam::play::DataSink
denotes an opened connection ready to receive media data for output.
Definition:
output-slot.hpp:159
lib::IterSource::iterator
Definition:
iter-source.hpp:137
steam
Steam-Layer implementation namespace root.
Definition:
dummy-player-facade.h:37
steam::play::test::DummyPlayConnection::waitUntilDue
void waitUntilDue()
test helper: blocking wait during an output test.
Definition:
dummy-play-connection.hpp:174
std::shared_ptr
Definition:
trait.hpp:65
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:122
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:95
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:468
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:135
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:93
core
steam
play
dummy-play-connection.hpp
Generated on Fri Dec 13 2024 05:05:33 for Lumiera by
1.8.13