2007-08-08 04:50:02 +02:00
|
|
|
/*
|
|
|
|
|
MOBJECT.hpp - Key Abstraction: A Media Object in the Session
|
|
|
|
|
|
2008-03-10 04:25:03 +01:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
2007-08-08 04:50:02 +02:00
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2007-08-09 18:51:47 +02:00
|
|
|
#ifndef MOBJECT_MOBJECT_H
|
|
|
|
|
#define MOBJECT_MOBJECT_H
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2008-01-27 02:39:13 +01:00
|
|
|
#include "pre.hpp"
|
|
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2008-04-14 05:15:16 +02:00
|
|
|
#include "proc/lumiera.hpp"
|
2007-11-29 07:07:14 +01:00
|
|
|
#include "proc/mobject/builder/buildertool.hpp"
|
2007-10-19 06:39:52 +02:00
|
|
|
#include "proc/mobject/placement.hpp"
|
2007-09-27 23:26:54 +02:00
|
|
|
#include "proc/asset.hpp" // TODO finally not needed?
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2008-05-19 08:46:19 +02:00
|
|
|
#include <boost/noncopyable.hpp>
|
|
|
|
|
#include <boost/operators.hpp>
|
|
|
|
|
#include <list>
|
|
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
|
|
|
|
|
using std::list;
|
|
|
|
|
|
2007-09-27 23:26:54 +02:00
|
|
|
#include "proc/assetmanager.hpp"
|
|
|
|
|
using proc_interface::IDA; // TODO finally not needed?
|
2007-11-10 23:09:15 +01:00
|
|
|
//using proc_interface::PAsset; //TODO: only temporarily
|
2007-09-27 23:26:54 +02:00
|
|
|
using proc_interface::AssetManager;
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2007-08-09 18:51:47 +02:00
|
|
|
namespace mobject
|
2007-08-08 04:50:02 +02:00
|
|
|
{
|
2008-05-19 08:46:19 +02:00
|
|
|
using lumiera::P;
|
2007-08-09 18:51:47 +02:00
|
|
|
|
2007-10-19 06:39:52 +02:00
|
|
|
namespace session
|
|
|
|
|
{
|
|
|
|
|
class MObjectFactory;
|
|
|
|
|
}
|
2007-08-09 18:51:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MObject is the interface class for all "Media Objects".
|
|
|
|
|
* All the contents and elements that can be placed and
|
2008-03-10 06:09:44 +01:00
|
|
|
* manipulated and finally rendered within Lumiera's EDL
|
2007-08-09 18:51:47 +02:00
|
|
|
* are MObjects.
|
|
|
|
|
*/
|
2008-05-19 08:46:19 +02:00
|
|
|
class MObject
|
|
|
|
|
: public Buildable,
|
|
|
|
|
boost::noncopyable,
|
|
|
|
|
boost::equality_comparable< MObject >
|
2007-08-08 04:50:02 +02:00
|
|
|
{
|
2007-08-09 18:51:47 +02:00
|
|
|
protected:
|
2008-03-10 06:09:44 +01:00
|
|
|
typedef lumiera::Time Time;
|
2007-08-09 18:51:47 +02:00
|
|
|
|
|
|
|
|
// TODO: how to represent time intervals best?
|
|
|
|
|
Time length;
|
2007-09-27 23:26:54 +02:00
|
|
|
|
2007-11-12 02:05:39 +01:00
|
|
|
MObject() {}
|
2007-09-27 23:26:54 +02:00
|
|
|
virtual ~MObject() {};
|
|
|
|
|
|
2007-11-12 02:05:39 +01:00
|
|
|
friend class session::MObjectFactory;
|
|
|
|
|
|
2007-11-14 10:10:52 +01:00
|
|
|
|
2007-09-27 23:26:54 +02:00
|
|
|
public:
|
2007-10-19 06:39:52 +02:00
|
|
|
static session::MObjectFactory create;
|
|
|
|
|
|
2007-10-19 22:34:07 +02:00
|
|
|
/** MObject self-test (usable for asserting) */
|
2007-11-10 23:09:15 +01:00
|
|
|
virtual bool isValid() const =0;
|
2007-10-19 22:34:07 +02:00
|
|
|
|
2007-09-27 23:26:54 +02:00
|
|
|
virtual Time& getLength() =0; ///< @todo how to deal with the time/length field??
|
2008-05-19 08:46:19 +02:00
|
|
|
|
|
|
|
|
virtual bool operator== (const MObject& oo) const =0;
|
2007-08-09 18:51:47 +02:00
|
|
|
|
|
|
|
|
};
|
2008-05-19 08:46:19 +02:00
|
|
|
|
2007-09-27 04:45:06 +02:00
|
|
|
|
2008-05-19 08:46:19 +02:00
|
|
|
|
|
|
|
|
typedef Placement<MObject> PMO;
|
2007-08-09 18:51:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace mobject
|
2007-08-08 04:50:02 +02:00
|
|
|
#endif
|