Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
output-slot.hpp
Go to the documentation of this file.
1/*
2 OUTPUT-SLOT.hpp - capability to transfer data to a physical output
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
56#ifndef STEAM_PLAY_OUTPUT_SLOT_H
57#define STEAM_PLAY_OUTPUT_SLOT_H
58
59
60#include "lib/error.hpp"
61#include "lib/handle.hpp"
65#include "lib/iter-source.hpp"
66#include "lib/nocopy.hpp"
67
68#include <memory>
69
70
71namespace steam {
72namespace play {
73
78 using lib::time::Time;
79
80 using std::unique_ptr;
81
82
83
84 class DataSink;
85
87
88
89
90 /****************************************************************************/
103 {
104
105 protected:
106
108 class ConnectionState;
109
110 unique_ptr<ConnectionState> state_;
111
116
117
118 public:
119 virtual ~OutputSlot();
120
122
124 {
125 public:
127 virtual bool isActive() const =0;
128
130
131 protected:
132 ~Allocation();
133 };
134
136 class Connection;
137
138
140 bool isFree() const;
141
144
147 void disconnect();
148 };
149
150
151
160 : public lib::Handle<OutputSlot::Connection>
161 {
162
163 public:
165 void emit(FrameID, BuffHandle const&, TimeValue currentTime = Time::ANYTIME);
166
167
168 friend bool operator== (DataSink const& sink1, DataSink const& sink2)
169 {
170 return not (sink1 and sink2)
171 or (sink1 and sink2
172 and & sink1.impl() == & sink2.impl());
173 }
174 friend bool operator!= (DataSink const& sink1, DataSink const& sink2)
175 {
176 return not (sink1 == sink2);
177 }
178 };
179
180
181
182
183
184}} // namespace steam::play
185#endif
Abstraction to represent buffer management and lifecycle within the render engine.
Generic opaque reference counting handle, for accessing a service and managing its lifecycle.
Definition handle.hpp:64
IMP & impl() const
Definition handle.hpp:149
basic constant internal time value.
Lumiera's internal time value datatype.
static const Time ANYTIME
border condition marker value. ANYTIME <= any time value
Handle for a buffer for processing data, abstracting away the actual implementation.
Interface: a facility providing and managing working buffers for media calculations.
denotes an opened connection ready to receive media data for output.
BuffHandle lockBufferFor(FrameID)
void emit(FrameID, BuffHandle const &, TimeValue currentTime=Time::ANYTIME)
friend bool operator==(DataSink const &sink1, DataSink const &sink2)
friend bool operator!=(DataSink const &sink1, DataSink const &sink2)
virtual OpenedSinks getOpenedSinks()=0
virtual bool isActive() const =0
virtual Timings getTimingConstraints()=0
~Allocation()
never to be managed by clients directly
Interface: Generic output sink.
Allocation & allocate()
claim this slot for exclusive use
void disconnect()
disconnect from this OutputSlot
unique_ptr< ConnectionState > state_
virtual ConnectionState * buildState()=0
build the connected state, based on the existing configuration within this concrete OutputSlot
bool isFree() const
can this OutputSlot be allocated?
Generic frame timing specification.
Definition timings.hpp:87
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Lumiera error handling (C++ interface).
A generic opaque handle to an implementation entity, including lifecycle management.
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.
int64_t FrameCnt
Definition job.h:80
int64_t FrameCnt
relative framecount or frame number.
Definition digxel.hpp:310
FrameCnt FrameID
Steam-Layer implementation namespace root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
a family of time value like entities and their relationships.
How to define a timing specification or constraint.