summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--0001-Adapt-to-FFmpeg-4.0-API.patch132
-rw-r--r--PKGBUILD18
3 files changed, 151 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 602b54d2f2b1..f1ae30afa6b9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# lun may 21 19:22:20 UTC 2018
+# mar may 22 22:38:45 UTC 2018
pkgbase = webcamoid
pkgdesc = Webcamoid is a full featured webcam capture application.
pkgver = 8.1.0
- pkgrel = 2
+ pkgrel = 3
url = https://webcamoid.github.io/
install = webcamoid.install
arch = i686
@@ -34,7 +34,9 @@ pkgbase = webcamoid
provides = webcamoid
conflicts = webcamoid-git
source = https://github.com/webcamoid/webcamoid/archive/8.1.0.tar.gz
+ source = 0001-Adapt-to-FFmpeg-4.0-API.patch
sha256sums = 2e51731c36a86a4b3e323c11000a04b7ce06b5d228519676f4070e44e2a62947
+ sha256sums = bd9ca4471af67ab5ed99f492de33cf26a4858b260654d252c6b3fd89a696864f
pkgname = webcamoid
diff --git a/0001-Adapt-to-FFmpeg-4.0-API.patch b/0001-Adapt-to-FFmpeg-4.0-API.patch
new file mode 100644
index 000000000000..62dc9a7c2bd4
--- /dev/null
+++ b/0001-Adapt-to-FFmpeg-4.0-API.patch
@@ -0,0 +1,132 @@
+diff --git a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp b/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp
+index f550fb6..d6f4b98 100644
+--- a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp
++++ b/libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp
+@@ -62,7 +62,7 @@ AbstractStream::AbstractStream(const AVFormatContext *formatContext,
+
+ // 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;
+
+diff --git a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp b/libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp
+index f4d10ba..3fba003 100644
+--- a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp
++++ b/libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp
+@@ -267,7 +267,7 @@ void AudioStream::convertPacket(const AkPacket &packet)
+ 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 *frame)
+ 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;
+diff --git a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp b/libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp
+index 224ff5c..db09b8c 100644
+--- a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp
++++ b/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;
+
+diff --git a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp b/libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp
+index b0187fd..83fffc2 100644
+--- a/libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp
++++ b/libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp
+@@ -273,8 +273,10 @@ int VideoStream::encodeData(AVFrame *frame)
+ {
+ auto formatContext = this->formatContext();
+
++#ifdef AVFMT_RAWPICTURE
+ if (!frame && formatContext->oformat->flags & AVFMT_RAWPICTURE)
+ return AVERROR_EOF;
++#endif
+
+ auto codecContext = this->codecContext();
+
+@@ -300,6 +302,7 @@ int VideoStream::encodeData(AVFrame *frame)
+
+ 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;
+@@ -315,6 +318,7 @@ int VideoStream::encodeData(AVFrame *frame)
+
+ return 0;
+ }
++#endif
+
+ // encode the image
+ #ifdef HAVE_SENDRECV
+diff --git a/libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp b/libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp
+index d67a060..76f2989 100644
+--- a/libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp
++++ b/libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp
+@@ -96,8 +96,10 @@ AbstractStream::AbstractStream(const AVFormatContext *formatContext,
+ 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);
+ }
+diff --git a/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp b/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp
+index 30bab74..c129a6e 100644
+--- a/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp
++++ b/libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp
+@@ -219,11 +219,13 @@ bool ConvertVideoFFmpeg::init(const AkCaps &caps)
+ 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();
diff --git a/PKGBUILD b/PKGBUILD
index 7bff836e8fd8..5b6c2129be53 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=webcamoid
pkgver=8.1.0
-pkgrel=2
+pkgrel=3
pkgdesc="Webcamoid is a full featured webcam capture application."
url='https://webcamoid.github.io/'
license=('GPL')
@@ -31,8 +31,20 @@ makedepends=('v4l-utils'
provides=('webcamoid')
conflicts=('webcamoid-git')
install="${pkgname}.install"
-source=("https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz")
-sha256sums=('2e51731c36a86a4b3e323c11000a04b7ce06b5d228519676f4070e44e2a62947')
+source=("https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz"
+ "0001-Adapt-to-FFmpeg-4.0-API.patch")
+sha256sums=('2e51731c36a86a4b3e323c11000a04b7ce06b5d228519676f4070e44e2a62947'
+ 'bd9ca4471af67ab5ed99f492de33cf26a4858b260654d252c6b3fd89a696864f')
+
+prepare() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+
+ # Backported changes from:
+ #
+ # https://github.com/webcamoid/webcamoid/pull/119
+ # https://github.com/webcamoid/webcamoid/pull/120
+ patch -Np1 -i "../0001-Adapt-to-FFmpeg-4.0-API.patch"
+}
build() {
cd "$srcdir/${pkgname}-${pkgver}"