Overview

Request 2710 (accepted)

Update to latest svn source and patched for ffmpeg 3.0

Submit package home:Aloysius...es:Essentials / ffDiaporama to package Essentials / ffDiaporama

ffDiaporama.changes Changed
x
 
1
@@ -1,4 +1,12 @@
2
 -------------------------------------------------------------------
3
+Fri Apr 29 08:36:27 UTC 2016 - aloisio@gmx.com
4
+
5
+- Updated to last svn version
6
+- Patched for ffmpeg 3.0 
7
+- Dropped ffDiaporama-exiv2.patch
8
+- Fixed Qt5 build on Leap
9
+
10
+-------------------------------------------------------------------
11
 Tue Sep 22 08:47:31 UTC 2015 - olaf@aepfle.de
12
 
13
 - Use pkgconfig for ffmpeg BuildRequires
14
ffDiaporama.spec Changed
87
 
1
@@ -1,7 +1,7 @@
2
 #
3
 # spec file for ffDiaporama
4
 #
5
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
6
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
7
 #
8
 # All modifications and additions to the file contributed by third parties
9
 # remain the property of their copyright owners, unless otherwise agreed
10
@@ -15,35 +15,37 @@
11
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
12
 #
13
 
14
-%define tarname ffdiaporama
15
+%define rscver  2.2+svn485
16
 
17
 Name:           ffDiaporama
18
-Version:        2.1.2014.0209
19
+Version:        2.2+svn488
20
 Release:        0
21
 Summary:        Movie creator
22
 License:        GPL-2.0
23
 Url:            http://ffdiaporama.tuxfamily.org
24
 Group:          Applications/Multimedia
25
-Source0:        %{tarname}_bin_%{version}.tar.gz
26
-Source1:        %{tarname}_rsc_%{version}.tar.gz
27
+# svn://svn.tuxfamily.org/svnroot/ffdiaporama/ffdiaporama/trunk
28
+Source0:        %{name}_bin-%{version}.tar.gz
29
+Source1:        %{name}_rsc-%{rscver}.tar.gz
30
 Source2:        %{name}-rpmlintrc
31
-Patch0:         %{name}-exiv2.patch
32
-Patch1:         %{name}_ffmpeg-2.4.patch
33
+Patch1:         %{name}_ffmpeg-3.0.patch
34
 BuildRequires:  dos2unix
35
 BuildRequires:  fdupes
36
 BuildRequires:  hicolor-icon-theme
37
-%if 0%{?suse_version} > 1315
38
+%if 0%{?suse_version} > 1315 || 0%{?is_opensuse} != 0
39
 BuildRequires:  libqt5-qtbase-devel
40
+BuildRequires:  libqt5-qtmultimedia-devel
41
+BuildRequires:  libqt5-qtsvg-devel
42
 BuildRequires:  libqt5-qttools-devel
43
 %else
44
 BuildRequires:  libqt4-devel >= 4.7
45
 %endif
46
 BuildRequires:  libqimageblitz-devel
47
-BuildRequires:  pkgconfig(libavcodec) = 56.60.100
48
-BuildRequires:  pkgconfig(libavdevice) = 56.4.100
49
-BuildRequires:  pkgconfig(libavformat) = 56.40.101
50
-BuildRequires:  pkgconfig(libavutil) = 54.31.100
51
-BuildRequires:  pkgconfig(libswscale) = 3.1.101
52
+BuildRequires:  pkgconfig(libavcodec)
53
+BuildRequires:  pkgconfig(libavdevice)
54
+BuildRequires:  pkgconfig(libavformat)
55
+BuildRequires:  pkgconfig(libavutil)
56
+BuildRequires:  pkgconfig(libswscale)
57
 BuildRequires:  libSDL-devel
58
 BuildRequires:  libSDL_mixer-devel
59
 BuildRequires:  libexiv2-devel
60
@@ -67,11 +69,15 @@
61
 %prep
62
 %setup -q -n %{name}
63
 tar -xf "%{SOURCE1}" --strip-components=1
64
-%patch0 -p1
65
 %patch1 -p1
66
 
67
 %build
68
-qmake PREFIX=%{_prefix} %{name}.pro QMAKE_CFLAGS="%optflags" QMAKE_CXXFLAGS="%optflags"
69
+%if 0%{?suse_version} > 1315 || 0%{?is_opensuse} != 0
70
+qmake-qt5 \
71
+%else
72
+qmake QT+=multimedia \
73
+%endif
74
+ PREFIX=%{_prefix} %{name}.pro QMAKE_CFLAGS="%optflags" QMAKE_CXXFLAGS="%optflags"
75
 make %{?_smp_mflags}
