arts Library API Documentation

KDE::PlayObjectFactory Class Reference

This class implements a factory to create KDE::PlayObjects for a given URL and mimetype. More...

#include <kplayobjectfactory.h>

List of all members.

Public Member Functions

 PlayObjectFactory (Arts::SoundServerV2 server)
 PlayObjectFactory (KArtsServer *server)
void setAudioManagerPlay (KAudioManagerPlay *amanplay)
KDE::PlayObjectcreatePlayObject (const KURL &url, bool createBUS)
KDE::PlayObjectcreatePlayObject (const KURL &url, const QString &mimetype, bool createBUS)
void setAllowStreaming (bool s)
bool allowStreaming ()

Static Public Member Functions

QStringList mimeTypes (void)


Detailed Description

This class implements a factory to create KDE::PlayObjects for a given URL and mimetype.

A detailed description about how to use the KDE multimedia framework can be found in the documentation for KDE::PlayObject.

Definition at line 79 of file kplayobjectfactory.h.


Constructor & Destructor Documentation

KDE::PlayObjectFactory::PlayObjectFactory Arts::SoundServerV2  server  ) 
 

Creates a KDE::PlayObjectFactory.

server is an Arts::SoundServerV2

Definition at line 88 of file kplayobjectfactory.cc.

References PlayObjectFactory().

Referenced by PlayObjectFactory().

KDE::PlayObjectFactory::PlayObjectFactory KArtsServer server  ) 
 

Convenience constructor to pass a KArtsServer instead of an Arts::SoundServerV2.

This equivalent to calling KDE::PlayObjectFactory( server.server() ).

Since:
3.2

Definition at line 98 of file kplayobjectfactory.cc.

References PlayObjectFactory(), and KArtsServer::server().


Member Function Documentation

void KDE::PlayObjectFactory::setAudioManagerPlay KAudioManagerPlay amanplay  ) 
 

If this is set the PlayObject doesn't create a Synth_BUS_UPLINK at all but always uses the Synth_AMAN_PLAY that you passed.

Definition at line 114 of file kplayobjectfactory.cc.

References setAudioManagerPlay().

Referenced by setAudioManagerPlay().

KDE::PlayObject * KDE::PlayObjectFactory::createPlayObject const KURL url,
bool  createBUS
 

Creates a KDE::PlayObject to play back the file or stream url points to.

Set createBUS to "true", if you want the PlayObject to be connected to a SYNTH_BUS_UPLINK on creation. This is usually the case. You only need to set this to "false" if you want to attach your own sound effects to the PlayObject.

You don't need to know the mimetype of the file or stream, it will be detected automatically.

Definition at line 121 of file kplayobjectfactory.cc.

References createPlayObject(), and KMimeType::Ptr.

Referenced by createPlayObject().

KDE::PlayObject * KDE::PlayObjectFactory::createPlayObject const KURL url,
const QString mimetype,
bool  createBUS
 

This method also creates a KDE::PlayObject, but does no automatic mimetype detection.

Use this method with care.

Definition at line 127 of file kplayobjectfactory.cc.

References createPlayObject(), endl(), KURL::isEmpty(), KURL::isLocalFile(), kdWarning(), mimeTypes(), KURL::path(), and KURL::protocol().

void KDE::PlayObjectFactory::setAllowStreaming bool  s  )  [inline]
 

setAllowStreaming( true ) allows the factory to create a streaming PlayObject for a non-local URL.

This is also the default. Usually, you should not need to set this to false.

Definition at line 126 of file kplayobjectfactory.h.

bool KDE::PlayObjectFactory::allowStreaming  )  [inline]
 

returns "true" if the factory is allowed to create streaming PlayObjects.

Definition at line 132 of file kplayobjectfactory.h.

QStringList KDE::PlayObjectFactory::mimeTypes void   )  [static]
 

Return the mimetypes that are playable.

Definition at line 174 of file kplayobjectfactory.cc.

References QStringList::sort().

Referenced by createPlayObject().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for arts Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Apr 12 23:21:42 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003