Change the standard resolution definition and add code to guess the resolution from the filesize
This commit is contained in:
1 parent
54da444b4f
commit
8c2bb0fd03
4 files changed
+114
-46
No files matched your search
@@ -172,6 +172,36 @@ public:
|
||||
return formatsName;
|
||||
}
|
||||
|
||||
#define REGIST_STANDARD_RESOLUTION( name, width, height) \
|
||||
stdRes.stringListName.append( QString( name ) ); \
|
||||
stdRes.stringListFullName.append( QString( "%1 (%2x%3)" ).arg( name ).arg( width ).arg( height ) ); \
|
||||
stdRes.sizeResolution.append( QSize( width, height ) )
|
||||
|
||||
struct StandardResolution
|
||||
{
|
||||
QStringList stringListName;
|
||||
QStringList stringListFullName;
|
||||
QVector<QSize> sizeResolution;
|
||||
};
|
||||
|
||||
static struct StandardResolution standardResolutionSizes()
|
||||
{
|
||||
struct StandardResolution stdRes;
|
||||
REGIST_STANDARD_RESOLUTION( "CIF", 352, 288 );
|
||||
REGIST_STANDARD_RESOLUTION( "VGA", 640, 480 );
|
||||
REGIST_STANDARD_RESOLUTION( "WVGA", 832, 480 );
|
||||
REGIST_STANDARD_RESOLUTION( "XVGA", 1024, 768 );
|
||||
REGIST_STANDARD_RESOLUTION( "HD", 1280, 720 );
|
||||
REGIST_STANDARD_RESOLUTION( "SXGA-", 1280, 900 );
|
||||
REGIST_STANDARD_RESOLUTION( "SXGA", 1280, 1024 );
|
||||
REGIST_STANDARD_RESOLUTION( "WSXGA", 1440, 900 );
|
||||
REGIST_STANDARD_RESOLUTION( "FullHD", 1920, 1080 );
|
||||
REGIST_STANDARD_RESOLUTION( "WQXGA", 2560, 1600 );
|
||||
REGIST_STANDARD_RESOLUTION( "UltraHD", 3840, 2160 );
|
||||
REGIST_STANDARD_RESOLUTION( "8K", 8192, 4608 );
|
||||
return stdRes;
|
||||
}
|
||||
|
||||
enum PlaYUVerStreamErrors
|
||||
{
|
||||
NO_STREAM_ERROR = 0,
|
||||
@@ -184,7 +214,8 @@ public:
|
||||
Bool open( QString filename, UInt width, UInt height, Int input_format, UInt frame_rate, Bool bInput = true );
|
||||
Void close();
|
||||
|
||||
Bool guessFormat( QString filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate );
|
||||
static Bool guessFormat( QString filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate );
|
||||
|
||||
Void getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate );
|
||||
|
||||
Void loadAll();
|
||||
|
||||
Reference in new issue
Block a user