Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
MediaFactory Class Reference

#include "steam/asset/media.hpp"

Description

Factory specialised for creating Media Asset objects.

Definition at line 134 of file media.hpp.

Public Types

using PType = lib::P< Media >
 

Public Member Functions

PType operator() (Asset::Ident &key, const string &file="")
 Factory method for Media Asset instances.
 
PType operator() (const string &file, const Category &cat)
 Variant of the Factory method for Media Assets, automatically providing most of the Asset key fields based on the filename given.
 
PType operator() (const string &file, asset::Kind)
 
lib::P< Clipoperator() (Media &mediaref)
 Factory method for creating a Clip asset based on the given Media asset.
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Typedef Documentation

◆ PType

using PType = lib::P<Media>

Definition at line 138 of file media.hpp.

Member Function Documentation

◆ operator()() [1/4]

MediaFactory::PType operator() ( Asset::Ident key,
const string &  file = "" 
)

Factory method for Media Asset instances.

Depending on the filename given, either a asset::Media object or an "Unknown" placeholder will be provided. If the given Category already contains an "Unkown", we just get the corresponding smart-ptr. Otherwise a new asset::Unknown is created.

Exceptions
error::Invalidwhen media file is inaccessible or inappropriate
Returns
an Media smart ptr linked to the internally registered smart ptr created as a side effect of calling the concrete Media subclass ctor.

Definition at line 142 of file media.cpp.

References steam::asset::AUDIO, Asset::Ident::category, AssetManager::getAsset(), Media::getID(), AssetManager::getID(), Category::hasKind(), AssetManager::instance, AssetManager::known(), Asset::Ident::name, and steam::asset::VIDEO.

Referenced by MediaFactory::operator()(), and MediaFactory::operator()().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator()() [2/4]

MediaFactory::PType operator() ( const string &  file,
const Category cat 
)

Variant of the Factory method for Media Assets, automatically providing most of the Asset key fields based on the filename given.

Definition at line 183 of file media.cpp.

References MediaFactory::operator()().

+ Here is the call graph for this function:

◆ operator()() [3/4]

MediaFactory::PType operator() ( const string &  file,
asset::Kind  kind 
)

Definition at line 190 of file media.cpp.

References MediaFactory::operator()().

+ Here is the call graph for this function:

◆ operator()() [4/4]

lib::P< Clip > operator() ( Media mediaref)

Factory method for creating a Clip asset based on the given Media asset.

This asset::Clip can be used to create a clip in the session covering the whole length of this media.

Note
creates a dependency between media and new clip
Exceptions
Invalidif the given media asset is not top-level, but rather part or a multichannel (compound) media

Definition at line 206 of file media.cpp.

References Media::checkCompound(), and AssetManager::instance.

+ Here is the call graph for this function:
+ Inheritance diagram for MediaFactory:
+ Collaboration diagram for MediaFactory:

The documentation for this class was generated from the following files: