From d30dee19be95846b8a20f80ad31cdb94da13bc9f Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sat, 26 Aug 2017 04:35:43 +0100 Subject: [PATCH 1/4] Fix travis check build errors --- .travis.yml | 2 +- CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 65413db..4617cd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,5 @@ language: cpp dist: xenial before_install: - sudo apt-get -qq update - - sudo apt-get install build-essential cmake qtbase5-dev libavcodec-dev libavformat-dev libopencv-dev + - sudo apt-get install build-essential cmake qtbase5-dev libavcodec-dev libavformat-dev libopencv-dev libopencv-video-dev script: mkdir -p build && cd build && cmake .. && make && cd .. diff --git a/CMakeLists.txt b/CMakeLists.txt index c859cc9..a70a9f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ cmake_minimum_required( VERSION 3.2.0 ) SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ) INCLUDE( cmake/ModulesFct.cmake ) INCLUDE(FeatureSummary) +INCLUDE(GNUInstallDirs) ###################################################################################### # Project Definition From b97a406daa6ea28ad5c100c8a1d25f9ad8cdfd6f Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Wed, 6 Sep 2017 22:10:19 +0100 Subject: [PATCH 2/4] Fix av_frame_alloc use based on libavcodec version --- lib/StreamHandlerLibav.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/StreamHandlerLibav.cpp b/lib/StreamHandlerLibav.cpp index 0160670..5906965 100644 --- a/lib/StreamHandlerLibav.cpp +++ b/lib/StreamHandlerLibav.cpp @@ -233,10 +233,10 @@ Bool StreamHandlerLibav::openHandler( String strFilename, Bool bInput ) return false; } -#ifdef FF_USER_CODEC_PARAM - m_cFrame = av_frame_alloc(); +#if( ( LIBAVCODEC_VERSION_MAJOR >= 56 ) && ( LIBAVCODEC_VERSION_MINOR >= 0 ) ) + m_cFrame = av_frame_alloc(); #else - m_cFrame = avcodec_alloc_frame(); + m_cFrame = avcodec_alloc_frame(); #endif if( !m_cFrame ) { From 261cee821f23c6dbe6be43a5cd11d3517190601c Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Wed, 6 Sep 2017 22:17:13 +0100 Subject: [PATCH 3/4] Update missing dependency in travis-ci script --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4617cd1..0481a03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,5 @@ language: cpp dist: xenial before_install: - sudo apt-get -qq update - - sudo apt-get install build-essential cmake qtbase5-dev libavcodec-dev libavformat-dev libopencv-dev libopencv-video-dev + - sudo apt-get install build-essential cmake qtbase5-dev libavcodec-dev libavformat-dev libavutil-dev libopencv-dev libopencv-video-dev script: mkdir -p build && cd build && cmake .. && make && cd .. From 1833ca12ec9d962298a10394793e8f2a2c16a6a0 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 11 Sep 2017 01:08:00 +0100 Subject: [PATCH 4/4] Fix DBus communication in order to re-use app instances --- app/PlaYUVerAppAdaptor.cpp | 4 +++- app/PlaYUVerAppAdaptor.h | 4 ++-- app/main.cpp | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/PlaYUVerAppAdaptor.cpp b/app/PlaYUVerAppAdaptor.cpp index bdddbbb..56a02a8 100644 --- a/app/PlaYUVerAppAdaptor.cpp +++ b/app/PlaYUVerAppAdaptor.cpp @@ -30,8 +30,10 @@ PlaYUVerAppAdaptor::PlaYUVerAppAdaptor( PlaYUVerApp* app ) : QDBusAbstractAdaptor( app ), m_app( app ) { // application dbus interface - QDBusConnection::sessionBus().registerObject( QStringLiteral( PLAYUVER_DBUS_PATH ), this, + Bool isRegistered = QDBusConnection::sessionBus().registerObject( QStringLiteral( PLAYUVER_DBUS_PATH ), this, QDBusConnection::ExportAllSlots ); + + Q_ASSERT( isRegistered == true ); } PlaYUVerAppAdaptor::~PlaYUVerAppAdaptor() diff --git a/app/PlaYUVerAppAdaptor.h b/app/PlaYUVerAppAdaptor.h index d57236a..7c1c357 100644 --- a/app/PlaYUVerAppAdaptor.h +++ b/app/PlaYUVerAppAdaptor.h @@ -33,14 +33,14 @@ #include #define PLAYUVER_DBUS_SESSION_NAME "org.pixlra.PlaYUVer.application" -#define PLAYUVER_DBUS_PATH "/MainApplication" +#define PLAYUVER_DBUS_PATH "/" class PlaYUVerApp; class PlaYUVerAppAdaptor : public QDBusAbstractAdaptor { Q_OBJECT - Q_CLASSINFO( "D-Bus Interface", "org.pixlra.PlaYUVer.application" ) + Q_CLASSINFO( "D-Bus Interface", PLAYUVER_DBUS_SESSION_NAME ) Q_PROPERTY( QString activeSession READ activeSession ) public: PlaYUVerAppAdaptor( PlaYUVerApp* app ); diff --git a/app/main.cpp b/app/main.cpp index 7a3d9db..5853941 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -56,8 +56,7 @@ int main( int argc, char* argv[] ) * use dbus, if available * allows for resuse of running Kate instances */ - QDBusConnectionInterface* const sessionBusInterface = QDBusConnection::sessionBus().interface(); - if( sessionBusInterface ) + if (QDBusConnectionInterface * const sessionBusInterface = QDBusConnection::sessionBus().interface()) { Bool force_new = false; QStringList filenameList;