diff --git a/.travis.yml b/.travis.yml index 65413db..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 + - 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 .. 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 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; 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 ) {