Enabled wmf plugin on Windows again
Change-Id: Ia1fe3ef6ec8f70888c7beb390678935ad9995a90 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
@@ -14,7 +14,7 @@ win32 {
|
|||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
contains(config_test_directshow, yes): SUBDIRS += directshow
|
contains(config_test_directshow, yes): SUBDIRS += directshow
|
||||||
# contains(config_test_wmf, yes) : SUBDIRS += wmf
|
contains(config_test_wmf, yes) : SUBDIRS += wmf
|
||||||
}
|
}
|
||||||
|
|
||||||
unix:!mac {
|
unix:!mac {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "evr9videowindowcontrol.h"
|
#include "evr9videowindowcontrol.h"
|
||||||
|
#include <QtWidgets/qwidget.h>
|
||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
@@ -106,7 +107,7 @@ void Evr9VideoWindowControl::setWinId(WId id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_displayControl) {
|
if (m_displayControl) {
|
||||||
m_displayControl->SetVideoWindow(m_windowId);
|
m_displayControl->SetVideoWindow(HWND(m_windowId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +171,7 @@ void Evr9VideoWindowControl::repaint()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PAINTSTRUCT paint;
|
PAINTSTRUCT paint;
|
||||||
if (HDC dc = ::BeginPaint(m_windowId, &paint)) {
|
if (HDC dc = ::BeginPaint(HWND(m_windowId), &paint)) {
|
||||||
HPEN pen = ::CreatePen(PS_SOLID, 1, m_windowColor);
|
HPEN pen = ::CreatePen(PS_SOLID, 1, m_windowColor);
|
||||||
HBRUSH brush = ::CreateSolidBrush(m_windowColor);
|
HBRUSH brush = ::CreateSolidBrush(m_windowColor);
|
||||||
::SelectObject(dc, pen);
|
::SelectObject(dc, pen);
|
||||||
@@ -185,7 +186,7 @@ void Evr9VideoWindowControl::repaint()
|
|||||||
|
|
||||||
::DeleteObject(pen);
|
::DeleteObject(pen);
|
||||||
::DeleteObject(brush);
|
::DeleteObject(brush);
|
||||||
::EndPaint(m_windowId, &paint);
|
::EndPaint(HWND(m_windowId), &paint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ QVariant MFMetaDataControl::metaData(const QString &key) const
|
|||||||
if (m_content)
|
if (m_content)
|
||||||
hr = m_content->GetValue(m_commonKeys[index], &var);
|
hr = m_content->GetValue(m_commonKeys[index], &var);
|
||||||
else if (m_metaData)
|
else if (m_metaData)
|
||||||
hr = m_metaData->GetProperty(m_commonNames[index].utf16(), &var);
|
hr = m_metaData->GetProperty(reinterpret_cast<LPCWSTR>(m_commonNames[index].utf16()), &var);
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
value = convertValue(var);
|
value = convertValue(var);
|
||||||
@@ -98,7 +98,7 @@ QVariant MFMetaDataControl::convertValue(const PROPVARIANT& var) const
|
|||||||
//add more later if necessary
|
//add more later if necessary
|
||||||
switch (var.vt) {
|
switch (var.vt) {
|
||||||
case VT_LPWSTR:
|
case VT_LPWSTR:
|
||||||
value = QString::fromUtf16(var.pwszVal);
|
value = QString::fromUtf16(reinterpret_cast<const ushort*>(var.pwszVal));
|
||||||
break;
|
break;
|
||||||
case VT_UI4:
|
case VT_UI4:
|
||||||
value = uint(var.ulVal);
|
value = uint(var.ulVal);
|
||||||
@@ -133,8 +133,6 @@ void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMed
|
|||||||
m_availableMetaDatas.clear();
|
m_availableMetaDatas.clear();
|
||||||
m_commonKeys.clear();
|
m_commonKeys.clear();
|
||||||
m_commonNames.clear();
|
m_commonNames.clear();
|
||||||
m_extendedMetaDatas.clear();
|
|
||||||
m_extendedKeys.clear();
|
|
||||||
|
|
||||||
if (SUCCEEDED(MFGetService(mediaSource, MF_PROPERTY_HANDLER_SERVICE, IID_PPV_ARGS(&m_content)))) {
|
if (SUCCEEDED(MFGetService(mediaSource, MF_PROPERTY_HANDLER_SERVICE, IID_PPV_ARGS(&m_content)))) {
|
||||||
DWORD cProps;
|
DWORD cProps;
|
||||||
@@ -196,9 +194,9 @@ void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMed
|
|||||||
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Copyright);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Copyright);
|
||||||
//TODO: add more common keys
|
//TODO: add more common keys
|
||||||
} else {
|
} else {
|
||||||
m_availableMetaDatas.push_back(QString::fromUtf16(sName));
|
m_availableMetaDatas.push_back(QString::fromUtf16(reinterpret_cast<const ushort*>(sName)));
|
||||||
}
|
}
|
||||||
m_commonNames.push_back(QString::fromUtf16(sName));
|
m_commonNames.push_back(QString::fromUtf16(reinterpret_cast<const ushort*>(sName)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PropVariantClear(&varNames);
|
PropVariantClear(&varNames);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
|
|
||||||
#include "mfplayercontrol.h"
|
#include "mfplayercontrol.h"
|
||||||
#ifndef Q_WS_SIMULATOR
|
#if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
|
||||||
#include "evr9videowindowcontrol.h"
|
#include "evr9videowindowcontrol.h"
|
||||||
#endif
|
#endif
|
||||||
#include "mfvideorenderercontrol.h"
|
#include "mfvideorenderercontrol.h"
|
||||||
|
|||||||
@@ -18,3 +18,6 @@ HEADERS += wmfserviceplugin.h
|
|||||||
SOURCES += wmfserviceplugin.cpp
|
SOURCES += wmfserviceplugin.cpp
|
||||||
|
|
||||||
include (player/player.pri)
|
include (player/player.pri)
|
||||||
|
|
||||||
|
OTHER_FILES += \
|
||||||
|
wmf.json
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER
|
#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER
|
||||||
#include "mfplayerservice.h"
|
#include "mfplayerservice.h"
|
||||||
#endif
|
#endif
|
||||||
#include <qmediaserviceprovider.h>
|
|
||||||
|
|
||||||
QMediaService* WMFServicePlugin::create(QString const& key)
|
QMediaService* WMFServicePlugin::create(QString const& key)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user