WinRT: fix namespaced build

Change-Id: I06b18e2a1318bda826befde52ee1fd874e25dd47
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
Joerg Bornemann
2015-06-03 14:43:13 +02:00
committed by Jani Heikkinen
parent 00789e7d4e
commit f93f4e3daa
13 changed files with 39 additions and 13 deletions

View File

@@ -56,7 +56,7 @@
using namespace Microsoft::WRL; using namespace Microsoft::WRL;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
#define BREAK_IF_FAILED(msg) RETURN_IF_FAILED(msg, break) #define BREAK_IF_FAILED(msg) RETURN_IF_FAILED(msg, break)
#define CONTINUE_IF_FAILED(msg) RETURN_IF_FAILED(msg, continue) #define CONTINUE_IF_FAILED(msg) RETURN_IF_FAILED(msg, continue)
@@ -408,3 +408,5 @@ void QWinRTAbstractVideoRendererControl::present()
QVideoFrame frame(d->videoBuffer, d->format.frameSize(), d->format.pixelFormat()); QVideoFrame frame(d->videoBuffer, d->format.frameSize(), d->format.pixelFormat());
d->surface->present(frame); d->surface->present(frame);
} }
QT_END_NAMESPACE

View File

@@ -67,7 +67,7 @@ using namespace ABI::Windows::Media::Devices;
using namespace ABI::Windows::Media::MediaProperties; using namespace ABI::Windows::Media::MediaProperties;
using namespace ABI::Windows::Storage::Streams; using namespace ABI::Windows::Storage::Streams;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
#define RETURN_VOID_AND_EMIT_ERROR(msg) \ #define RETURN_VOID_AND_EMIT_ERROR(msg) \
if (FAILED(hr)) { \ if (FAILED(hr)) { \
@@ -833,3 +833,5 @@ HRESULT QWinRTCameraControl::onRecordLimitationExceeded(IMediaCapture *)
setState(QCamera::LoadedState); setState(QCamera::LoadedState);
return S_OK; return S_OK;
} }
QT_END_NAMESPACE

View File

@@ -64,7 +64,7 @@ using namespace ABI::Windows::Media::MediaProperties;
using namespace ABI::Windows::Storage::Streams; using namespace ABI::Windows::Storage::Streams;
using namespace ABI::Windows::Graphics::Imaging; using namespace ABI::Windows::Graphics::Imaging;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
#define wchar(str) reinterpret_cast<const wchar_t *>(str.utf16()) #define wchar(str) reinterpret_cast<const wchar_t *>(str.utf16())
@@ -273,3 +273,5 @@ HRESULT QWinRTCameraImageCaptureControl::onCaptureCompleted(IAsyncAction *asyncI
return S_OK; return S_OK;
} }
QT_END_NAMESPACE

View File

@@ -37,7 +37,7 @@
#include "qwinrtcamerainfocontrol.h" #include "qwinrtcamerainfocontrol.h"
#include "qwinrtvideodeviceselectorcontrol.h" #include "qwinrtvideodeviceselectorcontrol.h"
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
QWinRTCameraInfoControl::QWinRTCameraInfoControl(QObject *parent) QWinRTCameraInfoControl::QWinRTCameraInfoControl(QObject *parent)
: QCameraInfoControl(parent) : QCameraInfoControl(parent)
@@ -53,3 +53,5 @@ int QWinRTCameraInfoControl::cameraOrientation(const QString &deviceName) const
{ {
return QWinRTVideoDeviceSelectorControl::cameraOrientation(deviceName); return QWinRTVideoDeviceSelectorControl::cameraOrientation(deviceName);
} }
QT_END_NAMESPACE

View File

@@ -45,7 +45,7 @@
#include <QtMultimedia/QVideoRendererControl> #include <QtMultimedia/QVideoRendererControl>
#include <QtMultimedia/QVideoDeviceSelectorControl> #include <QtMultimedia/QVideoDeviceSelectorControl>
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
class QWinRTCameraServicePrivate class QWinRTCameraServicePrivate
{ {
@@ -97,3 +97,5 @@ void QWinRTCameraService::releaseControl(QMediaControl *control)
{ {
Q_UNUSED(control); Q_UNUSED(control);
} }
QT_END_NAMESPACE

View File

@@ -45,7 +45,7 @@
#include <wrl.h> #include <wrl.h>
using namespace Microsoft::WRL; using namespace Microsoft::WRL;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
class D3DVideoBlitter class D3DVideoBlitter
{ {
@@ -210,3 +210,5 @@ void QWinRTCameraVideoRendererControl::discardBuffers()
for (ComPtr<IMF2DBuffer> &buffer : d->buffers) for (ComPtr<IMF2DBuffer> &buffer : d->buffers)
buffer.Reset(); buffer.Reset();
} }
QT_END_NAMESPACE

View File

@@ -55,7 +55,7 @@
#include <wrl.h> #include <wrl.h>
using namespace Microsoft::WRL; using namespace Microsoft::WRL;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
#define QT_WINRT_MEDIAPLAYER_STREAM_ID "__qtmultimedia_winrt_player_stream" #define QT_WINRT_MEDIAPLAYER_STREAM_ID "__qtmultimedia_winrt_player_stream"
@@ -892,3 +892,5 @@ void QWinRTMediaPlayerControl::finishRead()
Q_D(QWinRTMediaPlayerControl); Q_D(QWinRTMediaPlayerControl);
d->streamProvider->finishRead(); d->streamProvider->finishRead();
} }
QT_END_NAMESPACE

