2007-08-08 04:50:02 +02:00
|
|
|
/*
|
2015-05-30 22:09:26 +02:00
|
|
|
FORK.hpp - A grouping device within the Session.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-03-10 04:25:03 +01:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
2010-12-17 23:28:49 +01:00
|
|
|
|
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
|
2010-12-17 23:28:49 +01:00
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
|
the License, or (at your option) any later version.
|
|
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
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.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
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.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2015-05-30 22:09:26 +02:00
|
|
|
#ifndef MOBJECT_SESSION_FORK_H
|
|
|
|
|
#define MOBJECT_SESSION_FORK_H
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2008-01-07 18:16:03 +01:00
|
|
|
#include "proc/mobject/session/meta.hpp"
|
2010-06-14 02:08:45 +02:00
|
|
|
#include "proc/asset/entry-id.hpp"
|
2011-05-16 08:37:36 +02:00
|
|
|
#include "lib/time/timevalue.hpp"
|
2007-08-08 04:50:02 +02:00
|
|
|
|
|
|
|
|
|
2008-01-07 18:16:03 +01:00
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
namespace proc {
|
2009-05-29 07:10:54 +02:00
|
|
|
namespace mobject {
|
2010-06-14 02:08:45 +02:00
|
|
|
namespace session { //////////////////////////////////////////////////////TICKET #637
|
2011-12-02 16:10:03 +01:00
|
|
|
|
|
|
|
|
using lib::P;
|
|
|
|
|
using lib::time::Time;
|
|
|
|
|
|
|
|
|
|
class Track;
|
|
|
|
|
|
|
|
|
|
typedef P<Track> PTrack;
|
|
|
|
|
|
2010-06-14 02:08:45 +02:00
|
|
|
}}
|
2011-12-02 16:10:03 +01:00
|
|
|
|
2010-06-14 02:08:45 +02:00
|
|
|
namespace asset { //////////////////////////////////////////////////////TICKET #637
|
|
|
|
|
|
|
|
|
|
typedef EntryID<mobject::session::Track> TrackID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace mobject {
|
|
|
|
|
namespace session {
|
|
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
using asset::TrackID;
|
|
|
|
|
|
2010-06-14 02:08:45 +02:00
|
|
|
|
2011-05-16 08:37:36 +02:00
|
|
|
//////////////////////////////////////////////////////TICKET #646
|
|
|
|
|
//////////////////////////////////////////////////////TICKET #715
|
|
|
|
|
|
2007-08-09 18:51:47 +02:00
|
|
|
/**
|
2010-02-22 03:52:52 +01:00
|
|
|
* A Track is grouping device within the Session.
|
2009-05-29 07:10:54 +02:00
|
|
|
* The corresponding Placement by which this Track object is referred
|
2008-01-07 18:16:03 +01:00
|
|
|
* defines fallback placing properties to be used by all objects placed on this track
|
|
|
|
|
* in case they don't specify more concrete placements.
|
2008-02-14 04:12:30 +01:00
|
|
|
* Typically, tracks are used do make default processing pipe connections,
|
2008-01-07 18:16:03 +01:00
|
|
|
* define a layer or pan for sound and for for disabling groups
|
|
|
|
|
* of clips. Note tracks are grouped in a tree like fashion.
|
2008-04-11 06:24:27 +02:00
|
|
|
* \par
|
2009-05-29 07:10:54 +02:00
|
|
|
* This Media Object (often referred to as "track-MO") is always dealt with
|
2010-02-22 03:52:52 +01:00
|
|
|
* locally within one Sequence. Client code normally doesn't have to care for creating
|
2009-05-29 07:10:54 +02:00
|
|
|
* or retrieving track-MO. Rather, it refers to the global track-asset-ID. The same
|
2008-04-11 06:24:27 +02:00
|
|
|
* holds true when placing some other Media Object onto a track: the corresponding
|
2010-02-22 03:52:52 +01:00
|
|
|
* placement just refers the global trackID, while the builder automatically retrieves the
|
|
|
|
|
* matching track-MO for the Sequence in question. If the Session contains several instances
|
2009-05-29 07:10:54 +02:00
|
|
|
* (track-MO) referring to the same trackID (asset), then this causes all objects placed
|
2008-04-11 06:24:27 +02:00
|
|
|
* onto this track to be included several times in the resulting render nodes network
|
2010-03-06 04:30:12 +01:00
|
|
|
* (possibly with varying placement properties) //////////////TODO 3/2010 likely *not* implementing this feature, because we have sequences
|
2007-08-09 18:51:47 +02:00
|
|
|
*/
|
2008-01-07 18:16:03 +01:00
|
|
|
class Track : public Meta
|
2007-08-08 04:50:02 +02:00
|
|
|
{
|
2011-05-16 08:37:36 +02:00
|
|
|
Time start_; /////////////////////////////////TODO: this doesn't belong here. The start position is governed by the Placement!!!
|
2010-06-14 02:08:45 +02:00
|
|
|
TrackID id_;
|
2008-01-07 18:16:03 +01:00
|
|
|
|
2010-10-12 03:34:42 +02:00
|
|
|
|
|
|
|
|
string
|
|
|
|
|
initShortID() const
|
|
|
|
|
{
|
|
|
|
|
return buildShortID("Fork");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isValid() const;
|
|
|
|
|
|
2008-01-07 18:16:03 +01:00
|
|
|
protected:
|
2010-06-14 02:08:45 +02:00
|
|
|
Track (TrackID const&);
|
2008-01-07 18:16:03 +01:00
|
|
|
friend class MObjectFactory;
|
2009-05-29 07:10:54 +02:00
|
|
|
|
2008-01-07 18:16:03 +01:00
|
|
|
public:
|
|
|
|
|
/** Child tracks in a tree structure */
|
2010-06-20 05:19:47 +02:00
|
|
|
// vector<Placement<Track> > subTracks; ///////////TODO: it should really work with PlacementRefs! this here is just a decoy!!!!!!!
|
2010-01-08 03:59:01 +01:00
|
|
|
/////////////////////////////////////////////////////////TICKET #513
|
|
|
|
|
|
2010-06-20 05:19:47 +02:00
|
|
|
bool isSameID (string const&);
|
2008-01-07 18:16:03 +01:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2010-06-20 05:19:47 +02:00
|
|
|
|
|
|
|
|
inline bool
|
|
|
|
|
Track::isSameID(string const& refID)
|
|
|
|
|
{
|
|
|
|
|
return refID == id_.getSym();
|
|
|
|
|
}
|
2011-12-02 16:10:03 +01:00
|
|
|
|
|
|
|
|
|
2007-08-09 18:51:47 +02:00
|
|
|
} // namespace mobject::session
|
2008-01-07 18:16:03 +01:00
|
|
|
|
2009-05-29 07:10:54 +02:00
|
|
|
/** Placement<Track> defined to be subclass of Placement<Meta> */
|
|
|
|
|
template class Placement<session::Track, session::Meta>;
|
2009-06-09 09:05:19 +02:00
|
|
|
typedef Placement<session::Track, session::Meta> PTrack;
|
2009-05-29 07:10:54 +02:00
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
}} // namespace proc::mobject
|
2015-05-30 22:09:26 +02:00
|
|
|
#endif /*MOBJECT_SESSION_FORK_H*/
|