]> git.pld-linux.org Git - packages/simplescreenrecorder.git/commitdiff
- fix building with ffmpeg 4.0 auto/th/simplescreenrecorder-0.3.6-3
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 29 Apr 2018 18:06:05 +0000 (20:06 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 29 Apr 2018 18:06:05 +0000 (20:06 +0200)
- add missing c++ header
- rel 3

build.patch [new file with mode: 0644]
ffmpeg4.patch [new file with mode: 0644]
simplescreenrecorder.spec

diff --git a/build.patch b/build.patch
new file mode 100644 (file)
index 0000000..a427035
--- /dev/null
@@ -0,0 +1,10 @@
+--- ssr-0.3.6/src/Benchmark.cpp.orig   2015-11-02 22:13:49.000000000 +0100
++++ ssr-0.3.6/src/Benchmark.cpp        2018-04-29 20:00:46.863057424 +0200
+@@ -25,6 +25,7 @@
+ #include "FastScaler_Scale.h"
+ #include "Logger.h"
+ #include "TempBuffer.h"
++#include <random>
+ struct ImageGeneric {
diff --git a/ffmpeg4.patch b/ffmpeg4.patch
new file mode 100644 (file)
index 0000000..ed2e886
--- /dev/null
@@ -0,0 +1,69 @@
+--- ssr-0.3.6/src/Global.h~    2015-11-02 22:13:49.000000000 +0100
++++ ssr-0.3.6/src/Global.h     2018-04-29 19:51:10.866406546 +0200
+@@ -326,9 +326,6 @@
+ inline double ToDouble(const AVRational& r) {
+       return (double) r.num / (double) r.den;
+ }
+-inline double ToDouble(const AVFrac& f) {
+-      return (double) f.val + (double) f.num / (double) f.den;
+-}
+ inline void GroupEnabled(std::initializer_list<QAction*> actions, bool enabled) {
+       for(QAction *a : actions) {
+--- ssr-0.3.6/src/AV/Output/AudioEncoder.cpp~  2015-11-02 22:13:49.000000000 +0100
++++ ssr-0.3.6/src/AV/Output/AudioEncoder.cpp   2018-04-29 19:52:26.060460580 +0200
+@@ -59,7 +59,7 @@
+ unsigned int AudioEncoder::GetFrameSize() {
+ #if SSR_USE_AVCODEC_ENCODE_AUDIO2
+-      return (GetStream()->codec->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)? DEFAULT_FRAME_SAMPLES : GetStream()->codec->frame_size;
++      return (GetStream()->codec->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)? DEFAULT_FRAME_SAMPLES : GetStream()->codec->frame_size;
+ #else
+       return (GetStream()->codec->frame_size <= 1)? DEFAULT_FRAME_SAMPLES : GetStream()->codec->frame_size;
+ #endif
+@@ -121,7 +121,7 @@
+               if(key == "threads") {
+                       stream->codec->thread_count = ParseCodecOptionInt(key, value, 1, 100);
+               } else if(key == "qscale") {
+-                      stream->codec->flags |= CODEC_FLAG_QSCALE;
++                      stream->codec->flags |= AV_CODEC_FLAG_QSCALE;
+                       stream->codec->global_quality = lrint(ParseCodecOptionDouble(key, value, -1.0e6, 1.0e6, FF_QP2LAMBDA));
+               } else if(key == "sampleformat") {
+                       sample_format_name = value;
+--- ssr-0.3.6/src/AV/Output/BaseEncoder.cpp~   2015-11-02 22:13:49.000000000 +0100
++++ ssr-0.3.6/src/AV/Output/BaseEncoder.cpp    2018-04-29 19:52:56.784084323 +0200
+@@ -207,7 +207,7 @@
+               }
+               // flush the encoder
+-              if(!m_should_stop && (m_stream->codec->codec->capabilities & CODEC_CAP_DELAY)) {
++              if(!m_should_stop && (m_stream->codec->codec->capabilities & AV_CODEC_CAP_DELAY)) {
+                       Logger::LogInfo("[BaseEncoder::EncoderThread] " + Logger::tr("Flushing encoder ..."));
+                       while(!m_should_stop) {
+                               if(EncodeFrame(NULL)) {
+--- ssr-0.3.6/src/AV/Output/Muxer.cpp~ 2015-11-02 22:13:49.000000000 +0100
++++ ssr-0.3.6/src/AV/Output/Muxer.cpp  2018-04-29 19:54:03.428041137 +0200
+@@ -289,10 +289,10 @@
+       // not sure why this is needed, but it's in the example code and it doesn't work without this
+       if(m_format_context->oformat->flags & AVFMT_GLOBALHEADER)
+-              stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
++              stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+       // if the codec is experimental, allow it
+-      if(codec->capabilities & CODEC_CAP_EXPERIMENTAL) {
++      if(codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) {
+               Logger::LogWarning("[Muxer::AddStream] " + Logger::tr("Warning: This codec is considered experimental by libav/ffmpeg."));
+               stream->codec->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+       }
+--- ssr-0.3.6/src/AV/Output/VideoEncoder.cpp~  2015-11-02 22:13:49.000000000 +0100
++++ ssr-0.3.6/src/AV/Output/VideoEncoder.cpp   2018-04-29 19:54:53.401837201 +0200
+@@ -147,7 +147,7 @@
+               if(key == "threads") {
+                       stream->codec->thread_count = ParseCodecOptionInt(key, value, 1, 100);
+               } else if(key == "qscale") {
+-                      stream->codec->flags |= CODEC_FLAG_QSCALE;
++                      stream->codec->flags |= AV_CODEC_FLAG_QSCALE;
+                       stream->codec->global_quality = lrint(ParseCodecOptionDouble(key, value, -1.0e6, 1.0e6, FF_QP2LAMBDA));
+               } else if(key == "minrate") {
+                       stream->codec->rc_min_rate = ParseCodecOptionInt(key, value, 1, 1000000, 1024); // kbps
index 8c4a0eb65d820297b2d9c1a9b512b2a961e706ea..1459043b8f3ca82457c24fff716ad3e7d53cd98a 100644 (file)
@@ -2,11 +2,13 @@ Summary:      Screen recorder for Linux
 Summary(pl.UTF-8):     Nagrywarka ekranu dla Linuksa
 Name:          simplescreenrecorder
 Version:       0.3.6
-Release:       2
+Release:       3
 License:       GPL v3
 Group:         Applications
 Source0:       https://github.com/MaartenBaert/ssr/archive/%{version}/ssr-%{version}.tar.gz
 # Source0-md5: 3c0dcf288c0cc1b21f4cd2010c73d5ae
+Patch0:                build.patch
+Patch1:                ffmpeg4.patch
 URL:           http://www.maartenbaert.be/simplescreenrecorder/
 BuildRequires: Mesa-libGL-devel
 BuildRequires: Mesa-libGLU-devel
@@ -46,6 +48,8 @@ OpenGL applications, for use with the SimpleScreenRecorder.
 
 %prep
 %setup -q -n ssr-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
This page took 0.188556 seconds and 4 git commands to generate.