From 390903c44f1f1a6858b9da86f250fb63364a19f9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 3 Sep 2010 00:25:58 +0000 Subject: [PATCH] Deleted this directory as kdemm does not build git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1171178 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdemm/0.png | Bin 21253 -> 0 bytes kdemm/DESIGN | 31 -- kdemm/Makefile.am | 43 -- kdemm/TODO | 27 - kdemm/backend.cpp | 78 --- kdemm/backend.h | 86 ---- kdemm/channel.cpp | 69 --- kdemm/channel.h | 96 ---- kdemm/factory.cpp | 296 ----------- kdemm/factory.h | 222 -------- kdemm/mixeriface.h | 41 -- kdemm/mmbackendinfo.desktop | 30 -- kdemm/player.cpp | 53 -- kdemm/player.h | 259 ---------- kdemm/reqspec.html | 533 -------------------- kdemm/simpleplayer.cpp | 198 -------- kdemm/simpleplayer.h | 72 --- kdemm/test/Makefile.am | 30 -- kdemm/test/main.cpp | 38 -- kdemm/test/statetest.cpp | 299 ----------- kdemm/test/statetest.h | 57 --- kdemm/test/testwidget.cpp | 194 ------- kdemm/test/testwidget.h | 64 --- kdemm/videoplayer.cpp | 34 -- kdemm/videoplayer.h | 54 -- kdemm/volumecontrold/Makefile.am | 31 -- kdemm/volumecontrold/volumecontrold.cpp | 47 -- kdemm/volumecontrold/volumecontrold.desktop | 13 - kdemm/volumecontrold/volumecontrold.h | 53 -- 29 files changed, 3048 deletions(-) delete mode 100644 kdemm/0.png delete mode 100644 kdemm/DESIGN delete mode 100644 kdemm/Makefile.am delete mode 100644 kdemm/TODO delete mode 100644 kdemm/backend.cpp delete mode 100644 kdemm/backend.h delete mode 100644 kdemm/channel.cpp delete mode 100644 kdemm/channel.h delete mode 100644 kdemm/factory.cpp delete mode 100644 kdemm/factory.h delete mode 100644 kdemm/mixeriface.h delete mode 100644 kdemm/mmbackendinfo.desktop delete mode 100644 kdemm/player.cpp delete mode 100644 kdemm/player.h delete mode 100644 kdemm/reqspec.html delete mode 100644 kdemm/simpleplayer.cpp delete mode 100644 kdemm/simpleplayer.h delete mode 100644 kdemm/test/Makefile.am delete mode 100644 kdemm/test/main.cpp delete mode 100644 kdemm/test/statetest.cpp delete mode 100644 kdemm/test/statetest.h delete mode 100644 kdemm/test/testwidget.cpp delete mode 100644 kdemm/test/testwidget.h delete mode 100644 kdemm/videoplayer.cpp delete mode 100644 kdemm/videoplayer.h delete mode 100644 kdemm/volumecontrold/Makefile.am delete mode 100644 kdemm/volumecontrold/volumecontrold.cpp delete mode 100644 kdemm/volumecontrold/volumecontrold.desktop delete mode 100644 kdemm/volumecontrold/volumecontrold.h diff --git a/kdemm/0.png b/kdemm/0.png deleted file mode 100644 index 0c65b5cc8587dcb1cd25c679fa1806326e431b5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21253 zcmb@ubwE_>+BZCO3kcF7NC`-Xv<@Ihib&TG(nxnosFa{crywBG42`7H-Cfcx4MTl5 z?sLxGXYYN!^E~hSu0KYZnYCu!Yu)R*u3ubt@Dn8&JZuVV2n2%nSXSyO1cD5QK#*Qx zB7=8UCQ^DKklT>QQV*ZGC2dZ7>Jn*ON?h_f5RGA|gTG3BQc5%>%O=`-jLkE$#=;e?lHXuA%9 zbm8kgU&rjCVdQZ}g<-E!l>6Pp<95abXAFB3Ne;m!kPc?qPVG6j!kCUVPZUtHtzW!ww8M0= z*K*p?f8Bx~ba24w?X4jsjINkaDlBnT>T!opF+1~?#Ff{F4CBa(h<(Wh*=C+GH1hRQ`N}H87F#&v+vqW=!Hec9v|BJp1sO2?)x5W ztD$x=Hk&*!&eMzIIp0(k&zqsAM_NG8-X-q84H}7RX-E6m)sOJtO z2$rHCAZRW)+z-vmtx?s{S>2H+uf1seIdACWW6bb=A&>xEdOW=Drxt5*+;=jc#%Hf! z)6zy%SJQ7*x>3;8O6U$r#PP|wrEKq9of-JndT*#3K4=)rHo)o@7#<1cN`2YQJzCJH z8kH{P;v!jH(|f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Z}PSPR+l0b4pEZAT8B3TYJ`adC}@TqVV|cLNie`Eyzd&GUzi zDRxOCgt zs)&jc7M&hRV@a3`A>5Y?wyUiKYp!TS{4vh{*@=t8|2NcCje2d?f1<9AM*fr6weo1h z87y%$J$rRrf9Y{HlHUYcHI?gcCfFPmG@KEkM`#^YZj4$1f9^3@I0+1dF;F4peEV>t zOz?%*WfP8%=)KRjZ$ z`rPwo9~W}sb+%OoG#`&G?JeJ{$>y+yvj2ghHklvTS}(6$wiy||u;9*}2;!T4G<>>j z75BI`2s42|3iaijDZx!-tdBvV4Gn2e_XrEVDEjl3VzOH>Xh82dXU42%DTcP$EG9Zw zdJ%^(y{%|26RLP@yCCY|e-%*^S7p}Y+N%~%{CzKw%pAoZ!T z^7fJWgOE>;TatxTwe|G)g-$Q0Yw$@zpIfdQD|U~EguEZSb3UA-Dn$SOUGed~Jd9H9 zeEOSJ&m&zGieoU=@xra+z+r6BeoV&Zf-?>rpyKHaAmaVp&t^0KK>+|#Ls{;NUb6el> zqekD%y#B{ueb*%`UtZcb|4MRM**D-Wnf2@Q`}+0)4eR*p;! z>eQWVZ11F^d)IH@9$#7(S87$9Yqt9I)b9@tZY`*|W5MwF+V%3~n=U;rNJ&Xgzj|$+ zyyVMH6Ia>V`?hL#nH#^YS{2l;eE8)VUY1*5=i1tywX{6`uV=AgzC!0Ei^scmuYX-z zyYJZvzsVeieP&rtp5^;qGAliqadC$YYY$%>f2-{p2N$7 - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License version 2 as published by the Free Software Foundation. - -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES = -I$(top_srcdir)/kdecore -I$(top_srcdir)/kio $(all_includes) - -SUBDIRS = . test - -lib_LTLIBRARIES = libkdemm.la - -kdemmincludedir = $(includedir)/kdemm -kdemminclude_HEADERS = backend.h factory.h player.h channel.h videoplayer.h mixeriface.h simpleplayer.h - -libkdemm_la_SOURCES = backend.cpp factory.cpp player.cpp channel.cpp videoplayer.cpp mixeriface.skel simpleplayer.cpp factory.skel - -libkdemm_la_LDFLAGS = $(QT_LDFLAGS) $(KDE_RPATH) $(KDE_MT_LDFLAGS) $(USER_LDFLAGS) -version-info 0:0:0 -no-undefined -libkdemm_la_LIBADD = ../kdecore/libkdecore.la ../kio/libkio.la - -factory_DCOPIDLNG = true - -METASOURCES = AUTO - -kde_servicetypes_DATA = mmbackendinfo.desktop - -SRCDOC_DEST=$(kde_htmldir)/en/kdelibs/kdemm - -DOXYGEN_REFERENCES = dcop kdecore kio - -include ../admin/Doxyfile.am - diff --git a/kdemm/TODO b/kdemm/TODO deleted file mode 100644 index 457bc6f0a..000000000 --- a/kdemm/TODO +++ /dev/null @@ -1,27 +0,0 @@ -Factory -- get a list of available backends -- be able to choose the one you want to use, overriding the KTrader information -- test on the fly switching - -Audio -- function to retrieve the PCM data that currently is played (could be done in - the Channel as well as in the Player) - -Video -- either a new interface or somehow integrate into the player - If it's a new interface we have to copy most of the Player class, which I - wouldn't like to see. - -two wrapper APIs: -- for notifications - play file and don't care - automatically use the notification channel if present -- for simple players - open file and provide seek and volume - -Mixer abstraction -- provide access to the hardware mixer and/or the mixer of the backend -- provide access to software volume controls (like the Channels) - -Record Interface -- simple PCM recording API diff --git a/kdemm/backend.cpp b/kdemm/backend.cpp deleted file mode 100644 index 1a9ab86fb..000000000 --- a/kdemm/backend.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "backend.h" -#include "player.h" - -#include - -#include -#include -#include - -namespace KDE -{ -namespace Multimedia -{ - -class Backend::Private -{ - public: - Channel * channel; -}; - -Backend::Backend( TQObject * parent, const char * name ) - : TQObject( parent, name ) - , d( 0 ) -{ -} - -Backend::~Backend() -{ - delete d; -} - -bool Backend::playSoundEvent( const KURL & url ) -{ - if( ! d ) - { - d = new Private; - - TQString ctype = "notifications"; - if( availableChannels( Channel::Output ).contains( ctype ) < 1 ) - ctype = "default"; - d->channel = createChannel( KGlobal::instance()->aboutData()->programName(), ctype, Channel::Output ); - } - - Player * player = createPlayer(); - player->setOutputChannel( d->channel ); - connect( player, TQT_SIGNAL( finished() ), player, TQT_SLOT( deleteLater() ) ); - - if( player->load( url ) ) - if( player->play() ) - return true; - delete player; - return false; -} - -}} // namespaces - -#include "backend.moc" - -// vim: sw=4 ts=4 noet diff --git a/kdemm/backend.h b/kdemm/backend.h deleted file mode 100644 index d2eaaead7..000000000 --- a/kdemm/backend.h +++ /dev/null @@ -1,86 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef BACKEND_H -#define BACKEND_H - -#include -#include -#include -#include - -namespace KDE -{ -namespace Multimedia -{ - class Player; - class VideoPlayer; - /** - * \brief Base class for all KDE Multimedia Backends - * - * This class provides the interface for Multimedia Backends. Use it to get - * a pointer to a new Player or VideoWidget. There are some reserved - * functions for later extension of the class. - * - * \author Matthias Kretz - * \since 4.0 - */ - class Backend : public QObject - { - Q_OBJECT - public: - /** - * default TQObject constructor - */ - Backend( TQObject * parent = 0, const char * name = 0 ); - virtual ~Backend(); - - /** - * @return A new instance to a Player from the Backend. - */ - virtual Player * createPlayer() = 0; - - /** - * Create a new VideoPlayer object. The Backend does not have to - * implement this function. - * - * @return A new instance to a VideoPlayer from the Backend. Or 0 if - * the Backend does not support the VideoPlayer interface. - */ - virtual VideoPlayer * createVideoPlayer() { return 0; } - - virtual bool playSoundEvent(const KURL & url); - - virtual Channel * createChannel( const TQString & title, const TQString & channeltype, - Channel::Direction direction ) = 0; - - virtual TQStringList availableChannels( Channel::Direction direction ) const = 0; - - virtual TQStringList playableMimeTypes() const = 0; - - private: - RESERVE_VIRTUAL_10 - - class Private; - Private * d; - }; -}} // namespaces - -// vim: sw=4 ts=4 noet tw=80 -#endif // BACKEND_H diff --git a/kdemm/channel.cpp b/kdemm/channel.cpp deleted file mode 100644 index 28617cd2d..000000000 --- a/kdemm/channel.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Scott Wheeler - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "channel.h" - -#include - -namespace KDE -{ -namespace Multimedia -{ - -class Channel::Private -{ - public: - TQString channelName; - TQString channelType; - Direction direction; -}; - -Channel::Channel( const TQString & channelName, const TQString & type, Direction direction, - TQObject * parent, const char * name ) - : TQObject( parent, name ) -{ - d = new Private; - d->channelName = channelName; - d->channelType = type; - d->direction = direction; -} - -Channel::~Channel() -{ - delete d; -} - -TQString Channel::channelName() const -{ - return d->channelName; -} - -TQString Channel::channelType() const -{ - return d->channelType; -} - -Channel::Direction Channel::direction() const -{ - return d->direction; -} - -}} -#include "channel.moc" -// vim: sw=4 ts=4 noet diff --git a/kdemm/channel.h b/kdemm/channel.h deleted file mode 100644 index dbecb9d6f..000000000 --- a/kdemm/channel.h +++ /dev/null @@ -1,96 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef KDEMM_CHANNEL_H -#define KDEMM_CHANNEL_H - -#include - -class TQString; - -namespace KDE -{ -namespace Multimedia -{ - /** - * \short Abstraction of different inputs or outputs - * - * \author Matthias Kretz - * \since 4.0 - */ - class KDE_EXPORT Channel : public TQObject, virtual public MixerIface - { - Q_OBJECT - public: - virtual ~Channel(); - - enum Direction - { - Input, - Output - }; - - /** - * The user visible name of the channel - */ - virtual TQString channelName() const; - - /** - * The (internal) channel type. - */ - virtual TQString channelType() const; - - /** - * Whether it is an Input or Output channel - */ - virtual Direction direction() const; - - /** - * If the channel has a volume control this function returns \p true - */ - virtual bool hasVolumeControl() const = 0; - - /** - * The current volume of the channel - */ - virtual float volume() const = 0; - - /** - * Set the volume for the channel - * - * \returns Returns \p true if the volume has been successfully set - */ - virtual bool setVolume( float volume ) = 0; - - protected: - /** - * You can not instantiate channels yourself, use the Factory to - * create them. - */ - Channel( const TQString & channelName, const TQString & type, Direction direction, - TQObject * parent = 0, const char * name = 0 ); - - private: - class Private; - Private * d; - }; -}} // namespaces -// vim: sw=4 ts=4 noet tw=80 - -#endif // KDEMM_CHANNEL_H diff --git a/kdemm/factory.cpp b/kdemm/factory.cpp deleted file mode 100644 index c1a2edafa..000000000 --- a/kdemm/factory.cpp +++ /dev/null @@ -1,296 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "factory.h" -#include "backend.h" -#include "player.h" -#include "videoplayer.h" -#include "channel.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace KDE -{ -namespace Multimedia -{ -class Factory::Private -{ - public: - Private() - : backend( 0 ) - { - createBackend(); - } - - void createBackend() - { - KTrader::OfferList offers = KTrader::self()->query( "KDEMultimediaBackend", "Type == 'Service'" ); - KTrader::OfferListIterator it = offers.begin(); - KTrader::OfferListIterator end = offers.end(); - TQStringList errormsg; - for( ; it != end; ++it ) - { - KService::Ptr ptr = *it; - KLibFactory * factory = KLibLoader::self()->factory( TQFile::encodeName( ptr->library() ) ); - if( factory ) - { - backend = ( Backend* )factory->create( 0, "Multimedia Backend", "KDE::Multimedia::Backend" ); - if( 0 == backend ) - { - TQString e = i18n( "create method returned 0" ); - errormsg.append( e ); - kdDebug( 600 ) << "Error getting backend from factory for " << - ptr->name() << ":\n" << e << endl; - } - else - { - service = ptr; - kdDebug( 600 ) << "using backend: " << ptr->name() << endl; - break; - } - } - else - { - TQString e = KLibLoader::self()->lastErrorMessage(); - errormsg.append( e ); - kdDebug( 600 ) << "Error getting factory for " << ptr->name() << - ":\n" << e << endl; - } - } -#if 0 - if( 0 == backend ) - { - if( offers.size() == 0 ) - KMessageBox::error( 0, i18n( "Unable to find a Multimedia Backend" ) ); - else - { - TQString details = ""; - TQStringList::Iterator eit = errormsg.begin(); - TQStringList::Iterator eend = errormsg.end(); - KTrader::OfferListIterator oit = offers.begin(); - KTrader::OfferListIterator oend = offers.end(); - for( ; eit != eend || oit != oend; ++eit, ++oit ) - details += TQString( "" ) - .arg( ( *oit )->name() ).arg( *eit ); - details += "
%1%2
"; - - KMessageBox::detailedError( 0, - i18n( "Unable to use any of the available Multimedia Backends" ), details ); - } - } -#endif - } - - Backend * backend; - KService::Ptr service; - - TQValueList objects; -}; - -Factory * Factory::m_self = 0; - -Factory * Factory::self() -{ - if( ! m_self ) - m_self = new Factory(); - return m_self; -} - -Factory::Factory() - : DCOPObject( "KDEMMFactory" ) - , d( new Private ) -{ - connectDCOPSignal( 0, 0, "kdemmBackendChanged()", "kdemmBackendChanged()", false); -} - -Factory::~Factory() -{ - delete d; -} - -void Factory::kdemmBackendChanged() -{ - if( d->backend ) - { - // wouw, if we want to switch on the fly we have to exchange the - // (Video)Player and Channel classes without the API user noticing. That - // would mean to implement a kind of smartwrapper: - // Player: Interface that accesses Player_skel which is abstract and is - // implemented by the Backend. The API user would only get access to the - // Player class and if you want to switch the backend you can delete the - // Player_skel object and put another implementation in its place. - // - // Now we tell the kdemm using app to help us. With the first signal we - // tell 'em to delete all the (Video)Players and Channels and with the - // second to recreate them all again. - emit deleteYourObjects(); - if( d->objects.size() > 0 ) - { - kdWarning( 600 ) << "we were asked to change the backend but the application did\n" - "not free all references to objects created by the factory. Therefor we can not\n" - "change the backend without crashing. Now we have to wait for a restart to make\n" - "backendswitching possible." << endl; - // in case there were objects deleted give 'em a chance to recreate - // them now - emit recreateObjects(); - return; - } - delete d->backend; - d->backend = 0; - } - d->createBackend(); - emit recreateObjects(); -} - -void Factory::objectDestroyed( TQObject * obj ) -{ - kdDebug( 600 ) << k_funcinfo << obj << endl; - void * p = ( void* )obj; - d->objects.remove( p ); -} - -Player * Factory::createPlayer() -{ - if( d->backend ) - { - Player * p = d->backend->createPlayer(); - connect( p, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( objectDestroyed( TQObject* ) ) ); - d->objects.append( p ); - return p; - } - else - return 0; -} - -VideoPlayer * Factory::createVideoPlayer() -{ - if( d->backend ) - { - VideoPlayer * vp = d->backend->createVideoPlayer(); - connect( vp, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( objectDestroyed( TQObject* ) ) ); - d->objects.append( vp ); - return vp; - } - else - return 0; -} - -bool Factory::playSoundEvent(const KURL & url) -{ - if( d->backend ) - return d->backend->playSoundEvent(url); - else - return false; -} - -Channel * Factory::createChannel( const TQString & title, const TQString & channeltype, - Channel::Direction direction ) -{ - if( d->backend ) - { - Channel * c = d->backend->createChannel( title, channeltype, direction ); - connect( c, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( objectDestroyed( TQObject* ) ) ); - d->objects.append( c ); - return c; - } - else - return 0; -} - -TQStringList Factory::availableChannels( Channel::Direction direction ) const -{ - if( d->backend ) - return d->backend->availableChannels( direction ); - else - return TQStringList(); -} - -TQStringList Factory::playableMimeTypes() const -{ - if( d->backend ) - return d->backend->playableMimeTypes(); - else - return TQStringList(); -} - -bool Factory::isMimeTypePlayable( const TQString & type ) const -{ - if( d->backend ) - { - KMimeType::Ptr mimetype = KMimeType::mimeType( type ); - TQStringList mimetypes = playableMimeTypes(); - for( TQStringList::ConstIterator i=mimetypes.begin(); i!=mimetypes.end(); i++ ) - if( mimetype->is( *i ) ) - return true; - } - return false; -} - -TQString Factory::backendName() const -{ - if( d->service ) - return d->service->name(); - else - return TQString::null; -} - -TQString Factory::backendComment() const -{ - if( d->service ) - return d->service->comment(); - else - return TQString::null; -} - -TQString Factory::backendVersion() const -{ - if( d->service ) - return d->service->property( "X-KDE-MMBackendInfo-Version" ).toString(); - else - return TQString::null; -} - -TQString Factory::backendIcon() const -{ - if( d->service ) - return d->service->icon(); - else - return TQString::null; -} - -TQString Factory::backendWebsite() const -{ - if( d->service ) - return d->service->property( "X-KDE-MMBackendInfo-Website" ).toString(); - else - return TQString::null; -} - -}} //namespaces - -#include "factory.moc" - -// vim: sw=4 ts=4 noet diff --git a/kdemm/factory.h b/kdemm/factory.h deleted file mode 100644 index 2f75f83d7..000000000 --- a/kdemm/factory.h +++ /dev/null @@ -1,222 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef KDEMM_FACTORY_H -#define KDEMM_FACTORY_H - -#include -#include -#include -#include -#include - -namespace KDE -{ -/** - * \brief The KDE Multimedia classes - * - * In this Namespace you find a few classes to access Multimedia functions like - * playing audio files and simple video playing. Those classes are not dependent - * on any specific framework (like they were in pre KDE4 times) but rather use - * exchangeable backends to do the "dirty" work. - * - * If you want to write a new backend you also find the necessary classes in - * this namespace. - * - * \since 4.0 - */ -namespace Multimedia -{ -class Backend; -class Player; -class VideoPlayer; - -/** - * \brief Factory to access the preferred Backend. - * - * This class is your entry point to KDE Multimedia usage. It provides the - * necessary objects for playing audio and video. - * - * For simple access to just playing an audio file see SimplePlayer. - * - * \remarks - * Extensions to the existing functionality can either be added by using the - * reserved virtual functions in Backend or by adding a new interface e.g. - * BackendV2 and creating a BackendV2 instance when the Backend instance is - * created. - * - * \author Matthias Kretz - * \since 4.0 - */ -class KDE_EXPORT Factory : public TQObject, public DCOPObject -{ - Q_OBJECT - public: - /** - * Returns a pointer to the factory. - * Use this function to get an instance of KLibLoader. - * - * @return a pointer to the loader. If no loader exists until now then - * one is created - */ - static Factory * self(); - - /** - * Create a new Player. - * - * You need to call it like this: - * \code - * Factory::self()->createPlayer(); - * \endcode - * - * @return a pointer to the Player the backend provides - */ - Player * createPlayer(); - - /** - * Create a new VideoPlayer object. The Backend does not have to - * implement this functionality so you have to check that it didn't - * return 0. - * - * @return A new instance to a VideoPlayer from the Backend. Or 0 if - * the Backend does not support the VideoPlayer interface. - */ - VideoPlayer * createVideoPlayer(); - - /** - * Play the specified sound-file with no further control. Returns - * immediatly. - * - * @return if the file was be succesfully issued, but is not a - * garantie for succes of playing the entire file. - */ - bool playSoundEvent(const KURL & url); - - /** - * Creates a new Channel object that you can use for a Player object to - * play to. - * - * \param title A user visible title for the Channel. Most of the time - * you will use the application's name. - * - * \param channeltype \ref availableChannels() returns a list of strings - * where you can choose one to be used. Most of the time you will use - * the "default" channel. But the Backend could also provide special - * purpose channels like one for notifications, one for previews and one - * for media playback. - * - * \param direction Whether it's a Channel::Input or Channel::Output - * that you're requesting. - * - * \returns Returns a Channel object or 0 if your request couldn't be - * fullfilled. - */ - Channel * createChannel( const TQString & title, - const TQString & channeltype = TQString::fromLatin1( "default" ), - Channel::Direction direction = Channel::Output ); - - /** - * Returns the names of the channels that can be used to play or record, - * depending on the value of \p direction. - * - * \param direction If set to Channel::Output you will get the names of - * all output channels, if set to Channel::Input you get the same for - * the input channels. - */ - TQStringList availableChannels( Channel::Direction direction = Channel::Output ) const; - - /** - * Returns the mimetypes that can be played. - */ - TQStringList playableMimeTypes() const; - - /** - * Checks whether a certain mimetype is playable. - */ - bool isMimeTypePlayable( const TQString & mimetype ) const; - - /** - * Get the name of the Backend. It's the name from the .desktop file. - */ - TQString backendName() const; - - /** - * Get the comment of the Backend. It's the comment from the .desktop file. - */ - TQString backendComment() const; - - /** - * Get the version of the Backend. It's the version from the .desktop file. - * - * The version is especially interesting if there are several versions - * available for binary incompatible versions of the backend's media - * framework. - */ - TQString backendVersion() const; - - /** - * Get the icon (name) of the Backend. It's the icon from the .desktop file. - */ - TQString backendIcon() const; - - /** - * Get the website of the Backend. It's the website from the .desktop file. - */ - TQString backendWebsite() const; - - signals: - /** - * This signal is emitted when the user changes the backend. You then - * have to free all your references to Player or Channel objects. - */ - void deleteYourObjects(); - - /** - * After you got a deleteYourObjects() signal the backend is changed - * internally. Then you will receive this signal, and only then should - * you reconstruct all your objects again. This time they will - * internally use the new backend. - */ - void recreateObjects(); - - protected: - Factory(); - ~Factory(); - - private slots: - void objectDestroyed( TQObject * ); - - private: - static Factory * m_self; - class Private; - Private * d; - - K_DCOP - k_dcop: - /** - * \internal - * This is called via DCOP when the user changes the KDEMM Backend. - */ - void kdemmBackendChanged(); - -}; -}} // namespaces - -#endif // BACKENDFACTORY_H -// vim: sw=4 ts=4 tw=80 noet diff --git a/kdemm/mixeriface.h b/kdemm/mixeriface.h deleted file mode 100644 index ddd348dc8..000000000 --- a/kdemm/mixeriface.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef MIXERIFACE_H -#define MIXERIFACE_H - -#include -#include - -class KDE_EXPORT MixerIface : public DCOPObject -{ - K_DCOP - k_dcop: - virtual TQString channelName() const = 0; - virtual TQString channelType() const = 0; - virtual bool hasVolumeControl() const = 0; - virtual float volume() const = 0; - virtual bool setVolume( float volume ) = 0; - - protected: - MixerIface() : DCOPObject( "MixerIface" ) {} -}; - -#endif // MIXERIFACE_H -// vim: sw=4 ts=4 noet tw=80 diff --git a/kdemm/mmbackendinfo.desktop b/kdemm/mmbackendinfo.desktop deleted file mode 100644 index 001a48c58..000000000 --- a/kdemm/mmbackendinfo.desktop +++ /dev/null @@ -1,30 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Type=ServiceType -X-KDE-ServiceType=KDEMultimediaBackend -Name=KDE Multimedia Backend - -[PropertyDef::X-KDE-MMBackendInfo-Version] -Type=QString - -[PropertyDef::X-KDE-MMBackendInfo-Website] -Type=QString - -#[PropertyDef::X-KDE-MMBackendInfo-Supports] -#Type=QStringList -# -#[PropertyDef::X-KDE-MMBackendInfo-Depends] -#Type=QStringList -# -#[PropertyDef::X-KDE-MMBackendInfo-License] -#Type=QString -# -#[PropertyDef::X-KDE-MMBackendInfo-Author] -#Type=QString -# -#[PropertyDef::X-KDE-MMBackendInfo-Email] -#Type=QString -# -#[PropertyDef::X-KDE-MMBackendInfo-Name] -#Type=QString -# diff --git a/kdemm/player.cpp b/kdemm/player.cpp deleted file mode 100644 index b9a8ecaa0..000000000 --- a/kdemm/player.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "player.h" - -namespace KDE { -namespace Multimedia { -Player::Player( TQObject * parent, const char * name ) - : TQObject( parent, name ) - , m_state( Player::NoMedia ) -{ -} - -Player::~Player() -{ -} - -Player::State Player::state() const -{ - return m_state; -} - -void Player::setState( Player::State newstate ) -{ - if( m_state != newstate ) - { - Player::State oldstate = m_state; - m_state = newstate; - emit stateChanged( newstate, oldstate ); - } -} - -}} // namespaces - -#include "player.moc" - -// vim: sw=4 ts=4 noet diff --git a/kdemm/player.h b/kdemm/player.h deleted file mode 100644 index 2f31152d4..000000000 --- a/kdemm/player.h +++ /dev/null @@ -1,259 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef PLAYOBJECT_H -#define PLAYOBJECT_H - -#include -#include - -class KURL; - -namespace KDE -{ -namespace Multimedia -{ - class Channel; - /** - * \short Interface for accessing media playback functions - * - * \author Matthias Kretz - * \since 4.0 - */ - class Player : public QObject - { - Q_OBJECT - public: - /** - * The state the playobject is in at the moment - */ - enum State - { - /** - * The load method wasn't called or didn't succeed. If the - * object is in this state the next thing you have to do is to - * call load. - */ - NoMedia, - /** - * After calling load it might take a while before the Player is - * ready to play(). Normally this doesn't happen for local - * files, but can happen for remote files where the asynchronous - * mimetype detection can take a while. - */ - Loading, - /** - * The Player has a valid media file loaded and is ready for - * playing. - */ - Stopped, - /** - * The Player is playing a media file. - */ - Playing, - /** - * The Player is waiting for data to be able to continue - * playing. - */ - Buffering, - /** - * The Player is paused currently. - */ - Paused - }; - - virtual ~Player(); - - /** - * Set the output device the Player should use. - * - * @return Returns \p true on success. If it returns \p false the - * output device wasn't changed. This could happen if you pass a - * Channel with Channel::direction() == Channel::Input. - */ - virtual bool setOutputChannel( Channel * device ) = 0; - - /** - * Get the current state. - */ - virtual State state() const; - - /** - * Check whether the Player supports to control the volume. - * - * @returns Return \p true if the Player can change its volume. - */ - virtual bool hasVolumeControl() const = 0; - - /** - * Get the current volume. - * - * @returns the current volume - */ - virtual float volume() const = 0; - - /** - * Get the total time (in milliseconds) of the file currently being played. - */ - virtual long totalTime() const = 0; - - /** - * Get the remaining time (in milliseconds) of the file currently being played. - */ - virtual long remainingTime() const = 0; - - /** - * Get the current time (in milliseconds) of the file currently being played. - */ - virtual long currentTime() const = 0; - - /** - * If the current media may be seeked returns true. - * - * @returns whether the current media may be seeked. - */ - virtual bool seekable() const = 0; - - /** - * Return the time interval in milliseconds between two ticks. - */ - virtual long tickInterval() const = 0; - - public slots: - /** - * Load a media file. If another media is currently loaded it is - * stopped and unloaded. - * - * @param url The location of the media file - * - * @returns If the call was successfull (the media file was found - * and can be read and decoded) returns \p true - */ - virtual bool load( const KURL & url ) = 0; - - /** - * Play the media file. - */ - virtual bool play() = 0; - - /** - * Pause a playing media. If it was paused before nothing changes. - */ - virtual bool pause() = 0; - - /** - * Stop a playback. - */ - virtual bool stop() = 0; - - /** - * Set the volume of the playback - * - * @param volume 0.0 is complete silence and 1.0 is full volume. - * Higher values than 1.0 are possible but might - * result in distortion of the sound. - * - * @returns returns \p true if the call was successfull, returns \p - * false if the volume change didn't work and therefor didn't - * change. - */ - virtual bool setVolume( float volume ) = 0; - - /** - * Seek to the time indicated. - * - * @param time The time in milliseconds where to continue playing. - * - * @returns whether the seek was successfull. - */ - virtual bool seek( long time ) = 0; - - /** - * Change the interval the tick signal is emitted. If you set \p ms - * to 0 the signal gets disabled. - * - * \param ms tick interval in milliseconds - * - * @returns Returns \p true if the tick intervall was changed. - */ - virtual bool setTickInterval( long ms ) = 0; - - signals: - /** - * Emitted when the file has finished playing on its own. - * I.e. it is not emitted if you call stop(), pause() or - * load(), but only on end-of-file or a critical error. - */ - void finished(); - - //XXX do we want a aboutToFinish() signal? - - /** - * Emitted when the state of the Player has changed. - * In case you're not interested in the old state you can also - * connect to a slot that only has one State argument. - * - * @param newstate The state the Player is in now - * @param oldstate The state the Player was in before - */ - void stateChanged( KDE::Multimedia::Player::State newstate, KDE::Multimedia::Player::State oldstate ); - - /** - * This signal gets emitted every tickInterval milliseconds. - * - * \param time The position of the media file in milliseconds. - * - * \see setTickInterval, tickInterval - */ - void tick( long time ); - - /** - * This signal is emitted as soon as the length of the media file is - * known or has changed. - * - * @param length The length of the media file in milliseconds. - */ - void length( long length ); - - protected: - /** - * You can not instantiate players yourself, use the Factory to - * create them. - */ - Player( TQObject * parent, const char * name ); - - /** - * Call this in your reimplementation for state changes. - * It emits the stateChanged signal if the state has really changed. - * - * @param newstate The new state of the Player. If \p newstate is - * equal to the old state() the call will be ignored. - */ - void setState( State newstate ); - - private: - class Private; - Private * d; - - State m_state; - }; -}} //namespaces - -// vim: sw=4 ts=4 tw=80 noet -#endif // PLAYOBJECT_H diff --git a/kdemm/reqspec.html b/kdemm/reqspec.html deleted file mode 100644 index a07860c79..000000000 --- a/kdemm/reqspec.html +++ /dev/null @@ -1,533 +0,0 @@ -Requirements & Specification -

