kplayobjectfactory.cpp
65 KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS)
84 return new KPlayObject(m_server.createPlayObjectForStream(instream, string("audio/x-mp3"), createBUS), true);
87 return new KPlayObject(m_server.createPlayObjectForURL(string(TQFile::encodeName(url.path())), string(mimetype.latin1()), createBUS), false);
136 KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS)
153 kdWarning( 400 ) << "KDE::PlayObjectFactory was instructed to use a Synth_AMAN_PLAY for output but the program also asked for a Synth_BUS_UPLINK" << endl;
157 // decide if it's a local file. mpeglib provides cdda reading and decoding, so we prefer that over tdeio_audiocd
158 if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().contains( "application/x-cda" ) ) )
161 d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( TQFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false );
182 TQObject::connect( d->playObj, TQ_SIGNAL( playObjectCreated() ), d->helper, TQ_SLOT( connectAmanPlay() ) );
KArtsDispatcher ensures that an instance of Arts::Dispatcher using an Arts::QIOManager exists.
Definition: kartsdispatcher.h:65
KArtsServer is a wrapper to conveniently get a reference to a SoundServer, and restart artsd when nec...
Definition: kartsserver.h:38
Arts::SoundServerV2 server(void)
Get a verified reference to the SoundServerV2, (re)starting artsd using the kcontrol-specified settin...
Definition: kartsserver.cpp:47
KDE::PlayObject * createPlayObject(const KURL &url, bool createBUS)
Creates a KDE::PlayObject to play back the file or stream url points to.
Definition: kplayobjectfactory.cpp:130
void setAudioManagerPlay(KAudioManagerPlay *amanplay)
If this is set the PlayObject doesn't create a Synth_BUS_UPLINK at all but always uses the Synth_AMAN...
Definition: kplayobjectfactory.cpp:123
static TQStringList mimeTypes(void)
Return the mimetypes that are playable.
Definition: kplayobjectfactory.cpp:190
PlayObjectFactory(Arts::SoundServerV2 server)
Creates a KDE::PlayObjectFactory.
Definition: kplayobjectfactory.cpp:97
This class acts as a general interface to the KDE multimedia framework.
Definition: kplayobject.h:189
TQString path() const
TQString protocol() const
bool isEmpty() const
TQString url(int _trailing=0, int encoding_hint=0) const
bool isLocalFile() const
kndbgstream & endl(kndbgstream &s)
kdbgstream kdWarning(int area=0)
kdbgstream kdDebug(int area=0)