Merge branch 'jfmcarreira-dev'

e to explain why this merge is necessary,
This commit is contained in:
2014-03-23 16:50:20 +00:00
4 changed files with 34 additions and 21 deletions
-9
View File
@@ -42,15 +42,6 @@
namespace plaYUVer
{
#define REGISTER_MODULE(X) \
{ \
if( USE_##X ) \
{ \
X *pMod = new X(); \
appendModule( pMod ); \
} \
}
class ModulesHandle : public QObject
{
Q_OBJECT
+16
View File
@@ -44,6 +44,22 @@ enum __PlaYUVerModuleTypes
VIDEO_LEVEL_MODULE,
};
enum __PlaYUVerModuleRequirements
{
MODULE_REQUIRES_FRAME = 1,
MODULE_REQUIRES_TWOFRAMES = 2,
MODULE_REQUIRES_SIDEBAR = 4,
};
#define REGISTER_MODULE(X) \
{ \
if( USE_##X ) \
{ \
X *pMod = new X(); \
appendModule( pMod ); \
} \
}
typedef struct __PlaYUVerModuleDefinition
{
int m_pchModuleType;
+14 -8
View File
@@ -47,6 +47,9 @@ SubWindowHandle::SubWindowHandle( QWidget * parent ) :
m_cScrollArea->setWidget( m_cViewArea );
m_cScrollArea->setWidgetResizable(true);
m_pCurrStream = new InputStream;
m_pCurrFrameQImage = NULL;
m_pcCurrentModule = NULL;
m_cWindowName = QString( " " );
@@ -58,19 +61,22 @@ SubWindowHandle::SubWindowHandle( QWidget * parent ) :
SubWindowHandle::~SubWindowHandle()
{
delete m_cViewArea;
if( !m_pcCurrentModule )
return;
m_pcCurrentModule->m_pcAction->setChecked( false );
m_pcCurrentModule->destroy();
m_pcCurrentModule = NULL;
delete m_cScrollArea;
delete m_pCurrStream;
if( m_pCurrFrameQImage )
delete m_pCurrFrameQImage;
if( m_pcCurrentModule )
{
m_pcCurrentModule->m_pcAction->setChecked( false );
m_pcCurrentModule->destroy();
m_pcCurrentModule = NULL;
}
}
bool SubWindowHandle::loadFile( const QString &fileName )
{
ConfigureFormatDialog formatDialog( this );
m_pCurrStream = new InputStream;
if( m_pCurrStream->needFormatDialog( fileName ) )
{
if( formatDialog.exec() == QDialog::Rejected )
@@ -166,7 +172,7 @@ Void SubWindowHandle::refreshFrame()
}
else
{
FrameToQImage( m_pCurrStream->getFrame( (PlaYUVerFrame*) NULL ) );
FrameToQImage( m_pCurrStream->getFrame() );
}
m_cViewArea->setImage( QPixmap::fromImage( *m_pCurrFrameQImage ) );
}
+4 -4
View File
@@ -632,12 +632,12 @@ void plaYUVerApp::setActiveSubWindow( QWidget *window )
void plaYUVerApp::updatePixelValueStatusBar(const QPoint & pos, InputStream* stream)
{
Pel luma, chromaU, chromaV;
Pel luma, chromaU = 0, chromaV = 0;
Int iWidth, iHeight;
Int posX = pos.x(), posY = pos.y();
QString strPixel;
QString strStatus = QString("(%1,%2) ").arg(posX).arg(posY);
PlaYUVerFrame *curFrame = stream->getCurrentFrame();
PlaYUVerFrame *curFrame = stream->getFrame();
iWidth = stream->getWidth();
iHeight = stream->getHeight();
@@ -645,8 +645,8 @@ void plaYUVerApp::updatePixelValueStatusBar(const QPoint & pos, InputStream* str
if( (posX<iWidth) && (posX>=0) && (posY<iHeight) && (posY>=0) )
{
luma = curFrame->getPixelValueFromYUV(pos, LUMA);
chromaU = curFrame->getPixelValueFromYUV(pos, CHROMA_U);
chromaV = curFrame->getPixelValueFromYUV(pos, CHROMA_V);
//chromaU = curFrame->getPixelValueFromYUV(pos, CHROMA_U);
//chromaV = curFrame->getPixelValueFromYUV(pos, CHROMA_V);
strPixel = QString("Y: %1 U: %2 V: %3").arg(luma).arg(chromaU).arg(chromaV);
}
else