|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.phonon.Path
public class Path
The Path class describes connections between media objects. Paths objects provide a convenient way to process media data by allowing effects to be inserted between input and output sources.
MediaObject *media = new MediaObject; AudioOutput *output = new AudioOutput(Phonon::MusicCategory); Path path = Phonon::createPath(media, output); Q_ASSERT(path.isValid()); // for this simple case the path should always be //valid - there are unit tests to ensure it // insert an effect QList<EffectDescription> effectList = BackendCapabilities::availableAudioEffects(); if (!effectList.isEmpty()) { Effect *effect = path.insertEffect(effectList.first()); }Author: Matthias Kretz <.org> Author: Thierry Bastian <thierry..com>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Constructor Summary | |
---|---|
Path()
|
|
Path(Path arg__1)
Constructs a copy of the other arg_1 specified. |
Method Summary | |
---|---|
Path |
clone()
This method is reimplemented for internal reasons |
boolean |
disconnectPath()
Creates an invalid path. |
java.util.List |
effects()
Returns a list of Effect objects that are currently used as effects. |
static Path |
fromNativePointer(QNativePointer nativePointer)
|
boolean |
insertEffect(Effect newEffect)
Inserts the given effect into the path before the effect specified by insertBefore and returns true if successful; otherwise returns false. |
Effect |
insertEffect(EffectDescription desc)
Creates and inserts an effect into the path. |
Effect |
insertEffect(EffectDescription desc,
Effect insertBefore)
Creates and inserts an effect into the path. |
boolean |
insertEffect(Effect newEffect,
Effect insertBefore)
Inserts the given effect into the path before the effect specified by insertBefore and returns true if successful; otherwise returns false. |
boolean |
isValid()
Returns true if the backend provides an implementation of this class; otherwise, returns false. |
static QNativePointer |
nativePointerArray(Path[] array)
|
boolean |
reconnect(MediaNodeInterface source,
MediaNodeInterface sink)
Changes this Path's input and output node to source and sink |
boolean |
removeEffect(Effect effect)
Removes the given effect from the path and returns true; otherwise returns false. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public Path()
public Path(Path arg__1)
This constructor is fast thanks to explicit sharing.
Method Detail |
---|
public final boolean disconnectPath()
You can still make it a valid path by calling reconnect. To create a path you should use createPath, though.
isValid()
.
public final java.util.List effects()
Returns A list with all current effects.
insertEffect()
, and removeEffect()
.
public final boolean insertEffect(Effect newEffect)
If insertBefore is zero, the effect is appended to the processing list.
You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.
newEffect will be inserted right before insertBefore. If insertBefore is null, the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return false.
Returns whether the effect could be inserted at the specified position. If false is returned the effect was not inserted.
removeEffect()
, and effects()
.
public final boolean insertEffect(Effect newEffect, Effect insertBefore)
If insertBefore is zero, the effect is appended to the processing list.
You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.
newEffect will be inserted right before insertBefore. If insertBefore is null, the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return false.
Returns whether the effect could be inserted at the specified position. If false is returned the effect was not inserted.
removeEffect()
, and effects()
.
public final Effect insertEffect(EffectDescription desc)
You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.
desc is the EffectDescription object for the effect to be inserted.
If you already inserted an effect you can tell with insertBefore in which order the data gets processed. If this is null the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return false.
Returns a pointer to the effect object if it could be inserted at the specified position. If 0 is returned, the effect was not inserted.
Below is a code example for inserting an effect into a path:
The following code example is written in c++.
QList<Phonon::EffectDescription> effectDescriptions = Phonon::BackendCapabilities::availableAudioEffects(); Phonon::EffectDescription effectDescription = effectDescriptions.at(4); Phonon::Path path = Phonon::createPath(mediaObject, audioOutput); Phonon::Effect *effect = new Phonon::Effect(effectDescription); path.insertEffect(effect);
removeEffect()
, and effects()
.
public final Effect insertEffect(EffectDescription desc, Effect insertBefore)
You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.
desc is the EffectDescription object for the effect to be inserted.
If you already inserted an effect you can tell with insertBefore in which order the data gets processed. If this is null the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return false.
Returns a pointer to the effect object if it could be inserted at the specified position. If 0 is returned, the effect was not inserted.
Below is a code example for inserting an effect into a path:
The following code example is written in c++.
QList<Phonon::EffectDescription> effectDescriptions = Phonon::BackendCapabilities::availableAudioEffects(); Phonon::EffectDescription effectDescription = effectDescriptions.at(4); Phonon::Path path = Phonon::createPath(mediaObject, audioOutput); Phonon::Effect *effect = new Phonon::Effect(effectDescription); path.insertEffect(effect);
removeEffect()
, and effects()
.
public final boolean isValid()
public final boolean reconnect(MediaNodeInterface source, MediaNodeInterface sink)
public final boolean removeEffect(Effect effect)
Removes an effect from the path.
If the effect is deleted while it is still connected, the effect will be removed automatically.
insertEffect()
, and effects()
.
public static Path fromNativePointer(QNativePointer nativePointer)
public static QNativePointer nativePointerArray(Path[] array)
public Path clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |