Lumiera  0.pre.03
»edit your freedom«
operationpoint.cpp
Go to the documentation of this file.
1 /*
2  OperationPoint - abstraction representing the point where to apply a build instruction
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
32 #include "steam/asset/media.hpp"
33 #include "steam/asset/proc.hpp"
35 #include "steam/streamtype.hpp"
36 //#include "common/util.hpp"
37 
38 //#include <boost/ptr_container/ptr_vector.hpp>
39 
40 namespace steam {
41 namespace mobject {
42 namespace builder {
43 
44 // using util::isnil;
45  using engine::NodeFactory;
46 
47  using engine::PNode;
48 
49 
50  struct RefPoint
51  {
52  NodeFactory& alloc_;
53 
54  vector<PNode> sources_;
55  const StreamType * sType_;
56 
57 
59  RefPoint (RefPoint const& pred)
60  : alloc_(pred.alloc_),
61  sources_(pred.sources_),
62  sType_(pred.sType_)
63  { }
64 
66  RefPoint (NodeFactory& nFactory, asset::Media const& srcMedia)
67  : alloc_(nFactory),
68  sType_(0)
69  {
70  establishMediaChannels (srcMedia);
71  deriveSourceStreamType ();
72  }
73 
74 
75  private:
76  void
77  establishMediaChannels (asset::Media const& srcMedia)
78  {
79  UNIMPLEMENTED ("find out about the actual channels for this stream to connect");
80  }
81 
82  void
83  deriveSourceStreamType ()
84  {
85  UNIMPLEMENTED ("calculate / decide on the effective stream type used within this pipe");
86  }
87 
88  };
89 
90 
91 
92  OperationPoint::OperationPoint (NodeFactory& nFact, asset::Media const& srcMedia)
93  : refPoint_(new RefPoint (nFact, srcMedia))
94  { }
95 
96 
97  OperationPoint::OperationPoint (RefPoint const& sourcePoint)
98  : refPoint_(new RefPoint (sourcePoint))
99  { }
100 
101 
102  void
104  {
105  UNIMPLEMENTED ("Actually-really-finally create a node corresponding to this processing asset");
106  }
107 
108 
109  void
111  {
112  UNIMPLEMENTED ("Actually-really-finally do a mixing output connection");
113  }
114 
115 
116 
117 }}} // namespace steam::mobject::builder
Interface to the processing nodes and the render nodes network.
Framework for classification of media streams.
key abstraction: media-like assets
Definition: media.hpp:72
Media data represented a specific kind of Asset.
Steam-Layer implementation namespace root.
void attach(asset::Proc const &)
create node(s) corresponding to the given Processor-Asset and wire them as a successor to this Operat...
Create processing nodes based on given objects of the high-level model.
Definition: nodefactory.hpp:71
Data processing Plugins and Codecs can be treated as a specific Kind of Asset.
A point in the render node network under construction.
key abstraction: data processing asset
Definition: proc.hpp:72
RefPoint(RefPoint const &pred)
just continue connection chaining
A factory to build processing nodes.
RefPoint(NodeFactory &nFactory, asset::Media const &srcMedia)
initiate a connection chain at a real source
Abstraction to represent the current point of operation within the builder.
void join(OperationPoint &target)
connect the output this OperationPoint refers such as to connect or combine with the input of the alr...