diff --git a/doc/devel/uml/class128645.html b/doc/devel/uml/class128645.html index 88a24bf13..0281acf2a 100644 --- a/doc/devel/uml/class128645.html +++ b/doc/devel/uml/class128645.html @@ -16,11 +16,13 @@ -

Declaration :

Directly inherited by : Allocation ExplicitPlacement FixedPlacement RelativePlacement

-

Artifact : placement

+

Declaration :

Directly inherited by : Allocation ExplicitPlacement RelativePlacement

+

used to specify the position of a MObject in the EDL. This can be done in various ways (absolute, relative).
Placement at the same time acts as (refcounting) smart pointer for accessing the MObject.

Artifact : placement

Operation resolve

Declaration :

create an actual (explicit) placement while trying to satisfy the network of adjacent objects and placements.

-
Relation subject (<unidirectional association>)

Declaration :

Placement acts as smart pointer

-

All public operations : resolve

+
Relation subject (<unidirectional association>)

Declaration :

Placement acts as smart pointer

+
Operation chain

Declaration :

create and add another Placement for this media object, thus increasingly constraining the (possible) position of this object.

+
Relation chain (<unidirectional association>)

Declaration :

Chain of additional Placements further constraining the position of this MObject

+

All public operations : chain , resolve

diff --git a/doc/devel/uml/class129285.html b/doc/devel/uml/class129285.html index 0091fcd2d..ab298c57b 100644 --- a/doc/devel/uml/class129285.html +++ b/doc/devel/uml/class129285.html @@ -16,8 +16,8 @@ -

Declaration :

Artifact : fixedplacement

+

Declaration :

Artifact : fixedplacement

-

All public operations : resolve

+

All public operations : chain , resolve

diff --git a/doc/devel/uml/class129413.html b/doc/devel/uml/class129413.html index eb05d79ba..8dd65f6f6 100644 --- a/doc/devel/uml/class129413.html +++ b/doc/devel/uml/class129413.html @@ -24,6 +24,6 @@
Attribut offset

Declaration :

Offset the actual position by this (time) value relative to the anchor point. TODO: Representation?

Class RelType
-

All public operations : resolve

+

All public operations : chain , resolve

diff --git a/doc/devel/uml/class129541.html b/doc/devel/uml/class129541.html index 43f614b48..98c845e4d 100644 --- a/doc/devel/uml/class129541.html +++ b/doc/devel/uml/class129541.html @@ -22,6 +22,6 @@
Attribut repr

Declaration :

human readable representation of the condition characterizing this allocaton, e.g. "t >= 10"

Operation get_repr

Declaration :

-

All public operations : get_repr , resolve

+

All public operations : chain , get_repr , resolve

diff --git a/doc/devel/uml/class129797.html b/doc/devel/uml/class129797.html index a68f76325..ed207461b 100644 --- a/doc/devel/uml/class129797.html +++ b/doc/devel/uml/class129797.html @@ -24,6 +24,6 @@
Attribut track

Declaration :

Relation <unidirectional association>

Declaration :

-

All public operations : resolve

+

All public operations : chain , resolve

diff --git a/doc/devel/uml/class130053.html b/doc/devel/uml/class130053.html index f88d2a19b..a754c6888 100644 --- a/doc/devel/uml/class130053.html +++ b/doc/devel/uml/class130053.html @@ -18,6 +18,6 @@

Declaration :

-

All public operations : get_repr , resolve

+

All public operations : chain , get_repr , resolve

diff --git a/doc/devel/uml/class130181.html b/doc/devel/uml/class130181.html index c1578a450..3ddc9b19f 100644 --- a/doc/devel/uml/class130181.html +++ b/doc/devel/uml/class130181.html @@ -18,6 +18,6 @@

Declaration :

-

All public operations : get_repr , resolve

+

All public operations : chain , get_repr , resolve

diff --git a/doc/devel/uml/class139909.html b/doc/devel/uml/class139909.html new file mode 100644 index 000000000..c1cacb0df --- /dev/null +++ b/doc/devel/uml/class139909.html @@ -0,0 +1,23 @@ + + + + + + +Class ChainPlacement + + + + + +
Class ChainPlacement
+

+ + + + +

Declaration :

Artifact : chainplacement

+ +
Relation next (<unidirectional association>)

Declaration :

next additional Placement, if any

+ + diff --git a/doc/devel/uml/classes.html b/doc/devel/uml/classes.html index 39a63ddb4..836be1c5b 100644 --- a/doc/devel/uml/classes.html +++ b/doc/devel/uml/classes.html @@ -29,6 +29,7 @@ BuilderFacadeboundaryProvides unified access to the builder functionality. While individual components of the builder subsystem may be called if necessary or suitable, it is usually better to do all extern invocations via the high level methods of this Facade BuildInstruct(Interface) building instructions to be executed by the Builder on the render node network under construction. Categorytree like classification of Assets +ChainPlacement Clipbookkeeping (asset) view of a media clip. Clip Codecdescription of some media data decoder or encoder facility @@ -89,7 +90,7 @@ ParameterDescriptor and access object for a plugin parameter. Parameters may be provided with values from the session, and this values may be automated. ParamProviderinterfaceA facility to get the actual value of a plugin/effect parameter PathManagerWhile building a render engine, this Strategy class decides on the actual render strategy in accordance to the current controller settings (system state) -Placementinterface +Placementinterfaceused to specify the position of a MObject in the EDL. This can be done in various ways (absolute, relative).
Placement at the same time acts as (refcounting) smart pointer for accessing the MObject. PluginAdapterAdapter used to integrage an effects processor in the render pipeline Prefetch Previewalternative version of the media data, probably with lower resolution diff --git a/doc/devel/uml/classes_list.html b/doc/devel/uml/classes_list.html index 44865f171..7dc49d02d 100644 --- a/doc/devel/uml/classes_list.html +++ b/doc/devel/uml/classes_list.html @@ -30,6 +30,7 @@ BuilderFacade
BuildInstruct
Category
+ChainPlacement
Clip
Clip
Codec
diff --git a/doc/devel/uml/fig128133.png b/doc/devel/uml/fig128133.png index 7a51ef88d..f2238751a 100644 Binary files a/doc/devel/uml/fig128133.png and b/doc/devel/uml/fig128133.png differ diff --git a/doc/devel/uml/index.html b/doc/devel/uml/index.html index dc0e8f165..e976b2222 100644 --- a/doc/devel/uml/index.html +++ b/doc/devel/uml/index.html @@ -112,7 +112,7 @@ Documentation
Artifact Cinelerra3

Depends on common

Depends on gui

Depends on proc

Depends on backend

the main executable to be built

-

executable associated with : main, conmanager, clip, meta, fixedplacement, relativeplacement, vrender, mobject, source, frame, placement, sessionimpl, builderfacade, controllerfacade, processor, pluginadapter, effect, tool, segmentationtool, aframe, assembler, trafo, explicitplacement, auto, glrender, link, parameter, renderengine, allocation, vframe, toolfactory, arender, renderstate, label, glbuf, procnode, stateproxy, hub, buildable, abstractmo, nodecreatertool, projector, interpolator, edl, fixture, glpipe, exitnode, pathmanager, track, paramprovider, mask

+

executable associated with : paramprovider, mask, main, conmanager, clip, meta, fixedplacement, relativeplacement, vrender, mobject, source, frame, placement, sessionimpl, builderfacade, controllerfacade, processor, pluginadapter, effect, tool, segmentationtool, aframe, assembler, trafo, explicitplacement, auto, glrender, link, parameter, renderengine, allocation, vframe, toolfactory, arender, renderstate, label, glbuf, procnode, stateproxy, hub, buildable, abstractmo, nodecreatertool, projector, interpolator, edl, fixture, glpipe, exitnode, pathmanager, track

Artifact main

Artifact source

@@ -378,6 +378,10 @@ Documentation
Artifact meta

abstract base class of all MObjects representing meta data or processing instructions

Artifact source associated with : Meta

+ +
Artifact chainplacement
+

Chaining and additionally constraining Placements

+

Artifact source associated with : ChainPlacement

Artifact fixedplacement

Artifact source associated with : FixedPlacement

@@ -642,6 +646,7 @@ Documentation
Class Parameter
+

2.2.2 Package Builder

diff --git a/doc/devel/uml/index_66.html b/doc/devel/uml/index_66.html index 5ed3d76c4..70cc864a7 100644 --- a/doc/devel/uml/index_66.html +++ b/doc/devel/uml/index_66.html @@ -34,8 +34,8 @@ buildableartifactmarker interface denoting any MObject able to be treated by Tools buildEngineoperationMain Operation of the Builder: create a render engine for a given part of the timeline Buildercomponent -builderpackagesourcecode package

The Builder creating the Render Engine,
located within the MObject Subsystem Builderpackage +builderpackagesourcecode package