View File

@@ -41,7 +41,7 @@
struct IMFMediaEngineClassFactory; struct IMFMediaEngineClassFactory;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
class QVideoRendererControl; class QVideoRendererControl;
@@ -96,4 +96,6 @@ private:
Q_DECLARE_PRIVATE(QWinRTMediaPlayerControl) Q_DECLARE_PRIVATE(QWinRTMediaPlayerControl)
}; };
QT_END_NAMESPACE
#endif // QWINRTMEDIAPLAYERCONTROL_H #endif // QWINRTMEDIAPLAYERCONTROL_H

View File

@@ -47,7 +47,7 @@
using namespace Microsoft::WRL; using namespace Microsoft::WRL;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
class QWinRTMediaPlayerServicePrivate class QWinRTMediaPlayerServicePrivate
{ {
@@ -104,3 +104,5 @@ void QWinRTMediaPlayerService::releaseControl(QMediaControl *control)
if (control == d->player) if (control == d->player)
d->player->deleteLater(); d->player->deleteLater();
} }
QT_END_NAMESPACE

View File

@@ -54,7 +54,7 @@
#include <wrl.h> #include <wrl.h>
using namespace Microsoft::WRL; using namespace Microsoft::WRL;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
template <typename T> template <typename T>
class D3DDeviceLocker class D3DDeviceLocker
@@ -149,3 +149,5 @@ bool QWinRTPlayerRendererControl::render(ID3D11Texture2D *texture)
RETURN_FALSE_IF_FAILED("Failed to transfer video frame to DXGI surface"); RETURN_FALSE_IF_FAILED("Failed to transfer video frame to DXGI surface");
return true; return true;
} }
QT_END_NAMESPACE

View File

@@ -42,7 +42,7 @@
#include "qwinrtcameraservice.h" #include "qwinrtcameraservice.h"
#include "qwinrtvideodeviceselectorcontrol.h" #include "qwinrtvideodeviceselectorcontrol.h"
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
QMediaService *QWinRTServicePlugin::create(QString const &key) QMediaService *QWinRTServicePlugin::create(QString const &key)
{ {
@@ -102,3 +102,5 @@ QByteArray QWinRTServicePlugin::defaultDevice(const QByteArray &service) const
return QByteArray(); return QByteArray();
} }
QT_END_NAMESPACE

View File

@@ -39,7 +39,7 @@
#include <QtMultimedia/QMediaServiceProviderPlugin> #include <QtMultimedia/QMediaServiceProviderPlugin>
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
class QWinRTServicePlugin : public QMediaServiceProviderPlugin class QWinRTServicePlugin : public QMediaServiceProviderPlugin
, public QMediaServiceFeaturesInterface , public QMediaServiceFeaturesInterface
@@ -68,4 +68,6 @@ public:
QByteArray defaultDevice(const QByteArray &service) const Q_DECL_OVERRIDE; QByteArray defaultDevice(const QByteArray &service) const Q_DECL_OVERRIDE;
}; };
QT_END_NAMESPACE
#endif // QWINRTSERVICEPLUGIN_H #endif // QWINRTSERVICEPLUGIN_H

View File

@@ -55,7 +55,7 @@ typedef ITypedEventHandler<DeviceWatcher *, DeviceInformation *> DeviceInformati
typedef ITypedEventHandler<DeviceWatcher *, DeviceInformationUpdate *> DeviceInformationUpdateHandler; typedef ITypedEventHandler<DeviceWatcher *, DeviceInformationUpdate *> DeviceInformationUpdateHandler;
typedef ITypedEventHandler<DeviceWatcher *, IInspectable *> DeviceEnumerationCompletedHandler; typedef ITypedEventHandler<DeviceWatcher *, IInspectable *> DeviceEnumerationCompletedHandler;
QT_USE_NAMESPACE QT_BEGIN_NAMESPACE
static QString deviceName(IDeviceInformation *device) static QString deviceName(IDeviceInformation *device)
{ {
@@ -386,3 +386,5 @@ void QWinRTVideoDeviceSelectorControl::setSelectedDevice(int index)
emit selectedDeviceChanged(deviceName(d->selectedDevice)); emit selectedDeviceChanged(deviceName(d->selectedDevice));
} }
} }
QT_END_NAMESPACE