Hello community,

here is the log from the commit of package webcamoid for openSUSE:Factory 
checked in at 2018-07-09 13:29:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/webcamoid (Old)
 and      /work/SRC/openSUSE:Factory/.webcamoid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "webcamoid"

Mon Jul  9 13:29:49 2018 rev:5 rq:621571 version:8.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/webcamoid/webcamoid.changes      2018-07-06 
10:47:49.270838527 +0200
+++ /work/SRC/openSUSE:Factory/.webcamoid.new/webcamoid.changes 2018-07-09 
13:31:33.422464489 +0200
@@ -1,0 +2,6 @@
+Sun Jul  8 14:24:32 UTC 2018 - aloi...@gmx.com
+
+- Added webcamoid-8.1.0-ffmpeg4.patch to support ffmpeg4 and
+  changed requirements accordingly
+
+-------------------------------------------------------------------

New:
----
  webcamoid-8.1.0-ffmpeg4.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ webcamoid.spec ++++++
--- /var/tmp/diff_new_pack.bsPJ1P/_old  2018-07-09 13:31:34.082463160 +0200
+++ /var/tmp/diff_new_pack.bsPJ1P/_new  2018-07-09 13:31:34.082463160 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package webcamoid
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,10 +20,12 @@
 Version:        8.1.0
 Release:        0
 Summary:        Webcam plasmoid for KDE
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Group:          System/GUI/KDE
 Url:            https://webcamoid.github.io/
 Source:         
https://github.com/hipersayanX/Webcamoid/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM webcamoid-8.1.0-ffmpeg4.patch
+Patch0:         webcamoid-8.1.0-ffmpeg4.patch
 BuildRequires:  bison
 BuildRequires:  desktop-file-utils
 BuildRequires:  fdupes
@@ -43,19 +45,18 @@
 BuildRequires:  pkgconfig(Qt5Svg) >= 5.6
 BuildRequires:  pkgconfig(Qt5Widgets) >= 5.6
 BuildRequires:  pkgconfig(frei0r)
-BuildRequires:  pkgconfig(libavcodec) = 57.107.100
-BuildRequires:  pkgconfig(libavdevice) = 57.10.100
-BuildRequires:  pkgconfig(libavformat) = 57.83.100
-BuildRequires:  pkgconfig(libavutil) = 55.78.100
+BuildRequires:  pkgconfig(libavcodec) >= 58.7.100
+BuildRequires:  pkgconfig(libavdevice) >= 57.0.0
+BuildRequires:  pkgconfig(libavformat) >= 58.0.102
+BuildRequires:  pkgconfig(libavutil) >= 56.6.100
 BuildRequires:  pkgconfig(libpulse-simple)
-BuildRequires:  pkgconfig(libswscale) = 4.8.100
+BuildRequires:  pkgconfig(libswscale) >= 5.0.101
 BuildRequires:  pkgconfig(libv4l2)
 BuildRequires:  pkgconfig(qimageblitz)
 Requires:       frei0r-plugins
 Requires:       frei0r-plugins-opencv
 Provides:       plasmoid-webcamoid = %{version}
 Obsoletes:      plasmoid-webcamoid < %{version}
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 Webcam plasmoid for KDE desktop environment.
@@ -89,6 +90,7 @@
 
 %prep
 %setup -q -n webcamoid-%{version}
+%patch0 -p1
 
 %build
 qmake-qt5 \
@@ -128,8 +130,8 @@
 %desktop_database_postun
 
 %files
-%defattr(-,root,root)
-%doc AUTHORS ChangeLog README.html THANKS COPYING
+%doc AUTHORS ChangeLog README.html THANKS
+%license COPYING
 %{_bindir}/webcamoid
 %{_kf5_applicationsdir}/webcamoid.desktop
 %{_libdir}/libavkys.so.*
@@ -142,7 +144,6 @@
 %{_kf5_iconsdir}/hicolor
 
 %files devel
