1 |
From: Tirtha Chatterjee <tirtha.p.chatterjee@gmail.com> |
diff -Naur strigi-0.7.5/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp strigi-0.7.5-magellan/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp |
2 |
Date: Tue, 21 Jun 2011 19:16:55 +0000 |
--- strigi-0.7.5/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp 2011-06-02 11:29:26.000000000 +0200 |
3 |
Subject: used the new API of ffmpeg, fixes a build issue with ffmpeg from git. |
+++ strigi-0.7.5-magellan/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp 2011-08-06 20:49:37.000000000 +0200 |
4 |
X-Git-Tag: v0.7.6 |
@@ -348,7 +348,7 @@ |
|
X-Git-Url: http://quickgit.kde.org/?p=libstreamanalyzer.git&a=commitdiff&h=4cfbe1fe673b48797bbea0b98c81d7ccf05a1d72 |
|
|
--- |
|
|
used the new API of ffmpeg, fixes a build issue with ffmpeg from git. |
|
|
--- |
|
|
|
|
|
|
|
|
--- a/plugins/endplugins/ffmpegendanalyzer.cpp |
|
|
+++ b/plugins/endplugins/ffmpegendanalyzer.cpp |
|
|
@@ -348,7 +348,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul |
|
5 |
if ((size = in->size()) >= 0) |
if ((size = in->size()) >= 0) |
6 |
ar.addValue(factory->durationProperty, (uint32_t)(size/(fc->bit_rate/8))); |
ar.addValue(factory->durationProperty, (uint32_t)(size/(fc->bit_rate/8))); |
7 |
} |
} |
10 |
ar.addValue(factory->typeProperty, NFO "Audio"); |
ar.addValue(factory->typeProperty, NFO "Audio"); |
11 |
ar.addValue(factory->typeProperty, NMM_DRAFT "MusicPiece"); |
ar.addValue(factory->typeProperty, NMM_DRAFT "MusicPiece"); |
12 |
} else { |
} else { |
13 |
@@ -359,7 +359,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul |
@@ -359,7 +359,7 @@ |
14 |
const AVStream &stream = *fc->streams[i]; |
const AVStream &stream = *fc->streams[i]; |
15 |
const AVCodecContext &codec = *stream.codec; |
const AVCodecContext &codec = *stream.codec; |
16 |
|
|
19 |
const string streamuri = ar.newAnonymousUri(); |
const string streamuri = ar.newAnonymousUri(); |
20 |
ar.addValue(factory->hasPartProperty, streamuri); |
ar.addValue(factory->hasPartProperty, streamuri); |
21 |
ar.addTriplet(streamuri, partOfPropertyName, ar.path()); |
ar.addTriplet(streamuri, partOfPropertyName, ar.path()); |
22 |
@@ -370,8 +370,16 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul |
@@ -370,8 +370,16 @@ |
23 |
outs << (stream.duration * stream.time_base.num / stream.time_base.den); |
outs << (stream.duration * stream.time_base.num / stream.time_base.den); |
24 |
ar.addTriplet(streamuri, durationPropertyName,outs.str()); |
ar.addTriplet(streamuri, durationPropertyName,outs.str()); |
25 |
} |
} |
38 |
} |
} |
39 |
const AVCodec *p = avcodec_find_decoder(codec.codec_id); |
const AVCodec *p = avcodec_find_decoder(codec.codec_id); |
40 |
if (p) { |
if (p) { |
41 |
@@ -408,7 +416,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul |
@@ -408,7 +416,7 @@ |
42 |
ar.addTriplet(streamuri, bitratePropertyName, outs.str()); |
ar.addTriplet(streamuri, bitratePropertyName, outs.str()); |
43 |
} |
} |
44 |
|
|
47 |
|
|
48 |
ar.addTriplet(streamuri, typePropertyName, audioClassName); |
ar.addTriplet(streamuri, typePropertyName, audioClassName); |
49 |
if (codec.channels) { |
if (codec.channels) { |
50 |
@@ -458,36 +466,107 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul |
@@ -458,36 +466,107 @@ |
51 |
} |
} |
52 |
|
|
53 |
// Tags |
// Tags |
181 |
} |
} |
182 |
|
|
183 |
av_close_input_stream(fc); |
av_close_input_stream(fc); |
|
|
|