Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.phonon
Class MediaNode

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.phonon.MediaNode

All Implemented Interfaces:
  QtJambiInterface

    public final class MediaNode

extends QtJambiObject

The MediaNode class is the base class for all nodes in a media graph. In all phonon applications, one builds a media graph consisting of MediaNodes. The graph will take multimedia content, e.g., from a file, as input. After its nodes have processed the multimedia, the graph will output the media again, e.g., to a sound card.

The multimedia content is streamed over `Path`s between the nodes in the graph. You can query the paths that are connected to a media node with `inputPaths()` and `outputPaths()`.

You can check whether the node is implemented by the current backend by calling `isValid()`. This does not guarantee that an instance of the class works as expected, but that the backend has implemented functionality for the class.

Currently, Phonon has four media nodes: `MediaObject`, `AudioOutput`, `VideoWidget`, and `Effect`. Please refer to their class descriptions for details about their usage, and to find out which nodes can be connected to each other. See also Building Graphs in Phonon's overview document.

Two nodes are connected to each other using the Phonon::createPath() or `Path::insertEffect()` functions (only `Phonon::Effect`s use `insertEffect()`). We show a code example below, in which we build a media graph for video playback and then query its media nodes for their `Path`s:

        MediaObject mediaObject = new MediaObject();
        AudioOutput audioOutput = new AudioOutput();
        VideoWidget videoWidget = new VideoWidget();

        Phonon.createPath(mediaObject, audioOutput);
        Phonon.createPath(mediaObject, videoWidget);

        List<Path> inputPaths =
            audioOutput.inputPaths();   // inputPaths = [ mediaObject ]
        List<Path> outputPaths =
            mediaObject.outputPaths(); // outputPaths = [ audioOutput, videoWidget ]

When you create a Phonon application, you will likely build the graph yourself. This makes `isValid()` the most useful function of this class. The other two functions help navigate the graph, which you do not need to do as you created the nodes yourself.

See also:
  Phonon Overview, `Phonon::MediaObject`, `Phonon::AudioOutput`, `Phonon::VideoWidget`, and Phonon Module.

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Method Summary
`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 outputs media.

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 com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

Methods inherited from class java.lang.Object
`clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Method Detail

### inputPaths

    public final java.util.List inputPaths()

  Returns the paths that inputs multimedia to this media node.

See also:
  `outputPaths()`.

### isValid

    public final boolean isValid()

  Returns true if the backend provides an implementation of this class; otherwise returns false.

  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.

### outputPaths

    public final java.util.List outputPaths()

  Returns the paths to which this media node outputs media.

See also:
  `inputPaths()`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD