Hello community,
here is the log from the commit of package libkdcraw for openSUSE:Factory checked in at 2015-01-08 23:18:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkdcraw (Old)
and /work/SRC/openSUSE:Factory/.libkdcraw.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkdcraw"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libkdcraw/libkdcraw.changes 2014-11-19 20:28:31.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libkdcraw.new/libkdcraw.changes 2015-01-08 23:18:59.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Dec 17 20:41:11 UTC 2014 - tittiatcoke@gmail.com
+
+- Update to KDE Applications 14.12.0
+ * KDE Applications 14.12.0
+ * See https://www.kde.org/announcements/announce-applications-14.12.0.php
+
+-------------------------------------------------------------------
Old:
----
libkdcraw-4.14.3.tar.xz
New:
----
libkdcraw-14.12.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libkdcraw.spec ++++++
--- /var/tmp/diff_new_pack.aCrywR/_old 2015-01-08 23:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.aCrywR/_new 2015-01-08 23:19:00.000000000 +0100
@@ -19,7 +19,7 @@
%define _so 23
Name: libkdcraw
-Version: 4.14.3
+Version: 14.12.0
Release: 0
Summary: Shared library interface around dcraw
License: LGPL-2.0+ and GPL-2.0+ and GPL-3.0+
++++++ libkdcraw-4.14.3.tar.xz -> libkdcraw-14.12.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/.krazy new/libkdcraw-14.12.0/.krazy
--- old/libkdcraw-4.14.3/.krazy 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/.krazy 2014-10-30 23:07:13.000000000 +0100
@@ -1,2 +1 @@
-SKIP /libraw/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/CMakeLists.txt new/libkdcraw-14.12.0/CMakeLists.txt
--- old/libkdcraw-4.14.3/CMakeLists.txt 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/CMakeLists.txt 2014-10-30 23:07:13.000000000 +0100
@@ -40,12 +40,11 @@
FIND_PACKAGE(LibRaw 0.15)
SET_PACKAGE_PROPERTIES(LibRaw PROPERTIES DESCRIPTION "library that provides image Raw file demosaicing" URL "http://www.libraw.org" TYPE REQUIRED PURPOSE "Required to build libkdcraw")
IF(NOT LIBRAW_FOUND)
- FEATURE_SUMMARY(
- WHAT ALL
- INCLUDE_QUIET_PACKAGES
- FATAL_ON_MISSING_REQUIRED_PACKAGES
- )
- RETURN()
+ FEATURE_SUMMARY(WHAT ALL
+ INCLUDE_QUIET_PACKAGES
+ FATAL_ON_MISSING_REQUIRED_PACKAGES
+ )
+ RETURN()
ENDIF()
# Check LibRaw config header.
@@ -140,13 +139,12 @@
ENDIF(KDE4_BUILD_TESTS)
IF(NOT WIN32)
- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libkdcraw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.pc)
- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libkdcraw.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.lsm)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/libkdcraw.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.pc)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/libkdcraw.lsm.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.lsm)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
ENDIF(NOT WIN32)
-FEATURE_SUMMARY(
- WHAT ALL
- INCLUDE_QUIET_PACKAGES
- FATAL_ON_MISSING_REQUIRED_PACKAGES
-)
+FEATURE_SUMMARY(WHAT ALL
+ INCLUDE_QUIET_PACKAGES
+ FATAL_ON_MISSING_REQUIRED_PACKAGES
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/cmake/modules/FindKdcraw.cmake new/libkdcraw-14.12.0/cmake/modules/FindKdcraw.cmake
--- old/libkdcraw-4.14.3/cmake/modules/FindKdcraw.cmake 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/cmake/modules/FindKdcraw.cmake 2014-10-30 23:07:13.000000000 +0100
@@ -14,8 +14,8 @@
# KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw
# KDCRAW_VERSION - Version of libkdcraw which was found
#
-# Copyright (c) 2008-2011, Gilles Caulier,
-# Copyright (c) 2011, Michael G. Hansen,
+# Copyright (c) 2008-2014, Gilles Caulier,
+# Copyright (c) 2011, Michael G. Hansen,
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
@@ -39,16 +39,16 @@
# Check for a local version of the library.
if (KDCRAW_LOCAL_DIR)
- find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} NO_DEFAULT_PATH)
+ find_file(KDCRAW_LOCAL_FOUND libkdcraw/libkdcraw_export.h ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} NO_DEFAULT_PATH)
if (NOT KDCRAW_LOCAL_FOUND)
message(WARNING "KDCRAW_LOCAL_DIR specified as \"${KDCRAW_LOCAL_DIR}\" but libkdcraw could not be found there.")
endif (NOT KDCRAW_LOCAL_FOUND)
else (KDCRAW_LOCAL_DIR)
- find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libkdcraw NO_DEFAULT_PATH)
+ find_file(KDCRAW_LOCAL_FOUND libkdcraw/libkdcraw_export.h ${CMAKE_SOURCE_DIR}/libkdcraw NO_DEFAULT_PATH)
if (KDCRAW_LOCAL_FOUND)
set(KDCRAW_LOCAL_DIR libkdcraw)
endif (KDCRAW_LOCAL_FOUND)
- find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
+ find_file(KDCRAW_LOCAL_FOUND libkdcraw/libkdcraw_export.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
if (KDCRAW_LOCAL_FOUND)
set(KDCRAW_LOCAL_DIR libs/libkdcraw)
endif (KDCRAW_LOCAL_FOUND)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/cmake/templates/libkdcraw.lsm.cmake.in new/libkdcraw-14.12.0/cmake/templates/libkdcraw.lsm.cmake.in
--- old/libkdcraw-4.14.3/cmake/templates/libkdcraw.lsm.cmake.in 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/cmake/templates/libkdcraw.lsm.cmake.in 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,14 @@
+Begin4
+Title: libkdcraw
+Version: ${DCRAW_LIB_VERSION_STRING}
+Entered-date: 2007-05-05
+Description: A C++ wrapper around LibRaw library to decode RAW pictures. This library is used by digiKam and kipi-plugins.
+Keywords: kde image raw decode libraw digikam kipi-plugins
+Author: caulier dot gilles at gmail dot com (Gilles Caulier)
+ marcel dot wiesweg at gmx dot de (Marcel Wiesweg)
+Maintained-by:
+Primary-site: http://www.digikam.org/sharedlibs
+Original-site:
+Platforms: Linux and other Unices, MacOs-X, Win32. Needs KDE 4.x
+Copying-policy: GPL
+End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/cmake/templates/libkdcraw.pc.cmake.in new/libkdcraw-14.12.0/cmake/templates/libkdcraw.pc.cmake.in
--- old/libkdcraw-4.14.3/cmake/templates/libkdcraw.pc.cmake.in 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/cmake/templates/libkdcraw.pc.cmake.in 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,12 @@
+prefix=${CMAKE_INSTALL_PREFIX}
+exec_prefix=${BIN_INSTALL_DIR}
+libdir=${LIB_INSTALL_DIR}
+includedir=${INCLUDE_INSTALL_DIR}
+
+Name: libkdcraw
+Description: A C++ wrapper around LibRaw library to decode RAW pictures. This library is used by digiKam and kipi-plugins.
+URL: http://www.digikam.org/sharedlibs
+Requires:
+Version: ${DCRAW_LIB_VERSION_STRING}
+Libs: -L${LIB_INSTALL_DIR} -lkdcraw
+Cflags: -I${INCLUDE_INSTALL_DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/libkdcraw/CMakeLists.txt new/libkdcraw-14.12.0/libkdcraw/CMakeLists.txt
--- old/libkdcraw-4.14.3/libkdcraw/CMakeLists.txt 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/libkdcraw/CMakeLists.txt 2014-10-30 23:07:13.000000000 +0100
@@ -6,7 +6,7 @@
# @date 2006-12-09
# @brief a tread-safe libraw C++ program interface for KDE
#
-# @author Copyright (C) 2006-2013 by Gilles Caulier
+# @author Copyright (C) 2006-2014 by Gilles Caulier
# <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
#
# This program is free software; you can redistribute it
@@ -22,7 +22,7 @@
#
# ============================================================
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
SET(kdcraw_LIB_SRCS kdcraw.cpp
kdcraw_p.cpp
@@ -52,7 +52,7 @@
INSTALL(TARGETS kdcraw ${INSTALL_TARGETS_DEFAULT_ARGS})
# Check if compilation is done through digiKam SC or not. If yes, do not install header files.
-IF(NOT DIGIKAMSC_USE_PRIVATE_KDEGRAPHICS)
+IF(NOT DIGIKAMSC_USE_PRIVATE_SHAREDLIBS)
INSTALL(FILES rawdecodingsettings.h
kdcraw.h
dcrawsettingswidget.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/libkdcraw/dcrawinfocontainer.cpp new/libkdcraw-14.12.0/libkdcraw/dcrawinfocontainer.cpp
--- old/libkdcraw-4.14.3/libkdcraw/dcrawinfocontainer.cpp 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/libkdcraw/dcrawinfocontainer.cpp 2014-10-30 23:07:13.000000000 +0100
@@ -66,7 +66,7 @@
{
cameraColorMatrix1[x][y] = 0.0;
cameraColorMatrix2[x][y] = 0.0;
- cameraXYZMatrix[y][x] = 0.0; // NOTE: see B.K.O # 253911 : [y][x] not [x][y]
+ cameraXYZMatrix[y][x] = 0.0; // NOTE: see bug # 253911 : [y][x] not [x][y]
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/libkdcraw/version.h.cmake new/libkdcraw-14.12.0/libkdcraw/version.h.cmake
--- old/libkdcraw-4.14.3/libkdcraw/version.h.cmake 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/libkdcraw/version.h.cmake 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-/** ===========================================================
- *
- * This file is a part of digiKam project
- * <a href="http://www.digikam.org">http://www.digikam.org</a>
- *
- * @date 2007-02-12
- * @brief libraw program interface for KDE
- *
- * @author Copyright (C) 2007-2013 by Gilles Caulier
- * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#ifndef KDCRAW_VERSION_H
-#define KDCRAW_VERSION_H
-
-// Before changing the line below, make sure that FindKdcraw.cmake can still parse it
-static const char kdcraw_version[] = "${DCRAW_LIB_VERSION_STRING}";
-
-#define KDCRAW_VERSION ${DCRAW_LIB_VERSION_ID}
-
-#endif // KDCRAW_VERSION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/libkdcraw/version.h.cmake.in new/libkdcraw-14.12.0/libkdcraw/version.h.cmake.in
--- old/libkdcraw-4.14.3/libkdcraw/version.h.cmake.in 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/libkdcraw/version.h.cmake.in 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,33 @@
+/** ===========================================================
+ *
+ * This file is a part of digiKam project
+ * <a href="http://www.digikam.org">http://www.digikam.org</a>
+ *
+ * @date 2007-02-12
+ * @brief libraw program interface for KDE
+ *
+ * @author Copyright (C) 2007-2013 by Gilles Caulier
+ * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#ifndef KDCRAW_VERSION_H
+#define KDCRAW_VERSION_H
+
+// Before changing the line below, make sure that FindKdcraw.cmake can still parse it
+static const char kdcraw_version[] = "${DCRAW_LIB_VERSION_STRING}";
+
+#define KDCRAW_VERSION ${DCRAW_LIB_VERSION_ID}
+
+#endif // KDCRAW_VERSION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/libkdcraw.lsm.cmake new/libkdcraw-14.12.0/libkdcraw.lsm.cmake
--- old/libkdcraw-4.14.3/libkdcraw.lsm.cmake 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/libkdcraw.lsm.cmake 1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-Begin4
-Title: libkdcraw
-Version: ${DCRAW_LIB_VERSION_STRING}
-Entered-date: 2007-05-05
-Description: A C++ wrapper around LibRaw library to decode RAW pictures. This library is used by digiKam and kipi-plugins.
-Keywords: kde image raw decode libraw digikam kipi-plugins
-Author: caulier dot gilles at gmail dot com (Gilles Caulier)
- marcel dot wiesweg at gmx dot de (Marcel Wiesweg)
-Maintained-by:
-Primary-site: http://www.digikam.org/sharedlibs
-Original-site:
-Platforms: Linux and other Unices, MacOs-X, Win32. Needs KDE 4.x
-Copying-policy: GPL
-End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/libkdcraw.pc.cmake new/libkdcraw-14.12.0/libkdcraw.pc.cmake
--- old/libkdcraw-4.14.3/libkdcraw.pc.cmake 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/libkdcraw.pc.cmake 1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-prefix=${CMAKE_INSTALL_PREFIX}
-exec_prefix=${BIN_INSTALL_DIR}
-libdir=${LIB_INSTALL_DIR}
-includedir=${INCLUDE_INSTALL_DIR}
-
-Name: libkdcraw
-Description: A C++ wrapper around LibRaw library to decode RAW pictures. This library is used by digiKam and kipi-plugins.
-URL: http://www.digikam.org/sharedlibs
-Requires:
-Version: ${DCRAW_LIB_VERSION_STRING}
-Libs: -L${LIB_INSTALL_DIR} -lkdcraw
-Cflags: -I${INCLUDE_INSTALL_DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/tests/CMakeLists.txt new/libkdcraw-14.12.0/tests/CMakeLists.txt
--- old/libkdcraw-4.14.3/tests/CMakeLists.txt 2014-07-06 09:20:12.000000000 +0200
+++ new/libkdcraw-14.12.0/tests/CMakeLists.txt 2014-10-30 23:07:13.000000000 +0100
@@ -6,7 +6,7 @@
# @date 2006-12-09
# @brief a tread-safe libraw C++ program interface for KDE
#
-# @author Copyright (C) 2006-2013 by Gilles Caulier
+# @author Copyright (C) 2006-2014 by Gilles Caulier
# <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
#
# This program is free software; you can redistribute it
@@ -24,6 +24,8 @@
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libkdcraw)
+ADD_SUBDIRECTORY(multithreading)
+
SET(raw2png_SRCS raw2png.cpp)
ADD_EXECUTABLE(raw2png ${raw2png_SRCS})
TARGET_LINK_LIBRARIES(raw2png kdcraw ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/tests/multithreading/CMakeLists.txt new/libkdcraw-14.12.0/tests/multithreading/CMakeLists.txt
--- old/libkdcraw-4.14.3/tests/multithreading/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/tests/multithreading/CMakeLists.txt 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,46 @@
+# ===========================================================
+#
+# This file is a part of digiKam project
+# <a href="http://www.digikam.org">http://www.digikam.org</a>
+#
+# @date 2014-10-17
+# @brief threadweaver api test application
+#
+# @author Copyright (C) 2014 by Gilles Caulier
+# <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
+#
+# This program is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General
+# Public License as published by the Free Software Foundation;
+# either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# ============================================================
+
+INCLUDE_DIRECTORIES(${KDE4_INCLUDES}
+ ${QT_INCLUDE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../libkdcraw
+)
+
+SET(multicorerawtopng_SRCS
+ main.cpp
+ processordlg.cpp
+ actionthread.cpp
+)
+
+KDE4_ADD_EXECUTABLE(multicorerawtopng ${multicorerawtopng_SRCS})
+
+TARGET_LINK_LIBRARIES(multicorerawtopng
+ ${QT_QTGUI_LIBRARY}
+ ${QT_QTCORE_LIBRARY}
+ ${KDE4_KDEUI_LIBS}
+ ${KDE4_KIO_LIBS}
+ ${KDE4_THREADWEAVER_LIBRARIES}
+ kdcraw
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/tests/multithreading/actionthread.cpp new/libkdcraw-14.12.0/tests/multithreading/actionthread.cpp
--- old/libkdcraw-4.14.3/tests/multithreading/actionthread.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/tests/multithreading/actionthread.cpp 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,146 @@
+/** ===========================================================
+ *
+ * This file is a part of digiKam project
+ * <a href="http://www.digikam.org">http://www.digikam.org</a>
+ *
+ * Date : 2014-10-17
+ * Description : a class to manage Raw to Png conversion using threads
+ *
+ * Copyright (C) 2014 by Gilles Caulier
+ * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#include "actionthread.moc"
+
+// Qt includes
+
+#include <QMutexLocker>
+#include <QMutex>
+#include <QWaitCondition>
+#include <QFileInfo>
+#include <QImage>
+
+// KDE includes
+
+#include
+#include
+#include
+
+// Local includes
+
+#include "kdcraw.h"
+#include "rawdecodingsettings.h"
+
+using namespace ThreadWeaver;
+
+class ActionThread::Task : public Job
+{
+public:
+
+ Task(QObject* const parent = 0)
+ :Job(parent)
+ {
+ }
+
+ QString errString;
+ KUrl fileUrl;
+
+protected:
+
+ void run()
+ {
+ // RAW to PNG
+ QImage image;
+ KDcraw rawProcessor;
+ RawDecodingSettings settings;
+ settings.halfSizeColorImage = false;
+ settings.sixteenBitsImage = false;
+ settings.RGBInterpolate4Colors = false;
+ settings.RAWQuality = RawDecodingSettings::BILINEAR;
+
+ QFileInfo input(fileUrl.toLocalFile());
+ QString fullFilePath(input.baseName() + QString(".full.png"));
+ QFileInfo fullOutput(fullFilePath);
+
+ if (!rawProcessor.loadFullImage(image, fileUrl.toLocalFile(), settings))
+ {
+ errString = "raw2png: Loading full RAW image failed. Aborted...";
+ return;
+ }
+
+ qDebug() << "raw2png: Saving full RAW image to "
+ << fullOutput.fileName() << " size ("
+ << image.width() << "x" << image.height()
+ << ")";
+ image.save(fullFilePath, "PNG");
+
+ }
+};
+
+// ----------------------------------------------------------------------------------------------------
+
+ActionThread::ActionThread(QObject* const parent)
+ : RActionThreadBase(parent)
+{
+}
+
+ActionThread::~ActionThread()
+{
+}
+
+void ActionThread::convertRAWtoPNG(const KUrl::List& list)
+{
+ JobCollection* const collection = new JobCollection();
+
+ for (KUrl::List::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
+ {
+ Task* const t = new Task(this);
+ t->fileUrl = *it;
+
+ connect(t, SIGNAL(started(ThreadWeaver::Job*)),
+ this, SLOT(slotJobStarted(ThreadWeaver::Job*)));
+
+ connect(t, SIGNAL(done(ThreadWeaver::Job*)),
+ this, SLOT(slotJobDone(ThreadWeaver::Job*)));
+
+ collection->addJob(t);
+ }
+
+ appendJob(collection);
+}
+
+void ActionThread::slotJobDone(ThreadWeaver::Job* job)
+{
+ Task* const task = static_cast(job);
+
+ if (task->errString.isEmpty())
+ {
+ kDebug() << "Job done:" << task->fileUrl.toLocalFile();
+ emit finished(task->fileUrl);
+ }
+ else
+ {
+ kDebug() << "Could not complete the job: " << task->fileUrl.toLocalFile() << " Error: " << task->errString;
+ emit failed(task->fileUrl, task->errString);
+ }
+
+ delete job;
+}
+
+void ActionThread::slotJobStarted(ThreadWeaver::Job* job)
+{
+ Task* const task = static_cast(job);
+ kDebug() << "Job Started:" << task->fileUrl.toLocalFile();
+ emit starting(task->fileUrl);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/tests/multithreading/actionthread.h new/libkdcraw-14.12.0/tests/multithreading/actionthread.h
--- old/libkdcraw-4.14.3/tests/multithreading/actionthread.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/tests/multithreading/actionthread.h 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,73 @@
+/** ===========================================================
+ *
+ * This file is a part of digiKam project
+ * <a href="http://www.digikam.org">http://www.digikam.org</a>
+ *
+ * Date : 2014-10-17
+ * Description : a class to manage Raw to Png conversion using threads
+ *
+ * Copyright (C) 2014 by Gilles Caulier
+ * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#ifndef ACTIONTHREAD_H
+#define ACTIONTHREAD_H
+
+// Qt includes
+
+#include <QThread>
+
+// KDE includes
+
+#include
+
+// Libkdcraw includes
+
+#include "ractionthreadbase.h"
+
+namespace ThreadWeaver
+{
+ class Job;
+}
+
+using namespace KDcrawIface;
+
+class ActionThread : public RActionThreadBase
+{
+ Q_OBJECT
+
+public:
+
+ ActionThread(QObject* const parent);
+ ~ActionThread();
+
+ void convertRAWtoPNG(const KUrl::List& list);
+
+Q_SIGNALS:
+
+ void starting(const KUrl& url);
+ void finished(const KUrl& url);
+ void failed(const KUrl& url, const QString& err);
+
+private Q_SLOTS:
+
+ void slotJobDone(ThreadWeaver::Job*);
+ void slotJobStarted(ThreadWeaver::Job*);
+
+private:
+
+ class Task;
+};
+
+#endif /* ACTIONTHREAD_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/tests/multithreading/main.cpp new/libkdcraw-14.12.0/tests/multithreading/main.cpp
--- old/libkdcraw-4.14.3/tests/multithreading/main.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/tests/multithreading/main.cpp 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,57 @@
+/** ===========================================================
+ *
+ * This file is a part of digiKam project
+ * <a href="http://www.digikam.org">http://www.digikam.org</a>
+ *
+ * Date : 2011-12-28
+ * Description : test for implementation of threadWeaver api
+ *
+ * Copyright (C) 2014 by Gilles Caulier
+ * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+// Qt includes
+
+#include <QApplication>
+#include <QDebug>
+
+// KDE includes
+
+#include
+
+// Local includes
+
+#include "processordlg.h"
+
+int main(int argc, char* argv[])
+{
+ if (argc <= 1)
+ {
+ qDebug() << "multicoreraw2png - RAW Camera Image to PNG Converter using multi-core CPU";
+ qDebug() << "Usage: multicoreraw2png <rawfile> <rawfile> <rawfile> ... <rawfile>";
+ return -1;
+ }
+
+ QApplication app(argc, argv);
+
+ KUrl::List list;
+
+ for (int i = 0 ; i < argc ; i++)
+ list.append(KUrl(argv[i]));
+
+ ProcessorDlg* const dlg = new ProcessorDlg(list);
+ dlg->show();
+ app.exec();
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/tests/multithreading/processordlg.cpp new/libkdcraw-14.12.0/tests/multithreading/processordlg.cpp
--- old/libkdcraw-4.14.3/tests/multithreading/processordlg.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/tests/multithreading/processordlg.cpp 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,199 @@
+/** ===========================================================
+ *
+ * This file is a part of digiKam project
+ * <a href="http://www.digikam.org">http://www.digikam.org</a>
+ *
+ * Date : 2014-10-17
+ * Description : test for implementation of threadWeaver api
+ *
+ * Copyright (C) 2014 by Gilles Caulier
+ * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#include "processordlg.moc"
+
+// Qt includes
+
+#include <QList>
+#include <QVBoxLayout>
+#include <QLabel>
+#include <QProgressBar>
+#include <QThreadPool>
+#include <QFileInfo>
+
+// KDE includes
+
+#include
+#include
+#include
+#include
+
+// Local includes
+
+#include "actionthread.h"
+
+class ProcessorDlg::Private
+{
+public:
+
+ Private()
+ {
+ count = 0;
+ page = 0;
+ items = 0;
+ vlay = 0;
+ thread = 0;
+ }
+
+ int count;
+
+ QWidget* page;
+ QLabel* items;
+ QVBoxLayout* vlay;
+
+ KUrl::List list;
+
+ ActionThread* thread;
+};
+
+ProcessorDlg::ProcessorDlg(const KUrl::List& list)
+ : KDialog(0), d(new Private)
+{
+ setButtons(Apply | Close);
+ setButtonText(Apply, i18n("Start"));
+ setDefaultButton(Close);
+ setModal(false);
+ setCaption(i18n("Convert RAW files To PNG"));
+
+ d->list = list;
+ d->count = d->list.count()-1;
+ d->page = new QWidget(this);
+ setMainWidget(d->page);
+
+ d->vlay = new QVBoxLayout(d->page);
+ QLabel* const pid = new QLabel(i18n("PID : %1", kapp->applicationPid()), this);
+ QLabel* const core = new QLabel(i18n("Core : %1", QThreadPool::globalInstance()->maxThreadCount()), this);
+ d->items = new QLabel(this);
+ d->vlay->addWidget(pid);
+ d->vlay->addWidget(core);
+ d->vlay->addWidget(d->items);
+ d->vlay->addStretch();
+
+ for (int i = 1; i < d->count ; i++)
+ {
+ QProgressBar* const bar = new QProgressBar(this);
+ QString file = d->list[i].toLocalFile();
+ bar->setMaximum(100);
+ bar->setMinimum(0);
+ bar->setValue(100);
+ bar->setObjectName(file);
+ QFileInfo fi(file);
+ bar->setFormat(fi.baseName());
+ d->vlay->addWidget(bar);
+ }
+
+ d->thread = new ActionThread(this);
+
+ connect(this, SIGNAL(applyClicked()),
+ this, SLOT(slotStart()));
+
+ connect(d->thread, SIGNAL(starting(KUrl)),
+ this, SLOT(slotStarting(KUrl)));
+
+ connect(d->thread, SIGNAL(finished(KUrl)),
+ this, SLOT(slotFinished(KUrl)));
+
+ connect(d->thread, SIGNAL(failed(KUrl,QString)),
+ this, SLOT(slotFailed(KUrl,QString)));
+
+ updateCount();
+ resize(500, 400);
+}
+
+ProcessorDlg::~ProcessorDlg()
+{
+ delete d;
+}
+
+void ProcessorDlg::updateCount()
+{
+ d->items->setText(i18n("Files to process : %1", d->count));
+}
+
+void ProcessorDlg::slotStart()
+{
+ if (d->list.isEmpty()) return;
+
+ button(Apply)->setDisabled(true);
+
+ d->thread->convertRAWtoPNG(d->list);
+ d->thread->start();
+}
+
+QProgressBar* ProcessorDlg::findProgressBar(const KUrl& url) const
+{
+ QList bars = findChildren();
+
+ foreach(QProgressBar* const b, bars)
+ {
+ if (b->objectName() == url.toLocalFile())
+ {
+ return b;
+ }
+ }
+
+ return 0;
+}
+
+void ProcessorDlg::slotStarting(const KUrl& url)
+{
+ QProgressBar* const b = findProgressBar(url);
+
+ if (b)
+ {
+ b->setMaximum(0);
+ b->setMinimum(0);
+ b->setValue(0);
+ }
+}
+
+void ProcessorDlg::slotFinished(const KUrl& url)
+{
+ QProgressBar* const b = findProgressBar(url);
+
+ if (b)
+ {
+ b->setMaximum(100);
+ b->setMinimum(0);
+ b->setValue(100);
+ b->setFormat(i18n("Done"));
+ d->count--;
+ updateCount();
+ }
+}
+
+void ProcessorDlg::slotFailed(const KUrl& url, const QString& err)
+{
+ QProgressBar* const b = findProgressBar(url);
+
+ if (b)
+ {
+ b->setMaximum(100);
+ b->setMinimum(0);
+ b->setValue(100);
+ b->setFormat(err);
+ d->count--;
+ updateCount();
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkdcraw-4.14.3/tests/multithreading/processordlg.h new/libkdcraw-14.12.0/tests/multithreading/processordlg.h
--- old/libkdcraw-4.14.3/tests/multithreading/processordlg.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libkdcraw-14.12.0/tests/multithreading/processordlg.h 2014-10-30 23:07:13.000000000 +0100
@@ -0,0 +1,61 @@
+/** ===========================================================
+ *
+ * This file is a part of digiKam project
+ * <a href="http://www.digikam.org">http://www.digikam.org</a>
+ *
+ * Date : 2014-10-17
+ * Description : test for implementation of threadWeaver api
+ *
+ * Copyright (C) 2014 by Gilles Caulier
+ * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#ifndef PROCESSOR_DLG_H
+#define PROCESSOR_DLG_H
+
+// KDE includes
+
+#include
+#include
+
+class QProgressBar;
+
+class ProcessorDlg : public KDialog
+{
+ Q_OBJECT
+
+public:
+
+ ProcessorDlg(const KUrl::List& list);
+ ~ProcessorDlg();
+
+private :
+
+ QProgressBar* findProgressBar(const KUrl& url) const;
+ void updateCount();
+
+private Q_SLOTS:
+
+ void slotStart();
+ void slotStarting(const KUrl&);
+ void slotFinished(const KUrl&);
+ void slotFailed(const KUrl&, const QString&);
+
+private:
+
+ class Private;
+ Private* const d;
+};
+
+#endif // PROCESSOR_DLG_H
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org