Lumiera  0.pre.03
»edit your freedom«
mobject/session/clip.hpp
Go to the documentation of this file.
1 /*
2  CLIP.hpp - a Media Clip
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 
31 #ifndef STEAM_MOBJECT_SESSION_CLIP_H
32 #define STEAM_MOBJECT_SESSION_CLIP_H
33 
35 #include "lib/time/timevalue.hpp"
36 #include "lib/p.hpp"
37 
38 
39 namespace steam {
40 namespace asset {
41  class Media;
42  class Clip;
43 }
44 
45 namespace mobject {
46 namespace session {
47 
48  using asset::Media;
49  using lib::time::TimeVar;
50 
51  class Clip;
52 
53  using PMedia = lib::P<Media>;
54  using PClipAsset = lib::P<asset::Clip>;
55 
56  using PClip = Placement<Clip>;
57 
58 
71  class Clip
72  : public AbstractMO
73  {
74  string
75  initShortID() const
76  {
77  return buildShortID("Clip");
78  }
79 
80  void setupLength();
81 
82 
83 
84  protected:
87 
95  const Media & mediaDef_;
96  const asset::Clip & clipDef_;
97 
98  Clip (const asset::Clip&, const Media&);
99  friend class MObjectFactory;
100 
101 
102  public:
103  bool isValid() const;
104 
106  PMedia getMedia () const;
107 
112  PClipAsset findClipAsset () const;
113 
115 
116  };
117 
118 
119 
120 
121 }}} // namespace steam::mobject::session
122 #endif
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
Definition: timevalue.hpp:241
key abstraction: media-like assets
Definition: media.hpp:72
Customised refcounting smart pointer.
Base class of all BuilderTools, used according to the visitor pattern: each Tool contains the concret...
A user visible/editable Clip is a reference to a contiguous sequence of media data loaded as Asset in...
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
abstract base class of all MObjects for providing common services.
Definition: abstractmo.hpp:48
TimeVar start_
start position in source
bookkeeping (Asset) view of a media clip.
Definition: asset/clip.hpp:44
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
#define DEFINE_PROCESSABLE_BY(TOOL)
mark a Visitable subclass as actually treat-able by some "visiting tool" base interface.
Definition: visitor.hpp:231
a family of time value like entities and their relationships.
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:44