76
 
77
 %install
78
@@ -102,7 +108,7 @@
79
 %{_datadir}/%{name}
80
 %{_datadir}/applications/%{name}.desktop
81
 %{_datadir}/mime/packages/%{name}-mime.xml
82
-%{_datadir}/icons/hicolor/32x32/apps/%{tarname}.png
83
+%{_datadir}/icons/hicolor/32x32/apps/ffdiaporama.png
84
 
85
 %changelog
86
 
87
ffDiaporama-exiv2.patch Deleted
28
 
1
@@ -1,26 +0,0 @@
2
----
3
- src/ffDiaporama/engine/cBaseMediaFile.cpp |    9 +++++----
4
- 1 file changed, 5 insertions(+), 4 deletions(-)
5
-
6
-Index: ffDiaporama/src/ffDiaporama/engine/cBaseMediaFile.cpp
7
-===================================================================
8
---- ffDiaporama.orig/src/ffDiaporama/engine/cBaseMediaFile.cpp
9
-+++ ffDiaporama/src/ffDiaporama/engine/cBaseMediaFile.cpp
10
-@@ -35,12 +35,13 @@
11
- // EXIV2 PART
12
- //****************************************************************************************************************************************************************
13
- #include <exiv2/exif.hpp>
14
--#if (EXIV2_MAJOR_VERSION>=0)||((EXIV2_MAJOR_VERSION==0)&&(EXIV2_MINOR_VERSION>20))
15
--    #include <exiv2/exiv2.hpp>
16
--    bool Exiv2WithPreview=true;
17
--#else
18
-+#if (EXIV2_MAJOR_VERSION>=0)&&((EXIV2_MAJOR_VERSION==0)&&(EXIV2_MINOR_VERSION<21))
19
-     bool Exiv2WithPreview=false;
20
-     #include <exiv2/image.hpp>
21
-+    #include <exiv2/preview.hpp>
22
-+#else
23
-+    bool Exiv2WithPreview=true;
24
-+    #include <exiv2/exiv2.hpp>
25
- #endif
26
- 
27
- int  Exiv2MajorVersion=EXIV2_MAJOR_VERSION;
28
ffDiaporama_ffmpeg-2.4.patch -> ffDiaporama_ffmpeg-3.0.patch Changed
377
 
