fix: build errors
This commit is contained in:
8 files changed
+32
-32
No files matched your search
@@ -20,9 +20,6 @@ jobs:
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
name: Build (Linux)
|
||||
env:
|
||||
CC: gcc-13
|
||||
CXX: g++-13
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install cmake qtbase5-dev libavcodec-dev libavformat-dev libavutil-dev libopencv-dev libopencv-video-dev libopencv-contrib-dev
|
||||
|
||||
+4
-1
@@ -45,6 +45,7 @@
|
||||
#include "VideoHandle.h"
|
||||
#include "VideoSubWindow.h"
|
||||
#include "lib/CalypOptions.h"
|
||||
#include "models/VideostreamResource.h"
|
||||
#ifdef USE_FERVOR
|
||||
#include "fvupdater.h"
|
||||
#endif
|
||||
@@ -908,11 +909,13 @@ void MainWindow::addStreamInfoToRecentList( CalypFileInfo streamInfo )
|
||||
if( idx >= 0 ) m_aRecentFileStreamInfo.remove( idx );
|
||||
m_aRecentFileStreamInfo.prepend( streamInfo );
|
||||
while( m_aRecentFileStreamInfo.size() > MAX_RECENT_FILES )
|
||||
{
|
||||
m_aRecentFileStreamInfo.remove( m_aRecentFileStreamInfo.size() - 1 );
|
||||
}
|
||||
updateRecentFileActions();
|
||||
QSettings appSettings;
|
||||
QVariant var;
|
||||
var.setValue<CalypFileInfoVector>( m_aRecentFileStreamInfo );
|
||||
var.setValue( m_aRecentFileStreamInfo );
|
||||
appSettings.setValue( "MainWindow/RecentFileList", var );
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ TARGET_LINK_LIBRARIES(
|
||||
${APP_LINKER_LIBS}
|
||||
${QT_LINKER_LIBS}
|
||||
QCustomPlotLib
|
||||
Catch2::Catch2
|
||||
Catch2::Catch2WithMain
|
||||
)
|
||||
CATCH_DISCOVER_TESTS(CalypAppCatch2Tests)
|
||||
@@ -23,4 +23,4 @@
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include <QString>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_all.hpp>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <variant>
|
||||
|
||||
@@ -42,10 +42,10 @@ public:
|
||||
|
||||
protected:
|
||||
CalypResource() = default;
|
||||
CalypResource( CalypResource&& other ) noexcept = delete;
|
||||
CalypResource& operator=( CalypResource&& other ) noexcept = delete;
|
||||
CalypResource( const CalypResource& other ) = delete;
|
||||
CalypResource& operator=( const CalypResource& other ) = delete;
|
||||
CalypResource( CalypResource&& other ) noexcept = default;
|
||||
CalypResource& operator=( CalypResource&& other ) noexcept = default;
|
||||
CalypResource( const CalypResource& other ) = default;
|
||||
CalypResource& operator=( const CalypResource& other ) = default;
|
||||
};
|
||||
|
||||
#endif // __CALYPRESOURCE_H__
|
||||
@@ -38,27 +38,25 @@
|
||||
* \brief Functions to control data stream from stream information
|
||||
*/
|
||||
|
||||
QDataStream& operator<<( QDataStream& out, const CalypFileInfoVector& array )
|
||||
auto operator<<( QDataStream& out, const CalypFileInfoVector& infos ) -> QDataStream&
|
||||
{
|
||||
CalypFileInfo d;
|
||||
out << array.size();
|
||||
for( int i = 0; i < array.size(); i++ )
|
||||
out << infos.size();
|
||||
for( const auto& info : infos )
|
||||
{
|
||||
d = array.at( i );
|
||||
out << d.m_cFilename << d.m_uiWidth << d.m_uiHeight << static_cast<int>( d.m_iPelFormat ) << d.m_uiBitsPelPixel
|
||||
<< d.m_iEndianness << d.m_uiFrameRate << d.m_uiFileSize << d.m_bForceRaw;
|
||||
out << info.m_cFilename << info.m_uiWidth << info.m_uiHeight << static_cast<int>( info.m_iPelFormat )
|
||||
<< info.m_uiBitsPelPixel << info.m_iEndianness << info.m_uiFrameRate << info.m_uiFileSize << info.m_bForceRaw;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
QDataStream& operator>>( QDataStream& in, CalypFileInfoVector& array )
|
||||
auto operator>>( QDataStream& in, CalypFileInfoVector& infos ) -> QDataStream&
|
||||
{
|
||||
int array_size{ 0 };
|
||||
auto array_size = infos.size();
|
||||
in >> array_size;
|
||||
for( int i = 0; i < array_size; i++ )
|
||||
{
|
||||
CalypFileInfo d;
|
||||
int pelFormat;
|
||||
int pelFormat{ 0 };
|
||||
in >> d.m_cFilename;
|
||||
in >> d.m_uiWidth;
|
||||
in >> d.m_uiHeight;
|
||||
@@ -69,7 +67,7 @@ QDataStream& operator>>( QDataStream& in, CalypFileInfoVector& array )
|
||||
in >> d.m_uiFileSize;
|
||||
in >> d.m_bForceRaw;
|
||||
d.m_iPelFormat = static_cast<ClpPixelFormats>( pelFormat );
|
||||
array.append( d );
|
||||
infos.append( d );
|
||||
}
|
||||
return in;
|
||||
}
|
||||
@@ -77,8 +75,9 @@ QDataStream& operator>>( QDataStream& in, CalypFileInfoVector& array )
|
||||
auto findCalypStreamInfo( const CalypFileInfoVector& array, const QString& filename ) -> int
|
||||
{
|
||||
for( int i = 0; i < array.size(); i++ )
|
||||
if( array.at( i ).m_cFilename == filename )
|
||||
return i;
|
||||
{
|
||||
if( array.at( i ).m_cFilename == filename ) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -160,8 +159,7 @@ void VideostreamResource::pause()
|
||||
|
||||
void VideostreamResource::seekAbsoluteEvent( unsigned int new_frame_num )
|
||||
{
|
||||
if( m_currStream.seekInput( new_frame_num ) )
|
||||
triggerRefresh();
|
||||
if( m_currStream.seekInput( new_frame_num ) ) triggerRefresh();
|
||||
}
|
||||
|
||||
void VideostreamResource::seekRelativeEvent( bool bIsForward )
|
||||
@@ -186,7 +184,9 @@ void VideostreamResource::stop()
|
||||
|
||||
auto VideostreamResource::goToNextFrame( bool bThreaded ) -> bool
|
||||
{
|
||||
while( !m_currStream.hasNextFrame() && !m_currStream.isEof() ) {}
|
||||
while( !m_currStream.hasNextFrame() && !m_currStream.isEof() )
|
||||
{
|
||||
}
|
||||
bool bEndOfSeq = m_currStream.setNextFrame();
|
||||
if( !bEndOfSeq )
|
||||
{
|
||||
@@ -345,8 +345,7 @@ auto video_resource_guess_format( const QString& filename, unsigned int& rWidth,
|
||||
rEndianness = CLP_LITTLE_ENDIAN;
|
||||
}
|
||||
|
||||
if( rWidth > 0 && rHeight > 0 && rInputFormat != ClpPixelFormats::Invalid )
|
||||
bGuessed = true && !bGuessedByFilesize;
|
||||
if( rWidth > 0 && rHeight > 0 && rInputFormat != ClpPixelFormats::Invalid ) bGuessed = true && !bGuessedByFilesize;
|
||||
}
|
||||
return bGuessed;
|
||||
}
|
||||
@@ -45,10 +45,11 @@ struct CalypFileInfo
|
||||
unsigned long long int m_uiFileSize;
|
||||
bool m_bForceRaw{ false };
|
||||
};
|
||||
|
||||
using CalypFileInfoVector = QVector<CalypFileInfo>;
|
||||
|
||||
QDataStream& operator<<( QDataStream& out, const CalypFileInfoVector& d );
|
||||
QDataStream& operator>>( QDataStream& in, CalypFileInfoVector& d );
|
||||
auto operator<<( QDataStream& out, const CalypFileInfoVector& infos ) -> QDataStream&;
|
||||
auto operator>>( QDataStream& in, CalypFileInfoVector& infos ) -> QDataStream&;
|
||||
auto findCalypStreamInfo( const CalypFileInfoVector& array, const QString& filename ) -> int;
|
||||
|
||||
class VideostreamResource : public QObject, public CalypResource
|
||||
@@ -88,7 +89,7 @@ private:
|
||||
// Q_SIGNALS:
|
||||
// private Q_SLOTS:
|
||||
|
||||
private:
|
||||
private: // NOLINT
|
||||
CalypStream m_currStream;
|
||||
CalypFileInfo m_sStreamInfo;
|
||||
|
||||
|
||||
Reference in new issue
Block a user