On Wednesday, May 16, 2012 19:50:19 Thiago Macieira wrote: > [cross-posting to kde-multimedia] > > On quarta-feira, 16 de maio de 2012 18.55.52, Olivier Goffart wrote: > > Hi, > > > > Why do we mantain an outdated fork of phonon in qt5.git > > I am talking about the qtphonon repository. > > > > The Phonon team maintains phonon under the KDE umbrela, and the qtphonon > > repository is years behind. > > It was created because of the modularisation. It was expected that the > Phonon developers would pick it up. At one point, they indicated they'd > like to use the Qt infrastructure, instead of the KDE infrastructure. > Clearly, they've changed their minds. > > > Is there a point taking time to still update this repository to make it > > work with Qt5? > > > > Should we not drop it and redirect to the KDE one instead? > > I believe so. I don't think we can afford to have competing efforts in > developing Phonon. The maintainership for it was turned over to the current > developers inside KDE and they get to decide which infrastructure they want > to use. > > As they have opted for the KDE infrastructure, I'd say we should remove the > submodule link from qt5.git. > > > The phonon from KDE requires cmake, and is AFAIK not ported yet to Qt5.
Note that it's at least trivial to build with Qt5 I haven't tried to run anything with it though. > > > > But I don't think it makes sens for qt-project to release that outdated > > version of phonon with Qt5. > > Well, the qtphonon.git repository does compile with Qt 5, and our Qt 5 > compatibility promise would require us to release at least the API that was > available in Qt 4. I agree with Olivier that we should consider the qtphonon.git repo obsolete and remove it. > > That said, it's really up to the Phonon maintainers to decide what to do. If > they have different plans, there's little we can do. Thanks, -- Stephen Kelly <[email protected]> | Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions
diff --git a/cmake/FindPhononInternal.cmake b/cmake/FindPhononInternal.cmake
index 2bad949..46727e8 100644
--- a/cmake/FindPhononInternal.cmake
+++ b/cmake/FindPhononInternal.cmake
@@ -65,7 +65,11 @@ endif (${QT_MIN_VERSION} VERSION_LESS "4.6.0")
# # Qt libs and are flexible regarding the install location of Qt under Windows:
# set(QT_USE_IMPORTED_TARGETS TRUE)
-find_package(Qt4 ${_REQ_STRING_KDE4})
+find_package(ECM 0.0.4 REQUIRED)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+
+find_package(Qt5Transitional REQUIRED Core Gui DBus)
# TODO: do we want this here?
if (NOT QT_QTDBUS_FOUND)
diff --git a/phonon/CMakeLists.txt b/phonon/CMakeLists.txt
index 94398fc..2cafe9e 100644
--- a/phonon/CMakeLists.txt
+++ b/phonon/CMakeLists.txt
@@ -1,5 +1,5 @@
if (PHONON_BUILD_EXPERIMENTAL)
- add_subdirectory(experimental)
+# add_subdirectory(experimental)
endif (PHONON_BUILD_EXPERIMENTAL)
macro_optional_find_package(PulseAudio 0.9.15)
diff --git a/phonon/globalstatic_p.h b/phonon/globalstatic_p.h
index cf80512..ff25621 100644
--- a/phonon/globalstatic_p.h
+++ b/phonon/globalstatic_p.h
@@ -245,8 +245,19 @@ class CleanUpGlobalStatic
*
* @ingroup KDEMacros
*/
+
+template<typename T>
+struct PointerHack : QBasicAtomicPointer<T>
+{
+ PointerHack() : QBasicAtomicPointer<T>() {}
+ PointerHack(T value) : QBasicAtomicPointer<T>(value) {}
+ operator T*() { return this->load(); }
+
+ PointerHack& operator=(T* t) { this->store(t); return *this; }
+};
+
#define PHONON_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS) \
-static QBasicAtomicPointer<TYPE > _k_static_##NAME = Q_BASIC_ATOMIC_INITIALIZER(0); \
+static PointerHack<TYPE > _k_static_##NAME; \
static bool _k_static_##NAME##_destroyed; \
static struct PHONON_GLOBAL_STATIC_STRUCT_NAME(NAME) \
{ \
diff --git a/phonon/mediasource.cpp b/phonon/mediasource.cpp
index e551c26..7b775aa 100644
--- a/phonon/mediasource.cpp
+++ b/phonon/mediasource.cpp
@@ -28,7 +28,7 @@
#include <QtCore/QFileInfo>
#include <QtCore/QFile>
-#include <QtCore/QFSFileEngine>
+// #include <QtCore/QFSFileEngine>
QT_BEGIN_NAMESPACE
@@ -48,30 +48,30 @@ MediaSource::MediaSource()
MediaSource::MediaSource(const QString &filename)
: d(new MediaSourcePrivate(LocalFile))
{
- const QFileInfo fileInfo(filename);
- if (fileInfo.exists()) {
- bool localFs = QAbstractFileEngine::LocalDiskFlag & QFSFileEngine(filename).fileFlags(QAbstractFileEngine::LocalDiskFlag);
- if (localFs && !filename.startsWith(QLatin1String(":/")) && !filename.startsWith(QLatin1String("qrc://"))) {
- d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
- } else {
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
- // it's a Qt resource -> use QFile
- d->type = Stream;
- d->ioDevice = new QFile(filename);
- d->setStream(new IODeviceStream(d->ioDevice, d->ioDevice));
- d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
-#else
- d->type = Invalid;
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
- }
- } else {
- d->url = filename;
- if (d->url.isValid()) {
- d->type = Url;
- } else {
- d->type = Invalid;
- }
- }
+// const QFileInfo fileInfo(filename);
+// if (fileInfo.exists()) {
+// bool localFs = QAbstractFileEngine::LocalDiskFlag & QFSFileEngine(filename).fileFlags(QAbstractFileEngine::LocalDiskFlag);
+// if (localFs && !filename.startsWith(QLatin1String(":/")) && !filename.startsWith(QLatin1String("qrc://"))) {
+// d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
+// } else {
+// #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
+// // it's a Qt resource -> use QFile
+// d->type = Stream;
+// d->ioDevice = new QFile(filename);
+// d->setStream(new IODeviceStream(d->ioDevice, d->ioDevice));
+// d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
+// #else
+// d->type = Invalid;
+// #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
+// }
+// } else {
+// d->url = filename;
+// if (d->url.isValid()) {
+// d->type = Url;
+// } else {
+// d->type = Invalid;
+// }
+// }
}
MediaSource::MediaSource(const QUrl &url)
diff --git a/phonon/objectdescriptionmodel.cpp b/phonon/objectdescriptionmodel.cpp
index 97a8b5d..f84987e 100644
--- a/phonon/objectdescriptionmodel.cpp
+++ b/phonon/objectdescriptionmodel.cpp
@@ -69,27 +69,27 @@ namespace Phonon
{
template<> const QMetaObject ObjectDescriptionModel<AudioOutputDeviceType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioOutputDeviceType,
+ { &QAbstractListModel::staticMetaObject, 0,
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<AudioCaptureDeviceType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioCaptureDeviceType,
+ { &QAbstractListModel::staticMetaObject, 0,
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<VideoCaptureDeviceType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_VideoCaptureDeviceType,
+ { &QAbstractListModel::staticMetaObject, 0,
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<EffectType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_EffectType,
+ { &QAbstractListModel::staticMetaObject, 0,
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<AudioChannelType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioChannelType,
+ { &QAbstractListModel::staticMetaObject, 0,
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<SubtitleType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_SubtitleType,
+ { &QAbstractListModel::staticMetaObject, 0,
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
/*template<> const QMetaObject ObjectDescriptionModel<VideoOutputDeviceType>::staticMetaObject = {
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
