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 MediaController

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.core.QObject
                  com.trolltech.qt.phonon.MediaController

All Implemented Interfaces:
  QtJambiInterface

    public class MediaController

extends QObject

The `MediaController` class controls optional features of a media file/device. Some media sources have content that the `MediaObject` does not provide control over, for instance, chapters in a DVD file. The functionality the media controller offers is dependent on the type of media source that is played back. Commonly, the media controller allows you to:

- Navigate between chapters.
- Navigate between titles.
- Select between angles.

The `Feature` enum explains these terms in more detail, and their context in playback of CD and DVD.

The media controller keeps a `MediaObject`, of which `media source` is played back. You can still call the media object's functions, e.g., `stop()`; this is all handled correctly by the media controller. You have the option of letting the media controller play all titles of a source in sequence by setting the `autoplay titles` option.

To start a playback using a media object, you call `play()` on the media object. To play a specific title, use `setCurrentTitle()` and then call `play()`.

Warning: The `MediaController` is not yet supported by Qt backends.

Author: Matthias Kretz <kretz@kde.org>

Nested Class Summary
`static class` | `MediaController.Feature` The values of this enum are interpreted differently depending on the type of media source, e.g., DVD or CD.
`static class` | `MediaController.Features` This is a flags class for com.trolltech.qt.phonon.MediaController.Feature

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`

Field Summary
`QSignalEmitter.Signal1` | `angleChanged` This signal is emitted whenever the current angle changes.
`QSignalEmitter.Signal1` | `availableAnglesChanged` This signal is emitted whenever the number of available angles changes.
`QSignalEmitter.Signal1` | `availableChaptersChanged` This signal is emitted whenever the number of available chapters changes.
`QSignalEmitter.Signal1` | `availableTitlesChanged` This signal is emitted whenever the number of available titles changes.
`QSignalEmitter.Signal1` | `chapterChanged` This signal is emitted whenever the current chapter changes.
`QSignalEmitter.Signal1` | `titleChanged` This signal is emitted whenever the current title changes.

Constructor Summary
`MediaController(MediaObject parent)` Constructs a new `MediaController` with the media object (`parent`) to be used by the media controller.

Method Summary
`boolean` | `autoplayTitles()` Returns true if titles will automatically be played when the media is played; otherwise returns false.
`int` | `availableAngles()` Returns the available angles that is available for the current media source.
`int` | `availableChapters()` Returns the number of chapters the current media source contains.
`int` | `availableTitles()` Returns the number of titles that the current media source contains.
`int` | `currentAngle()` Returns the angle that is currently used.
`int` | `currentChapter()` Returns the chapter that is currently being played back.
`int` | `currentTitle()` Returns the title that is currently played back.
`static MediaController` | `fromNativePointer(QNativePointer nativePointer)` This method returns the MediaController instance pointed to by `nativePointer`.
`void` | `nextTitle()` Skips to the next title.
`void` | `previousTitle()` Skips to the previous title.
`void` | `setAutoplayTitles(boolean arg__1)` Sets the titles to play automatically when the media is played if `enable` is true; otherwise disables this option.
`void` | `setCurrentAngle(int angleNumber)` Sets the current chapter to the given `chapterNumber` if the media file or device supports navigation by angle number.
`void` | `setCurrentChapter(int chapterNumber)` Sets the current chapter to the given `chapterNumber` if the media file or device supports navigation by chapter number.
`void` | `setCurrentTitle(int titleNumber)` Skips to the given title `titleNumber`.
`MediaController.Features` | `supportedFeatures()`

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`

Field Detail

### angleChanged

    public final QSignalEmitter.Signal1 angleChanged

  This signal is emitted whenever the current angle changes. The new angle number is given by `angleNumber`.

See also:
  `Feature` .

### availableAnglesChanged

    public final QSignalEmitter.Signal1 availableAnglesChanged

  This signal is emitted whenever the number of available angles changes. The new number of available angles is given by `availableAngles`.

See also:
  `Feature` .

