mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
* Fixed headless mode. Enabled AudioEngine and decoders in headless mode.
This commit is contained in:
@@ -16,14 +16,11 @@ ENDIF()
|
|||||||
FIND_PACKAGE( Taglib 1.6.0 REQUIRED )
|
FIND_PACKAGE( Taglib 1.6.0 REQUIRED )
|
||||||
FIND_PACKAGE( LibLastFm REQUIRED )
|
FIND_PACKAGE( LibLastFm REQUIRED )
|
||||||
|
|
||||||
IF( "${gui}" STREQUAL "no" )
|
IF( UNIX AND NOT APPLE )
|
||||||
|
ADD_SUBDIRECTORY( alsa-playback )
|
||||||
ELSE()
|
ELSE()
|
||||||
IF( UNIX AND NOT APPLE )
|
ADD_SUBDIRECTORY( rtaudio )
|
||||||
ADD_SUBDIRECTORY( alsa-playback )
|
ENDIF( UNIX AND NOT APPLE )
|
||||||
ELSE()
|
|
||||||
ADD_SUBDIRECTORY( rtaudio )
|
|
||||||
ENDIF( UNIX AND NOT APPLE )
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
ADD_SUBDIRECTORY( libportfwd )
|
ADD_SUBDIRECTORY( libportfwd )
|
||||||
ADD_SUBDIRECTORY( qxtweb-standalone )
|
ADD_SUBDIRECTORY( qxtweb-standalone )
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include "sourcelist.h"
|
#include "sourcelist.h"
|
||||||
#include "servent.h"
|
#include "servent.h"
|
||||||
|
|
||||||
|
class AudioEngine;
|
||||||
class Database;
|
class Database;
|
||||||
class Jabber;
|
class Jabber;
|
||||||
class XMPPBot;
|
class XMPPBot;
|
||||||
@@ -42,7 +43,6 @@ namespace Tomahawk
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TOMAHAWK_HEADLESS
|
#ifndef TOMAHAWK_HEADLESS
|
||||||
class AudioEngine;
|
|
||||||
class TomahawkWindow;
|
class TomahawkWindow;
|
||||||
class PlaylistManager;
|
class PlaylistManager;
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
@@ -69,6 +69,7 @@ public:
|
|||||||
static TomahawkApp* instance();
|
static TomahawkApp* instance();
|
||||||
|
|
||||||
Tomahawk::Pipeline* pipeline() { return &m_pipeline; }
|
Tomahawk::Pipeline* pipeline() { return &m_pipeline; }
|
||||||
|
AudioEngine* audioEngine() { return m_audioEngine; }
|
||||||
Database* database() { return m_db; }
|
Database* database() { return m_db; }
|
||||||
SourceList& sourcelist() { return m_sources; }
|
SourceList& sourcelist() { return m_sources; }
|
||||||
Servent& servent() { return m_servent; }
|
Servent& servent() { return m_servent; }
|
||||||
@@ -78,10 +79,10 @@ public:
|
|||||||
XMPPBot* xmppBot() { return m_xmppBot; }
|
XMPPBot* xmppBot() { return m_xmppBot; }
|
||||||
const QString& nodeID() const;
|
const QString& nodeID() const;
|
||||||
|
|
||||||
|
|
||||||
#ifndef TOMAHAWK_HEADLESS
|
#ifndef TOMAHAWK_HEADLESS
|
||||||
AudioControls* audioControls();
|
AudioControls* audioControls();
|
||||||
PlaylistManager* playlistManager();
|
PlaylistManager* playlistManager();
|
||||||
AudioEngine* audioEngine() { return m_audioEngine; }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void registerIODeviceFactory( const QString &proto, boost::function<QSharedPointer<QIODevice>(Tomahawk::result_ptr)> fac );
|
void registerIODeviceFactory( const QString &proto, boost::function<QSharedPointer<QIODevice>(Tomahawk::result_ptr)> fac );
|
||||||
@@ -121,6 +122,7 @@ private:
|
|||||||
QList<TomahawkPlugin*> m_plugins;
|
QList<TomahawkPlugin*> m_plugins;
|
||||||
|
|
||||||
Tomahawk::Pipeline m_pipeline;
|
Tomahawk::Pipeline m_pipeline;
|
||||||
|
AudioEngine* m_audioEngine;
|
||||||
Database* m_db;
|
Database* m_db;
|
||||||
Servent m_servent;
|
Servent m_servent;
|
||||||
SourceList m_sources;
|
SourceList m_sources;
|
||||||
@@ -130,7 +132,6 @@ private:
|
|||||||
|
|
||||||
#ifndef TOMAHAWK_HEADLESS
|
#ifndef TOMAHAWK_HEADLESS
|
||||||
TomahawkWindow* m_mainwindow;
|
TomahawkWindow* m_mainwindow;
|
||||||
AudioEngine* m_audioEngine;
|
|
||||||
#ifndef NO_LIBLASTFM
|
#ifndef NO_LIBLASTFM
|
||||||
Scrobbler* m_scrobbler;
|
Scrobbler* m_scrobbler;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,8 +1,12 @@
|
|||||||
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
|
alsaplayback
|
||||||
|
)
|
||||||
|
|
||||||
IF( "${gui}" STREQUAL "no" )
|
IF( "${gui}" STREQUAL "no" )
|
||||||
ELSE()
|
ELSE()
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
alsaplayback
|
|
||||||
gnutls
|
gnutls
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@@ -1,21 +1,13 @@
|
|||||||
IF( "${gui}" STREQUAL "no" )
|
SET( tomahawkSourcesGui ${tomahawkSourcesGui} audio/rtaudiooutput.cpp )
|
||||||
ELSE()
|
SET( tomahawkHeadersGui ${tomahawkHeadersGui} audio/rtaudiooutput.h )
|
||||||
SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
|
||||||
audio/rtaudiooutput.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
FIND_LIBRARY( COREAUDIO_LIBRARY CoreAudio )
|
||||||
audio/rtaudiooutput.h
|
FIND_LIBRARY( COREFOUNDATION_LIBRARY CoreFoundation )
|
||||||
)
|
MARK_AS_ADVANCED( COREAUDIO_LIBRARY COREFOUNDATION_LIBRARY )
|
||||||
|
|
||||||
FIND_LIBRARY( COREAUDIO_LIBRARY CoreAudio )
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
FIND_LIBRARY( COREFOUNDATION_LIBRARY CoreFoundation )
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
MARK_AS_ADVANCED( COREAUDIO_LIBRARY COREFOUNDATION_LIBRARY )
|
${COREAUDIO_LIBRARY}
|
||||||
|
${COREFOUNDATION_LIBRARY}
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
rtaudio
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
)
|
||||||
${COREAUDIO_LIBRARY}
|
|
||||||
${COREFOUNDATION_LIBRARY}
|
|
||||||
rtaudio
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
|
@@ -35,6 +35,10 @@ SET( tomahawkSources ${tomahawkSources}
|
|||||||
source.cpp
|
source.cpp
|
||||||
sourcelist.cpp
|
sourcelist.cpp
|
||||||
|
|
||||||
|
audio/madtranscode.cpp
|
||||||
|
audio/vorbistranscode.cpp
|
||||||
|
audio/audioengine.cpp
|
||||||
|
|
||||||
utils/tomahawkutils.cpp
|
utils/tomahawkutils.cpp
|
||||||
jabber/jabber_p.cpp
|
jabber/jabber_p.cpp
|
||||||
|
|
||||||
@@ -81,8 +85,9 @@ SET( tomahawkSources ${tomahawkSources}
|
|||||||
database/databasecommand_updatesearchindex.cpp
|
database/databasecommand_updatesearchindex.cpp
|
||||||
database/databasecollection.cpp
|
database/databasecollection.cpp
|
||||||
|
|
||||||
xmppbot/xmppbot.cpp
|
scrobbler.cpp
|
||||||
|
|
||||||
|
xmppbot/xmppbot.cpp
|
||||||
web/api_v1.cpp
|
web/api_v1.cpp
|
||||||
|
|
||||||
tomahawksettings.cpp
|
tomahawksettings.cpp
|
||||||
@@ -98,9 +103,6 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
|||||||
utils/proxystyle.cpp
|
utils/proxystyle.cpp
|
||||||
utils/widgetdragfilter.cpp
|
utils/widgetdragfilter.cpp
|
||||||
|
|
||||||
audio/madtranscode.cpp
|
|
||||||
audio/audioengine.cpp
|
|
||||||
|
|
||||||
playlist/collectionmodel.cpp
|
playlist/collectionmodel.cpp
|
||||||
playlist/collectionproxymodel.cpp
|
playlist/collectionproxymodel.cpp
|
||||||
playlist/collectionflatmodel.cpp
|
playlist/collectionflatmodel.cpp
|
||||||
@@ -153,6 +155,11 @@ SET( tomahawkHeaders ${tomahawkHeaders}
|
|||||||
"${TOMAHAWK_INC_DIR}/tomahawk/functimeout.h"
|
"${TOMAHAWK_INC_DIR}/tomahawk/functimeout.h"
|
||||||
# "${TOMAHAWK_INC_DIR}/tomahawk/tomahawkplugin.h"
|
# "${TOMAHAWK_INC_DIR}/tomahawk/tomahawkplugin.h"
|
||||||
|
|
||||||
|
audio/transcodeinterface.h
|
||||||
|
audio/madtranscode.h
|
||||||
|
audio/vorbistranscode.h
|
||||||
|
audio/audioengine.h
|
||||||
|
|
||||||
database/fuzzyindex.h
|
database/fuzzyindex.h
|
||||||
database/database.h
|
database/database.h
|
||||||
database/databaseworker.h
|
database/databaseworker.h
|
||||||
@@ -199,8 +206,9 @@ SET( tomahawkHeaders ${tomahawkHeaders}
|
|||||||
network/filetransferconnection.h
|
network/filetransferconnection.h
|
||||||
network/dbsyncconnection.h
|
network/dbsyncconnection.h
|
||||||
|
|
||||||
xmppbot/xmppbot.h
|
scrobbler.h
|
||||||
|
|
||||||
|
xmppbot/xmppbot.h
|
||||||
web/api_v1.h
|
web/api_v1.h
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -212,10 +220,6 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
|||||||
utils/progresstreeview.h
|
utils/progresstreeview.h
|
||||||
utils/widgetdragfilter.h
|
utils/widgetdragfilter.h
|
||||||
|
|
||||||
audio/transcodeinterface.h
|
|
||||||
audio/madtranscode.h
|
|
||||||
audio/audioengine.h
|
|
||||||
|
|
||||||
playlist/collectionmodel.h
|
playlist/collectionmodel.h
|
||||||
playlist/collectionproxymodel.h
|
playlist/collectionproxymodel.h
|
||||||
playlist/collectionflatmodel.h
|
playlist/collectionflatmodel.h
|
||||||
|
@@ -12,15 +12,9 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
|||||||
qxtweb-standalone
|
qxtweb-standalone
|
||||||
)
|
)
|
||||||
|
|
||||||
IF( "${gui}" STREQUAL "no" )
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
ELSE()
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
mad
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
vorbisfile
|
||||||
mad
|
ogg
|
||||||
vorbisfile
|
)
|
||||||
ogg
|
|
||||||
)
|
|
||||||
|
|
||||||
SET( tomahawkSourcesGui ${tomahawkSourcesGui} audio/vorbistranscode.cpp scrobbler.cpp )
|
|
||||||
SET( tomahawkHeadersGui ${tomahawkHeadersGui} audio/vorbistranscode.h scrobbler.h )
|
|
||||||
ENDIF()
|
|
||||||
|
@@ -31,22 +31,17 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/../qxtweb-standalone/libqxtweb-standalone.dll"
|
"${CMAKE_CURRENT_SOURCE_DIR}/../qxtweb-standalone/libqxtweb-standalone.dll"
|
||||||
)
|
)
|
||||||
|
|
||||||
IF( "${gui}" STREQUAL "no" )
|
SET( tomahawkSourcesGui ${tomahawkSourcesGui} audio/rtaudiooutput.cpp )
|
||||||
ELSE()
|
SET( tomahawkHeadersGui ${tomahawkHeadersGui} audio/rtaudiooutput.h )
|
||||||
SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
|
||||||
audio/rtaudiooutput.cpp
|
|
||||||
)
|
|
||||||
SET( tomahawkHeadersGui ${tomahawkHeadersGui} audio/rtaudiooutput.h )
|
|
||||||
|
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
"dsound.dll"
|
"dsound.dll"
|
||||||
"winmm.dll"
|
"winmm.dll"
|
||||||
"iphlpapi.a"
|
"iphlpapi.a"
|
||||||
"mad"
|
"mad"
|
||||||
"vorbisfile"
|
"vorbisfile"
|
||||||
"ogg"
|
"ogg"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/../rtaudio/librtaudio.dll"
|
"${CMAKE_CURRENT_SOURCE_DIR}/../rtaudio/librtaudio.dll"
|
||||||
)
|
)
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user