rdieter pushed to digikam (epel7). "backport QtGStreamer 1 support (#1092659) (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon May 18 19:43:25 UTC 2015
From b6a105db9836e1a0012b3225fc2fc6555e465d5a Mon Sep 17 00:00:00 2001
From: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date: Wed, 23 Jul 2014 21:10:25 +0200
Subject: backport QtGStreamer 1 support (#1092659)
* Wed Jul 23 2014 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.1.0-3
- apply upstream patch to handle QtGstreamer API 1.0 in VideoSlideShow tool;
whether to build against QtGStreamer 0.10 or 1.x is autodetected (#1092659)
diff --git a/digikam.spec b/digikam.spec
index f5dda93..eaf46ca 100644
--- a/digikam.spec
+++ b/digikam.spec
@@ -6,7 +6,7 @@
Name: digikam
Version: 4.1.0
-Release: 2%{?pre}%{?dist}
+Release: 3%{?pre}%{?dist}
Summary: A digital camera accessing & photo management application
License: GPLv2+
@@ -24,6 +24,10 @@ Source1: digikam-import.desktop
## upstreamable patches
## upstream patches
+# handle QtGstreamer API 1.0 in VideoSlideShow tool (Andreas Cord-Landwehr)
+# The patch autodetects whether we have QtGStreamer 0.10 or 1.x.
+# http://commits.kde.org/kipi-plugins/cbc59f1060fe4cf770d35800bbcefb1f89f882de
+Patch100: kipi-plugins-gstreamer1.patch
BuildRequires: eigen3-devel
BuildRequires: desktop-file-utils
@@ -65,7 +69,8 @@ BuildRequires: pkgconfig(qca2)
BuildRequires: pkgconfig(QJson)
%if 0%{?videoslideshow}
## VideoSlideShow
-BuildRequires: pkgconfig(QtGStreamer-0.10)
+# pkgconfig(QtGStreamer-1.0) vs. pkgconfig(QtGStreamer-0.10) is autodetected
+BuildRequires: qt-gstreamer-devel
BuildRequires: pkgconfig(ImageMagick)
%endif
# Panorama plugin requires flex and bison
@@ -229,6 +234,11 @@ BuildArch: noarch
%prep
%setup -q -n %{name}-%{version}%{?pre:-%{pre}}
+# applied unconditionally, it autodetects the version of QtGStreamer to use
+pushd extra/kipi-plugins
+patch100 -p1 -b .gstreamer1
+popd
+
# don't use bundled/old FindKipi.cmake in favor of kdelibs' version
# see http:/bugs.kde.org/307213
mv -f cmake/modules/FindKipi.cmake cmake/modules/FindKipi.cmake.ORIG
@@ -543,6 +553,10 @@ update-desktop-database -q &> /dev/null
%changelog
+* Wed Jul 23 2014 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.1.0-3
+- apply upstream patch to handle QtGstreamer API 1.0 in VideoSlideShow tool;
+ whether to build against QtGStreamer 0.10 or 1.x is autodetected (#1092659)
+
* Mon Jul 14 2014 Rex Dieter <rdieter at fedoraproject.org> 4.1.0-2
- rebuild (marble)
diff --git a/kipi-plugins-gstreamer1.patch b/kipi-plugins-gstreamer1.patch
new file mode 100644
index 0000000..dff2dbd
--- /dev/null
+++ b/kipi-plugins-gstreamer1.patch
@@ -0,0 +1,106 @@
+commit cbc59f1060fe4cf770d35800bbcefb1f89f882de
+Author: Gilles Caulier <caulier.gilles at gmail.com>
+Date: Thu Jul 10 09:59:49 2014 +0200
+
+ apply patch to handle QtGstreamer API 1.0 in VideoSlideShow tool
+ REVIEW: 119073
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb1e04c..ff42bb0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -349,6 +349,24 @@ PRINT_PLUGIN_COMPILE_STATUS("Panorama" FLEX_FOUND AND BISON_FOUND)
+ PRINT_PLUGIN_COMPILE_STATUS("VideoSlideshow" ImageMagick_FOUND AND QTGSTREAMER_FOUND)
+ PRINT_PLUGIN_COMPILE_STATUS("Wallpaper" BUILD_WALLPAPER)
+
++
++# set QtGStreamer API version
++MESSAGE(STATUS "----------------------------------------------------------------------------------")
++MESSAGE(STATUS "")
++IF((${QtGStreamer_VERSION_MAJOR} EQUAL 1 AND ${QtGStreamer_VERSION_MINOR} EQUAL 1 AND ${QtGStreamer_VERSION_PATCH} GREATER 80)
++ OR (${QtGStreamer_VERSION_MAJOR} EQUAL 1 AND ${QtGStreamer_VERSION_MINOR} GREATER 1))
++ SET(GSTREAMER_API_1 TRUE)
++ELSE((${QtGStreamer_VERSION_MAJOR} EQUAL 1 AND ${QtGStreamer_VERSION_MINOR} EQUAL 1 AND ${QtGStreamer_VERSION_PATCH} GREATER 80)
++ OR (${QtGStreamer_VERSION_MAJOR} EQUAL 1 AND ${QtGStreamer_VERSION_MINOR} GREATER 1))
++ SET(GSTREAMER_API_1 FALSE)
++ENDIF((${QtGStreamer_VERSION_MAJOR} EQUAL 1 AND ${QtGStreamer_VERSION_MINOR} EQUAL 1 AND ${QtGStreamer_VERSION_PATCH} GREATER 80)
++ OR (${QtGStreamer_VERSION_MAJOR} EQUAL 1 AND ${QtGStreamer_VERSION_MINOR} GREATER 1))
++CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/gstreamerapi.h.in_cmake" "${CMAKE_CURRENT_BINARY_DIR}/gstreamerapi.h" @ONLY)
++
++MESSAGE(STATUS "Found QtGstreamer version : ${QtGStreamer_VERSION}")
++MESSAGE(STATUS "Using GStreamer API 1: ${GSTREAMER_API_1}")
++
++
+ MESSAGE(STATUS "----------------------------------------------------------------------------------")
+ MESSAGE(STATUS "")
+
+diff --git a/cmake/templates/gstreamerapi.h.in_cmake b/cmake/templates/gstreamerapi.h.in_cmake
+new file mode 100644
+index 0000000..ec5a196
+--- /dev/null
++++ b/cmake/templates/gstreamerapi.h.in_cmake
+@@ -0,0 +1,6 @@
++#ifndef GSTREAMERAPI_H
++#define GSTREAMERAPI_H
++
++#cmakedefine01 GSTREAMER_API_1
++
++#endif
+diff --git a/videoslideshow/manager/encoderdecoder.cpp b/videoslideshow/manager/encoderdecoder.cpp
+index 23eca8a..b25ddd7 100644
+--- a/videoslideshow/manager/encoderdecoder.cpp
++++ b/videoslideshow/manager/encoderdecoder.cpp
+@@ -23,6 +23,7 @@
+ * ============================================================ */
+
+ #include "encoderdecoder.moc"
++#include "../../gstreamerapi.h"
+
+ // Qt includes
+
+@@ -50,6 +51,27 @@ EncoderDecoder::EncoderDecoder()
+ {
+ QGst::init();
+
++#if GSTREAMER_API_1
++ m_audioPipelines.append("filesrc location=\"%1\" ! decodebin ! audioconvert ! audioresample !"
++ "audio/x-raw, rate=%2 ! avenc_mp2 bitrate=%3 ! queue");
++
++ m_audioPipelines.append("filesrc location=\"%1\" ! decodebin ! audioconvert ! audioresample !"
++ "audio/x-raw, rate=%2 ! lamemp3enc bitrate=%3 ! id3v2mux ! queue");
++
++ m_videoPipelines.append("multifilesrc location=\"%1\" caps=image/ppm,framerate=%2 ! avdec_ppm ! videoconvert !"
++ " y4menc ! y4mdec ! videoscale ! mpeg2enc format=%3 norm=%4 bitrate=%5 aspect=%6 ! "
++ " filesink location=\"%7\"");
++
++ m_videoPipelines.append("multifilesrc location=\"%1\" caps=image/ppm,framerate=%2 ! avdec_ppm ! videoconvert !"
++ " avenc_mpeg4 ! avimux ! filesink location=\"%3\"");
++
++ m_videoPipelines.append("multifilesrc location=\"%1\" caps=image/ppm,framerate=%2 ! avdec_ppm ! videoconvert !"
++ " theoraenc ! oggmux ! filesink location=\"%3\"");
++
++ m_videoPipelines.append("multifilesrc location=\"%1\" caps=image/ppm,framerate=%2 ! avdec_ppm ! videoconvert ! "
++ " avenc_mpeg4 ! queue ! mux. filesrc location =\"%3\" ! decodebin ! audioconvert !"
++ " audio/x-raw, rate=44100 ! lamemp3enc ! queue ! mux. avimux name=mux ! filesink location=\"%4\"");
++#else
+ m_audioPipelines.append("filesrc location=\"%1\" ! decodebin ! audioconvert ! audioresample !"
+ "audio/x-raw-int, rate=%2 ! ffenc_mp2 bitrate=%3 ! queue");
+
+@@ -69,6 +91,8 @@ EncoderDecoder::EncoderDecoder()
+ m_videoPipelines.append("multifilesrc location=\"%1\" caps=image/ppm,framerate=%2 ! ffdec_ppm ! ffmpegcolorspace ! "
+ " xvidenc ! queue ! mux. filesrc location =\"%3\" ! decodebin ! audioconvert !"
+ " audio/x-raw-int, rate=44100 ! lamemp3enc ! queue ! mux. avimux name=mux ! filesink location=\"%4\"");
++#endif
++
+ }
+
+ EncoderDecoder::~EncoderDecoder()
+@@ -293,7 +317,7 @@ void EncoderDecoder::encodeVideo(const QString& destination, const QString& audi
+ }
+
+ /*
+- *
++ *
+ QGst::BinPtr EncoderDecoder::createAudioSrcBin(QString file, AUDIO_TYPE type, int sampleRate, int bitRate)
+ {
+ QGst::BinPtr audioBin;
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/digikam.git/commit/?h=epel7&id=b6a105db9836e1a0012b3225fc2fc6555e465d5a
More information about the scm-commits
mailing list