Segmentation: simple implementation of time-based access
- introduce a JobTicket::NOP (null-object pattern) - assuming that the function splitSplice() will retain complete coverage allways Remark: `Fixture::getPlaylistForRender()` is a leftover from the very early implementation drafts. This function was more or less based on the way Cinelerra works; it is clear by now that Lumiera can not possibly work this way, given that we'll build a low-level model and dispatch precompiled render jobs....
This commit is contained in:
parent
d73b316ead
commit
685b5beba6
10 changed files with 99 additions and 13 deletions
|
|
@ -94,11 +94,15 @@ using vault::engine::JobClosure;
|
|||
};
|
||||
|
||||
|
||||
/** special »do nothing« JobTicket marker */
|
||||
const JobTicket JobTicket::NOP{}; //////////////////////////////////////////////////////////////TICKET #725 : do we actually need that for the final data structure?
|
||||
|
||||
|
||||
/** */
|
||||
Job
|
||||
JobTicket::createJobFor (FrameCoord coordinates)
|
||||
{
|
||||
REQUIRE (this->isValid(), "Attempt to generate render job for incomplete or unspecified render plan.");
|
||||
UNIMPLEMENTED ("job planning and generation");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,9 @@ using util::isnil;
|
|||
template<class IT>
|
||||
static LinkedElements<Provision> buildProvisionSpec (IT);
|
||||
|
||||
private:
|
||||
JobTicket() { } ///< @internal as NIL marker, a JobTicket can be empty
|
||||
|
||||
protected:
|
||||
template<class IT>
|
||||
JobTicket(IT featureSpec_perChannel)
|
||||
|
|
@ -132,6 +135,7 @@ using util::isnil;
|
|||
class ExplorationState;
|
||||
friend class ExplorationState;
|
||||
|
||||
static const JobTicket NOP;
|
||||
|
||||
|
||||
|
||||
|
|
@ -312,9 +316,10 @@ using util::isnil;
|
|||
inline JobTicket::ExplorationState
|
||||
JobTicket::discoverPrerequisites (uint channelNr) const
|
||||
{
|
||||
REQUIRE (channelNr < provision_.size());
|
||||
REQUIRE (channelNr < provision_.size() or not isValid());
|
||||
|
||||
return ExplorationState (provision_[channelNr].requirements);
|
||||
return isnil (provision_)? ExplorationState()
|
||||
: ExplorationState (provision_[channelNr].requirements);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,13 +36,6 @@ namespace fixture {
|
|||
|
||||
|
||||
|
||||
list<ExplicitPlacement> &
|
||||
Fixture::getPlaylistForRender ()
|
||||
{
|
||||
UNIMPLEMENTED ("get Playlist For Render");
|
||||
}
|
||||
|
||||
|
||||
/** TODO: a placeholder for the Operation needed for
|
||||
* wiring the Automation providers in the Build process
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ namespace fixture {
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #573 who creates the fixture?
|
||||
|
||||
public:
|
||||
list<ExplicitPlacement> & getPlaylistForRender () ;
|
||||
Auto<double>* getAutomation () ; ///< @todo: just a placeholder at the moment!!!
|
||||
|
||||
bool isValid() const;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "steam/common.hpp"
|
||||
#include "steam/mobject/explicitplacement.hpp"
|
||||
#include "steam/engine/job-ticket.hpp"
|
||||
#include "lib/time/timevalue.hpp"
|
||||
|
||||
using std::list;
|
||||
|
|
@ -44,6 +45,7 @@ namespace fixture {
|
|||
|
||||
using mobject::ExplicitPlacement;
|
||||
using lib::time::TimeSpan;
|
||||
using lib::time::Time;
|
||||
|
||||
/**
|
||||
* For the purpose of building and rendering, the fixture (for each timeline)
|
||||
|
|
@ -63,6 +65,9 @@ namespace fixture {
|
|||
/** begin of this timeline segment. */
|
||||
TimeSpan span_;
|
||||
|
||||
/** render plan / blueprint to use for this segment */
|
||||
const engine::JobTicket* jobTicket_;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #725 : placeholder code
|
||||
/** relevant MObjects comprising this segment. */
|
||||
list<ExplicitPlacement> elements;
|
||||
|
|
@ -72,9 +77,20 @@ namespace fixture {
|
|||
public:
|
||||
Segment (TimeSpan covered =TimeSpan::ALL)
|
||||
: span_{covered}
|
||||
, jobTicket_{&engine::JobTicket::NOP}
|
||||
{ }
|
||||
|
||||
// default copy acceptable
|
||||
|
||||
Time start() const { return span_.start(); }
|
||||
Time end() const { return span_.end(); }
|
||||
|
||||
engine::JobTicket const&
|
||||
jobTicket() const
|
||||
{
|
||||
REQUIRE (jobTicket_);
|
||||
return *jobTicket_;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,16 +48,21 @@
|
|||
|
||||
|
||||
#include "steam/fixture/segment.hpp"
|
||||
#include "lib/time/timevalue.hpp"
|
||||
#include "lib/format-string.hpp"
|
||||
#include "lib/nocopy.hpp"
|
||||
|
||||
#include <list>
|
||||
|
||||
using std::list;
|
||||
|
||||
|
||||
namespace steam {
|
||||
namespace fixture {
|
||||
|
||||
namespace error = lumiera::error;
|
||||
|
||||
using std::list;
|
||||
using lib::time::TimeValue;
|
||||
using util::_Fmt;
|
||||
|
||||
/**
|
||||
* For the purpose of building and rendering, the fixture (for each timeline)
|
||||
|
|
@ -95,6 +100,14 @@ namespace fixture {
|
|||
return segments_.size();
|
||||
}
|
||||
|
||||
Segment const&
|
||||
operator[] (TimeValue time) const
|
||||
{
|
||||
for (auto& seg : segments_)
|
||||
if (seg.end() > time)
|
||||
return seg;
|
||||
throw error::State (_Fmt{"Fixture datastructure corrupted: Time %s not covered"} % time);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ namespace test {
|
|||
using DummyPlaybackSetup = play::test::DummyPlayConnection<PlayTestFrames_Strategy>;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1274 replace by MockDispatcher !!!!
|
||||
class MockDispatcherTable
|
||||
: public Dispatcher
|
||||
{
|
||||
|
|
@ -112,6 +113,7 @@ namespace test {
|
|||
};
|
||||
|
||||
lib::Depend<MockDispatcherTable> mockDispatcher;
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1274 replace by MockDispatcher !!!!
|
||||
|
||||
#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880
|
||||
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #890
|
||||
|
|
|
|||
|
|
@ -182,7 +182,8 @@ namespace test {
|
|||
|
||||
public:
|
||||
MockSegmentation()
|
||||
: tickets_{}
|
||||
: Segmentation{}
|
||||
, tickets_{}
|
||||
{ }
|
||||
|
||||
MockSegmentation (std::initializer_list<GenNode> specs)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "lib/error.hpp"
|
||||
#include "steam/engine/mock-dispatcher.hpp"
|
||||
#include "vault/engine/dummy-job.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
#include "lib/format-cout.hpp"///////////////////////TODO
|
||||
|
||||
|
|
@ -126,6 +127,9 @@ namespace test {
|
|||
{
|
||||
MockSegmentation mockSeg;
|
||||
CHECK (1 == mockSeg.size());
|
||||
Time arbitraryTime = lib::test::randTime();
|
||||
JobTicket const& ticket = mockSeg[arbitraryTime].jobTicket();
|
||||
CHECK (util::isSameObject (ticket, JobTicket::NOP));
|
||||
TODO ("cover details of MockSegmentation");
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -69867,6 +69867,9 @@
|
|||
<node CREATED="1682614092900" ID="ID_1252815318" MODIFIED="1682614105470" TEXT="Basis-Impl: ein Segment gibt es immer"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1682614117409" ID="ID_1176991982" MODIFIED="1682614138327" TEXT="splitSplice() implementieren">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1682627110771" ID="ID_183754275" MODIFIED="1682627133820" TEXT="Invariante: lückenlose Abdeckung">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1682385895644" ID="ID_89969390" MODIFIED="1682385902557" TEXT="Verifikation im Test unterstützen">
|
||||
|
|
@ -69923,6 +69926,12 @@
|
|||
<node CREATED="1682034751416" ID="ID_1279546753" MODIFIED="1682034762907" TEXT="da liegen nur Iterator (Value-Objekte) drauf"/>
|
||||
</node>
|
||||
<node CREATED="1681839799283" ID="ID_830915873" MODIFIED="1681839807269" TEXT="selbst einfachste Tests brauchen...">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1682622337048" ID="ID_1026907820" MODIFIED="1682622340207" TEXT="Storage">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1682622347831" ID="ID_1252057037" MODIFIED="1682622360738" TEXT="für Tests: im MockSegment unterbringen">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1681839808074" ID="ID_389152221" MODIFIED="1681839820464" TEXT="Einstiegspunkt">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1681839824481" ID="ID_1782808621" LINK="#ID_1656777068" MODIFIED="1681839924803" TEXT="HA! startExploration könnte überflüssig sein">
|
||||
|
|
@ -70220,6 +70229,34 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1682622153437" ID="ID_524720976" MODIFIED="1682622219250" TEXT="zu klären...">
|
||||
<icon BUILTIN="help"/>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1682622220974" ID="ID_136220191" MODIFIED="1682622223749" TEXT="NIL-Ticket?">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1682626547198" ID="ID_1401129193" MODIFIED="1682626582171" TEXT=" macht ein const JobTicket Sinn?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1682626583859" ID="ID_959446855" MODIFIED="1682626669241" TEXT="zunächst nur aus Gründen der Interface-Logik eingeführt">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
weil Segment inhärent ein mutabler Typ ist (ich denke an das Umbauen und Modifizieren), gibt der reine Access nur ein Segment const& raus
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node CREATED="1682626596442" ID="ID_627099643" MODIFIED="1682626614602" TEXT="würde darauf hinauslaufen, daß man auf einem const JobTicket keine Planung machen kann"/>
|
||||
<node CREATED="1682626675632" ID="ID_1360253646" MODIFIED="1682626692994" TEXT="Alternative: komplett eine Builder-Notation für die Segmentation">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1682622228183" ID="ID_1660287725" MODIFIED="1682622235360" TEXT="Redundanz in der Storage?">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1681167767260" ID="ID_247185233" MODIFIED="1681167820893" TEXT="JobTicket::ExplorationState">
|
||||
<linktarget COLOR="#5c74b4" DESTINATION="ID_247185233" ENDARROW="Default" ENDINCLINATION="28;-86;" ID="Arrow_ID_1572923842" SOURCE="ID_1056088464" STARTARROW="None" STARTINCLINATION="-77;9;"/>
|
||||
</node>
|
||||
|
|
@ -70307,6 +70344,18 @@
|
|||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1681742018442" ID="ID_596503548" MODIFIED="1681742022940" TEXT="Addressierung JobTicket">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1682626961915" ID="ID_1266598906" MODIFIED="1682626982746" TEXT="direkter Zugriff auf das Segment nach Zeit-Partitionierung">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1682626986572" ID="ID_785390936" MODIFIED="1682627018574" TEXT="hierzu stets komplett erschöpfende Partitionierung notwendig">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1682627019680" ID="ID_1706448688" MODIFIED="1682627042580" TEXT="Segmentation mit TimeSpan::ALL initialisiert">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1682627043510" ID="ID_1053406793" LINK="#ID_1176991982" MODIFIED="1682627105439" TEXT="Implementierung von splitSplice() muß Konsistenz sicherstellen">
|
||||
<icon BUILTIN="bell"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1682611423253" ID="ID_1136070257" MODIFIED="1682611949376" TEXT="Vorschau: Datenstruktur">
|
||||
<linktarget COLOR="#735061" DESTINATION="ID_1136070257" ENDARROW="Default" ENDINCLINATION="-651;-968;" ID="Arrow_ID_1804652676" SOURCE="ID_296140708" STARTARROW="None" STARTINCLINATION="-518;37;"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue