Guest User

bartus

a guest
Aug 29th, 2018
78
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -u strigi-0.7.8/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp strigi-0.7.8-patch/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp
  2. --- strigi-0.7.8/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp 2016-03-17 08:29:07.623793917 +0100
  3. +++ strigi-0.7.8-patch/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp 2018-08-29 15:15:18.789664970 +0200
  4. @@ -412,8 +412,8 @@
  5. if (size_t len = strlen(p->name)) {
  6. ar.addTriplet(streamuri, codecPropertyName, string(p->name, len));
  7. }
  8. - } else if (size_t len = strlen(codec.codec_name)) {
  9. - ar.addTriplet(streamuri, codecPropertyName, string(codec.codec_name, len));
  10. + } else if (size_t len = strlen(codec.codec->name)) {
  11. + ar.addTriplet(streamuri, codecPropertyName, string(codec.codec->name, len));
  12. }
  13. /*
  14. 00792 } else if (enc->codec_id == CODEC_ID_MPEG2TS) {
  15. @@ -486,7 +486,7 @@
  16. outs << stream.r_frame_rate.num / stream.r_frame_rate.den;
  17. ar.addTriplet(streamuri, frameRatePropertyName, outs.str());
  18. }
  19. - if (codec.pix_fmt != PIX_FMT_NONE) {}//FIXME pixel format
  20. + if (codec.pix_fmt != AV_PIX_FMT_NONE) {}//FIXME pixel format
  21. }
  22.  
  23. }
  24. unchanged:
  25. --- strigi-0.7.8/libstreamanalyzer/include/strigi/analysisresult.h~ 2013-02-05 22:34:52.000000000 +0100
  26. +++ strigi-0.7.8/libstreamanalyzer/include/strigi/analysisresult.h 2016-03-17 08:32:18.266187062 +0100
  27. @@ -195,6 +195,16 @@
  28. * @param field the registered field
  29. * @param value the value to add
  30. **/
  31. + void addValue(const RegisteredField* field, int64_t value);
  32. + /**
  33. + * Associate a value for a field with the file.
  34. + *
  35. + * addValue() may only be called <tt>field->properties.maxCardinality()</tt> times
  36. + * for any given field on any given AnalysisResult.
  37. + *
  38. + * @param field the registered field
  39. + * @param value the value to add
  40. + **/
  41. void addValue(const RegisteredField* field, double value);
  42. /**
  43. * Associate an RDF triplet with the file.
  44. unchanged:
  45. --- strigi-0.7.8/libstreamanalyzer/lib/analysisresult.cpp~ 2013-02-05 22:34:52.000000000 +0100
  46. +++ strigi-0.7.8/libstreamanalyzer/lib/analysisresult.cpp 2016-03-17 08:32:59.133366612 +0100
  47. @@ -365,6 +365,12 @@
  48. p->m_writer.addValue(this, field, value);
  49. }
  50. void
  51. +AnalysisResult::addValue(const RegisteredField* field, int64_t value) {
  52. + if (!p->checkCardinality(field))
  53. + return;
  54. + p->m_writer.addValue(this, field, value);
  55. +}
  56. +void
  57. AnalysisResult::addValue(const RegisteredField* field, double value) {
  58. if (!p->checkCardinality(field))
  59. return;
  60. unchanged:
  61. --- strigi-0.7.8/libstreamanalyzer/include/strigi/indexwriter.h~ 2013-02-05 22:34:52.000000000 +0100
  62. +++ strigi-0.7.8/libstreamanalyzer/include/strigi/indexwriter.h 2016-03-17 08:34:12.897625598 +0100
  63. @@ -137,6 +137,18 @@
  64. * @param value value of the field
  65. */
  66. virtual void addValue(const AnalysisResult* result, const RegisteredField* field,
  67. + int64_t value) = 0;
  68. + /**
  69. + * @brief Add a field to the index.
  70. + *
  71. + * See AnalysisResult::addValue() for more information.
  72. + *
  73. + * @param result the AnalysisResult for the object that is
  74. + * being analyzed
  75. + * @param field description of the field
  76. + * @param value value of the field
  77. + */
  78. + virtual void addValue(const AnalysisResult* result, const RegisteredField* field,
  79. double value) = 0;
  80. /**
  81. * @brief Add a field to the index.
  82. unchanged:
  83. --- strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.h~ 2013-02-05 22:34:52.000000000 +0100
  84. +++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.h 2016-03-17 08:36:27.902652819 +0100
  85. @@ -53,6 +53,8 @@
  86. void addValue(const Strigi::AnalysisResult*,
  87. const Strigi::RegisteredField* fieldname, int32_t value);
  88. void addValue(const Strigi::AnalysisResult*,
  89. + const Strigi::RegisteredField* fieldname, int64_t value);
  90. + void addValue(const Strigi::AnalysisResult*,
  91. const Strigi::RegisteredField* fieldname, double value);
  92. void addTriplet(const std::string& subject,
  93. const std::string& predicate, const std::string& object) {}
  94. unchanged:
  95. --- strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp~ 2013-02-05 22:34:52.000000000 +0100
  96. +++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp 2016-03-17 08:37:00.066389665 +0100
  97. @@ -171,6 +171,13 @@
  98. }
  99. void
  100. CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
  101. + const Strigi::RegisteredField* field, int64_t value) {
  102. + ostringstream o;
  103. + o << value;
  104. + addValue(idx, field, o.str());
  105. +}
  106. +void
  107. +CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
  108. const Strigi::RegisteredField* field,
  109. const unsigned char* data, uint32_t size) {
  110. addValue(idx, field, string((const char*)data, (string::size_type)size));
  111. unchanged:
  112. --- strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.h~ 2013-02-05 22:34:52.000000000 +0100
  113. +++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.h 2016-03-17 08:37:17.009935558 +0100
  114. @@ -53,6 +53,8 @@
  115. void addValue(const Strigi::AnalysisResult*,
  116. const Strigi::RegisteredField* fieldname, int32_t value);
  117. void addValue(const Strigi::AnalysisResult*,
  118. + const Strigi::RegisteredField* fieldname, int64_t value);
  119. + void addValue(const Strigi::AnalysisResult*,
  120. const Strigi::RegisteredField* fieldname, double value);
  121. void addTriplet(const std::string& subject,
  122. const std::string& predicate, const std::string& object) {}
  123. unchanged:
  124. --- strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp~ 2013-02-05 22:34:52.000000000 +0100
  125. +++ strigi-0.7.8/libstreamanalyzer/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp 2016-03-17 08:37:37.820196621 +0100
  126. @@ -152,6 +152,13 @@
  127. }
  128. void
  129. CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
  130. + const Strigi::RegisteredField* field, int64_t value) {
  131. + ostringstream o;
  132. + o << value;
  133. + addValue(idx, field, o.str());
  134. +}
  135. +void
  136. +CLuceneIndexWriter::addValue(const Strigi::AnalysisResult* idx,
  137. const Strigi::RegisteredField* field,
  138. const unsigned char* data, uint32_t size) {
  139. addValue(idx, field, string((const char*)data, (string::size_type)size));
  140. unchanged:
  141. --- strigi-0.7.8/strigiutils/bin/xmlindexer/xmlindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
  142. +++ strigi-0.7.8/strigiutils/bin/xmlindexer/xmlindexwriter.h 2016-03-17 08:39:43.025100536 +0100
  143. @@ -268,6 +268,14 @@
  144. d->values.insert(std::make_pair(field, v.str()));
  145. }
  146. void addValue(const Strigi::AnalysisResult* ar,
  147. + const Strigi::RegisteredField* field, int64_t value) {
  148. + Data* d = static_cast<Data*>(ar->writerData());
  149. + static std::ostringstream v;
  150. + v.str("");
  151. + v << value;
  152. + d->values.insert(std::make_pair(field, v.str()));
  153. + }
  154. + void addValue(const Strigi::AnalysisResult* ar,
  155. const Strigi::RegisteredField* field, double value) {
  156. Data* d = static_cast<Data*>(ar->writerData());
  157. static std::ostringstream v;
  158. unchanged:
  159. --- strigi-0.7.8/strigiutils/bin/xmlindexer/rdfindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
  160. +++ strigi-0.7.8/strigiutils/bin/xmlindexer/rdfindexwriter.h 2016-03-17 08:40:07.508740974 +0100
  161. @@ -284,6 +284,14 @@
  162. d->values.insert(std::make_pair(field, v.str()));
  163. }
  164. void addValue(const Strigi::AnalysisResult* ar,
  165. + const Strigi::RegisteredField* field, int64_t value) {
  166. + Data* d = static_cast<Data*>(ar->writerData());
  167. + static std::ostringstream v;
  168. + v.str("");
  169. + v << value;
  170. + d->values.insert(std::make_pair(field, v.str()));
  171. + }
  172. + void addValue(const Strigi::AnalysisResult* ar,
  173. const Strigi::RegisteredField* field, double value) {
  174. Data* d = static_cast<Data*>(ar->writerData());
  175. static std::ostringstream v;
  176. unchanged:
  177. --- strigi-0.7.8/strigiutils/bin/deepfind/grepindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
  178. +++ strigi-0.7.8/strigiutils/bin/deepfind/grepindexwriter.h 2016-03-17 08:40:49.115929517 +0100
  179. @@ -41,6 +41,8 @@
  180. void addValue(const Strigi::AnalysisResult* idx,
  181. const Strigi::RegisteredField* field, int32_t value) {}
  182. void addValue(const Strigi::AnalysisResult* idx,
  183. + const Strigi::RegisteredField* field, int64_t value) {}
  184. + void addValue(const Strigi::AnalysisResult* idx,
  185. const Strigi::RegisteredField* field, double value) {}
  186. void addTriplet(const std::string& subject,
  187. const std::string& predicate, const std::string& object) {}
  188. unchanged:
  189. --- strigi-0.7.8/strigiutils/bin/deepfind/grepindexreader.cpp~ 2013-01-03 13:30:53.000000000 +0100
  190. +++ strigi-0.7.8/strigiutils/bin/deepfind/grepindexreader.cpp 2016-03-17 08:41:25.403051321 +0100
  191. @@ -80,6 +80,8 @@
  192. void addValue(const AnalysisResult* result, const RegisteredField* field,
  193. uint32_t value) {}
  194. void addValue(const AnalysisResult* result, const RegisteredField* field,
  195. + int64_t value) {}
  196. + void addValue(const AnalysisResult* result, const RegisteredField* field,
  197. double value) {}
  198. void addValue(const AnalysisResult* result, const RegisteredField* field,
  199. const std::string& name, const std::string& value) {}
  200. unchanged:
  201. --- strigi-0.7.8/strigiutils/bin/deepfind/dummyindexwriter.h~ 2013-01-03 13:30:53.000000000 +0100
  202. +++ strigi-0.7.8/strigiutils/bin/deepfind/dummyindexwriter.h 2016-03-17 08:41:50.093360996 +0100
  203. @@ -73,6 +73,8 @@
  204. void addValue(const Strigi::AnalysisResult* ar,
  205. const Strigi::RegisteredField* fieldname, int32_t value) {}
  206. void addValue(const Strigi::AnalysisResult* ar,
  207. + const Strigi::RegisteredField* fieldname, int64_t value) {}
  208. + void addValue(const Strigi::AnalysisResult* ar,
  209. const Strigi::RegisteredField* fieldname, double value) {}
  210. void addTriplet(const std::string& subject,
  211. const std::string& predicate, const std::string& object) {}
  212. unchanged:
  213. --- strigi-0.7.8/strigiutils/bin/deepfind/analyzerlatencytester.cpp~ 2013-01-03 13:30:53.000000000 +0100
  214. +++ strigi-0.7.8/strigiutils/bin/deepfind/analyzerlatencytester.cpp 2016-03-17 08:45:08.202512266 +0100
  215. @@ -144,6 +144,7 @@
  216. void addValue(const AnalysisResult*, const RegisteredField*, const unsigned char*, uint32_t) {}
  217. void addValue(const AnalysisResult*, const RegisteredField*, int32_t) {}
  218. void addValue(const AnalysisResult*, const RegisteredField*, uint32_t) {}
  219. + void addValue(const AnalysisResult*, const RegisteredField*, int64_t) {}
  220. void addValue(const AnalysisResult*, const RegisteredField*, double) {}
  221. void addValue(const AnalysisResult*, const RegisteredField*, const string&, const string&) {}
  222. void finishAnalysis(const AnalysisResult*) {}
RAW Paste Data