Change endianness to Int

This commit is contained in:
jfmcarreira committed 2016-04-01 12:13:20 +01:00
1 parent 8b154a2808
commit 6449412206
7 files changed
+30 -26

No files matched your search

+10 -9
View File
@@ -194,16 +194,15 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
QLabel* endiannessLabel = new QLabel();
endiannessLabel->setFont( menusFont );
endiannessLabel->setText( "Endianness" );
QComboBox* endiannessComboBox = new QComboBox();
endiannessComboBox->setFont( normalFont );
endiannessComboBox->setSizePolicy( sizePolicy );
endiannessComboBox->clear();
endiannessComboBox->addItem( QStringLiteral("Big Endian") );
endiannessComboBox->addItem( QStringLiteral("Little Endian") );
endiannessComboBox->setCurrentIndex( 0 );
m_comboBoxEndianness = new QComboBox();
m_comboBoxEndianness->setFont( normalFont );
m_comboBoxEndianness->setSizePolicy( sizePolicy );
m_comboBoxEndianness->clear();
m_comboBoxEndianness->addItem( QStringLiteral("Big Endian") );
m_comboBoxEndianness->addItem( QStringLiteral("Little Endian") );
endiannessLayout->addWidget( endiannessLabel );
endiannessLayout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
endiannessLayout->addWidget( endiannessComboBox );
endiannessLayout->addWidget( m_comboBoxEndianness );
m_widgetEndianness = new QWidget();
m_widgetEndianness->setContentsMargins( 0,0,0,0 );
m_widgetEndianness->setLayout( endiannessLayout );
@@ -262,7 +261,7 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
}
Int ConfigureFormatDialog::runConfigureFormatDialog( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBits, UInt& rEndianess, UInt& rFrameRate )
Int ConfigureFormatDialog::runConfigureFormatDialog( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBits, Int& rEndianess, UInt& rFrameRate )
{
// Set default values
//setWindowTitle( "Configure resolution for " + Filename );
@@ -291,6 +290,7 @@ Int ConfigureFormatDialog::runConfigureFormatDialog( QString Filename, UInt& rWi
m_comboBoxColorSpace->setCurrentIndex( colorSpace );
m_comboBoxPixelFormat->setCurrentIndex( sampling );
m_spinBoxBits->setValue( rBits );
m_comboBoxEndianness->setCurrentIndex( rEndianess );
if( rBits > 8 )
{
m_widgetEndianness->setVisible( true );
@@ -326,6 +326,7 @@ Int ConfigureFormatDialog::runConfigureFormatDialog( QString Filename, UInt& rWi
}
}
rBits = m_spinBoxBits->value();
rEndianess = m_comboBoxEndianness->currentIndex();
rFrameRate = m_spinBoxFrameRate->value();
return QDialog::Accepted;
}
+2 -1
View File
@@ -50,7 +50,7 @@ Q_OBJECT
public:
ConfigureFormatDialog( QWidget *parent = 0 );
Int runConfigureFormatDialog( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBits, UInt& rEndianess, UInt& rFrameRate );
Int runConfigureFormatDialog( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBits, Int& rEndianess, UInt& rFrameRate );
private Q_SLOTS:
void slotStandardResolutionSelected( int );
@@ -70,6 +70,7 @@ private:
QComboBox *m_comboBoxPixelFormat;
QSpinBox *m_spinBoxBits;
QWidget* m_widgetEndianness;
QComboBox* m_comboBoxEndianness;
QHBoxLayout* framerateFormatLayout;
QSpinBox *m_spinBoxFrameRate;
+2 -1
View File
@@ -308,7 +308,8 @@ Void VideoSubWindow::refreshSubWindow()
Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog )
{
ConfigureFormatDialog formatDialog( this );
UInt Width = 0, Height = 0, BitsPel = 8, Endianness = 0, FrameRate = 30;
UInt Width = 0, Height = 0, BitsPel = 8, FrameRate = 30;
Int Endianness = 0;
Int InputFormat = PlaYUVerFrame::YUV420p;
if( m_pCurrStream )