Requirements & Specification

- -
-

1. Problem Statement

- -

KDE needs to integrate better into existing Multimedia solutions for Linux.

- -

Currently many KDE apps use aRts as media framework and soundserver, while other apps use mplayer, xine and/or gstreamer to do what they need. Sometimes this results in mutually exclusive usage of the soundcard and generally it's an unneeded overhead.

- -

KDE Developers should be able to "natively" use multimedia functions in the KDE API. The KDE Mulitmedia API (short kdemm) should provide an easy to use and Qt/KDE API like aproach to multimedia functionality.

- -

Nowadays when a KDE developer wants to add multimedia functionality to his program he can either choose one framework to do it, write all the media code himself (nobody does this, and probably nobody should) or use an abstraction to be able to use more than one framework. Most of the time the development models (object model, programming language) are not the same as a KDE developer is used to. And very often the API of the framework used is more complicated than the task he wants to accomplish. The kdemm API should be useable without any knowledge about media frameworks and how these things work internally.

- -

The API does not aim to be a general Linux solution to multimedia. It aims to be the solution for all KDE developers.

- -

KDE should ease the use of pro audio tools on Linux and provide the necessary configuration and integration so that for pro audio tools the DE of choice is KDE.

- -
-

2. Requirements

- -
-

2.1. Actors

