From 2e390f1b0591be94914e8b48de449274b54b5867 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 2 Sep 2007 18:48:22 +0200 Subject: [PATCH] initial code generation/formatting for Asset subsystem --- src/proc/asset.cpp | 69 ++++++++++++++++++++ src/proc/asset.hpp | 125 ++++++++++++++++++++++++++++++++++++ src/proc/asset/category.cpp | 31 +++++++++ src/proc/asset/category.hpp | 40 ++++++++++++ src/proc/asset/clip.cpp | 33 ++++++++++ src/proc/asset/clip.hpp | 47 ++++++++++++++ src/proc/asset/codec.cpp | 31 +++++++++ src/proc/asset/codec.hpp | 45 +++++++++++++ src/proc/asset/dataset.cpp | 31 +++++++++ src/proc/asset/dataset.hpp | 42 ++++++++++++ src/proc/asset/effect.cpp | 31 +++++++++ src/proc/asset/effect.hpp | 45 +++++++++++++ src/proc/asset/media.cpp | 33 ++++++++++ src/proc/asset/media.hpp | 46 +++++++++++++ src/proc/asset/meta.cpp | 33 ++++++++++ src/proc/asset/meta.hpp | 46 +++++++++++++ src/proc/asset/outport.cpp | 31 +++++++++ src/proc/asset/outport.hpp | 46 +++++++++++++ src/proc/asset/preview.cpp | 31 +++++++++ src/proc/asset/preview.hpp | 45 +++++++++++++ src/proc/asset/proc.cpp | 33 ++++++++++ src/proc/asset/proc.hpp | 46 +++++++++++++ src/proc/asset/struct.cpp | 31 +++++++++ src/proc/asset/struct.hpp | 46 +++++++++++++ src/proc/asset/track.cpp | 33 ++++++++++ src/proc/asset/track.hpp | 46 +++++++++++++ src/proc/asset/unknown.cpp | 33 ++++++++++ src/proc/asset/unknown.hpp | 47 ++++++++++++++ src/proc/assetmanager.cpp | 70 ++++++++++++++++++++ src/proc/assetmanager.hpp | 67 +++++++++++++++++++ uml/cinelerra3/5.session | 19 +----- 31 files changed, 1336 insertions(+), 16 deletions(-) create mode 100644 src/proc/asset.cpp create mode 100644 src/proc/asset.hpp create mode 100644 src/proc/asset/category.cpp create mode 100644 src/proc/asset/category.hpp create mode 100644 src/proc/asset/clip.cpp create mode 100644 src/proc/asset/clip.hpp create mode 100644 src/proc/asset/codec.cpp create mode 100644 src/proc/asset/codec.hpp create mode 100644 src/proc/asset/dataset.cpp create mode 100644 src/proc/asset/dataset.hpp create mode 100644 src/proc/asset/effect.cpp create mode 100644 src/proc/asset/effect.hpp create mode 100644 src/proc/asset/media.cpp create mode 100644 src/proc/asset/media.hpp create mode 100644 src/proc/asset/meta.cpp create mode 100644 src/proc/asset/meta.hpp create mode 100644 src/proc/asset/outport.cpp create mode 100644 src/proc/asset/outport.hpp create mode 100644 src/proc/asset/preview.cpp create mode 100644 src/proc/asset/preview.hpp create mode 100644 src/proc/asset/proc.cpp create mode 100644 src/proc/asset/proc.hpp create mode 100644 src/proc/asset/struct.cpp create mode 100644 src/proc/asset/struct.hpp create mode 100644 src/proc/asset/track.cpp create mode 100644 src/proc/asset/track.hpp create mode 100644 src/proc/asset/unknown.cpp create mode 100644 src/proc/asset/unknown.hpp create mode 100644 src/proc/assetmanager.cpp create mode 100644 src/proc/assetmanager.hpp diff --git a/src/proc/asset.cpp b/src/proc/asset.cpp new file mode 100644 index 000000000..8d51ae61a --- /dev/null +++ b/src/proc/asset.cpp @@ -0,0 +1,69 @@ +/* + Asset} - Superinterface: bookeeping view of "things" present in the session + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset.hpp" +#include "proc/asset/category.hpp" + +namespace proc_interface + { + + + + /** + * List of entities this asset depends on or requires to be functional. May be empty. The head of this list can be considered the primary prerequisite + */ + vector + Asset::getParents () + { + } + + + /** + * All the other assets requiring this asset to be functional. For example, all the clips depending on a given media file. May be empty. The dependency relation is transitive. + */ + vector + Asset::getDependant () + { + } + + + /** + * weather this asset is swithced on and consequently included in the fixture and participates in rendering + */ + bool + Asset::isActive () + { + } + + + /** + * change the enabled status of this asset. Note the corresponding #isActive predicate may depend on the enablement status of parent assets as well + */ + void + Asset::enable () throw(cinelerra::error::State) + { + } + + + +} // namespace proc_interface diff --git a/src/proc/asset.hpp b/src/proc/asset.hpp new file mode 100644 index 000000000..e81e8e466 --- /dev/null +++ b/src/proc/asset.hpp @@ -0,0 +1,125 @@ +/* + ASSET.hpp - Superinterface: bookeeping view of "things" present in the session + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef PROC_INTERFACE_ASSET_H +#define PROC_INTERFACE_ASSET_H + +#include +#include +#include +#include "common/error.hpp" + +using std::string; +using std::vector; +using std::set; + + +namespace asset { class Category; } + + +namespace proc_interface + { + + typedef void* PAsset; //////TODO + + /** + * Superinterface describing especially the bookeeping properties of Assets + */ + class Asset + { + public: + /** Asset primary key. */ + const long id; + + /** element ID, comprehensible but sanitized. + * The tuple (category, name, org) is unique. + */ + const string name; + + /**primary tree like classification of the asset */ + const asset::Category* category; + + /** origin or authorship id. + * Can be a project abbreviation, a package id or just the authors nickname or UID. + * This allows for the compnent name to be more generic (e.g. "blur"). + * Default for all assets provided by the core cinelerra-3 codebase is "cin3". + */ + const string org; + + /** version number of the thing or concept represented by this asset. + * Of each unique tuple (name, category, org) there will be only one version + * in the whole system. Version 0 is reserved for internal purposes. + * Versions are considered to be ordered, and any higher version is + * supposed to be fully backwards compatible to all previous versions. + */ + const unsigned int version; + + + protected: + /** additional classification, selections or departments this asset belongs to. + * Groups are optional, non-exclusive and may be overlapping. + */ + set groups; + + /** user visible Name-ID. To be localized. */ + const string shortDesc; + + /** user visible qualification of the thing, unit or concept represented by this asset. + * perferably "in one line". To be localized. */ + const string longDesc; + + + public: + /** List of entities this asset depends on or requires to be functional. + * May be empty. The head of this list can be considered the primary prerequisite + */ + vector getParents () ; + + /** All the other assets requiring this asset to be functional. + * For example, all the clips depending on a given media file. + * May be empty. The dependency relation is transitive. + */ + vector getDependant () ; + + /** weather this asset is swithced on and consequently + * included in the fixture and participates in rendering + */ + bool isActive () ; + + /** change the enabled status of this asset. + * Note the corresponding #isActive predicate may + * depend on the enablement status of parent assets as well + */ + void enable () throw(cinelerra::error::State); + }; + +} // namespace proc_interface + + + +namespace asset + { + using proc_interface::Asset; +} + +#endif diff --git a/src/proc/asset/category.cpp b/src/proc/asset/category.cpp new file mode 100644 index 000000000..edd1b85af --- /dev/null +++ b/src/proc/asset/category.cpp @@ -0,0 +1,31 @@ +/* + Category - tree like classification of Assets + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/category.hpp" + +namespace asset + { + + + +} // namespace asset diff --git a/src/proc/asset/category.hpp b/src/proc/asset/category.hpp new file mode 100644 index 000000000..cbf7e0d9f --- /dev/null +++ b/src/proc/asset/category.hpp @@ -0,0 +1,40 @@ +/* + CATEGORY.hpp - tree like classification of Assets + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_CATEGORY_H +#define ASSET_CATEGORY_H + + + +namespace asset + { + /** + * tree like classification of Assets + */ + class Category + {}; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/clip.cpp b/src/proc/asset/clip.cpp new file mode 100644 index 000000000..b01ba5155 --- /dev/null +++ b/src/proc/asset/clip.cpp @@ -0,0 +1,33 @@ +/* + Clip(Asset) - bookkeeping (asset) view of a media clip. + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/clip.hpp" + +namespace asset + { + + /** */ + + + +} // namespace asset diff --git a/src/proc/asset/clip.hpp b/src/proc/asset/clip.hpp new file mode 100644 index 000000000..fea774b49 --- /dev/null +++ b/src/proc/asset/clip.hpp @@ -0,0 +1,47 @@ +/* + CLIP.hpp - bookkeeping (asset) view of a media clip. + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_CLIP_H +#define ASSET_CLIP_H + +#include "proc/asset/media.hpp" + + + +namespace asset + { + /** + * bookkeeping (Asset) view of a media clip. + */ + class Clip : public Media + { + protected: + /**media source of this clip */ + const Media* source; + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/codec.cpp b/src/proc/asset/codec.cpp new file mode 100644 index 000000000..d7fdac062 --- /dev/null +++ b/src/proc/asset/codec.cpp @@ -0,0 +1,31 @@ +/* + Codec(Asset) - description of some media data decoder or encoder facility + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/codec.hpp" + +namespace asset + { + + + +} // namespace asset diff --git a/src/proc/asset/codec.hpp b/src/proc/asset/codec.hpp new file mode 100644 index 000000000..8da2ff3bd --- /dev/null +++ b/src/proc/asset/codec.hpp @@ -0,0 +1,45 @@ +/* + CODEC.hpp - description of some media data decoder or encoder facility + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_CODEC_H +#define ASSET_CODEC_H + +#include "proc/asset/proc.hpp" + + + +namespace asset + { + + /** + * description of some media data decoder or encoder facility + */ + class Codec : public Proc + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/dataset.cpp b/src/proc/asset/dataset.cpp new file mode 100644 index 000000000..50e8e08ae --- /dev/null +++ b/src/proc/asset/dataset.cpp @@ -0,0 +1,31 @@ +/* + Dataset - meta asset describing a collection of control data + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/dataset.hpp" + +namespace asset + { + + + +} // namespace asset diff --git a/src/proc/asset/dataset.hpp b/src/proc/asset/dataset.hpp new file mode 100644 index 000000000..1d85c39e0 --- /dev/null +++ b/src/proc/asset/dataset.hpp @@ -0,0 +1,42 @@ +/* + DATASET.hpp - meta asset describing a collection of control data + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_DATASET_H +#define ASSET_DATASET_H + +#include "proc/asset/meta.hpp" + + + +namespace asset + { + + + /** + * meta asset describing a collection of control data + */ + class Dataset : public Meta + {}; + +} // namespace asset +#endif diff --git a/src/proc/asset/effect.cpp b/src/proc/asset/effect.cpp new file mode 100644 index 000000000..283bef53a --- /dev/null +++ b/src/proc/asset/effect.cpp @@ -0,0 +1,31 @@ +/* + Effect(Asset) - Effect or media processing component + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/effect.hpp" + +namespace asset + { + + + +} // namespace asset diff --git a/src/proc/asset/effect.hpp b/src/proc/asset/effect.hpp new file mode 100644 index 000000000..78ac66837 --- /dev/null +++ b/src/proc/asset/effect.hpp @@ -0,0 +1,45 @@ +/* + EFFECT.hpp - Effect or media processing component + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_EFFECT_H +#define ASSET_EFFECT_H + +#include "proc/asset/proc.hpp" + + + +namespace asset + { + + /** + * Effect or media processing component + */ + class Effect : public Proc + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/media.cpp b/src/proc/asset/media.cpp new file mode 100644 index 000000000..a50360e04 --- /dev/null +++ b/src/proc/asset/media.cpp @@ -0,0 +1,33 @@ +/* + Media(Asset) - key abstraction: media-like assets + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/media.hpp" + +namespace asset + { + + /** */ + + + +} // namespace asset diff --git a/src/proc/asset/media.hpp b/src/proc/asset/media.hpp new file mode 100644 index 000000000..ac0683704 --- /dev/null +++ b/src/proc/asset/media.hpp @@ -0,0 +1,46 @@ +/* + MEDIA.hpp - key abstraction: media-like assets + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_MEDIA_H +#define ASSET_MEDIA_H + +#include "proc/asset.hpp" + + + +namespace asset + { + + + /** + * key abstraction: media-like assets + */ + class Media : public proc_interface::Asset + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/meta.cpp b/src/proc/asset/meta.cpp new file mode 100644 index 000000000..fb0ff7c05 --- /dev/null +++ b/src/proc/asset/meta.cpp @@ -0,0 +1,33 @@ +/* + Meta(Asset) - key abstraction: metadata and organisational asset + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/meta.hpp" + +namespace asset + { + + /** */ + + + +} // namespace asset diff --git a/src/proc/asset/meta.hpp b/src/proc/asset/meta.hpp new file mode 100644 index 000000000..4cbd3f9c1 --- /dev/null +++ b/src/proc/asset/meta.hpp @@ -0,0 +1,46 @@ +/* + META.hpp - key abstraction: metadata and organisational asset + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_META_H +#define ASSET_META_H + +#include "proc/asset.hpp" + + + +namespace asset + { + + + /** + * key abstraction: metadata and organisational asset + */ + class Meta : public proc_interface::Asset + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/outport.cpp b/src/proc/asset/outport.cpp new file mode 100644 index 000000000..50e993ec9 --- /dev/null +++ b/src/proc/asset/outport.cpp @@ -0,0 +1,31 @@ +/* + OutPort - structural asset corresponding to some port generating media output + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/outport.hpp" + +namespace asset + { + + + +} // namespace asset diff --git a/src/proc/asset/outport.hpp b/src/proc/asset/outport.hpp new file mode 100644 index 000000000..e589a9f05 --- /dev/null +++ b/src/proc/asset/outport.hpp @@ -0,0 +1,46 @@ +/* + OUTPORT.hpp - structural asset corresponding to some port generating media output + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_OUTPORT_H +#define ASSET_OUTPORT_H + +#include "proc/asset/struct.hpp" + + + +namespace asset + { + + + /** + * structural asset corresponding to some port generating media output + */ + class OutPort : public Struct + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/preview.cpp b/src/proc/asset/preview.cpp new file mode 100644 index 000000000..85dc98596 --- /dev/null +++ b/src/proc/asset/preview.cpp @@ -0,0 +1,31 @@ +/* + Preview(Asset) - alternative version of the media data, probably with lower resolution + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/preview.hpp" + +namespace asset + { + + + +} // namespace asset diff --git a/src/proc/asset/preview.hpp b/src/proc/asset/preview.hpp new file mode 100644 index 000000000..cec3f6284 --- /dev/null +++ b/src/proc/asset/preview.hpp @@ -0,0 +1,45 @@ +/* + PREVIEW.hpp - alternative version of the media data, probably with lower resolution + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_PREVIEW_H +#define ASSET_PREVIEW_H + +#include "proc/asset/media.hpp" + + + +namespace asset + { + + /** + * alternative version of the media data, probably with lower resolution + */ + class Preview : public Media + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/proc.cpp b/src/proc/asset/proc.cpp new file mode 100644 index 000000000..b82ea49d7 --- /dev/null +++ b/src/proc/asset/proc.cpp @@ -0,0 +1,33 @@ +/* + Proc(Asset) - key abstraction: media-like assets + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/proc.hpp" + +namespace asset + { + + /** */ + + + +} // namespace asset diff --git a/src/proc/asset/proc.hpp b/src/proc/asset/proc.hpp new file mode 100644 index 000000000..003635b4f --- /dev/null +++ b/src/proc/asset/proc.hpp @@ -0,0 +1,46 @@ +/* + PROC.hpp - key abstraction: media-like assets + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_PROC_H +#define ASSET_PROC_H + +#include "proc/asset.hpp" + + + +namespace asset + { + + + /** + * key abstraction: data processing asset + */ + class Proc : public Asset + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/struct.cpp b/src/proc/asset/struct.cpp new file mode 100644 index 000000000..18769f497 --- /dev/null +++ b/src/proc/asset/struct.cpp @@ -0,0 +1,31 @@ +/* + Struct(Asset) - key abstraction: structural asset + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/struct.hpp" + +namespace asset + { + + + +} // namespace asset diff --git a/src/proc/asset/struct.hpp b/src/proc/asset/struct.hpp new file mode 100644 index 000000000..787c172dc --- /dev/null +++ b/src/proc/asset/struct.hpp @@ -0,0 +1,46 @@ +/* + STRUCT.hpp - key abstraction: structural asset + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_STRUCT_H +#define ASSET_STRUCT_H + +#include "proc/asset.hpp" + + + +namespace asset + { + + + /** + * key abstraction: structural asset + */ + class Struct : public Asset + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/track.cpp b/src/proc/asset/track.cpp new file mode 100644 index 000000000..1f9a4f03a --- /dev/null +++ b/src/proc/asset/track.cpp @@ -0,0 +1,33 @@ +/* + Track - structural asset holding the configuration of a track in the EDL + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/track.hpp" + +namespace asset + { + + /** */ + + + +} // namespace asset diff --git a/src/proc/asset/track.hpp b/src/proc/asset/track.hpp new file mode 100644 index 000000000..baece5d4e --- /dev/null +++ b/src/proc/asset/track.hpp @@ -0,0 +1,46 @@ +/* + TRACK.hpp - structural asset holding the configuration of a track in the EDL + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_TRACK_H +#define ASSET_TRACK_H + +#include "proc/asset/struct.hpp" + + + +namespace asset + { + + + /** + * Structural Asset holding the configuration of a track in the EDL + */ + class Track : public Struct + { + + }; + + + +} // namespace asset +#endif diff --git a/src/proc/asset/unknown.cpp b/src/proc/asset/unknown.cpp new file mode 100644 index 000000000..8e4e558cd --- /dev/null +++ b/src/proc/asset/unknown.cpp @@ -0,0 +1,33 @@ +/* + Unknown - placeholder for unknown or unavailable media source + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/asset/unknown.hpp" + +namespace asset + { + + /** */ + + + +} // namespace asset diff --git a/src/proc/asset/unknown.hpp b/src/proc/asset/unknown.hpp new file mode 100644 index 000000000..c75cbcab5 --- /dev/null +++ b/src/proc/asset/unknown.hpp @@ -0,0 +1,47 @@ +/* + UNKNOWN.hpp - placeholder for unknown or unavailable media source + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef ASSET_UNKNOWN_H +#define ASSET_UNKNOWN_H + +#include "proc/asset/preview.hpp" + + + +namespace asset + { + + + /** + * Placeholder Asset for unknown or unavailable media source. + */ + class Unknown : public Preview + { + + }; + + + + +} // namespace asset +#endif diff --git a/src/proc/assetmanager.cpp b/src/proc/assetmanager.cpp new file mode 100644 index 000000000..14fc7afff --- /dev/null +++ b/src/proc/assetmanager.cpp @@ -0,0 +1,70 @@ +/* + AssetManager - Facade for the Asset subsystem + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +* *****************************************************/ + + +#include "proc/assetmanager.hpp" + +namespace proc_interface + { + + + + /** + * registers an asset object in the internal DB, providing its unique key + */ + long + AssetManager::reg (string& name, string& category, string& org, uint version) + //throw(cinelerra::error::Invalid) + { + } + + + /** + * find and return corresponging object + */ + template ////TODO: does this work???? + KIND + AssetManager::getAsset (long id) ////throw(cinelerra::Invalid) + { + } + + + /** + * @return true if the given id is registered in the internal asset DB + */ + bool + AssetManager::known (long id) + { + } + + + /** + * remove the given asset together with all its dependants from the internal DB + */ + void + AssetManager::remove (long id) /////throw(cinelerra::Invalid, cinelerra::State) + { + } + + + +} // namespace proc_interface diff --git a/src/proc/assetmanager.hpp b/src/proc/assetmanager.hpp new file mode 100644 index 000000000..b85113bbb --- /dev/null +++ b/src/proc/assetmanager.hpp @@ -0,0 +1,67 @@ +/* + ASSETMANAGER.hpp - Facade for the Asset subsystem + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + + 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. + +*/ + + +#ifndef PROC_INTERFACE_ASSETMANAGER_H +#define PROC_INTERFACE_ASSETMANAGER_H + +#include + +#include "common/error.hpp" + + +using std::string; + + +namespace proc_interface + { + + /** + * Facade for the Asset subsystem + */ + class AssetManager + { + int bla; + public: + /** registers an asset object in the internal DB, providing its unique key + */ + static long reg (string& name, string& category, string& org, uint version) + ; + // throw(cinelerra::error::Invalid); + + /** find and return corresponging object */ + template +// void* /////////////////TODO + KIND + getAsset (long id) ;///throw(cinelerra::error::Invalid); + + /** @return true if the given id is registered in the internal asset DB */ + bool known (long id) ; + + /**remove the given asset from the internal DB. + * together with all its dependants + */ + void remove (long id) ;///throw(cinelerra::error::Invalid, cinelerra::error::State); + }; + +} // namespace proc_interface +#endif diff --git a/uml/cinelerra3/5.session b/uml/cinelerra3/5.session index e0bcf446f..b106f468a 100644 --- a/uml/cinelerra3/5.session +++ b/uml/cinelerra3/5.session @@ -1,27 +1,14 @@ window_sizes 1140 783 270 860 584 120 diagrams active classdiagram_ref 130309 // Asset Kinds - 853 560 100 4 0 2 + 860 584 100 4 0 0 end show_stereotypes selected - package_ref 129 // cinelerra3 +package_ref 129 // cinelerra3 open - package_ref 129413 // common - deploymentview_ref 128517 // gen - artifact_ref 135941 // category - artifact_ref 136453 // media - artifact_ref 136581 // proc - artifact_ref 136709 // struct - artifact_ref 136965 // preview - artifact_ref 137093 // unknown - artifact_ref 137221 // effect - artifact_ref 137605 // outport - artifact_ref 137477 // track - deploymentview_ref 128773 // gen - - package_ref 129797 // gui +package_ref 128005 // design class_ref 136453 // Asset class_ref 136581 // AssetManager class_ref 136709 // Media