fix indentation

This commit is contained in:
Fischlurch 2009-06-06 23:58:44 +02:00
parent 56ff31df0a
commit 091c3a20ef
2 changed files with 113 additions and 121 deletions

View file

@ -26,62 +26,55 @@
#include "proc/asset/media.hpp"
#include "proc/asset/clip.hpp"
namespace mobject
namespace mobject {
namespace session {
/** new clip-MO linked with the given asset::Clip.
* Initially, this clip will cover the whole source media length.
*/
Clip::Clip (const asset::Clip& clipDef, const Media& mediaDef)
: start_(0),
mediaDef_(mediaDef),
clipDef_(clipDef)
{
namespace session
{
/** new clip-MO linked with the given asset::Clip.
* Initially, this clip will cover the whole source media length.
*/
Clip::Clip (const asset::Clip& clipDef, const Media& mediaDef)
: start_(0),
mediaDef_(mediaDef),
clipDef_(clipDef)
{
setupLength();
}
/** implementing the common MObject self test.
* Length definition is consitent, underlying
* media def is accessible etc. */
bool
Clip::isValid () const
{
TODO ("check consistency of clip length def, implies accessing the underlying media def");
return length > Time(0);
}
void
Clip::setupLength()
{
TODO ("really calculate the length of a clip and set length field");
this->length = mediaDef_.getLength();
}
PMedia
Clip::getMedia () const
{
return asset::AssetManager::wrap (mediaDef_);
}
PClipAsset
Clip::findClipAsset () const
{
return asset::AssetManager::wrap (clipDef_);
}
} // namespace mobject::session
} // namespace mobject
setupLength();
}
/** implementing the common MObject self test.
* Length definition is consitent, underlying
* media def is accessible etc. */
bool
Clip::isValid () const
{
TODO ("check consistency of clip length def, implies accessing the underlying media def");
return length > Time(0);
}
void
Clip::setupLength()
{
TODO ("really calculate the length of a clip and set length field");
this->length = mediaDef_.getLength();
}
PMedia
Clip::getMedia () const
{
return asset::AssetManager::wrap (mediaDef_);
}
PClipAsset
Clip::findClipAsset () const
{
return asset::AssetManager::wrap (clipDef_);
}
}} // namespace mobject::session

View file

@ -27,73 +27,72 @@
#include "proc/mobject/session/abstractmo.hpp"
namespace asset
{
class Media;
class Clip;
}
namespace asset {
class Media;
class Clip;
}
namespace mobject {
namespace session {
using asset::Media;
typedef P<Media> PMedia;
typedef P<asset::Clip> PClipAsset;
/**
* A user visible/editable Clip is a reference to a contiguous
* sequence of media data loaded as Asset into the current Session.
* As such, it is a virtual (non destructive) cut or edit of the
* source material and can be placed into the EDL to be rendered
* into the output. The actual media type of a clip will be derived
* at runtime by resolving this reference to the underlying Asset.
*
* @todo define how to denote Time positions /lengths. This is tricky,
* because it depends on the actual media type, and we want to encapsulate
* all these details as much as possible.
*/
class Clip : public AbstractMO
{
protected:
/** start position in source */
Time start_;
/** @todo using a mere ref here is against the scheme and only
done as temporal solution, until we work out how to handle
multichannel clips. It should be a smart pointer of some kind
and the unlink() function of the asset should take it into
account when breaking circular references.
*/
const Media & mediaDef_;
const asset::Clip & clipDef_;
Clip (const asset::Clip&, const Media&);
friend class MObjectFactory;
virtual void setupLength();
public:
virtual bool isValid() const;
/** access the underlying media asset */
PMedia getMedia () const;
/** locate the corresponding asset
* representing this clip or the whole
* compound in case of a multichannel clip
*/
PClipAsset findClipAsset () const;
DEFINE_PROCESSABLE_BY (builder::BuilderTool);
};
using asset::Media;
typedef P<Media> PMedia;
typedef P<asset::Clip> PClipAsset;
/**
* A user visible/editable Clip is a reference to a contiguous
* sequence of media data loaded as Asset into the current Session.
* As such, it is a virtual (non destructive) cut or edit of the
* source material and can be placed into the EDL to be rendered
* into the output. The actual media type of a clip will be derived
* at runtime by resolving this reference to the underlying Asset.
*
* @todo define how to denote Time positions /lengths. This is tricky,
* because it depends on the actual media type, and we want to encapsulate
* all these details as much as possible.
*/
class Clip : public AbstractMO
{
protected:
/** start position in source */
Time start_;
typedef Placement<Clip> PClipMO;
/** @todo using a mere ref here is against the scheme and only
done as temporal solution, until we work out how to handle
multichannel clips. It should be a smart pointer of some kind
and the unlink() function of the asset should take it into
account when breaking circular references.
*/
const Media & mediaDef_;
const asset::Clip & clipDef_;
Clip (const asset::Clip&, const Media&);
friend class MObjectFactory;
virtual void setupLength();
public:
virtual bool isValid() const;
/** access the underlying media asset */
PMedia getMedia () const;
/** locate the corresponding asset
* representing this clip or the whole
* compound in case of a multichannel clip
*/
PClipAsset findClipAsset () const;
DEFINE_PROCESSABLE_BY (builder::BuilderTool);
};
typedef Placement<Clip> PClipMO;
}} // namespace mobject::session
#endif