- -
-

Actor: Admin

- - - - - - - -
DescriptionAdministrates a KDE installation. Most users are their own admins...
Initiated User Tasksconfigure Multimedia sytems
Initiated Use CasesConfigure kdemm

- -
-

Actor: KDE Developer

- - - - - - - -
DescriptionThe average KDE Developer who might need some multimedia functionality, like playing a media object, for his program.
Initiated User Tasksadd media playback to his program
Initiated Use Casesadd media playback functionality to a program, initialize kdemm

- -
-

Actor: KDE Multimedia Developer

- - - - - - - -
DescriptionKDE Developer writing a media application like a jukebox or full-featured media player.
Initiated User TasksDevelop Media Player
Initiated Use Casesmedia playback, manage video window, modify audio path, play media object, load media object, create reusable audio path, crossfading

- -
-

Actor: KDE User

- - - - - - - -
DescriptionUser of the K Desktop Environment.
Initiated User Taskschange audio output volume
Initiated Use Caseschange audio volume

- -
-

2.2. User Tasks

- -

Actor Admin initilizes the following user tasks

- -
-

User Task: configure Multimedia sytems

- - - - - -
DescriptionHis aim is to make all multimedia applications work happily side by side.

He has several options to select, like the audio driver backend to use OSS or ALSA, whether he wants to have a soundserver running and what application uses what audio output. He can set the video output method, like e.g. xv or SDL or plain X.

