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)
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 
14 
20 #include "steam/asset/preview.hpp"
21 
22 namespace steam {
23 namespace asset {
24 
25 
26  namespace {
32  const Asset::Ident
33  createProxyIdent (const Asset::Ident& mediaref)
34  {
35  string name (mediaref.name + "-proxy"); // TODO something sensible here; append number, sanitise etc.
36  Category category (mediaref.category);
37  TODO ("put it in another subfolder within the same category??");
38  return Asset::Ident (name, category,
39  mediaref.org,
40  mediaref.version );
41 
42  }
43  }//(End)implementation helper
44 
45 
46 
52  Preview::Preview (Media& mediaref)
53  : Unknown (createProxyIdent (mediaref.ident),
54  mediaref.getFilename(),
55  mediaref.getLength())
56  {
57  this->defineDependency (mediaref);
58  UNIMPLEMENTED ("do something to setup proxy media");
59  }
60 
61 
62 
63 
64 }} // namespace asset
string name
element ID, comprehensible but sanitised.
Definition: asset.hpp:155
key abstraction: media-like assets
Definition: media.hpp:63
Tree like classification of Assets.
Definition: category.hpp:66
Steam-Layer implementation namespace root.
Placeholder "proxy" Asset.
const Asset::Ident createProxyIdent(const Asset::Ident &mediaref)
Definition: preview.cpp:33
a POD comprised of all the information sufficiently identifying any given Asset.
Definition: asset.hpp:149
Placeholder Asset for unknown or unavailable media source.
Definition: unknown.hpp:45
Preview(Media &mediaref)
create a preview placeholder ("proxy media") for the given media asset.
Definition: preview.cpp:52
const string org
origin or authorship id.
Definition: asset.hpp:167
void defineDependency(PAsset parent)
establish a connection between this and the given parent asset, denoting we are in some way dependent...
Definition: asset.cpp:183
const uint version
version number of the thing or concept represented by this asset.
Definition: asset.hpp:175
asset::Category category
primary tree like classification of the asset.
Definition: asset.hpp:160
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:35
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption