Modified AVI RIFF viewer code to allow for multiple instances of the window.
This commit is contained in:
parent
c799d3f11e
commit
a290718962
|
@ -37,15 +37,14 @@
|
||||||
#include "Qt/ConsoleUtilities.h"
|
#include "Qt/ConsoleUtilities.h"
|
||||||
|
|
||||||
static bool showSizeHex = true;
|
static bool showSizeHex = true;
|
||||||
static AviRiffViewerDialog *win = NULL;
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
static int riffWalkCallback( int type, long long int fpos, const char *fourcc, size_t size, void *userData )
|
static int riffWalkCallback( int type, long long int fpos, const char *fourcc, size_t size, void *userData )
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if ( win )
|
if ( userData )
|
||||||
{
|
{
|
||||||
ret = win->riffWalkCallback( type, fpos, fourcc, size );
|
ret = static_cast <AviRiffViewerDialog*>(userData)->riffWalkCallback( type, fpos, fourcc, size );
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +60,6 @@ AviRiffViewerDialog::AviRiffViewerDialog(QWidget *parent)
|
||||||
QPushButton *closeButton;
|
QPushButton *closeButton;
|
||||||
QTreeWidgetItem *item;
|
QTreeWidgetItem *item;
|
||||||
|
|
||||||
win = this;
|
|
||||||
avi = NULL;
|
avi = NULL;
|
||||||
lastChunk = NULL;
|
lastChunk = NULL;
|
||||||
memset( strhType, 0, sizeof(strhType) );
|
memset( strhType, 0, sizeof(strhType) );
|
||||||
|
@ -121,7 +119,6 @@ AviRiffViewerDialog::~AviRiffViewerDialog(void)
|
||||||
{
|
{
|
||||||
delete avi; avi = NULL;
|
delete avi; avi = NULL;
|
||||||
}
|
}
|
||||||
win = NULL;
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void AviRiffViewerDialog::closeEvent(QCloseEvent *event)
|
void AviRiffViewerDialog::closeEvent(QCloseEvent *event)
|
||||||
|
|
Loading…
Reference in New Issue