1
@@ -1,26 +1,353 @@
2
-From 1214050ab2b11c244faa2060e803e718bcb45e94 Mon Sep 17 00:00:00 2001
3
-From: Julien Durillon <julien.durillon@gmail.com>
4
-Date: Sun, 21 Sep 2014 13:42:00 +0200
5
-Subject: PATCH Define SWR_CH_MAX for ffmpeg >= 2.4
6
-
7
----
8
- ffDiaporama/src/ffDiaporama/engine/cDeviceModelDef.h | 3 +++
9
- 1 file changed, 3 insertions(+)
10
-
11
-diff --git a/src/ffDiaporama/engine/cDeviceModelDef.h b/src/ffDiaporama/engine/cDeviceModelDef.h
12
-index 0ecea28..cf9d780 100755
13
---- a/src/ffDiaporama/engine/cDeviceModelDef.h
14
-+++ b/src/ffDiaporama/engine/cDeviceModelDef.h
15
-@@ -84,6 +84,9 @@ extern "C" {
16
+diff -upr ffDiaporama.r486/BUILDVERSION.txt ffDiaporama.r500/BUILDVERSION.txt
17
+--- ffDiaporama.r486/BUILDVERSION.txt  2014-07-01 10:37:05.000000000 +0200
18
++++ ffDiaporama.r500/BUILDVERSION.txt  2016-03-24 19:57:40.299426392 +0100
19
+@@ -1 +1 @@
20
+-Version 2.2_devel 20140701
21
++Version 2.2_devel 20160323
22
+diff -upr ffDiaporama.r486/src/ffDiaporama/DlgSlide/cShotComposer.cpp ffDiaporama.r500/src/ffDiaporama/DlgSlide/cShotComposer.cpp
23
+--- ffDiaporama.r486/src/ffDiaporama/DlgSlide/cShotComposer.cpp    2014-04-17 08:45:02.000000000 +0200
24
++++ ffDiaporama.r500/src/ffDiaporama/DlgSlide/cShotComposer.cpp    2016-03-13 10:54:04.000000000 +0100
25
+@@ -241,7 +241,8 @@ void cShotComposer::RefreshControls(bool
26
+     InRefreshControls=true;
27
+     QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
28
+ 
29
+-    if ((BlockSelectMode==SELECTMODE_ONE)&&(CurrentCompoObject)&&(CurrentCompoObject->IsVisible)) {
30
++    bool bEnable = CurrentCompoObject && CurrentCompoObject->IsVisible;
31
++    if ((BlockSelectMode==SELECTMODE_ONE)&&(CurrentCompoObject)/*&&(CurrentCompoObject->IsVisible)*/) {
32
+ 
33
+         qreal Ratio_X,Ratio_Y;
34
+         ComputeBlockRatio(CurrentCompoObject,Ratio_X,Ratio_Y);
35
+@@ -253,14 +254,14 @@ void cShotComposer::RefreshControls(bool
36
+         }
37
+ 
38
+         // Position, size and rotation
39
+-        GETUI("PosSize_X")->     setEnabled(true);
40
+-        GETUI("PosSize_Y")->     setEnabled(true);
41
+-        GETUI("PosSize_Width")-> setEnabled(true);
42
+-        GETUI("PosSize_Height")->setEnabled(true);
43
+-        GETDOUBLESPINBOX("PosXEd")->        setEnabled(true);
44
+-        GETDOUBLESPINBOX("PosYEd")->        setEnabled(true);
45
+-        GETDOUBLESPINBOX("WidthEd")->       setEnabled(true);
46
+-        GETDOUBLESPINBOX("HeightEd")->      setEnabled(true);
47
++        GETUI("PosSize_X")->     setEnabled(bEnable);
48
++        GETUI("PosSize_Y")->     setEnabled(bEnable);
49
++        GETUI("PosSize_Width")-> setEnabled(bEnable);
50
++        GETUI("PosSize_Height")->setEnabled(bEnable);
51
++        GETDOUBLESPINBOX("PosXEd")->        setEnabled(bEnable);
52
++        GETDOUBLESPINBOX("PosYEd")->        setEnabled(bEnable);
53
++        GETDOUBLESPINBOX("WidthEd")->       setEnabled(bEnable);
54
++        GETDOUBLESPINBOX("HeightEd")->      setEnabled(bEnable);
55
+ 
56
+         if (ApplicationConfig->DisplayUnit==DISPLAYUNIT_PERCENT) {
57
+             GETDOUBLESPINBOX("PosXEd")->  setRange(-200,200);                                                  GETDOUBLESPINBOX("PosXEd")->  setValue(CurrentCompoObject->x*100/Ratio_X);
58
+@@ -275,34 +276,34 @@ void cShotComposer::RefreshControls(bool
59
+         }
60
+ 
61
+         // Rotation
62
+-        GETUI("Rotate_X")-> setEnabled(true);
63
+-        GETSPINBOX("RotateXED")-> setEnabled(true);
64
+-        GETUI("ResetRotateXBT")->setEnabled(true);
65
+-        GETSLIDER("RotateXSLD")->setEnabled(true);
66
+-        GETUI("Rotate_Y")-> setEnabled(true);
67
+-        GETSPINBOX("RotateYED")-> setEnabled(true);
68
+-        GETUI("ResetRotateYBT")->setEnabled(true);
69
+-        GETSLIDER("RotateYSLD")->setEnabled(true);
70
+-        GETUI("Rotate_Z")-> setEnabled(true);
71
+-        GETSPINBOX("RotateZED")-> setEnabled(true);
72
+-        GETUI("ResetRotateZBT")->setEnabled(true);
73
+-        GETSLIDER("RotateZSLD")->setEnabled(true);
74
++        GETUI("Rotate_X")-> setEnabled(bEnable);
75
++        GETSPINBOX("RotateXED")-> setEnabled(bEnable);
76
++        GETUI("ResetRotateXBT")->setEnabled(bEnable);
77
++        GETSLIDER("RotateXSLD")->setEnabled(bEnable);
78
++        GETUI("Rotate_Y")-> setEnabled(bEnable);
79
++        GETSPINBOX("RotateYED")-> setEnabled(bEnable);
80
++        GETUI("ResetRotateYBT")->setEnabled(bEnable);
81
++        GETSLIDER("RotateYSLD")->setEnabled(bEnable);
82
++        GETUI("Rotate_Z")-> setEnabled(bEnable);
83
++        GETSPINBOX("RotateZED")-> setEnabled(bEnable);
84
++        GETUI("ResetRotateZBT")->setEnabled(bEnable);
85
++        GETSLIDER("RotateZSLD")->setEnabled(bEnable);
86
+ 
87
+         GETSPINBOX("RotateXED")->setValue(CurrentCompoObject->RotateXAxis);                       GETSLIDER("RotateXSLD")->setValue(CurrentCompoObject->RotateXAxis);
88
+         GETSPINBOX("RotateYED")->setValue(CurrentCompoObject->RotateYAxis);                       GETSLIDER("RotateYSLD")->setValue(CurrentCompoObject->RotateYAxis);
89
+         GETSPINBOX("RotateZED")->setValue(CurrentCompoObject->RotateZAxis);                       GETSLIDER("RotateZSLD")->setValue(CurrentCompoObject->RotateZAxis);
90
+ 
91
+         // Shape part
92
+-        GETUI("BlockShapeStyleBT")->setEnabled(true);
93
+-        GETUI("BlockShapeStyleED")->setEnabled(true);
94
+-        GETUI("BackgroundFormCB")->setEnabled(true);
95
+-        GETUI("PenSizeEd")->       setEnabled(true);
96
+-        GETUI("PenColorCB")->      setEnabled(CurrentCompoObject->PenSize!=0);
97
+-        GETUI("PenStyleCB")->      setEnabled(CurrentCompoObject->PenSize!=0);
98
+-        GETUI("OpacityCB")->       setEnabled(true);
99
+-        GETUI("ShadowEffectCB")->  setEnabled(true);
100
+-        GETUI("ShadowEffectED")->  setEnabled(CurrentCompoObject->FormShadow!=0);
101
+-        GETUI("ShadowColorCB")->   setEnabled(CurrentCompoObject->FormShadow!=0);
102
++        GETUI("BlockShapeStyleBT")->setEnabled(bEnable);
103
++        GETUI("BlockShapeStyleED")->setEnabled(bEnable);
104
++        GETUI("BackgroundFormCB")->setEnabled(bEnable);
105
++        GETUI("PenSizeEd")->       setEnabled(bEnable);
106
++        GETUI("PenColorCB")->      setEnabled(CurrentCompoObject->PenSize!=0 && bEnable);
107
++        GETUI("PenStyleCB")->      setEnabled(CurrentCompoObject->PenSize!=0 && bEnable);
108
++        GETUI("OpacityCB")->       setEnabled(bEnable);
109
++        GETUI("ShadowEffectCB")->  setEnabled(bEnable);
110
++        GETUI("ShadowEffectED")->  setEnabled(CurrentCompoObject->FormShadow!=0 && bEnable);
111
++        GETUI("ShadowColorCB")->   setEnabled(CurrentCompoObject->FormShadow!=0 && bEnable);
112
+ 
113
+         SetCBIndex(GETCOMBOBOX("BackgroundFormCB"),CurrentCompoObject->BackgroundForm);
114
+         GETSPINBOX("PenSizeEd")->      setValue(int(CurrentCompoObject->PenSize));
115
+diff -upr ffDiaporama.r486/src/ffDiaporama/DlgSlide/DlgImageComposer.cpp ffDiaporama.r500/src/ffDiaporama/DlgSlide/DlgImageComposer.cpp
116
+--- ffDiaporama.r486/src/ffDiaporama/DlgSlide/DlgImageComposer.cpp 2014-04-19 09:50:12.000000000 +0200
117
++++ ffDiaporama.r500/src/ffDiaporama/DlgSlide/DlgImageComposer.cpp 2016-03-13 10:47:30.000000000 +0100
118
+@@ -70,6 +70,7 @@ DlgImageComposer::DlgImageComposer(cDiap
119
+ // Initialise dialog
120
+ 
121
+ void DlgImageComposer::DoInitDialog() {
122
++    ToLog(LOGMSG_DEBUGTRACE,"IN:DlgImageComposer::DoInitDialog");
123
+     cShotComposer::DoInitDialog();
124
+ 
125
+     // Thumbnail part
126
+@@ -159,8 +160,6 @@ void DlgImageComposer::DoInitDialog() {
127
+ //====================================================================================================================
128
+ 
129
+ DlgImageComposer::~DlgImageComposer() {
130
+-    ToLog(LOGMSG_DEBUGTRACE,"IN:DlgImageComposer::DoInitDialog");
131
+-
132
+     ffdProject->CloseUnusedLibAv(ffdProject->CurrentCol);
133
+     delete ui;
134
+ }
135
+diff -upr ffDiaporama.r486/src/ffDiaporama/engine/cBaseMediaFile.cpp ffDiaporama.r500/src/ffDiaporama/engine/cBaseMediaFile.cpp
136
+--- ffDiaporama.r486/src/ffDiaporama/engine/cBaseMediaFile.cpp 2014-06-26 06:54:45.000000000 +0200
137
++++ ffDiaporama.r500/src/ffDiaporama/engine/cBaseMediaFile.cpp 2016-03-13 11:03:52.000000000 +0100
138
+@@ -124,7 +124,7 @@ int  Exiv2PatchVersion=EXIV2_PATCH_VERSI
139
+ #define VC_USERDATA     0x00000008
140
+ #define VC_FLUSHED      0x00000010
141
+ 
142
+-#define PIXFMT          PIX_FMT_RGB24
143
++#define PIXFMT          AV_PIX_FMT_RGB24
144
+ #define QTPIXFMT        QImage::Format_RGB888
145
+ 
146
+ //****************************************************************************************************************************************************************
147
+@@ -2104,6 +2104,8 @@ bool cVideoFile::DoAnalyseSound(QList<qr
148
+         foreach (qreal Value,*Peak) MaxVal.append(Value);
149
+         qSort(MaxVal.begin(),MaxVal.end());
150
+         qreal MaxSoundValue=MaxVal.count()>0?MaxValMaxVal.count()*0.9:1;
151
++        if( MaxSoundValue == 0 )
152
++            MaxSoundValue = 1;
153
+ 
154
+         // Adjust Peak and Moyenne values by transforming them as % of the max value
155
+         for (int i=0;i<Peak->count();i++) {
156
+@@ -2598,7 +2600,7 @@ bool cVideoFile::GetChildFullInformation
157
+                             AVFrame *FrameRGB=ALLOCFRAME();
158
+                             if ((FrameRGB)&&(!Thumbnail.isNull())) {
159
+                                 avpicture_fill((AVPicture *)FrameRGB,Thumbnail.bits(),PIXFMT,RealW,RealH);
160
+-                                struct SwsContext *img_convert_ctx=sws_getContext(FrameYUV->width,FrameYUV->height,(PixelFormat)FrameYUV->format,RealW,RealH,PIXFMT,SWS_FAST_BILINEAR,NULL,NULL,NULL);
161
++                                struct SwsContext *img_convert_ctx=sws_getContext(FrameYUV->width,FrameYUV->height,(AVPixelFormat)FrameYUV->format,RealW,RealH,PIXFMT,SWS_FAST_BILINEAR,NULL,NULL,NULL);
162
+                                 if (img_convert_ctx!=NULL) {
163
+                                     int ret = sws_scale(img_convert_ctx,FrameYUV->data,FrameYUV->linesize,0,FrameYUV->height,FrameRGB->data,FrameRGB->linesize);
164
+                                     if (ret>0) {
165
+@@ -2919,9 +2921,9 @@ int cVideoFile::VideoFilter_Open() {
166
+             ToLog(LOGMSG_CRITICAL,QString("Error in cVideoFile::VideoFilter_Open : avfilter_graph_create_filter: src"));
167
+             return result;
168
+         }
169
+-        std::vector<PixelFormat> m_formats;
170
+-        m_formats.push_back(PIX_FMT_YUVJ420P);
171
+-        m_formats.push_back(PIX_FMT_NONE);      /* always add none to get a terminated list in Libav world */
172
++        std::vector<AVPixelFormat> m_formats;
173
++        m_formats.push_back(AV_PIX_FMT_YUVJ420P);
174
++        m_formats.push_back(AV_PIX_FMT_NONE);      /* always add none to get a terminated list in Libav world */
175
+         if ((result=avfilter_graph_create_filter(&VideoFilterOut,outFilter,"out",NULL,NULL,VideoFilterGraph))<0) {
176
+             ToLog(LOGMSG_CRITICAL,QString("Error in cVideoFile::VideoFilter_Open : avfilter_graph_create_filter: out"));
177
+             return result;
178
+@@ -3754,7 +3756,7 @@ QImage *cVideoFile::ConvertYUVToRGB(bool
179
+         struct SwsContext *img_convert_ctx=sws_getContext(
180
+             Frame->width,                                                     // Src width
181
+             Frame->height,                                                    // Src height
182
+-            (PixelFormat)Frame->format,                                       // Src Format
183
++            (AVPixelFormat)Frame->format,                                       // Src Format
184
+             W,                                                                // Destination width
185
+             H,                                                                // Destination height
186
+             PIXFMT,                                                           // Destination Format
187
+@@ -3837,11 +3839,11 @@ QImage *cVideoFile::ImageAt(bool Preview
188
+ int cVideoFile::getThreadFlags(AVCodecID ID) {
189
+     int Ret=0;
190
+     switch (ID) {
191
+-        case CODEC_ID_PRORES:
192
+-        case CODEC_ID_MPEG1VIDEO:
193
+-        case CODEC_ID_DVVIDEO:
194
+-        case CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
195
+-        case CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
196
++        case AV_CODEC_ID_PRORES:
197
++        case AV_CODEC_ID_MPEG1VIDEO:
198
++        case AV_CODEC_ID_DVVIDEO:
199
++        case AV_CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
200
++        case AV_CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
201
+         default:                    Ret=FF_THREAD_FRAME;                    break;
202
+     }
203
+     return Ret;
204
+diff -upr ffDiaporama.r486/src/ffDiaporama/engine/cDeviceModelDef.h ffDiaporama.r500/src/ffDiaporama/engine/cDeviceModelDef.h
205
+--- ffDiaporama.r486/src/ffDiaporama/engine/cDeviceModelDef.h  2014-04-12 06:41:33.000000000 +0200
206
++++ ffDiaporama.r500/src/ffDiaporama/engine/cDeviceModelDef.h  2016-03-13 11:03:52.000000000 +0100
207
+@@ -53,7 +53,6 @@ extern "C" {
208
+ 
209
+ #include <libavutil/mathematics.h>
210
+ #include <libavutil/pixdesc.h>
211
+-#include <libavutil/audioconvert.h>
212
+ 
213
+ #include <libavcodec/avcodec.h>
214
+ 
215
+@@ -84,11 +83,16 @@ extern "C" {
216
  #elif (LIBAVUTIL_VERSION_MICRO>=100)&&(LIBAVCODEC_VERSION_MICRO>=100)&&(LIBAVFORMAT_VERSION_MICRO>=100)&&(LIBAVDEVICE_VERSION_MICRO>=100)&&(LIBAVFILTER_VERSION_MICRO>=100)&&(LIBSWSCALE_VERSION_MICRO>=100)
217
      #define FFMPEG
218
      #include "libswresample/swresample.h"
219
-+    #ifndef SWR_CH_MAX
220
-+        #define SWR_CH_MAX 32
221
-+    #endif
222
-     #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX
223
-     #include "libavfilter/avcodec.h"
224
+-    #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX
225
+-    #include "libavfilter/avcodec.h"
226
++    #include "libavcodec/avcodec.h"
227
      #include "libavfilter/buffersink.h"
228
--- 
229
-2.1.0
230
-
231
+     #include "libavfilter/buffersrc.h"
232
+-    #if     ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,66,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,52,102))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,33,100))&& \
233
++    #if     ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(54,15,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(56,13,100))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(56,15,102))&&   \
234
++             (LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(56,3,100))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(5,2,103))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(3,1,101))&&   \
235
++             (LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(1,1,100)))
236
++    #define FFMPEGVERSIONINT    250
237
++        #define FFMPEGVERSION       "FFmpeg 2.5 or higher"
238
++        #define RESAMPLE_MAX_CHANNELS 32
239
++    #elif   ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,66,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,52,102))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,33,100))&& \
240
+              (LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(55,10,100))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(4,2,100))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,5,102))&&   \
241
+              (LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(0,18,100)))
242
+         #define FFMPEGVERSIONINT    220
243
+@@ -108,38 +112,18 @@ extern "C" {
244
+     #else
245
+         // unsupported version
246
+     #endif
247
+-#endif
248
++    #if (FFMPEGVERSIONINT >=250)
249
++   #define RESAMPLE_MAX_CHANNELS 32
250
++    #else
251
++   #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX
252
++    #endif
253
++ #endif
254
+ }
255
+ 
256
+ #ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
257
+     #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
258
+ #endif
259
+ 
260
+-#if !defined(FF_API_CODEC_ID)
261
+-    #define AV_CODEC_ID_NONE        CODEC_ID_NONE
262
+-    #define AV_CODEC_ID_MJPEG       CODEC_ID_MJPEG
263
+-    #define AV_CODEC_ID_MPEG2VIDEO  CODEC_ID_MPEG2VIDEO
264
+-    #define AV_CODEC_ID_MPEG4       CODEC_ID_MPEG4
265
+-    #define AV_CODEC_ID_H264        CODEC_ID_H264
266
+-    #define AV_CODEC_ID_VP8         CODEC_ID_VP8
267
+-    #define AV_CODEC_ID_FLV1        CODEC_ID_FLV1
268
+-    #define AV_CODEC_ID_THEORA      CODEC_ID_THEORA
269
+-    #define AV_CODEC_ID_WMV1        CODEC_ID_WMV1
270
+-    #define AV_CODEC_ID_WMV2        CODEC_ID_WMV2
271
+-    #define AV_CODEC_ID_WMV3        CODEC_ID_WMV3
272
+-    #define AV_CODEC_ID_PCM_S16LE   CODEC_ID_PCM_S16LE
273
+-    #define AV_CODEC_ID_MP3         CODEC_ID_MP3
274
+-    #define AV_CODEC_ID_AAC         CODEC_ID_AAC
275
+-    #define AV_CODEC_ID_AC3         CODEC_ID_AC3
276
+-    #define AV_CODEC_ID_VORBIS      CODEC_ID_VORBIS
277
+-    #define AV_CODEC_ID_MP2         CODEC_ID_MP2
278
+-    #define AV_CODEC_ID_AMR_WB      CODEC_ID_AMR_WB
279
+-    #define AV_CODEC_ID_AMR_NB      CODEC_ID_AMR_NB
280
+-    #define AV_CODEC_ID_FLAC        CODEC_ID_FLAC
281
+-    #define AV_CODEC_ID_WMAV1       CODEC_ID_WMAV1
282
+-    #define AV_CODEC_ID_WMAV2       CODEC_ID_WMAV2
283
+-#endif
284
+-
285
+ #if !defined(avcodec_free_frame)
286
+     #define avcodec_free_frame  av_freep
287
+ #endif
288
+diff -upr ffDiaporama.r486/src/ffDiaporama/engine/_EncodeVideo.cpp ffDiaporama.r500/src/ffDiaporama/engine/_EncodeVideo.cpp
289
+--- ffDiaporama.r486/src/ffDiaporama/engine/_EncodeVideo.cpp   2014-06-23 09:39:23.000000000 +0200
290
++++ ffDiaporama.r500/src/ffDiaporama/engine/_EncodeVideo.cpp   2016-03-13 11:09:23.000000000 +0100
291
+@@ -20,7 +20,7 @@
292
+ 
293
+ #include "_EncodeVideo.h"
294
+ 
295
+-#define PIXFMT      PIX_FMT_RGB24
296
++#define PIXFMT      AV_PIX_FMT_RGB24
297
+ #define QTPIXFMT    QImage::Format_RGB888
298
+ 
299
+ //*************************************************************************************************************************************************
300
+@@ -185,11 +185,11 @@ void cEncodeVideo::CloseEncoder() {
301
+ int cEncodeVideo::getThreadFlags(AVCodecID ID) {
302
+     int Ret=0;
303
+     switch (ID) {
304
+-        case CODEC_ID_PRORES:
305
+-        case CODEC_ID_MPEG1VIDEO:
306
+-        case CODEC_ID_DVVIDEO:
307
+-        case CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
308
+-        case CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
309
++        case AV_CODEC_ID_PRORES:
310
++        case AV_CODEC_ID_MPEG1VIDEO:
311
++        case AV_CODEC_ID_DVVIDEO:
312
++        case AV_CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
313
++        case AV_CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
314
+         default:                    Ret=FF_THREAD_FRAME;                    break;
315
+     }
316
+     return Ret;
317
+@@ -414,8 +414,11 @@ bool cEncodeVideo::OpenVideoStream(sVide
318
+     // Setup codec parameters
319
+     VideoStream->codec->width               =ImageWidth;
320
+     VideoStream->codec->height              =ImageHeight;
321
+-    VideoStream->codec->pix_fmt             =PIX_FMT_YUV420P;
322
++    VideoStream->codec->pix_fmt             =AV_PIX_FMT_YUV420P;
323
+     VideoStream->codec->time_base           =VideoFrameRate;
324
++    #if FFMPEGVERSIONINT>=250
325
++    VideoStream->time_base                  = VideoFrameRate;   //new ffmpeg 2.5.0!!!!
326
++    #endif
327
+     VideoStream->codec->sample_aspect_ratio =PixelAspectRatio;
328
+     VideoStream->sample_aspect_ratio        =PixelAspectRatio;
329
+     VideoStream->codec->gop_size            =12;
330
+@@ -441,7 +444,7 @@ bool cEncodeVideo::OpenVideoStream(sVide
331
+     } else if (codec->id==AV_CODEC_ID_MJPEG) {
332
+ 
333
+         //-qscale 2 -qmin 2 -qmax 2
334
+-        VideoStream->codec->pix_fmt             =PIX_FMT_YUVJ420P;
335
++        VideoStream->codec->pix_fmt             =AV_PIX_FMT_YUVJ420P;
336
+         VideoStream->codec->qmin                =2;
337
+         VideoStream->codec->qmax                =2;
338
+         VideoStream->codec->bit_rate_tolerance  =int(qreal(int64_t(ImageWidth)*int64_t(ImageHeight)*int64_t(VideoFrameRate.den))/qreal(VideoFrameRate.num))*10;
339
+diff -upr ffDiaporama.r486/src/ffDiaporama_lib/cDatabase.cpp ffDiaporama.r500/src/ffDiaporama_lib/cDatabase.cpp
340
+--- ffDiaporama.r486/src/ffDiaporama_lib/cDatabase.cpp 2014-04-12 07:49:47.000000000 +0200
341
++++ ffDiaporama.r500/src/ffDiaporama_lib/cDatabase.cpp 2016-03-13 10:44:45.000000000 +0100
342
+@@ -462,7 +462,8 @@ cFilesTable::cFilesTable(cDatabase *Data
343
+                             "BasicProperties    text,"\
344
+                             "ExtendedProperties text,"\
345
+                             "Thumbnail16        binary,"\
346
+-                            "Thumbnail100       binary"\
347
++                            "Thumbnail100       binary,"\
348
++                            "SoundWave          text"\
349
+                      ")";
350
+     CreateIndexQuery.append("CREATE INDEX idx_MediaFiles_Key ON MediaFiles (Key)");
351
+     CreateIndexQuery.append("CREATE INDEX idx_MediaFiles_FolderKey ON MediaFiles (FolderKey,ShortName)");
352
+@@ -811,7 +812,11 @@ bool cFilesTable::GetAnalyseSound(qlongl
353
+     QSqlQuery Query(Database->db);
354
+     *RealAudioDuration=0;
355
+     if (RealVideoDuration) *RealVideoDuration=0;
356
+-    Query.prepare((QString("SELECT SoundWave FROM %1 WHERE Key=:Key").arg(TableName)));
357
++    if( !Query.prepare((QString("SELECT SoundWave FROM %1 WHERE Key=:Key").arg(TableName))) )
358
++    {
359
++        DisplayLastSQLError(&Query);
360
++        return false;
361
++    }
362
+     Query.bindValue(":Key",FileKey,QSql::In);
363
+     if (!Query.exec()) {
364
+         DisplayLastSQLError(&Query);
365
+diff -upr ffDiaporama.r486/src/ffDiaporama_lib/ImageFilters.cpp ffDiaporama.r500/src/ffDiaporama_lib/ImageFilters.cpp
366
+--- ffDiaporama.r486/src/ffDiaporama_lib/ImageFilters.cpp  2014-01-19 08:27:13.000000000 +0100
367
++++ ffDiaporama.r500/src/ffDiaporama_lib/ImageFilters.cpp  2016-03-13 10:46:02.000000000 +0100
368
+@@ -836,7 +836,7 @@ void BlurScanLine(float *kernel,int kern
369
+             scale = 0.0;
370
+             k = kernel;
371
+             src = source;
372
+-            for (i=0;i<columns;++k,src+=offset) {
373
++            for (i=0;i<columns;++k,src+=offset,i++) {
374
+                 if((i >= (x-kern_width/2)) && (i <= (x+kern_width/2))) {
375
+                     aggregate.red  +=(*k)*qRed(*src);
376
+                     aggregate.green+=(*k)*qGreen(*src);
377
ffDiaporama_bin-2.2+svn488.tar.gz Added
ffDiaporama_rsc-2.2+svn485.tar.gz Added
ffdiaporama_bin_2.1.2014.0209.tar.gz Deleted
ffdiaporama_rsc_2.1.2014.0209.tar.gz Deleted
Refresh
Refresh
Request History
Luigi Baldoni's avatar

Aloysius created request almost 9 years ago

Update to latest svn source and patched for ffmpeg 3.0


Olaf Hering's avatar

olh accepted request almost 9 years ago