2007-08-08 04:50:02 +02:00
|
|
|
/*
|
|
|
|
|
MOBJECT.hpp - Key Abstraction: A Media Object in the Session
|
|
|
|
|
|
|
|
|
|
Copyright (C) CinelerraCV
|
|
|
|
|
2007, Christian Thaeter <ct@pipapo.org>
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#include <list>
|
2007-09-27 04:45:06 +02:00
|
|
|
#include <tr1/memory>
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2007-08-09 18:51:47 +02:00
|
|
|
#include "cinelerra.h"
|
2007-08-08 04:50:02 +02:00
|
|
|
#include "proc/mobject/buildable.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
|
|
|
|
|
|
|
|
|
|
|
|
|
using std::list;
|
2007-09-27 04:45:06 +02:00
|
|
|
using std::tr1::shared_ptr;
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2007-09-27 23:26:54 +02:00
|
|
|
#include "proc/assetmanager.hpp"
|
|
|
|
|
using proc_interface::IDA; // TODO finally not needed?
|
|
|
|
|
using proc_interface::PAsset; //TODO: only temporarily
|
|
|
|
|
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
|
|
|
{
|
2007-08-09 18:51:47 +02:00
|
|
|
|
|
|
|
|
class Placement;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MObject is the interface class for all "Media Objects".
|
|
|
|
|
* All the contents and elements that can be placed and
|
|
|
|
|
* manipulated and finally rendered within Cinelerra's EDL
|
|
|
|
|
* are MObjects.
|
|
|
|
|
*/
|
|
|
|
|
class MObject : public Buildable
|
2007-08-08 04:50:02 +02:00
|
|
|
{
|
2007-08-09 18:51:47 +02:00
|
|
|
protected:
|
|
|
|
|
typedef cinelerra::Time Time;
|
|
|
|
|
|
|
|
|
|
// TODO: how to represent time intervals best?
|
|
|
|
|
Time length;
|
2007-09-27 23:26:54 +02:00
|
|
|
|
|
|
|
|
virtual ~MObject() {};
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual shared_ptr<Placement>& getPlacement () =0;
|
|
|
|
|
virtual PAsset getMedia () =0; ///< @todo solve the reference/Interface problem concerning Placements, then push down
|
|
|
|
|
virtual Time& getLength() =0; ///< @todo how to deal with the time/length field??
|
2007-08-09 18:51:47 +02:00
|
|
|
|
|
|
|
|
};
|
2007-09-27 04:45:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef shared_ptr<MObject> PMO;
|
2007-08-09 18:51:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace mobject
|
2007-08-08 04:50:02 +02:00
|
|
|
#endif
|