|
|||||||||
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.core.QObject
com.trolltech.qt.phonon.Effect
public class Effect
The Effect class is used to transform audio streams. An effect is a media node which is inserted into a path between a MediaObject
and an audio output node, for instance, an AudioOutput
, and transforms the media stream on that path.
Examples may include simple modifiers such as fading or pitch shifting, or more complex mathematical transformations. You can query the backend for available effects with BackendCapabilities::availableAudioEffects().
In order to use an effect, insert it into the path as follows:
Path path = Phonon::createPath(...); Effect *effect = new Effect(this); path.insertEffect(effect);The effect will immediately begin applying it's transformations on the path. To stop it, remove the Effect from the path.
For creating an effect, you use the EffectDescription, which you get from availableAudioEffects(). We give a code example below.
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);Author: Matthias Kretz <kretz@kde.org>
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 | |
---|---|
Effect(EffectDescription description)
Constructs a new effect object with the given description and parent object. |
|
Effect(EffectDescription description,
QObject parent)
Constructs a new effect object with the given description and parent object. |
Method Summary | |
---|---|
EffectDescription |
description()
Returns the description of this effect. |
static Effect |
fromNativePointer(QNativePointer nativePointer)
|
java.util.List |
inputPaths()
Returns the paths that inputs multimedia to this media node. |
boolean |
isValid()
Returns true if the backend provides an implementation of this class; otherwise returns false. |
java.util.List |
outputPaths()
Returns the paths to which this media node output media. |
java.util.List |
parameters()
Returns a list of parameters that this effect provides to control its behavior. |
java.lang.Object |
parameterValue(EffectParameter arg__1)
Returns the value of the given effect parameter. |
void |
setParameterValue(EffectParameter arg__1,
java.lang.Object value)
Sets the given effect parameter to the specified value. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
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 |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public Effect(EffectDescription description)
The EffectDescription object determines the type of the effect. See BackendCapabilities::availableAudioEffects().
public Effect(EffectDescription description, QObject parent)
The EffectDescription object determines the type of the effect. See BackendCapabilities::availableAudioEffects().
Method Detail |
---|
public final EffectDescription description()
public final java.util.List inputPaths()
outputPaths()
.
public final boolean isValid()
This does not guarantee that instances of the class works as expected, but that the backend has implemented the functionality for this class. For instance, Qt's GStreamer
backend will return true for instances of the AudioOutput
class, even if there is a problem with GStreamer
and it could not play sound.
public final java.util.List outputPaths()
inputPaths()
.
public final java.lang.Object parameterValue(EffectParameter arg__1)
setParameterValue()
.
public final java.util.List parameters()
EffectParameter
, and EffectWidget
.
public final void setParameterValue(EffectParameter arg__1, java.lang.Object value)
parameterValue()
.
public static Effect fromNativePointer(QNativePointer nativePointer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |