mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
Merge branch 'master' of https://github.com/fluxer/katie
This commit is contained in:
commit
61cb795736
15 changed files with 75 additions and 11 deletions
|
@ -515,6 +515,22 @@ if(NOT WITH_NAS OR NOT NAS_FOUND)
|
|||
katie_definition(-DQT_NO_NAS)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_PNG OR NOT PNG_FOUND)
|
||||
katie_definition(-DQT_NO_IMAGEFORMAT_PNG)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_JPEG OR NOT JPEG_FOUND)
|
||||
katie_definition(-DQT_NO_IMAGEFORMAT_JPEG)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_MNG OR NOT MNG_FOUND)
|
||||
katie_definition(-DQT_NO_IMAGEFORMAT_MNG)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_TIFF OR NOT TIFF_FOUND)
|
||||
katie_definition(-DQT_NO_IMAGEFORMAT_TIFF)
|
||||
endif()
|
||||
|
||||
# semi-shared
|
||||
include(src/shared/linguist/linguist.cmake)
|
||||
include(src/shared/bootstrap.cmake)
|
||||
|
|
|
@ -139,7 +139,7 @@ if(NOT KATIE_COMPAT EQUAL FALSE AND NOT KATIE_COMPAT EQUAL OFF)
|
|||
set(QT_QT${uppercomp}_FOUND ${KATIE_${uppercomp}_FOUND})
|
||||
set(QT_QT${uppercomp}_LIBRARY "${KATIE_${uppercomp}_LIBRARIES}")
|
||||
set(QT_QT${uppercomp}_LIBRARIES "${KATIE_${uppercomp}_LIBRARIES}")
|
||||
set(QT_QT${uppercomp}_INCLUDE_DIR "@QT_HEADERS_PATH@ ${KATIE_${uppercomp}_INCLUDES}")
|
||||
set(QT_QT${uppercomp}_INCLUDE_DIR "@QT_HEADERS_PATH@" "${KATIE_${uppercomp}_INCLUDES}")
|
||||
# TODO: component definitions
|
||||
endforeach()
|
||||
|
||||
|
|
|
@ -32,6 +32,5 @@ else()
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/egl/qegl_stub.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/egl/qeglproperties_stub.cpp
|
||||
)
|
||||
add_definitions(-DQT_NO_EGL)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -91,8 +91,6 @@ if(WITH_PNG AND PNG_FOUND)
|
|||
)
|
||||
include_directories(${PNG_INCLUDE_DIRS})
|
||||
add_definitions(${PNG_DEFINITIONS})
|
||||
else()
|
||||
add_definitions(-DQT_NO_IMAGEFORMAT_PNG)
|
||||
endif()
|
||||
|
||||
if(WITH_JPEG AND JPEG_FOUND)
|
||||
|
@ -109,8 +107,6 @@ if(WITH_JPEG AND JPEG_FOUND)
|
|||
${JPEG_LIBRARIES}
|
||||
)
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
else()
|
||||
add_definitions(-DQT_NO_IMAGEFORMAT_JPEG)
|
||||
endif()
|
||||
|
||||
if(WITH_MNG AND MNG_FOUND)
|
||||
|
@ -127,8 +123,6 @@ if(WITH_MNG AND MNG_FOUND)
|
|||
${MNG_LIBRARIES}
|
||||
)
|
||||
include_directories(${MNG_INCLUDES})
|
||||
else()
|
||||
add_definitions(-DQT_NO_IMAGEFORMAT_MNG)
|
||||
endif()
|
||||
|
||||
if(WITH_TIFF AND TIFF_FOUND)
|
||||
|
@ -145,8 +139,6 @@ if(WITH_TIFF AND TIFF_FOUND)
|
|||
${TIFF_LIBRARIES}
|
||||
)
|
||||
include_directories(${TIFF_INCLUDE_DIR})
|
||||
else()
|
||||
add_definitions(-DQT_NO_IMAGEFORMAT_TIFF)
|
||||
endif()
|
||||
|
||||
if(KATIE_PLATFORM STREQUAL "win32")
|
||||
|
|
|
@ -343,7 +343,9 @@ else()
|
|||
katie_generate_map(phonon PHONON_EXPORT)
|
||||
endif()
|
||||
katie_resources(${PHONON_SOURCES} ${PHONON_HEADERS})
|
||||
katie_resources(${PHONON_EXPERIMENTAL_HEADERS})
|
||||
if(PHONON_EXPERIMENTAL)
|
||||
katie_resources(${PHONON_EXPERIMENTAL_HEADERS})
|
||||
endif()
|
||||
katie_setup_flags()
|
||||
|
||||
add_library(KtPhonon ${KATIE_TYPE} ${PHONON_SOURCES} ${PHONON_HEADERS} ${PHONON_EXPERIMENTAL_HEADERS})
|
||||
|
|
|
@ -422,8 +422,12 @@ QDebug operator <<(QDebug dbg, const Phonon::MediaSource &source)
|
|||
}
|
||||
case MediaSource::CaptureDevice:
|
||||
case MediaSource::AudioVideoCapture:
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
dbg.nospace() << "AudioVideoCapture(A:" << source.audioCaptureDevice().name()
|
||||
<< "/V: " << source.videoCaptureDevice().name() << ")";
|
||||
#else
|
||||
dbg.nospace() << "AudioVideoCapture(A:/V: )";
|
||||
#endif
|
||||
break;
|
||||
case MediaSource::Empty:
|
||||
dbg.nospace() << "Empty()";
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#ifndef PHONON_VLC_VOLUMEFADEREFFECT_H
|
||||
#define PHONON_VLC_VOLUMEFADEREFFECT_H
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
|
||||
#include <phonon/volumefaderinterface.h>
|
||||
|
||||
#include <QtCore/QDateTime>
|
||||
|
@ -68,4 +70,6 @@ private:
|
|||
} // namespace VLC
|
||||
} // namespace Phonon
|
||||
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
||||
#endif // PHONON_VLC_VOLUMEFADEREFFECT_H
|
||||
|
|
|
@ -63,7 +63,9 @@ Backend *Backend::self;
|
|||
Backend::Backend(QObject *parent, const QVariantList &)
|
||||
: QObject(parent)
|
||||
, m_deviceManager(0)
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
, m_effectManager(0)
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
{
|
||||
self = this;
|
||||
|
||||
|
@ -135,7 +137,9 @@ Backend::Backend(QObject *parent, const QVariantList &)
|
|||
}
|
||||
|
||||
m_deviceManager = new DeviceManager(this);
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
m_effectManager = new EffectManager(this);
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
}
|
||||
|
||||
Backend::~Backend()
|
||||
|
@ -172,8 +176,10 @@ QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const
|
|||
case VideoGraphicsObjectClass:
|
||||
return new VideoGraphicsObject(parent);
|
||||
#endif
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
case EffectClass:
|
||||
return effectManager()->createEffect(args[0].toInt(), parent);
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
case VideoWidgetClass:
|
||||
return new VideoWidget(qobject_cast<QWidget *>(parent));
|
||||
// case VolumeFaderEffectClass:
|
||||
|
@ -209,6 +215,7 @@ QList<int> Backend::objectDescriptionIndexes(ObjectDescriptionType type) const
|
|||
return deviceManager()->deviceIds(type);
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
case Phonon::EffectType: {
|
||||
QList<EffectInfo> effectList = effectManager()->effects();
|
||||
for (int eff = 0; eff < effectList.size(); ++eff) {
|
||||
|
@ -216,6 +223,7 @@ QList<int> Backend::objectDescriptionIndexes(ObjectDescriptionType type) const
|
|||
}
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
case Phonon::SubtitleType: {
|
||||
list << GlobalSubtitles::instance()->globalIndexes();
|
||||
}
|
||||
|
@ -243,6 +251,7 @@ QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(ObjectDescripti
|
|||
return deviceManager()->deviceProperties(index);
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
case Phonon::EffectType: {
|
||||
const QList<EffectInfo> effectList = effectManager()->effects();
|
||||
if (index >= 0 && index <= effectList.size()) {
|
||||
|
@ -255,6 +264,7 @@ QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(ObjectDescripti
|
|||
}
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
case Phonon::SubtitleType: {
|
||||
const SubtitleDescription description = GlobalSubtitles::instance()->fromIndex(index);
|
||||
ret.insert("name", description.name());
|
||||
|
@ -293,11 +303,13 @@ bool Backend::connectNodes(QObject *source, QObject *sink)
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
VolumeFaderEffect *effect = qobject_cast<VolumeFaderEffect *>(source);
|
||||
if (effect) {
|
||||
sinkNode->connectToMediaObject(effect->mediaObject());
|
||||
return true;
|
||||
}
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
}
|
||||
|
||||
warning() << "Linking" << source->metaObject()->className() << "to" << sink->metaObject()->className() << "failed";
|
||||
|
@ -316,11 +328,13 @@ bool Backend::disconnectNodes(QObject *source, QObject *sink)
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
VolumeFaderEffect *const effect = qobject_cast<VolumeFaderEffect *>(source);
|
||||
if (effect) {
|
||||
sinkNode->disconnectFromMediaObject(effect->mediaObject());
|
||||
return true;
|
||||
}
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -339,10 +353,12 @@ DeviceManager *Backend::deviceManager() const
|
|||
return m_deviceManager;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
EffectManager *Backend::effectManager() const
|
||||
{
|
||||
return m_effectManager;
|
||||
}
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
||||
} // namespace VLC
|
||||
} // namespace Phonon
|
||||
|
|
|
@ -34,7 +34,9 @@ namespace Phonon
|
|||
namespace VLC
|
||||
{
|
||||
class DeviceManager;
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
class EffectManager;
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
||||
/** \brief Backend class for Phonon-VLC.
|
||||
*
|
||||
|
@ -75,8 +77,10 @@ public:
|
|||
/// \return The device manager that is associated with this backend object
|
||||
DeviceManager *deviceManager() const;
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
/// \return The effect manager that is associated with this backend object.
|
||||
EffectManager *effectManager() const;
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
||||
/**
|
||||
* Creates a backend object of the desired class and with the desired parent. Extra arguments can be provided.
|
||||
|
@ -148,7 +152,9 @@ private:
|
|||
mutable QStringList m_supportedMimeTypes;
|
||||
|
||||
DeviceManager *m_deviceManager;
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
EffectManager *m_effectManager;
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
};
|
||||
|
||||
} // namespace VLC
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
|
||||
#include "effect.h"
|
||||
|
||||
#include "effectmanager.h"
|
||||
|
@ -225,3 +227,5 @@ void Effect::setParameterValue(const EffectParameter ¶m, const QVariant &new
|
|||
} // Namespace Phonon::VLC
|
||||
|
||||
#include "phonon-vlc/moc_effect.h"
|
||||
|
||||
#endif // QT_NO_PHONON_EFFECT
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef PHONON_VLC_EFFECT_H
|
||||
#define PHONON_VLC_EFFECT_H
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
|
||||
#include "sinknode.h"
|
||||
#include "effectmanager.h"
|
||||
|
||||
|
@ -77,4 +79,6 @@ private:
|
|||
}
|
||||
} // Namespace Phonon::VLC
|
||||
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
||||
#endif // PHONON_VLC_EFFECT_H
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
|
||||
#include "effectmanager.h"
|
||||
|
||||
#include <vlc/vlc.h>
|
||||
|
@ -133,4 +135,7 @@ void EffectManager::updateEffects()
|
|||
|
||||
} // namespace VLC
|
||||
} // namespace Phonon
|
||||
|
||||
#include "phonon-vlc/moc_effectmanager.h"
|
||||
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#ifndef Phonon_VLC_EFFECTMANAGER_H
|
||||
#define Phonon_VLC_EFFECTMANAGER_H
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
namespace Phonon {
|
||||
|
@ -116,4 +118,6 @@ private:
|
|||
} // namespace VLC
|
||||
} // namespace Phonon
|
||||
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
||||
#endif // Phonon_VLC_EFFECTMANAGER_H
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
|
||||
#include <vlc/libvlc_version.h>
|
||||
#if (LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 0, 0))
|
||||
|
||||
|
@ -84,3 +86,5 @@ void EqualizerEffect::handleConnectToMediaObject(MediaObject *mediaObject)
|
|||
#include "phonon-vlc/moc_equalizereffect.h"
|
||||
|
||||
#endif // LIBVLC_VERSION
|
||||
|
||||
#endif // QT_NO_PHONON_EFFECT
|
|
@ -18,6 +18,8 @@
|
|||
#ifndef PHONON_VLC_EQUALIZEREFFECT_H
|
||||
#define PHONON_VLC_EQUALIZEREFFECT_H
|
||||
|
||||
#ifndef QT_NO_PHONON_EFFECT
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include <phonon/effectinterface.h>
|
||||
|
@ -52,4 +54,6 @@ private:
|
|||
} // namespace VLC
|
||||
} // namespace Phonon
|
||||
|
||||
#endif // QT_NO_PHONON_EFFECT
|
||||
|
||||
#endif // PHONON_VLC_EQUALIZEREFFECT_H
|
||||
|
|
Loading…
Add table
Reference in a new issue