Commit d699b889 authored by Scott Wheeler's avatar Scott Wheeler

Make it build with or without GStreamer.

Currently it will detect and link to GStreamer, but the GUI for selecting
the sound system if both aRts and GStreamer are available isn't written
yet.

svn path=/trunk/kdemultimedia/juk/; revision=206189
parent b10c22ee
......@@ -4,7 +4,15 @@ bin_PROGRAMS = juk
## INCLUDES were found outside kdevelop specific part
juk_SOURCES = gstreamerplayer.cpp artsplayer.cpp directorylist.cpp directorylistbase.ui stringhash.cpp sortedstringlist.cpp systemtray.cpp genrelisteditor.cpp genrelisteditorbase.ui splashscreen.cpp statuslabel.cpp cachedtag.cpp oggtag.cpp id3tag.cpp collectionlist.cpp playlistitem.cpp playlist.cpp playlistsplitter.cpp listboxpixmap.cpp playlistbox.cpp tageditor.cpp cache.cpp audiodata.cpp genrelistreader.cpp genrelistlist.cpp genrelist.cpp genre.cpp player.cpp tag.cpp customaction.cpp slideraction.cpp juk.cpp main.cpp
juk_LDADD = -lid3 -lsoundserver_idl $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET)
if link_lib_GST
gstlibs = -lqgst -lqgstplay
else
gstlibs =
endif
juk_LDADD = $(gstlibs) -lid3 -lsoundserver_idl $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET)
SUBDIRS = pics data
......
......@@ -15,7 +15,9 @@
* *
***************************************************************************/
#if 0
#include "../config.h"
#if HAVE_GSTREAMER
#include <kdebug.h>
......@@ -88,9 +90,7 @@ void GStreamerPlayer::setVolume(float volume)
float GStreamerPlayer::getVolume() const
{
// 1.0 is full volume
// when is works in QGstPlay::Play, just call:
// return player->getVolume();
return 1.0;
return player->getVolume();
}
/////////////////////////////////////////////////////////////////////////////////
......
......@@ -15,9 +15,14 @@
* *
***************************************************************************/
#ifndef GSTREAMERPLAYER_H
#define GSTREAMERPLAYER_H
#include "../config.h"
#if HAVE_GSTREAMER
#include <qgstplay/play.h>
#include <qobject.h>
......@@ -58,7 +63,7 @@ private slots:
void setDuration(long long d);
private:
void setupGStreamerPlayer();
void setupPlayer();
void setupVolumeControl();
bool serverRunning() const;
......@@ -73,3 +78,5 @@ private:
};
#endif
#endif
......@@ -17,19 +17,25 @@
#include "player.h"
#include "artsplayer.h"
#if 0
#include "gstreamerplayer.h"
#endif
#include "../config.h"
Player *Player::createPlayer(SoundSystem s)
{
Player *p = 0;
#if HAVE_GSTREAMER
if(s == Arts)
p = new ArtsPlayer();
#if 0
else if(s == GStreamer)
p = new GStreamerPlayer();
#else
p = new ArtsPlayer();
#endif
return p;
......
......@@ -30,7 +30,6 @@ public:
enum SoundSystem { Arts, GStreamer };
Player() {}
virtual ~Player() {}
virtual void play(const QString &fileName, float volume = 1.0) = 0;
......@@ -56,6 +55,10 @@ public:
*/
static Player *createPlayer(SoundSystem s = Arts);
protected:
Player() {}
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment