Hello community, here is the log from the commit of package strigi for openSUSE:Factory checked in at Mon Aug 22 15:33:52 CEST 2011.
-------- --- strigi/strigi.changes 2011-07-26 15:20:40.000000000 +0200 +++ /mounts/work_src_done/STABLE/strigi/strigi.changes 2011-08-11 01:04:41.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Aug 10 23:02:38 UTC 2011 - [email protected] + +- Optionally enable ffmpeg indexing support. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- strigi-0.7.5-new_ffmpeg.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ strigi.spec ++++++ --- /var/tmp/diff_new_pack.ge6igH/_old 2011-08-22 15:33:30.000000000 +0200 +++ /var/tmp/diff_new_pack.ge6igH/_new 2011-08-22 15:33:30.000000000 +0200 @@ -17,10 +17,11 @@ # norootforbuild +%bcond_with ffmpeg Name: strigi Version: 0.7.5 -Release: 1 +Release: 2 License: GPLv2+ ; LGPLv2.1+ Summary: Lightweight and fast desktop search engine Url: http://www.vandenoever.info/software/strigi/ @@ -29,6 +30,8 @@ Source100: baselibs.conf # PATCH-FIX-OPENSUSE bko_251701.v3.patch bko#251701 [email protected] -- Check file size of ole compound documents (fix dolphin crash when hovering a MSI file) Patch0: bko_251701.v3.patch +# PATCH-FIX-OPENSUSE %{name}-0.7.5-new_ffmpeg.patch [email protected] -- Make it compile with the latest ffmpeg. From upstream, remove once 0.7.6 is released +Patch1: %{name}-0.7.5-new_ffmpeg.patch BuildRequires: bison BuildRequires: boost-devel BuildRequires: c++_compiler @@ -43,6 +46,9 @@ BuildRequires: libcppunit-devel BuildRequires: libexiv2-devel BuildRequires: libexpat-devel +%if %{with ffmpeg} +BuildRequires: libffmpeg-devel +%endif BuildRequires: libqt4-devel BuildRequires: zlib-devel BuildRequires: pkgconfig(libxml-2.0) @@ -76,6 +82,9 @@ %prep %setup -q %patch0 -p1 +%if %{with ffmpeg} +%patch1 +%endif %build %cmake_kde4 -d build @@ -123,6 +132,9 @@ %{_libdir}/strigi/strigita_sid.so %{_libdir}/strigi/strigita_wav.so %{_libdir}/strigi/strigita_xbm.so +%if %{with ffmpeg} +%{_libdir}/strigi/strigiea_ffmpeg.so +%endif %{_datadir}/dbus-1/services/org.freedesktop.xesam.searcher.service %{_datadir}/dbus-1/services/vandenoever.strigi.service %{_datadir}/strigi/ ++++++ strigi-0.7.5-new_ffmpeg.patch ++++++ diff --git libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp index d79687c..e457af7 100644 --- libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp +++ libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp @@ -348,7 +348,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) { if ((size = in->size()) >= 0) ar.addValue(factory->durationProperty, (uint32_t)(size/(fc->bit_rate/8))); } - if(fc->nb_streams==1 && fc->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) { + if(fc->nb_streams==1 && fc->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { ar.addValue(factory->typeProperty, NFO "Audio"); ar.addValue(factory->typeProperty, NMM_DRAFT "MusicPiece"); } else { @@ -359,7 +359,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) { const AVStream &stream = *fc->streams[i]; const AVCodecContext &codec = *stream.codec; - if (codec.codec_type == CODEC_TYPE_AUDIO || codec.codec_type == CODEC_TYPE_VIDEO) { + if (codec.codec_type == AVMEDIA_TYPE_AUDIO || codec.codec_type == AVMEDIA_TYPE_VIDEO) { const string streamuri = ar.newAnonymousUri(); ar.addValue(factory->hasPartProperty, streamuri); ar.addTriplet(streamuri, partOfPropertyName, ar.path()); @@ -370,8 +370,16 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) { outs << (stream.duration * stream.time_base.num / stream.time_base.den); ar.addTriplet(streamuri, durationPropertyName,outs.str()); } - if (size_t len = strlen(stream.language)) { - ar.addTriplet(streamuri, languagePropertyName, string(stream.language, len)); +#if FF_API_OLD_METADATA2 + AVMetadataTag *entry = av_metadata_get(stream.metadata, "language", NULL, 0); +#else + AVDictionaryEntry *entry = av_dict_get(stream.metadata, "language", NULL, 0); +#endif + if (entry != NULL) { + const char *languageValue = entry->value; + if (size_t len = strlen(languageValue)) { + ar.addTriplet(streamuri, languagePropertyName, string(languageValue, len)); + } } const AVCodec *p = avcodec_find_decoder(codec.codec_id); if (p) { @@ -408,7 +416,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) { ar.addTriplet(streamuri, bitratePropertyName, outs.str()); } - if (codec.codec_type == CODEC_TYPE_AUDIO) { + if (codec.codec_type == AVMEDIA_TYPE_AUDIO) { ar.addTriplet(streamuri, typePropertyName, audioClassName); if (codec.channels) { @@ -458,36 +466,107 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) { } // Tags - - if (int32_t len = strlen(fc->title)) { - ar.addValue(factory->titleProperty, string(fc->title, len) ); +#if FF_API_OLD_METADATA2 + AVMetadataTag *entry = av_metadata_get(fc->metadata, "title", NULL, 0); +#else + AVDictionaryEntry *entry = av_dict_get(fc->metadata, "title", NULL, 0); +#endif + if (entry != NULL) + { + const char *titleValue = entry->value; + if (int32_t len = strlen(titleValue)) { + ar.addValue(factory->titleProperty, string(titleValue, len) ); + } } - if (int32_t len = strlen(fc->author)) { - const string creatoruri = ar.newAnonymousUri(); - ar.addValue(factory->creatorProperty, creatoruri); - ar.addTriplet(creatoruri, typePropertyName, contactClassName); - ar.addTriplet(creatoruri, fullnamePropertyName, string(fc->author, len) ); +#if FF_API_OLD_METADATA2 + entry = av_metadata_get(fc->metadata, "author", NULL, 0); +#else + entry = av_dict_get(fc->metadata, "author", NULL, 0); +#endif + if (entry != NULL) + { + const char *authorValue = entry->value; + if (int32_t len = strlen(authorValue)) { + const string creatoruri = ar.newAnonymousUri(); + ar.addValue(factory->creatorProperty, creatoruri); + ar.addTriplet(creatoruri, typePropertyName, contactClassName); + ar.addTriplet(creatoruri, fullnamePropertyName, string(authorValue, len) ); + } } - if (int32_t len = strlen(fc->copyright)) { - ar.addValue(factory->copyrightProperty, string(fc->copyright, len) ); +#if FF_API_OLD_METADATA2 + entry = av_metadata_get(fc->metadata, "copyright", NULL, 0); +#else + entry = av_dict_get(fc->metadata, "copyright", NULL, 0); +#endif + if (entry != NULL) + { + const char *copyrightValue = entry->value; + if (int32_t len = strlen(copyrightValue)) { + ar.addValue(factory->copyrightProperty, string(copyrightValue, len) ); + } } - if (int32_t len = strlen(fc->comment)) { - ar.addValue(factory->commentProperty, string(fc->comment, len) ); +#if FF_API_OLD_METADATA2 + entry = av_metadata_get(fc->metadata, "comment", NULL, 0); +#else + entry = av_dict_get(fc->metadata, "comment", NULL, 0); +#endif + if (entry != NULL) + { + const char *commentValue = entry->value; + if (int32_t len = strlen(commentValue)) { + ar.addValue(factory->commentProperty, string(commentValue, len) ); + } } - if (int32_t len = strlen(fc->album)) { - const string album = ar.newAnonymousUri(); - ar.addValue(factory->albumProperty, album); +#if FF_API_OLD_METADATA2 + entry = av_metadata_get(fc->metadata, "album", NULL, 0); +#else + entry = av_dict_get(fc->metadata, "album", NULL, 0); +#endif + if (entry != NULL) + { + const char *albumValue = entry->value; + if (int32_t len = strlen(albumValue)) { + const string album = ar.newAnonymousUri(); + ar.addValue(factory->albumProperty, album); ar.addTriplet(album, typePropertyName, albumClassName); - ar.addTriplet(album, titlePropertyName, string(fc->album, len) ); + ar.addTriplet(album, titlePropertyName, string(albumValue, len) ); + } } - if (int32_t len = strlen(fc->genre)) { - ar.addValue(factory->genreProperty, string(fc->genre, len) ); +#if FF_API_OLD_METADATA2 + entry = av_metadata_get(fc->metadata, "genre", NULL, 0); +#else + entry = av_dict_get(fc->metadata, "genre", NULL, 0); +#endif + if (entry != NULL) + { + const char *genreValue = entry->value; + if (int32_t len = strlen(genreValue)) { + ar.addValue(factory->genreProperty, string(genreValue, len) ); + } } - if (fc->track) { - ar.addValue(factory->trackProperty, fc->track); +#if FF_API_OLD_METADATA2 + entry = av_metadata_get(fc->metadata, "track", NULL, 0); +#else + entry = av_dict_get(fc->metadata, "track", NULL, 0); +#endif + if (entry != NULL) + { + const char *trackValue = entry->value; + if (int32_t len = strlen(trackValue)) { + ar.addValue(factory->trackProperty, string(trackValue, len) ); + } } - if (fc->year) { - ar.addValue(factory->createdProperty, fc->year); +#if FF_API_OLD_METADATA2 + entry = av_metadata_get(fc->metadata, "year", NULL, 0); +#else + entry = av_dict_get(fc->metadata, "year", NULL, 0); +#endif + if (entry != NULL) + { + const char *yearValue = entry->value; + if (int32_t len = strlen(yearValue)) { + ar.addValue(factory->createdProperty, string(yearValue, len) ); + } } av_close_input_stream(fc); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