### availableChaptersChanged

    public final QSignalEmitter.Signal1 availableChaptersChanged

  This signal is emitted whenever the number of available chapters changes. The new number of available chapters is given by `availableChapters`.

See also:
  `Feature` .

### availableTitlesChanged

    public final QSignalEmitter.Signal1 availableTitlesChanged

  This signal is emitted whenever the number of available titles changes. The new number of available titles is given by `availableTitles`.

See also:
  `Feature` .

### chapterChanged

    public final QSignalEmitter.Signal1 chapterChanged

  This signal is emitted whenever the current chapter changes. The new chapter number is given by `chapterNumber`.

See also:
  `Feature` .

### titleChanged

    public final QSignalEmitter.Signal1 titleChanged

  This signal is emitted whenever the current title changes. The new title number is given by `titleNumber`.

See also:
  `Feature` .

Constructor Detail

### MediaController

    public MediaController(MediaObject parent)

  Constructs a new `MediaController` with the media object (`parent`) to be used by the media controller.

See also:
  `MediaObject`, and `Feature` .

Method Detail

### autoplayTitles

    public final boolean autoplayTitles()

  Returns true if titles will automatically be played when the media is played; otherwise returns false.

  The media controller will play the titles of the media source in sequence when the media object's `play()` function is called. If the autoplay option is disabled, the media object will play the `MediaSource::currentTitle()`{current title} and then finish the playback.

See also:
  `setAutoplayTitles()`, and `currentTitle()`.

### availableAngles

    public final int availableAngles()

  Returns the available angles that is available for the current media source.

See also:
  `Feature` .

### availableChapters

    public final int availableChapters()

  Returns the number of chapters the current media source contains.

See also:
  `Feature` .

### availableTitles

    public final int availableTitles()

  Returns the number of titles that the current media source contains.

See also:
  `Feature` .

### currentAngle

    public final int currentAngle()

  Returns the angle that is currently used.

See also:
  `setCurrentAngle()`, and `Feature` .

### currentChapter

    public final int currentChapter()

  Returns the chapter that is currently being played back.

See also:
  `setCurrentChapter()`, and `Feature` .

### currentTitle

    public final int currentTitle()

  Returns the title that is currently played back.

  The current title is 0 (the first) by default.

See also:
  `setCurrentTitle()`, and `Feature` .

### nextTitle

    public final void nextTitle()

  Skips to the next title.

  If it was playing before the title change it will start playback on the next title if `autoplayTitles` is enabled.

See also:
  `Feature` .

### previousTitle

    public final void previousTitle()

  Skips to the previous title.

  If it was playing before the title change it will start playback on the previous title if `autoplayTitles` is enabled.

See also:
  `Feature` .

### setAutoplayTitles

    public final void setAutoplayTitles(boolean arg__1)

  Sets the titles to play automatically when the media is played if `enable` is true; otherwise disables this option.

  The media controller will play the titles of the media source in sequence when the media object's `play()` function is called. If the autoplay option is disabled, the media object will play the `MediaSource::currentTitle()`{current title} and then finish the playback.

See also:
  `autoplayTitles()`, and `currentTitle()`.

### setCurrentAngle

    public final void setCurrentAngle(int angleNumber)

  Sets the current chapter to the given `chapterNumber` if the media file or device supports navigation by angle number.

See also:
  `currentAngle()`, and `Feature` .

### setCurrentChapter

    public final void setCurrentChapter(int chapterNumber)

  Sets the current chapter to the given `chapterNumber` if the media file or device supports navigation by chapter number.

See also:
  `currentChapter()`, and `Feature` .

### setCurrentTitle

    public final void setCurrentTitle(int titleNumber)

  Skips to the given title `titleNumber`.

  If it was playing before the title change it will start playback on the new title if `autoplayTitles` is enabled.

See also:
  `currentTitle()`, and `Feature` .

### supportedFeatures

    public final MediaController.Features supportedFeatures()

### fromNativePointer

    public static MediaController fromNativePointer(QNativePointer nativePointer)

  This method returns the MediaController instance pointed to by `nativePointer`.

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