Name of the file is now read form the end to the begining, in order to guess seuqence format
This commit is contained in:
1 parent
be0c5dca74
commit
df38f3d832
2 files changed
+5
-3
No files matched your search
@@ -40,6 +40,7 @@
|
|||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
# User-specific stuff
|
# User-specific stuff
|
||||||
|
.idea/
|
||||||
.idea/**/workspace.xml
|
.idea/**/workspace.xml
|
||||||
.idea/**/tasks.xml
|
.idea/**/tasks.xml
|
||||||
.idea/**/usage.statistics.xml
|
.idea/**/usage.statistics.xml
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
# .idea/modules
|
# .idea/modules
|
||||||
|
|
||||||
# CMake
|
# CMake
|
||||||
|
bin/
|
||||||
build/
|
build/
|
||||||
cmake-build-*/
|
cmake-build-*/
|
||||||
|
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ bool VideoSubWindow::guessFormat( QString filename, unsigned int& rWidth, unsign
|
|||||||
QRegularExpressionMatch resolutionMatch = QRegularExpression( "_\\d*x\\d*" ).match( FilenameShort );
|
QRegularExpressionMatch resolutionMatch = QRegularExpression( "_\\d*x\\d*" ).match( FilenameShort );
|
||||||
if( resolutionMatch.hasMatch() )
|
if( resolutionMatch.hasMatch() )
|
||||||
{
|
{
|
||||||
QString resolutionString = resolutionMatch.captured( 0 );
|
QString resolutionString = resolutionMatch.captured( resolutionMatch.lastCapturedIndex() );
|
||||||
if( resolutionString.startsWith( "_" ) || resolutionString.endsWith( "_" ) )
|
if( resolutionString.startsWith( "_" ) || resolutionString.endsWith( "_" ) )
|
||||||
{
|
{
|
||||||
resolutionString.remove( "_" );
|
resolutionString.remove( "_" );
|
||||||
@@ -539,7 +539,7 @@ bool VideoSubWindow::guessFormat( QString filename, unsigned int& rWidth, unsign
|
|||||||
QRegularExpressionMatch BppMatch = QRegularExpression( "_\\d*bpp" ).match( FilenameShort );
|
QRegularExpressionMatch BppMatch = QRegularExpression( "_\\d*bpp" ).match( FilenameShort );
|
||||||
if( BppMatch.hasMatch() )
|
if( BppMatch.hasMatch() )
|
||||||
{
|
{
|
||||||
QString matchString = BppMatch.captured( 0 );
|
QString matchString = BppMatch.captured( BppMatch.lastCapturedIndex() );
|
||||||
matchString.remove( "_" );
|
matchString.remove( "_" );
|
||||||
matchString.remove( "bpp" );
|
matchString.remove( "bpp" );
|
||||||
rBitsPerPixel = matchString.toUInt();
|
rBitsPerPixel = matchString.toUInt();
|
||||||
@@ -553,7 +553,7 @@ bool VideoSubWindow::guessFormat( QString filename, unsigned int& rWidth, unsign
|
|||||||
QRegularExpressionMatch FpsMatch = QRegularExpression( "_\\d*fps" ).match( FilenameShort );
|
QRegularExpressionMatch FpsMatch = QRegularExpression( "_\\d*fps" ).match( FilenameShort );
|
||||||
if( FpsMatch.hasMatch() )
|
if( FpsMatch.hasMatch() )
|
||||||
{
|
{
|
||||||
QString matchString = FpsMatch.captured( 0 );
|
QString matchString = FpsMatch.captured( FpsMatch.lastCapturedIndex() );
|
||||||
matchString.remove( "_" );
|
matchString.remove( "_" );
|
||||||
matchString.remove( "fps" );
|
matchString.remove( "fps" );
|
||||||
rFrameRate = matchString.toUInt();
|
rFrameRate = matchString.toUInt();
|
||||||
|
|||||||
Reference in new issue
Block a user