Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
streamtype.hpp
Go to the documentation of this file.
1/*
2 STREAMTYPE.hpp - classification of media stream types
3
4 Copyright (C)
5 2008, 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
25#ifndef STEAM_STREAMTYPE_H
26#define STEAM_STREAMTYPE_H
27
28#include "lib/symbol.hpp"
29//#include "common/query.hpp"
30#include "lib/idi/entry-id.hpp"
31
32
33
34namespace steam {
35
36 using lib::Symbol;
37
38// "yes mummy, we all know this code is not finished yet..."
39#pragma GCC diagnostic push
40#pragma GCC diagnostic ignored "-Wuninitialized"
41
47 {
55
63
64 struct Prototype;
65
66 class ImplFacade;
67 class ImplConstraint;
68
70
71
75
76 };
77#pragma GCC diagnostic pop
78
79
84 {
87
88 bool subsumes (Prototype const& other) const;
89 bool canRender (Prototype const& other) const;
90 };
91
92
93
94
100 {
101 public:
103
104 class TypeTag ;
105
112 struct DataBuffer { };
113
114
115 virtual bool operator== (ImplFacade const& other) const =0;
116 virtual bool operator== (StreamType const& other) const =0;
117
118 virtual bool canConvert (ImplFacade const& other) const =0;
119 virtual bool canConvert (StreamType const& other) const =0;
120
121 virtual DataBuffer* createFrame () const =0;
122 virtual MediaKind getKind() const =0;
123
124 virtual ~ImplFacade() {};
125
126 protected:
127 ImplFacade (Symbol libID) ;
128 };
129
130
139 {
140 public:
141 virtual bool canConvert (ImplFacade const& other) const =0;
142 virtual bool canConvert (StreamType const& other) const =0;
143
144 virtual bool subsumes (ImplFacade const& other) const =0;
145
147 virtual void makeCompliant (ImplFacade & other) const =0;
148
151 virtual DataBuffer* createFrame () const =0;
152
156 virtual DataBuffer* createFrame (ImplConstraint const& furtherConstraints) const =0;
157
158 //TODO: do we need functions to represent and describe this constraint?
159
160 };
161
162
170 {
172
173 public:
175
176 template<class TY>
177 TypeTag (Symbol lID, TY& rawType)
178 : rawTypeStruct_(&rawType),
179 libraryID(lID)
180 { }
181 };
182
183
184
185
186} // namespace steam
187
188
189namespace lumiera {
190 using steam::StreamType;
191}
192
193#endif /*STEAM_STREAMTYPE_H*/
Token or Atom with distinct identity.
Definition symbol.hpp:120
Special case of an implementation type being only partially specified Besides requiring some aspect o...
virtual DataBuffer * createFrame() const =0
create a default impl type in accordance to this constraint and use it to create a new framebuffer
virtual bool subsumes(ImplFacade const &other) const =0
virtual bool canConvert(StreamType const &other) const =0
virtual bool canConvert(ImplFacade const &other) const =0
virtual DataBuffer * createFrame(ImplConstraint const &furtherConstraints) const =0
Similarly create a impl type which complies to this constraint as well as to the additional constrain...
virtual void makeCompliant(ImplFacade &other) const =0
modify the other impl type such as to comply with this constraint
opaque placeholder (type erasure) for implementation specific type info.
A (more or less) concrete implementation type, wired up as a facade providing the basic set of operat...
virtual DataBuffer * createFrame() const =0
virtual bool operator==(ImplFacade const &other) const =0
virtual bool canConvert(StreamType const &other) const =0
virtual bool canConvert(ImplFacade const &other) const =0
virtual MediaKind getKind() const =0
placeholder type for the contents of a data buffer.
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Bare symbolic and hash ID used for accounting of asset like entries.
Lumiera public interface.
Definition advice.hpp:102
Steam-Layer implementation namespace root.
bool canRender(Prototype const &other) const
bool subsumes(Prototype const &other) const
Prototype const & prototype
ImplFacade * implType
Marker types to indicate a literal string and a Symbol.