This has to be done so that applications don't block each other and sometimes to make them interact with one another (like you can do with soundservers).

It is important to have it correctly configured else the user will have problems whenever he uses multimedia programs.

This configuration has to be done once until a new program is installed that is incompatible with the setup. Ideally this task has to be done once and never again.
Realized in Use CasesConfigure kdemm

-
-
- -

Actor KDE Developer initilizes the following user tasks

- -
-

User Task: add media playback to his program

- - - - - -
DescriptionThe average KDE Developer might want to add media playback functionality to his program, meaning that his program will be able to play a sound file or even video file.

He can select from a lot of choices how to achieve his goal.
- write the relevant audio/video code himself
- select and use a media framework like gstreamer or aRts
- use existing code from kdelibs (might not be enough for what he's trying to do)

A lot of programs nowadays need to have multimedia functionality.

It's important that KDE developers can add multimedia functionality to their programs.
Realized in Use Casesadd media playback functionality to a program

-
-
- -

Actor KDE Multimedia Developer initilizes the following user tasks

- -
-

User Task: Develop Media Player

- - - - - -
DescriptionAim: The developers aim is to write a full featured media player like mplayer, xine, all the frontends for the former, windoze media player :-P, realplayer, you name it.

Options: He can choose from a variety of available code, like NMM, gstreamer, aRts to a certain extend, mplayer or (lib)xine to provide for his multimedia needs. He can choose how to output the audio and video as far as the former choice gives him options. There are constraints on what media formats he can play or what he can do with the data depending on his choice of media backend/framework.

Reason: A modern desktop environment needs to have a modern media player with all the latest bells and whistles.

Priority: It is important that KDE has "native" media players.

Info-In:
- knowledge about what other media players can do
- features asked for by users (e.g. EQ is a must have for some users)
Realized in Use Casesmedia playback, manage video window, modify audio path, play media object, load media object, create reusable audio path, crossfading

-
-
- -

Actor KDE User initilizes the following user tasks

- -
-

User Task: change audio output volume

- - - - - -
DescriptionThe user wants to change the volume of some program because it is too loud compared to the sound of another program.

This is a tricky task for the user if the program itself doesn't allow to attenuate its sound. If it does he can use the volume control of the program. If it doesn't he has to use a soundserver that allows him to use a volume control for this one specific program only.

It is rather important to have this functionality as it can become pretty anoying if you e.g. want to get notifications when people are chatting with you while you're listening to classical music. The notifications really need attenuation.

It might happen a few times a day that a user needs this functionality.
Realized in Use Caseschange audio volume

- -
-

2.3. Domain Data

- -

When I say "sent" in the diagram below I'm actually talking about the data flow in the underlying media framework. kdemm only creates connections so that the data flow is done by the framework.

- - - -
-

2.4. Domain Constraints

- - - -
Network transparencyIt must be possible to run the desktop over the network, not only the GUI, but also audio output. If it is possible, the system should try to play the audio on the computer where the GUI is shown by default.

- -
-

2.5. Quality Constraints

- -
-

2.6. Interaction Data

- -
-

3. Specification

- -

When reading the use cases keep in mind that the user often is the Application Developer. So the actor steps are steps the application written by the developer does.

- -
-

3.1. Use Cases

- -
-

Use Case: add media playback functionality to a program

- - - - - - - - - - - - - - - - - - - - - - - -
Initiating ActorKDE Developer
Preconditionsthe kdemm API has been initialized without errors (see use case "initialize kdemm")
FlowStepsActorSystem
Tell kdemm what media object you want to play back.
Check whether the media object is one of the known types that the backend can decode. If it cannot be decoded error out.
Prepare for being asked to play back the media object, to seek in it or other operations.
a) Ask for meta information of the current media object. (e.g. length, bitrate, etc.) --> go on with step 5

