44using std::regex_search;
45using std::dynamic_pointer_cast;
60 static regex PATHNAME_PATTERN(
"([^/\\.]+)(\\.\\w+)?$");
63 if (regex_search (path, match, PATHNAME_PATTERN))
78 PClip clipMO = clipAsset->createClip();
80 ENSURE (clipMO->isValid());
93 return parent->getClipAsset();
105 parent = dynamic_pointer_cast<Media,Asset> (
parents[0]);
113 UNIMPLEMENTED (
"calculate and return processing pattern for media asset");
151 if (isnil (key.
name)) key.
name=
"nil";
153 if (aMang.
known (
id))
160 if (isnil (key.
name)) key.
name=extractName(file);
162 MediaAccessFacade& maf = MediaAccessFacade::instance();
163 MediaDesc& handle = maf.queryFile(key.
name);
167 pM =
new Media (key,file,length);
171 ENSURE (not isnil (key.
name));
172 ENSURE (
dynamic_cast<Media*
>(pM) or (isnil (file) and
dynamic_cast<Unknown*
>(pM)));
210 "which is not toplevel but rather part of a compound "
211 "(multichannel) media. Found parent Media %s.")
214 ,LUMIERA_ERROR_PART_OF_COMPOUND);
Definition of Asset representation for a media clip.
Steam-Layer Interface: Asset Lookup and Organisation.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Duration is the internal Lumiera time metric.
Facade for the Asset subsystem.
static ID< Asset > getID(const Asset::Ident &)
provide the unique ID for given Asset::Ident tuple
lib::P< KIND > getAsset(const ID< KIND > &id)
find and return corresponding object
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
const vector< PAsset > & getParents() const
List of entities this asset depends on or requires to be functional.
Tree like classification of Assets.
bool hasKind(Kind refKind) const
bookkeeping (Asset) view of a media clip.
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Placeholder Asset for unknown or unavailable media source.
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
A front-end for using printf-style formatting.
#define LUMIERA_ERROR_DEFINE(err, msg)
Definition and initialisation of an error constant.
Lumiera error handling (C++ interface).
This header is for including and configuring NoBug.
boost::rational< int64_t > FSecs
rational representation of fractional seconds
LumieraError< LERR_(INVALID)> Invalid
The asset subsystem of the Steam-Layer.
Kind
top-level distinction of different Kinds of Assets.
Steam-Layer implementation namespace root.
std::string sanitise(std::string const &)
produce an identifier based on the given string.
bool isnil(lib::time::Duration const &dur)
Basic set of definitions and includes commonly used together.
a POD comprised of all the information sufficiently identifying any given Asset.
asset::Category category
primary tree like classification of the asset.
string name
element ID, comprehensible but sanitised.
a family of time value like entities and their relationships.
Marker Asset to indicate an unknown media source.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...