From 3ef03bc3c021af8d2c73a506f8b4237cb9320bbf Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Wed, 5 Nov 2008 05:03:03 +0100 Subject: [PATCH] WIP adjust fixture, segments and segmentation --- src/proc/Makefile.am | 4 +- src/proc/mobject/builder/segmentationtool.hpp | 9 ++- src/proc/mobject/session/fixture.cpp | 8 +-- src/proc/mobject/session/fixture.hpp | 9 ++- src/proc/mobject/session/segment.cpp | 13 +--- src/proc/mobject/session/segment.hpp | 20 +++---- src/proc/mobject/session/segmentation.cpp | 36 +++++++++++ src/proc/mobject/session/segmentation.hpp | 60 +++++++++++++++++++ 8 files changed, 124 insertions(+), 35 deletions(-) create mode 100644 src/proc/mobject/session/segmentation.cpp create mode 100644 src/proc/mobject/session/segmentation.hpp diff --git a/src/proc/Makefile.am b/src/proc/Makefile.am index 4d564794b..2882546c2 100644 --- a/src/proc/Makefile.am +++ b/src/proc/Makefile.am @@ -71,9 +71,9 @@ liblumiprocengine_la_SOURCES = \ $(liblumiprocengine_la_srcdir)/nodefactory.cpp \ $(liblumiprocengine_la_srcdir)/nodewiring.cpp \ $(liblumiprocengine_la_srcdir)/pluginadapter.cpp \ - $(liblumiprocengine_la_srcdir)/rendergraph.cpp \ $(liblumiprocengine_la_srcdir)/procnode.cpp \ $(liblumiprocengine_la_srcdir)/projector.cpp \ + $(liblumiprocengine_la_srcdir)/rendergraph.cpp \ $(liblumiprocengine_la_srcdir)/renderengine.cpp \ $(liblumiprocengine_la_srcdir)/source.cpp \ $(liblumiprocengine_la_srcdir)/stateproxy.cpp \ @@ -161,6 +161,7 @@ liblumiprocmobjectsession_la_SOURCES = \ $(liblumiprocmobjectsession_la_srcdir)/meta.cpp \ $(liblumiprocmobjectsession_la_srcdir)/relativelocation.cpp \ $(liblumiprocmobjectsession_la_srcdir)/segment.cpp \ + $(liblumiprocmobjectsession_la_srcdir)/segmentation.cpp \ $(liblumiprocmobjectsession_la_srcdir)/simpleclip.cpp \ $(liblumiprocmobjectsession_la_srcdir)/plug.cpp \ $(liblumiprocmobjectsession_la_srcdir)/session-impl.cpp \ @@ -229,6 +230,7 @@ noinst_HEADERS += \ $(liblumiproc_la_srcdir)/mobject/session/simpleclip.hpp \ $(liblumiproc_la_srcdir)/mobject/session/mobjectfactory.hpp \ $(liblumiproc_la_srcdir)/mobject/session/segment.hpp \ + $(liblumiproc_la_srcdir)/mobject/session/segmentation.hpp \ $(liblumiproc_la_srcdir)/mobject/session/track.hpp \ $(liblumiproc_la_srcdir)/mobject/session/wish.hpp \ $(liblumiproc_la_srcdir)/mobject/session/clip.hpp \ diff --git a/src/proc/mobject/builder/segmentationtool.hpp b/src/proc/mobject/builder/segmentationtool.hpp index 906e62635..8e55518d1 100644 --- a/src/proc/mobject/builder/segmentationtool.hpp +++ b/src/proc/mobject/builder/segmentationtool.hpp @@ -27,7 +27,7 @@ #include "proc/mobject/builder/applicablebuildertargettypes.hpp" -#include "proc/mobject/session/segment.hpp" +#include "proc/mobject/session/segmentation.hpp" #include "proc/mobject/session/fixture.hpp" //////TODO really on the header?? @@ -42,7 +42,7 @@ namespace mobject { /** * Tool implementation for deriving a partitioning of the current - * timeline, such that each segement has a constant configuration. + * timeline, such that each Segment has a constant configuration. * "Constant" means here, that any remaining changes over time * can be represented by automation solely, without the need * to change the node connections. @@ -61,12 +61,11 @@ namespace mobject { //////////////////////////////////////////////////////////TODO make it respond to the util::isnil test! - protected: + private: typedef mobject::session::Segment Segment; /** Partitioning of the Timeline to be created by this tool. */ - list segments; - // TODO handle alloc!!!! + session::Segmentation& segments_; }; diff --git a/src/proc/mobject/session/fixture.cpp b/src/proc/mobject/session/fixture.cpp index 2ff3b1612..d4c40162d 100644 --- a/src/proc/mobject/session/fixture.cpp +++ b/src/proc/mobject/session/fixture.cpp @@ -24,14 +24,12 @@ #include "proc/mobject/session/fixture.hpp" #include "include/logging.h" -namespace mobject - { - namespace session - { +namespace mobject { + namespace session { - list & + list & Fixture::getPlaylistForRender () { UNIMPLEMENTED ("get Playlist For Render"); diff --git a/src/proc/mobject/session/fixture.hpp b/src/proc/mobject/session/fixture.hpp index 821fa9acf..b4d98c04a 100644 --- a/src/proc/mobject/session/fixture.hpp +++ b/src/proc/mobject/session/fixture.hpp @@ -25,9 +25,10 @@ #define MOBJECT_SESSION_FIXTURE_H #include -#include +#include #include "proc/mobject/session/edl.hpp" +#include "proc/mobject/session/segmentation.hpp" #include "proc/mobject/session/track.hpp" #include "proc/mobject/explicitplacement.hpp" #include "proc/mobject/session/auto.hpp" @@ -46,11 +47,13 @@ namespace mobject { class Fixture : public EDL { protected: - list timeline; + list content_; + boost::scoped_ptr partitioning_; + /////////////TODO: who creates this? public: - list & getPlaylistForRender () ; + list & getPlaylistForRender () ; Auto* getAutomation () ; ///< @todo: just a placeholder at the moment!!! private: diff --git a/src/proc/mobject/session/segment.cpp b/src/proc/mobject/session/segment.cpp index 3c34896ab..45c593c67 100644 --- a/src/proc/mobject/session/segment.cpp +++ b/src/proc/mobject/session/segment.cpp @@ -1,5 +1,5 @@ /* - Segment - Segment of the Timeline. + Segment - Segment of the timeline for rendering. Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -23,17 +23,10 @@ #include "proc/mobject/session/segment.hpp" #include "proc/mobject/explicitplacement.hpp" -// Used at the moment (7/07) for partitioning the timeline/fixture into segments -// to be rendered by a specialized render node network for each, without the need -// to change any connections within a given segment. -// Note this concept may be superfluos alltogether; is a draft and the real -// use still needs to be worked out... -namespace mobject - { - namespace session - { +namespace mobject { + namespace session { /** */ diff --git a/src/proc/mobject/session/segment.hpp b/src/proc/mobject/session/segment.hpp index 72b25fcbc..66f03b9bc 100644 --- a/src/proc/mobject/session/segment.hpp +++ b/src/proc/mobject/session/segment.hpp @@ -1,5 +1,5 @@ /* - SEGMENT.hpp - Segment of the Timeline. + SEGMENT.hpp - Segment of the timeline for rendering. Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -33,18 +33,15 @@ using std::list; -namespace mobject - { - namespace session - { +namespace mobject { + namespace session { /** - * Used at the moment (7/07) for partitioning the timeline/fixture into segments - * to be rendered by a specialized render node network for each, without the need - * to change any connections within a given segment. - * Note this concept may be superfluos alltogether; is a draft and the real - * use still needs to be worked out... + * For the purpose of building and rendering, the fixture (for each timeline) + * is partitioned such that each segment is structurally constant. + * For each segment there is a RenderGraph (unit of the render engine) which + * is able to render all ExitNodes for this segment. */ class Segment { @@ -57,8 +54,9 @@ namespace mobject Time length; /** relevant MObjects comprising this segment. */ - list elements; + list elements; // TODO: actually necessary?? + // TODO: ownership?? }; diff --git a/src/proc/mobject/session/segmentation.cpp b/src/proc/mobject/session/segmentation.cpp new file mode 100644 index 000000000..f19b8041b --- /dev/null +++ b/src/proc/mobject/session/segmentation.cpp @@ -0,0 +1,36 @@ +/* + Segementation - Partitioning of a timeline for organising the render graph. + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +#include "proc/mobject/session/segmentation.hpp" + + + +namespace mobject { + namespace session { + + /** */ + + + + } // namespace mobject::session + +} // namespace mobject diff --git a/src/proc/mobject/session/segmentation.hpp b/src/proc/mobject/session/segmentation.hpp new file mode 100644 index 000000000..4f4096a4e --- /dev/null +++ b/src/proc/mobject/session/segmentation.hpp @@ -0,0 +1,60 @@ +/* + SEGMENTATION.hpp - Partitioning of a timeline for organising the render graph. + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +#ifndef MOBJECT_SESSION_SEGMENTATION_H +#define MOBJECT_SESSION_SEGMENTATION_H + + +#include "proc/mobject/session/segment.hpp" + +#include + +using std::list; + + +namespace mobject { + namespace session { + + + /** + * For the purpose of building and rendering, the fixture (for each timeline) + * is partitioned such that each segment is structurally constant. + * The Segmentation defines and maintains this partitioning. Further, + * it is the general entry point for accessing the correct part of the engine + * responsible for a given timeline time point. + * @see SegmentationTool actually calculating the Segmentation + */ + class Segmentation + { + + /** segments of the engine in ordered sequence. */ + list segments_; + + }; + + + + } // namespace mobject::session + +} // namespace mobject +#endif