Commit 8254e807 authored by Craig Watson's avatar Craig Watson

Fixed compilation on Windows;

The project didn't compile on Windows.. list of modifications:

- Added essential changes that hadn't been committed / pushed (Qt4->Qt5
changes; other misc. changes by Abdel)
- Temporarily disabled podcasts, as the modules don't compile with Qt5.2/
5.5

Currently, the application compiles on Windows, with MSVC2010 32-bit
parent ce521ede
......@@ -124,6 +124,8 @@ win32 {
system(echo "$$LONG_VERSION" > $$BUILD_DIR/longversion)
system(echo "$$SVN_VERSION" > $$BUILD_DIR/svnversion)
DEFINES += NOMINMAX # avoids compilation error in qdatetime.h
}
macx {
......
......@@ -646,7 +646,7 @@ bool UBApplication::isFromWeb(QString url)
{
bool res = true;
if( url.startsWith("uniboardTool://") ||
if( url.startsWith("OpenboardTool://") ||
url.startsWith("file://") ||
url.startsWith("/")){
res = false;
......
......@@ -27,6 +27,7 @@
#include "UBWindowCaptureDelegate_win.h"
#include <windows.h>
#include <QDialog>
#include "core/memcheck.h"
......@@ -79,7 +80,7 @@ int UBWindowCaptureDelegate::execute()
mutex.lock();
sleep.wait(&mutex, 200);
mutex.unlock();
mCapturedPixmap = QPixmap::grabWindow(mCurrentWindow);
mCapturedPixmap = QPixmap::grabWindow((WId)mCurrentWindow);
return QDialog::Accepted;
}
else
......
......@@ -126,11 +126,12 @@ void UBPlatformUtils::setDesktopMode(bool desktop)
}
void UBPlatformUtils::setWindowNonActivableFlag(QWidget* widget, bool nonAcivable)
{
{/*
long exStyle = (nonAcivable) ? GetWindowLong(widget->winId(), GWL_EXSTYLE) | WS_EX_NOACTIVATE
: GetWindowLong(widget->winId(), GWL_EXSTYLE) & ~WS_EX_NOACTIVATE;
SetWindowLong(widget->winId(), GWL_EXSTYLE, exStyle);
*/
}
#define KEYBTDECL(s1, s2, clSwitch) KEYBT(s1, s2, clSwitch, 0, 0, KEYCODE(s1), KEYCODE(s2))
......
......@@ -47,7 +47,7 @@ UBRubberBand::UBRubberBand(Shape s, QWidget * p)
customStyle = NULL;
#ifdef Q_OS_WIN
customStyle = new QWindowsXPStyle();
customStyle = QStyleFactory::create("windows");
#elif defined(Q_OS_OSX)
customStyle = QStyleFactory::create("macintosh");
#elif defined(Q_OS_LINUX)
......
......@@ -57,8 +57,8 @@
#ifdef Q_OS_WIN
#include "windowsmedia/UBWindowsMediaVideoEncoder.h"
#include "windowsmedia/UBWaveRecorder.h"
// #include "windowsmedia/UBWindowsMediaVideoEncoder.h"
// #include "windowsmedia/UBWaveRecorder.h"
#elif defined(Q_OS_OSX)
#include "quicktime/UBQuickTimeVideoEncoder.h"
#include "quicktime/UBAudioQueueRecorder.h"
......@@ -304,7 +304,7 @@ void UBPodcastController::start()
applicationMainModeChanged(UBApplication::applicationController->displayMode());
#ifdef Q_OS_WIN
mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop
//mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop
#elif defined(Q_OS_OSX)
mVideoEncoder = new UBQuickTimeVideoEncoder(this); //deleted on stop
#endif
......@@ -794,7 +794,7 @@ QStringList UBPodcastController::audioRecordingDevices()
QStringList devices;
#ifdef Q_OS_WIN
devices = UBWaveRecorder::waveInDevices();
//devices = UBWaveRecorder::waveInDevices();
#elif defined(Q_OS_OSX)
devices = UBAudioQueueRecorder::waveInDevices();
#endif
......
......@@ -13,14 +13,14 @@ SOURCES += src/podcast/UBPodcastController.cpp \
win32 {
SOURCES += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.cpp \
src/podcast/windowsmedia/UBWindowsMediaFile.cpp \
src/podcast/windowsmedia/UBWaveRecorder.cpp
HEADERS += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.h \
src/podcast/windowsmedia/UBWindowsMediaFile.h \
src/podcast/windowsmedia/UBWaveRecorder.h
}
# SOURCES += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.cpp \
# src/podcast/windowsmedia/UBWindowsMediaFile.cpp \
# src/podcast/windowsmedia/UBWaveRecorder.cpp
#
# HEADERS += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.h \
# src/podcast/windowsmedia/UBWindowsMediaFile.h \
# src/podcast/windowsmedia/UBWaveRecorder.h
}
macx {
......
......@@ -63,7 +63,7 @@ bool UBWaveRecorder::init(const QString& waveInDeviceName)
{
if (waveInGetDevCaps(i, &caps, sizeof(caps)) == MMSYSERR_NOERROR)
{
QString deviceName = QString:: fromUtf16(caps.szPname);
QString deviceName = QString::fromWCharArray(caps.szPname);
if (deviceName == waveInDeviceName)
{
......@@ -237,7 +237,7 @@ QStringList UBWaveRecorder::waveInDevices()
{
if (waveInGetDevCaps(i, &caps, sizeof(caps)) == MMSYSERR_NOERROR)
{
devices << QString::fromUtf16(caps.szPname);
devices << QString::fromWCharArray(caps.szPname);
}
else
{
......@@ -253,7 +253,7 @@ QStringList UBWaveRecorder::waveInDevices()
if (mixerGetDevCaps(i, &caps, sizeof(caps)) == MMSYSERR_NOERROR)
{
qDebug() << "Mixer: " << QString::fromUtf16(caps.szPname);
qDebug() << "Mixer: " << QString::fromWCharArray(caps.szPname);
}
}
......
......@@ -383,7 +383,7 @@ bool UBWindowsMediaFile::appendVideoFrame(const QImage& pImage, long mstimestamp
INSSBuffer *sampleBuffer = 0;
if (FAILED(mWMWriter->AllocateSample(pImage.numBytes(), &sampleBuffer)))
if (FAILED(mWMWriter->AllocateSample(pImage.byteCount(), &sampleBuffer)))
{
setLastErrorMessage("Unable to allocate memory for new video frame");
return false;
......@@ -400,7 +400,7 @@ bool UBWindowsMediaFile::appendVideoFrame(const QImage& pImage, long mstimestamp
}
const uchar * imageBuffer = pImage.bits();
memcpy((void*) rawBuffer, imageBuffer, pImage.numBytes());
memcpy((void*) rawBuffer, imageBuffer, pImage.byteCount());
HRESULT hrWriteSample = mWMWriter->WriteSample(mVideoInputIndex, msToSampleTime(mstimestamp), 0, sampleBuffer);
......
......@@ -30,8 +30,9 @@
#include <QtCore>
#include <wmsdk.h>
#include <wmsbuffer.h>
#include <wmsdk.h>
class UBWindowsMediaFile : public QObject
{
......
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