View | Details | Raw Unified | Return to bug 208816 | Differences between
and this patch

Collapse All | Expand All

(-)deskutils/libstreamanalyzer/files/patch-ffmpeg29 (+35 lines)
Line 0 Link Here
1
Description: Replace deprecated FFmpeg API
2
Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3
Last-Update: <2015-11-02>
4
5
--- libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp.orig
6
+++ libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp
7
@@ -355,7 +355,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul
8
 #endif
9
 
10
   if(fc->bit_rate)
11
-    ar.addValue(factory->bitrateProperty, fc->bit_rate);
12
+    ar.addValue(factory->bitrateProperty, (uint32_t)fc->bit_rate);
13
   else if (fc->duration!= no_bitrate && fc->duration > 0) {
14
     cout<<"Trying to estimate bitrate\n";
15
     int64_t size;
16
@@ -412,8 +412,8 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul
17
         if (size_t len = strlen(p->name)) {
18
           ar.addTriplet(streamuri, codecPropertyName, string(p->name, len));
19
         }
20
-      } else if (size_t len = strlen(codec.codec_name)) {
21
-        ar.addTriplet(streamuri, codecPropertyName, string(codec.codec_name, len));
22
+      } else if (size_t len = strlen(avcodec_get_name(codec.codec_id))) {
23
+        ar.addTriplet(streamuri, codecPropertyName, string(avcodec_get_name(codec.codec_id), len));
24
       }
25
 /*
26
 00792     } else if (enc->codec_id == CODEC_ID_MPEG2TS) {
27
@@ -486,7 +486,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul
28
           outs << stream.avg_frame_rate.num / stream.avg_frame_rate.den;
29
           ar.addTriplet(streamuri, frameRatePropertyName, outs.str());
30
         }
31
-        if (codec.pix_fmt != PIX_FMT_NONE) {}//FIXME pixel format
32
+        if (codec.pix_fmt != AV_PIX_FMT_NONE) {}//FIXME pixel format
33
       }
34
       
35
     }

Return to bug 208816