automatic version update by autodist [release 24.02.1-1mamba;Mon Mar 25 2024]
This commit is contained in:
parent
c1f47bad34
commit
cda4c80d9b
@ -1,158 +0,0 @@
|
|||||||
commit a0aec903b36b52bda1a9a5d2e875af1063747a86
|
|
||||||
Author: Rex Dieter <rdieter@math.unl.edu>
|
|
||||||
Date: Fri Dec 21 10:39:52 2012 -0600
|
|
||||||
|
|
||||||
initial port to libkipi-2.x
|
|
||||||
|
|
||||||
Initial libkipi-2.x support courtesy of Sando Mani
|
|
||||||
|
|
||||||
BUG: 307147
|
|
||||||
|
|
||||||
diff --git a/src/kamoso.cpp b/src/kamoso.cpp
|
|
||||||
index 6026bdd..24dd0f2 100644
|
|
||||||
--- a/src/kamoso.cpp
|
|
||||||
+++ b/src/kamoso.cpp
|
|
||||||
@@ -45,6 +45,7 @@
|
|
||||||
#include <solid/control/powermanager.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#include <QItemSelection>
|
|
||||||
#include <QLayout>
|
|
||||||
#include <QPushButton>
|
|
||||||
#include <QToolButton>
|
|
||||||
@@ -189,7 +190,9 @@ Kamoso::Kamoso(QWidget* parent)
|
|
||||||
connect(mTracker, SIGNAL(urlsChanged(KUrl::List)), SLOT(updateThumbnails(KUrl::List)));
|
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "initialize");
|
|
||||||
- mPluginLoader = new KIPI::PluginLoader(QStringList(), new KIPIInterface(this), "");
|
|
||||||
+ mPluginLoader = new KIPI::PluginLoader();
|
|
||||||
+ mPluginLoader->setInterface(new KIPIInterface(this));
|
|
||||||
+ mPluginLoader->init();
|
|
||||||
}
|
|
||||||
|
|
||||||
KUrl::List Kamoso::selectedItems()
|
|
||||||
diff --git a/src/kamoso.h b/src/kamoso.h
|
|
||||||
index 1ef37f3..dcd8987 100644
|
|
||||||
--- a/src/kamoso.h
|
|
||||||
+++ b/src/kamoso.h
|
|
||||||
@@ -36,6 +36,7 @@ class WebcamWidget;
|
|
||||||
class WebcamRetriever;
|
|
||||||
class CountdownWidget;
|
|
||||||
class KDirOperator;
|
|
||||||
+class QItemSelection;
|
|
||||||
class QStackedLayout;
|
|
||||||
class QSplitter;
|
|
||||||
class QPushButton;
|
|
||||||
diff --git a/src/kipiaction.cpp b/src/kipiaction.cpp
|
|
||||||
index a0f8405..f7aaacb 100644
|
|
||||||
--- a/src/kipiaction.cpp
|
|
||||||
+++ b/src/kipiaction.cpp
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
|
|
||||||
#include "kipiaction.h"
|
|
||||||
#include <libkipi/plugin.h>
|
|
||||||
-#include <libkipi/exportinterface.h>
|
|
||||||
+#include "plugins/exportinterface.h"
|
|
||||||
#include <QDebug>
|
|
||||||
#include "kamoso.h"
|
|
||||||
#include "kamosojobtracker.h"
|
|
||||||
@@ -33,7 +33,7 @@ KipiAction::KipiAction(KIPI::PluginLoader::Info* pluginInfo, Kamoso* ui, QObject
|
|
||||||
void KipiAction::runJob()
|
|
||||||
{
|
|
||||||
KIPI::Plugin* p=pluginInfo->plugin();
|
|
||||||
- KIPI::ExportInterface* ep=dynamic_cast<KIPI::ExportInterface*>(p);
|
|
||||||
+ ExportInterface* ep=dynamic_cast<ExportInterface*>(p);
|
|
||||||
|
|
||||||
KJob* job=ep->exportFiles(i18n("Kamoso"));
|
|
||||||
mKamoso->tracker()->registerJob(job, mKamoso->selectedItems(), icon());
|
|
||||||
diff --git a/src/pluginTester/fakekipiaction.cpp b/src/pluginTester/fakekipiaction.cpp
|
|
||||||
index c86c605..8db307d 100644
|
|
||||||
--- a/src/pluginTester/fakekipiaction.cpp
|
|
||||||
+++ b/src/pluginTester/fakekipiaction.cpp
|
|
||||||
@@ -20,10 +20,10 @@
|
|
||||||
#include "fakekipiaction.h"
|
|
||||||
|
|
||||||
#include <libkipi/plugin.h>
|
|
||||||
-#include <libkipi/exportinterface.h>
|
|
||||||
#include <KIO/JobUiDelegate>
|
|
||||||
#include <kjobtrackerinterface.h>
|
|
||||||
#include <KDebug>
|
|
||||||
+#include "../plugins/exportinterface.h"
|
|
||||||
|
|
||||||
FakeKipiAction::FakeKipiAction(KIPI::PluginLoader::Info* pluginInfo, QObject* parent)
|
|
||||||
: QAction(pluginInfo->icon(), pluginInfo->name(), parent), pluginInfo(pluginInfo)
|
|
||||||
@@ -39,7 +39,7 @@ FakeKipiAction::~FakeKipiAction()
|
|
||||||
void FakeKipiAction::runJob()
|
|
||||||
{
|
|
||||||
KIPI::Plugin* p=pluginInfo->plugin();
|
|
||||||
- KIPI::ExportInterface* ep = dynamic_cast<KIPI::ExportInterface*>(p);
|
|
||||||
+ ExportInterface* ep = dynamic_cast<ExportInterface*>(p);
|
|
||||||
|
|
||||||
m_job = ep->exportFiles(i18n("Kamoso"));
|
|
||||||
KIO::getJobTracker()->registerJob(m_job);
|
|
||||||
diff --git a/src/pluginTester/pluginTester.cpp b/src/pluginTester/pluginTester.cpp
|
|
||||||
index 6609b39..2619eb8 100644
|
|
||||||
--- a/src/pluginTester/pluginTester.cpp
|
|
||||||
+++ b/src/pluginTester/pluginTester.cpp
|
|
||||||
@@ -41,7 +41,9 @@ PluginTester::PluginTester(QObject *parent) : QObject(parent)
|
|
||||||
kurlList.append(KUrl(args->arg(i)));
|
|
||||||
}
|
|
||||||
|
|
||||||
- m_pluginLoader = new KIPI::PluginLoader(QStringList(), new FakeKIPIInterface(kurlList), "");
|
|
||||||
+ m_pluginLoader = new KIPI::PluginLoader();
|
|
||||||
+ m_pluginLoader->setInterface(new FakeKIPIInterface(kurlList));
|
|
||||||
+ m_pluginLoader->init();
|
|
||||||
|
|
||||||
bool found = false;
|
|
||||||
Q_FOREACH(KIPI::PluginLoader::Info *pluginInfo, m_pluginLoader->pluginList()) {
|
|
||||||
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
|
|
||||||
index 28bc10b..8755047 100644
|
|
||||||
--- a/src/plugins/CMakeLists.txt
|
|
||||||
+++ b/src/plugins/CMakeLists.txt
|
|
||||||
@@ -30,5 +30,5 @@ FIND_PACKAGE(Kipi REQUIRED)
|
|
||||||
# MACRO_OPTIONAL_FIND_PACKAGE(KdepimLibs) # For Calendar (libkcal).
|
|
||||||
# MACRO_OPTIONAL_FIND_PACKAGE(QCA2) # For Shwup.
|
|
||||||
|
|
||||||
-include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/plugins/youtube)
|
|
||||||
+include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/plugins ${CMAKE_SOURCE_DIR}/src/plugins/youtube)
|
|
||||||
add_subdirectory(youtube)
|
|
||||||
diff --git a/src/plugins/exportinterface.h b/src/plugins/exportinterface.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..f1556f9
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/plugins/exportinterface.h
|
|
||||||
@@ -0,0 +1,15 @@
|
|
||||||
+#ifndef EXPORTINTERFACE_H
|
|
||||||
+#define EXPORTINTERFACE_H
|
|
||||||
+
|
|
||||||
+class KJob;
|
|
||||||
+
|
|
||||||
+class ExportInterface
|
|
||||||
+{
|
|
||||||
+public:
|
|
||||||
+
|
|
||||||
+ virtual ~ExportInterface() {}
|
|
||||||
+
|
|
||||||
+ virtual KJob* exportFiles(const QString& albumname)=0;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+#endif // EXPORTINTERFACE_H
|
|
||||||
diff --git a/src/plugins/youtube/kipiplugin_youtube.h b/src/plugins/youtube/kipiplugin_youtube.h
|
|
||||||
index c274933..dcf3158 100644
|
|
||||||
--- a/src/plugins/youtube/kipiplugin_youtube.h
|
|
||||||
+++ b/src/plugins/youtube/kipiplugin_youtube.h
|
|
||||||
@@ -22,12 +22,11 @@
|
|
||||||
#include <kwallet.h>
|
|
||||||
#include <KIO/Job>
|
|
||||||
#include <libkipi/plugin.h>
|
|
||||||
-#include <libkipi/exportinterface.h>
|
|
||||||
+#include <exportinterface.h>
|
|
||||||
|
|
||||||
-class YoutubePlugin : public KIPI::Plugin, public KIPI::ExportInterface
|
|
||||||
+class YoutubePlugin : public KIPI::Plugin, public ExportInterface
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
- Q_INTERFACES(KIPI::ExportInterface)
|
|
||||||
public:
|
|
||||||
YoutubePlugin(QObject* parent, const QVariantList& args);
|
|
||||||
// virtual QAction* thumbnailsAction(const QList<KUrl>& url);
|
|
@ -1,67 +0,0 @@
|
|||||||
commit 9f32257a1e930b16e64508e6fbfa9390fc0322ee
|
|
||||||
Author: Rex Dieter <rdieter@math.unl.edu>
|
|
||||||
Date: Fri Dec 21 11:55:42 2012 -0600
|
|
||||||
|
|
||||||
fix build for < libkipi-2
|
|
||||||
|
|
||||||
BUG: 307147
|
|
||||||
|
|
||||||
diff --git a/src/kamoso.cpp b/src/kamoso.cpp
|
|
||||||
index 24dd0f2..4ca0dc4 100644
|
|
||||||
--- a/src/kamoso.cpp
|
|
||||||
+++ b/src/kamoso.cpp
|
|
||||||
@@ -78,6 +78,7 @@
|
|
||||||
|
|
||||||
#include <libkipi/plugin.h>
|
|
||||||
#include <libkipi/pluginloader.h>
|
|
||||||
+#include <libkipi/version.h>
|
|
||||||
#include <KPluginInfo>
|
|
||||||
|
|
||||||
const int max_exponential_value = 50;
|
|
||||||
@@ -190,9 +191,13 @@ Kamoso::Kamoso(QWidget* parent)
|
|
||||||
connect(mTracker, SIGNAL(urlsChanged(KUrl::List)), SLOT(updateThumbnails(KUrl::List)));
|
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "initialize");
|
|
||||||
+#if (KIPI_VERSION >= 0x020000)
|
|
||||||
mPluginLoader = new KIPI::PluginLoader();
|
|
||||||
mPluginLoader->setInterface(new KIPIInterface(this));
|
|
||||||
mPluginLoader->init();
|
|
||||||
+#else
|
|
||||||
+ mPluginLoader = new KIPI::PluginLoader(QStringList(), new KIPIInterface(this), "");
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
KUrl::List Kamoso::selectedItems()
|
|
||||||
diff --git a/src/pluginTester/pluginTester.cpp b/src/pluginTester/pluginTester.cpp
|
|
||||||
index 2619eb8..36acdb5 100644
|
|
||||||
--- a/src/pluginTester/pluginTester.cpp
|
|
||||||
+++ b/src/pluginTester/pluginTester.cpp
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include <KCmdLineArgs>
|
|
||||||
#include <libkipi/plugin.h>
|
|
||||||
#include <libkipi/pluginloader.h>
|
|
||||||
+#include <libkipi/version.h>
|
|
||||||
|
|
||||||
PluginTester::PluginTester(QObject *parent) : QObject(parent)
|
|
||||||
{
|
|
||||||
@@ -41,9 +42,13 @@ PluginTester::PluginTester(QObject *parent) : QObject(parent)
|
|
||||||
kurlList.append(KUrl(args->arg(i)));
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if (KIPI_VERSION >= 0x020000)
|
|
||||||
m_pluginLoader = new KIPI::PluginLoader();
|
|
||||||
m_pluginLoader->setInterface(new FakeKIPIInterface(kurlList));
|
|
||||||
m_pluginLoader->init();
|
|
||||||
+#else
|
|
||||||
+ m_pluginLoader = new KIPI::PluginLoader(QStringList(), new FakeKIPIInterface(kurlList), "");
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
bool found = false;
|
|
||||||
Q_FOREACH(KIPI::PluginLoader::Info *pluginInfo, m_pluginLoader->pluginList()) {
|
|
||||||
@@ -60,4 +65,4 @@ PluginTester::PluginTester(QObject *parent) : QObject(parent)
|
|
||||||
PluginTester::~PluginTester()
|
|
||||||
{
|
|
||||||
delete m_action;
|
|
||||||
-}
|
|
||||||
\ No newline at end of file
|
|
||||||
+}
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -Nru kamoso-2.0.2.orig/src/plugins/youtube/kipiplugin_youtube.cpp kamoso-2.0.2/src/plugins/youtube/kipiplugin_youtube.cpp
|
|
||||||
--- kamoso-2.0.2.orig/src/plugins/youtube/kipiplugin_youtube.cpp 2011-05-25 00:34:42.000000000 +0200
|
|
||||||
+++ kamoso-2.0.2/src/plugins/youtube/kipiplugin_youtube.cpp 2012-09-12 17:58:04.530442982 +0200
|
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
#include <kwallet.h>
|
|
||||||
#include <KDebug>
|
|
||||||
#include <libkipi/interface.h>
|
|
||||||
+#include <libkipi/imagecollection.h>
|
|
||||||
|
|
||||||
using KWallet::Wallet;
|
|
||||||
|
|
@ -1,274 +0,0 @@
|
|||||||
commit b85e8c187b4eabf9765bc05348f6232ba32c9493
|
|
||||||
Author: Andreas Cord-Landwehr <cordlandwehr@kde.org>
|
|
||||||
Date: Fri Aug 29 16:51:30 2014 +0200
|
|
||||||
|
|
||||||
Porting to GStreamer-1.0 API and QtGStreamer-1.2
|
|
||||||
|
|
||||||
This is the first iteration of a porting patch to upgrade Kamoso to work with GStreamer-1.x (in particular, 0.10 is deprecated and unmaintained by upstream). The patch in its current version does the following:
|
|
||||||
* update the cmake find module to find the new version of gstreamer and qtgstreamer
|
|
||||||
* fixes compilation with the new version
|
|
||||||
I am quite sure that further changes at the pipelines are necessary to make it work at runtime, yet an area where I do not have much experience (hence, all these people you get the review request :)
|
|
||||||
|
|
||||||
In the big picture, I would like to have Kamoso ported asap, since with Artikulate a first KDE application switched to the new QtGStreamer version and the continiuous integration system can only support one qtgstreamer version for all. Also, it would be good to have all KDE applications ready for QtGStreamer-1.2 with the KDE SC 4.14 release to allow distros to upgrade all in one step.
|
|
||||||
|
|
||||||
REVIEW: 118979
|
|
||||||
|
|
||||||
From 48b4129cc4009aad0a013df8535b89f98554b1e9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andreas Cord-Landwehr <cordlandwehr@kde.org>
|
|
||||||
Date: Wed, 25 Jun 2014 23:24:08 +0200
|
|
||||||
Subject: [PATCH] Porting patch for GStreamer-1.0
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 5d6bfb1..83b2025 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -6,8 +6,8 @@ find_package(KDE4 REQUIRED)
|
|
||||||
find_package(Kipi REQUIRED)
|
|
||||||
find_package(Phonon REQUIRED)
|
|
||||||
find_package(GLIB2 REQUIRED)
|
|
||||||
-find_package(GStreamer REQUIRED)
|
|
||||||
-find_package(QtGStreamer REQUIRED)
|
|
||||||
+find_package(GStreamer 1.0.0)
|
|
||||||
+find_package(QtGStreamer 1.1.90 REQUIRED)
|
|
||||||
|
|
||||||
macro_optional_find_package(Nepomuk)
|
|
||||||
macro_log_feature(NEPOMUK_FOUND "Nepomuk" "Handles all kinds of metadata on the KDE desktop to provide a semantic desktop" "http://nepomuk.kde.org/" FALSE "" "STRONGLY_RECOMMENDED: Nepomuk is used to provide metadata on objects like files, emails etc. to provide a semantic desktop.")
|
|
||||||
@@ -15,6 +15,10 @@ macro_bool_to_01(NEPOMUK_FOUND HAVE_NEPOMUK)
|
|
||||||
macro_display_feature_log()
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
|
|
||||||
+include_directories(
|
|
||||||
+ ${QTGSTREAMER_INCLUDE_DIR}
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
add_subdirectory(src)
|
|
||||||
add_subdirectory(icons)
|
|
||||||
add_subdirectory(doc)
|
|
||||||
diff --git a/cmake/FindGStreamer.cmake b/cmake/FindGStreamer.cmake
|
|
||||||
index a1b6e33..bebcf00 100644
|
|
||||||
--- a/cmake/FindGStreamer.cmake
|
|
||||||
+++ b/cmake/FindGStreamer.cmake
|
|
||||||
@@ -15,40 +15,38 @@
|
|
||||||
|
|
||||||
# TODO: Other versions --> GSTREAMER_X_Y_FOUND (Example: GSTREAMER_0_8_FOUND and GSTREAMER_0_10_FOUND etc)
|
|
||||||
|
|
||||||
-IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
+IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY)
|
|
||||||
# in cache already
|
|
||||||
SET(GStreamer_FIND_QUIETLY TRUE)
|
|
||||||
-ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
+ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY)
|
|
||||||
SET(GStreamer_FIND_QUIETLY FALSE)
|
|
||||||
-ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
+ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY)
|
|
||||||
|
|
||||||
+SET(GSTREAMER_API_VERSION 1.0)
|
|
||||||
IF (NOT WIN32)
|
|
||||||
FIND_PACKAGE(PkgConfig REQUIRED)
|
|
||||||
# use pkg-config to get the directories and then use these values
|
|
||||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
|
||||||
# don't make this check required - otherwise you can't use macro_optional_find_package on this one
|
|
||||||
- PKG_CHECK_MODULES(PKG_GSTREAMER gstreamer-0.10)
|
|
||||||
+ PKG_CHECK_MODULES(PKG_GSTREAMER gstreamer-${GSTREAMER_API_VERSION})
|
|
||||||
SET(GSTREAMER_VERSION ${PKG_GSTREAMER_VERSION})
|
|
||||||
SET(GSTREAMER_DEFINITIONS ${PKG_GSTREAMER_CFLAGS})
|
|
||||||
ENDIF (NOT WIN32)
|
|
||||||
|
|
||||||
+MESSAGE(STATUS "Found GStreamer package: ${PKG_GSTREAMER_VERSION}")
|
|
||||||
+
|
|
||||||
FIND_PATH(GSTREAMER_INCLUDE_DIR gst/gst.h
|
|
||||||
PATHS
|
|
||||||
${PKG_GSTREAMER_INCLUDE_DIRS}
|
|
||||||
- PATH_SUFFIXES gstreamer-0.10
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
-FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10
|
|
||||||
- PATHS
|
|
||||||
- ${PKG_GSTREAMER_LIBRARY_DIRS}
|
|
||||||
+ PATH_SUFFIXES gstreamer-${GSTREAMER_API_VERSION}
|
|
||||||
)
|
|
||||||
|
|
||||||
-FIND_LIBRARY(GSTREAMER_BASE_LIBRARY NAMES gstbase-0.10
|
|
||||||
+FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-${GSTREAMER_API_VERSION}
|
|
||||||
PATHS
|
|
||||||
${PKG_GSTREAMER_LIBRARY_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
-FIND_LIBRARY(GSTREAMER_INTERFACE_LIBRARY NAMES gstinterfaces-0.10
|
|
||||||
+FIND_LIBRARY(GSTREAMER_BASE_LIBRARY NAMES gstbase-${GSTREAMER_API_VERSION}
|
|
||||||
PATHS
|
|
||||||
${PKG_GSTREAMER_LIBRARY_DIRS}
|
|
||||||
)
|
|
||||||
@@ -63,12 +61,7 @@ ELSE (GSTREAMER_LIBRARIES)
|
|
||||||
MESSAGE(STATUS "GStreamer: WARNING: library not found")
|
|
||||||
ENDIF (GSTREAMER_LIBRARIES)
|
|
||||||
|
|
||||||
-IF (GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
-ELSE (GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
- MESSAGE(STATUS "GStreamer: WARNING: interface library not found")
|
|
||||||
-ENDIF (GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
-
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIR GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIR GSTREAMER_BASE_LIBRARY)
|
|
||||||
|
|
||||||
-MARK_AS_ADVANCED(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARIES GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY)
|
|
||||||
+MARK_AS_ADVANCED(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARIES GSTREAMER_BASE_LIBRARY)
|
|
||||||
diff --git a/src/webcamwidget.cpp b/src/webcamwidget.cpp
|
|
||||||
index 62b7831..ba1160f 100644
|
|
||||||
--- a/src/webcamwidget.cpp
|
|
||||||
+++ b/src/webcamwidget.cpp
|
|
||||||
@@ -55,8 +55,9 @@
|
|
||||||
#include <QGst/Structure>
|
|
||||||
#include <QGst/Clock>
|
|
||||||
#include <QGst/Init>
|
|
||||||
-#include <QGst/XOverlay>
|
|
||||||
+#include <QGst/VideoOverlay>
|
|
||||||
#include <QGst/Message>
|
|
||||||
+#include <QGst/Memory>
|
|
||||||
#include <gst/gst.h>
|
|
||||||
#include <gst/video/video.h>
|
|
||||||
#include <QGst/Bus>
|
|
||||||
@@ -130,8 +131,7 @@ void WebcamWidget::playFile(const Device &device)
|
|
||||||
QByteArray pipe = basicPipe();
|
|
||||||
|
|
||||||
//Set the right colorspace to convert to QImage
|
|
||||||
- pipe += " ! ffmpegcolorspace ! "
|
|
||||||
- GST_VIDEO_CAPS_xRGB_HOST_ENDIAN
|
|
||||||
+ pipe += " ! videoconvert"
|
|
||||||
" ! fakesink name=fakesink";
|
|
||||||
|
|
||||||
kDebug() << "================ PIPELINE ================";
|
|
||||||
@@ -157,7 +157,7 @@ void WebcamWidget::playFile(const Device &device)
|
|
||||||
setVideoSettings();
|
|
||||||
|
|
||||||
kDebug() << "================ Capabilities ================";
|
|
||||||
- kDebug() << d->m_pipeline->getElementByName("v4l2src")->getStaticPad("src")->caps()->toString();
|
|
||||||
+// kDebug() << d->m_pipeline->getElementByName("v4l2src")->getStaticPad("src")->currentCaps()->toString(); //commented out for now: src-pad returns null
|
|
||||||
d->m_pipeline->setState(QGst::StatePlaying);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -179,34 +179,51 @@ bool WebcamWidget::takePhoto(const KUrl &dest)
|
|
||||||
}
|
|
||||||
kDebug() << dest;
|
|
||||||
d->destination = dest;
|
|
||||||
+ if (!d->m_bin) {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
d->m_bin->getElementByName("fakesink")->setProperty("signal-handoffs", true);
|
|
||||||
QGlib::connect(d->m_bin->getElementByName("fakesink"), "handoff", this, &WebcamWidget::photoGstCallback);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//This code has been borrowed from the Qt Multimedia project.
|
|
||||||
-void WebcamWidget::photoGstCallback(QGst::BufferPtr buffer, QGst::PadPtr)
|
|
||||||
+void WebcamWidget::photoGstCallback(QGst::BufferPtr buffer, QGst::PadPtr pad)
|
|
||||||
{
|
|
||||||
kDebug();
|
|
||||||
|
|
||||||
QImage img;
|
|
||||||
- QGst::CapsPtr caps = buffer->caps();
|
|
||||||
+ QGst::CapsPtr caps = pad->currentCaps();
|
|
||||||
|
|
||||||
const QGst::StructurePtr structure = caps->internalStructure(0);
|
|
||||||
int width, height;
|
|
||||||
+ QString format;
|
|
||||||
+ format = structure.data()->value("format").get<QString>();
|
|
||||||
width = structure.data()->value("width").get<int>();
|
|
||||||
height = structure.data()->value("height").get<int>();
|
|
||||||
kDebug() << "We've got a caps in here";
|
|
||||||
kDebug() << "Size: " << width << "x" << height;
|
|
||||||
kDebug() << "Name: " << structure.data()->name();
|
|
||||||
+ kDebug() << "Format: " << format;
|
|
||||||
|
|
||||||
- if (qstrcmp(structure.data()->name().toLatin1(), "video/x-raw-yuv") == 0) {
|
|
||||||
+ if (format == "YUV") {
|
|
||||||
QGst::Fourcc fourcc = structure->value("format").get<QGst::Fourcc>();
|
|
||||||
kDebug() << "fourcc: " << fourcc.value.as_integer;
|
|
||||||
if (fourcc.value.as_integer == QGst::Fourcc("I420").value.as_integer) {
|
|
||||||
img = QImage(width/2, height/2, QImage::Format_RGB32);
|
|
||||||
|
|
||||||
- const uchar *data = (const uchar *)buffer->data();
|
|
||||||
+ QGst::MemoryPtr memory;
|
|
||||||
+ QGst::MapInfo info;
|
|
||||||
+ memory = buffer->getMemory(0);
|
|
||||||
+ if (!memory) {
|
|
||||||
+ kError() << "Could not get memory for buffer.";
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ if (!memory->map(info, QGst::MapRead)) {
|
|
||||||
+ kError() << "Could not map memory buffer.";
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ const uchar *data = (const uchar *)info.data();
|
|
||||||
|
|
||||||
for (int y=0; y<height; y+=2) {
|
|
||||||
const uchar *yLine = data + y*width;
|
|
||||||
@@ -225,6 +242,7 @@ void WebcamWidget::photoGstCallback(QGst::BufferPtr buffer, QGst::PadPtr)
|
|
||||||
img.setPixel(x/2,y/2,qRgb(r,g,b));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ memory->unmap(info);
|
|
||||||
} else {
|
|
||||||
kDebug() << "Not I420";
|
|
||||||
}
|
|
||||||
@@ -240,11 +258,23 @@ void WebcamWidget::photoGstCallback(QGst::BufferPtr buffer, QGst::PadPtr)
|
|
||||||
format = QImage::Format_RGB32;
|
|
||||||
|
|
||||||
if (format != QImage::Format_Invalid) {
|
|
||||||
- img = QImage((const uchar *)buffer->data(),
|
|
||||||
+ QGst::MemoryPtr memory;
|
|
||||||
+ QGst::MapInfo info;
|
|
||||||
+ memory = buffer->getMemory(0);
|
|
||||||
+ if (!memory) {
|
|
||||||
+ kError() << "Could not get memory for buffer.";
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ if (!memory->map(info, QGst::MapRead)) {
|
|
||||||
+ kError() << "Could not map memory buffer.";
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ img = QImage((const uchar *)info.data(),
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
format);
|
|
||||||
img.bits(); //detach
|
|
||||||
+ memory->unmap(info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -285,7 +315,7 @@ void WebcamWidget::recordVideo(bool sound)
|
|
||||||
//Get the audio from alsa
|
|
||||||
" ! mux. autoaudiosrc "
|
|
||||||
//Sound type and quality
|
|
||||||
- " ! audio/x-raw-int,rate=48000,channels=2,depth=16 "
|
|
||||||
+ " ! audio/x-raw,rate=48000,channels=2,depth=16 "
|
|
||||||
//Encode sound as vorbis
|
|
||||||
" ! queue ! audioconvert ! queue "
|
|
||||||
" ! vorbisenc "
|
|
||||||
@@ -368,11 +398,11 @@ QByteArray WebcamWidget::basicPipe()
|
|
||||||
|
|
||||||
//Accepted capabilities
|
|
||||||
pipe +=
|
|
||||||
- " ! ffmpegcolorspace"
|
|
||||||
- " ! video/x-raw-yuv, width=640, height=480, framerate=15/1;"
|
|
||||||
- " video/x-raw-yuv, width=640, height=480, framerate=24/1;"
|
|
||||||
- " video/x-raw-yuv, width=640, height=480, framerate=30/1;"
|
|
||||||
- " video/x-raw-yuv, width=352, height=288, framerate=15/1"
|
|
||||||
+ " ! videoconvert"
|
|
||||||
+ " ! video/x-raw, format=RGB, width=640, height=480, framerate=15/1;"
|
|
||||||
+ " video/x-raw, format=RGB, width=640, height=480, framerate=24/1;"
|
|
||||||
+ " video/x-raw, format=RGB, width=640, height=480, framerate=30/1;"
|
|
||||||
+ " video/x-raw, format=RGB, width=352, height=288, framerate=15/1"
|
|
||||||
|
|
||||||
//Basic plug-in for video controls
|
|
||||||
" ! gamma name=gamma"
|
|
||||||
@@ -424,7 +454,7 @@ void WebcamWidget::activeAspectRatio()
|
|
||||||
{
|
|
||||||
QGst::BinPtr sink = d->m_bin->getElementByName("videosink").staticCast<QGst::Bin>();
|
|
||||||
|
|
||||||
- QGlib::RefPointer<QGst::XOverlay> over = sink->getElementByInterface<QGst::XOverlay>();
|
|
||||||
+ QGlib::RefPointer<QGst::VideoOverlay> over = sink->getElementByInterface<QGst::VideoOverlay>();
|
|
||||||
|
|
||||||
if (over->findProperty("force-aspect-ratio")) {
|
|
||||||
kDebug() << "Setting aspect ratio";
|
|
37
kamoso.spec
37
kamoso.spec
@ -1,18 +1,14 @@
|
|||||||
%define majversion %(echo %version | cut -d. -f 1-2)
|
%define majversion %(echo %version | cut -d. -f 1-2)
|
||||||
Name: kamoso
|
Name: kamoso
|
||||||
Version: 23.08.5
|
Version: 24.02.1
|
||||||
Release: 1mamba
|
Release: 1mamba
|
||||||
Summary: An application to take pictures and videos out of your webcam
|
Summary: An application to take pictures and videos out of your webcam
|
||||||
Group: Graphical Desktop/Applications/Multimedia
|
Group: Graphical Desktop/Applications/Multimedia
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
Distribution: openmamba
|
Distribution: openmamba
|
||||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
URL: https://www.linux-apps.com/p/1126888
|
URL: https://apps.kde.org/it/kamoso/
|
||||||
Source: https://download.kde.org/stable/release-service/%{version}/src/kamoso-%{version}.tar.xz
|
Source: https://download.kde.org/%{stable_kde6}/release-service/%{version}/src/kamoso-%{version}.tar.xz
|
||||||
Patch0: kamoso-2.0.2-libkipi-4.9.1.patch
|
|
||||||
Patch1: kamoso-2.0.2-libkipi-4.10.0-0.patch
|
|
||||||
Patch2: kamoso-2.0.2-libkipi-4.10.0.patch
|
|
||||||
Patch3: kamoso-2.0.2-libqt-gstreamer-1.2.0.patch
|
|
||||||
License: GPL
|
License: GPL
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
@ -47,44 +43,51 @@ BuildRequires: cmake
|
|||||||
BuildRequires: libpurpose-devel
|
BuildRequires: libpurpose-devel
|
||||||
Requires: purpose
|
Requires: purpose
|
||||||
|
|
||||||
%debug_package
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Kamoso is an application to take pictures and videos out of your webcam.
|
Kamoso is an application to take pictures and videos out of your webcam.
|
||||||
It also lets you to push the media to some web 2.0 services such as facebook and youtube.
|
It also lets you to push the media to some web 2.0 services such as facebook and youtube.
|
||||||
|
|
||||||
|
%debug_package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kde5 -d build
|
%cmake_kf6 \
|
||||||
%make
|
-DBUILD_WITH_QT6=OFF
|
||||||
|
|
||||||
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
%makeinstall -C build
|
%cmake_install
|
||||||
|
|
||||||
%find_lang %{name} --with-qt --with-html --with-man --all-name
|
%find_lang %{name} --with-qt --with-html --with-man --all-name
|
||||||
|
|
||||||
rm -f %{buildroot}%{_kde5_icondir}/hicolor/*/actions/youtube.png
|
rm -f %{buildroot}%{_kf6_icondir}/hicolor/*/actions/youtube.png
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_kde5_bindir}/kamoso
|
%{_kf6_bindir}/kamoso
|
||||||
%{_datadir}/metainfo/org.kde.kamoso.appdata.xml
|
%{_datadir}/metainfo/org.kde.kamoso.appdata.xml
|
||||||
%{_libdir}/gstreamer-1.0/gstkamosoqt5videosink.so
|
%{_libdir}/gstreamer-1.0/gstkamosoqt5videosink.so
|
||||||
%{_datadir}/applications/org.kde.kamoso.desktop
|
%{_datadir}/applications/org.kde.kamoso.desktop
|
||||||
%{_datadir}/knotifications5/kamoso.notifyrc
|
%{_datadir}/knotifications5/kamoso.notifyrc
|
||||||
%{_datadir}/sounds/kamoso-shutter.wav
|
|
||||||
%{_datadir}/icons/hicolor/scalable/actions/*
|
%{_datadir}/icons/hicolor/scalable/actions/*
|
||||||
%{_kde5_icondir}/hicolor/*/apps/kamoso.png
|
%{_kf6_icondir}/hicolor/*/apps/kamoso.png
|
||||||
%{_kde5_icondir}/hicolor/scalable/apps/kamoso.svgz
|
%{_kf6_icondir}/hicolor/scalable/apps/kamoso.svgz
|
||||||
%doc AUTHORS LICENSES
|
%doc AUTHORS LICENSES
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 25 2024 Automatic Build System <autodist@openmamba.org> 24.02.1-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Thu Mar 07 2024 Automatic Build System <autodist@openmamba.org> 24.02.0-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
* Sat Feb 17 2024 Automatic Build System <autodist@openmamba.org> 23.08.5-1mamba
|
* Sat Feb 17 2024 Automatic Build System <autodist@openmamba.org> 23.08.5-1mamba
|
||||||
- automatic version update by autodist
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user