From 288b737718ef255aabacf7efaed8294d9d0ff92b Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 27 Jan 2012 00:14:21 +0100 Subject: [PATCH] dummy playback: stub the required operations --- src/proc/mobject/output-mapping.hpp | 16 +++--- src/proc/play/dummy-play-connection.hpp | 57 +++++++++++++++++++ src/proc/play/play-service.cpp | 8 +++ .../proc/play/dummy-play-connection-test.cpp | 9 +-- 4 files changed, 79 insertions(+), 11 deletions(-) diff --git a/src/proc/mobject/output-mapping.hpp b/src/proc/mobject/output-mapping.hpp index 7d40ffdc3..807ab5f50 100644 --- a/src/proc/mobject/output-mapping.hpp +++ b/src/proc/mobject/output-mapping.hpp @@ -26,9 +26,9 @@ ** OutputMapping is a complement to the OutputDesignation handles ** used at various places in the high-level model. It is used when ** translating a given output spec into another connection target - ** - when connecting an model port to a concrete external output + ** - when connecting a model port to a concrete external output ** - when connecting a timeline to a viewer element - ** - for implementing the viewer input selection "switchbord" + ** - for implementing the viewer input selection "switchboard" ** - for translating output designation of virtual clips ** OutputMapping is to be used as value object, holding concrete ** connections and wiring. For each of the mentioned usage situations, @@ -38,7 +38,7 @@ ** This definition context is actually instantiated (as base class). ** The mapping table actually just stores an association of hash ** values, which typically are interpreted as asset::ID. - ** But the actual mapping result is retrieved on each acces + ** But the actual mapping result is retrieved on each access ** by invoking a functor on the stored hash value, ** thus the final resolution is done \em late. ** @@ -104,10 +104,12 @@ namespace mobject { /** * OutputMapping is a facility to resolve output designations. - * For a given specification, resolution to the desired - * target specification may be derived. Here, the - * type of the target specification is defined - * through the type parameter. + * The session/model uses preliminary or partial output specifications, + * which are to be resolved to an actual system output while building + * and preparing a render network for operation (playback/rendering). + * For a given specification, resolution to the desired target spec + * may be derived by querying the OutputMapping. Here, the kind of + * the target specification is defined through the type parameter. * * \par definition of specific mapping behaviour * diff --git a/src/proc/play/dummy-play-connection.hpp b/src/proc/play/dummy-play-connection.hpp index 0f002cb1b..5f42cf473 100644 --- a/src/proc/play/dummy-play-connection.hpp +++ b/src/proc/play/dummy-play-connection.hpp @@ -36,6 +36,10 @@ //#include "include/display-facade.h" //#include "common/instancehandle.hpp" //#include "lib/singleton-ref.hpp" +#include "proc/play/output-manager.hpp" +#include "proc/mobject/model-port.hpp" +#include "lib/time/timequant.hpp" +#include "lib/iter-source.hpp" // #include //#include @@ -49,15 +53,68 @@ namespace play { // using lumiera::Subsys; // using lumiera::Display; // using lumiera::DummyPlayer; + using lib::time::Duration; + typedef lib::IterSource::iterator ModelPorts; + + + struct PlayTestFrames_Strategy + { + + }; /******************************************************************** */ + template class DummyPlayConnection : boost::noncopyable { + public: + + ModelPorts + provide_testModelPorts() + { + UNIMPLEMENTED ("provide a set of test model ports"); + } + + POutputManager + provide_testOutputSlot() + { + UNIMPLEMENTED ("provide a suitable output sink simulation"); + } + + + /* === Test Support API === */ + + bool + isWired() + { + UNIMPLEMENTED ("is this dummy in activated state?"); + } + + Duration + getPlannedTestDuration() + { + UNIMPLEMENTED ("manage the a planned test duration"); + } + + /** test helper: blocking wait during an output test. + * The waiting time should be in accordance with the + * \link #getPlannedTestduration planned value \endlink, + */ + void + waitUntilDue() + { + UNIMPLEMENTED ("do a blocking wait, while an output test is performed in other threads"); + } + + bool + gotCorrectOutput() + { + UNIMPLEMENTED ("verify proper operation by inspecting the provided test dummy components"); + } }; diff --git a/src/proc/play/play-service.cpp b/src/proc/play/play-service.cpp index 0674fd934..6a32ed2c5 100644 --- a/src/proc/play/play-service.cpp +++ b/src/proc/play/play-service.cpp @@ -44,6 +44,14 @@ namespace lumiera { Play::~Play() { } // emit VTables here... + /** Storage for the lumiera::Play facade access point + * @note PlayService uses a InterfaceFacadeLink member + * for actually establishing the PlayService instance + * as implementation of lumiera::Play + */ + facade::Accessor Play::facade; + + }//(End) namespace lumiera diff --git a/tests/components/proc/play/dummy-play-connection-test.cpp b/tests/components/proc/play/dummy-play-connection-test.cpp index fc810d783..21d22625b 100644 --- a/tests/components/proc/play/dummy-play-connection-test.cpp +++ b/tests/components/proc/play/dummy-play-connection-test.cpp @@ -46,6 +46,8 @@ namespace test { typedef time::Control DurationControl; + typedef DummyPlayConnection DummyPlayer; + /******************************************************************* * @test verify the OutputSlot interface and base implementation @@ -66,11 +68,11 @@ namespace test { void verify_simulatedPlayback() { - DummyPlayConnection dummy; //////////TODO: how to pre-configure the DummyPlayConnection -#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #805 + DummyPlayer dummy; CHECK (!dummy.isWired()); - Controller ctrl = Play::facade().connect(dummy.port(), dummy.output()); + Controller ctrl = Play::facade().connect ( dummy.provide_testModelPorts() + , dummy.provide_testOutputSlot()); CHECK ( dummy.isWired()); DurationControl playDuration; @@ -92,7 +94,6 @@ namespace test { ctrl.close(); CHECK (!dummy.isWired()); CHECK (dummy.gotCorrectOutput()); -#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #805 } };