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)
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
25 #ifndef STEAM_INTERFACE_PLAY_H
26 #define STEAM_INTERFACE_PLAY_H
27 
28 
29 
30 #include "lib/depend.hpp"
31 #include "lib/handle.hpp"
32 #include "lib/iter-source.hpp"
33 #include "lib/time/control.hpp"
34 #include "lib/time/timevalue.hpp"
40 #include "steam/asset/timeline.hpp"
41 #include "steam/asset/viewer.hpp"
42 
43 
44 
45 namespace steam {
46 namespace play {
47 
48  class PlayProcess;
49 }}
50 
51 
52 namespace lumiera {
53 
54  namespace time = lib::time;
55 
56  using std::weak_ptr;
57 
58 
59  /**************************************************************/
73  class Play
74  {
75  protected:
76  virtual ~Play();
77  friend class lib::DependencyFactory<Play>;
78  public:
79 
82 
83 
98  class Controller
99  : public lib::Handle<steam::play::PlayProcess>
100  {
101  public:
102  void play(bool);
103  void scrub(bool);
104  void adjustSpeed(double);
105  void go(time::Time);
106 
107  void controlPlayhead (time::Control<time::Time> & ctrl);
108  void controlDuration (time::Control<time::Duration> & ctrl);
109  void controlLooping (time::Control<time::TimeSpan> & ctrl);
110 
111  void useProxyMedia (bool);
112  void setQuality (uint);
113 
114  bool is_playing() const;
115  bool is_scrubbing() const;
116  double getSpeed() const;
117  uint getQuality() const;
118  bool usesProxy() const;
119 
120  operator weak_ptr<steam::play::PlayProcess>() const;
121  };
122 
123 
128  using Fork = steam::mobject::PFork;
131 
132 
133  /* ==== convenience shortcuts for common use cases ==== */
134  Controller perform(ModelPorts, Output);
135  Controller perform(Pipes, Output);
136  Controller perform(Timeline);
137  Controller perform(Viewer);
138  Controller perform(Fork);
139  Controller perform(Clip);
140 
141  protected:
144  virtual Controller connect(ModelPorts, Output) =0;
145  };
146 
147 
148 } // namespace lumiera
149 #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:63
Frontend/Interface: controller-element to retrieve and change running time values.
Definition: control.hpp:125
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:280
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:299
Interface to the Player subsystem of Lumiera (Steam-Layer).
Definition: play-facade.hpp:73
static lib::Depend< Play > facade
get an implementation instance of this service
Definition: play-facade.hpp:81
Continuous playback process, which has been hooked up and started with a fixed set of output slots...
Definition: play-facade.hpp:98
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:104
Core abstraction: symbolic representation of some output target.
Helper to abstract creation and lifecycle of a dependency.
Definition: depend.hpp:125
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:71
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.