Commit d05d676c authored by unknown's avatar unknown

Fixes Win32 build (using some temporary hacks)

parent ac8b11b3
......@@ -55,6 +55,10 @@ void Module::initInternalPtr()
bool Module::initialize()
{
#ifdef Q_WS_WIN
qDebug() << "Loading of modules is currently disabled under Windows.";
return false;
#else
m_entryPoint = reinterpret_cast<vlmc_module_entrypoint_t>( m_moduleInstance->resolve( "vlmc_module_entrypoint" ) );
if ( m_entryPoint == NULL )
{
......@@ -69,6 +73,7 @@ bool Module::initialize()
return false;
}
return true;
#endif
}
bool Module::isLibrary( const QString& fileName )
......
......@@ -22,6 +22,11 @@
#include <QtDebug>
#ifdef Q_WS_WIN
// Used for Sleep()
#include <Windows.h>
#endif
#include "ClipWorkflow.h"
int g_debugId = 0;
......@@ -191,7 +196,11 @@ ClipWorkflow::State ClipWorkflow::getState() const
void ClipWorkflow::startRender()
{
while ( isReady() == false )
#ifdef Q_WS_WIN
Sleep( 1 );
#else
usleep( 50 );
#endif
m_mediaPlayer->play();
setState( Rendering );
}
......
......@@ -22,6 +22,11 @@
#include <QtDebug>
#ifdef Q_WS_WIN
// Used for Sleep()
#include <Windows.h>
#endif
#include "TrackWorkflow.h"
TrackWorkflow::TrackWorkflow( unsigned int trackId ) :
......@@ -79,7 +84,11 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
cw->getStateLock()->unlock();
while ( cw->isRendering() == true )
{
#ifdef Q_WS_WIN
Sleep( 1 );
#else
usleep( 100 );
#endif
}
//This way we can trigger the appropriate if just below.
//by restoring the initial state of the function, and just pretend that
......@@ -168,7 +177,11 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
{
cw->getStateLock()->unlock();
while ( cw->isRendering() == true )
#ifdef Q_WS_WIN
Sleep( 1 );
#else
usleep( 100 );
#endif
cw->queryStateChange( ClipWorkflow::Stopping );
cw->wake();
cw->stop();
......@@ -177,7 +190,11 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
{
cw->getStateLock()->unlock();
while ( cw->isReady() == false )
#ifdef Q_WS_WIN
Sleep( 1 );
#else
usleep( 20 );
#endif
cw->stop();
}
else
......
......@@ -28,6 +28,7 @@
#include <QSlider>
#include "MainWindow.h"
#include "MediaListWidget.h"
#include "LibraryWidget.h"
#include "Library.h"
#include "Timeline.h"
......
......@@ -23,6 +23,11 @@
#include <QtDebug>
#include <QThread>
#ifdef Q_WS_WIN
// Used for Sleep()
#include <Windows.h>
#endif
#include "RenderPreviewWidget.h"
#include "Timeline.h"
......@@ -127,7 +132,11 @@ void RenderPreviewWidget::nextFrame()
bool framePlayed = false;
while ( framePlayed == false )
{
#ifdef Q_WS_WIN
Sleep( 1 );
#else
usleep( 50 );
#endif
QReadLocker lock( m_framePlayedLock );
framePlayed = m_framePlayed;
}
......
......@@ -189,7 +189,7 @@
<customwidget>
<class>MediaListWidget</class>
<extends>QListWidget</extends>
<header>src/gui/MediaListWidget.h</header>
<header>MediaListWidget.h</header>
</customwidget>
</customwidgets>
<resources/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment