Author SHA1 Message Date
jfmcarreira 9e8dfc2e3d Merge remote-tracking branch 'origin/feature/CalypFrameTestingCatch2' into feature/CalypFrameTestingCatch2 2021-05-08 23:15:16 +01:00
jfmcarreira 0280200a82 Add cmake with catch tests 2021-05-08 23:03:10 +01:00
João Carreira d29f8ea215 Add src files for catch2 tests 2021-05-03 01:43:19 +01:00
João Carreira 2d8476e875 Start adding cmake code to use catch2 2021-05-03 01:43:15 +01:00
jfmcarreira 864c3253f1 Fix cmake warnings for devs 2021-05-03 01:31:21 +01:00
João Carreira 32f803ada9 Add first tests using catch2 2021-05-03 00:24:02 +01:00
João Carreira 63eb742f64 Add src files for catch2 tests 2021-05-03 00:00:54 +01:00
João Carreira 72ef7deda6 Start adding cmake code to use catch2 2021-05-02 23:55:07 +01:00
João Carreira a2d452fd64 Ignore any build dir starting with build-* 2021-05-02 23:23:42 +01:00
jfmcarreira 3732810f9e Fix deprecated Qt functions
Change the way to get the screen size
Remove Qt::WindowFlags
Change function to process events from mouse wheel
2021-05-01 01:35:28 +01:00
jfmcarreira 56fc2e45bb Remove deprecated av_register_all() 2021-05-01 01:34:38 +01:00
jfmcarreira fa23256955 Add GitHub action to build code using cmake 2021-04-17 18:33:13 +01:00
jfmcarreira ffe0c38427 Bump version 2021-04-17 18:29:08 +01:00
jfmcarreira 12bd1a4c2c Add details to about dialog and change theme for windows 2021-04-17 18:27:47 +01:00
jfmcarreira b830b700ca Define style on windows 2021-04-17 12:59:55 +01:00
jfmcarreira 3109250471 Update last commit 2021-04-17 02:19:07 +01:00
jfmcarreira c6b43ac7fa Remove ffmpeg exe before building against it 2021-04-17 02:09:27 +01:00
jfmcarreira beed955e3f Change ffmpeg installation on windows 2021-04-17 01:57:27 +01:00
jfmcarreira 1f003ec2ac Add libswresample to FindFFmpeg 2021-04-17 01:22:34 +01:00
jfmcarreira c718d01700 Complete ffmpeg def in appveyor
Add missing variable definitions for avdevice and postproc library
Define variable FFMPEG_DIR
2021-04-17 00:44:34 +01:00
jfmcarreira 847f4f06b9 Remove testing from travis ci 2021-04-16 22:47:07 +01:00
20 changed files with 153 additions and 37 deletions

No files matched your search

