Lumiera  0.pre.03
»edit your freedom«
preview.cpp
Go to the documentation of this file.
1 /*
2  Preview(Asset) - alternative version of the media data, probably with lower resolution
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 
29 #include "steam/asset/preview.hpp"
30 
31 namespace steam {
32 namespace asset {
33 
34 
35  namespace {
41  const Asset::Ident
42  createProxyIdent (const Asset::Ident& mediaref)
43  {
44  string name (mediaref.name + "-proxy"); // TODO something sensible here; append number, sanitise etc.
45  Category category (mediaref.category);
46  TODO ("put it in another subfolder within the same category??");
47  return Asset::Ident (name, category,
48  mediaref.org,
49  mediaref.version );
50 
51  }
52  }//(End)implementation helper
53 
54 
55 
61  Preview::Preview (Media& mediaref)
62  : Unknown (createProxyIdent (mediaref.ident),
63  mediaref.getFilename(),
64  mediaref.getLength())
65  {
66  this->defineDependency (mediaref);
67  UNIMPLEMENTED ("do something to setup proxy media");
68  }
69 
70 
71 
72 
73 }} // namespace asset
string name
element ID, comprehensible but sanitised.
Definition: asset.hpp:164
key abstraction: media-like assets
Definition: media.hpp:72
Tree like classification of Assets.
Definition: category.hpp:75
Steam-Layer implementation namespace root.
Placeholder "proxy" Asset.
const Asset::Ident createProxyIdent(const Asset::Ident &mediaref)
Definition: preview.cpp:42
a POD comprised of all the information sufficiently identifying any given Asset.
Definition: asset.hpp:158
Placeholder Asset for unknown or unavailable media source.
Definition: unknown.hpp:54
Preview(Media &mediaref)
create a preview placeholder ("proxy media") for the given media asset.
Definition: preview.cpp:61
const string org
origin or authorship id.
Definition: asset.hpp:176
void defineDependency(PAsset parent)
establish a connection between this and the given parent asset, denoting we are in some way dependent...
Definition: asset.cpp:192
const uint version
version number of the thing or concept represented by this asset.
Definition: asset.hpp:184
asset::Category category
primary tree like classification of the asset.
Definition: asset.hpp:169
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:44
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption