[vlmc-devel] commit: Effect: Adding a getter for the author. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Sun Aug 22 22:54:23 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Aug 22 21:35:58 2010 +0200| [7477619b720f296b9e8477d61529e967ee069e76] | committer: Hugo Beauzée-Luyssen
Effect: Adding a getter for the author.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=7477619b720f296b9e8477d61529e967ee069e76
---
src/EffectsEngine/Effect.cpp | 9 +++++++++
src/EffectsEngine/Effect.h | 2 ++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/EffectsEngine/Effect.cpp b/src/EffectsEngine/Effect.cpp
index 93c7dd3..67a73fa 100644
--- a/src/EffectsEngine/Effect.cpp
+++ b/src/EffectsEngine/Effect.cpp
@@ -79,6 +79,7 @@ Effect::load()
m_major = infos.major_version;
m_minor = infos.minor_version;
m_nbParams = infos.num_params;
+ m_author = infos.author;
if ( m_type == Filter && m_f0r_update == NULL )
{
qCritical() << "Failed to load symbol f0r_update. Dropping module" << fileName();
@@ -169,3 +170,11 @@ Effect::params() const
{
return m_params;
}
+
+const QString&
+Effect::author()
+{
+ if ( isLoaded() == false )
+ load();
+ return m_author;
+}
diff --git a/src/EffectsEngine/Effect.h b/src/EffectsEngine/Effect.h
index f4c8c82..30e706e 100644
--- a/src/EffectsEngine/Effect.h
+++ b/src/EffectsEngine/Effect.h
@@ -60,6 +60,7 @@ class Effect : public QLibrary
const QString& name();
const QString& description();
Type type();
+ const QString& author();
const ParamList ¶ms() const;
//This breaks coding convention, but it would be safe just to undef major/minor.
int getMajor();
@@ -75,6 +76,7 @@ class Effect : public QLibrary
Type m_type;
int m_major;
int m_minor;
+ QString m_author;
int m_nbParams;
QAtomicInt m_instCount;
ParamList m_params;
More information about the Vlmc-devel
mailing list