-%defattr(-,root,root,-)
 %{_libdir}/libavkys.so
 %{_includedir}/avkys
 %{_includedir}/avkys/*.h

++++++ webcamoid-8.1.0-ffmpeg4.patch ++++++
>From 52fbf8376085aded2d87397be58cda6e209d3bb7 Mon Sep 17 00:00:00 2001
From: Jan Beich <jbe...@freebsd.org>
Date: Tue, 1 May 2018 03:51:58 +0000
Subject: [PATCH] Adapt to FFmpeg 4.0 API

Index: 
webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp
+++ webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp
@@ -62,7 +62,7 @@ AbstractStream::AbstractStream(const AVF
 
     // Some formats want stream headers to be separate.
     if (formatContext->oformat->flags & AVFMT_GLOBALHEADER)
-        this->m_codecContext->flags |= CODEC_FLAG_GLOBAL_HEADER;
+        this->m_codecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
 
     this->m_codecContext->strict_std_compliance = CODEC_COMPLIANCE;
 
Index: 
webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.h
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.h
+++ webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.h
@@ -29,6 +29,15 @@ extern "C"
 {
     #include <libavformat/avformat.h>
     #include <libavcodec/avcodec.h>
+    #ifndef AV_CODEC_CAP_EXPERIMENTAL
+    #define AV_CODEC_CAP_EXPERIMENTAL CODEC_CAP_EXPERIMENTAL
+    #endif
+    #ifndef AV_CODEC_CAP_VARIABLE_FRAME_SIZE
+    #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE CODEC_CAP_VARIABLE_FRAME_SIZE
+    #endif
+    #ifndef AV_CODEC_FLAG_GLOBAL_HEADER
+    #define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
+    #endif
 }
 
 #define CODEC_COMPLIANCE FF_COMPLIANCE_VERY_STRICT
Index: webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp
+++ webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp
@@ -267,7 +267,7 @@ void AudioStream::convertPacket(const Ak
     this->deleteFrame(&this->m_frame);
     this->m_frame = oFrame;
 
-    if (codecContext->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE
+    if (codecContext->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE
         || oFrame->nb_samples >= codecContext->frame_size) {
         this->m_frameReady.wakeAll();
     }
@@ -280,7 +280,7 @@ int AudioStream::encodeData(AVFrame *fra
     auto codecContext = this->codecContext();
 
     if (!frame
-        && codecContext->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)
+        && codecContext->codec->capabilities & 
AV_CODEC_CAP_VARIABLE_FRAME_SIZE)
         return AVERROR_EOF;
 
     if (frame) {
@@ -366,7 +366,7 @@ AVFrame *AudioStream::dequeueFrame()
     this->m_frameMutex.lock();
 
     if (!this->m_frame
-        || (!(codecContext->codec->capabilities & 
CODEC_CAP_VARIABLE_FRAME_SIZE)
+        || (!(codecContext->codec->capabilities & 
AV_CODEC_CAP_VARIABLE_FRAME_SIZE)
             && this->m_frame->nb_samples < codecContext->frame_size)) {
         if (!this->m_frameReady.wait(&this->m_frameMutex, THREAD_WAIT_LIMIT)) {
             this->m_frameMutex.unlock();
@@ -377,7 +377,7 @@ AVFrame *AudioStream::dequeueFrame()
 
     AVFrame *oFrame = nullptr;
 
-    if (codecContext->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE
+    if (codecContext->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE
         || this->m_frame->nb_samples == codecContext->frame_size) {
         oFrame = this->m_frame;
         this->m_frame = nullptr;
Index: 
webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp
+++ 
webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp
@@ -251,7 +251,7 @@ class MediaWriterFFmpegGlobal
                 AVCodec *codec = nullptr;
 
                 while ((codec = av_codec_next(codec))) {
-                    if (codec->capabilities & CODEC_CAP_EXPERIMENTAL
+                    if (codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL
                         && CODEC_COMPLIANCE > FF_COMPLIANCE_EXPERIMENTAL)
                         continue;
 
Index: webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp
+++ webcamoid-8.1.0/libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp
@@ -273,9 +273,11 @@ int VideoStream::encodeData(AVFrame *fra
 {
     auto formatContext = this->formatContext();
 
+#ifdef AVFMT_RAWPICTURE
     if (!frame && formatContext->oformat->flags & AVFMT_RAWPICTURE)
         return AVERROR_EOF;
 
+#endif
     auto codecContext = this->codecContext();
 
     AkFrac outTimeBase(codecContext->time_base.num,
@@ -300,6 +302,7 @@ int VideoStream::encodeData(AVFrame *fra
 
     auto stream = this->stream();
 
+#ifdef AVFMT_RAWPICTURE
     if (formatContext->oformat->flags & AVFMT_RAWPICTURE) {
         // Raw video case - directly store the picture in the packet
         AVPacket pkt;
@@ -316,6 +319,7 @@ int VideoStream::encodeData(AVFrame *fra
         return 0;
     }
 
+#endif
     // encode the image
 #ifdef HAVE_SENDRECV
     auto result = avcodec_send_frame(codecContext, frame);
Index: 
webcamoid-8.1.0/libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp
+++ webcamoid-8.1.0/libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp
@@ -96,9 +96,11 @@ AbstractStream::AbstractStream(const AVF
         this->m_codecContext->idct_algo = FF_IDCT_AUTO;
         this->m_codecContext->error_concealment = FF_EC_GUESS_MVS | 
FF_EC_DEBLOCK;
 
+#ifdef CODEC_FLAG_EMU_EDGE
         if (this->m_codec->capabilities & CODEC_CAP_DR1)
             this->m_codecContext->flags |= CODEC_FLAG_EMU_EDGE;
 
+#endif
         av_dict_set(&this->m_codecOptions, "refcounted_frames", "0", 0);
     }
 
Index: 
webcamoid-8.1.0/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp
+++ 
webcamoid-8.1.0/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp
@@ -219,12 +219,14 @@ bool ConvertVideoFFmpeg::init(const AkCa
     if (!this->m_codecContext)
         return false;
 
-    if (codec->capabilities & CODEC_CAP_TRUNCATED)
-        this->m_codecContext->flags |= CODEC_FLAG_TRUNCATED;
+    if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+        this->m_codecContext->flags |= AV_CODEC_FLAG_TRUNCATED;
 
+#ifdef CODEC_FLAG_EMU_EDGE
     if (codec->capabilities & CODEC_CAP_DR1)
         this->m_codecContext->flags |= CODEC_FLAG_EMU_EDGE;
 
+#endif
     this->m_codecContext->pix_fmt = rawToFF->value(fourcc, AV_PIX_FMT_NONE);
     this->m_codecContext->width = caps.property("width").toInt();
     this->m_codecContext->height = caps.property("height").toInt();
Index: 
webcamoid-8.1.0/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.h
===================================================================
--- 
webcamoid-8.1.0.orig/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.h
+++ 
webcamoid-8.1.0/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.h
@@ -33,6 +33,12 @@ extern "C"
     #include <libavutil/imgutils.h>
     #include <libavutil/pixdesc.h>
     #include <libavutil/mem.h>
+    #ifndef AV_CODEC_CAP_TRUNCATED
+    #define AV_CODEC_CAP_TRUNCATED CODEC_CAP_TRUNCATED
+    #endif
+    #ifndef AV_CODEC_FLAG_TRUNCATED
+    #define AV_CODEC_FLAG_TRUNCATED CODEC_FLAG_TRUNCATED
+    #endif
 }
 
 #include "convertvideo.h"

Reply via email to