[arch-commits] Commit in libopenshot/repos (3 files)
Maxime Gauduin
alucryd at archlinux.org
Tue Aug 7 11:38:05 UTC 2018
Date: Tuesday, August 7, 2018 @ 11:38:04
Author: alucryd
Revision: 370121
archrelease: copy trunk to community-staging-x86_64
Added:
libopenshot/repos/community-staging-x86_64/
libopenshot/repos/community-staging-x86_64/PKGBUILD
(from rev 370120, libopenshot/trunk/PKGBUILD)
libopenshot/repos/community-staging-x86_64/ffmpeg-4.0.patch
(from rev 370120, libopenshot/trunk/ffmpeg-4.0.patch)
------------------+
PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++++++++++
ffmpeg-4.0.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 95 insertions(+)
Copied: libopenshot/repos/community-staging-x86_64/PKGBUILD (from rev 370120, libopenshot/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2018-08-07 11:38:04 UTC (rev 370121)
@@ -0,0 +1,45 @@
+# $Id$
+# Maintainer : Martin Wimpress <code at flexion.org>
+# Contributor: Foster McLane <fkmclane at gmail.com>
+# Contributor: Jonathan Thomas <jonathan at openshot.org>
+
+pkgname=libopenshot
+pkgver=0.2.0
+pkgrel=3
+pkgdesc="A high quality, open-source video editing, animation, and playback library for C++, Python, and Ruby."
+arch=('x86_64')
+url="http://openshot.org/"
+license=('LGPL3')
+depends=('libmagick6' 'ffmpeg' 'x264' 'libopenshot-audio' 'python' 'jsoncpp' 'qt5-multimedia' 'zeromq')
+makedepends=('cmake' 'doxygen' 'swig' 'unittestpp')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/OpenShot/libopenshot/archive/v$pkgver.tar.gz"
+ffmpeg-4.0.patch)
+sha256sums=('f6f79c18023253720698c3049a0cd4b5783354cfbc6345e736e15268be6e297d'
+ 'bfc6aa2752a053774b0c46d0339b41df68f8e63765f1185f0df596ecbd3633a8')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+
+ # patches for ffmpeg 4.0
+ # TODO https://github.com/OpenShot/libopenshot/issues/87
+ patch -p1 -i "$srcdir/ffmpeg-4.0.patch"
+ sed -i \
+ -e 's#FF_INPUT_BUFFER_PADDING_SIZE#AV_INPUT_BUFFER_PADDING_SIZE#g' \
+ -e 's#CODEC_FLAG_GLOBAL_HEADER#AV_CODEC_FLAG_GLOBAL_HEADER#g' \
+ src/FFmpegWriter.cpp src/FFmpegReader.cpp
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ mkdir build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 \
+ -DUSE_SYSTEM_JSONCPP=ON -DENABLE_RUBY=OFF ../
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ cd build
+ make DESTDIR="${pkgdir}" install
+}
Copied: libopenshot/repos/community-staging-x86_64/ffmpeg-4.0.patch (from rev 370120, libopenshot/trunk/ffmpeg-4.0.patch)
===================================================================
--- community-staging-x86_64/ffmpeg-4.0.patch (rev 0)
+++ community-staging-x86_64/ffmpeg-4.0.patch 2018-08-07 11:38:04 UTC (rev 370121)
@@ -0,0 +1,50 @@
+diff -ur libopenshot-0.1.9/src/FFmpegWriter.cpp libopenshot-0.1.9-modified/src/FFmpegWriter.cpp
+--- libopenshot-0.1.9/src/FFmpegWriter.cpp 2018-05-08 17:50:15.420230233 +0200
++++ libopenshot-0.1.9-modified/src/FFmpegWriter.cpp 2018-05-08 17:53:21.491354566 +0200
+@@ -544,8 +544,10 @@
+ {
+ if (info.has_audio && audio_codec && AV_GET_CODEC_TYPE(audio_st) == AVMEDIA_TYPE_AUDIO && AV_GET_CODEC_ATTRIBUTES(audio_st, audio_codec)->frame_size <= 1)
+ return;
++#ifdef AVFMT_RAWPICTURE
+ if (info.has_video && video_codec && AV_GET_CODEC_TYPE(video_st) == AVMEDIA_TYPE_VIDEO && (oc->oformat->flags & AVFMT_RAWPICTURE) && AV_FIND_DECODER_CODEC_ID(video_st) == AV_CODEC_ID_RAWVIDEO)
+ return;
++#endif
+
+ int error_code = 0;
+ int stop_encoding = 1;
+@@ -958,7 +960,11 @@
+ if (strcmp(fmt->name, "gif") != 0)
+ // If not GIF format, skip the encoding process
+ // Set raw picture flag (so we don't encode this video)
++#ifdef AVFMT_RAWPICTURE
+ oc->oformat->flags |= AVFMT_RAWPICTURE;
++#else
++ ((void)0);
++#endif
+ } else {
+ // Set the default codec
+ c->pix_fmt = PIX_FMT_YUV420P;
+@@ -966,7 +972,9 @@
+ }
+
+ AV_COPY_PARAMS_FROM_CONTEXT(st, c);
++#ifdef AVFMT_RAWPICTURE
+ ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::add_video_stream (" + (string)fmt->name + " : " + (string)av_get_pix_fmt_name(c->pix_fmt) + ")", "c->codec_id", c->codec_id, "c->bit_rate", c->bit_rate, "c->pix_fmt", c->pix_fmt, "oc->oformat->flags", oc->oformat->flags, "AVFMT_RAWPICTURE", AVFMT_RAWPICTURE, "", -1);
++#endif
+
+ return st;
+ }
+@@ -1519,9 +1527,13 @@
+ // write video frame
+ bool FFmpegWriter::write_video_packet(std::shared_ptr<Frame> frame, AVFrame* frame_final)
+ {
++#ifdef AVFMT_RAWPICTURE
+ ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::write_video_packet", "frame->number", frame->number, "oc->oformat->flags & AVFMT_RAWPICTURE", oc->oformat->flags & AVFMT_RAWPICTURE, "", -1, "", -1, "", -1, "", -1);
+
+ if (oc->oformat->flags & AVFMT_RAWPICTURE) {
++#else
++ if (0) {
++#endif
+ // Raw video case.
+ AVPacket pkt;
+ av_init_packet(&pkt);
More information about the arch-commits
mailing list