Hello community,
here is the log from the commit of package kfilemetadata5 for openSUSE:Factory checked in at 2014-10-01 11:22:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kfilemetadata5 (Old)
and /work/SRC/openSUSE:Factory/.kfilemetadata5.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kfilemetadata5"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kfilemetadata5/kfilemetadata5.changes 2014-09-12 17:05:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kfilemetadata5.new/kfilemetadata5.changes 2014-10-01 11:22:43.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Sep 25 22:32:40 UTC 2014 - hrvoje.senjan@gmail.com
+
+- Update to 5.0.95:
+ * Minor API adjustements since previous snapshot
+
+-------------------------------------------------------------------
Old:
----
kfilemetadata-5.0.95~git20140911.tar.xz
New:
----
kfilemetadata-5.0.95.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kfilemetadata5.spec ++++++
--- /var/tmp/diff_new_pack.WIXLJA/_old 2014-10-01 11:22:44.000000000 +0200
+++ /var/tmp/diff_new_pack.WIXLJA/_new 2014-10-01 11:22:44.000000000 +0200
@@ -17,7 +17,7 @@
Name: kfilemetadata5
-Version: 5.0.95~git20140911
+Version: 5.0.95
Release: 0
Summary: Extract Metadata
License: GPL-2.0+ and LGPL-2.1+ and LGPL-3.0
++++++ kfilemetadata-5.0.95~git20140911.tar.xz -> kfilemetadata-5.0.95.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/CMakeLists.txt new/kfilemetadata-5.0.95/CMakeLists.txt
--- old/kfilemetadata-5.0.95~git20140911/CMakeLists.txt 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/CMakeLists.txt 2014-09-25 20:40:08.000000000 +0200
@@ -22,7 +22,7 @@
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX KFILEMETADATA
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5FileMetaDataConfigVersion.cmake"
- SOVERSION 1)
+ SOVERSION 2)
# Build dependencies
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Xml)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/CMakeLists.txt new/kfilemetadata-5.0.95/src/CMakeLists.txt
--- old/kfilemetadata-5.0.95~git20140911/src/CMakeLists.txt 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/src/CMakeLists.txt 2014-09-25 20:40:08.000000000 +0200
@@ -1,8 +1,9 @@
add_library(KF5FileMetaData
extractionresult.cpp
simpleextractionresult.cpp
+ extractor.cpp
extractorplugin.cpp
- extractorpluginmanager.cpp
+ extractorcollection.cpp
propertyinfo.cpp
typeinfo.cpp
)
@@ -30,8 +31,9 @@
HEADER_NAMES
ExtractionResult
SimpleExtractionResult
+ Extractor
ExtractorPlugin
- ExtractorPluginManager
+ ExtractorCollection
Properties
PropertyInfo
Types
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractor.cpp new/kfilemetadata-5.0.95/src/extractor.cpp
--- old/kfilemetadata-5.0.95~git20140911/src/extractor.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kfilemetadata-5.0.95/src/extractor.cpp 2014-09-25 20:40:08.000000000 +0200
@@ -0,0 +1,46 @@
+/*
+ *
+ * Copyright (C) 2014 Vishesh Handa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "extractor.h"
+#include "extractor_p.h"
+#include "extractorplugin.h"
+
+using namespace KFileMetaData;
+
+Extractor::Extractor()
+ : d(new ExtractorPrivate)
+{
+}
+
+Extractor::~Extractor()
+{
+ delete d->m_plugin;
+ delete d;
+}
+
+void Extractor::extract(ExtractionResult* result)
+{
+ d->m_plugin->extract(result);
+}
+
+QStringList Extractor::mimetypes() const
+{
+ return d->m_plugin->mimetypes();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractor.h new/kfilemetadata-5.0.95/src/extractor.h
--- old/kfilemetadata-5.0.95~git20140911/src/extractor.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kfilemetadata-5.0.95/src/extractor.h 2014-09-25 20:40:08.000000000 +0200
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright (C) 2014 Vishesh Handa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef KFILEMETADATA_EXTRACTOR_H
+#define KFILEMETADATA_EXTRACTOR_H
+
+#include "kfilemetadata_export.h"
+#include <QStringList>
+
+namespace KFileMetaData {
+
+class ExtractionResult;
+class ExtractorCollection;
+class ExtractorPrivate;
+
+class KFILEMETADATA_EXPORT Extractor
+{
+public:
+ virtual ~Extractor();
+
+ void extract(ExtractionResult* result);
+ QStringList mimetypes() const;
+
+private:
+ Extractor();
+ Extractor(const Extractor&);
+
+ void operator =(const Extractor&);
+
+ ExtractorPrivate *d;
+ friend class ExtractorCollection;
+};
+}
+
+#endif // KFILEMETADATA_EXTRACTOR_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractor_p.h new/kfilemetadata-5.0.95/src/extractor_p.h
--- old/kfilemetadata-5.0.95~git20140911/src/extractor_p.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kfilemetadata-5.0.95/src/extractor_p.h 2014-09-25 20:40:08.000000000 +0200
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright (C) 2014 Vishesh Handa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef KFILEMETADATA_EXTRACTOR_P_H
+#define KFILEMETADATA_EXTRACTOR_P_H
+
+namespace KFileMetaData {
+
+class ExtractorPlugin;
+
+class ExtractorPrivate
+{
+public:
+ ExtractorPlugin *m_plugin;
+};
+
+}
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractorcollection.cpp new/kfilemetadata-5.0.95/src/extractorcollection.cpp
--- old/kfilemetadata-5.0.95~git20140911/src/extractorcollection.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kfilemetadata-5.0.95/src/extractorcollection.cpp 2014-09-25 20:40:08.000000000 +0200
@@ -0,0 +1,129 @@
+/*
+ *
+ * Copyright (C) 2012 Vishesh Handa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "extractor.h"
+#include "extractorplugin.h"
+#include "extractorcollection.h"
+#include "extractor_p.h"
+
+#include <QDebug>
+#include <QCoreApplication>
+#include <QPluginLoader>
+#include <QDir>
+
+using namespace KFileMetaData;
+
+class ExtractorCollection::Private {
+public:
+ QHash m_extractors;
+
+ QList allExtractors() const;
+};
+
+ExtractorCollection::ExtractorCollection()
+ : d(new Private)
+{
+ QList all = d->allExtractors();
+
+ foreach (Extractor* ex, all) {
+ foreach (const QString& type, ex->mimetypes()) {
+ d->m_extractors.insertMulti(type, ex);
+ }
+ }
+}
+
+ExtractorCollection::~ExtractorCollection()
+{
+ qDeleteAll(d->m_extractors.values().toSet());
+ delete d;
+}
+
+
+QList ExtractorCollection::Private::allExtractors() const
+{
+ QStringList plugins;
+ QStringList pluginPaths;
+
+ QStringList paths = QCoreApplication::libraryPaths();
+ Q_FOREACH (const QString& libraryPath, paths) {
+ QString path(libraryPath + QStringLiteral("/kf5/kfilemetadata"));
+ QDir dir(path);
+
+ if (!dir.exists()) {
+ continue;
+ }
+
+ QStringList entryList = dir.entryList(QDir::Files | QDir::NoDotAndDotDot);
+ Q_FOREACH (const QString& fileName, entryList) {
+ // Make sure the same plugin is not loaded twice, even if it
+ // installed in two different locations
+ if (plugins.contains(fileName))
+ continue;
+
+ plugins << fileName;
+ pluginPaths << dir.absoluteFilePath(fileName);
+ }
+ }
+ plugins.clear();
+
+ QList extractors;
+ Q_FOREACH (const QString& pluginPath, pluginPaths) {
+ QPluginLoader loader(pluginPath);
+
+ if (!loader.load()) {
+ qWarning() << "Could not create Extractor: " << pluginPath;
+ qWarning() << loader.errorString();
+ continue;
+ }
+
+ QObject* obj = loader.instance();
+ if (obj) {
+ ExtractorPlugin* plugin = qobject_cast(obj);
+ if (plugin) {
+ Extractor* ex= new Extractor;
+ ex->d->m_plugin = plugin;
+
+ extractors << ex;
+ } else {
+ qDebug() << "Plugin could not be converted to an ExtractorPlugin";
+ qDebug() << pluginPath;
+ }
+ }
+ else {
+ qDebug() << "Plugin could not creaate instance" << pluginPath;
+ }
+ }
+
+ return extractors;
+}
+
+QList ExtractorCollection::fetchExtractors(const QString& mimetype) const
+{
+ QList plugins = d->m_extractors.values(mimetype);
+ if (plugins.isEmpty()) {
+ auto it = d->m_extractors.constBegin();
+ for (; it != d->m_extractors.constEnd(); it++) {
+ if (mimetype.startsWith(it.key()))
+ plugins << it.value();
+ }
+ }
+
+ return plugins;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractorcollection.h new/kfilemetadata-5.0.95/src/extractorcollection.h
--- old/kfilemetadata-5.0.95~git20140911/src/extractorcollection.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kfilemetadata-5.0.95/src/extractorcollection.h 2014-09-25 20:40:08.000000000 +0200
@@ -0,0 +1,64 @@
+/*
+ *
+ * Copyright (C) 2012 Vishesh Handa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef _KFILEMETADATA_EXTRACTORCOLLECTION_H
+#define _KFILEMETADATA_EXTRACTORCOLLECTION_H
+
+#include "kfilemetadata_export.h"
+
+namespace KFileMetaData
+{
+
+class Extractor;
+
+/**
+ * \class ExtractorCollection extractorcollection.h
+ *
+ * \brief The ExtractorCollection is a helper class which internally
+ * loads all the extractor plugins. It can be used to fetch a certain
+ * subset of thse pulgins based on a given mimetype.
+ *
+ * Once the appropriate plugins have been fetched, an ExtractionResult
+ * should be created and passed to the plugin's extract function.
+ *
+ * \author Vishesh Handa
+ */
+class KFILEMETADATA_EXPORT ExtractorCollection
+{
+public:
+ explicit ExtractorCollection();
+ virtual ~ExtractorCollection();
+
+ /**
+ * Fetch the extractors which can be used to extract
+ * data for the respective file with the given mimetype.
+ *
+ * If no match is found then all the plugins whose mimetype list
+ * starts with \p mimetype are returned.
+ */
+ QList fetchExtractors(const QString& mimetype) const;
+
+private:
+ class Private;
+ Private* d;
+};
+}
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractorpluginmanager.cpp new/kfilemetadata-5.0.95/src/extractorpluginmanager.cpp
--- old/kfilemetadata-5.0.95~git20140911/src/extractorpluginmanager.cpp 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/src/extractorpluginmanager.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,124 +0,0 @@
-/*
- *
- * Copyright (C) 2012 Vishesh Handa
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#include "extractorplugin.h"
-#include "extractorpluginmanager.h"
-
-#include <QDebug>
-#include <QCoreApplication>
-#include <QPluginLoader>
-#include <QDir>
-
-using namespace KFileMetaData;
-
-class ExtractorPluginManager::Private {
-public:
- QHash m_extractors;
-
- QList allExtractors() const;
-};
-
-ExtractorPluginManager::ExtractorPluginManager()
- : d(new Private)
-{
- QList all = d->allExtractors();
-
- foreach (ExtractorPlugin* ex, all) {
- foreach (const QString& type, ex->mimetypes()) {
- d->m_extractors.insertMulti(type, ex);
- }
- }
-}
-
-ExtractorPluginManager::~ExtractorPluginManager()
-{
- qDeleteAll(d->m_extractors.values().toSet());
- delete d;
-}
-
-
-QList ExtractorPluginManager::Private::allExtractors() const
-{
- QStringList plugins;
- QStringList pluginPaths;
-
- QStringList paths = QCoreApplication::libraryPaths();
- Q_FOREACH (const QString& libraryPath, paths) {
- QString path(libraryPath + QStringLiteral("/kf5/kfilemetadata"));
- QDir dir(path);
-
- if (!dir.exists()) {
- continue;
- }
-
- QStringList entryList = dir.entryList(QDir::Files | QDir::NoDotAndDotDot);
- Q_FOREACH (const QString& fileName, entryList) {
- // Make sure the same plugin is not loaded twice, even if it
- // installed in two different locations
- if (plugins.contains(fileName))
- continue;
-
- plugins << fileName;
- pluginPaths << dir.absoluteFilePath(fileName);
- }
- }
- plugins.clear();
-
- QList extractors;
- Q_FOREACH (const QString& pluginPath, pluginPaths) {
- QPluginLoader loader(pluginPath);
-
- if (!loader.load()) {
- qWarning() << "Could not create Extractor: " << pluginPath;
- qWarning() << loader.errorString();
- continue;
- }
-
- QObject* obj = loader.instance();
- if (obj) {
- ExtractorPlugin* ex = qobject_cast(obj);
- if (ex) {
- extractors << ex;
- } else {
- qDebug() << "Plugin could not be converted to an ExtractorPlugin";
- qDebug() << pluginPath;
- }
- }
- else {
- qDebug() << "Plugin could not creaate instance" << pluginPath;
- }
- }
-
- return extractors;
-}
-
-QList ExtractorPluginManager::fetchExtractors(const QString& mimetype) const
-{
- QList plugins = d->m_extractors.values(mimetype);
- if (plugins.isEmpty()) {
- QHash::const_iterator it = d->m_extractors.constBegin();
- for (; it != d->m_extractors.constEnd(); it++) {
- if (mimetype.startsWith(it.key()))
- plugins << it.value();
- }
- }
-
- return plugins;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractorpluginmanager.h new/kfilemetadata-5.0.95/src/extractorpluginmanager.h
--- old/kfilemetadata-5.0.95~git20140911/src/extractorpluginmanager.h 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/src/extractorpluginmanager.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,65 +0,0 @@
-/*
- *
- * Copyright (C) 2012 Vishesh Handa
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef _KFILEMETADATA_EXTRACTORPLUGINMANAGER_H
-#define _KFILEMETADATA_EXTRACTORPLUGINMANAGER_H
-
-#include
-#include "kfilemetadata_export.h"
-
-namespace KFileMetaData
-{
-
-class ExtractorPlugin;
-
-/**
- * \class ExtractorPluginManager extractorpluginmanager.h
- *
- * \brief The ExtractorPluginManager is a helper class which internally
- * loads all the extractor plugins. It can be used to fetch a certain
- * subset of thse pulgins based on a given mimetype.
- *
- * Once the appropriate plugins have been fetched, an ExtractionResult
- * should be created and passed to the plugin's extract function.
- *
- * \author Vishesh Handa
- */
-class KFILEMETADATA_EXPORT ExtractorPluginManager
-{
-public:
- explicit ExtractorPluginManager();
- virtual ~ExtractorPluginManager();
-
- /**
- * Fetch the extractors which can be used to extract
- * data for the respective file with the given mimetype.
- *
- * If no match is found then all the plugins whose mimetype list
- * starts with \p mimetype are returned.
- */
- QList fetchExtractors(const QString& mimetype) const;
-
-private:
- class Private;
- Private* d;
-};
-}
-
-#endif // _KFILEMETADATA_EXTRACTORPLUGINMANAGER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractors/ffmpegextractor.cpp new/kfilemetadata-5.0.95/src/extractors/ffmpegextractor.cpp
--- old/kfilemetadata-5.0.95~git20140911/src/extractors/ffmpegextractor.cpp 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/src/extractors/ffmpegextractor.cpp 2014-09-25 20:40:08.000000000 +0200
@@ -1,6 +1,5 @@
/*
-
- Copyright (C) 2012 Vishesh Handa
+ Copyright (C) 2012-2014 Vishesh Handa
Code adapted from Strigi FFmpeg Analyzer -
Copyright (C) 2010 Evgeny Egorochkin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/extractors/ffmpegextractor.h new/kfilemetadata-5.0.95/src/extractors/ffmpegextractor.h
--- old/kfilemetadata-5.0.95~git20140911/src/extractors/ffmpegextractor.h 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/src/extractors/ffmpegextractor.h 2014-09-25 20:40:08.000000000 +0200
@@ -1,5 +1,4 @@
/*
-
Copyright (C) 2012 Vishesh Handa
This library is free software; you can redistribute it and/or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/src/propertyinfo.cpp new/kfilemetadata-5.0.95/src/propertyinfo.cpp
--- old/kfilemetadata-5.0.95~git20140911/src/propertyinfo.cpp 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/src/propertyinfo.cpp 2014-09-25 20:40:08.000000000 +0200
@@ -409,59 +409,56 @@
PropertyInfo PropertyInfo::fromName(const QString& name)
{
- static QHash propertyHash;
-
- // FIXME: Multi-threading?
- if (propertyHash.isEmpty()) {
- propertyHash.insert(QStringLiteral("bitrate"), Property::BitRate);
- propertyHash.insert(QStringLiteral("channels"), Property::Channels);
- propertyHash.insert(QStringLiteral("duration"), Property::Duration);
- propertyHash.insert(QStringLiteral("genre"), Property::Genre);
- propertyHash.insert(QStringLiteral("samplerate"), Property::SampleRate);
- propertyHash.insert(QStringLiteral("tracknumber"), Property::TrackNumber);
- propertyHash.insert(QStringLiteral("releaseyear"), Property::ReleaseYear);
- propertyHash.insert(QStringLiteral("comment"), Property::Comment);
- propertyHash.insert(QStringLiteral("artist"), Property::Artist);
- propertyHash.insert(QStringLiteral("album"), Property::Album);
- propertyHash.insert(QStringLiteral("albumartist"), Property::AlbumArtist);
- propertyHash.insert(QStringLiteral("composer"), Property::Composer);
- propertyHash.insert(QStringLiteral("lyricist"), Property::Lyricist);
- propertyHash.insert(QStringLiteral("author"), Property::Author);
- propertyHash.insert(QStringLiteral("title"), Property::Title);
- propertyHash.insert(QStringLiteral("subject"), Property::Subject);
- propertyHash.insert(QStringLiteral("generator"), Property::Generator);
- propertyHash.insert(QStringLiteral("pagecount"), Property::PageCount);
- propertyHash.insert(QStringLiteral("wordcount"), Property::WordCount);
- propertyHash.insert(QStringLiteral("linecount"), Property::LineCount);
- propertyHash.insert(QStringLiteral("language"), Property::Langauge);
- propertyHash.insert(QStringLiteral("copyright"), Property::Copyright);
- propertyHash.insert(QStringLiteral("publisher"), Property::Publisher);
- propertyHash.insert(QStringLiteral("creationdate"), Property::CreationDate);
- propertyHash.insert(QStringLiteral("keywords"), Property::Keywords);
- propertyHash.insert(QStringLiteral("width"), Property::Width);
- propertyHash.insert(QStringLiteral("height"), Property::Height);
- propertyHash.insert(QStringLiteral("aspectratio"), Property::AspectRatio);
- propertyHash.insert(QStringLiteral("framerate"), Property::FrameRate);
- propertyHash.insert(QStringLiteral("imagemake"), Property::ImageMake);
- propertyHash.insert(QStringLiteral("imagemodel"), Property::ImageModel);
- propertyHash.insert(QStringLiteral("imagedatetime"), Property::ImageDateTime);
- propertyHash.insert(QStringLiteral("imageorientation"), Property::ImageOrientation);
- propertyHash.insert(QStringLiteral("photoflash"), Property::PhotoFlash);
- propertyHash.insert(QStringLiteral("photopixelxdimension"), Property::PhotoPixelXDimension);
- propertyHash.insert(QStringLiteral("photopixelydimension"), Property::PhotoPixelYDimension);
- propertyHash.insert(QStringLiteral("photodatetimeoriginal"), Property::PhotoDateTimeOriginal);
- propertyHash.insert(QStringLiteral("photofocallength"), Property::PhotoFocalLength);
- propertyHash.insert(QStringLiteral("photofocallengthin35mmfilm"), Property::PhotoFocalLengthIn35mmFilm);
- propertyHash.insert(QStringLiteral("photoexposuretime"), Property::PhotoExposureTime);
- propertyHash.insert(QStringLiteral("photofnumber"), Property::PhotoFNumber);
- propertyHash.insert(QStringLiteral("photoaperturevalue"), Property::PhotoApertureValue);
- propertyHash.insert(QStringLiteral("photoexposurebiasvalue"), Property::PhotoExposureBiasValue);
- propertyHash.insert(QStringLiteral("photowhitebalance"), Property::PhotoWhiteBalance);
- propertyHash.insert(QStringLiteral("photometeringmode"), Property::PhotoMeteringMode);
- propertyHash.insert(QStringLiteral("photoisospeedratings"), Property::PhotoISOSpeedRatings);
- propertyHash.insert(QStringLiteral("photosaturation"), Property::PhotoSaturation);
- propertyHash.insert(QStringLiteral("photosharpness"), Property::PhotoSharpness);
- }
+ static QHash propertyHash = {
+ { QStringLiteral("bitrate"), Property::BitRate },
+ { QStringLiteral("channels"), Property::Channels },
+ { QStringLiteral("duration"), Property::Duration },
+ { QStringLiteral("genre"), Property::Genre },
+ { QStringLiteral("samplerate"), Property::SampleRate },
+ { QStringLiteral("tracknumber"), Property::TrackNumber },
+ { QStringLiteral("releaseyear"), Property::ReleaseYear },
+ { QStringLiteral("comment"), Property::Comment },
+ { QStringLiteral("artist"), Property::Artist },
+ { QStringLiteral("album"), Property::Album },
+ { QStringLiteral("albumartist"), Property::AlbumArtist },
+ { QStringLiteral("composer"), Property::Composer },
+ { QStringLiteral("lyricist"), Property::Lyricist },
+ { QStringLiteral("author"), Property::Author },
+ { QStringLiteral("title"), Property::Title },
+ { QStringLiteral("subject"), Property::Subject },
+ { QStringLiteral("generator"), Property::Generator },
+ { QStringLiteral("pagecount"), Property::PageCount },
+ { QStringLiteral("wordcount"), Property::WordCount },
+ { QStringLiteral("linecount"), Property::LineCount },
+ { QStringLiteral("language"), Property::Langauge },
+ { QStringLiteral("copyright"), Property::Copyright },
+ { QStringLiteral("publisher"), Property::Publisher },
+ { QStringLiteral("creationdate"), Property::CreationDate },
+ { QStringLiteral("keywords"), Property::Keywords },
+ { QStringLiteral("width"), Property::Width },
+ { QStringLiteral("height"), Property::Height },
+ { QStringLiteral("aspectratio"), Property::AspectRatio },
+ { QStringLiteral("framerate"), Property::FrameRate },
+ { QStringLiteral("imagemake"), Property::ImageMake },
+ { QStringLiteral("imagemodel"), Property::ImageModel },
+ { QStringLiteral("imagedatetime"), Property::ImageDateTime },
+ { QStringLiteral("imageorientation"), Property::ImageOrientation },
+ { QStringLiteral("photoflash"), Property::PhotoFlash },
+ { QStringLiteral("photopixelxdimension"), Property::PhotoPixelXDimension },
+ { QStringLiteral("photopixelydimension"), Property::PhotoPixelYDimension },
+ { QStringLiteral("photodatetimeoriginal"), Property::PhotoDateTimeOriginal },
+ { QStringLiteral("photofocallength"), Property::PhotoFocalLength },
+ { QStringLiteral("photofocallengthin35mmfilm"), Property::PhotoFocalLengthIn35mmFilm },
+ { QStringLiteral("photoexposuretime"), Property::PhotoExposureTime },
+ { QStringLiteral("photofnumber"), Property::PhotoFNumber },
+ { QStringLiteral("photoaperturevalue"), Property::PhotoApertureValue },
+ { QStringLiteral("photoexposurebiasvalue"), Property::PhotoExposureBiasValue },
+ { QStringLiteral("photowhitebalance"), Property::PhotoWhiteBalance },
+ { QStringLiteral("photometeringmode"), Property::PhotoMeteringMode },
+ { QStringLiteral("photoisospeedratings"), Property::PhotoISOSpeedRatings },
+ { QStringLiteral("photosaturation"), Property::PhotoSaturation },
+ { QStringLiteral("photosharpness"), Property::PhotoSharpness },
+ };
return PropertyInfo(propertyHash.value(name.toLower()));
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.0.95~git20140911/tests/dump.cpp new/kfilemetadata-5.0.95/tests/dump.cpp
--- old/kfilemetadata-5.0.95~git20140911/tests/dump.cpp 2014-08-19 16:32:37.000000000 +0200
+++ new/kfilemetadata-5.0.95/tests/dump.cpp 2014-09-25 20:40:08.000000000 +0200
@@ -26,8 +26,8 @@
#include <QMimeDatabase>
#include <QTextStream>
-#include "extractorplugin.h"
-#include "extractorpluginmanager.h"
+#include "extractor.h"
+#include "extractorcollection.h"
#include "propertyinfo.h"
#include "simpleextractionresult.h"
@@ -51,13 +51,13 @@
QMimeDatabase mimeDb;
QString mimetype = mimeDb.mimeTypeForFile(url).name();
- KFileMetaData::ExtractorPluginManager manager;
- QListKFileMetaData::ExtractorPlugin* exList = manager.fetchExtractors(mimetype);
+ KFileMetaData::ExtractorCollection extractors;
+ QListKFileMetaData::Extractor* exList = extractors.fetchExtractors(mimetype);
QTextStream out(stdout);
out << url << " " << mimetype << "\n\n";
- Q_FOREACH (KFileMetaData::ExtractorPlugin* ex, exList) {
+ Q_FOREACH (KFileMetaData::Extractor* ex, exList) {
KFileMetaData::SimpleExtractionResult result(url, mimetype,
KFileMetaData::ExtractionResult::ExtractMetaData);
ex->extract(&result);
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org