mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-28 18:19:42 +01:00
Use the vlc engine on Windows
This commit is contained in:
parent
f1f4584da0
commit
1c5b6c6b05
@ -7,16 +7,8 @@ if (CMAKE_FIND_ROOT_PATH)
|
||||
# CMAKE_FIND_ROOT_PATH should get set by your cmake toolchain file
|
||||
set(QT_HEADERS_DIR ${CMAKE_FIND_ROOT_PATH}/include)
|
||||
set(QT_LIBRARY_DIR ${CMAKE_FIND_ROOT_PATH}/lib)
|
||||
set(QT_PHONON_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/include/phonon)
|
||||
endif (CMAKE_FIND_ROOT_PATH)
|
||||
|
||||
option(FORCE_PHONON "Use the Phonon audio backend even on Unix")
|
||||
|
||||
if (FORCE_PHONON OR WIN32)
|
||||
set(USE_PHONON 1)
|
||||
add_definitions(-DUSE_PHONON)
|
||||
endif (FORCE_PHONON OR WIN32)
|
||||
|
||||
find_package(Qt4 REQUIRED)
|
||||
set(QT_USE_QTOPENGL 1)
|
||||
set(QT_USE_QTSQL 1)
|
||||
@ -25,15 +17,16 @@ set(QT_USE_QTXML 1)
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(QT_USE_QTDBUS 1)
|
||||
endif(UNIX AND NOT APPLE)
|
||||
if(USE_PHONON)
|
||||
set(QT_USE_PHONON 1)
|
||||
endif(USE_PHONON)
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(Boost REQUIRED)
|
||||
|
||||
if(WIN32)
|
||||
find_library(TAGLIB_LIBRARIES tag)
|
||||
find_path(VLC_PLUGIN_INCLUDE_DIRS vlc_arrays.h
|
||||
PATH_SUFFIXES vlc vlc/plugins)
|
||||
find_library(VLC_PLUGIN_LIBRARIES vlccore)
|
||||
find_library(LIBVLC_LIBRARIES vlc)
|
||||
else(WIN32)
|
||||
pkg_check_modules(TAGLIB taglib)
|
||||
pkg_check_modules(LIBVLC libvlc)
|
||||
|
@ -12,6 +12,7 @@ set(CLEMENTINE-SOURCES
|
||||
playlist.cpp
|
||||
playlistitem.cpp
|
||||
engines/enginebase.cpp
|
||||
engines/vlcengine.cpp
|
||||
analyzers/baranalyzer.cpp
|
||||
analyzers/analyzerbase.cpp
|
||||
fht.cpp
|
||||
@ -77,6 +78,7 @@ set(CLEMENTINE-MOC-HEADERS
|
||||
librarybackend.h
|
||||
playlist.h
|
||||
engines/enginebase.h
|
||||
engines/vlcengine.h
|
||||
sliderwidget.h
|
||||
playlistview.h
|
||||
backgroundthread.h
|
||||
@ -193,15 +195,6 @@ foreach(QM-FILE ${CLEMENTINE-QM-FILES})
|
||||
endforeach(QM-FILE)
|
||||
file(APPEND ${CLEMENTINE-QM-RESOURCE} "</qresource></RCC>")
|
||||
|
||||
# Audio engine - phonon on windows, xine elsewhere
|
||||
if(USE_PHONON)
|
||||
set(CLEMENTINE-SOURCES ${CLEMENTINE-SOURCES} engines/phononengine.cpp)
|
||||
set(CLEMENTINE-MOC-HEADERS ${CLEMENTINE-MOC-HEADERS} engines/phononengine.h)
|
||||
else(USE_PHONON)
|
||||
set(CLEMENTINE-SOURCES ${CLEMENTINE-SOURCES} engines/vlcengine.cpp)
|
||||
set(CLEMENTINE-MOC-HEADERS ${CLEMENTINE-MOC-HEADERS} engines/vlcengine.h)
|
||||
endif(USE_PHONON)
|
||||
|
||||
# OSD and DBus.
|
||||
if(APPLE)
|
||||
set(CLEMENTINE-SOURCES ${CLEMENTINE-SOURCES} osd_mac.mm)
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "player.h"
|
||||
#include "playlist.h"
|
||||
#include "lastfmservice.h"
|
||||
#include "engines/vlcengine.h"
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
# include "mpris_player.h"
|
||||
@ -24,12 +25,6 @@
|
||||
# include <QDBusConnection>
|
||||
#endif
|
||||
|
||||
#ifdef USE_PHONON
|
||||
# include "engines/phononengine.h"
|
||||
#else
|
||||
# include "engines/vlcengine.h"
|
||||
#endif
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
@ -62,15 +57,9 @@ Player::Player(Playlist* playlist, LastFMService* lastfm, QObject* parent)
|
||||
playlist_(playlist),
|
||||
lastfm_(lastfm),
|
||||
current_item_options_(PlaylistItem::Default),
|
||||
engine_(NULL),
|
||||
engine_(new VlcEngine),
|
||||
init_engine_watcher_(new QFutureWatcher<bool>(this))
|
||||
{
|
||||
#ifdef USE_PHONON
|
||||
engine_ = new PhononEngine;
|
||||
#else
|
||||
engine_ = new VlcEngine;
|
||||
#endif
|
||||
|
||||
settings_.beginGroup("Player");
|
||||
|
||||
SetVolume(settings_.value("volume", 50).toInt());
|
||||
|
@ -11,14 +11,22 @@ set(CLEMENTINE-SCOPE-SOURCES
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../src")
|
||||
|
||||
if (WIN32)
|
||||
# This gets linked at runtime on unix
|
||||
set(MAYBE_CLEMENTINE_LIB_LIBRARIES clementine_lib)
|
||||
endif (WIN32)
|
||||
|
||||
add_library(clementine_scope SHARED
|
||||
${CLEMENTINE-SCOPE-SOURCES}
|
||||
)
|
||||
target_link_libraries(clementine_scope
|
||||
${VLC_PLUGIN_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${MAYBE_CLEMENTINE_LIB_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS clementine_scope
|
||||
LIBRARY DESTINATION ${VLC_PLUGIN_LIBDIR}/vlc/clementine
|
||||
)
|
||||
if (NOT WIN32)
|
||||
install(TARGETS clementine_scope
|
||||
LIBRARY DESTINATION ${VLC_PLUGIN_LIBDIR}/vlc/clementine
|
||||
)
|
||||
endif (NOT WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user