Lumiera  0.pre.03
»edit your freedom«
play-facade.hpp
Go to the documentation of this file.
1 /*
2  PLAYER-FACADE.h - access point to the Lumiera player subsystem
3 
4  Copyright (C) Lumiera.org
5  2011, 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 
34 #ifndef STEAM_INTERFACE_PLAY_H
35 #define STEAM_INTERFACE_PLAY_H
36 
37 
38 
39 #include "lib/depend.hpp"
40 #include "lib/handle.hpp"
41 #include "lib/iter-source.hpp"
42 #include "lib/time/control.hpp"
43 #include "lib/time/timevalue.hpp"
49 #include "steam/asset/timeline.hpp"
50 #include "steam/asset/viewer.hpp"
51 
52 
53 
54 namespace steam {
55 namespace play {
56 
57  class PlayProcess;
58 }}
59 
60 
61 namespace lumiera {
62 
63  namespace time = lib::time;
64 
65  using std::weak_ptr;
66 
67 
68  /**************************************************************/
82  class Play
83  {
84  protected:
85  virtual ~Play();
86  friend class lib::DependencyFactory<Play>;
87  public:
88 
91 
92 
108  : public lib::Handle<steam::play::PlayProcess>
109  {
110  public:
111  void play(bool);
112  void scrub(bool);
113  void adjustSpeed(double);
114  void go(time::Time);
115 
116  void controlPlayhead (time::Control<time::Time> & ctrl);
117  void controlDuration (time::Control<time::Duration> & ctrl);
118  void controlLooping (time::Control<time::TimeSpan> & ctrl);
119 
120  void useProxyMedia (bool);
121  void setQuality (uint);
122 
123  bool is_playing() const;
124  bool is_scrubbing() const;
125  double getSpeed() const;
126  uint getQuality() const;
127  bool usesProxy() const;
128 
129  operator weak_ptr<steam::play::PlayProcess>() const;
130  };
131 
132 
137  using Fork = steam::mobject::PFork;
140 
141 
142  /* ==== convenience shortcuts for common use cases ==== */
143  Controller perform(ModelPorts, Output);
144  Controller perform(Pipes, Output);
145  Controller perform(Timeline);
146  Controller perform(Viewer);
147  Controller perform(Fork);
148  Controller perform(Clip);
149 
150  protected:
153  virtual Controller connect(ModelPorts, Output) =0;
154  };
155 
156 
157 } // namespace lumiera
158 #endif /*STEAM_INTERFACE_PLAY_H*/
Organising the output data calculation possibilities.
Generic opaque reference counting handle, for accessing a service and managing its lifecycle...
Definition: handle.hpp:72
Frontend/Interface: controller-element to retrieve and change running time values.
Definition: control.hpp:134
structural element corresponding to a viewer in the GUI.
MObject in the Session to represent a clip on the timeline.
Organisational grouping device within the Session model ("Track" / "Media Bin").
Steam-Layer implementation namespace root.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:289
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:308
Interface to the Player subsystem of Lumiera (Steam-Layer).
Definition: play-facade.hpp:82
static lib::Depend< Play > facade
get an implementation instance of this service
Definition: play-facade.hpp:90
Continuous playback process, which has been hooked up and started with a fixed set of output slots...
Singleton services and Dependency Injection.
A global service to handle all external output connections.
Manipulating and monitoring time entities with life changes.
Lumiera public interface.
Definition: advice.cpp:113
Core abstraction: symbolic representation of some output target.
Helper to abstract creation and lifecycle of a dependency.
Definition: depend.hpp:134
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
A generic opaque handle to an implementation entity, including lifecycle management.
a family of time value like entities and their relationships.
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.
Top level structural element within the session.