--- strigi-0.7.8/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp.orig 2016-03-17 08:28:32.500019547 +0100
+++ strigi-0.7.8/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp 2016-03-17 08:29:07.623793917 +0100
@@ -486,7 +486,7 @@
outs << stream.r_frame_rate.num / stream.r_frame_rate.den;
ar.addTriplet(streamuri, frameRatePropertyName, outs.str());
}
- if (codec.pix_fmt != PIX_FMT_NONE) {}//FIXME pixel format
+ if (codec.pix_fmt != AV_PIX_FMT_NONE) {}//FIXME pixel format
}
}
--- strigi-0.7.8/libstreamanalyzer/include/strigi/analysisresult.h~ 2013-02-05 22:34:52.000000000 +0100
+++ strigi-0.7.8/libstreamanalyzer/include/strigi/analysisresult.h 2016-03-17 08:32:18.266187062 +0100
@@ -195,6 +195,16 @@
* @param field the registered field
* @param value the value to add
**/
+ void addValue(const RegisteredField* field, int64_t value);
+ /**
+ * Associate a value for a field with the file.
+ *
+ * addValue() may only be called field->properties.maxCardinality() times
+ * for any given field on any given AnalysisResult.
+ *
+ * @param field the registered field
+ * @param value the value to add
+ **/
void addValue(const RegisteredField* field, double value);
/**
* Associate an RDF triplet with the file.
--- strigi-0.7.8/libstreamanalyzer/lib/analysisresult.cpp~ 2013-02-05 22:34:52.000000000 +0100
+++ strigi-0.7.8/libstreamanalyzer/lib/analysisresult.cpp 2016-03-17 08:32:59.133366612 +0100
@@ -365,6 +365,12 @@
p->m_writer.addValue(this, field, value);
}
void
+AnalysisResult::addValue(const RegisteredField* field, int64_t value) {
+ if (!p->checkCardinality(field))
+ return;
+ p->m_writer.addValue(this, field, value);
+}
+void
AnalysisResult::addValue(const RegisteredField* field, double value) {
if (!p->checkCardinality(field))
return;
--- strigi-0.7.8/libstreamanalyzer/include/strigi/indexwriter.h~ 2013-02-05 22:34:52.000000000 +0100
+++ strigi-0.7.8/libstreamanalyzer/include/strigi/indexwriter.h 2016-03-17 08:34:12.897625598 +0100
@@ -137,6 +137,18 @@
* @param value value of the field
*/
virtual void addValue(const AnalysisResult* result, const RegisteredField* field,
+ int64_t value) = 0;
+ /**
+ * @brief Add a field to the index.
+ *
+ * See AnalysisResult::addValue() for more information.
+ *
+ * @param result the AnalysisResult for the object that is
+ * being analyzed
+ * @param field description of the field
+ * @param value value of the field
+ */
+ virtual void addValue(const AnalysisResult* result, const RegisteredField* field,
double value) = 0;
/**
* @brief Add a field to the index.
--- strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.h~ 2013-02-05 22:34:52.000000000 +0100
+++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.h 2016-03-17 08:36:27.902652819 +0100
@@ -53,6 +53,8 @@
void addValue(const Strigi::AnalysisResult*,
const Strigi::RegisteredField* fieldname, int32_t value);
void addValue(const Strigi::AnalysisResult*,
+ const Strigi::RegisteredField* fieldname, int64_t value);
+ void addValue(const Strigi::AnalysisResult*,
const Strigi::RegisteredField* fieldname, double value);
void addTriplet(const std::string& subject,
const std::string& predicate, const std::string& object) {}
--- strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp~ 2013-02-05 22:34:52.000000000 +0100
+++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp 2016-03-17 08:37:00.066389665 +0100
@@ -171,6 +171,13 @@
}
void
CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
+ const Strigi::RegisteredField* field, int64_t value) {
+ ostringstream o;
+ o << value;
+ addValue(idx, field, o.str());
+}
+void
+CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
const Strigi::RegisteredField* field,
const unsigned char* data, uint32_t size) {
addValue(idx, field, string((const char*)data, (string::size_type)size));
--- strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.h~ 2013-02-05 22:34:52.000000000 +0100
+++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.h 2016-03-17 08:37:17.009935558 +0100
@@ -53,6 +53,8 @@
void addValue(const Strigi::AnalysisResult*,
const Strigi::RegisteredField* fieldname, int32_t value);
void addValue(const Strigi::AnalysisResult*,
+ const Strigi::RegisteredField* fieldname, int64_t value);
+ void addValue(const Strigi::AnalysisResult*,
const Strigi::RegisteredField* fieldname, double value);
void addTriplet(const std::string& subject,
const std::string& predicate, const std::string& object) {}
--- strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp~ 2013-02-05 22:34:52.000000000 +0100
+++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp 2016-03-17 08:37:37.820196621 +0100
@@ -152,6 +152,13 @@
}
void
CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
+ const Strigi::RegisteredField* field, int64_t value) {
+ ostringstream o;
+ o << value;
+ addValue(idx, field, o.str());
+}
+void
+CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
const Strigi::RegisteredField* field,
const unsigned char* data, uint32_t size) {
addValue(idx, field, string((const char*)data, (string::size_type)size));
--- strigi-0.7.8/strigiutils/bin/xmlindexer/xmlindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
+++ strigi-0.7.8/strigiutils/bin/xmlindexer/xmlindexwriter.h 2016-03-17 08:39:43.025100536 +0100
@@ -268,6 +268,14 @@
d->values.insert(std::make_pair(field, v.str()));
}
void addValue(const Strigi::AnalysisResult* ar,
+ const Strigi::RegisteredField* field, int64_t value) {
+ Data* d = static_cast(ar->writerData());
+ static std::ostringstream v;
+ v.str("");
+ v << value;
+ d->values.insert(std::make_pair(field, v.str()));
+ }
+ void addValue(const Strigi::AnalysisResult* ar,
const Strigi::RegisteredField* field, double value) {
Data* d = static_cast(ar->writerData());
static std::ostringstream v;
--- strigi-0.7.8/strigiutils/bin/xmlindexer/rdfindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
+++ strigi-0.7.8/strigiutils/bin/xmlindexer/rdfindexwriter.h 2016-03-17 08:40:07.508740974 +0100
@@ -284,6 +284,14 @@
d->values.insert(std::make_pair(field, v.str()));
}
void addValue(const Strigi::AnalysisResult* ar,
+ const Strigi::RegisteredField* field, int64_t value) {
+ Data* d = static_cast(ar->writerData());
+ static std::ostringstream v;
+ v.str("");
+ v << value;
+ d->values.insert(std::make_pair(field, v.str()));
+ }
+ void addValue(const Strigi::AnalysisResult* ar,
const Strigi::RegisteredField* field, double value) {
Data* d = static_cast(ar->writerData());
static std::ostringstream v;
--- strigi-0.7.8/strigiutils/bin/deepfind/grepindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
+++ strigi-0.7.8/strigiutils/bin/deepfind/grepindexwriter.h 2016-03-17 08:40:49.115929517 +0100
@@ -41,6 +41,8 @@
void addValue(const Strigi::AnalysisResult* idx,
const Strigi::RegisteredField* field, int32_t value) {}
void addValue(const Strigi::AnalysisResult* idx,
+ const Strigi::RegisteredField* field, int64_t value) {}
+ void addValue(const Strigi::AnalysisResult* idx,
const Strigi::RegisteredField* field, double value) {}
void addTriplet(const std::string& subject,
const std::string& predicate, const std::string& object) {}
--- strigi-0.7.8/strigiutils/bin/deepfind/grepindexreader.cpp~ 2013-01-03 13:30:53.000000000 +0100
+++ strigi-0.7.8/strigiutils/bin/deepfind/grepindexreader.cpp 2016-03-17 08:41:25.403051321 +0100
@@ -80,6 +80,8 @@
void addValue(const AnalysisResult* result, const RegisteredField* field,
uint32_t value) {}
void addValue(const AnalysisResult* result, const RegisteredField* field,
+ int64_t value) {}
+ void addValue(const AnalysisResult* result, const RegisteredField* field,
double value) {}
void addValue(const AnalysisResult* result, const RegisteredField* field,
const std::string& name, const std::string& value) {}
--- strigi-0.7.8/strigiutils/bin/deepfind/dummyindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
+++ strigi-0.7.8/strigiutils/bin/deepfind/dummyindexwriter.h 2016-03-17 08:41:50.093360996 +0100
@@ -73,6 +73,8 @@
void addValue(const Strigi::AnalysisResult* ar,
const Strigi::RegisteredField* fieldname, int32_t value) {}
void addValue(const Strigi::AnalysisResult* ar,
+ const Strigi::RegisteredField* fieldname, int64_t value) {}
+ void addValue(const Strigi::AnalysisResult* ar,
const Strigi::RegisteredField* fieldname, double value) {}
void addTriplet(const std::string& subject,
const std::string& predicate, const std::string& object) {}
--- strigi-0.7.8/strigiutils/bin/deepfind/analyzerlatencytester.cpp~ 2013-01-03 13:30:53.000000000 +0100
+++ strigi-0.7.8/strigiutils/bin/deepfind/analyzerlatencytester.cpp 2016-03-17 08:45:08.202512266 +0100
@@ -144,6 +144,7 @@
void addValue(const AnalysisResult*, const RegisteredField*, const unsigned char*, uint32_t) {}
void addValue(const AnalysisResult*, const RegisteredField*, int32_t) {}
void addValue(const AnalysisResult*, const RegisteredField*, uint32_t) {}
+ void addValue(const AnalysisResult*, const RegisteredField*, int64_t) {}
void addValue(const AnalysisResult*, const RegisteredField*, double) {}
void addValue(const AnalysisResult*, const RegisteredField*, const string&, const string&) {}
void finishAnalysis(const AnalysisResult*) {}