+2 -1
View File
@@ -25,13 +25,14 @@ install:
- 7z x ffmpeg.7z -y -offmpeg - 7z x ffmpeg.7z -y -offmpeg
- git clone https://github.com/pixlra/calyp-deployment.git - git clone https://github.com/pixlra/calyp-deployment.git
- CALL calyp-deployment/scripts/extract_ffmpeg.bat - CALL calyp-deployment/scripts/extract_ffmpeg.bat
- ps: rm C:\Projects\ffmpeg_libraries\bin\*.exe
build_script: build_script:
- mv C:\Projects\calyp C:\Projects\calyp-deployment\cmake-helper\ - mv C:\Projects\calyp C:\Projects\calyp-deployment\cmake-helper\
- mkdir C:\Projects\calyp-build - mkdir C:\Projects\calyp-build
- cd C:\Projects\calyp-build - cd C:\Projects\calyp-build
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DUSE_DYNLOAD=OFF -DOpenCV_DIR="C:/Tools/opencv/build" -DOpenCV_DLL_DIR="C:/Tools/opencv/build/x64/vc15/bin" -DOpenCV_INSTALL_MODULES="world" -DQT_DIR="C:\Qt\latest\msvc2017_64" -DQt5_DIR="C:\Qt\latest\msvc2017_64\lib\cmake\Qt5" -DUSE_QTDBUS=OFF -DAVFORMAT_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avformat.lib -DAVFORMAT_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DAVCODEC_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avcodec.lib -DAVCODEC_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DAVUTIL_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avutil.lib -DAVUTIL_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DSWSCALE_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/swscale.lib -DSWSCALE_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -G "Visual Studio 15 2017 Win64" C:\Projects\calyp-deployment\cmake-helper - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DUSE_DYNLOAD=OFF -DOpenCV_DIR="C:/Tools/opencv/build" -DOpenCV_DLL_DIR="C:/Tools/opencv/build/x64/vc15/bin" -DOpenCV_INSTALL_MODULES="world" -DQT_DIR="C:\Qt\latest\msvc2017_64" -DQt5_DIR="C:\Qt\latest\msvc2017_64\lib\cmake\Qt5" -DUSE_QTDBUS=OFF -DAVFORMAT_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avformat.lib -DAVFORMAT_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DAVCODEC_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avcodec.lib -DAVCODEC_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DAVUTIL_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avutil.lib -DAVUTIL_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DSWSCALE_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/swscale.lib -DSWSCALE_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DAVDEVICE_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avdevice.lib -DAVDEVICE_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DPOSTPROC_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/postproc.lib -DPOSTPROC_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DFFMPEG_DIR=C:\Projects\ffmpeg_libraries -DSWRESAMPLE_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/swresample.lib -DSWRESAMPLE_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -G "Visual Studio 15 2017 Win64" C:\Projects\calyp-deployment\cmake-helper
- cmake --build . --target ALL_BUILD -- /p:Configuration=Release > log_build - cmake --build . --target ALL_BUILD -- /p:Configuration=Release > log_build
- cmake --build . --target INSTALL -- /p:Configuration=Release > log_install - cmake --build . --target INSTALL -- /p:Configuration=Release > log_install
- cmake --build . --target PACKAGE -- /p:Configuration=Release > log_pkg - cmake --build . --target PACKAGE -- /p:Configuration=Release > log_pkg
+31
View File
@@ -0,0 +1,31 @@
name: Build and Test
on:
push:
branches:
- devel
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt-get install cmake qtbase5-dev libavcodec-dev libavformat-dev libavutil-dev libopencv-dev libopencv-video-dev libopencv-contrib-dev
- name: Build CMake
uses: ashutoshvarma/action-cmake-build@v1
with:
build-dir: ${{ runner.workspace }}/build
# will set the CC & CXX for cmake
cc: gcc
cxx: g++
build-type: Release
# Extra options pass to cmake while configuring project
configure-options: -DBUILD_TESTS=ON -DUSE_WERROR=ON
run-test: true
#ctest-options: -R mytest
# install the build using cmake --install
install-build: true
# run build using '-j [parallel]' to use multiple threads to build
parallel: 14
+1
View File
@@ -76,6 +76,7 @@
# CMake # CMake
bin/ bin/
build/ build/
build-*
cmake-build-*/ cmake-build-*/
# Mongo Explorer plugin # Mongo Explorer plugin
+1 -1
View File
@@ -4,4 +4,4 @@ before_install:
- sudo apt-get -qq update - sudo apt-get -qq update
- sudo apt-get install build-essential cmake qtbase5-dev libavcodec-dev libavformat-dev libavutil-dev libopencv-dev libopencv-video-dev libopencv-contrib-dev libgtest-dev - sudo apt-get install build-essential cmake qtbase5-dev libavcodec-dev libavformat-dev libavutil-dev libopencv-dev libopencv-video-dev libopencv-contrib-dev libgtest-dev
script: script:
- mkdir -p build && cd build && cmake -DBUILD_TESTS=ON .. && make && cd .. - mkdir -p build && cd build && cmake .. && make && cd ..
+28 -15
View File
@@ -2,15 +2,7 @@
# CMakeLists for calyp # CMakeLists for calyp
# #
CMAKE_MINIMUM_REQUIRED(VERSION 3.2.0) CMAKE_MINIMUM_REQUIRED(VERSION 3.5.0)
# ####################################################################################################################################################
# CMake functions
# ####################################################################################################################################################
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
INCLUDE(cmake/ModulesFct.cmake)
INCLUDE(FeatureSummary)
INCLUDE(GNUInstallDirs)
# #################################################################################################################################################### # ####################################################################################################################################################
# Project Definition # Project Definition
@@ -25,15 +17,28 @@ SET(PROJECT_LIBRARY
CACHE INTERNAL "" FORCE CACHE INTERNAL "" FORCE
) )
PROJECT(${PROJECT_NAME})
SET(CALYP_VERSION_MAJOR "1") SET(CALYP_VERSION_MAJOR "1")
SET(CALYP_VERSION_MINOR "1") SET(CALYP_VERSION_MINOR "2")
SET(CALYP_VERSION_PATCH "0") SET(CALYP_VERSION_PATCH "0")
SET(CALYP_VERSION SET(CALYP_VERSION
"${CALYP_VERSION_MAJOR}.${CALYP_VERSION_MINOR}.${CALYP_VERSION_PATCH}" "${CALYP_VERSION_MAJOR}.${CALYP_VERSION_MINOR}.${CALYP_VERSION_PATCH}"
CACHE INTERNAL "" FORCE CACHE INTERNAL "" FORCE
) )
PROJECT(
${PROJECT_NAME}
VERSION ${CALYP_VERSION}
LANGUAGES "CXX"
)
# ####################################################################################################################################################
# CMake functions
# ####################################################################################################################################################
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
INCLUDE(cmake/ModulesFct.cmake)
INCLUDE(FeatureSummary)
INCLUDE(GNUInstallDirs)
# #################################################################################################################################################### # ####################################################################################################################################################
# Variables # Variables
# #################################################################################################################################################### # ####################################################################################################################################################
@@ -43,6 +48,7 @@ OPTION(BUILD_TOOLS "Build Command Line Application" ON)
OPTION(BUILD_EXAMPLES "Build Examples" OFF) OPTION(BUILD_EXAMPLES "Build Examples" OFF)
OPTION(BUILD_DOC "Build Documentation" OFF) OPTION(BUILD_DOC "Build Documentation" OFF)
OPTION(BUILD_TESTS "Build Google Tests" OFF) OPTION(BUILD_TESTS "Build Google Tests" OFF)
OPTION(BUILD_TESTS_CATCH2 "Build Catch2 Tests" OFF)
OPTION(USE_FERVOR "Add Fervor support" OFF) OPTION(USE_FERVOR "Add Fervor support" OFF)
@@ -119,6 +125,17 @@ IF(BUILD_TESTS)
) )
ENDIF() ENDIF()
IF(BUILD_TESTS_CATCH2)
FIND_PACKAGE(Catch2 REQUIRED)
ENABLE_TESTING()
SET_PACKAGE_PROPERTIES(
Catch2 PROPERTIES
URL "https://github.com/catchorg/Catch2"
DESCRIPTION "Catch2 unit tests"
TYPE OPTIONAL
)
ENDIF()
OPTION(USE_OPENCV "Add OpenCV support" ON) OPTION(USE_OPENCV "Add OpenCV support" ON)
IF(USE_OPENCV) IF(USE_OPENCV)
@@ -147,10 +164,6 @@ SET_PACKAGE_PROPERTIES(
OPTION(USE_FFMPEG "Add FFMPEG support" ON) OPTION(USE_FFMPEG "Add FFMPEG support" ON)
IF(USE_FFMPEG) IF(USE_FFMPEG)
FIND_PACKAGE(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE) FIND_PACKAGE(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
IF("${AVCODEC_VERSION}" VERSION_LESS "56.0.0")
SET(FFMPEG_FOUND FALSE)
SET(FFmpeg_FOUND FALSE)
ENDIF()
SET(USE_FFMPEG ${FFMPEG_FOUND}) SET(USE_FFMPEG ${FFMPEG_FOUND})
ENDIF() ENDIF()
SET_PACKAGE_PROPERTIES( SET_PACKAGE_PROPERTIES(
+5 -1
View File
@@ -24,6 +24,10 @@
#include "PlotSubWindow.h" #include "PlotSubWindow.h"
#include <QGuiApplication>
#include <QScreen>
#include <QSize>
#include "qcustomplot.h" #include "qcustomplot.h"
//#include "external/qcustomplot/qcustomplot.h" //#include "external/qcustomplot/qcustomplot.h"
@@ -174,7 +178,7 @@ QSize PlotSubWindow::sizeHint() const
} }
else else
{ {
maxSize = QApplication::desktop()->availableGeometry().size(); maxSize = QGuiApplication::screens()[0]->availableGeometry().size();
} }
return sizeHint( maxSize ); return sizeHint( maxSize );
} }
+9 -5
View File
@@ -29,10 +29,12 @@
#include <QActionGroup> #include <QActionGroup>
#include <QApplication> #include <QApplication>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QGuiApplication>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QMdiArea> #include <QMdiArea>
#include <QMenu> #include <QMenu>
#include <QPainter> #include <QPainter>
#include <QScreen>
#include <QSettings> #include <QSettings>
#include <QSignalMapper> #include <QSignalMapper>
#include <QStyle> #include <QStyle>
@@ -154,7 +156,7 @@ void SubWindowHandle::setWindowMode( int iWindowMode )
parentWidget()->update(); parentWidget()->update();
m_pcApp->showNormal(); m_pcApp->showNormal();
qApp->processEvents(); qApp->processEvents();
QSize screenSize = QApplication::desktop()->availableGeometry().size(); QSize screenSize = QGuiApplication::screens()[0]->availableGeometry().size();
m_pcApp->move( 0, 0 ); m_pcApp->move( 0, 0 );
m_pcApp->resize( screenSize.width(), 5 ); m_pcApp->resize( screenSize.width(), 5 );
m_pcApp->setWindowTitle( QApplication::applicationName() ); m_pcApp->setWindowTitle( QApplication::applicationName() );
@@ -230,12 +232,14 @@ void SubWindowHandle::addMdiSubWindow( SubWindowAbstract* window )
SLOT( removeMdiSubWindow( MdiSubWindow* ) ) ); SLOT( removeMdiSubWindow( MdiSubWindow* ) ) );
} }
void SubWindowHandle::addSubWindow( SubWindowAbstract* window, Qt::WindowFlags flags ) void SubWindowHandle::addSubWindow( SubWindowAbstract* window )
{ {
if( window ) if( window )
{ {
connect( window, SIGNAL( updateStatusBar( const QString& ) ), m_pcApp, SLOT( printMessage( const QString& ) ) ); connect( window, SIGNAL( updateStatusBar( const QString& ) ), m_pcApp,
connect( window, SIGNAL( zoomFactorChanged( const double, const QPoint ) ), m_pcApp, SLOT( updateZoomFactorSBox() ) ); SLOT( printMessage( const QString& ) ) );
connect( window, SIGNAL( zoomFactorChanged( const double, const QPoint ) ), m_pcApp,
SLOT( updateZoomFactorSBox() ) );
if( m_iWindowMode == DETACHEDSUBWINDOWMODE ) if( m_iWindowMode == DETACHEDSUBWINDOWMODE )
{ {
connect( window, SIGNAL( aboutToActivate( SubWindowAbstract* ) ), this, connect( window, SIGNAL( aboutToActivate( SubWindowAbstract* ) ), this,
@@ -378,7 +382,7 @@ void SubWindowHandle::tileSubWindows()
if( m_iWindowMode == DETACHEDSUBWINDOWMODE ) if( m_iWindowMode == DETACHEDSUBWINDOWMODE )
{ {
QSize screenSize = QApplication::desktop()->availableGeometry().size(); QSize screenSize = QGuiApplication::screens()[0]->availableGeometry().size();
unsigned int minWindowsInRow = 1; unsigned int minWindowsInRow = 1;
while( ( screenSize.width() / minWindowsInRow ) > 500 ) while( ( screenSize.width() / minWindowsInRow ) > 500 )
{ {
+1 -1
View File
@@ -51,7 +51,7 @@ public:
void processLogMsg( const QString& msg ); void processLogMsg( const QString& msg );
void addSubWindow( SubWindowAbstract* widget, Qt::WindowFlags flags = 0 ); void addSubWindow( SubWindowAbstract* widget );
SubWindowAbstract* activeSubWindow() const; SubWindowAbstract* activeSubWindow() const;
+1 -1
View File
@@ -259,7 +259,7 @@ QSize VideoSubWindow::sizeHint() const
} }
else else
{ {
maxSize = QApplication::desktop()->availableGeometry().size(); maxSize = QGuiApplication::screens()[0]->availableGeometry().size();
} }
return sizeHint( maxSize ); return sizeHint( maxSize );
} }
-1
View File
@@ -182,7 +182,6 @@ public:
QSize sizeHint( const QSize& ) const; QSize sizeHint( const QSize& ) const;
QString getCurrentFileName() { return m_cFilename; } QString getCurrentFileName() { return m_cFilename; }
bool getIsModule() { return getCategory() | SubWindowAbstract::MODULE_SUBWINDOW; }
void clearWindowBusy() { m_bWindowBusy = false; } void clearWindowBusy() { m_bWindowBusy = false; }
void setFillWindow( bool bFlag ); void setFillWindow( bool bFlag );
+1 -1
View File
@@ -730,7 +730,7 @@ void ViewArea::wheelEvent( QWheelEvent* event )
if( event->modifiers() & Qt::ControlModifier ) if( event->modifiers() & Qt::ControlModifier )
{ {
scale = 0.001 * event->delta(); scale = 0.001 * event->angleDelta().y();
if( scale > 0 ) if( scale > 0 )
scale = 1.25; scale = 1.25;
else else
+10 -3
View File
@@ -49,7 +49,7 @@ AboutDialog::AboutDialog( QWidget* parent )
.arg( QApplication::applicationVersion() ) ); .arg( QApplication::applicationVersion() ) );
label->setWordWrap( false ); label->setWordWrap( false );
QString featuresList = QStringLiteral( "<p><h3><b>Features:</b></h3><ul>" ); QString featuresList = QStringLiteral( "<p><h4><b>Features:</b></h4><ul>" );
#ifdef USE_QTDBUS #ifdef USE_QTDBUS
featuresList.append( QStringLiteral( "<li>Support for Qt DBus messages" ) ); featuresList.append( QStringLiteral( "<li>Support for Qt DBus messages" ) );
@@ -63,14 +63,21 @@ AboutDialog::AboutDialog( QWidget* parent )
featuresList.append( QStringLiteral( "</ul></p>" ) ); featuresList.append( QStringLiteral( "</ul></p>" ) );
QLabel* labelFeatures = new QLabel( featuresList ); QLabel* labelFeatures = new QLabel( featuresList );
QLabel* labelCopyright = new QLabel( QStringLiteral( "Copyright © 2014–2018 Joao Carreira and Luis Lucas" ) ); QString thanksList = QStringLiteral( "<p><h4><b>Thanks to:</b></h4><ul>" );
thanksList.append( QStringLiteral( "<li>Joao Santos" ) );
thanksList.append( QStringLiteral( "<li>Jose Filipe" ) );
thanksList.append( QStringLiteral( "</ul></p>" ) );
QLabel* labelContributors = new QLabel( thanksList );
QLabel* labelCopyright = new QLabel( QStringLiteral( "Copyright 2014–2021 Joao Carreira and Luis Lucas" ) );
QWidget* topWidget = new QWidget; QWidget* topWidget = new QWidget;
QVBoxLayout* topLayout = new QVBoxLayout; QVBoxLayout* topLayout = new QVBoxLayout;
topLayout->addWidget( pixmapLabel, 0, Qt::AlignHCenter ); topLayout->addWidget( pixmapLabel, 0, Qt::AlignHCenter );
topLayout->addWidget( label ); topLayout->addWidget( label );
topLayout->addWidget( labelFeatures );
topLayout->addWidget( labelCopyright ); topLayout->addWidget( labelCopyright );
topLayout->addWidget( labelFeatures );
topLayout->addWidget( labelContributors );
topWidget->setLayout( topLayout ); topWidget->setLayout( topLayout );
// QTextEdit *textEdit = new QTextEdit(tr("<p>This program is free " // QTextEdit *textEdit = new QTextEdit(tr("<p>This program is free "
+4
View File
@@ -51,6 +51,10 @@ int main( int argc, char* argv[] )
QApplication::setApplicationVersion( QStringLiteral( CALYP_VERSION_STRING ) ); QApplication::setApplicationVersion( QStringLiteral( CALYP_VERSION_STRING ) );
QApplication::setOrganizationName( QStringLiteral( "PixLRA" ) ); QApplication::setOrganizationName( QStringLiteral( "PixLRA" ) );
#if _WIN32
application.setStyle( QStyleFactory::create( "Fusion" ) );
#endif
#ifdef USE_QTDBUS #ifdef USE_QTDBUS
/** /**
* use dbus, if available * use dbus, if available
+1
View File
@@ -86,6 +86,7 @@ IF(NOT FFMPEG_LIBRARIES)
FIND_COMPONENT(AVDEVICE libavdevice avdevice libavdevice/avdevice.h) FIND_COMPONENT(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
FIND_COMPONENT(AVUTIL libavutil avutil libavutil/avutil.h) FIND_COMPONENT(AVUTIL libavutil avutil libavutil/avutil.h)
FIND_COMPONENT(SWSCALE libswscale swscale libswscale/swscale.h) FIND_COMPONENT(SWSCALE libswscale swscale libswscale/swscale.h)
FIND_COMPONENT(SWRESAMPLE libswresample swresample libswresample/swresample.h)
FIND_COMPONENT(POSTPROC libpostproc postproc libpostproc/postprocess.h) FIND_COMPONENT(POSTPROC libpostproc postproc libpostproc/postprocess.h)
# Check if the required components were found and add their stuff to the FFMPEG_* vars. # Check if the required components were found and add their stuff to the FFMPEG_* vars.
+1 -1
View File
@@ -4,7 +4,7 @@ MACRO(ADD_MODULE name file)
OPTION(MODULE_${name} "Use module ${name}" ON) OPTION(MODULE_${name} "Use module ${name}" ON)
ADD_FEATURE_INFO(${name} MODULE_${name} "Module ${name}") ADD_FEATURE_INFO(${name} MODULE_${name} "Module ${name}")
IF(MODULE_${name}) IF(MODULE_${name})
LIST(APPEND Calyp_Mod_SRCS ${MODULE_LOCATION}${file}) LIST(APPEND Calyp_Mod_SRCS ${MODULE_LOCATION}${file}.cpp)
LIST(APPEND MODULES_LIST_NAME ${name}) LIST(APPEND MODULES_LIST_NAME ${name})
LIST(APPEND MODULES_LIST_FILES ${file}) LIST(APPEND MODULES_LIST_FILES ${file})
SET(Calyp_Mod_SRCS SET(Calyp_Mod_SRCS
+1 -5
View File
@@ -77,9 +77,5 @@ IF(USE_FFMPEG)
"FFmpeg-Dir" "FFmpeg-Dir"
CACHE PATH "Where to find FFmpeg Lib on Windows" CACHE PATH "Where to find FFmpeg Lib on Windows"
) )
INSTALL(FILES ${FFMPEG_DIR}/bin/avcodec-${AVCODEC_VERSION}.dll DESTINATION bin) INSTALL(DIRECTORY ${FFMPEG_DIR}/bin/ DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/avformat-${AVFORMAT_VERSION}.dll DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/avutil-${AVUTIL_VERSION}.dll DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/swscale-${SWSCALE_VERSION}.dll DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/swresample-${SWRESAMPLE_VERSION}.dll DESTINATION bin)
ENDIF() ENDIF()
+4
View File
@@ -85,3 +85,7 @@ ENDIF()
IF(BUILD_TESTS) IF(BUILD_TESTS)
ADD_SUBDIRECTORY(tests) ADD_SUBDIRECTORY(tests)
ENDIF() ENDIF()
IF(BUILD_TESTS_CATCH2)
ADD_SUBDIRECTORY(catch2)
ENDIF()
+1 -1
View File
@@ -91,7 +91,7 @@ bool StreamHandlerLibav::openHandler( ClpString strFilename, bool bInput )
// } // }
// Register all components of FFmpeg // Register all components of FFmpeg
av_register_all(); //av_register_all();
/* open input file, and allocate format context */ /* open input file, and allocate format context */
if( avformat_open_input( &m_cFmtCtx, filename, NULL, NULL ) < 0 ) if( avformat_open_input( &m_cFmtCtx, filename, NULL, NULL ) < 0 )
+12
View File
@@ -0,0 +1,12 @@
#
# CMakeLists for Calyp lis tests using catch2
#
# ADD_DEFINITIONS(-DCALYP_TEST_DATA_DIR=\"${CALYP_TEST_DATA_DIR}\")
SET(Calyp_Lib_Catch2_Tests_SRCS CalypFrameTests.cpp)
ADD_EXECUTABLE(CalypLibCatch2Tests ${Calyp_Lib_Catch2_Tests_SRCS})
TARGET_LINK_LIBRARIES(CalypLibCatch2Tests ${PROJECT_LIBRARY} Catch2::Catch2)
INCLUDE(CTest)
+39
View File
@@ -0,0 +1,39 @@
/* This file is a part of plaYUVer project
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* 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 of the License, 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.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/**
* \file CalypFrameTests.cpp
* \brief CalypFrame general tests
*/
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include "CalypFrame.h"
TEST_CASE( "create a 256x128 frame in YUV420 format", "CalypFrame" )
{
// Constructor: CalypFrame( unsigned int width, unsigned int height, int pelFormat, unsigned bitsPixel = 8 );
CalypFrame testFrame( 256, 128, CLP_YUV420P, 8 );
REQUIRE( testFrame.getWidth() == 256 );
REQUIRE( testFrame.getHeight() == 128 );
REQUIRE( testFrame.getPelFormat() == CLP_YUV420P );
REQUIRE( testFrame.getBitsPel() == 8 );
}