Merge branch 'jfmcarreira-dev'

e to explain why this merge is necessary,
This commit is contained in:
jfmcarreira committed 2014-03-23 16:50:20 +00:00
commit fc00a73144
4 files changed
+34 -21

No files matched your search

-9
View File
@@ -42,15 +42,6 @@
namespace plaYUVer namespace plaYUVer
{ {
#define REGISTER_MODULE(X) \
{ \
if( USE_##X ) \
{ \
X *pMod = new X(); \
appendModule( pMod ); \
} \
}
class ModulesHandle : public QObject class ModulesHandle : public QObject
{ {
Q_OBJECT Q_OBJECT
+16
View File
@@ -44,6 +44,22 @@ enum __PlaYUVerModuleTypes
VIDEO_LEVEL_MODULE, 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 typedef struct __PlaYUVerModuleDefinition
{ {
int m_pchModuleType; int m_pchModuleType;
+14 -8
View File
@@ -47,6 +47,9 @@ SubWindowHandle::SubWindowHandle( QWidget * parent ) :
m_cScrollArea->setWidget( m_cViewArea ); m_cScrollArea->setWidget( m_cViewArea );
m_cScrollArea->setWidgetResizable(true); m_cScrollArea->setWidgetResizable(true);
m_pCurrStream = new InputStream;
m_pCurrFrameQImage = NULL;
m_pcCurrentModule = NULL; m_pcCurrentModule = NULL;
m_cWindowName = QString( " " ); m_cWindowName = QString( " " );
@@ -58,19 +61,22 @@ SubWindowHandle::SubWindowHandle( QWidget * parent ) :
SubWindowHandle::~SubWindowHandle() SubWindowHandle::~SubWindowHandle()
{ {
delete m_cViewArea; delete m_cViewArea;
if( !m_pcCurrentModule ) delete m_cScrollArea;
return; delete m_pCurrStream;
m_pcCurrentModule->m_pcAction->setChecked( false ); if( m_pCurrFrameQImage )
m_pcCurrentModule->destroy(); delete m_pCurrFrameQImage;
m_pcCurrentModule = NULL; if( m_pcCurrentModule )
{
m_pcCurrentModule->m_pcAction->setChecked( false );
m_pcCurrentModule->destroy();
m_pcCurrentModule = NULL;
}
} }
bool SubWindowHandle::loadFile( const QString &fileName ) bool SubWindowHandle::loadFile( const QString &fileName )
{ {
ConfigureFormatDialog formatDialog( this ); ConfigureFormatDialog formatDialog( this );
m_pCurrStream = new InputStream;
if( m_pCurrStream->needFormatDialog( fileName ) ) if( m_pCurrStream->needFormatDialog( fileName ) )
{ {
if( formatDialog.exec() == QDialog::Rejected ) if( formatDialog.exec() == QDialog::Rejected )
@@ -166,7 +172,7 @@ Void SubWindowHandle::refreshFrame()
} }
else else
{ {
FrameToQImage( m_pCurrStream->getFrame( (PlaYUVerFrame*) NULL ) ); FrameToQImage( m_pCurrStream->getFrame() );
} }
m_cViewArea->setImage( QPixmap::fromImage( *m_pCurrFrameQImage ) ); 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) void plaYUVerApp::updatePixelValueStatusBar(const QPoint & pos, InputStream* stream)
{ {
Pel luma, chromaU, chromaV; Pel luma, chromaU = 0, chromaV = 0;
Int iWidth, iHeight; Int iWidth, iHeight;
Int posX = pos.x(), posY = pos.y(); Int posX = pos.x(), posY = pos.y();
QString strPixel; QString strPixel;
QString strStatus = QString("(%1,%2) ").arg(posX).arg(posY); QString strStatus = QString("(%1,%2) ").arg(posX).arg(posY);
PlaYUVerFrame *curFrame = stream->getCurrentFrame(); PlaYUVerFrame *curFrame = stream->getFrame();
iWidth = stream->getWidth(); iWidth = stream->getWidth();
iHeight = stream->getHeight(); iHeight = stream->getHeight();
@@ -645,8 +645,8 @@ void plaYUVerApp::updatePixelValueStatusBar(const QPoint & pos, InputStream* str
if( (posX<iWidth) && (posX>=0) && (posY<iHeight) && (posY>=0) ) if( (posX<iWidth) && (posX>=0) && (posY<iHeight) && (posY>=0) )
{ {
luma = curFrame->getPixelValueFromYUV(pos, LUMA); luma = curFrame->getPixelValueFromYUV(pos, LUMA);
chromaU = curFrame->getPixelValueFromYUV(pos, CHROMA_U); //chromaU = curFrame->getPixelValueFromYUV(pos, CHROMA_U);
chromaV = curFrame->getPixelValueFromYUV(pos, CHROMA_V); //chromaV = curFrame->getPixelValueFromYUV(pos, CHROMA_V);
strPixel = QString("Y: %1 U: %2 V: %3").arg(luma).arg(chromaU).arg(chromaV); strPixel = QString("Y: %1 U: %2 V: %3").arg(luma).arg(chromaU).arg(chromaV);
} }
else else