The Builder creating the Render Engine,
located within the MObject Subsystem Builder Entitiesclass diagram Builder Workingsclass view BuilderFacadeclassProvides unified access to the builder functionality. While individual components of the builder subsystem may be called if necessary or suitable, it is usually better to do all extern invocations via the high level methods of this Facade diff --git a/doc/devel/uml/index_67.html b/doc/devel/uml/index_67.html index dc1b39579..2f29cffbf 100644 --- a/doc/devel/uml/index_67.html +++ b/doc/devel/uml/index_67.html @@ -23,32 +23,36 @@ Categoryclasstree like classification of Assets categoryartifacttree like classification of Assets causeattributea copy of the first exception encountered in this exception chain +chainrelationChain of additional Placements further constraining the position of this MObject +chainoperationcreate and add another Placement for this media object, thus increasingly constraining the (possible) position of this object. +chainplacementartifactChaining and additionally constraining Placements +ChainPlacementclass checked_inrelationchecked_in objects are subject of cache aging and must be not in use checked_outrelationthis list keeps all mappings which are in use, and thus prevents them from Cache aging Cinelerra3artifactthe main executable to be built cinelerra3package -class instanceclass instance -class instanceclass instance -class instanceclass instance -class instanceclass instance -class instanceclass instance -class instanceclass instance -class instanceclass instance -class instanceclass instance -class instanceclass instance class instanceclass instance class instanceclass instance class instanceclass instance class instanceclass instance -class instanceclass instance class instanceclass instance -class instanceclass instance class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance +class instanceclass instance class instanceclass instance +class instanceclass instance clearoperationclear current session contents
without resetting overall session config.
Afterwards, the session will contain only one
empty EDL, while all Assets are retained.
Clipclassbookkeeping (asset) view of a media clip. -clipartifacta Media Clip clipartifactbookkeeping (asset) view of a media clip. +clipartifacta Media Clip Clipclass clipsrelation Codecclassdescription of some media data decoder or encoder facility diff --git a/doc/devel/uml/index_69.html b/doc/devel/uml/index_69.html index 0c7bddcba..20380e20a 100644 --- a/doc/devel/uml/index_69.html +++ b/doc/devel/uml/index_69.html @@ -18,14 +18,14 @@ - + - + diff --git a/doc/devel/uml/index_72.html b/doc/devel/uml/index_72.html index 58b669cd2..a26e1439f 100644 --- a/doc/devel/uml/index_72.html +++ b/doc/devel/uml/index_72.html @@ -24,8 +24,8 @@ - +
NameKindDescription
edlartifactthe (high level) Edit Decision List within the current Session
EDLclass
EDLcomponent
EDLclass
EDL Example1object diagramA simple example showing how the actual objects are placed in the Fixture (=definitive playlist). It shows a Video and Audio clip placed on two tracks
EDL Example2object diagramMore complex example showing the Object graph in the EDL and how it is linked into the Fixture to yield the actual locations. In this example, an HUE Effect is applied on a part of the Clip
edlsrelation
EffectclassEffect or media processing component
effectartifactEffect or media processing component
effectartifactEDL representation of a pluggable and automatable effect.
effectartifactEffect or media processing component
Effectclass
elementsrelationrelevant MObjects comprising this segment. TODO: actually necessary??
enableoperationchange the enabled status of this asset. Note the corresponding #isActive predicate may depend on the enablement status of parent assets as well
howtoProcoperation@return descriptor how to build a render pipeline corresponding to this media
Hubclass
hubartifactspecial ProcNode used to build data distributing connections
HUEclass instance
HUEclass instance
HUEclass instance
diff --git a/doc/devel/uml/index_73.html b/doc/devel/uml/index_73.html index 0f82f3fd9..496421c53 100644 --- a/doc/devel/uml/index_73.html +++ b/doc/devel/uml/index_73.html @@ -20,8 +20,8 @@ idattributeAsset primary key. In Memory Databaseclass diagram inFixtureactivity action pin -inputclass instance inputclass instance +inputclass instance inputclass instance instanceoperation instructionsrelation diff --git a/doc/devel/uml/index_78.html b/doc/devel/uml/index_78.html index d4d5daa81..7a0c5e875 100644 --- a/doc/devel/uml/index_78.html +++ b/doc/devel/uml/index_78.html @@ -18,6 +18,7 @@ + diff --git a/doc/devel/uml/index_79.html b/doc/devel/uml/index_79.html index 863a630ae..b34c12000 100644 --- a/doc/devel/uml/index_79.html +++ b/doc/devel/uml/index_79.html @@ -19,9 +19,9 @@ + - diff --git a/doc/devel/uml/index_80.html b/doc/devel/uml/index_80.html index 20ee4971b..2e0da44b5 100644 --- a/doc/devel/uml/index_80.html +++ b/doc/devel/uml/index_80.html @@ -26,7 +26,7 @@ - + diff --git a/doc/devel/uml/index_84.html b/doc/devel/uml/index_84.html index 98fe8201c..1739030f8 100644 --- a/doc/devel/uml/index_84.html +++ b/doc/devel/uml/index_84.html @@ -40,13 +40,13 @@ - - + +
NameKindDescription
nameattributeelement ID, comprehensible but sanitized. The tuple (category, name, org) is unique.
nextrelationnext additional Placement, if any
nodecreatertoolartifactcentral Tool implementing the Renderengine building
NodeCreatorToolclassThis Tool implementation plays the central role in the buld process: given a MObject from Session, it is able to attach ProcNodes to the render engine under construction such as to reflect the properties of the MObject in the actual render.
nodesrelation
NameKindDescription
offsetattributeOffset the actual position by this (time) value relative to the anchor point. TODO: Representation?
orgattributeorigin or authorship id. Can be a project abbreviation, a package id or just the authors nickname or UID. This allows for the compnent name to be more generic (e.g. "blur"). Default for all assets provided by the core cinelerra-3 codebase is "cin3".
ouputclass instance
ouputclass instance
ouputclass instance
ouputclass instance
OutPortclassstructural asset corresponding to some port generating media output
outportartifactstructural asset corresponding to some port generating media output
outputrelation
PathManagerclassWhile building a render engine, this Strategy class decides on the actual render strategy in accordance to the current controller settings (system state)
pathmanagerartifactManager for deciding the actual render strategy
placementartifactKey Abstraction: a way to place and locate a Media Object
Placementclass
Placementclassused to specify the position of a MObject in the EDL. This can be done in various ways (absolute, relative).
Placement at the same time acts as (refcounting) smart pointer for accessing the MObject.
playoperationTODO: will probably be handled differently (see Cehteh)
playlistnode
plugIDattributeIdentifier of the Plugin to be used
tracksrelation
Trafoclass
trafoartifacttransforming processing Node
treatoperation
treatoperation
treatoperation
treatoperation
treatoperation
treatoperation
treatoperation
treatoperation
treatoperation
treatoperationThis operation is to be overloaded for the specific MObject subclasses to be treated.
diff --git a/doc/devel/uml/index_86.html b/doc/devel/uml/index_86.html index 4eb1f6d88..0ae05e4c3 100644 --- a/doc/devel/uml/index_86.html +++ b/doc/devel/uml/index_86.html @@ -22,20 +22,20 @@ vframeartifacta buffer and render process holding a Video frame vid1class instance vid1class instance -vid_Aclass instance -vid_Aclass instance -vid_aclass instance -vid_aclass instance vid_Aclass instance +vid_Aclass instance +vid_aclass instance +vid_Aclass instance +vid_aclass instance videoclass instance -videoclass instance videoclass instance +videoclass instance videoclass instance video1class instance -video1class instance -video1class instance video1class instance +video1class instance video1class instance +video1class instance video1class instance VRenderclassRepresentation of a Video render process. (Encapsulates the video buffers for the actual calculations) vrenderartifactRepresentation of a Video render process diff --git a/doc/devel/uml/public_operations.html b/doc/devel/uml/public_operations.html index 3143920e2..745c339b7 100644 --- a/doc/devel/uml/public_operations.html +++ b/doc/devel/uml/public_operations.html @@ -21,6 +21,7 @@ buildAssembler buildEngineBuilderFacadeMain Operation of the Builder: create a render engine for a given part of the timeline buildProcessorPathManager +chainPlacementcreate and add another Placement for this media object, thus increasingly constraining the (possible) position of this object. clearSessManagerclear current session contents
without resetting overall session config.
Afterwards, the session will contain only one
empty EDL, while all Assets are retained.
configureToolFactory createClipMediacreate a (possibly compound) Clip refering to this media, ready to be added to the EDL. diff --git a/src/proc/mobject/placement.hpp b/src/proc/mobject/placement.hpp index df67d54f4..c1e7fc022 100644 --- a/src/proc/mobject/placement.hpp +++ b/src/proc/mobject/placement.hpp @@ -27,6 +27,7 @@ #include "common/time.hpp" #include "common/factory.hpp" #include "proc/mobject/mobject.hpp" +#include "proc/mobject/session/chainplacement.hpp" #include "proc/mobject/session/track.hpp" @@ -34,12 +35,11 @@ namespace mobject { - class Placement; class ExplicitPlacement; - class PlacementFactory; - class Placement + template /////TODO: unsolved design problem here! + class Placement : public shared_ptr { protected: typedef cinelerra::Time Time; @@ -47,18 +47,7 @@ namespace mobject public: - MObject* subject; - - /** - * styles of placement. - */ - enum Style - { - FIXED, - RELATIVE - }; - - static PlacementFactory create; + ChainPlacement chain; /** resolve the network of placement and * provide the resulting (explicit) placement. @@ -67,28 +56,11 @@ namespace mobject protected: Placement (); - friend class PlacementFactory; }; - typedef shared_ptr PPla; - - - /** - * Factory specialized for creating Placement objects. - */ - class PlacementFactory : public cinelerra::Factory - { - public: - typedef shared_ptr PType; - typedef cinelerra::Time Time; - - PType operator() (Placement::Style, Time, PMO subject); - - }; - } // namespace mobject diff --git a/src/proc/mobject/session/chainplacement.cpp b/src/proc/mobject/session/chainplacement.cpp new file mode 100644 index 000000000..3c5393ddd --- /dev/null +++ b/src/proc/mobject/session/chainplacement.cpp @@ -0,0 +1,38 @@ +/* + ChainPlacement - Chaining and additionally constraining Placements + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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/chainplacement.hpp" +#include "proc/mobject/placement.hpp" + +namespace mobject + { + namespace session + { + + /** */ + + + + } // namespace mobject::session + +} // namespace mobject diff --git a/src/proc/mobject/session/chainplacement.hpp b/src/proc/mobject/session/chainplacement.hpp new file mode 100644 index 000000000..db71b8c1f --- /dev/null +++ b/src/proc/mobject/session/chainplacement.hpp @@ -0,0 +1,55 @@ +/* + CHAINPLACEMENT.hpp - Chaining and additionally constraining Placements + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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_CHAINPLACEMENT_H +#define MOBJECT_SESSION_CHAINPLACEMENT_H + + + + +namespace mobject + { + class Placement; + + namespace session + { + class FixedPlacement; + class RelativePlacement; + + + template + struct ChainPlacement + { + protected: + /** next additional Placement, if any */ + Placement * next; + public: + + FixedPlacement& operator() (Time); + + }; + + } // namespace mobject::session + +} // namespace mobject +#endif diff --git a/tests/components/proc/mobject/placementbasictest.cpp b/tests/components/proc/mobject/placementbasictest.cpp index 4fee8ba4c..75b87f269 100644 --- a/tests/components/proc/mobject/placementbasictest.cpp +++ b/tests/components/proc/mobject/placementbasictest.cpp @@ -72,7 +72,7 @@ namespace mobject // using the Placement interface // TODO: how to handle unterdetermined Placement? Throw? - FixedPlacement & fixpla = pc.addPlacement(Placement::FIXED, Time(1)); // TODO: the track?? + FixedPlacement & fixpla = pc.chain(Placement::FIXED, Time(1)); // TODO: the track?? ExplicitPlacement expla = pc.resolve(); ASSERT (expla.time == 1); ASSERT (!expla.isOverdetermined()); @@ -80,7 +80,7 @@ namespace mobject ASSERT (*fixpla == *pc); // now overconstraining with another Placement - pc.addPlacement(Placement::FIXED, Time(2)); + pc.chain(Placement::FIXED, Time(2)); expla = pc.resolve(); ASSERT (expla.time == 2); // the latest addition wins ASSERT (expla.isOverdetermined()); diff --git a/uml/cinelerra3/128133.diagram b/uml/cinelerra3/128133.diagram index a1d67d92a..a6da87c99 100644 --- a/uml/cinelerra3/128133.diagram +++ b/uml/cinelerra3/128133.diagram @@ -22,7 +22,7 @@ classcanvas 129413 class_ref 128517 // MObject end classcanvas 129669 class_ref 128645 // Placement draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 574 129 2000 + xyz 539 121 2000 end classcanvas 129925 class_ref 128389 // Track draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default @@ -46,15 +46,15 @@ classcanvas 131973 class_ref 129157 // Meta end classcanvas 132229 class_ref 129285 // FixedPlacement draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 665 373 2000 + xyz 678 374 2005 end classcanvas 132869 class_ref 129413 // RelativePlacement draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 479 276 2000 + xyz 477 342 2000 end classcanvas 134149 class_ref 129541 // Allocation draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 590 373 2000 + xyz 592 342 2000 end classcanvas 134405 class_ref 129669 // Label draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default @@ -62,7 +62,7 @@ classcanvas 134405 class_ref 129669 // Label end classcanvas 135429 class_ref 129797 // ExplicitPlacement draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 660 233 2004 + xyz 673 258 2004 end classcanvas 135813 class_ref 129797 // ExplicitPlacement draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default @@ -73,7 +73,7 @@ classcanvas 136581 class_ref 129925 // Auto xyz 375 466 2005 end note 136837 "Placement \"locates\" a Media Object" - xyzwh 368 83 3005 207 36 + xyzwh 370 73 3005 207 36 textcanvas 136965 "the Timeline is a list of placements reduced to absolute coordinates (time, track)" xyzwh 464 925 2000 121 90 textcanvas 137093 "Fixture is the actual assembly of various Media Objects ready to be performed" @@ -102,6 +102,10 @@ classcanvas 139653 class_ref 139781 // SessManager draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default xyz 101 301 2000 end +classcanvas 141317 class_ref 139909 // ChainPlacement + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 677 148 2000 + end relationcanvas 128389 relation_ref 128005 // from ref 128005 z 1999 to ref 128133 role_a_pos 201 603 3000 no_role_b @@ -152,34 +156,29 @@ relationcanvas 132101 relation_ref 129669 // from ref 131973 z 1999 to ref 130949 no_role_a no_role_b no_multiplicity_a no_multiplicity_b -relationcanvas 132485 relation_ref 129797 // - from ref 132229 z 1999 to ref 129669 - no_role_a no_role_b - no_multiplicity_a no_multiplicity_b relationcanvas 132997 relation_ref 129925 // from ref 132869 z 1999 to point 529 240 line 133893 z 1999 to ref 129413 role_a_pos 413 204 3000 no_role_b - multiplicity_a_pos 401 197 3000 multiplicity_b_pos 515 251 3000 + multiplicity_a_pos 401 197 3000 multiplicity_b_pos 515 317 3000 relationcanvas 134533 relation_ref 130309 // from ref 134405 z 1999 to ref 131973 no_role_a no_role_b no_multiplicity_a no_multiplicity_b relationcanvas 135173 relation_ref 130565 // - from ref 134149 z 1999 to point 610 312 - line 140037 z 1999 to ref 129669 + from ref 134149 z 1999 to point 576 266 + line 142853 z 1999 to ref 129669 no_role_a no_role_b no_multiplicity_a no_multiplicity_b relationcanvas 135301 relation_ref 130693 // from ref 132869 z 1999 to ref 129669 no_role_a no_role_b no_multiplicity_a no_multiplicity_b -relationcanvas 135557 relation_ref 130821 // - from ref 132229 z 1999 to ref 135429 - no_role_a no_role_b - no_multiplicity_a no_multiplicity_b relationcanvas 135685 relation_ref 130949 // - from ref 135429 z 1999 to ref 129669 + geometry VHV + from ref 135429 z 1999 to point 724 236 + line 141445 z 1999 to point 576 236 + line 141573 z 1999 to ref 129669 no_role_a no_role_b no_multiplicity_a no_multiplicity_b relationcanvas 135941 relation_ref 131077 // @@ -209,7 +208,7 @@ relationcanvas 138757 relation_ref 137093 // geometry VHr from ref 138629 z 1999 stereotype "<>" xyz 479 716 3000 to point 517 714 line 138885 z 1999 to ref 135813 - role_a_pos 524 717 3000 no_role_b + role_a_pos 529 783 3000 no_role_b multiplicity_a_pos 505 783 3000 no_multiplicity_b relationcanvas 139141 relation_ref 140805 // from ref 139013 z 1999 to ref 131461 @@ -227,6 +226,20 @@ relationcanvas 139781 relation_ref 142853 // multiplicity_a_pos 126 426 3000 no_multiplicity_b relationcanvas 140165 relation_ref 142981 // from ref 129669 z 1999 to ref 129413 - role_a_pos 413 146 3000 no_role_b - multiplicity_a_pos 403 146 3000 multiplicity_b_pos 547 148 3000 + role_a_pos 401 145 3000 no_role_b + multiplicity_a_pos 401 178 3000 multiplicity_b_pos 512 178 3000 +relationcanvas 140293 relation_ref 143109 // + from ref 132229 z 1999 to ref 135429 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 142213 relation_ref 143237 // + from ref 129669 z 1999 to ref 141317 + role_a_pos 640 145 3000 no_role_b + multiplicity_a_pos 664 171 3000 no_multiplicity_b +relationcanvas 142341 relation_ref 143365 // + from ref 141317 z 1999 to point 724 207 + line 142597 z 1999 to point 637 207 + line 142725 z 1999 to ref 129669 + role_a_pos 640 191 3000 no_role_b + no_multiplicity_a no_multiplicity_b end diff --git a/uml/cinelerra3/128261 b/uml/cinelerra3/128261 index 60051e702..de4cec32a 100644 --- a/uml/cinelerra3/128261 +++ b/uml/cinelerra3/128261 @@ -1,6 +1,6 @@ format 40 "MObject" // ProcessingLayer::MObject - revision 23 + revision 24 modified_by 5 "hiv" // class settings //class diagram settings @@ -433,6 +433,8 @@ ${members}}; " explicit_switch_type "" + comment "used to specify the position of a MObject in the EDL. This can be done in various ways (absolute, relative). +Placement at the same time acts as (refcounting) smart pointer for accessing the MObject." operation 128005 "resolve" public explicit_return_type "ExplicitPlacement [ProcessingLayer::MObject]&" nparams 0 @@ -458,6 +460,33 @@ ${class}::${name} ${(}${)}${const}${volatile} ${throw}${staticnl} classrelation_ref 144901 // subject () b multiplicity "1..*" parent class_ref 128517 // MObject end + + operation 134277 "chain" + public explicit_return_type "" + nparams 1 + param in name "style" explicit_type "" + cpp_decl " ${comment}${friend}${static}${inline}${virtual}${type} ${name} ${(}const ${t0}& ${p0}${)}${const}${volatile} ${throw}${abstract};" + cpp_def "${comment}${inline}${type} +${class}::${name} ${(}const ${t0}& ${p0}${)}${const}${volatile} ${throw}${staticnl} +{ + ${body} +} + +" + + + comment "create and add another Placement for this media object, thus increasingly constraining the (possible) position of this object." + end + + classrelation 145413 // chain () + relation 143237 ---> + a role_name "chain" multiplicity "1" protected + comment "Chain of additional Placements further constraining the position of this MObject" + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 145413 // chain () + b multiplicity "" parent class_ref 139909 // ChainPlacement + end end class 129797 "ExplicitPlacement" @@ -683,19 +712,11 @@ ${inlines} idl_decl "" explicit_switch_type "" - classrelation 130437 // - relation 129797 ---|> + classrelation 145285 // + relation 143109 ---|> a public cpp default "${type}" - classrelation_ref 130437 // - b multiplicity "" parent class_ref 128645 // Placement - end - - classrelation 131461 // - relation 130821 -_-|> - a public - cpp default "${type}" - classrelation_ref 131461 // + classrelation_ref 145285 // b multiplicity "" parent class_ref 129797 // ExplicitPlacement end end @@ -1058,6 +1079,28 @@ ${inlines} comment "Provides the implementation for getting the acutal value of a time varying or automated effect/plugin parameter" end + + class 139909 "ChainPlacement" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 145541 // next () + relation 143365 ---> + a role_name "next" multiplicity "" protected + comment "next additional Placement, if any" + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 145541 // next () + b multiplicity "" parent class_ref 128645 // Placement + end + end end package_ref 128901 // Builder diff --git a/uml/cinelerra3/129285 b/uml/cinelerra3/129285 index 724a630bd..1c121e419 100644 --- a/uml/cinelerra3/129285 +++ b/uml/cinelerra3/129285 @@ -1,6 +1,6 @@ format 40 "ProcessingLayer" // ProcessingLayer - revision 3 + revision 4 modified_by 5 "hiv" // class settings //class diagram settings @@ -26,7 +26,7 @@ format 40 package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default show_infonote default drawing_language default - package_ref 128133 // AssetManager + package_ref 128133 // Asset package_ref 128261 // MObject @@ -222,8 +222,6 @@ format 40 "100" end relations - relation_ref 128645 // - classinstance_ref 130053 // end end @@ -248,8 +246,6 @@ format 40 "\"Hue\"" end relations - relation_ref 128645 // - classinstance_ref 130309 // end end @@ -276,8 +272,6 @@ format 40 "\"Hue\"" end relations - relation_ref 128645 // - classinstance_ref 130309 // end end diff --git a/uml/cinelerra3/130437 b/uml/cinelerra3/130437 index 514cc634e..df17fa821 100644 --- a/uml/cinelerra3/130437 +++ b/uml/cinelerra3/130437 @@ -1,6 +1,6 @@ format 40 "session" // design::codegen::proc::mobject::session - revision 9 + revision 10 modified_by 5 "hiv" // class settings //class diagram settings @@ -511,6 +511,45 @@ ${namespace_end}" comment "abstract base class of all MObjects representing meta data or processing instructions" end + artifact 139013 "chainplacement" + stereotype "source" + cpp_h "/* + ${NAME}.hpp - ${description} +@{CopyrightClaim}@{GPLHeader} +*/ + + +#ifndef ${NAMESPACE}_${NAME}_H +#define ${NAMESPACE}_${NAME}_H + +${includes} +${declarations} + + +${namespace_start} + +${definition} +${namespace_end} +#endif +" + cpp_src "/* + ${Name} - ${description} +@{CopyrightClaim}@{GPLHeader} +* *****************************************************/ + + +${includes} +${namespace_start} + + +${members} +${namespace_end}" + associated_classes + class_ref 139909 // ChainPlacement + end + comment "Chaining and additionally constraining Placements" + end + artifact 129797 "fixedplacement" stereotype "source" cpp_h "/* diff --git a/uml/cinelerra3/5.session b/uml/cinelerra3/5.session index 7a80627f2..49af64898 100644 --- a/uml/cinelerra3/5.session +++ b/uml/cinelerra3/5.session @@ -3,16 +3,18 @@ diagrams classdiagram_ref 130309 // Asset Kinds 860 633 100 4 0 0 active classdiagram_ref 128133 // Session structure - 860 633 100 4 89 0 + 860 633 100 4 0 0 classdiagram_ref 130437 // Media-Asset Relations 860 633 100 4 0 0 classdiagram_ref 128389 // Render Entities 688 506 100 4 120 0 end show_stereotypes -selected attribute_ref 128133 // relType +selected class_ref 129285 // FixedPlacement open + deploymentview_ref 128133 // EXE Deployment deploymentview_ref 128773 // gen + deploymentview_ref 128901 // gen classview_ref 128901 // Assets class_ref 128517 // MObject class_ref 128645 // Placement diff --git a/uml/cinelerra3/cinelerra3.prj b/uml/cinelerra3/cinelerra3.prj index 4680e3711..efde6fe95 100644 --- a/uml/cinelerra3/cinelerra3.prj +++ b/uml/cinelerra3/cinelerra3.prj @@ -1,6 +1,6 @@ format 40 "cinelerra3" - revision 32 + revision 33 modified_by 5 "hiv" cpp_root_dir "../../src/" diff --git a/wiki/renderengine.html b/wiki/renderengine.html index af38318d3..eefa14ca2 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -2079,14 +2079,23 @@ DAMAGE. The fact of being placed in the [[Session|SessionOverview]]/[[EDL]]is constitutive for all sorts of [[MObject]]s, without Placement they make no sense. Thus &mdash; technically &mdash; Placements act as ''smart pointers''. Of course, there are several kinds of Placements and they are templated on the type of MObject they are refering to. Placements can be //aggregated// to increasingly constrain the resulting "location" of the refered ~MObject. See &rarr; [[handling of Placements|PlacementHandling]] for more details -
+
[[Placement]]s are at the very core of all [[editing operations|EditingOperations]], because they act as handles (smart pointers) to access the [[media objects|MObject]] to be manipulated. Moreover, Placements are the actual content of the EDL(s) and Fixture and thus are small objects with //value semantics//. Many editing tasks include finding some Placement in the EDL or directly take a ref to some Placement. By acting on the Placement object, we can in some cases change parameters of the way the media object is placed (e.g. adjust an offset), while by dereferencing the Placement object, we access the "real" media object (e.g. for trimming its length).
 
 Placements are ''templated'' on the type of the actual ~MObject they refer to, thus defining the interface/methods usable on this object. Each Placement has a ''kind'', which determines its actual placing and locating behaviour, but besides that, we don't stress the identity of a placement object (~MObjects on the other hand //do have// a distinguishable identity): initially, you create a Placement of some specific kind (fixed, relative,...), but later on, you treat the placement polymorphically and don't care about its kind. The sole purpose of the placement's kind is to select some virtual function implementing the desired behaviour.
 
 There is no limitation to one single Placement per ~MObject, indeed we can ''aggregate'' several Placements, resulting in their properties and constraints being combined to yield the actual position of the ~MObject refered by those Placements. 
 
-* {{red{to be worked out...}}} how to implement this, esp. the aggregation. Use a special "placement aggregation" subtype, or rather chain aggregated placements directly in the way a decorator works? And how to handle the case of a //over constrained// Placement?
+!design decisions
+* Placements can be aggregated in a sort of chain.
+* resolving into an ExplicitPlacement traverses this chain
+* //overconstraining// a placement is not an error, we just stop traversing the chain (ignoring the remaining additionla Placements) at the moment the position is completely defined. 
+* {{red{question...}}} how to implement this? externally, decorator-style or using the State pattern?
+* {{red{problem...}}} how to get at the individual MObject sub-Interfaces. Why is this a Problem?
+*# we want the EDL/Fixture to be a collection of Placements. This means, either we store pointers, or Placement needs to be //one// unique type!
+*# but if Placement is //a single type//, then we can get only MObjects from a Placement.
+*# then either we had to do everything by a visitor (which gets the concrete subtype dynamically), or we'd end up switching on type.
+