Lumiera  0.pre.03
»edit your freedom«
output-designation.hpp
Go to the documentation of this file.
1 /*
2  OUTPUT-DESIGNATION.hpp - specifying a desired output destination
3 
4  Copyright (C) Lumiera.org
5  2010, 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 
40 #ifndef STEAM_MOBJECT_OUTPUT_DESIGNATION_H
41 #define STEAM_MOBJECT_OUTPUT_DESIGNATION_H
42 
43 #include "steam/asset/pipe.hpp"
44 #include "lib/hash-value.h"
45 #include "lib/opaque-holder.hpp"
47 
48 
49 namespace steam {
50 namespace mobject {
51 
52  namespace mp = lib::meta;
53 
54  class MObject;
55 
56  template<class MX>
57  class PlacementRef;
58 
60 
61 
62 
81  {
82  public:
84  using PPipe = asset::PPipe;
85 
86  explicit OutputDesignation (PID explicitTarget);
87  explicit OutputDesignation (RefPlacement const& indirectTarget);
88  explicit OutputDesignation (uint relative_busNr =0);
89 
90  // using default copying
91 
92 
103  PID
104  resolve (PPipe origin)
105  {
106  return spec_->resolve (origin);
107  }
108 
109  //TODO: API to retrieve target stream type
110 
111 
113  {
114  public:
115  virtual ~TargetSpec();
116  virtual PID resolve (PPipe origin) =0;
117  };
118 
119  private:
120  enum
121  { VTABLE = sizeof(size_t)
122  , SPEC_SIZ = VTABLE
123  + mp::maxSize<
125  };
127 
128 
130  SpecBuff spec_;
131 
132  };
133 
134 
135 
136 }} // namespace steam::mobject
137 #endif /*STEAM_MOBJECT_OUTPUT_DESIGNATION_H*/
Reference tag denoting a placement attached to the session.
SpecBuff spec_
Storage to hold the Target Spec inline.
PID resolve(PPipe origin)
retrieve the direct destination this descriptor is actually pointing to.
A "processing pipe" represented as Asset.
Steam-Layer implementation namespace root.
Metafunction " max( sizeof(T) ) for T in TYPES ".
Helper allowing type erasure while holding the actual object inline.
PlacementRef< MObject > RefPlacement
frequently-used shorthand
Descriptor to denote the desired target of produced media data.
Hash value types and utilities.
OutputDesignation(PID explicitTarget)
create an output designation by directly specifying the target to connect
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
Metaprogramming: Helpers for manipulating lists-of-types.
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition: asset.hpp:108