or

b) asking kdemm to play the media object --> go on with step 7
read out meta information, either using the media backend if it supports this function, or using other external libs
display meta information on the GUI while asking kdemm to play the media object
Tell media backend to start playing.
Wait for notification that the media object has finished playing. Remove display of meta info and clean up all used datastructures.

- -
-

Use Case: change audio volume

- - - - - - - - - - - - - - - - - -
Initiating ActorKDE User
Preconditionsa kdemm using program (let's call it A) is running with its volume being x
FlowStepsActorSystem
open KDE Mixer Window
look for all available volume controls and show them (with informative description what control does what) to the user
locate the control for A and move the fader down
decrease the output volume of A
PostconditionsA is running with output volume y < x

- -
-

Use Case: Configure kdemm

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Initiating ActorAdmin
PreconditionsKDE is installed and the backends the Admin wants to use are installed.
FlowStepsActorSystem
open kdemm admin tool
kdemm looks for available options (media frameworks and their output options) and presents these options in a view (see glossary). One framework is already selected as KDE default and kdemm does a good guess (based on audio driver) on what should be the default audio output option.
For the selected media framework there might be more options that need to be shown.
Also if the audio output choice has configuration options they get shown. (e.g. jackd has a lot of options that are more or less important to the admin)
select another media framework
Change audio output options according to what the framework supports.

Provide access to the configuration options of the just selected media framework.
take a look at media framework config options
show media framework config options (e.g. NMM might show some network related options here)
tweak a few settings
write config out so that programs using kdemm behave like configured
change default audio output
Set the media framework to use the specified audio output.

Provide access to the configuration options of the newly selected audio output.
save settings and close admin tool
write out all configuration and tell all kdemm programs to use the new configuration

- -
-

Use Case: create reusable audio path

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Initiating ActorKDE Multimedia Developer
Preconditionsthe kdemm API has been initialized without errors (see use case "initialize kdemm")
FlowStepsActorSystem
Ask kdemm for an "audio path"
Create a representation for the flow graph audio normally takes from the media object to the output and return an interface to it.
Ask for a list of effects that can be inserted into the audio path.
Look what effects the media framework supports and return a list that describes those effects (1. information for the end-user, 2. info that a computer program can recognize and identify, 3. unique identifier for the effect)
Create list of effects and let the user decide what effects he wants. Tell kdemm to insert effects into the audio path.
Prepare an audio path with the selected effects for later use.
optional steps:
The user decides to configure the parameters of one effect.
Return a Widget showing the parameters the effect has so that the user can configure the effects.
Ask kdemm to save the state of the current audio path to a configuration object.
Look at current audio path, the contained effects and the parameters of the effects. Write those values in the configuration object.
load media
Tell kdemm to use the above audio path for the media object.
Change flow graph of media framework to use the selected audio path.
play

- -
-

Use Case: crossfading

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Initiating ActorKDE Multimedia Developer
Preconditionsthe kdemm API has been initialized without errors (see use case "initialize kdemm")
FlowStepsActorSystem
Ask kdemm to send a notification 3 seconds before a media object finishes playing.
tell "notification system" from the media framework if it has one, else start a timer that checks for the end of playback to send the notification
take from playlist
Insert a "Fader" effect into the audio path of the media object
Change flow graph of the media framework to include the "Fader" effect.
play
take from playlist
Insert a "Fader" effect into the audio path of the media object
Change flow graph of the media framework to include the "Fader" effect.
When notification arrives tell the Fader of media object 1 to fade out in 3 seconds. Tell the Fader of media object 2 to fade in in 3 seconds and start playing media object 2.

- -
-

Use Case: initialize kdemm

- - - - - - - - - - - - - -
Initiating ActorKDE Developer
PreconditionsKDE and all its libraries are installed correctly.
FlowStepsActorSystem
ask kdemm to initialize
Look at config set by the admin tool and accordingly load the media framework code and initialize an audio output that is at this point already available for the kdemm mixer API.
Postconditionskdemm is initialized and ready for action

- -
-

Use Case: load media object

- - - - - - - - - - - - - -
Initiating ActorKDE Multimedia Developer
Preconditionsthe kdemm API has been initialized without errors (see use case "initialize kdemm")
FlowStepsActorSystem
Tell kdemm to load a media object.
Prepare media framework for working with the media object (play, seek, etc.).
PostconditionsMedia object is ready for use.

- -
-

Use Case: manage video window

- - - - - - - - - - - - - - - - - - - - - - - - - -
Initiating ActorKDE Multimedia Developer
Preconditionsthe kdemm API has been initialized without errors (see use case "initialize kdemm")
FlowStepsActorSystem
Ask kdemm for a dedicated video widget.
Create widget and keep reference to it for so that all video output at some later point can be displayed in this widget.
optional step - can be inserted at any point from here on:
Resize video widget (might also be fullscreen display).
Adjust for new video output size: video needs to be scaled to fit into the widget.
Ask for available video ratio options.
Ask media framework for available video ratio options. If the media framework doesn't provide any options
Mark the currently used option.
Select one of the ratio options.
Change video ratio.

- -
-

Use Case: media playback

- - - - - - - - - - - - - - - - - - - -
Initiating ActorKDE Multimedia Developer
Preconditionsthe kdemm API has been initialized without errors (see use case "initialize kdemm")
FlowStepsActorSystem
Tell kdemm to send a notification whenever a media object is about to finish playing.
tell "notification system" from the media framework if it has one, else start a timer that checks for the end of playback to send the notification
Take first media object from the playlist
play
When notified that the playback is about to end
When notified that the playback has finished

- -
-

Use Case: modify audio path

- - - - - - - - - - - - - - - - - - - - - - - -
Initiating ActorKDE Multimedia Developer
Preconditionsthe kdemm API has been initialized without errors (see use case "initialize kdemm")
FlowStepsActorSystem
load
Ask for "audio path" of the media object.
Prepare for changing the flow graph of the audio going from the media object to the default output. Return a reference to an object that can be used to modify the path the audio takes.
Ask for a list of effects that can be inserted into the audio path.
Look what effects the media framework supports and return a list that describes those effects (1. information for the end-user, 2. info that a computer program can recognize and identify, 3. unique identifier for the effect)
Select an effect and tell kdemm to insert it into the audio path (the position can also be specified)
Change audio flow graph of the media framework to include the selected effect at the specified position.
play with effect

- -
-

Use Case: play media object

- - - - - - - - - - - -
Initiating ActorKDE Multimedia Developer
Preconditionsa media object has been loaded (include use case "load media object")
FlowStepsActorSystem
Ask kdemm to play the media.
Instruct the media framework to play.

- -
-

3.2. Features

- -
-

Feature: create media object

- - - - - - - - - -
DescriptionCheck whether the media data can be accessed and decoded. If not return an error indicating the problem.
Use the underlying media framework to create a flow graph for reading and decoding the media data. (If the media framework does not support reading data from a remote location an extension has to be created that can use KIO to read the data.)
Create an object to represent the media data.
InputsURL to the media data
Outputsmedia object
Used in Use Casesload media object

- -
-

Feature: init notifications

- - - - - - - -
Descriptiontwo cases:
if( The media framework can produce the notification in question ) {
Initialize notifications from media framework and prepare to forward them.
} else {
Use timer to send ticks and check for end of media playback.
}
Inputs- time before media playback ends
- time between ticks
- what notifications to enable/disable (choices are: ticks, aboutToEnd, end)
Used in Use Casesmedia playback, crossfading

- -
-

3.3. Global Functional Constraints

- -
-

3.4. Quality Constraints on Use Cases

- -
-

3.5. Quality Constraints on Features

- -
-

3.6. Architectural Constraints

- -
-

3.7. User Interface Constraints

- -
-

4. Examples

- -
-

4.1. Actor Instances

- -
-

4.2. Scenarios

- -
-

5. Glossary

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
admin options view
The kdemm admin tool shows a selection for the media framework and the audio output. Both define an order in which the kdemm applications try to use the framework/audio output. -Further options can be reached in another view for the media framework and the audio output.
 
ALSA
Advanced Linux Sound Architecture: new audio interface for Linux
 
API
Application Programmer Interface: The interface that the Application Programmer uses to interact with the kdemm framework.
 
aRts
analog Realtime Synthesizer: the current soundserver and "media framework" of KDE
 
BC
binary compatibility: If the ABI (application binary interface) is changed in an incompatible way (http://developer.kde.org/documentation/other/binarycompatibility.html) the programs using the library will crash.
 
DE
Desktop Environment
 
desktop
The GUIs of today all work with the metaphor of a "desktop" on your screen. The elements on screen are the objects that you can handle and work with.
 
EQ
equalizer: audio filter to boost and attenuate selected frequencies of the signal
 
flow graph
In media frameworks the flow of media data is modeled as a flow graph. There are nodes representing data sources, data processors and data sinks.
 
gstreamer
GStreamer is a library that allows the construction of graphs of media-handling components, ranging from simple Ogg/Vorbis playback to complex audio (mixing) and video (non-linear editing) processing.
 
GUI
Graphical User Interface
 
kdemm
short for KDE Multimedia - it's the name of the library/framework the API discussed in here is going to have.
 
media object
A media object is a representation for the media data. This could be an audio or video file or stream.
 
mplayer
media player that is often used as backend for other media player GUIs
 
NMM
NETWORK-INTEGRATED MULTIMEDIA MIDDLEWARE: a network-integrated multimedia infrastructure for Linux (as well as other operating systems)
 
OSS
Open Sound System: audio interface for UNIX systems
 
SDL
Simple DirectMedia Layer: multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer
 
tick
While playing a media file a common task is to show the current position in the file. A tick is a signal every second or so to notify about the progress.
 
URL
Uniform Resource Locator (http://en.wikipedia.org/wiki/Uniform_Resource_Locator)
 
user
As long as I talk about API usage the user equals the AP in API.
 
X
X Window system: The client server architecture used for most UNIX GUI programs.
 
xine
xine is a free multimedia player. It plays back CDs, DVDs, and VCDs. It also decodes multimedia files like AVI, MOV, WMV, and MP3 from local disk drives, and displays multimedia streamed over the Internet. It interprets many of the most common multimedia formats available - and some of the most uncommon formats, too.
 
xv
X Video: extension to X for hardware accelerated video display

- diff --git a/kdemm/simpleplayer.cpp b/kdemm/simpleplayer.cpp deleted file mode 100644 index ec3d8e218..000000000 --- a/kdemm/simpleplayer.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "simpleplayer.h" -#include -#include -#include -#include - -namespace KDE -{ -namespace Multimedia -{ - -class SimplePlayer::Private -{ - public: - Channel * channel; - Player * player; - - KURL url; - Player::State state; - float channelvolume; - long time; - TQString title; - TQString type; -}; - -SimplePlayer::SimplePlayer( TQObject * parent, const char * name ) - : TQObject( parent, name ) - , d( new Private ) -{ - connect( Factory::self(), TQT_SIGNAL( deleteYourObjects() ), TQT_SLOT( deleteYourObjects() ) ); - connect( Factory::self(), TQT_SIGNAL( recreateObjects() ), TQT_SLOT( recreateObjects() ) ); - d->channel = Factory::self()->createChannel( KGlobal::instance()->aboutData()->programName() ); - d->player = Factory::self()->createPlayer(); - if ( d->player ) { - d->player->setOutputChannel( d->channel ); - connect( d->player, TQT_SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ), - TQT_SLOT( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ) ); - connect( d->player, TQT_SIGNAL( finished() ), TQT_SIGNAL( finished() ) ); - }; -} - -SimplePlayer::~SimplePlayer() -{ - delete d->player; - delete d->channel; -} - -void SimplePlayer::play( const KURL & url ) -{ - if( ! d->player ) - return; - if( isPaused() && url == d->url ) - { - d->player->play(); - return; - } - if( ! d->player->load( url ) ) - return; - d->url = url; - if( d->player->state() == Player::Stopped ) - d->player->play(); -} - -void SimplePlayer::pause() -{ - if( ! d->player ) - return; - d->player->pause(); -} - -void SimplePlayer::stop() -{ - if( ! d->player ) - return; - d->player->stop(); -} - -long SimplePlayer::totalTime() const -{ - if( ! d->player ) - return 0; - return d->player->totalTime(); -} - -long SimplePlayer::currentTime() const -{ - if( ! d->player ) - return 0; - return d->player->currentTime(); -} - -void SimplePlayer::seek( long ms ) -{ - if( ! d->player ) - return; - d->player->seek( ms ); -} - -float SimplePlayer::volume() const -{ - if( ! d->player ) - return 0; - return d->channel->volume(); -} - -void SimplePlayer::setVolume( float v ) -{ - if( ! d->player ) - return; - d->channel->setVolume( v ); -} - -bool SimplePlayer::isPlaying() const -{ - if( ! d->player ) - return false; - return ( d->player->state() == Player::Playing ); -} - -bool SimplePlayer::isPaused() const -{ - if( ! d->player ) - return false; - return ( d->player->state() == Player::Paused ); -} - -void SimplePlayer::stateChanged( Player::State ns, Player::State os ) -{ - if( ! d->player ) - return; - if( os == Player::Loading && ns == Player::Stopped ) - d->player->play(); -} - -void SimplePlayer::deleteYourObjects() -{ - d->state = d->player->state(); - d->channelvolume = d->channel->volume(); - d->time = d->player->currentTime(); - d->title = d->channel->channelName(); - d->type = d->channel->channelType(); - - if( d->player ) - d->player->stop(); - - delete d->player; - delete d->channel; - d->player = 0; - d->channel = 0; -} - -void SimplePlayer::recreateObjects() -{ - d->channel = Factory::self()->createChannel( d->title, d->type ); - d->channel->setVolume( d->channelvolume ); - - d->player = Factory::self()->createPlayer(); - if( ! d->player ) - return; - - d->player->setOutputChannel( d->channel ); - - if( d->state != Player::NoMedia ) - if( ! d->player->load( d->url ) ) - return; - if( d->state == Player::Playing || d->state == Player::Paused || d->state == Player::Buffering ) - { - d->player->play(); - d->player->seek( d->time ); - if( d->state == Player::Paused ) - d->player->pause(); - } -} - -}} // namespaces - -#include "simpleplayer.moc" - -// vim: sw=4 ts=4 noet diff --git a/kdemm/simpleplayer.h b/kdemm/simpleplayer.h deleted file mode 100644 index 01175e8f6..000000000 --- a/kdemm/simpleplayer.h +++ /dev/null @@ -1,72 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef SIMPLEPLAYER_H -#define SIMPLEPLAYER_H - -#include -#include -#include -#include - -class KURL; - -namespace KDE -{ -namespace Multimedia -{ - -class KDE_EXPORT SimplePlayer : public TQObject -{ - Q_OBJECT - public: - SimplePlayer( TQObject * parent = 0, const char * name = 0 ); - ~SimplePlayer(); - - void play( const KURL & url ); - void pause(); - void stop(); - - long totalTime() const; - long currentTime() const; - void seek( long ms ); - - float volume() const; - void setVolume( float volume ); - - bool isPlaying() const; - bool isPaused() const; - - signals: - void finished(); - - private slots: - void stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ); - void deleteYourObjects(); - void recreateObjects(); - - private: - class Private; - Private * d; -}; - -}} // namespaces - -#endif // SIMPLEPLAYER_H -// vim: sw=4 ts=4 noet tw=80 diff --git a/kdemm/test/Makefile.am b/kdemm/test/Makefile.am deleted file mode 100644 index e7e3a7576..000000000 --- a/kdemm/test/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 2004 Matthias Kretz - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License version 2 as published by the Free Software Foundation. - -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES = -I$(top_srcdir)/kdemm $(all_includes) - -METASOURCES = AUTO - -check_PROGRAMS = guitest statetest - -guitest_SOURCES = main.cpp testwidget.cpp -guitest_LDFLAGS = $(KDE_RPATH) $(all_libraries) -guitest_LDADD = $(LIB_KPARTS) $(top_builddir)/kdemm/libkdemm.la - -statetest_SOURCES = statetest.cpp -statetest_LDFLAGS = $(KDE_RPATH) $(all_libraries) -statetest_LDADD = $(top_builddir)/kdemm/libkdemm.la diff --git a/kdemm/test/main.cpp b/kdemm/test/main.cpp deleted file mode 100644 index 588a531af..000000000 --- a/kdemm/test/main.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include -#include -#include -#include "testwidget.h" - -int main( int argc, char ** argv ) -{ - KAboutData about( "kdemmtest", "KDE Multimedia Test", - "0.1", "Testprogram", - KAboutData::License_LGPL, 0 ); - about.addAuthor( "Matthias Kretz", 0, "kretz@kde.org" ); - KCmdLineArgs::init( argc, argv, &about ); - KApplication app; - TestWidget foo; - app.setMainWidget( &foo ); - return app.exec(); -} - -// vim: sw=4 ts=4 noet diff --git a/kdemm/test/statetest.cpp b/kdemm/test/statetest.cpp deleted file mode 100644 index 25654836f..000000000 --- a/kdemm/test/statetest.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "statetest.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -using namespace KDE::Multimedia; - -kdbgstream& operator<<( kdbgstream & stream, const Player::State state ) -{ - switch( state ) - { - case Player::NoMedia: - stream << "NoMedia"; - break; - case Player::Loading: - stream << "Loading"; - break; - case Player::Stopped: - stream << "Stopped"; - break; - case Player::Playing: - stream << "Playing"; - break; - case Player::Buffering: - stream << "Buffering"; - break; - case Player::Paused: - stream << "Paused"; - break; - } - - return stream; -} - -void StateTester::run( const KURL & url ) -{ - /* - check for correct states: - - - after construction: - NoMedia - - - load() - NoMedia -> NoMedia, (only? for remote files: Loading -> NoMedia, Stopped ), Stopped - - - play() - Stopped, Paused -> Playing (except: Stopped -> Stopped) - - - when playing: - Playing -> Buffering -> Playing - - - pause() - Playing -> Paused - - - stop() - Playing, Paused -> Stopped - */ - - f = Factory::self(); - kdDebug() << "using backend: " << f->backendName() << - "\n Comment: " << f->backendComment() << - "\n Version: " << f->backendVersion() << endl; - - c = f->createChannel( "teststates" ); - p = f->createPlayer(); - p->setOutputChannel( c ); - connect( p, TQT_SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ), - TQT_SLOT( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ) ); - connect( p, TQT_SIGNAL( finished() ), kapp, TQT_SLOT( quit() ) ); - - if( p->state() != Player::NoMedia ) - kdDebug() << p->state() << " should be NoMedia" << endl; - - kdDebug() << "loading " << url << endl; - - if( ! p->load( url ) ) - kdDebug() << "load failed" << endl; - if( p->state() == Player::Loading ) - kdDebug() << "wait until Player finished Loading" << endl; - else if( p->state() == Player::Stopped ) - testplaying(); - else if( p->state() == Player::NoMedia ) - { - kdDebug() << "could not load media. exiting." << endl; - exit( 0 ); - } -} - -void StateTester::stateChanged( Player::State newstate, Player::State oldstate ) -{ - kdDebug() << "stateChanged( new = " << newstate << ", old = " << oldstate << " )" << endl; - switch( oldstate ) - { - case Player::NoMedia: - switch( newstate ) - { - case Player::NoMedia: - case Player::Loading: - case Player::Stopped: - return; - default: - break; - } - case Player::Loading: - switch( newstate ) - { - case Player::NoMedia: - return; - case Player::Stopped: - testplaying(); - return; - default: - break; - } - case Player::Stopped: - switch( newstate ) - { - case Player::Playing: - case Player::Stopped: - return; - default: - break; - } - case Player::Playing: - switch( newstate ) - { - case Player::Buffering: - //testbuffering(); - case Player::Paused: - case Player::Stopped: - return; - default: - break; - } - case Player::Buffering: - switch( newstate ) - { - case Player::Playing: - case Player::Stopped: - case Player::Paused: - return; - default: - break; - } - case Player::Paused: - switch( newstate ) - { - case Player::Playing: - case Player::Stopped: - case Player::Buffering: - return; - default: - break; - } - } - - wrongStateChange(); -} - -void StateTester::testplaying() -{ - if( ! p->play() ) - kdDebug() << "play failed" << endl; - if( p->state() == Player::Stopped ) - { - kdDebug() << "could not play media. exiting." << endl; - exit( 0 ); - } - else if( p->state() == Player::Playing ) - { - if( ! p->pause() ) - { - kdDebug() << "pause failed" << endl; - if( p->state() != Player::Playing ) - wrongStateChange(); - } - else - { - if( p->state() != Player::Paused ) - wrongStateChange(); - if( ! p->play() ) - { - kdDebug() << "play failed" << endl; - if( p->state() != Player::Paused ) - wrongStateChange(); - kdError() << "what now? play shouldn't fail here" << endl; - exit( 1 ); - } - if( p->state() != Player::Playing ) - wrongStateChange(); - } - // it's playing now - if( ! p->stop() ) - { - kdDebug() << "stop failed" << endl; - if( p->state() != Player::Playing ) - wrongStateChange(); - } - else - { - if( p->state() != Player::Stopped ) - wrongStateChange(); - if( ! p->play() ) - { - kdDebug() << "play failed" << endl; - if( p->state() != Player::Stopped ) - wrongStateChange(); - kdError() << "play shouldn't fail after it worked before. exiting." << endl; - exit( 1 ); - } - } - // it's playing again - if( ! p->pause() ) - { - kdDebug() << "pause failed. exiting." << endl; - exit( 1 ); - } - if( p->state() != Player::Paused ) - wrongStateChange(); - if( ! p->stop() ) - { - kdDebug() << "stop failed" << endl; - if( p->state() != Player::Paused ) - wrongStateChange(); - exit( 1 ); - } - if( p->state() != Player::Stopped ) - wrongStateChange(); - // do further checking, calling load again - kdDebug() << "success! playing the last 1/5 of the file now and quit on the finished signal" << endl; - p->play(); - p->seek( p->totalTime() * 4 / 5 ); - } -} - -void StateTester::wrongStateChange() -{ - kdError() << "wrong state change in backend!" << endl; - exit( 1 ); -} - -static const KCmdLineOptions options[] = -{ - { "+url", I18N_NOOP( "media file to play" ), 0 }, - KCmdLineLastOption // End of options. -}; - -int main( int argc, char ** argv ) -{ - KAboutData about( "kdemmtest", "KDE Multimedia Test", - "0.1", "Testprogram", - KAboutData::License_LGPL, 0 ); - about.addAuthor( "Matthias Kretz", 0, "kretz@kde.org" ); - KCmdLineArgs::init( argc, argv, &about ); - KCmdLineArgs::addCmdLineOptions( options ); - KApplication app; // we need it for KTrader - - StateTester tester; - if( KCmdLineArgs::parsedArgs()->count() > 0 ) - tester.run( KCmdLineArgs::parsedArgs()->url( 0 ) ); - else - { - KCmdLineArgs::usage(); - exit( 2 ); - } - - return app.exec(); -} - -#include "statetest.moc" - -// vim: sw=4 ts=4 noet diff --git a/kdemm/test/statetest.h b/kdemm/test/statetest.h deleted file mode 100644 index ff3baff2d..000000000 --- a/kdemm/test/statetest.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef STATETEST_H -#define STATETEST_H - -#include - -#include - -class KURL; - -namespace KDE -{ - namespace Multimedia - { - class Factory; - class Channel; - } -} - -class StateTester : public QObject -{ - Q_OBJECT - public: - void run( const KURL & ); - - private slots: - void stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ); - - private: - void testplaying(); - void wrongStateChange(); - - KDE::Multimedia::Factory * f; - KDE::Multimedia::Channel * c; - KDE::Multimedia::Player * p; -}; - -#endif // STATETEST_H -// vim: sw=4 ts=4 noet diff --git a/kdemm/test/testwidget.cpp b/kdemm/test/testwidget.cpp deleted file mode 100644 index 943bf2b52..000000000 --- a/kdemm/test/testwidget.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "testwidget.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace KDE::Multimedia; - -TestWidget::TestWidget() - : TQWidget( 0, 0 ) - , m_ticking( false ) -{ - c = Factory::self()->createChannel( i18n( "KDE Multimedia testprogram" ) ); - if( ! c ) - kdFatal() << "couldn't create outputdevice" << endl; - po = Factory::self()->createPlayer(); - if( ! po ) - kdFatal() << "couldn't create Player" << endl; - - if( ! po->setOutputChannel( c ) ) - kdFatal() << "PlayObject::setOutputChannel failed" << endl; - - if( ! po->state() == Player::NoMedia ) - kdFatal() << "PlayObject in wrong state 1" << endl; - - ( new TQHBoxLayout( this ) )->setAutoAdd( true ); - - m_v1slider = new TQSlider( this ); - m_v1slider->setRange( 0, 150 ); - m_v1slider->setValue( ( int )( 100 * po->volume() ) ); - connect( m_v1slider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( v1changed( int ) ) ); - - m_v2slider = new TQSlider( this ); - m_v2slider->setRange( 0, 150 ); - m_v2slider->setValue( ( int )( 100 * c->volume() ) ); - connect( m_v2slider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( v2changed( int ) ) ); - - TQFrame * frame = new TQFrame( this ); - ( new TQVBoxLayout( frame ) )->setAutoAdd( true ); - - m_seekslider = new TQSlider( frame ); - m_seekslider->setOrientation( Qt::Horizontal ); - connect( m_seekslider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( seek( int ) ) ); - po->setTickInterval( 100 ); - connect( po, TQT_SIGNAL( tick( long ) ), TQT_SLOT( tick( long ) ) ); - connect( po, TQT_SIGNAL( length( long ) ), TQT_SLOT( length( long ) ) ); - - m_statelabel = new TQLabel( frame ); - connect( po, TQT_SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ), - TQT_SLOT( stateChanged( KDE::Multimedia::Player::State ) ) ); - stateChanged( po->state() ); - - TQPushButton * pause = new TQPushButton( frame ); - pause->setText( "pause" ); - connect( pause, TQT_SIGNAL( clicked() ), po, TQT_SLOT( pause() ) ); - - TQPushButton * play = new TQPushButton( frame ); - play->setText( "play" ); - connect( play, TQT_SIGNAL( clicked() ), po, TQT_SLOT( play() ) ); - - TQPushButton * stop = new TQPushButton( frame ); - stop->setText( "stop" ); - connect( stop, TQT_SIGNAL( clicked() ), po, TQT_SLOT( stop() ) ); - - KLineEdit * file = new KLineEdit( frame ); - file->setCompletionObject( new KURLCompletion( KURLCompletion::FileCompletion ) ); - connect( file, TQT_SIGNAL( returnPressed( const TQString & ) ), TQT_SLOT( loadFile( const TQString & ) ) ); - - TQFrame * frame2 = new TQFrame( this ); - ( new TQVBoxLayout( frame2 ) )->setAutoAdd( true ); - - m_volumelabel1 = new TQLabel( frame2 ); - m_volumelabel1->setText( TQString::number( po->volume() ) ); - - m_volumelabel2 = new TQLabel( frame2 ); - m_volumelabel2->setText( TQString::number( c->volume() ) ); - - m_totaltime = new TQLabel( frame2 ); - m_totaltime->setText( TQString::number( po->totalTime() ) ); - - m_currenttime = new TQLabel( frame2 ); - m_currenttime->setText( TQString::number( po->currentTime() ) ); - - m_remainingtime = new TQLabel( frame2 ); - m_remainingtime->setText( TQString::number( po->remainingTime() ) ); - - show(); - - if( ! po->load( KURL( "/home/mkretz/Musik/qt23.mp3" ) ) ) - kdFatal() << "PlayObject::load failed" << endl; - - connect( po, TQT_SIGNAL( finished() ), qApp, TQT_SLOT( quit() ) ); - -} - -void TestWidget::v1changed( int v ) -{ - if( ! po->setVolume( ( ( float )v ) / 100 ) ) - kdDebug() << "setVolume1 failed" << endl; - m_volumelabel1->setText( TQString::number( po->volume() ) ); -} - -void TestWidget::v2changed( int v ) -{ - if( ! c->setVolume( ( ( float )v ) / 100 ) ) - kdDebug() << "setVolume2 failed" << endl; - m_volumelabel2->setText( TQString::number( c->volume() ) ); -} - -void TestWidget::tick( long t ) -{ - m_ticking = true; - m_seekslider->setValue( t ); - m_currenttime->setText( TQString::number( po->currentTime() ) ); - m_remainingtime->setText( TQString::number( po->remainingTime() ) ); - m_ticking = false; -} - -void TestWidget::stateChanged( Player::State newstate ) -{ - switch( newstate ) - { - case Player::NoMedia: - m_statelabel->setText( "NoMedia" ); - break; - case Player::Loading: - m_statelabel->setText( "Loading" ); - break; - case Player::Stopped: - m_statelabel->setText( "Stopped" ); - break; - case Player::Paused: - m_statelabel->setText( "Paused" ); - break; - case Player::Buffering: - m_statelabel->setText( "Buffering" ); - break; - case Player::Playing: - m_statelabel->setText( "Playing" ); - break; - } -} - -void TestWidget::seek( int ms ) -{ - if( ! m_ticking ) - po->seek( ms ); -} - -void TestWidget::length( long ms ) -{ - m_seekslider->setRange( 0, ms ); - m_totaltime->setText( TQString::number( po->totalTime() ) ); - m_currenttime->setText( TQString::number( po->currentTime() ) ); - m_remainingtime->setText( TQString::number( po->remainingTime() ) ); -} - -void TestWidget::loadFile( const TQString & file ) -{ - po->load( KURL( file ) ); -} - -#include "testwidget.moc" -// vim: sw=4 ts=4 noet diff --git a/kdemm/test/testwidget.h b/kdemm/test/testwidget.h deleted file mode 100644 index 18f3fcef5..000000000 --- a/kdemm/test/testwidget.h +++ /dev/null @@ -1,64 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef TESTWIDGET_H -#define TESTWIDGET_H - -#include - -#include - -class TQSlider; -class TQLabel; -class TQString; - -namespace KDE -{ - namespace Multimedia - { - class Channel; - } -} - -using namespace KDE::Multimedia; - -class TestWidget : public QWidget -{ - Q_OBJECT - public: - TestWidget(); - private slots: - void v1changed( int ); - void v2changed( int ); - void tick( long ); - void stateChanged( KDE::Multimedia::Player::State ); - void seek( int ); - void length( long ); - void loadFile( const TQString & ); - - private: - TQSlider *m_v1slider, *m_v2slider, *m_seekslider; - TQLabel *m_statelabel, *m_volumelabel1, *m_volumelabel2, *m_totaltime, *m_currenttime, *m_remainingtime; - Channel * c; - Player * po; - bool m_ticking; -}; - -#endif // TESTWIDGET_H -// vim: sw=4 ts=4 noet diff --git a/kdemm/videoplayer.cpp b/kdemm/videoplayer.cpp deleted file mode 100644 index 17052d96d..000000000 --- a/kdemm/videoplayer.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "videoplayer.h" - -namespace KDE -{ -namespace Multimedia -{ -VideoPlayer::VideoPlayer( TQObject * parent, const char * name ) - : Player( parent, name ) -{ -} -}} // namespaces - -#include "videoplayer.moc" - -// vim: sw=4 ts=4 noet diff --git a/kdemm/videoplayer.h b/kdemm/videoplayer.h deleted file mode 100644 index f13accd60..000000000 --- a/kdemm/videoplayer.h +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef VIDEOPLAYER_H -#define VIDEOPLAYER_H - -#include "player.h" - -namespace KDE -{ -namespace Multimedia -{ - -class VideoPlayer : public Player -{ - Q_OBJECT - public: - /** - * Create a widget that will show the video. - * - * \param parent The parent to use for the video widget - * \param name The TQObject name for the widget - * - * \returns Returns the video widget. - */ - virtual TQWidget * createVideoWidget( TQWidget * parent, const char * name ) = 0; - - protected: - /** - * You can not instantiate players yourself, use the Factory to - * create them. - */ - VideoPlayer( TQObject * parent, const char * name ); -}; - -}} //namespaces -#endif // VIDEOPLAYER_H -// vim: sw=4 ts=4 tw=80 noet diff --git a/kdemm/volumecontrold/Makefile.am b/kdemm/volumecontrold/Makefile.am deleted file mode 100644 index 058a6ac44..000000000 --- a/kdemm/volumecontrold/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# This file is part of the KDE project -# Copyright (C) 2004 Matthias Kretz - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License version 2 as published by the Free Software Foundation. - -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES = -I$(top_srcdir) $(all_includes) - -kde_module_LTLIBRARIES = kded_volumecontrold.la - -kded_volumecontrold_la_LDFLAGS = $(all_libraries) -module -avoid-version -kded_volumecontrold_la_LIBADD = ../libkdemm.la -kded_volumecontrold_la_SOURCES = volumecontrold.cpp volumecontrold.skel - -METASOURCES = AUTO - -noinst_HEADERS = volumecontrold.h - -services_DATA = volumecontrold.desktop -servicesdir = $(kde_servicesdir)/kded diff --git a/kdemm/volumecontrold/volumecontrold.cpp b/kdemm/volumecontrold/volumecontrold.cpp deleted file mode 100644 index 12bf0a086..000000000 --- a/kdemm/volumecontrold/volumecontrold.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "volumecontrold.h" - -#include -#include - -extern "C" -{ - KDEDModule * create_volumecontrold( const TQCString &name ) - { - return new VolumeControlD( name ); - } -} - -class VolumeControlD::Private -{ - public: -}; - -VolumeControlD::VolumeControlD( const TQCString & name ) - : KDEDModule( name ) -{ - connect( KApplication::dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString & ) ), - TQT_SLOT( applicationRemoved( const TQCString& ) ) ); -} - -#include "volumecontrold.moc" - -// vim: sw=4 ts=4 noet diff --git a/kdemm/volumecontrold/volumecontrold.desktop b/kdemm/volumecontrold/volumecontrold.desktop deleted file mode 100644 index 8c0bde15f..000000000 --- a/kdemm/volumecontrold/volumecontrold.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Type=Service -ServiceTypes=KDEDModule - -X-KDE-ModuleType=Library -X-KDE-Library=volumecontrold -X-KDE-FactoryName=volumecontrold -X-KDE-Kded-autoload=false -X-KDE-Kded-load-on-demand=true - -Name=Volume Control -Comment=volume control daemon module for KDED diff --git a/kdemm/volumecontrold/volumecontrold.h b/kdemm/volumecontrold/volumecontrold.h deleted file mode 100644 index db19cd024..000000000 --- a/kdemm/volumecontrold/volumecontrold.h +++ /dev/null @@ -1,53 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Matthias Kretz - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef VOLUMECONTROLD_H -#define VOLUMECONTROLD_H - -#include -#include - -class VolumeControlD : public KDEDModule -{ - Q_OBJECT - K_DCOP - public: - VolumeControlD(const TQCString &name); - virtual ~VolumeControlD(); - - k_dcop: - // think of some better API here... - TQStringList availableChannels() const; - TQStringList openConnectionsToChannel( const TQString & channel ) const; - float volume( const TQString & connection, const TQString & channel ) const; - void setVolume( const TQString & connection, const TQString & channel, float volume ); - - private slots: - /** - * When an app with a registered Channel goes down we want to notice... - */ - void applicationRemoved( const TQCString & ); - - private: - class Private; - Private * d; -}; - -// vim: sw=4 ts=4 tw=80 noet -#endif // VOLUMECONTROLD_H